Add support for catching system calls to native FreeBSD targets.
[external/binutils.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.64.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7 # Foundation, Inc.
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 case $0 in #((
91   *[\\/]* ) as_myself=$0 ;;
92   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93 for as_dir in $PATH
94 do
95   IFS=$as_save_IFS
96   test -z "$as_dir" && as_dir=.
97     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98   done
99 IFS=$as_save_IFS
100
101      ;;
102 esac
103 # We did not find ourselves, most probably we were run as `sh COMMAND'
104 # in which case we are not to be found in the path.
105 if test "x$as_myself" = x; then
106   as_myself=$0
107 fi
108 if test ! -f "$as_myself"; then
109   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110   exit 1
111 fi
112
113 # Unset variables that we do not need and which cause bugs (e.g. in
114 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
115 # suppresses any "Segmentation fault" message there.  '((' could
116 # trigger a bug in pdksh 5.2.14.
117 for as_var in BASH_ENV ENV MAIL MAILPATH
118 do eval test x\${$as_var+set} = xset \
119   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120 done
121 PS1='$ '
122 PS2='> '
123 PS4='+ '
124
125 # NLS nuisances.
126 LC_ALL=C
127 export LC_ALL
128 LANGUAGE=C
129 export LANGUAGE
130
131 # CDPATH.
132 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134 if test "x$CONFIG_SHELL" = x; then
135   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136   emulate sh
137   NULLCMD=:
138   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139   # is contrary to our usage.  Disable this feature.
140   alias -g '\${1+\"\$@\"}'='\"\$@\"'
141   setopt NO_GLOB_SUBST
142 else
143   case \`(set -o) 2>/dev/null\` in #(
144   *posix*) :
145     set -o posix ;; #(
146   *) :
147      ;;
148 esac
149 fi
150 "
151   as_required="as_fn_return () { (exit \$1); }
152 as_fn_success () { as_fn_return 0; }
153 as_fn_failure () { as_fn_return 1; }
154 as_fn_ret_success () { return 0; }
155 as_fn_ret_failure () { return 1; }
156
157 exitcode=0
158 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164 else
165   exitcode=1; echo positional parameters were not saved.
166 fi
167 test x\$exitcode = x0 || exit 1"
168   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172 test \$(( 1 + 1 )) = 2 || exit 1"
173   if (eval "$as_required") 2>/dev/null; then :
174   as_have_required=yes
175 else
176   as_have_required=no
177 fi
178   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180 else
181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182 as_found=false
183 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
184 do
185   IFS=$as_save_IFS
186   test -z "$as_dir" && as_dir=.
187   as_found=:
188   case $as_dir in #(
189          /*)
190            for as_base in sh bash ksh sh5; do
191              # Try only shells that exist, to save several forks.
192              as_shell=$as_dir/$as_base
193              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195   CONFIG_SHELL=$as_shell as_have_required=yes
196                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197   break 2
198 fi
199 fi
200            done;;
201        esac
202   as_found=false
203 done
204 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206   CONFIG_SHELL=$SHELL as_have_required=yes
207 fi; }
208 IFS=$as_save_IFS
209
210
211       if test "x$CONFIG_SHELL" != x; then :
212   # We cannot yet assume a decent shell, so we have to provide a
213         # neutralization value for shells without unset; and this also
214         # works around shells that cannot unset nonexistent variables.
215         BASH_ENV=/dev/null
216         ENV=/dev/null
217         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218         export CONFIG_SHELL
219         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220 fi
221
222     if test x$as_have_required = xno; then :
223   $as_echo "$0: This script requires a shell more modern than all"
224   $as_echo "$0: the shells that I found on your system."
225   if test x${ZSH_VERSION+set} = xset ; then
226     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
228   else
229     $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230 $0: including any error possibly output before this
231 $0: message. Then install a modern shell, or manually run
232 $0: the script under such a shell if you do have one."
233   fi
234   exit 1
235 fi
236 fi
237 fi
238 SHELL=${CONFIG_SHELL-/bin/sh}
239 export SHELL
240 # Unset more variables known to interfere with behavior of common tools.
241 CLICOLOR_FORCE= GREP_OPTIONS=
242 unset CLICOLOR_FORCE GREP_OPTIONS
243
244 ## --------------------- ##
245 ## M4sh Shell Functions. ##
246 ## --------------------- ##
247 # as_fn_unset VAR
248 # ---------------
249 # Portably unset VAR.
250 as_fn_unset ()
251 {
252   { eval $1=; unset $1;}
253 }
254 as_unset=as_fn_unset
255
256 # as_fn_set_status STATUS
257 # -----------------------
258 # Set $? to STATUS, without forking.
259 as_fn_set_status ()
260 {
261   return $1
262 } # as_fn_set_status
263
264 # as_fn_exit STATUS
265 # -----------------
266 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267 as_fn_exit ()
268 {
269   set +e
270   as_fn_set_status $1
271   exit $1
272 } # as_fn_exit
273
274 # as_fn_mkdir_p
275 # -------------
276 # Create "$as_dir" as a directory, including parents if necessary.
277 as_fn_mkdir_p ()
278 {
279
280   case $as_dir in #(
281   -*) as_dir=./$as_dir;;
282   esac
283   test -d "$as_dir" || eval $as_mkdir_p || {
284     as_dirs=
285     while :; do
286       case $as_dir in #(
287       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288       *) as_qdir=$as_dir;;
289       esac
290       as_dirs="'$as_qdir' $as_dirs"
291       as_dir=`$as_dirname -- "$as_dir" ||
292 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293          X"$as_dir" : 'X\(//\)[^/]' \| \
294          X"$as_dir" : 'X\(//\)$' \| \
295          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296 $as_echo X"$as_dir" |
297     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298             s//\1/
299             q
300           }
301           /^X\(\/\/\)[^/].*/{
302             s//\1/
303             q
304           }
305           /^X\(\/\/\)$/{
306             s//\1/
307             q
308           }
309           /^X\(\/\).*/{
310             s//\1/
311             q
312           }
313           s/.*/./; q'`
314       test -d "$as_dir" && break
315     done
316     test -z "$as_dirs" || eval "mkdir $as_dirs"
317   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320 } # as_fn_mkdir_p
321 # as_fn_append VAR VALUE
322 # ----------------------
323 # Append the text in VALUE to the end of the definition contained in VAR. Take
324 # advantage of any shell optimizations that allow amortized linear growth over
325 # repeated appends, instead of the typical quadratic growth present in naive
326 # implementations.
327 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328   eval 'as_fn_append ()
329   {
330     eval $1+=\$2
331   }'
332 else
333   as_fn_append ()
334   {
335     eval $1=\$$1\$2
336   }
337 fi # as_fn_append
338
339 # as_fn_arith ARG...
340 # ------------------
341 # Perform arithmetic evaluation on the ARGs, and store the result in the
342 # global $as_val. Take advantage of shells that can avoid forks. The arguments
343 # must be portable across $(()) and expr.
344 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345   eval 'as_fn_arith ()
346   {
347     as_val=$(( $* ))
348   }'
349 else
350   as_fn_arith ()
351   {
352     as_val=`expr "$@" || test $? -eq 1`
353   }
354 fi # as_fn_arith
355
356
357 # as_fn_error ERROR [LINENO LOG_FD]
358 # ---------------------------------
359 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361 # script with status $?, using 1 if that was 0.
362 as_fn_error ()
363 {
364   as_status=$?; test $as_status -eq 0 && as_status=1
365   if test "$3"; then
366     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368   fi
369   $as_echo "$as_me: error: $1" >&2
370   as_fn_exit $as_status
371 } # as_fn_error
372
373 if expr a : '\(a\)' >/dev/null 2>&1 &&
374    test "X`expr 00001 : '.*\(...\)'`" = X001; then
375   as_expr=expr
376 else
377   as_expr=false
378 fi
379
380 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
381   as_basename=basename
382 else
383   as_basename=false
384 fi
385
386 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387   as_dirname=dirname
388 else
389   as_dirname=false
390 fi
391
392 as_me=`$as_basename -- "$0" ||
393 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394          X"$0" : 'X\(//\)$' \| \
395          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396 $as_echo X/"$0" |
397     sed '/^.*\/\([^/][^/]*\)\/*$/{
398             s//\1/
399             q
400           }
401           /^X\/\(\/\/\)$/{
402             s//\1/
403             q
404           }
405           /^X\/\(\/\).*/{
406             s//\1/
407             q
408           }
409           s/.*/./; q'`
410
411 # Avoid depending upon Character Ranges.
412 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415 as_cr_digits='0123456789'
416 as_cr_alnum=$as_cr_Letters$as_cr_digits
417
418
419   as_lineno_1=$LINENO as_lineno_1a=$LINENO
420   as_lineno_2=$LINENO as_lineno_2a=$LINENO
421   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
424   sed -n '
425     p
426     /[$]LINENO/=
427   ' <$as_myself |
428     sed '
429       s/[$]LINENO.*/&-/
430       t lineno
431       b
432       :lineno
433       N
434       :loop
435       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
436       t loop
437       s/-\n.*//
438     ' >$as_me.lineno &&
439   chmod +x "$as_me.lineno" ||
440     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
441
442   # Don't try to exec as it changes $[0], causing all sort of problems
443   # (the dirname of $[0] is not the place where we might find the
444   # original and so on.  Autoconf is especially sensitive to this).
445   . "./$as_me.lineno"
446   # Exit status is that of the last command.
447   exit
448 }
449
450 ECHO_C= ECHO_N= ECHO_T=
451 case `echo -n x` in #(((((
452 -n*)
453   case `echo 'xy\c'` in
454   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
455   xy)  ECHO_C='\c';;
456   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
457        ECHO_T=' ';;
458   esac;;
459 *)
460   ECHO_N='-n';;
461 esac
462
463 rm -f conf$$ conf$$.exe conf$$.file
464 if test -d conf$$.dir; then
465   rm -f conf$$.dir/conf$$.file
466 else
467   rm -f conf$$.dir
468   mkdir conf$$.dir 2>/dev/null
469 fi
470 if (echo >conf$$.file) 2>/dev/null; then
471   if ln -s conf$$.file conf$$ 2>/dev/null; then
472     as_ln_s='ln -s'
473     # ... but there are two gotchas:
474     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476     # In both cases, we have to default to `cp -p'.
477     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478       as_ln_s='cp -p'
479   elif ln conf$$.file conf$$ 2>/dev/null; then
480     as_ln_s=ln
481   else
482     as_ln_s='cp -p'
483   fi
484 else
485   as_ln_s='cp -p'
486 fi
487 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488 rmdir conf$$.dir 2>/dev/null
489
490 if mkdir -p . 2>/dev/null; then
491   as_mkdir_p='mkdir -p "$as_dir"'
492 else
493   test -d ./-p && rmdir ./-p
494   as_mkdir_p=false
495 fi
496
497 if test -x / >/dev/null 2>&1; then
498   as_test_x='test -x'
499 else
500   if ls -dL / >/dev/null 2>&1; then
501     as_ls_L_option=L
502   else
503     as_ls_L_option=
504   fi
505   as_test_x='
506     eval sh -c '\''
507       if test -d "$1"; then
508         test -d "$1/.";
509       else
510         case $1 in #(
511         -*)set "./$1";;
512         esac;
513         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514         ???[sx]*):;;*)false;;esac;fi
515     '\'' sh
516   '
517 fi
518 as_executable_p=$as_test_x
519
520 # Sed expression to map a string onto a valid CPP name.
521 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523 # Sed expression to map a string onto a valid variable name.
524 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
527 exec 7<&0 </dev/null 6>&1
528
529 # Name of the host.
530 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531 # so uname gets run too.
532 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
534 #
535 # Initializations.
536 #
537 ac_default_prefix=/usr/local
538 ac_clean_files=
539 ac_config_libobj_dir=.
540 LIBOBJS=
541 cross_compiling=no
542 subdirs=
543 MFLAGS=
544 MAKEFLAGS=
545
546 # Identity of this package.
547 PACKAGE_NAME=
548 PACKAGE_TARNAME=
549 PACKAGE_VERSION=
550 PACKAGE_STRING=
551 PACKAGE_BUGREPORT=
552 PACKAGE_URL=
553
554 ac_unique_file="main.c"
555 # Factoring default headers for most tests.
556 ac_includes_default="\
557 #include <stdio.h>
558 #ifdef HAVE_SYS_TYPES_H
559 # include <sys/types.h>
560 #endif
561 #ifdef HAVE_SYS_STAT_H
562 # include <sys/stat.h>
563 #endif
564 #ifdef STDC_HEADERS
565 # include <stdlib.h>
566 # include <stddef.h>
567 #else
568 # ifdef HAVE_STDLIB_H
569 #  include <stdlib.h>
570 # endif
571 #endif
572 #ifdef HAVE_STRING_H
573 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
574 #  include <memory.h>
575 # endif
576 # include <string.h>
577 #endif
578 #ifdef HAVE_STRINGS_H
579 # include <strings.h>
580 #endif
581 #ifdef HAVE_INTTYPES_H
582 # include <inttypes.h>
583 #endif
584 #ifdef HAVE_STDINT_H
585 # include <stdint.h>
586 #endif
587 #ifdef HAVE_UNISTD_H
588 # include <unistd.h>
589 #endif"
590
591 enable_option_checking=no
592 ac_subst_vars='LTLIBOBJS
593 LIBOBJS
594 GCORE_TRANSFORM_NAME
595 GDB_TRANSFORM_NAME
596 GDB_NM_FILE
597 LTLIBBABELTRACE
598 LIBBABELTRACE
599 HAVE_LIBBABELTRACE
600 frags
601 target_subdir
602 CONFIG_UNINSTALL
603 CONFIG_INSTALL
604 CONFIG_CLEAN
605 CONFIG_ALL
606 CONFIG_SRCS
607 CONFIG_DEPS
608 CONFIG_OBS
609 PROFILE_CFLAGS
610 ENABLE_CFLAGS
611 SIM_OBS
612 SIM
613 XMKMF
614 GDBTK_SRC_DIR
615 GDBTK_CFLAGS
616 GDBTKLIBS
617 X_LIBS
618 X_LDFLAGS
619 X_CFLAGS
620 TK_XINCLUDES
621 TK_DEPS
622 TK_LIBRARY
623 TK_INCLUDE
624 TK_STUB_LIB_SPEC
625 TK_STUB_LIB_FLAG
626 TK_STUB_LIB_FILE
627 TK_LIB_SPEC
628 TK_LIB_FLAG
629 TK_LIB_FILE
630 TK_SRC_DIR
631 TK_BIN_DIR
632 TK_VERSION
633 TCL_DEPS
634 TCL_LIBRARY
635 TCL_INCLUDE
636 TCL_STUB_LIB_SPEC
637 TCL_STUB_LIB_FLAG
638 TCL_STUB_LIB_FILE
639 TCL_LIB_SPEC
640 TCL_LIB_FLAG
641 TCL_LIB_FILE
642 TCL_SRC_DIR
643 TCL_BIN_DIR
644 TCL_PATCH_LEVEL
645 TCL_VERSION
646 WIN32LDAPP
647 GUI_CFLAGS_X
648 LIBGUI
649 LTLIBLZMA
650 LIBLZMA
651 HAVE_LIBLZMA
652 WIN32LIBS
653 SER_HARDWIRE
654 WERROR_CFLAGS
655 WARN_CFLAGS
656 SYSTEM_GDBINIT
657 TARGET_SYSTEM_ROOT
658 CONFIG_LDFLAGS
659 RDYNAMIC
660 ALLOCA
661 LTLIBIPT
662 LIBIPT
663 HAVE_LIBIPT
664 HAVE_GUILE_FALSE
665 HAVE_GUILE_TRUE
666 GUILE_LIBS
667 GUILE_CPPFLAGS
668 GUILD_TARGET_FLAG
669 GUILD
670 pkg_config_prog_path
671 HAVE_PYTHON_FALSE
672 HAVE_PYTHON_TRUE
673 PYTHON_LIBS
674 PYTHON_CPPFLAGS
675 PYTHON_CFLAGS
676 python_prog_path
677 LTLIBEXPAT
678 LIBEXPAT
679 HAVE_LIBEXPAT
680 JIT_READER_DIR
681 TARGET_PTR
682 READLINE_TEXI_INCFLAG
683 READLINE_CFLAGS
684 READLINE_DEPS
685 READLINE
686 LTLIBICONV
687 LIBICONV
688 zlibinc
689 zlibdir
690 MIG
691 WINDRES
692 DLLTOOL
693 AR
694 YFLAGS
695 YACC
696 RANLIB
697 LN_S
698 INSTALL_DATA
699 INSTALL_SCRIPT
700 INSTALL_PROGRAM
701 AWK
702 REPORT_BUGS_TEXI
703 REPORT_BUGS_TO
704 PKGVERSION
705 HAVE_NATIVE_GCORE_TARGET
706 TARGET_OBS
707 subdirs
708 GDB_DATADIR
709 DEBUGDIR
710 MAKEINFO_EXTRA_FLAGS
711 MAKEINFOFLAGS
712 MAKEINFO
713 PACKAGE
714 GNULIB_STDINT_H
715 CATOBJEXT
716 GENCAT
717 INSTOBJEXT
718 DATADIRNAME
719 CATALOGS
720 POSUB
721 GMSGFMT
722 XGETTEXT
723 INCINTL
724 LIBINTL_DEP
725 LIBINTL
726 USE_NLS
727 SET_MAKE
728 GMAKE_FALSE
729 GMAKE_TRUE
730 MAKE
731 CCDEPMODE
732 DEPDIR
733 am__leading_dot
734 COMPILER_CFLAGS
735 COMPILER
736 INSTALL_STRIP_PROGRAM
737 STRIP
738 install_sh
739 target_os
740 target_vendor
741 target_cpu
742 target
743 host_os
744 host_vendor
745 host_cpu
746 host
747 build_os
748 build_vendor
749 build_cpu
750 build
751 EGREP
752 GREP
753 CPP
754 ac_ct_CXX
755 CXXFLAGS
756 CXX
757 OBJEXT
758 EXEEXT
759 ac_ct_CC
760 CPPFLAGS
761 LDFLAGS
762 CFLAGS
763 CC
764 MAINT
765 MAINTAINER_MODE_FALSE
766 MAINTAINER_MODE_TRUE
767 target_alias
768 host_alias
769 build_alias
770 LIBS
771 ECHO_T
772 ECHO_N
773 ECHO_C
774 DEFS
775 mandir
776 localedir
777 libdir
778 psdir
779 pdfdir
780 dvidir
781 htmldir
782 infodir
783 docdir
784 oldincludedir
785 includedir
786 localstatedir
787 sharedstatedir
788 sysconfdir
789 datadir
790 datarootdir
791 libexecdir
792 sbindir
793 bindir
794 program_transform_name
795 prefix
796 exec_prefix
797 PACKAGE_URL
798 PACKAGE_BUGREPORT
799 PACKAGE_STRING
800 PACKAGE_VERSION
801 PACKAGE_TARNAME
802 PACKAGE_NAME
803 PATH_SEPARATOR
804 SHELL'
805 ac_subst_files='host_makefile_frag'
806 ac_user_opts='
807 enable_option_checking
808 enable_maintainer_mode
809 enable_plugins
810 enable_largefile
811 enable_build_with_cxx
812 with_separate_debug_dir
813 with_gdb_datadir
814 with_relocated_sources
815 with_auto_load_dir
816 with_auto_load_safe_path
817 enable_targets
818 enable_64_bit_bfd
819 enable_gdbcli
820 enable_gdbmi
821 enable_tui
822 enable_gdbtk
823 with_libunwind_ia64
824 with_curses
825 enable_profiling
826 with_pkgversion
827 with_bugurl
828 with_system_zlib
829 with_gnu_ld
830 enable_rpath
831 with_libiconv_prefix
832 with_iconv_bin
833 with_system_readline
834 with_jit_reader_dir
835 with_expat
836 with_libexpat_prefix
837 with_python
838 with_guile
839 enable_libmcheck
840 with_intel_pt
841 with_libipt_prefix
842 with_included_regex
843 with_sysroot
844 with_system_gdbinit
845 enable_werror
846 enable_build_warnings
847 enable_gdb_build_warnings
848 with_lzma
849 with_liblzma_prefix
850 with_tcl
851 with_tk
852 with_x
853 enable_sim
854 enable_multi_ice
855 enable_gdbserver
856 with_babeltrace
857 with_libbabeltrace_prefix
858 '
859       ac_precious_vars='build_alias
860 host_alias
861 target_alias
862 CC
863 CFLAGS
864 LDFLAGS
865 LIBS
866 CPPFLAGS
867 CXX
868 CXXFLAGS
869 CCC
870 CPP
871 MAKEINFO
872 MAKEINFOFLAGS
873 YACC
874 YFLAGS
875 XMKMF'
876 ac_subdirs_all='testsuite
877 gdbtk
878 multi-ice
879 gdbserver'
880
881 # Initialize some variables set by options.
882 ac_init_help=
883 ac_init_version=false
884 ac_unrecognized_opts=
885 ac_unrecognized_sep=
886 # The variables have the same names as the options, with
887 # dashes changed to underlines.
888 cache_file=/dev/null
889 exec_prefix=NONE
890 no_create=
891 no_recursion=
892 prefix=NONE
893 program_prefix=NONE
894 program_suffix=NONE
895 program_transform_name=s,x,x,
896 silent=
897 site=
898 srcdir=
899 verbose=
900 x_includes=NONE
901 x_libraries=NONE
902
903 # Installation directory options.
904 # These are left unexpanded so users can "make install exec_prefix=/foo"
905 # and all the variables that are supposed to be based on exec_prefix
906 # by default will actually change.
907 # Use braces instead of parens because sh, perl, etc. also accept them.
908 # (The list follows the same order as the GNU Coding Standards.)
909 bindir='${exec_prefix}/bin'
910 sbindir='${exec_prefix}/sbin'
911 libexecdir='${exec_prefix}/libexec'
912 datarootdir='${prefix}/share'
913 datadir='${datarootdir}'
914 sysconfdir='${prefix}/etc'
915 sharedstatedir='${prefix}/com'
916 localstatedir='${prefix}/var'
917 includedir='${prefix}/include'
918 oldincludedir='/usr/include'
919 docdir='${datarootdir}/doc/${PACKAGE}'
920 infodir='${datarootdir}/info'
921 htmldir='${docdir}'
922 dvidir='${docdir}'
923 pdfdir='${docdir}'
924 psdir='${docdir}'
925 libdir='${exec_prefix}/lib'
926 localedir='${datarootdir}/locale'
927 mandir='${datarootdir}/man'
928
929 ac_prev=
930 ac_dashdash=
931 for ac_option
932 do
933   # If the previous option needs an argument, assign it.
934   if test -n "$ac_prev"; then
935     eval $ac_prev=\$ac_option
936     ac_prev=
937     continue
938   fi
939
940   case $ac_option in
941   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
942   *)    ac_optarg=yes ;;
943   esac
944
945   # Accept the important Cygnus configure options, so we can diagnose typos.
946
947   case $ac_dashdash$ac_option in
948   --)
949     ac_dashdash=yes ;;
950
951   -bindir | --bindir | --bindi | --bind | --bin | --bi)
952     ac_prev=bindir ;;
953   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
954     bindir=$ac_optarg ;;
955
956   -build | --build | --buil | --bui | --bu)
957     ac_prev=build_alias ;;
958   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
959     build_alias=$ac_optarg ;;
960
961   -cache-file | --cache-file | --cache-fil | --cache-fi \
962   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
963     ac_prev=cache_file ;;
964   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
965   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
966     cache_file=$ac_optarg ;;
967
968   --config-cache | -C)
969     cache_file=config.cache ;;
970
971   -datadir | --datadir | --datadi | --datad)
972     ac_prev=datadir ;;
973   -datadir=* | --datadir=* | --datadi=* | --datad=*)
974     datadir=$ac_optarg ;;
975
976   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
977   | --dataroo | --dataro | --datar)
978     ac_prev=datarootdir ;;
979   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
980   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
981     datarootdir=$ac_optarg ;;
982
983   -disable-* | --disable-*)
984     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
985     # Reject names that are not valid shell variable names.
986     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
987       as_fn_error "invalid feature name: $ac_useropt"
988     ac_useropt_orig=$ac_useropt
989     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990     case $ac_user_opts in
991       *"
992 "enable_$ac_useropt"
993 "*) ;;
994       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
995          ac_unrecognized_sep=', ';;
996     esac
997     eval enable_$ac_useropt=no ;;
998
999   -docdir | --docdir | --docdi | --doc | --do)
1000     ac_prev=docdir ;;
1001   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1002     docdir=$ac_optarg ;;
1003
1004   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1005     ac_prev=dvidir ;;
1006   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1007     dvidir=$ac_optarg ;;
1008
1009   -enable-* | --enable-*)
1010     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1011     # Reject names that are not valid shell variable names.
1012     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1013       as_fn_error "invalid feature name: $ac_useropt"
1014     ac_useropt_orig=$ac_useropt
1015     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1016     case $ac_user_opts in
1017       *"
1018 "enable_$ac_useropt"
1019 "*) ;;
1020       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1021          ac_unrecognized_sep=', ';;
1022     esac
1023     eval enable_$ac_useropt=\$ac_optarg ;;
1024
1025   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1026   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1027   | --exec | --exe | --ex)
1028     ac_prev=exec_prefix ;;
1029   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1030   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1031   | --exec=* | --exe=* | --ex=*)
1032     exec_prefix=$ac_optarg ;;
1033
1034   -gas | --gas | --ga | --g)
1035     # Obsolete; use --with-gas.
1036     with_gas=yes ;;
1037
1038   -help | --help | --hel | --he | -h)
1039     ac_init_help=long ;;
1040   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1041     ac_init_help=recursive ;;
1042   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1043     ac_init_help=short ;;
1044
1045   -host | --host | --hos | --ho)
1046     ac_prev=host_alias ;;
1047   -host=* | --host=* | --hos=* | --ho=*)
1048     host_alias=$ac_optarg ;;
1049
1050   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1051     ac_prev=htmldir ;;
1052   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1053   | --ht=*)
1054     htmldir=$ac_optarg ;;
1055
1056   -includedir | --includedir | --includedi | --included | --include \
1057   | --includ | --inclu | --incl | --inc)
1058     ac_prev=includedir ;;
1059   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1060   | --includ=* | --inclu=* | --incl=* | --inc=*)
1061     includedir=$ac_optarg ;;
1062
1063   -infodir | --infodir | --infodi | --infod | --info | --inf)
1064     ac_prev=infodir ;;
1065   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1066     infodir=$ac_optarg ;;
1067
1068   -libdir | --libdir | --libdi | --libd)
1069     ac_prev=libdir ;;
1070   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1071     libdir=$ac_optarg ;;
1072
1073   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1074   | --libexe | --libex | --libe)
1075     ac_prev=libexecdir ;;
1076   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1077   | --libexe=* | --libex=* | --libe=*)
1078     libexecdir=$ac_optarg ;;
1079
1080   -localedir | --localedir | --localedi | --localed | --locale)
1081     ac_prev=localedir ;;
1082   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1083     localedir=$ac_optarg ;;
1084
1085   -localstatedir | --localstatedir | --localstatedi | --localstated \
1086   | --localstate | --localstat | --localsta | --localst | --locals)
1087     ac_prev=localstatedir ;;
1088   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1089   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1090     localstatedir=$ac_optarg ;;
1091
1092   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1093     ac_prev=mandir ;;
1094   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1095     mandir=$ac_optarg ;;
1096
1097   -nfp | --nfp | --nf)
1098     # Obsolete; use --without-fp.
1099     with_fp=no ;;
1100
1101   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1102   | --no-cr | --no-c | -n)
1103     no_create=yes ;;
1104
1105   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1106   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1107     no_recursion=yes ;;
1108
1109   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1110   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1111   | --oldin | --oldi | --old | --ol | --o)
1112     ac_prev=oldincludedir ;;
1113   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1114   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1115   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1116     oldincludedir=$ac_optarg ;;
1117
1118   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1119     ac_prev=prefix ;;
1120   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1121     prefix=$ac_optarg ;;
1122
1123   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1124   | --program-pre | --program-pr | --program-p)
1125     ac_prev=program_prefix ;;
1126   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1127   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1128     program_prefix=$ac_optarg ;;
1129
1130   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1131   | --program-suf | --program-su | --program-s)
1132     ac_prev=program_suffix ;;
1133   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1134   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1135     program_suffix=$ac_optarg ;;
1136
1137   -program-transform-name | --program-transform-name \
1138   | --program-transform-nam | --program-transform-na \
1139   | --program-transform-n | --program-transform- \
1140   | --program-transform | --program-transfor \
1141   | --program-transfo | --program-transf \
1142   | --program-trans | --program-tran \
1143   | --progr-tra | --program-tr | --program-t)
1144     ac_prev=program_transform_name ;;
1145   -program-transform-name=* | --program-transform-name=* \
1146   | --program-transform-nam=* | --program-transform-na=* \
1147   | --program-transform-n=* | --program-transform-=* \
1148   | --program-transform=* | --program-transfor=* \
1149   | --program-transfo=* | --program-transf=* \
1150   | --program-trans=* | --program-tran=* \
1151   | --progr-tra=* | --program-tr=* | --program-t=*)
1152     program_transform_name=$ac_optarg ;;
1153
1154   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1155     ac_prev=pdfdir ;;
1156   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1157     pdfdir=$ac_optarg ;;
1158
1159   -psdir | --psdir | --psdi | --psd | --ps)
1160     ac_prev=psdir ;;
1161   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1162     psdir=$ac_optarg ;;
1163
1164   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1165   | -silent | --silent | --silen | --sile | --sil)
1166     silent=yes ;;
1167
1168   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1169     ac_prev=sbindir ;;
1170   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1171   | --sbi=* | --sb=*)
1172     sbindir=$ac_optarg ;;
1173
1174   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1175   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1176   | --sharedst | --shareds | --shared | --share | --shar \
1177   | --sha | --sh)
1178     ac_prev=sharedstatedir ;;
1179   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1180   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1181   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1182   | --sha=* | --sh=*)
1183     sharedstatedir=$ac_optarg ;;
1184
1185   -site | --site | --sit)
1186     ac_prev=site ;;
1187   -site=* | --site=* | --sit=*)
1188     site=$ac_optarg ;;
1189
1190   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1191     ac_prev=srcdir ;;
1192   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1193     srcdir=$ac_optarg ;;
1194
1195   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1196   | --syscon | --sysco | --sysc | --sys | --sy)
1197     ac_prev=sysconfdir ;;
1198   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1199   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1200     sysconfdir=$ac_optarg ;;
1201
1202   -target | --target | --targe | --targ | --tar | --ta | --t)
1203     ac_prev=target_alias ;;
1204   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1205     target_alias=$ac_optarg ;;
1206
1207   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1208     verbose=yes ;;
1209
1210   -version | --version | --versio | --versi | --vers | -V)
1211     ac_init_version=: ;;
1212
1213   -with-* | --with-*)
1214     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1215     # Reject names that are not valid shell variable names.
1216     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1217       as_fn_error "invalid package name: $ac_useropt"
1218     ac_useropt_orig=$ac_useropt
1219     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220     case $ac_user_opts in
1221       *"
1222 "with_$ac_useropt"
1223 "*) ;;
1224       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1225          ac_unrecognized_sep=', ';;
1226     esac
1227     eval with_$ac_useropt=\$ac_optarg ;;
1228
1229   -without-* | --without-*)
1230     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1231     # Reject names that are not valid shell variable names.
1232     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1233       as_fn_error "invalid package name: $ac_useropt"
1234     ac_useropt_orig=$ac_useropt
1235     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1236     case $ac_user_opts in
1237       *"
1238 "with_$ac_useropt"
1239 "*) ;;
1240       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1241          ac_unrecognized_sep=', ';;
1242     esac
1243     eval with_$ac_useropt=no ;;
1244
1245   --x)
1246     # Obsolete; use --with-x.
1247     with_x=yes ;;
1248
1249   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1250   | --x-incl | --x-inc | --x-in | --x-i)
1251     ac_prev=x_includes ;;
1252   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1253   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1254     x_includes=$ac_optarg ;;
1255
1256   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1257   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1258     ac_prev=x_libraries ;;
1259   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1260   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1261     x_libraries=$ac_optarg ;;
1262
1263   -*) as_fn_error "unrecognized option: \`$ac_option'
1264 Try \`$0 --help' for more information."
1265     ;;
1266
1267   *=*)
1268     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1269     # Reject names that are not valid shell variable names.
1270     case $ac_envvar in #(
1271       '' | [0-9]* | *[!_$as_cr_alnum]* )
1272       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1273     esac
1274     eval $ac_envvar=\$ac_optarg
1275     export $ac_envvar ;;
1276
1277   *)
1278     # FIXME: should be removed in autoconf 3.0.
1279     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1280     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1281       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1282     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1283     ;;
1284
1285   esac
1286 done
1287
1288 if test -n "$ac_prev"; then
1289   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1290   as_fn_error "missing argument to $ac_option"
1291 fi
1292
1293 if test -n "$ac_unrecognized_opts"; then
1294   case $enable_option_checking in
1295     no) ;;
1296     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1297     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1298   esac
1299 fi
1300
1301 # Check all directory arguments for consistency.
1302 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1303                 datadir sysconfdir sharedstatedir localstatedir includedir \
1304                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1305                 libdir localedir mandir
1306 do
1307   eval ac_val=\$$ac_var
1308   # Remove trailing slashes.
1309   case $ac_val in
1310     */ )
1311       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1312       eval $ac_var=\$ac_val;;
1313   esac
1314   # Be sure to have absolute directory names.
1315   case $ac_val in
1316     [\\/$]* | ?:[\\/]* )  continue;;
1317     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1318   esac
1319   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1320 done
1321
1322 # There might be people who depend on the old broken behavior: `$host'
1323 # used to hold the argument of --host etc.
1324 # FIXME: To remove some day.
1325 build=$build_alias
1326 host=$host_alias
1327 target=$target_alias
1328
1329 # FIXME: To remove some day.
1330 if test "x$host_alias" != x; then
1331   if test "x$build_alias" = x; then
1332     cross_compiling=maybe
1333     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1334     If a cross compiler is detected then cross compile mode will be used." >&2
1335   elif test "x$build_alias" != "x$host_alias"; then
1336     cross_compiling=yes
1337   fi
1338 fi
1339
1340 ac_tool_prefix=
1341 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1342
1343 test "$silent" = yes && exec 6>/dev/null
1344
1345
1346 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1347 ac_ls_di=`ls -di .` &&
1348 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1349   as_fn_error "working directory cannot be determined"
1350 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1351   as_fn_error "pwd does not report name of working directory"
1352
1353
1354 # Find the source files, if location was not specified.
1355 if test -z "$srcdir"; then
1356   ac_srcdir_defaulted=yes
1357   # Try the directory containing this script, then the parent directory.
1358   ac_confdir=`$as_dirname -- "$as_myself" ||
1359 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1360          X"$as_myself" : 'X\(//\)[^/]' \| \
1361          X"$as_myself" : 'X\(//\)$' \| \
1362          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1363 $as_echo X"$as_myself" |
1364     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1365             s//\1/
1366             q
1367           }
1368           /^X\(\/\/\)[^/].*/{
1369             s//\1/
1370             q
1371           }
1372           /^X\(\/\/\)$/{
1373             s//\1/
1374             q
1375           }
1376           /^X\(\/\).*/{
1377             s//\1/
1378             q
1379           }
1380           s/.*/./; q'`
1381   srcdir=$ac_confdir
1382   if test ! -r "$srcdir/$ac_unique_file"; then
1383     srcdir=..
1384   fi
1385 else
1386   ac_srcdir_defaulted=no
1387 fi
1388 if test ! -r "$srcdir/$ac_unique_file"; then
1389   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1390   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1391 fi
1392 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1393 ac_abs_confdir=`(
1394         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1395         pwd)`
1396 # When building in place, set srcdir=.
1397 if test "$ac_abs_confdir" = "$ac_pwd"; then
1398   srcdir=.
1399 fi
1400 # Remove unnecessary trailing slashes from srcdir.
1401 # Double slashes in file names in object file debugging info
1402 # mess up M-x gdb in Emacs.
1403 case $srcdir in
1404 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1405 esac
1406 for ac_var in $ac_precious_vars; do
1407   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1408   eval ac_env_${ac_var}_value=\$${ac_var}
1409   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1410   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1411 done
1412
1413 #
1414 # Report the --help message.
1415 #
1416 if test "$ac_init_help" = "long"; then
1417   # Omit some internal or obsolete options to make the list less imposing.
1418   # This message is too long to be a string in the A/UX 3.1 sh.
1419   cat <<_ACEOF
1420 \`configure' configures this package to adapt to many kinds of systems.
1421
1422 Usage: $0 [OPTION]... [VAR=VALUE]...
1423
1424 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1425 VAR=VALUE.  See below for descriptions of some of the useful variables.
1426
1427 Defaults for the options are specified in brackets.
1428
1429 Configuration:
1430   -h, --help              display this help and exit
1431       --help=short        display options specific to this package
1432       --help=recursive    display the short help of all the included packages
1433   -V, --version           display version information and exit
1434   -q, --quiet, --silent   do not print \`checking...' messages
1435       --cache-file=FILE   cache test results in FILE [disabled]
1436   -C, --config-cache      alias for \`--cache-file=config.cache'
1437   -n, --no-create         do not create output files
1438       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1439
1440 Installation directories:
1441   --prefix=PREFIX         install architecture-independent files in PREFIX
1442                           [$ac_default_prefix]
1443   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1444                           [PREFIX]
1445
1446 By default, \`make install' will install all the files in
1447 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1448 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1449 for instance \`--prefix=\$HOME'.
1450
1451 For better control, use the options below.
1452
1453 Fine tuning of the installation directories:
1454   --bindir=DIR            user executables [EPREFIX/bin]
1455   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1456   --libexecdir=DIR        program executables [EPREFIX/libexec]
1457   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1458   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1459   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1460   --libdir=DIR            object code libraries [EPREFIX/lib]
1461   --includedir=DIR        C header files [PREFIX/include]
1462   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1463   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1464   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1465   --infodir=DIR           info documentation [DATAROOTDIR/info]
1466   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1467   --mandir=DIR            man documentation [DATAROOTDIR/man]
1468   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1469   --htmldir=DIR           html documentation [DOCDIR]
1470   --dvidir=DIR            dvi documentation [DOCDIR]
1471   --pdfdir=DIR            pdf documentation [DOCDIR]
1472   --psdir=DIR             ps documentation [DOCDIR]
1473 _ACEOF
1474
1475   cat <<\_ACEOF
1476
1477 Program names:
1478   --program-prefix=PREFIX            prepend PREFIX to installed program names
1479   --program-suffix=SUFFIX            append SUFFIX to installed program names
1480   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1481
1482 X features:
1483   --x-includes=DIR    X include files are in DIR
1484   --x-libraries=DIR   X library files are in DIR
1485
1486 System types:
1487   --build=BUILD     configure for building on BUILD [guessed]
1488   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1489   --target=TARGET   configure for building compilers for TARGET [HOST]
1490 _ACEOF
1491 fi
1492
1493 if test -n "$ac_init_help"; then
1494
1495   cat <<\_ACEOF
1496
1497 Optional Features:
1498   --disable-option-checking  ignore unrecognized --enable/--with options
1499   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1500   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1501   --enable-maintainer-mode  enable make rules and dependencies not useful
1502                           (and sometimes confusing) to the casual installer
1503   --enable-plugins        Enable support for plugins
1504   --disable-largefile     omit support for large files
1505   --enable-build-with-cxx build with C++ compiler instead of C compiler
1506   --enable-targets=TARGETS
1507                           alternative target configurations
1508   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
1509   --disable-gdbcli        disable command-line interface (CLI)
1510   --disable-gdbmi         disable machine-interface (MI)
1511   --enable-tui            enable full-screen terminal user interface (TUI)
1512   --enable-gdbtk          enable gdbtk graphical user interface (GUI)
1513   --enable-profiling      enable profiling of GDB
1514   --disable-rpath         do not hardcode runtime library paths
1515   --enable-libmcheck      Try linking with -lmcheck if available
1516   --enable-werror         treat compile warnings as errors
1517   --enable-build-warnings enable build-time compiler warnings if gcc is used
1518   --enable-gdb-build-warnings
1519                           enable GDB specific build-time compiler warnings if
1520                           gcc is used
1521   --enable-sim            link gdb with simulator
1522   --enable-multi-ice      build the multi-ice-gdb-server
1523   --enable-gdbserver      automatically build gdbserver (yes/no/auto, default
1524                           is auto)
1525
1526 Optional Packages:
1527   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1528   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1529   --with-separate-debug-dir=PATH
1530                           look for global separate debug info in this path
1531                           [LIBDIR/debug]
1532   --with-gdb-datadir=PATH look for global separate data files in this path
1533                           [DATADIR/gdb]
1534   --with-relocated-sources=PATH
1535                           automatically relocate this path for source files
1536   --with-auto-load-dir=PATH
1537                           directories from which to load auto-loaded scripts
1538                           [$debugdir:$datadir/auto-load]
1539   --with-auto-load-safe-path=PATH
1540                           directories safe to hold auto-loaded files
1541                           [--with-auto-load-dir]
1542   --without-auto-load-safe-path
1543                           do not restrict auto-loaded files locations
1544   --with-libunwind-ia64   use libunwind frame unwinding for ia64 targets
1545   --with-curses           use the curses library instead of the termcap
1546                           library
1547   --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
1548   --with-bugurl=URL       Direct users to URL to report a bug
1549   --with-system-zlib      use installed libz
1550   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1551   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
1552   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
1553   --with-iconv-bin=PATH   specify where to find the iconv program
1554   --with-system-readline  use installed readline library
1555   --with-jit-reader-dir=PATH
1556                           directory to load the JIT readers from
1557   --with-expat            include expat support (auto/yes/no)
1558   --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
1559   --without-libexpat-prefix     don't search for libexpat in includedir and libdir
1560   --with-python[=PYTHON]  include python support
1561                           (auto/yes/no/<python-program>)
1562   --with-guile[=GUILE]    include guile support
1563                           (auto/yes/no/<guile-version>/<pkg-config-program>)
1564   --with-intel-pt         include Intel Processor Trace support (auto/yes/no)
1565   --with-libipt-prefix[=DIR]  search for libipt in DIR/include and DIR/lib
1566   --without-libipt-prefix     don't search for libipt in includedir and libdir
1567   --without-included-regex
1568                           don't use included regex; this is the default on
1569                           systems with version 2 of the GNU C library (use
1570                           with caution on other system)
1571   --with-sysroot[=DIR]    search for usr/lib et al within DIR
1572   --with-system-gdbinit=PATH
1573                           automatically load a system-wide gdbinit file
1574   --with-lzma             support lzma compression (auto/yes/no)
1575   --with-liblzma-prefix[=DIR]  search for liblzma in DIR/include and DIR/lib
1576   --without-liblzma-prefix     don't search for liblzma in includedir and libdir
1577   --with-tcl              directory containing tcl configuration (tclConfig.sh)
1578   --with-tk               directory containing tk configuration (tkConfig.sh)
1579   --with-x                use the X Window System
1580   --with-babeltrace       include babeltrace support (auto/yes/no)
1581   --with-libbabeltrace-prefix[=DIR]  search for libbabeltrace in DIR/include and DIR/lib
1582   --without-libbabeltrace-prefix     don't search for libbabeltrace in includedir and libdir
1583
1584 Some influential environment variables:
1585   CC          C compiler command
1586   CFLAGS      C compiler flags
1587   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1588               nonstandard directory <lib dir>
1589   LIBS        libraries to pass to the linker, e.g. -l<library>
1590   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1591               you have headers in a nonstandard directory <include dir>
1592   CXX         C++ compiler command
1593   CXXFLAGS    C++ compiler flags
1594   CPP         C preprocessor
1595   MAKEINFO    Parent configure detects if it is of sufficient version.
1596   MAKEINFOFLAGS
1597               Parameters for MAKEINFO.
1598   YACC        The `Yet Another C Compiler' implementation to use. Defaults to
1599               the first program found out of: `bison -y', `byacc', `yacc'.
1600   YFLAGS      The list of arguments that will be passed by default to $YACC.
1601               This script will default YFLAGS to the empty string to avoid a
1602               default value of `-d' given by some make applications.
1603   XMKMF       Path to xmkmf, Makefile generator for X Window System
1604
1605 Use these variables to override the choices made by `configure' or to help
1606 it to find libraries and programs with nonstandard names/locations.
1607
1608 Report bugs to the package provider.
1609 _ACEOF
1610 ac_status=$?
1611 fi
1612
1613 if test "$ac_init_help" = "recursive"; then
1614   # If there are subdirs, report their specific --help.
1615   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1616     test -d "$ac_dir" ||
1617       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1618       continue
1619     ac_builddir=.
1620
1621 case "$ac_dir" in
1622 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1623 *)
1624   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1625   # A ".." for each directory in $ac_dir_suffix.
1626   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1627   case $ac_top_builddir_sub in
1628   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1629   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1630   esac ;;
1631 esac
1632 ac_abs_top_builddir=$ac_pwd
1633 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1634 # for backward compatibility:
1635 ac_top_builddir=$ac_top_build_prefix
1636
1637 case $srcdir in
1638   .)  # We are building in place.
1639     ac_srcdir=.
1640     ac_top_srcdir=$ac_top_builddir_sub
1641     ac_abs_top_srcdir=$ac_pwd ;;
1642   [\\/]* | ?:[\\/]* )  # Absolute name.
1643     ac_srcdir=$srcdir$ac_dir_suffix;
1644     ac_top_srcdir=$srcdir
1645     ac_abs_top_srcdir=$srcdir ;;
1646   *) # Relative name.
1647     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1648     ac_top_srcdir=$ac_top_build_prefix$srcdir
1649     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1650 esac
1651 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1652
1653     cd "$ac_dir" || { ac_status=$?; continue; }
1654     # Check for guested configure.
1655     if test -f "$ac_srcdir/configure.gnu"; then
1656       echo &&
1657       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1658     elif test -f "$ac_srcdir/configure"; then
1659       echo &&
1660       $SHELL "$ac_srcdir/configure" --help=recursive
1661     else
1662       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1663     fi || ac_status=$?
1664     cd "$ac_pwd" || { ac_status=$?; break; }
1665   done
1666 fi
1667
1668 test -n "$ac_init_help" && exit $ac_status
1669 if $ac_init_version; then
1670   cat <<\_ACEOF
1671 configure
1672 generated by GNU Autoconf 2.64
1673
1674 Copyright (C) 2009 Free Software Foundation, Inc.
1675 This configure script is free software; the Free Software Foundation
1676 gives unlimited permission to copy, distribute and modify it.
1677 _ACEOF
1678   exit
1679 fi
1680
1681 ## ------------------------ ##
1682 ## Autoconf initialization. ##
1683 ## ------------------------ ##
1684
1685 # ac_fn_c_try_compile LINENO
1686 # --------------------------
1687 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1688 ac_fn_c_try_compile ()
1689 {
1690   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691   rm -f conftest.$ac_objext
1692   if { { ac_try="$ac_compile"
1693 case "(($ac_try" in
1694   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695   *) ac_try_echo=$ac_try;;
1696 esac
1697 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698 $as_echo "$ac_try_echo"; } >&5
1699   (eval "$ac_compile") 2>conftest.err
1700   ac_status=$?
1701   if test -s conftest.err; then
1702     grep -v '^ *+' conftest.err >conftest.er1
1703     cat conftest.er1 >&5
1704     mv -f conftest.er1 conftest.err
1705   fi
1706   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707   test $ac_status = 0; } && {
1708          test -z "$ac_c_werror_flag" ||
1709          test ! -s conftest.err
1710        } && test -s conftest.$ac_objext; then :
1711   ac_retval=0
1712 else
1713   $as_echo "$as_me: failed program was:" >&5
1714 sed 's/^/| /' conftest.$ac_ext >&5
1715
1716         ac_retval=1
1717 fi
1718   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1719   return $ac_retval
1720
1721 } # ac_fn_c_try_compile
1722
1723 # ac_fn_cxx_try_compile LINENO
1724 # ----------------------------
1725 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1726 ac_fn_cxx_try_compile ()
1727 {
1728   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729   rm -f conftest.$ac_objext
1730   if { { ac_try="$ac_compile"
1731 case "(($ac_try" in
1732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733   *) ac_try_echo=$ac_try;;
1734 esac
1735 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736 $as_echo "$ac_try_echo"; } >&5
1737   (eval "$ac_compile") 2>conftest.err
1738   ac_status=$?
1739   if test -s conftest.err; then
1740     grep -v '^ *+' conftest.err >conftest.er1
1741     cat conftest.er1 >&5
1742     mv -f conftest.er1 conftest.err
1743   fi
1744   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745   test $ac_status = 0; } && {
1746          test -z "$ac_cxx_werror_flag" ||
1747          test ! -s conftest.err
1748        } && test -s conftest.$ac_objext; then :
1749   ac_retval=0
1750 else
1751   $as_echo "$as_me: failed program was:" >&5
1752 sed 's/^/| /' conftest.$ac_ext >&5
1753
1754         ac_retval=1
1755 fi
1756   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1757   return $ac_retval
1758
1759 } # ac_fn_cxx_try_compile
1760
1761 # ac_fn_c_try_cpp LINENO
1762 # ----------------------
1763 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1764 ac_fn_c_try_cpp ()
1765 {
1766   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1767   if { { ac_try="$ac_cpp conftest.$ac_ext"
1768 case "(($ac_try" in
1769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770   *) ac_try_echo=$ac_try;;
1771 esac
1772 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773 $as_echo "$ac_try_echo"; } >&5
1774   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1775   ac_status=$?
1776   if test -s conftest.err; then
1777     grep -v '^ *+' conftest.err >conftest.er1
1778     cat conftest.er1 >&5
1779     mv -f conftest.er1 conftest.err
1780   fi
1781   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782   test $ac_status = 0; } >/dev/null && {
1783          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1784          test ! -s conftest.err
1785        }; then :
1786   ac_retval=0
1787 else
1788   $as_echo "$as_me: failed program was:" >&5
1789 sed 's/^/| /' conftest.$ac_ext >&5
1790
1791     ac_retval=1
1792 fi
1793   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1794   return $ac_retval
1795
1796 } # ac_fn_c_try_cpp
1797
1798 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1799 # -------------------------------------------------------
1800 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1801 # the include files in INCLUDES and setting the cache variable VAR
1802 # accordingly.
1803 ac_fn_c_check_header_mongrel ()
1804 {
1805   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1806   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1807   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1808 $as_echo_n "checking for $2... " >&6; }
1809 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1810   $as_echo_n "(cached) " >&6
1811 fi
1812 eval ac_res=\$$3
1813                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814 $as_echo "$ac_res" >&6; }
1815 else
1816   # Is the header compilable?
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1818 $as_echo_n "checking $2 usability... " >&6; }
1819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820 /* end confdefs.h.  */
1821 $4
1822 #include <$2>
1823 _ACEOF
1824 if ac_fn_c_try_compile "$LINENO"; then :
1825   ac_header_compiler=yes
1826 else
1827   ac_header_compiler=no
1828 fi
1829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1831 $as_echo "$ac_header_compiler" >&6; }
1832
1833 # Is the header present?
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1835 $as_echo_n "checking $2 presence... " >&6; }
1836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837 /* end confdefs.h.  */
1838 #include <$2>
1839 _ACEOF
1840 if ac_fn_c_try_cpp "$LINENO"; then :
1841   ac_header_preproc=yes
1842 else
1843   ac_header_preproc=no
1844 fi
1845 rm -f conftest.err conftest.$ac_ext
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1847 $as_echo "$ac_header_preproc" >&6; }
1848
1849 # So?  What about this header?
1850 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1851   yes:no: )
1852     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1853 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1854     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1855 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1856     ;;
1857   no:yes:* )
1858     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1859 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1860     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1861 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1862     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1863 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1864     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1865 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868     ;;
1869 esac
1870   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1871 $as_echo_n "checking for $2... " >&6; }
1872 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1873   $as_echo_n "(cached) " >&6
1874 else
1875   eval "$3=\$ac_header_compiler"
1876 fi
1877 eval ac_res=\$$3
1878                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1879 $as_echo "$ac_res" >&6; }
1880 fi
1881   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1882
1883 } # ac_fn_c_check_header_mongrel
1884
1885 # ac_fn_c_try_run LINENO
1886 # ----------------------
1887 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1888 # that executables *can* be run.
1889 ac_fn_c_try_run ()
1890 {
1891   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892   if { { ac_try="$ac_link"
1893 case "(($ac_try" in
1894   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1895   *) ac_try_echo=$ac_try;;
1896 esac
1897 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1898 $as_echo "$ac_try_echo"; } >&5
1899   (eval "$ac_link") 2>&5
1900   ac_status=$?
1901   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1902   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1903   { { case "(($ac_try" in
1904   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1905   *) ac_try_echo=$ac_try;;
1906 esac
1907 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1908 $as_echo "$ac_try_echo"; } >&5
1909   (eval "$ac_try") 2>&5
1910   ac_status=$?
1911   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1912   test $ac_status = 0; }; }; then :
1913   ac_retval=0
1914 else
1915   $as_echo "$as_me: program exited with status $ac_status" >&5
1916        $as_echo "$as_me: failed program was:" >&5
1917 sed 's/^/| /' conftest.$ac_ext >&5
1918
1919        ac_retval=$ac_status
1920 fi
1921   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1922   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1923   return $ac_retval
1924
1925 } # ac_fn_c_try_run
1926
1927 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1928 # -------------------------------------------------------
1929 # Tests whether HEADER exists and can be compiled using the include files in
1930 # INCLUDES, setting the cache variable VAR accordingly.
1931 ac_fn_c_check_header_compile ()
1932 {
1933   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1935 $as_echo_n "checking for $2... " >&6; }
1936 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1937   $as_echo_n "(cached) " >&6
1938 else
1939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1940 /* end confdefs.h.  */
1941 $4
1942 #include <$2>
1943 _ACEOF
1944 if ac_fn_c_try_compile "$LINENO"; then :
1945   eval "$3=yes"
1946 else
1947   eval "$3=no"
1948 fi
1949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1950 fi
1951 eval ac_res=\$$3
1952                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1953 $as_echo "$ac_res" >&6; }
1954   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1955
1956 } # ac_fn_c_check_header_compile
1957
1958 # ac_fn_c_try_link LINENO
1959 # -----------------------
1960 # Try to link conftest.$ac_ext, and return whether this succeeded.
1961 ac_fn_c_try_link ()
1962 {
1963   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964   rm -f conftest.$ac_objext conftest$ac_exeext
1965   if { { ac_try="$ac_link"
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_link") 2>conftest.err
1973   ac_status=$?
1974   if test -s conftest.err; then
1975     grep -v '^ *+' conftest.err >conftest.er1
1976     cat conftest.er1 >&5
1977     mv -f conftest.er1 conftest.err
1978   fi
1979   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1980   test $ac_status = 0; } && {
1981          test -z "$ac_c_werror_flag" ||
1982          test ! -s conftest.err
1983        } && test -s conftest$ac_exeext && {
1984          test "$cross_compiling" = yes ||
1985          $as_test_x conftest$ac_exeext
1986        }; then :
1987   ac_retval=0
1988 else
1989   $as_echo "$as_me: failed program was:" >&5
1990 sed 's/^/| /' conftest.$ac_ext >&5
1991
1992         ac_retval=1
1993 fi
1994   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1995   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1996   # interfere with the next link command; also delete a directory that is
1997   # left behind by Apple's compiler.  We do this before executing the actions.
1998   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1999   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2000   return $ac_retval
2001
2002 } # ac_fn_c_try_link
2003
2004 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2005 # --------------------------------------------
2006 # Tries to find the compile-time value of EXPR in a program that includes
2007 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2008 # computed
2009 ac_fn_c_compute_int ()
2010 {
2011   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012   if test "$cross_compiling" = yes; then
2013     # Depending upon the size, compute the lo and hi bounds.
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015 /* end confdefs.h.  */
2016 $4
2017 int
2018 main ()
2019 {
2020 static int test_array [1 - 2 * !(($2) >= 0)];
2021 test_array [0] = 0
2022
2023   ;
2024   return 0;
2025 }
2026 _ACEOF
2027 if ac_fn_c_try_compile "$LINENO"; then :
2028   ac_lo=0 ac_mid=0
2029   while :; do
2030     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031 /* end confdefs.h.  */
2032 $4
2033 int
2034 main ()
2035 {
2036 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2037 test_array [0] = 0
2038
2039   ;
2040   return 0;
2041 }
2042 _ACEOF
2043 if ac_fn_c_try_compile "$LINENO"; then :
2044   ac_hi=$ac_mid; break
2045 else
2046   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2047                         if test $ac_lo -le $ac_mid; then
2048                           ac_lo= ac_hi=
2049                           break
2050                         fi
2051                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2052 fi
2053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054   done
2055 else
2056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057 /* end confdefs.h.  */
2058 $4
2059 int
2060 main ()
2061 {
2062 static int test_array [1 - 2 * !(($2) < 0)];
2063 test_array [0] = 0
2064
2065   ;
2066   return 0;
2067 }
2068 _ACEOF
2069 if ac_fn_c_try_compile "$LINENO"; then :
2070   ac_hi=-1 ac_mid=-1
2071   while :; do
2072     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073 /* end confdefs.h.  */
2074 $4
2075 int
2076 main ()
2077 {
2078 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2079 test_array [0] = 0
2080
2081   ;
2082   return 0;
2083 }
2084 _ACEOF
2085 if ac_fn_c_try_compile "$LINENO"; then :
2086   ac_lo=$ac_mid; break
2087 else
2088   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2089                         if test $ac_mid -le $ac_hi; then
2090                           ac_lo= ac_hi=
2091                           break
2092                         fi
2093                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2094 fi
2095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096   done
2097 else
2098   ac_lo= ac_hi=
2099 fi
2100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101 fi
2102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103 # Binary search between lo and hi bounds.
2104 while test "x$ac_lo" != "x$ac_hi"; do
2105   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107 /* end confdefs.h.  */
2108 $4
2109 int
2110 main ()
2111 {
2112 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2113 test_array [0] = 0
2114
2115   ;
2116   return 0;
2117 }
2118 _ACEOF
2119 if ac_fn_c_try_compile "$LINENO"; then :
2120   ac_hi=$ac_mid
2121 else
2122   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2123 fi
2124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125 done
2126 case $ac_lo in #((
2127 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2128 '') ac_retval=1 ;;
2129 esac
2130   else
2131     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132 /* end confdefs.h.  */
2133 $4
2134 static long int longval () { return $2; }
2135 static unsigned long int ulongval () { return $2; }
2136 #include <stdio.h>
2137 #include <stdlib.h>
2138 int
2139 main ()
2140 {
2141
2142   FILE *f = fopen ("conftest.val", "w");
2143   if (! f)
2144     return 1;
2145   if (($2) < 0)
2146     {
2147       long int i = longval ();
2148       if (i != ($2))
2149         return 1;
2150       fprintf (f, "%ld", i);
2151     }
2152   else
2153     {
2154       unsigned long int i = ulongval ();
2155       if (i != ($2))
2156         return 1;
2157       fprintf (f, "%lu", i);
2158     }
2159   /* Do not output a trailing newline, as this causes \r\n confusion
2160      on some platforms.  */
2161   return ferror (f) || fclose (f) != 0;
2162
2163   ;
2164   return 0;
2165 }
2166 _ACEOF
2167 if ac_fn_c_try_run "$LINENO"; then :
2168   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2169 else
2170   ac_retval=1
2171 fi
2172 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2173   conftest.$ac_objext conftest.beam conftest.$ac_ext
2174 rm -f conftest.val
2175
2176   fi
2177   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2178   return $ac_retval
2179
2180 } # ac_fn_c_compute_int
2181
2182 # ac_fn_c_check_func LINENO FUNC VAR
2183 # ----------------------------------
2184 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2185 ac_fn_c_check_func ()
2186 {
2187   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2188   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2189 $as_echo_n "checking for $2... " >&6; }
2190 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2191   $as_echo_n "(cached) " >&6
2192 else
2193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194 /* end confdefs.h.  */
2195 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2196    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2197 #define $2 innocuous_$2
2198
2199 /* System header to define __stub macros and hopefully few prototypes,
2200     which can conflict with char $2 (); below.
2201     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2202     <limits.h> exists even on freestanding compilers.  */
2203
2204 #ifdef __STDC__
2205 # include <limits.h>
2206 #else
2207 # include <assert.h>
2208 #endif
2209
2210 #undef $2
2211
2212 /* Override any GCC internal prototype to avoid an error.
2213    Use char because int might match the return type of a GCC
2214    builtin and then its argument prototype would still apply.  */
2215 #ifdef __cplusplus
2216 extern "C"
2217 #endif
2218 char $2 ();
2219 /* The GNU C library defines this for functions which it implements
2220     to always fail with ENOSYS.  Some functions are actually named
2221     something starting with __ and the normal name is an alias.  */
2222 #if defined __stub_$2 || defined __stub___$2
2223 choke me
2224 #endif
2225
2226 int
2227 main ()
2228 {
2229 return $2 ();
2230   ;
2231   return 0;
2232 }
2233 _ACEOF
2234 if ac_fn_c_try_link "$LINENO"; then :
2235   eval "$3=yes"
2236 else
2237   eval "$3=no"
2238 fi
2239 rm -f core conftest.err conftest.$ac_objext \
2240     conftest$ac_exeext conftest.$ac_ext
2241 fi
2242 eval ac_res=\$$3
2243                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244 $as_echo "$ac_res" >&6; }
2245   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2246
2247 } # ac_fn_c_check_func
2248
2249 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2250 # -------------------------------------------
2251 # Tests whether TYPE exists after having included INCLUDES, setting cache
2252 # variable VAR accordingly.
2253 ac_fn_c_check_type ()
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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2259   $as_echo_n "(cached) " >&6
2260 else
2261   eval "$3=no"
2262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263 /* end confdefs.h.  */
2264 $4
2265 int
2266 main ()
2267 {
2268 if (sizeof ($2))
2269          return 0;
2270   ;
2271   return 0;
2272 }
2273 _ACEOF
2274 if ac_fn_c_try_compile "$LINENO"; then :
2275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276 /* end confdefs.h.  */
2277 $4
2278 int
2279 main ()
2280 {
2281 if (sizeof (($2)))
2282             return 0;
2283   ;
2284   return 0;
2285 }
2286 _ACEOF
2287 if ac_fn_c_try_compile "$LINENO"; then :
2288
2289 else
2290   eval "$3=yes"
2291 fi
2292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293 fi
2294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295 fi
2296 eval ac_res=\$$3
2297                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2298 $as_echo "$ac_res" >&6; }
2299   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2300
2301 } # ac_fn_c_check_type
2302
2303 # ac_fn_c_check_decl LINENO SYMBOL VAR
2304 # ------------------------------------
2305 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2306 ac_fn_c_check_decl ()
2307 {
2308   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309   as_decl_name=`echo $2|sed 's/ *(.*//'`
2310   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2311   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2312 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2313 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2314   $as_echo_n "(cached) " >&6
2315 else
2316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317 /* end confdefs.h.  */
2318 $4
2319 int
2320 main ()
2321 {
2322 #ifndef $as_decl_name
2323 #ifdef __cplusplus
2324   (void) $as_decl_use;
2325 #else
2326   (void) $as_decl_name;
2327 #endif
2328 #endif
2329
2330   ;
2331   return 0;
2332 }
2333 _ACEOF
2334 if ac_fn_c_try_compile "$LINENO"; then :
2335   eval "$3=yes"
2336 else
2337   eval "$3=no"
2338 fi
2339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340 fi
2341 eval ac_res=\$$3
2342                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343 $as_echo "$ac_res" >&6; }
2344   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2345
2346 } # ac_fn_c_check_decl
2347
2348 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2349 # ----------------------------------------------------
2350 # Tries to find if the field MEMBER exists in type AGGR, after including
2351 # INCLUDES, setting cache variable VAR accordingly.
2352 ac_fn_c_check_member ()
2353 {
2354   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2355   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2356 $as_echo_n "checking for $2.$3... " >&6; }
2357 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2358   $as_echo_n "(cached) " >&6
2359 else
2360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361 /* end confdefs.h.  */
2362 $5
2363 int
2364 main ()
2365 {
2366 static $2 ac_aggr;
2367 if (ac_aggr.$3)
2368 return 0;
2369   ;
2370   return 0;
2371 }
2372 _ACEOF
2373 if ac_fn_c_try_compile "$LINENO"; then :
2374   eval "$4=yes"
2375 else
2376   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2377 /* end confdefs.h.  */
2378 $5
2379 int
2380 main ()
2381 {
2382 static $2 ac_aggr;
2383 if (sizeof ac_aggr.$3)
2384 return 0;
2385   ;
2386   return 0;
2387 }
2388 _ACEOF
2389 if ac_fn_c_try_compile "$LINENO"; then :
2390   eval "$4=yes"
2391 else
2392   eval "$4=no"
2393 fi
2394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395 fi
2396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397 fi
2398 eval ac_res=\$$4
2399                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2400 $as_echo "$ac_res" >&6; }
2401   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2402
2403 } # ac_fn_c_check_member
2404 cat >config.log <<_ACEOF
2405 This file contains any messages produced by compilers while
2406 running configure, to aid debugging if configure makes a mistake.
2407
2408 It was created by $as_me, which was
2409 generated by GNU Autoconf 2.64.  Invocation command line was
2410
2411   $ $0 $@
2412
2413 _ACEOF
2414 exec 5>>config.log
2415 {
2416 cat <<_ASUNAME
2417 ## --------- ##
2418 ## Platform. ##
2419 ## --------- ##
2420
2421 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2422 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2423 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2424 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2425 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2426
2427 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2428 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2429
2430 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2431 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2432 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2433 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2434 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2435 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2436 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2437
2438 _ASUNAME
2439
2440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2441 for as_dir in $PATH
2442 do
2443   IFS=$as_save_IFS
2444   test -z "$as_dir" && as_dir=.
2445     $as_echo "PATH: $as_dir"
2446   done
2447 IFS=$as_save_IFS
2448
2449 } >&5
2450
2451 cat >&5 <<_ACEOF
2452
2453
2454 ## ----------- ##
2455 ## Core tests. ##
2456 ## ----------- ##
2457
2458 _ACEOF
2459
2460
2461 # Keep a trace of the command line.
2462 # Strip out --no-create and --no-recursion so they do not pile up.
2463 # Strip out --silent because we don't want to record it for future runs.
2464 # Also quote any args containing shell meta-characters.
2465 # Make two passes to allow for proper duplicate-argument suppression.
2466 ac_configure_args=
2467 ac_configure_args0=
2468 ac_configure_args1=
2469 ac_must_keep_next=false
2470 for ac_pass in 1 2
2471 do
2472   for ac_arg
2473   do
2474     case $ac_arg in
2475     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2476     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2477     | -silent | --silent | --silen | --sile | --sil)
2478       continue ;;
2479     *\'*)
2480       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2481     esac
2482     case $ac_pass in
2483     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2484     2)
2485       as_fn_append ac_configure_args1 " '$ac_arg'"
2486       if test $ac_must_keep_next = true; then
2487         ac_must_keep_next=false # Got value, back to normal.
2488       else
2489         case $ac_arg in
2490           *=* | --config-cache | -C | -disable-* | --disable-* \
2491           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2492           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2493           | -with-* | --with-* | -without-* | --without-* | --x)
2494             case "$ac_configure_args0 " in
2495               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2496             esac
2497             ;;
2498           -* ) ac_must_keep_next=true ;;
2499         esac
2500       fi
2501       as_fn_append ac_configure_args " '$ac_arg'"
2502       ;;
2503     esac
2504   done
2505 done
2506 { ac_configure_args0=; unset ac_configure_args0;}
2507 { ac_configure_args1=; unset ac_configure_args1;}
2508
2509 # When interrupted or exit'd, cleanup temporary files, and complete
2510 # config.log.  We remove comments because anyway the quotes in there
2511 # would cause problems or look ugly.
2512 # WARNING: Use '\'' to represent an apostrophe within the trap.
2513 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2514 trap 'exit_status=$?
2515   # Save into config.log some information that might help in debugging.
2516   {
2517     echo
2518
2519     cat <<\_ASBOX
2520 ## ---------------- ##
2521 ## Cache variables. ##
2522 ## ---------------- ##
2523 _ASBOX
2524     echo
2525     # The following way of writing the cache mishandles newlines in values,
2526 (
2527   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2528     eval ac_val=\$$ac_var
2529     case $ac_val in #(
2530     *${as_nl}*)
2531       case $ac_var in #(
2532       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2533 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2534       esac
2535       case $ac_var in #(
2536       _ | IFS | as_nl) ;; #(
2537       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2538       *) { eval $ac_var=; unset $ac_var;} ;;
2539       esac ;;
2540     esac
2541   done
2542   (set) 2>&1 |
2543     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2544     *${as_nl}ac_space=\ *)
2545       sed -n \
2546         "s/'\''/'\''\\\\'\'''\''/g;
2547           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2548       ;; #(
2549     *)
2550       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2551       ;;
2552     esac |
2553     sort
2554 )
2555     echo
2556
2557     cat <<\_ASBOX
2558 ## ----------------- ##
2559 ## Output variables. ##
2560 ## ----------------- ##
2561 _ASBOX
2562     echo
2563     for ac_var in $ac_subst_vars
2564     do
2565       eval ac_val=\$$ac_var
2566       case $ac_val in
2567       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2568       esac
2569       $as_echo "$ac_var='\''$ac_val'\''"
2570     done | sort
2571     echo
2572
2573     if test -n "$ac_subst_files"; then
2574       cat <<\_ASBOX
2575 ## ------------------- ##
2576 ## File substitutions. ##
2577 ## ------------------- ##
2578 _ASBOX
2579       echo
2580       for ac_var in $ac_subst_files
2581       do
2582         eval ac_val=\$$ac_var
2583         case $ac_val in
2584         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2585         esac
2586         $as_echo "$ac_var='\''$ac_val'\''"
2587       done | sort
2588       echo
2589     fi
2590
2591     if test -s confdefs.h; then
2592       cat <<\_ASBOX
2593 ## ----------- ##
2594 ## confdefs.h. ##
2595 ## ----------- ##
2596 _ASBOX
2597       echo
2598       cat confdefs.h
2599       echo
2600     fi
2601     test "$ac_signal" != 0 &&
2602       $as_echo "$as_me: caught signal $ac_signal"
2603     $as_echo "$as_me: exit $exit_status"
2604   } >&5
2605   rm -f core *.core core.conftest.* &&
2606     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2607     exit $exit_status
2608 ' 0
2609 for ac_signal in 1 2 13 15; do
2610   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2611 done
2612 ac_signal=0
2613
2614 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2615 rm -f -r conftest* confdefs.h
2616
2617 $as_echo "/* confdefs.h */" > confdefs.h
2618
2619 # Predefined preprocessor variables.
2620
2621 cat >>confdefs.h <<_ACEOF
2622 #define PACKAGE_NAME "$PACKAGE_NAME"
2623 _ACEOF
2624
2625 cat >>confdefs.h <<_ACEOF
2626 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2627 _ACEOF
2628
2629 cat >>confdefs.h <<_ACEOF
2630 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2631 _ACEOF
2632
2633 cat >>confdefs.h <<_ACEOF
2634 #define PACKAGE_STRING "$PACKAGE_STRING"
2635 _ACEOF
2636
2637 cat >>confdefs.h <<_ACEOF
2638 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2639 _ACEOF
2640
2641 cat >>confdefs.h <<_ACEOF
2642 #define PACKAGE_URL "$PACKAGE_URL"
2643 _ACEOF
2644
2645
2646 # Let the site file select an alternate cache file if it wants to.
2647 # Prefer an explicitly selected file to automatically selected ones.
2648 ac_site_file1=NONE
2649 ac_site_file2=NONE
2650 if test -n "$CONFIG_SITE"; then
2651   ac_site_file1=$CONFIG_SITE
2652 elif test "x$prefix" != xNONE; then
2653   ac_site_file1=$prefix/share/config.site
2654   ac_site_file2=$prefix/etc/config.site
2655 else
2656   ac_site_file1=$ac_default_prefix/share/config.site
2657   ac_site_file2=$ac_default_prefix/etc/config.site
2658 fi
2659 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2660 do
2661   test "x$ac_site_file" = xNONE && continue
2662   if test -r "$ac_site_file"; then
2663     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2664 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2665     sed 's/^/| /' "$ac_site_file" >&5
2666     . "$ac_site_file"
2667   fi
2668 done
2669
2670 if test -r "$cache_file"; then
2671   # Some versions of bash will fail to source /dev/null (special
2672   # files actually), so we avoid doing that.
2673   if test -f "$cache_file"; then
2674     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2675 $as_echo "$as_me: loading cache $cache_file" >&6;}
2676     case $cache_file in
2677       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2678       *)                      . "./$cache_file";;
2679     esac
2680   fi
2681 else
2682   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2683 $as_echo "$as_me: creating cache $cache_file" >&6;}
2684   >$cache_file
2685 fi
2686
2687 # Check that the precious variables saved in the cache have kept the same
2688 # value.
2689 ac_cache_corrupted=false
2690 for ac_var in $ac_precious_vars; do
2691   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2692   eval ac_new_set=\$ac_env_${ac_var}_set
2693   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2694   eval ac_new_val=\$ac_env_${ac_var}_value
2695   case $ac_old_set,$ac_new_set in
2696     set,)
2697       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2698 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2699       ac_cache_corrupted=: ;;
2700     ,set)
2701       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2702 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2703       ac_cache_corrupted=: ;;
2704     ,);;
2705     *)
2706       if test "x$ac_old_val" != "x$ac_new_val"; then
2707         # differences in whitespace do not lead to failure.
2708         ac_old_val_w=`echo x $ac_old_val`
2709         ac_new_val_w=`echo x $ac_new_val`
2710         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2711           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2712 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2713           ac_cache_corrupted=:
2714         else
2715           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2716 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2717           eval $ac_var=\$ac_old_val
2718         fi
2719         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2720 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2721         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2722 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2723       fi;;
2724   esac
2725   # Pass precious variables to config.status.
2726   if test "$ac_new_set" = set; then
2727     case $ac_new_val in
2728     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2729     *) ac_arg=$ac_var=$ac_new_val ;;
2730     esac
2731     case " $ac_configure_args " in
2732       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2733       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2734     esac
2735   fi
2736 done
2737 if $ac_cache_corrupted; then
2738   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2739 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2740   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2741 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2742   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2743 fi
2744 ## -------------------- ##
2745 ## Main body of script. ##
2746 ## -------------------- ##
2747
2748 ac_ext=c
2749 ac_cpp='$CPP $CPPFLAGS'
2750 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2751 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2752 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2753
2754
2755
2756
2757
2758 ac_config_headers="$ac_config_headers config.h:config.in"
2759
2760
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2762 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2763     # Check whether --enable-maintainer-mode was given.
2764 if test "${enable_maintainer_mode+set}" = set; then :
2765   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2766 else
2767   USE_MAINTAINER_MODE=no
2768 fi
2769
2770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2771 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2772    if test $USE_MAINTAINER_MODE = yes; then
2773   MAINTAINER_MODE_TRUE=
2774   MAINTAINER_MODE_FALSE='#'
2775 else
2776   MAINTAINER_MODE_TRUE='#'
2777   MAINTAINER_MODE_FALSE=
2778 fi
2779
2780   MAINT=$MAINTAINER_MODE_TRUE
2781
2782
2783
2784 # Set the 'development' global.
2785 . $srcdir/../bfd/development.sh
2786
2787 ac_ext=c
2788 ac_cpp='$CPP $CPPFLAGS'
2789 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2790 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2791 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2792 if test -n "$ac_tool_prefix"; then
2793   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2794 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2796 $as_echo_n "checking for $ac_word... " >&6; }
2797 if test "${ac_cv_prog_CC+set}" = set; then :
2798   $as_echo_n "(cached) " >&6
2799 else
2800   if test -n "$CC"; then
2801   ac_cv_prog_CC="$CC" # Let the user override the test.
2802 else
2803 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2804 for as_dir in $PATH
2805 do
2806   IFS=$as_save_IFS
2807   test -z "$as_dir" && as_dir=.
2808     for ac_exec_ext in '' $ac_executable_extensions; do
2809   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2810     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2812     break 2
2813   fi
2814 done
2815   done
2816 IFS=$as_save_IFS
2817
2818 fi
2819 fi
2820 CC=$ac_cv_prog_CC
2821 if test -n "$CC"; then
2822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2823 $as_echo "$CC" >&6; }
2824 else
2825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2826 $as_echo "no" >&6; }
2827 fi
2828
2829
2830 fi
2831 if test -z "$ac_cv_prog_CC"; then
2832   ac_ct_CC=$CC
2833   # Extract the first word of "gcc", so it can be a program name with args.
2834 set dummy gcc; ac_word=$2
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2836 $as_echo_n "checking for $ac_word... " >&6; }
2837 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2838   $as_echo_n "(cached) " >&6
2839 else
2840   if test -n "$ac_ct_CC"; then
2841   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2842 else
2843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2844 for as_dir in $PATH
2845 do
2846   IFS=$as_save_IFS
2847   test -z "$as_dir" && as_dir=.
2848     for ac_exec_ext in '' $ac_executable_extensions; do
2849   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2850     ac_cv_prog_ac_ct_CC="gcc"
2851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2852     break 2
2853   fi
2854 done
2855   done
2856 IFS=$as_save_IFS
2857
2858 fi
2859 fi
2860 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2861 if test -n "$ac_ct_CC"; then
2862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2863 $as_echo "$ac_ct_CC" >&6; }
2864 else
2865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2866 $as_echo "no" >&6; }
2867 fi
2868
2869   if test "x$ac_ct_CC" = x; then
2870     CC=""
2871   else
2872     case $cross_compiling:$ac_tool_warned in
2873 yes:)
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2875 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2876 ac_tool_warned=yes ;;
2877 esac
2878     CC=$ac_ct_CC
2879   fi
2880 else
2881   CC="$ac_cv_prog_CC"
2882 fi
2883
2884 if test -z "$CC"; then
2885           if test -n "$ac_tool_prefix"; then
2886     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2887 set dummy ${ac_tool_prefix}cc; ac_word=$2
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2889 $as_echo_n "checking for $ac_word... " >&6; }
2890 if test "${ac_cv_prog_CC+set}" = set; then :
2891   $as_echo_n "(cached) " >&6
2892 else
2893   if test -n "$CC"; then
2894   ac_cv_prog_CC="$CC" # Let the user override the test.
2895 else
2896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2897 for as_dir in $PATH
2898 do
2899   IFS=$as_save_IFS
2900   test -z "$as_dir" && as_dir=.
2901     for ac_exec_ext in '' $ac_executable_extensions; do
2902   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2903     ac_cv_prog_CC="${ac_tool_prefix}cc"
2904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2905     break 2
2906   fi
2907 done
2908   done
2909 IFS=$as_save_IFS
2910
2911 fi
2912 fi
2913 CC=$ac_cv_prog_CC
2914 if test -n "$CC"; then
2915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2916 $as_echo "$CC" >&6; }
2917 else
2918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2919 $as_echo "no" >&6; }
2920 fi
2921
2922
2923   fi
2924 fi
2925 if test -z "$CC"; then
2926   # Extract the first word of "cc", so it can be a program name with args.
2927 set dummy cc; ac_word=$2
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2929 $as_echo_n "checking for $ac_word... " >&6; }
2930 if test "${ac_cv_prog_CC+set}" = set; then :
2931   $as_echo_n "(cached) " >&6
2932 else
2933   if test -n "$CC"; then
2934   ac_cv_prog_CC="$CC" # Let the user override the test.
2935 else
2936   ac_prog_rejected=no
2937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2938 for as_dir in $PATH
2939 do
2940   IFS=$as_save_IFS
2941   test -z "$as_dir" && as_dir=.
2942     for ac_exec_ext in '' $ac_executable_extensions; do
2943   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2944     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2945        ac_prog_rejected=yes
2946        continue
2947      fi
2948     ac_cv_prog_CC="cc"
2949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2950     break 2
2951   fi
2952 done
2953   done
2954 IFS=$as_save_IFS
2955
2956 if test $ac_prog_rejected = yes; then
2957   # We found a bogon in the path, so make sure we never use it.
2958   set dummy $ac_cv_prog_CC
2959   shift
2960   if test $# != 0; then
2961     # We chose a different compiler from the bogus one.
2962     # However, it has the same basename, so the bogon will be chosen
2963     # first if we set CC to just the basename; use the full file name.
2964     shift
2965     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2966   fi
2967 fi
2968 fi
2969 fi
2970 CC=$ac_cv_prog_CC
2971 if test -n "$CC"; then
2972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2973 $as_echo "$CC" >&6; }
2974 else
2975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2976 $as_echo "no" >&6; }
2977 fi
2978
2979
2980 fi
2981 if test -z "$CC"; then
2982   if test -n "$ac_tool_prefix"; then
2983   for ac_prog in cl.exe
2984   do
2985     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2986 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2988 $as_echo_n "checking for $ac_word... " >&6; }
2989 if test "${ac_cv_prog_CC+set}" = set; then :
2990   $as_echo_n "(cached) " >&6
2991 else
2992   if test -n "$CC"; then
2993   ac_cv_prog_CC="$CC" # Let the user override the test.
2994 else
2995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2996 for as_dir in $PATH
2997 do
2998   IFS=$as_save_IFS
2999   test -z "$as_dir" && as_dir=.
3000     for ac_exec_ext in '' $ac_executable_extensions; do
3001   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3002     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3004     break 2
3005   fi
3006 done
3007   done
3008 IFS=$as_save_IFS
3009
3010 fi
3011 fi
3012 CC=$ac_cv_prog_CC
3013 if test -n "$CC"; then
3014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3015 $as_echo "$CC" >&6; }
3016 else
3017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3018 $as_echo "no" >&6; }
3019 fi
3020
3021
3022     test -n "$CC" && break
3023   done
3024 fi
3025 if test -z "$CC"; then
3026   ac_ct_CC=$CC
3027   for ac_prog in cl.exe
3028 do
3029   # Extract the first word of "$ac_prog", so it can be a program name with args.
3030 set dummy $ac_prog; ac_word=$2
3031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3032 $as_echo_n "checking for $ac_word... " >&6; }
3033 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3034   $as_echo_n "(cached) " >&6
3035 else
3036   if test -n "$ac_ct_CC"; then
3037   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3038 else
3039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3040 for as_dir in $PATH
3041 do
3042   IFS=$as_save_IFS
3043   test -z "$as_dir" && as_dir=.
3044     for ac_exec_ext in '' $ac_executable_extensions; do
3045   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3046     ac_cv_prog_ac_ct_CC="$ac_prog"
3047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3048     break 2
3049   fi
3050 done
3051   done
3052 IFS=$as_save_IFS
3053
3054 fi
3055 fi
3056 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3057 if test -n "$ac_ct_CC"; then
3058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3059 $as_echo "$ac_ct_CC" >&6; }
3060 else
3061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062 $as_echo "no" >&6; }
3063 fi
3064
3065
3066   test -n "$ac_ct_CC" && break
3067 done
3068
3069   if test "x$ac_ct_CC" = x; then
3070     CC=""
3071   else
3072     case $cross_compiling:$ac_tool_warned in
3073 yes:)
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3075 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3076 ac_tool_warned=yes ;;
3077 esac
3078     CC=$ac_ct_CC
3079   fi
3080 fi
3081
3082 fi
3083
3084
3085 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3086 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3087 as_fn_error "no acceptable C compiler found in \$PATH
3088 See \`config.log' for more details." "$LINENO" 5; }
3089
3090 # Provide some information about the compiler.
3091 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3092 set X $ac_compile
3093 ac_compiler=$2
3094 for ac_option in --version -v -V -qversion; do
3095   { { ac_try="$ac_compiler $ac_option >&5"
3096 case "(($ac_try" in
3097   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3098   *) ac_try_echo=$ac_try;;
3099 esac
3100 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3101 $as_echo "$ac_try_echo"; } >&5
3102   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3103   ac_status=$?
3104   if test -s conftest.err; then
3105     sed '10a\
3106 ... rest of stderr output deleted ...
3107          10q' conftest.err >conftest.er1
3108     cat conftest.er1 >&5
3109     rm -f conftest.er1 conftest.err
3110   fi
3111   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3112   test $ac_status = 0; }
3113 done
3114
3115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3116 /* end confdefs.h.  */
3117
3118 int
3119 main ()
3120 {
3121
3122   ;
3123   return 0;
3124 }
3125 _ACEOF
3126 ac_clean_files_save=$ac_clean_files
3127 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3128 # Try to create an executable without -o first, disregard a.out.
3129 # It will help us diagnose broken compilers, and finding out an intuition
3130 # of exeext.
3131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3132 $as_echo_n "checking for C compiler default output file name... " >&6; }
3133 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3134
3135 # The possible output files:
3136 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3137
3138 ac_rmfiles=
3139 for ac_file in $ac_files
3140 do
3141   case $ac_file in
3142     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3143     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3144   esac
3145 done
3146 rm -f $ac_rmfiles
3147
3148 if { { ac_try="$ac_link_default"
3149 case "(($ac_try" in
3150   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3151   *) ac_try_echo=$ac_try;;
3152 esac
3153 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3154 $as_echo "$ac_try_echo"; } >&5
3155   (eval "$ac_link_default") 2>&5
3156   ac_status=$?
3157   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3158   test $ac_status = 0; }; then :
3159   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3160 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3161 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3162 # so that the user can short-circuit this test for compilers unknown to
3163 # Autoconf.
3164 for ac_file in $ac_files ''
3165 do
3166   test -f "$ac_file" || continue
3167   case $ac_file in
3168     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3169         ;;
3170     [ab].out )
3171         # We found the default executable, but exeext='' is most
3172         # certainly right.
3173         break;;
3174     *.* )
3175         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3176         then :; else
3177            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3178         fi
3179         # We set ac_cv_exeext here because the later test for it is not
3180         # safe: cross compilers may not add the suffix if given an `-o'
3181         # argument, so we may need to know it at that point already.
3182         # Even if this section looks crufty: it has the advantage of
3183         # actually working.
3184         break;;
3185     * )
3186         break;;
3187   esac
3188 done
3189 test "$ac_cv_exeext" = no && ac_cv_exeext=
3190
3191 else
3192   ac_file=''
3193 fi
3194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3195 $as_echo "$ac_file" >&6; }
3196 if test -z "$ac_file"; then :
3197   $as_echo "$as_me: failed program was:" >&5
3198 sed 's/^/| /' conftest.$ac_ext >&5
3199
3200 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3201 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3202 { as_fn_set_status 77
3203 as_fn_error "C compiler cannot create executables
3204 See \`config.log' for more details." "$LINENO" 5; }; }
3205 fi
3206 ac_exeext=$ac_cv_exeext
3207
3208 # Check that the compiler produces executables we can run.  If not, either
3209 # the compiler is broken, or we cross compile.
3210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3211 $as_echo_n "checking whether the C compiler works... " >&6; }
3212 # If not cross compiling, check that we can run a simple program.
3213 if test "$cross_compiling" != yes; then
3214   if { ac_try='./$ac_file'
3215   { { case "(($ac_try" in
3216   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3217   *) ac_try_echo=$ac_try;;
3218 esac
3219 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3220 $as_echo "$ac_try_echo"; } >&5
3221   (eval "$ac_try") 2>&5
3222   ac_status=$?
3223   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3224   test $ac_status = 0; }; }; then
3225     cross_compiling=no
3226   else
3227     if test "$cross_compiling" = maybe; then
3228         cross_compiling=yes
3229     else
3230         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3231 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3232 as_fn_error "cannot run C compiled programs.
3233 If you meant to cross compile, use \`--host'.
3234 See \`config.log' for more details." "$LINENO" 5; }
3235     fi
3236   fi
3237 fi
3238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3239 $as_echo "yes" >&6; }
3240
3241 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3242 ac_clean_files=$ac_clean_files_save
3243 # Check that the compiler produces executables we can run.  If not, either
3244 # the compiler is broken, or we cross compile.
3245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3246 $as_echo_n "checking whether we are cross compiling... " >&6; }
3247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3248 $as_echo "$cross_compiling" >&6; }
3249
3250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3251 $as_echo_n "checking for suffix of executables... " >&6; }
3252 if { { ac_try="$ac_link"
3253 case "(($ac_try" in
3254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3255   *) ac_try_echo=$ac_try;;
3256 esac
3257 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3258 $as_echo "$ac_try_echo"; } >&5
3259   (eval "$ac_link") 2>&5
3260   ac_status=$?
3261   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3262   test $ac_status = 0; }; then :
3263   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3264 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3265 # work properly (i.e., refer to `conftest.exe'), while it won't with
3266 # `rm'.
3267 for ac_file in conftest.exe conftest conftest.*; do
3268   test -f "$ac_file" || continue
3269   case $ac_file in
3270     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3271     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3272           break;;
3273     * ) break;;
3274   esac
3275 done
3276 else
3277   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3278 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3279 as_fn_error "cannot compute suffix of executables: cannot compile and link
3280 See \`config.log' for more details." "$LINENO" 5; }
3281 fi
3282 rm -f conftest$ac_cv_exeext
3283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3284 $as_echo "$ac_cv_exeext" >&6; }
3285
3286 rm -f conftest.$ac_ext
3287 EXEEXT=$ac_cv_exeext
3288 ac_exeext=$EXEEXT
3289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3290 $as_echo_n "checking for suffix of object files... " >&6; }
3291 if test "${ac_cv_objext+set}" = set; then :
3292   $as_echo_n "(cached) " >&6
3293 else
3294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3295 /* end confdefs.h.  */
3296
3297 int
3298 main ()
3299 {
3300
3301   ;
3302   return 0;
3303 }
3304 _ACEOF
3305 rm -f conftest.o conftest.obj
3306 if { { ac_try="$ac_compile"
3307 case "(($ac_try" in
3308   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3309   *) ac_try_echo=$ac_try;;
3310 esac
3311 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3312 $as_echo "$ac_try_echo"; } >&5
3313   (eval "$ac_compile") 2>&5
3314   ac_status=$?
3315   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3316   test $ac_status = 0; }; then :
3317   for ac_file in conftest.o conftest.obj conftest.*; do
3318   test -f "$ac_file" || continue;
3319   case $ac_file in
3320     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3321     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3322        break;;
3323   esac
3324 done
3325 else
3326   $as_echo "$as_me: failed program was:" >&5
3327 sed 's/^/| /' conftest.$ac_ext >&5
3328
3329 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3330 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3331 as_fn_error "cannot compute suffix of object files: cannot compile
3332 See \`config.log' for more details." "$LINENO" 5; }
3333 fi
3334 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3335 fi
3336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3337 $as_echo "$ac_cv_objext" >&6; }
3338 OBJEXT=$ac_cv_objext
3339 ac_objext=$OBJEXT
3340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3341 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3342 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3343   $as_echo_n "(cached) " >&6
3344 else
3345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3346 /* end confdefs.h.  */
3347
3348 int
3349 main ()
3350 {
3351 #ifndef __GNUC__
3352        choke me
3353 #endif
3354
3355   ;
3356   return 0;
3357 }
3358 _ACEOF
3359 if ac_fn_c_try_compile "$LINENO"; then :
3360   ac_compiler_gnu=yes
3361 else
3362   ac_compiler_gnu=no
3363 fi
3364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3365 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3366
3367 fi
3368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3369 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3370 if test $ac_compiler_gnu = yes; then
3371   GCC=yes
3372 else
3373   GCC=
3374 fi
3375 ac_test_CFLAGS=${CFLAGS+set}
3376 ac_save_CFLAGS=$CFLAGS
3377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3378 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3379 if test "${ac_cv_prog_cc_g+set}" = set; then :
3380   $as_echo_n "(cached) " >&6
3381 else
3382   ac_save_c_werror_flag=$ac_c_werror_flag
3383    ac_c_werror_flag=yes
3384    ac_cv_prog_cc_g=no
3385    CFLAGS="-g"
3386    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3387 /* end confdefs.h.  */
3388
3389 int
3390 main ()
3391 {
3392
3393   ;
3394   return 0;
3395 }
3396 _ACEOF
3397 if ac_fn_c_try_compile "$LINENO"; then :
3398   ac_cv_prog_cc_g=yes
3399 else
3400   CFLAGS=""
3401       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3402 /* end confdefs.h.  */
3403
3404 int
3405 main ()
3406 {
3407
3408   ;
3409   return 0;
3410 }
3411 _ACEOF
3412 if ac_fn_c_try_compile "$LINENO"; then :
3413
3414 else
3415   ac_c_werror_flag=$ac_save_c_werror_flag
3416          CFLAGS="-g"
3417          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3418 /* end confdefs.h.  */
3419
3420 int
3421 main ()
3422 {
3423
3424   ;
3425   return 0;
3426 }
3427 _ACEOF
3428 if ac_fn_c_try_compile "$LINENO"; then :
3429   ac_cv_prog_cc_g=yes
3430 fi
3431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3432 fi
3433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3434 fi
3435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3436    ac_c_werror_flag=$ac_save_c_werror_flag
3437 fi
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3439 $as_echo "$ac_cv_prog_cc_g" >&6; }
3440 if test "$ac_test_CFLAGS" = set; then
3441   CFLAGS=$ac_save_CFLAGS
3442 elif test $ac_cv_prog_cc_g = yes; then
3443   if test "$GCC" = yes; then
3444     CFLAGS="-g -O2"
3445   else
3446     CFLAGS="-g"
3447   fi
3448 else
3449   if test "$GCC" = yes; then
3450     CFLAGS="-O2"
3451   else
3452     CFLAGS=
3453   fi
3454 fi
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3456 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3457 if test "${ac_cv_prog_cc_c89+set}" = set; then :
3458   $as_echo_n "(cached) " >&6
3459 else
3460   ac_cv_prog_cc_c89=no
3461 ac_save_CC=$CC
3462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3463 /* end confdefs.h.  */
3464 #include <stdarg.h>
3465 #include <stdio.h>
3466 #include <sys/types.h>
3467 #include <sys/stat.h>
3468 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3469 struct buf { int x; };
3470 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3471 static char *e (p, i)
3472      char **p;
3473      int i;
3474 {
3475   return p[i];
3476 }
3477 static char *f (char * (*g) (char **, int), char **p, ...)
3478 {
3479   char *s;
3480   va_list v;
3481   va_start (v,p);
3482   s = g (p, va_arg (v,int));
3483   va_end (v);
3484   return s;
3485 }
3486
3487 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3488    function prototypes and stuff, but not '\xHH' hex character constants.
3489    These don't provoke an error unfortunately, instead are silently treated
3490    as 'x'.  The following induces an error, until -std is added to get
3491    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3492    array size at least.  It's necessary to write '\x00'==0 to get something
3493    that's true only with -std.  */
3494 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3495
3496 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3497    inside strings and character constants.  */
3498 #define FOO(x) 'x'
3499 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3500
3501 int test (int i, double x);
3502 struct s1 {int (*f) (int a);};
3503 struct s2 {int (*f) (double a);};
3504 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3505 int argc;
3506 char **argv;
3507 int
3508 main ()
3509 {
3510 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3511   ;
3512   return 0;
3513 }
3514 _ACEOF
3515 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3516         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3517 do
3518   CC="$ac_save_CC $ac_arg"
3519   if ac_fn_c_try_compile "$LINENO"; then :
3520   ac_cv_prog_cc_c89=$ac_arg
3521 fi
3522 rm -f core conftest.err conftest.$ac_objext
3523   test "x$ac_cv_prog_cc_c89" != "xno" && break
3524 done
3525 rm -f conftest.$ac_ext
3526 CC=$ac_save_CC
3527
3528 fi
3529 # AC_CACHE_VAL
3530 case "x$ac_cv_prog_cc_c89" in
3531   x)
3532     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3533 $as_echo "none needed" >&6; } ;;
3534   xno)
3535     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3536 $as_echo "unsupported" >&6; } ;;
3537   *)
3538     CC="$CC $ac_cv_prog_cc_c89"
3539     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3540 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3541 esac
3542 if test "x$ac_cv_prog_cc_c89" != xno; then :
3543
3544 fi
3545
3546 ac_ext=c
3547 ac_cpp='$CPP $CPPFLAGS'
3548 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3549 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3550 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3551
3552 ac_ext=cpp
3553 ac_cpp='$CXXCPP $CPPFLAGS'
3554 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3555 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3556 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3557 if test -z "$CXX"; then
3558   if test -n "$CCC"; then
3559     CXX=$CCC
3560   else
3561     if test -n "$ac_tool_prefix"; then
3562   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3563   do
3564     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3565 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3567 $as_echo_n "checking for $ac_word... " >&6; }
3568 if test "${ac_cv_prog_CXX+set}" = set; then :
3569   $as_echo_n "(cached) " >&6
3570 else
3571   if test -n "$CXX"; then
3572   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3573 else
3574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3575 for as_dir in $PATH
3576 do
3577   IFS=$as_save_IFS
3578   test -z "$as_dir" && as_dir=.
3579     for ac_exec_ext in '' $ac_executable_extensions; do
3580   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3581     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3583     break 2
3584   fi
3585 done
3586   done
3587 IFS=$as_save_IFS
3588
3589 fi
3590 fi
3591 CXX=$ac_cv_prog_CXX
3592 if test -n "$CXX"; then
3593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3594 $as_echo "$CXX" >&6; }
3595 else
3596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3597 $as_echo "no" >&6; }
3598 fi
3599
3600
3601     test -n "$CXX" && break
3602   done
3603 fi
3604 if test -z "$CXX"; then
3605   ac_ct_CXX=$CXX
3606   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3607 do
3608   # Extract the first word of "$ac_prog", so it can be a program name with args.
3609 set dummy $ac_prog; ac_word=$2
3610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3611 $as_echo_n "checking for $ac_word... " >&6; }
3612 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3613   $as_echo_n "(cached) " >&6
3614 else
3615   if test -n "$ac_ct_CXX"; then
3616   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3617 else
3618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3619 for as_dir in $PATH
3620 do
3621   IFS=$as_save_IFS
3622   test -z "$as_dir" && as_dir=.
3623     for ac_exec_ext in '' $ac_executable_extensions; do
3624   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3625     ac_cv_prog_ac_ct_CXX="$ac_prog"
3626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3627     break 2
3628   fi
3629 done
3630   done
3631 IFS=$as_save_IFS
3632
3633 fi
3634 fi
3635 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3636 if test -n "$ac_ct_CXX"; then
3637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3638 $as_echo "$ac_ct_CXX" >&6; }
3639 else
3640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3641 $as_echo "no" >&6; }
3642 fi
3643
3644
3645   test -n "$ac_ct_CXX" && break
3646 done
3647
3648   if test "x$ac_ct_CXX" = x; then
3649     CXX="g++"
3650   else
3651     case $cross_compiling:$ac_tool_warned in
3652 yes:)
3653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3654 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3655 ac_tool_warned=yes ;;
3656 esac
3657     CXX=$ac_ct_CXX
3658   fi
3659 fi
3660
3661   fi
3662 fi
3663 # Provide some information about the compiler.
3664 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3665 set X $ac_compile
3666 ac_compiler=$2
3667 for ac_option in --version -v -V -qversion; do
3668   { { ac_try="$ac_compiler $ac_option >&5"
3669 case "(($ac_try" in
3670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3671   *) ac_try_echo=$ac_try;;
3672 esac
3673 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3674 $as_echo "$ac_try_echo"; } >&5
3675   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3676   ac_status=$?
3677   if test -s conftest.err; then
3678     sed '10a\
3679 ... rest of stderr output deleted ...
3680          10q' conftest.err >conftest.er1
3681     cat conftest.er1 >&5
3682     rm -f conftest.er1 conftest.err
3683   fi
3684   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3685   test $ac_status = 0; }
3686 done
3687
3688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3689 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3690 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3691   $as_echo_n "(cached) " >&6
3692 else
3693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3694 /* end confdefs.h.  */
3695
3696 int
3697 main ()
3698 {
3699 #ifndef __GNUC__
3700        choke me
3701 #endif
3702
3703   ;
3704   return 0;
3705 }
3706 _ACEOF
3707 if ac_fn_cxx_try_compile "$LINENO"; then :
3708   ac_compiler_gnu=yes
3709 else
3710   ac_compiler_gnu=no
3711 fi
3712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3713 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3714
3715 fi
3716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3717 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3718 if test $ac_compiler_gnu = yes; then
3719   GXX=yes
3720 else
3721   GXX=
3722 fi
3723 ac_test_CXXFLAGS=${CXXFLAGS+set}
3724 ac_save_CXXFLAGS=$CXXFLAGS
3725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3726 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3727 if test "${ac_cv_prog_cxx_g+set}" = set; then :
3728   $as_echo_n "(cached) " >&6
3729 else
3730   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3731    ac_cxx_werror_flag=yes
3732    ac_cv_prog_cxx_g=no
3733    CXXFLAGS="-g"
3734    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3735 /* end confdefs.h.  */
3736
3737 int
3738 main ()
3739 {
3740
3741   ;
3742   return 0;
3743 }
3744 _ACEOF
3745 if ac_fn_cxx_try_compile "$LINENO"; then :
3746   ac_cv_prog_cxx_g=yes
3747 else
3748   CXXFLAGS=""
3749       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3750 /* end confdefs.h.  */
3751
3752 int
3753 main ()
3754 {
3755
3756   ;
3757   return 0;
3758 }
3759 _ACEOF
3760 if ac_fn_cxx_try_compile "$LINENO"; then :
3761
3762 else
3763   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3764          CXXFLAGS="-g"
3765          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3766 /* end confdefs.h.  */
3767
3768 int
3769 main ()
3770 {
3771
3772   ;
3773   return 0;
3774 }
3775 _ACEOF
3776 if ac_fn_cxx_try_compile "$LINENO"; then :
3777   ac_cv_prog_cxx_g=yes
3778 fi
3779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3780 fi
3781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3782 fi
3783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3784    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3785 fi
3786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3787 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3788 if test "$ac_test_CXXFLAGS" = set; then
3789   CXXFLAGS=$ac_save_CXXFLAGS
3790 elif test $ac_cv_prog_cxx_g = yes; then
3791   if test "$GXX" = yes; then
3792     CXXFLAGS="-g -O2"
3793   else
3794     CXXFLAGS="-g"
3795   fi
3796 else
3797   if test "$GXX" = yes; then
3798     CXXFLAGS="-O2"
3799   else
3800     CXXFLAGS=
3801   fi
3802 fi
3803 ac_ext=c
3804 ac_cpp='$CPP $CPPFLAGS'
3805 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3806 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3807 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3808
3809
3810
3811 ac_ext=c
3812 ac_cpp='$CPP $CPPFLAGS'
3813 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3814 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3815 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3817 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3818 # On Suns, sometimes $CPP names a directory.
3819 if test -n "$CPP" && test -d "$CPP"; then
3820   CPP=
3821 fi
3822 if test -z "$CPP"; then
3823   if test "${ac_cv_prog_CPP+set}" = set; then :
3824   $as_echo_n "(cached) " >&6
3825 else
3826       # Double quotes because CPP needs to be expanded
3827     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3828     do
3829       ac_preproc_ok=false
3830 for ac_c_preproc_warn_flag in '' yes
3831 do
3832   # Use a header file that comes with gcc, so configuring glibc
3833   # with a fresh cross-compiler works.
3834   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3835   # <limits.h> exists even on freestanding compilers.
3836   # On the NeXT, cc -E runs the code through the compiler's parser,
3837   # not just through cpp. "Syntax error" is here to catch this case.
3838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3839 /* end confdefs.h.  */
3840 #ifdef __STDC__
3841 # include <limits.h>
3842 #else
3843 # include <assert.h>
3844 #endif
3845                      Syntax error
3846 _ACEOF
3847 if ac_fn_c_try_cpp "$LINENO"; then :
3848
3849 else
3850   # Broken: fails on valid input.
3851 continue
3852 fi
3853 rm -f conftest.err conftest.$ac_ext
3854
3855   # OK, works on sane cases.  Now check whether nonexistent headers
3856   # can be detected and how.
3857   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3858 /* end confdefs.h.  */
3859 #include <ac_nonexistent.h>
3860 _ACEOF
3861 if ac_fn_c_try_cpp "$LINENO"; then :
3862   # Broken: success on invalid input.
3863 continue
3864 else
3865   # Passes both tests.
3866 ac_preproc_ok=:
3867 break
3868 fi
3869 rm -f conftest.err conftest.$ac_ext
3870
3871 done
3872 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3873 rm -f conftest.err conftest.$ac_ext
3874 if $ac_preproc_ok; then :
3875   break
3876 fi
3877
3878     done
3879     ac_cv_prog_CPP=$CPP
3880
3881 fi
3882   CPP=$ac_cv_prog_CPP
3883 else
3884   ac_cv_prog_CPP=$CPP
3885 fi
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3887 $as_echo "$CPP" >&6; }
3888 ac_preproc_ok=false
3889 for ac_c_preproc_warn_flag in '' yes
3890 do
3891   # Use a header file that comes with gcc, so configuring glibc
3892   # with a fresh cross-compiler works.
3893   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3894   # <limits.h> exists even on freestanding compilers.
3895   # On the NeXT, cc -E runs the code through the compiler's parser,
3896   # not just through cpp. "Syntax error" is here to catch this case.
3897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3898 /* end confdefs.h.  */
3899 #ifdef __STDC__
3900 # include <limits.h>
3901 #else
3902 # include <assert.h>
3903 #endif
3904                      Syntax error
3905 _ACEOF
3906 if ac_fn_c_try_cpp "$LINENO"; then :
3907
3908 else
3909   # Broken: fails on valid input.
3910 continue
3911 fi
3912 rm -f conftest.err conftest.$ac_ext
3913
3914   # OK, works on sane cases.  Now check whether nonexistent headers
3915   # can be detected and how.
3916   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3917 /* end confdefs.h.  */
3918 #include <ac_nonexistent.h>
3919 _ACEOF
3920 if ac_fn_c_try_cpp "$LINENO"; then :
3921   # Broken: success on invalid input.
3922 continue
3923 else
3924   # Passes both tests.
3925 ac_preproc_ok=:
3926 break
3927 fi
3928 rm -f conftest.err conftest.$ac_ext
3929
3930 done
3931 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3932 rm -f conftest.err conftest.$ac_ext
3933 if $ac_preproc_ok; then :
3934
3935 else
3936   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3937 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3938 as_fn_error "C preprocessor \"$CPP\" fails sanity check
3939 See \`config.log' for more details." "$LINENO" 5; }
3940 fi
3941
3942 ac_ext=c
3943 ac_cpp='$CPP $CPPFLAGS'
3944 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3945 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3946 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3947
3948
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3950 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3951 if test "${ac_cv_path_GREP+set}" = set; then :
3952   $as_echo_n "(cached) " >&6
3953 else
3954   if test -z "$GREP"; then
3955   ac_path_GREP_found=false
3956   # Loop through the user's path and test for each of PROGNAME-LIST
3957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3958 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3959 do
3960   IFS=$as_save_IFS
3961   test -z "$as_dir" && as_dir=.
3962     for ac_prog in grep ggrep; do
3963     for ac_exec_ext in '' $ac_executable_extensions; do
3964       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3965       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3966 # Check for GNU ac_path_GREP and select it if it is found.
3967   # Check for GNU $ac_path_GREP
3968 case `"$ac_path_GREP" --version 2>&1` in
3969 *GNU*)
3970   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3971 *)
3972   ac_count=0
3973   $as_echo_n 0123456789 >"conftest.in"
3974   while :
3975   do
3976     cat "conftest.in" "conftest.in" >"conftest.tmp"
3977     mv "conftest.tmp" "conftest.in"
3978     cp "conftest.in" "conftest.nl"
3979     $as_echo 'GREP' >> "conftest.nl"
3980     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3981     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3982     as_fn_arith $ac_count + 1 && ac_count=$as_val
3983     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3984       # Best one so far, save it but keep looking for a better one
3985       ac_cv_path_GREP="$ac_path_GREP"
3986       ac_path_GREP_max=$ac_count
3987     fi
3988     # 10*(2^10) chars as input seems more than enough
3989     test $ac_count -gt 10 && break
3990   done
3991   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3992 esac
3993
3994       $ac_path_GREP_found && break 3
3995     done
3996   done
3997   done
3998 IFS=$as_save_IFS
3999   if test -z "$ac_cv_path_GREP"; then
4000     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4001   fi
4002 else
4003   ac_cv_path_GREP=$GREP
4004 fi
4005
4006 fi
4007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4008 $as_echo "$ac_cv_path_GREP" >&6; }
4009  GREP="$ac_cv_path_GREP"
4010
4011
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4013 $as_echo_n "checking for egrep... " >&6; }
4014 if test "${ac_cv_path_EGREP+set}" = set; then :
4015   $as_echo_n "(cached) " >&6
4016 else
4017   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4018    then ac_cv_path_EGREP="$GREP -E"
4019    else
4020      if test -z "$EGREP"; then
4021   ac_path_EGREP_found=false
4022   # Loop through the user's path and test for each of PROGNAME-LIST
4023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4024 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4025 do
4026   IFS=$as_save_IFS
4027   test -z "$as_dir" && as_dir=.
4028     for ac_prog in egrep; do
4029     for ac_exec_ext in '' $ac_executable_extensions; do
4030       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4031       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4032 # Check for GNU ac_path_EGREP and select it if it is found.
4033   # Check for GNU $ac_path_EGREP
4034 case `"$ac_path_EGREP" --version 2>&1` in
4035 *GNU*)
4036   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4037 *)
4038   ac_count=0
4039   $as_echo_n 0123456789 >"conftest.in"
4040   while :
4041   do
4042     cat "conftest.in" "conftest.in" >"conftest.tmp"
4043     mv "conftest.tmp" "conftest.in"
4044     cp "conftest.in" "conftest.nl"
4045     $as_echo 'EGREP' >> "conftest.nl"
4046     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4047     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4048     as_fn_arith $ac_count + 1 && ac_count=$as_val
4049     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4050       # Best one so far, save it but keep looking for a better one
4051       ac_cv_path_EGREP="$ac_path_EGREP"
4052       ac_path_EGREP_max=$ac_count
4053     fi
4054     # 10*(2^10) chars as input seems more than enough
4055     test $ac_count -gt 10 && break
4056   done
4057   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4058 esac
4059
4060       $ac_path_EGREP_found && break 3
4061     done
4062   done
4063   done
4064 IFS=$as_save_IFS
4065   if test -z "$ac_cv_path_EGREP"; then
4066     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4067   fi
4068 else
4069   ac_cv_path_EGREP=$EGREP
4070 fi
4071
4072    fi
4073 fi
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4075 $as_echo "$ac_cv_path_EGREP" >&6; }
4076  EGREP="$ac_cv_path_EGREP"
4077
4078
4079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4080 $as_echo_n "checking for ANSI C header files... " >&6; }
4081 if test "${ac_cv_header_stdc+set}" = set; then :
4082   $as_echo_n "(cached) " >&6
4083 else
4084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4085 /* end confdefs.h.  */
4086 #include <stdlib.h>
4087 #include <stdarg.h>
4088 #include <string.h>
4089 #include <float.h>
4090
4091 int
4092 main ()
4093 {
4094
4095   ;
4096   return 0;
4097 }
4098 _ACEOF
4099 if ac_fn_c_try_compile "$LINENO"; then :
4100   ac_cv_header_stdc=yes
4101 else
4102   ac_cv_header_stdc=no
4103 fi
4104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4105
4106 if test $ac_cv_header_stdc = yes; then
4107   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4108   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4109 /* end confdefs.h.  */
4110 #include <string.h>
4111
4112 _ACEOF
4113 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4114   $EGREP "memchr" >/dev/null 2>&1; then :
4115
4116 else
4117   ac_cv_header_stdc=no
4118 fi
4119 rm -f conftest*
4120
4121 fi
4122
4123 if test $ac_cv_header_stdc = yes; then
4124   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4126 /* end confdefs.h.  */
4127 #include <stdlib.h>
4128
4129 _ACEOF
4130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4131   $EGREP "free" >/dev/null 2>&1; then :
4132
4133 else
4134   ac_cv_header_stdc=no
4135 fi
4136 rm -f conftest*
4137
4138 fi
4139
4140 if test $ac_cv_header_stdc = yes; then
4141   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4142   if test "$cross_compiling" = yes; then :
4143   :
4144 else
4145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4146 /* end confdefs.h.  */
4147 #include <ctype.h>
4148 #include <stdlib.h>
4149 #if ((' ' & 0x0FF) == 0x020)
4150 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4151 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4152 #else
4153 # define ISLOWER(c) \
4154                    (('a' <= (c) && (c) <= 'i') \
4155                      || ('j' <= (c) && (c) <= 'r') \
4156                      || ('s' <= (c) && (c) <= 'z'))
4157 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4158 #endif
4159
4160 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4161 int
4162 main ()
4163 {
4164   int i;
4165   for (i = 0; i < 256; i++)
4166     if (XOR (islower (i), ISLOWER (i))
4167         || toupper (i) != TOUPPER (i))
4168       return 2;
4169   return 0;
4170 }
4171 _ACEOF
4172 if ac_fn_c_try_run "$LINENO"; then :
4173
4174 else
4175   ac_cv_header_stdc=no
4176 fi
4177 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4178   conftest.$ac_objext conftest.beam conftest.$ac_ext
4179 fi
4180
4181 fi
4182 fi
4183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4184 $as_echo "$ac_cv_header_stdc" >&6; }
4185 if test $ac_cv_header_stdc = yes; then
4186
4187 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4188
4189 fi
4190
4191 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4192 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4193                   inttypes.h stdint.h unistd.h
4194 do :
4195   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4196 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4197 "
4198 eval as_val=\$$as_ac_Header
4199    if test "x$as_val" = x""yes; then :
4200   cat >>confdefs.h <<_ACEOF
4201 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4202 _ACEOF
4203
4204 fi
4205
4206 done
4207
4208
4209
4210   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4211 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4212   MINIX=yes
4213 else
4214   MINIX=
4215 fi
4216
4217
4218   if test "$MINIX" = yes; then
4219
4220 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4221
4222
4223 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4224
4225
4226 $as_echo "#define _MINIX 1" >>confdefs.h
4227
4228   fi
4229
4230
4231   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4232 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4233 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4234   $as_echo_n "(cached) " >&6
4235 else
4236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237 /* end confdefs.h.  */
4238
4239 #         define __EXTENSIONS__ 1
4240           $ac_includes_default
4241 int
4242 main ()
4243 {
4244
4245   ;
4246   return 0;
4247 }
4248 _ACEOF
4249 if ac_fn_c_try_compile "$LINENO"; then :
4250   ac_cv_safe_to_define___extensions__=yes
4251 else
4252   ac_cv_safe_to_define___extensions__=no
4253 fi
4254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4255 fi
4256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4257 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4258   test $ac_cv_safe_to_define___extensions__ = yes &&
4259     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4260
4261   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4262
4263   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4264
4265   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4266
4267   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4268
4269
4270 ac_aux_dir=
4271 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4272   for ac_t in install-sh install.sh shtool; do
4273     if test -f "$ac_dir/$ac_t"; then
4274       ac_aux_dir=$ac_dir
4275       ac_install_sh="$ac_aux_dir/$ac_t -c"
4276       break 2
4277     fi
4278   done
4279 done
4280 if test -z "$ac_aux_dir"; then
4281   as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4282 fi
4283
4284 # These three variables are undocumented and unsupported,
4285 # and are intended to be withdrawn in a future Autoconf release.
4286 # They can cause serious problems if a builder's source tree is in a directory
4287 # whose full name contains unusual characters.
4288 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4289 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4290 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4291
4292
4293 # Make sure we can run config.sub.
4294 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4295   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4296
4297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4298 $as_echo_n "checking build system type... " >&6; }
4299 if test "${ac_cv_build+set}" = set; then :
4300   $as_echo_n "(cached) " >&6
4301 else
4302   ac_build_alias=$build_alias
4303 test "x$ac_build_alias" = x &&
4304   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4305 test "x$ac_build_alias" = x &&
4306   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4307 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4308   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4309
4310 fi
4311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4312 $as_echo "$ac_cv_build" >&6; }
4313 case $ac_cv_build in
4314 *-*-*) ;;
4315 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4316 esac
4317 build=$ac_cv_build
4318 ac_save_IFS=$IFS; IFS='-'
4319 set x $ac_cv_build
4320 shift
4321 build_cpu=$1
4322 build_vendor=$2
4323 shift; shift
4324 # Remember, the first character of IFS is used to create $*,
4325 # except with old shells:
4326 build_os=$*
4327 IFS=$ac_save_IFS
4328 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4329
4330
4331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4332 $as_echo_n "checking host system type... " >&6; }
4333 if test "${ac_cv_host+set}" = set; then :
4334   $as_echo_n "(cached) " >&6
4335 else
4336   if test "x$host_alias" = x; then
4337   ac_cv_host=$ac_cv_build
4338 else
4339   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4340     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4341 fi
4342
4343 fi
4344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4345 $as_echo "$ac_cv_host" >&6; }
4346 case $ac_cv_host in
4347 *-*-*) ;;
4348 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4349 esac
4350 host=$ac_cv_host
4351 ac_save_IFS=$IFS; IFS='-'
4352 set x $ac_cv_host
4353 shift
4354 host_cpu=$1
4355 host_vendor=$2
4356 shift; shift
4357 # Remember, the first character of IFS is used to create $*,
4358 # except with old shells:
4359 host_os=$*
4360 IFS=$ac_save_IFS
4361 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4362
4363
4364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4365 $as_echo_n "checking target system type... " >&6; }
4366 if test "${ac_cv_target+set}" = set; then :
4367   $as_echo_n "(cached) " >&6
4368 else
4369   if test "x$target_alias" = x; then
4370   ac_cv_target=$ac_cv_host
4371 else
4372   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4373     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4374 fi
4375
4376 fi
4377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4378 $as_echo "$ac_cv_target" >&6; }
4379 case $ac_cv_target in
4380 *-*-*) ;;
4381 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4382 esac
4383 target=$ac_cv_target
4384 ac_save_IFS=$IFS; IFS='-'
4385 set x $ac_cv_target
4386 shift
4387 target_cpu=$1
4388 target_vendor=$2
4389 shift; shift
4390 # Remember, the first character of IFS is used to create $*,
4391 # except with old shells:
4392 target_os=$*
4393 IFS=$ac_save_IFS
4394 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4395
4396
4397 # The aliases save the names the user supplied, while $host etc.
4398 # will get canonicalized.
4399 test -n "$target_alias" &&
4400   test "$program_prefix$program_suffix$program_transform_name" = \
4401     NONENONEs,x,x, &&
4402   program_prefix=${target_alias}-
4403
4404 # The tests for host and target for $enable_largefile require
4405 # canonical names.
4406
4407
4408
4409 # As the $enable_largefile decision depends on --enable-plugins we must set it
4410 # even in directories otherwise not depending on the $plugins option.
4411
4412
4413   maybe_plugins=no
4414   for ac_header in dlfcn.h
4415 do :
4416   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4417 "
4418 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4419   cat >>confdefs.h <<_ACEOF
4420 #define HAVE_DLFCN_H 1
4421 _ACEOF
4422  maybe_plugins=yes
4423 fi
4424
4425 done
4426
4427   for ac_header in windows.h
4428 do :
4429   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4430 "
4431 if test "x$ac_cv_header_windows_h" = x""yes; then :
4432   cat >>confdefs.h <<_ACEOF
4433 #define HAVE_WINDOWS_H 1
4434 _ACEOF
4435  maybe_plugins=yes
4436 fi
4437
4438 done
4439
4440
4441   # Check whether --enable-plugins was given.
4442 if test "${enable_plugins+set}" = set; then :
4443   enableval=$enable_plugins; case "${enableval}" in
4444       no) plugins=no ;;
4445       *) plugins=yes
4446          if test "$maybe_plugins" != "yes" ; then
4447            as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4448          fi ;;
4449      esac
4450 else
4451   plugins=$maybe_plugins
4452
4453 fi
4454
4455   if test "$plugins" = "yes"; then
4456     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4457 $as_echo_n "checking for library containing dlopen... " >&6; }
4458 if test "${ac_cv_search_dlopen+set}" = set; then :
4459   $as_echo_n "(cached) " >&6
4460 else
4461   ac_func_search_save_LIBS=$LIBS
4462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4463 /* end confdefs.h.  */
4464
4465 /* Override any GCC internal prototype to avoid an error.
4466    Use char because int might match the return type of a GCC
4467    builtin and then its argument prototype would still apply.  */
4468 #ifdef __cplusplus
4469 extern "C"
4470 #endif
4471 char dlopen ();
4472 int
4473 main ()
4474 {
4475 return dlopen ();
4476   ;
4477   return 0;
4478 }
4479 _ACEOF
4480 for ac_lib in '' dl; do
4481   if test -z "$ac_lib"; then
4482     ac_res="none required"
4483   else
4484     ac_res=-l$ac_lib
4485     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4486   fi
4487   if ac_fn_c_try_link "$LINENO"; then :
4488   ac_cv_search_dlopen=$ac_res
4489 fi
4490 rm -f core conftest.err conftest.$ac_objext \
4491     conftest$ac_exeext
4492   if test "${ac_cv_search_dlopen+set}" = set; then :
4493   break
4494 fi
4495 done
4496 if test "${ac_cv_search_dlopen+set}" = set; then :
4497
4498 else
4499   ac_cv_search_dlopen=no
4500 fi
4501 rm conftest.$ac_ext
4502 LIBS=$ac_func_search_save_LIBS
4503 fi
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4505 $as_echo "$ac_cv_search_dlopen" >&6; }
4506 ac_res=$ac_cv_search_dlopen
4507 if test "$ac_res" != no; then :
4508   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4509
4510 fi
4511
4512   fi
4513
4514
4515 case "${host}" in
4516   sparc-*-solaris*|i[3-7]86-*-solaris*)
4517     # On native 32bit sparc and ia32 solaris, large-file and procfs support
4518     # are mutually exclusive; and without procfs support, the bfd/ elf module
4519     # cannot provide certain routines such as elfcore_write_prpsinfo
4520     # or elfcore_write_prstatus.  So unless the user explicitly requested
4521     # large-file support through the --enable-largefile switch, disable
4522     # large-file support in favor of procfs support.
4523     test "${target}" = "${host}" -a "x$plugins" = xno \
4524       && : ${enable_largefile="no"}
4525     ;;
4526 esac
4527
4528 # Check whether --enable-largefile was given.
4529 if test "${enable_largefile+set}" = set; then :
4530   enableval=$enable_largefile;
4531 fi
4532
4533 if test "$enable_largefile" != no; then
4534
4535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4536 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4537 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4538   $as_echo_n "(cached) " >&6
4539 else
4540   ac_cv_sys_largefile_CC=no
4541      if test "$GCC" != yes; then
4542        ac_save_CC=$CC
4543        while :; do
4544          # IRIX 6.2 and later do not support large files by default,
4545          # so use the C compiler's -n32 option if that helps.
4546          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4547 /* end confdefs.h.  */
4548 #include <sys/types.h>
4549  /* Check that off_t can represent 2**63 - 1 correctly.
4550     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4551     since some C++ compilers masquerading as C compilers
4552     incorrectly reject 9223372036854775807.  */
4553 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4554   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4555                        && LARGE_OFF_T % 2147483647 == 1)
4556                       ? 1 : -1];
4557 int
4558 main ()
4559 {
4560
4561   ;
4562   return 0;
4563 }
4564 _ACEOF
4565          if ac_fn_c_try_compile "$LINENO"; then :
4566   break
4567 fi
4568 rm -f core conftest.err conftest.$ac_objext
4569          CC="$CC -n32"
4570          if ac_fn_c_try_compile "$LINENO"; then :
4571   ac_cv_sys_largefile_CC=' -n32'; break
4572 fi
4573 rm -f core conftest.err conftest.$ac_objext
4574          break
4575        done
4576        CC=$ac_save_CC
4577        rm -f conftest.$ac_ext
4578     fi
4579 fi
4580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4581 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4582   if test "$ac_cv_sys_largefile_CC" != no; then
4583     CC=$CC$ac_cv_sys_largefile_CC
4584   fi
4585
4586   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4587 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4588 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4589   $as_echo_n "(cached) " >&6
4590 else
4591   while :; do
4592   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4593 /* end confdefs.h.  */
4594 #include <sys/types.h>
4595  /* Check that off_t can represent 2**63 - 1 correctly.
4596     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4597     since some C++ compilers masquerading as C compilers
4598     incorrectly reject 9223372036854775807.  */
4599 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4600   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4601                        && LARGE_OFF_T % 2147483647 == 1)
4602                       ? 1 : -1];
4603 int
4604 main ()
4605 {
4606
4607   ;
4608   return 0;
4609 }
4610 _ACEOF
4611 if ac_fn_c_try_compile "$LINENO"; then :
4612   ac_cv_sys_file_offset_bits=no; break
4613 fi
4614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4616 /* end confdefs.h.  */
4617 #define _FILE_OFFSET_BITS 64
4618 #include <sys/types.h>
4619  /* Check that off_t can represent 2**63 - 1 correctly.
4620     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4621     since some C++ compilers masquerading as C compilers
4622     incorrectly reject 9223372036854775807.  */
4623 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4624   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4625                        && LARGE_OFF_T % 2147483647 == 1)
4626                       ? 1 : -1];
4627 int
4628 main ()
4629 {
4630
4631   ;
4632   return 0;
4633 }
4634 _ACEOF
4635 if ac_fn_c_try_compile "$LINENO"; then :
4636   ac_cv_sys_file_offset_bits=64; break
4637 fi
4638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4639   ac_cv_sys_file_offset_bits=unknown
4640   break
4641 done
4642 fi
4643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4644 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4645 case $ac_cv_sys_file_offset_bits in #(
4646   no | unknown) ;;
4647   *)
4648 cat >>confdefs.h <<_ACEOF
4649 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4650 _ACEOF
4651 ;;
4652 esac
4653 rm -rf conftest*
4654   if test $ac_cv_sys_file_offset_bits = unknown; then
4655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4656 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4657 if test "${ac_cv_sys_large_files+set}" = set; then :
4658   $as_echo_n "(cached) " >&6
4659 else
4660   while :; do
4661   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4662 /* end confdefs.h.  */
4663 #include <sys/types.h>
4664  /* Check that off_t can represent 2**63 - 1 correctly.
4665     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4666     since some C++ compilers masquerading as C compilers
4667     incorrectly reject 9223372036854775807.  */
4668 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4669   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4670                        && LARGE_OFF_T % 2147483647 == 1)
4671                       ? 1 : -1];
4672 int
4673 main ()
4674 {
4675
4676   ;
4677   return 0;
4678 }
4679 _ACEOF
4680 if ac_fn_c_try_compile "$LINENO"; then :
4681   ac_cv_sys_large_files=no; break
4682 fi
4683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4685 /* end confdefs.h.  */
4686 #define _LARGE_FILES 1
4687 #include <sys/types.h>
4688  /* Check that off_t can represent 2**63 - 1 correctly.
4689     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4690     since some C++ compilers masquerading as C compilers
4691     incorrectly reject 9223372036854775807.  */
4692 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4693   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4694                        && LARGE_OFF_T % 2147483647 == 1)
4695                       ? 1 : -1];
4696 int
4697 main ()
4698 {
4699
4700   ;
4701   return 0;
4702 }
4703 _ACEOF
4704 if ac_fn_c_try_compile "$LINENO"; then :
4705   ac_cv_sys_large_files=1; break
4706 fi
4707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4708   ac_cv_sys_large_files=unknown
4709   break
4710 done
4711 fi
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4713 $as_echo "$ac_cv_sys_large_files" >&6; }
4714 case $ac_cv_sys_large_files in #(
4715   no | unknown) ;;
4716   *)
4717 cat >>confdefs.h <<_ACEOF
4718 #define _LARGE_FILES $ac_cv_sys_large_files
4719 _ACEOF
4720 ;;
4721 esac
4722 rm -rf conftest*
4723   fi
4724 fi
4725
4726
4727
4728
4729
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4731 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4732 if test "${am_cv_prog_cc_stdc+set}" = set; then :
4733   $as_echo_n "(cached) " >&6
4734 else
4735   am_cv_prog_cc_stdc=no
4736 ac_save_CC="$CC"
4737 # Don't try gcc -ansi; that turns off useful extensions and
4738 # breaks some systems' header files.
4739 # AIX                   -qlanglvl=ansi
4740 # Ultrix and OSF/1      -std1
4741 # HP-UX 10.20 and later -Ae
4742 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4743 # SVR4                  -Xc -D__EXTENSIONS__
4744 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4745 do
4746   CC="$ac_save_CC $ac_arg"
4747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4748 /* end confdefs.h.  */
4749 #include <stdarg.h>
4750 #include <stdio.h>
4751 #include <sys/types.h>
4752 #include <sys/stat.h>
4753 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4754 struct buf { int x; };
4755 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4756 static char *e (p, i)
4757      char **p;
4758      int i;
4759 {
4760   return p[i];
4761 }
4762 static char *f (char * (*g) (char **, int), char **p, ...)
4763 {
4764   char *s;
4765   va_list v;
4766   va_start (v,p);
4767   s = g (p, va_arg (v,int));
4768   va_end (v);
4769   return s;
4770 }
4771 int test (int i, double x);
4772 struct s1 {int (*f) (int a);};
4773 struct s2 {int (*f) (double a);};
4774 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4775 int argc;
4776 char **argv;
4777
4778 int
4779 main ()
4780 {
4781
4782 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4783
4784   ;
4785   return 0;
4786 }
4787 _ACEOF
4788 if ac_fn_c_try_compile "$LINENO"; then :
4789   am_cv_prog_cc_stdc="$ac_arg"; break
4790 fi
4791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4792 done
4793 CC="$ac_save_CC"
4794
4795 fi
4796
4797 if test -z "$am_cv_prog_cc_stdc"; then
4798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4799 $as_echo "none needed" >&6; }
4800 else
4801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4802 $as_echo "$am_cv_prog_cc_stdc" >&6; }
4803 fi
4804 case "x$am_cv_prog_cc_stdc" in
4805   x|xno) ;;
4806   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4807 esac
4808
4809 # expand $ac_aux_dir to an absolute path
4810 am_aux_dir=`cd $ac_aux_dir && pwd`
4811
4812 if test x"${install_sh}" != xset; then
4813   case $am_aux_dir in
4814   *\ * | *\     *)
4815     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4816   *)
4817     install_sh="\${SHELL} $am_aux_dir/install-sh"
4818   esac
4819 fi
4820
4821 # Installed binaries are usually stripped using `strip' when the user
4822 # run `make install-strip'.  However `strip' might not be the right
4823 # tool to use in cross-compilation environments, therefore Automake
4824 # will honor the `STRIP' environment variable to overrule this program.
4825 if test "$cross_compiling" != no; then
4826   if test -n "$ac_tool_prefix"; then
4827   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4828 set dummy ${ac_tool_prefix}strip; ac_word=$2
4829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4830 $as_echo_n "checking for $ac_word... " >&6; }
4831 if test "${ac_cv_prog_STRIP+set}" = set; then :
4832   $as_echo_n "(cached) " >&6
4833 else
4834   if test -n "$STRIP"; then
4835   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4836 else
4837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838 for as_dir in $PATH
4839 do
4840   IFS=$as_save_IFS
4841   test -z "$as_dir" && as_dir=.
4842     for ac_exec_ext in '' $ac_executable_extensions; do
4843   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4844     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4846     break 2
4847   fi
4848 done
4849   done
4850 IFS=$as_save_IFS
4851
4852 fi
4853 fi
4854 STRIP=$ac_cv_prog_STRIP
4855 if test -n "$STRIP"; then
4856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4857 $as_echo "$STRIP" >&6; }
4858 else
4859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860 $as_echo "no" >&6; }
4861 fi
4862
4863
4864 fi
4865 if test -z "$ac_cv_prog_STRIP"; then
4866   ac_ct_STRIP=$STRIP
4867   # Extract the first word of "strip", so it can be a program name with args.
4868 set dummy strip; ac_word=$2
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870 $as_echo_n "checking for $ac_word... " >&6; }
4871 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4872   $as_echo_n "(cached) " >&6
4873 else
4874   if test -n "$ac_ct_STRIP"; then
4875   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4876 else
4877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878 for as_dir in $PATH
4879 do
4880   IFS=$as_save_IFS
4881   test -z "$as_dir" && as_dir=.
4882     for ac_exec_ext in '' $ac_executable_extensions; do
4883   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4884     ac_cv_prog_ac_ct_STRIP="strip"
4885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886     break 2
4887   fi
4888 done
4889   done
4890 IFS=$as_save_IFS
4891
4892 fi
4893 fi
4894 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4895 if test -n "$ac_ct_STRIP"; then
4896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4897 $as_echo "$ac_ct_STRIP" >&6; }
4898 else
4899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900 $as_echo "no" >&6; }
4901 fi
4902
4903   if test "x$ac_ct_STRIP" = x; then
4904     STRIP=":"
4905   else
4906     case $cross_compiling:$ac_tool_warned in
4907 yes:)
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4909 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4910 ac_tool_warned=yes ;;
4911 esac
4912     STRIP=$ac_ct_STRIP
4913   fi
4914 else
4915   STRIP="$ac_cv_prog_STRIP"
4916 fi
4917
4918 fi
4919 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4920
4921
4922 ac_aux_dir=
4923 for ac_dir in .. "$srcdir"/..; do
4924   for ac_t in install-sh install.sh shtool; do
4925     if test -f "$ac_dir/$ac_t"; then
4926       ac_aux_dir=$ac_dir
4927       ac_install_sh="$ac_aux_dir/$ac_t -c"
4928       break 2
4929     fi
4930   done
4931 done
4932 if test -z "$ac_aux_dir"; then
4933   as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
4934 fi
4935
4936 # These three variables are undocumented and unsupported,
4937 # and are intended to be withdrawn in a future Autoconf release.
4938 # They can cause serious problems if a builder's source tree is in a directory
4939 # whose full name contains unusual characters.
4940 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4941 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4942 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4943
4944
4945
4946 test "$program_prefix" != NONE &&
4947   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4948 # Use a double $ so make ignores it.
4949 test "$program_suffix" != NONE &&
4950   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4951 # Double any \ or $.
4952 # By default was `s,x,x', remove it if useless.
4953 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4954 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4955
4956
4957 # See if we are building with C++, and substitute COMPILER.
4958
4959   # Check whether --enable-build-with-cxx was given.
4960 if test "${enable_build_with_cxx+set}" = set; then :
4961   enableval=$enable_build_with_cxx; case $enableval in
4962       yes | no)
4963           ;;
4964       *)
4965           as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
4966     esac
4967 else
4968   enable_build_with_cxx=yes
4969 fi
4970
4971
4972   if test "$enable_build_with_cxx" = "yes"; then
4973     COMPILER='$(CXX)'
4974     COMPILER_CFLAGS='$(CXXFLAGS)'
4975    else
4976     COMPILER='$(CC)'
4977     COMPILER_CFLAGS='$(CFLAGS)'
4978   fi
4979
4980
4981
4982
4983 # Dependency checking.
4984 rm -rf .tst 2>/dev/null
4985 mkdir .tst 2>/dev/null
4986 if test -d .tst; then
4987   am__leading_dot=.
4988 else
4989   am__leading_dot=_
4990 fi
4991 rmdir .tst 2>/dev/null
4992
4993 DEPDIR="${am__leading_dot}deps"
4994
4995 ac_config_commands="$ac_config_commands depdir"
4996
4997
4998 depcc="$CC"   am_compiler_list=
4999
5000 am_depcomp=$ac_aux_dir/depcomp
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5002 $as_echo_n "checking dependency style of $depcc... " >&6; }
5003 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5004   $as_echo_n "(cached) " >&6
5005 else
5006   if test -f "$am_depcomp"; then
5007   # We make a subdir and do the tests there.  Otherwise we can end up
5008   # making bogus files that we don't know about and never remove.  For
5009   # instance it was reported that on HP-UX the gcc test will end up
5010   # making a dummy file named `D' -- because `-MD' means `put the output
5011   # in D'.
5012   mkdir conftest.dir
5013   # Copy depcomp to subdir because otherwise we won't find it if we're
5014   # using a relative directory.
5015   cp "$am_depcomp" conftest.dir
5016   cd conftest.dir
5017   # We will build objects and dependencies in a subdirectory because
5018   # it helps to detect inapplicable dependency modes.  For instance
5019   # both Tru64's cc and ICC support -MD to output dependencies as a
5020   # side effect of compilation, but ICC will put the dependencies in
5021   # the current directory while Tru64 will put them in the object
5022   # directory.
5023   mkdir sub
5024
5025   am_cv_CC_dependencies_compiler_type=none
5026   if test "$am_compiler_list" = ""; then
5027      am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5028   fi
5029   for depmode in $am_compiler_list; do
5030     if test $depmode = none; then break; fi
5031
5032     $as_echo "$as_me:$LINENO: trying $depmode" >&5
5033     # Setup a source with many dependencies, because some compilers
5034     # like to wrap large dependency lists on column 80 (with \), and
5035     # we should not choose a depcomp mode which is confused by this.
5036     #
5037     # We need to recreate these files for each test, as the compiler may
5038     # overwrite some of them when testing with obscure command lines.
5039     # This happens at least with the AIX C compiler.
5040     : > sub/conftest.c
5041     for i in 1 2 3 4 5 6; do
5042       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5043       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5044       # Solaris 8's {/usr,}/bin/sh.
5045       touch sub/conftst$i.h
5046     done
5047     echo "include sub/conftest.Po" > confmf
5048
5049     # We check with `-c' and `-o' for the sake of the "dashmstdout"
5050     # mode.  It turns out that the SunPro C++ compiler does not properly
5051     # handle `-M -o', and we need to detect this.
5052     depcmd="depmode=$depmode \
5053        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5054        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5055        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5056     echo "| $depcmd" | sed -e 's/  */ /g' >&5
5057     if env $depcmd > conftest.err 2>&1 &&
5058        grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5059        grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5060        ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5061       # icc doesn't choke on unknown options, it will just issue warnings
5062       # or remarks (even with -Werror).  So we grep stderr for any message
5063       # that says an option was ignored or not supported.
5064       # When given -MP, icc 7.0 and 7.1 complain thusly:
5065       #   icc: Command line warning: ignoring option '-M'; no argument required
5066       # The diagnosis changed in icc 8.0:
5067       #   icc: Command line remark: option '-MP' not supported
5068       if (grep 'ignoring option' conftest.err ||
5069           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5070         am_cv_CC_dependencies_compiler_type=$depmode
5071         $as_echo "$as_me:$LINENO: success" >&5
5072         break
5073       fi
5074     fi
5075     $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
5076     sed -e 's/^/| /' < conftest.err >&5
5077   done
5078
5079   cd ..
5080   rm -rf conftest.dir
5081 else
5082   am_cv_CC_dependencies_compiler_type=none
5083 fi
5084
5085 fi
5086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5087 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5088 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
5089 then as_fn_error "no usable dependency style found" "$LINENO" 5
5090 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5091
5092 fi
5093
5094
5095 # Check for the 'make' the user wants to use.
5096 for ac_prog in make
5097 do
5098   # Extract the first word of "$ac_prog", so it can be a program name with args.
5099 set dummy $ac_prog; ac_word=$2
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101 $as_echo_n "checking for $ac_word... " >&6; }
5102 if test "${ac_cv_prog_MAKE+set}" = set; then :
5103   $as_echo_n "(cached) " >&6
5104 else
5105   if test -n "$MAKE"; then
5106   ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5107 else
5108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109 for as_dir in $PATH
5110 do
5111   IFS=$as_save_IFS
5112   test -z "$as_dir" && as_dir=.
5113     for ac_exec_ext in '' $ac_executable_extensions; do
5114   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5115     ac_cv_prog_MAKE="$ac_prog"
5116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5117     break 2
5118   fi
5119 done
5120   done
5121 IFS=$as_save_IFS
5122
5123 fi
5124 fi
5125 MAKE=$ac_cv_prog_MAKE
5126 if test -n "$MAKE"; then
5127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5128 $as_echo "$MAKE" >&6; }
5129 else
5130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131 $as_echo "no" >&6; }
5132 fi
5133
5134
5135   test -n "$MAKE" && break
5136 done
5137
5138 MAKE_IS_GNU=
5139 case "`$MAKE --version 2>&1 | sed 1q`" in
5140   *GNU*)
5141     MAKE_IS_GNU=yes
5142     ;;
5143 esac
5144  if test "$MAKE_IS_GNU" = yes; then
5145   GMAKE_TRUE=
5146   GMAKE_FALSE='#'
5147 else
5148   GMAKE_TRUE='#'
5149   GMAKE_FALSE=
5150 fi
5151
5152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5153 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5154 set x ${MAKE-make}
5155 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5156 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5157   $as_echo_n "(cached) " >&6
5158 else
5159   cat >conftest.make <<\_ACEOF
5160 SHELL = /bin/sh
5161 all:
5162         @echo '@@@%%%=$(MAKE)=@@@%%%'
5163 _ACEOF
5164 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5165 case `${MAKE-make} -f conftest.make 2>/dev/null` in
5166   *@@@%%%=?*=@@@%%%*)
5167     eval ac_cv_prog_make_${ac_make}_set=yes;;
5168   *)
5169     eval ac_cv_prog_make_${ac_make}_set=no;;
5170 esac
5171 rm -f conftest.make
5172 fi
5173 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5175 $as_echo "yes" >&6; }
5176   SET_MAKE=
5177 else
5178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179 $as_echo "no" >&6; }
5180   SET_MAKE="MAKE=${MAKE-make}"
5181 fi
5182
5183
5184 gnulib_extra_configure_args=
5185 # If large-file support is disabled, make sure gnulib does the same.
5186 if test "$enable_largefile" = no; then
5187 gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5188 fi
5189
5190 # Configure gnulib.  We need to build gnulib under some other
5191 # directory not "gnulib", to avoid the problem of both GDB and
5192 # GDBserver wanting to build it in the same directory, when building
5193 # in the source dir.
5194
5195   in_src="gnulib"
5196   in_build="build-gnulib"
5197   in_extra_args="$gnulib_extra_configure_args"
5198
5199   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5200   # so they do not pile up.
5201   ac_sub_configure_args=
5202   ac_prev=
5203   eval "set x $ac_configure_args"
5204   shift
5205   for ac_arg
5206   do
5207     if test -n "$ac_prev"; then
5208       ac_prev=
5209       continue
5210     fi
5211     case $ac_arg in
5212     -cache-file | --cache-file | --cache-fil | --cache-fi \
5213     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5214       ac_prev=cache_file ;;
5215     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5216     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5217     | --c=*)
5218       ;;
5219     --config-cache | -C)
5220       ;;
5221     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5222       ac_prev=srcdir ;;
5223     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5224       ;;
5225     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5226       ac_prev=prefix ;;
5227     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5228       ;;
5229     --disable-option-checking)
5230       ;;
5231     *)
5232       case $ac_arg in
5233       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5234       esac
5235       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5236     esac
5237   done
5238
5239   # Always prepend --prefix to ensure using the same prefix
5240   # in subdir configurations.
5241   ac_arg="--prefix=$prefix"
5242   case $ac_arg in
5243   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5244   esac
5245   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5246
5247   # Pass --silent
5248   if test "$silent" = yes; then
5249     ac_sub_configure_args="--silent $ac_sub_configure_args"
5250   fi
5251
5252   # Always prepend --disable-option-checking to silence warnings, since
5253   # different subdirs can have different --enable and --with options.
5254   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5255
5256   ac_popdir=`pwd`
5257   ac_dir=$in_build
5258
5259   ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5260   $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5261   $as_echo "$ac_msg" >&6
5262   as_dir="$ac_dir"; as_fn_mkdir_p
5263
5264   case $srcdir in
5265   [\\/]* | ?:[\\/]* )
5266     ac_srcdir=$srcdir/$in_src ;;
5267   *) # Relative name.
5268     ac_srcdir=../$srcdir/$in_src ;;
5269   esac
5270
5271   cd "$ac_dir"
5272
5273   ac_sub_configure=$ac_srcdir/configure
5274
5275   # Make the cache file name correct relative to the subdirectory.
5276   case $cache_file in
5277   [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5278   *) # Relative name.
5279     ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5280   esac
5281
5282   if test -n "$in_extra_args"; then
5283     # Add the extra args at the end.
5284     ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5285   fi
5286
5287   { $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
5288 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5289   # The eval makes quoting arguments work.
5290   eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5291        --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5292     as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5293
5294   cd "$ac_popdir"
5295
5296
5297
5298 CONFIG_OBS=
5299 CONFIG_DEPS=
5300 CONFIG_SRCS=
5301 ENABLE_CFLAGS=
5302
5303 CONFIG_ALL=
5304 CONFIG_CLEAN=
5305 CONFIG_INSTALL=
5306 CONFIG_UNINSTALL=
5307
5308 # If we haven't got the data from the intl directory,
5309 # assume NLS is disabled.
5310 USE_NLS=no
5311 LIBINTL=
5312 LIBINTL_DEP=
5313 INCINTL=
5314 XGETTEXT=
5315 GMSGFMT=
5316 POSUB=
5317
5318 if test -f  ../intl/config.intl; then
5319   .  ../intl/config.intl
5320 fi
5321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5322 $as_echo_n "checking whether NLS is requested... " >&6; }
5323 if test x"$USE_NLS" != xyes; then
5324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5325 $as_echo "no" >&6; }
5326 else
5327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5328 $as_echo "yes" >&6; }
5329
5330 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
5331
5332
5333   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5334 $as_echo_n "checking for catalogs to be installed... " >&6; }
5335   # Look for .po and .gmo files in the source directory.
5336   CATALOGS=
5337   XLINGUAS=
5338   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5339     # If there aren't any .gmo files the shell will give us the
5340     # literal string "../path/to/srcdir/po/*.gmo" which has to be
5341     # weeded out.
5342     case "$cat" in *\**)
5343       continue;;
5344     esac
5345     # The quadruple backslash is collapsed to a double backslash
5346     # by the backticks, then collapsed again by the double quotes,
5347     # leaving us with one backslash in the sed expression (right
5348     # before the dot that mustn't act as a wildcard).
5349     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5350     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5351     # The user is allowed to set LINGUAS to a list of languages to
5352     # install catalogs for.  If it's empty that means "all of them."
5353     if test "x$LINGUAS" = x; then
5354       CATALOGS="$CATALOGS $cat"
5355       XLINGUAS="$XLINGUAS $lang"
5356     else
5357       case "$LINGUAS" in *$lang*)
5358         CATALOGS="$CATALOGS $cat"
5359         XLINGUAS="$XLINGUAS $lang"
5360         ;;
5361       esac
5362     fi
5363   done
5364   LINGUAS="$XLINGUAS"
5365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5366 $as_echo "$LINGUAS" >&6; }
5367
5368
5369     DATADIRNAME=share
5370
5371   INSTOBJEXT=.mo
5372
5373   GENCAT=gencat
5374
5375   CATOBJEXT=.gmo
5376
5377 fi
5378
5379 localedir='${datadir}/locale'
5380
5381
5382 if test x"$USE_NLS" = xyes; then
5383    CONFIG_ALL="$CONFIG_ALL all-po"
5384    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5385    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5386    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
5387 fi
5388
5389 GNULIB=build-gnulib/import
5390
5391 # For Makefile dependencies.
5392 GNULIB_STDINT_H=
5393 if test x"$STDINT_H" != x; then
5394   GNULIB_STDINT_H=$GNULIB/$STDINT_H
5395 fi
5396
5397
5398 PACKAGE=gdb
5399
5400 cat >>confdefs.h <<_ACEOF
5401 #define PACKAGE "$PACKAGE"
5402 _ACEOF
5403
5404
5405
5406 # We never need to detect it in this sub-configure.
5407 # But preserve it for config.status --recheck.
5408
5409
5410
5411 MAKEINFO_EXTRA_FLAGS=""
5412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5413 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5414 if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5415   $as_echo_n "(cached) " >&6
5416 else
5417   echo '@clicksequence{a @click{} b}' >conftest.texinfo
5418   if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5419     gdb_cv_have_makeinfo_click=yes
5420   else
5421     gdb_cv_have_makeinfo_click=no
5422   fi
5423 fi
5424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5425 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5426 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5427   MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5428 fi
5429
5430
5431
5432
5433 # Check whether --with-separate-debug-dir was given.
5434 if test "${with_separate_debug_dir+set}" = set; then :
5435   withval=$with_separate_debug_dir;
5436     DEBUGDIR=$withval
5437 else
5438   DEBUGDIR=${libdir}/debug
5439 fi
5440
5441
5442   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5443   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5444   ac_define_dir=`eval echo $DEBUGDIR`
5445   ac_define_dir=`eval echo $ac_define_dir`
5446
5447 cat >>confdefs.h <<_ACEOF
5448 #define DEBUGDIR "$ac_define_dir"
5449 _ACEOF
5450
5451
5452
5453
5454   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5455      if test "x$prefix" = xNONE; then
5456         test_prefix=/usr/local
5457      else
5458         test_prefix=$prefix
5459      fi
5460   else
5461      test_prefix=$exec_prefix
5462   fi
5463   value=0
5464   case ${ac_define_dir} in
5465      "${test_prefix}"|"${test_prefix}/"*|\
5466         '${exec_prefix}'|'${exec_prefix}/'*)
5467      value=1
5468      ;;
5469   esac
5470
5471 cat >>confdefs.h <<_ACEOF
5472 #define DEBUGDIR_RELOCATABLE $value
5473 _ACEOF
5474
5475
5476
5477
5478 # We can't pass paths as command line arguments.
5479 # Mingw32 tries to be clever and will convert the paths for us.
5480 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
5481 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5482 # This breaks GDB's relocatable path conversions since paths passed in
5483 # config.h would not get so translated, the path prefixes no longer match.
5484
5485   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5486   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5487   ac_define_dir=`eval echo $bindir`
5488   ac_define_dir=`eval echo $ac_define_dir`
5489
5490 cat >>confdefs.h <<_ACEOF
5491 #define BINDIR "$ac_define_dir"
5492 _ACEOF
5493
5494
5495
5496 # GDB's datadir relocation
5497
5498
5499
5500 # Check whether --with-gdb-datadir was given.
5501 if test "${with_gdb_datadir+set}" = set; then :
5502   withval=$with_gdb_datadir;
5503     GDB_DATADIR=$withval
5504 else
5505   GDB_DATADIR=${datadir}/gdb
5506 fi
5507
5508
5509   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5510   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5511   ac_define_dir=`eval echo $GDB_DATADIR`
5512   ac_define_dir=`eval echo $ac_define_dir`
5513
5514 cat >>confdefs.h <<_ACEOF
5515 #define GDB_DATADIR "$ac_define_dir"
5516 _ACEOF
5517
5518
5519
5520
5521   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5522      if test "x$prefix" = xNONE; then
5523         test_prefix=/usr/local
5524      else
5525         test_prefix=$prefix
5526      fi
5527   else
5528      test_prefix=$exec_prefix
5529   fi
5530   value=0
5531   case ${ac_define_dir} in
5532      "${test_prefix}"|"${test_prefix}/"*|\
5533         '${exec_prefix}'|'${exec_prefix}/'*)
5534      value=1
5535      ;;
5536   esac
5537
5538 cat >>confdefs.h <<_ACEOF
5539 #define GDB_DATADIR_RELOCATABLE $value
5540 _ACEOF
5541
5542
5543
5544
5545
5546 # Check whether --with-relocated-sources was given.
5547 if test "${with_relocated_sources+set}" = set; then :
5548   withval=$with_relocated_sources; reloc_srcdir="${withval}"
5549
5550   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5551   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5552   ac_define_dir=`eval echo $reloc_srcdir`
5553   ac_define_dir=`eval echo $ac_define_dir`
5554
5555 cat >>confdefs.h <<_ACEOF
5556 #define RELOC_SRCDIR "$ac_define_dir"
5557 _ACEOF
5558
5559
5560
5561 fi
5562
5563
5564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5565 $as_echo_n "checking for default auto-load directory... " >&6; }
5566
5567 # Check whether --with-auto-load-dir was given.
5568 if test "${with_auto_load_dir+set}" = set; then :
5569   withval=$with_auto_load_dir;
5570 else
5571   with_auto_load_dir='$debugdir:$datadir/auto-load'
5572 fi
5573
5574 escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
5575
5576   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5577   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5578   ac_define_dir=`eval echo $escape_dir`
5579   ac_define_dir=`eval echo $ac_define_dir`
5580
5581 cat >>confdefs.h <<_ACEOF
5582 #define AUTO_LOAD_DIR "$ac_define_dir"
5583 _ACEOF
5584
5585
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5587 $as_echo "$with_auto_load_dir" >&6; }
5588
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5590 $as_echo_n "checking for default auto-load safe-path... " >&6; }
5591
5592 # Check whether --with-auto-load-safe-path was given.
5593 if test "${with_auto_load_safe_path+set}" = set; then :
5594   withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
5595      with_auto_load_safe_path="/"
5596      fi
5597 else
5598   with_auto_load_safe_path="$with_auto_load_dir"
5599 fi
5600
5601 escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
5602
5603   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5604   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5605   ac_define_dir=`eval echo $escape_dir`
5606   ac_define_dir=`eval echo $ac_define_dir`
5607
5608 cat >>confdefs.h <<_ACEOF
5609 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
5610 _ACEOF
5611
5612
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5614 $as_echo "$with_auto_load_safe_path" >&6; }
5615
5616
5617
5618 subdirs="$subdirs testsuite"
5619
5620
5621 # Check whether to support alternative target configurations
5622 # Check whether --enable-targets was given.
5623 if test "${enable_targets+set}" = set; then :
5624   enableval=$enable_targets; case "${enableval}" in
5625   yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
5626             ;;
5627   no)       enable_targets= ;;
5628   *)        enable_targets=$enableval ;;
5629 esac
5630 fi
5631
5632
5633 # Check whether to enable 64-bit support on 32-bit hosts
5634 # Check whether --enable-64-bit-bfd was given.
5635 if test "${enable_64_bit_bfd+set}" = set; then :
5636   enableval=$enable_64_bit_bfd; case "${enableval}" in
5637   yes)  want64=true  ;;
5638   no)   want64=false ;;
5639   *)    as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
5640 esac
5641 else
5642   want64=false
5643 fi
5644
5645 # Provide defaults for some variables set by the per-host and per-target
5646 # configuration.
5647 gdb_host_obs=posix-hdep.o
5648
5649 if test "${target}" = "${host}"; then
5650   gdb_native=yes
5651 else
5652   gdb_native=no
5653 fi
5654
5655 . $srcdir/configure.host
5656
5657 # Add in the common host objects.
5658 . $srcdir/common/common.host
5659 gdb_host_obs="$gdb_host_obs $common_host_obs"
5660
5661 # Accumulate some settings from configure.tgt over all enabled targets
5662
5663 TARGET_OBS=
5664 all_targets=
5665 HAVE_NATIVE_GCORE_TARGET=
5666
5667 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
5668 do
5669   if test "$targ_alias" = "all"; then
5670     all_targets=true
5671   else
5672     # Canonicalize the secondary target names.
5673     result=`$ac_config_sub $targ_alias 2>/dev/null`
5674     if test -n "$result"; then
5675         targ=$result
5676     else
5677         targ=$targ_alias
5678     fi
5679
5680     . ${srcdir}/configure.tgt
5681
5682     if test -z "${gdb_target_obs}"; then :
5683   as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5684 fi
5685
5686     # Target-specific object files
5687     for i in ${gdb_target_obs}; do
5688         case " $TARGET_OBS " in
5689         *" ${i} "*) ;;
5690         *)
5691           TARGET_OBS="$TARGET_OBS ${i}"
5692           ;;
5693         esac
5694     done
5695
5696     # Check whether this target needs 64-bit CORE_ADDR
5697     if test x${want64} = xfalse; then
5698       . ${srcdir}/../bfd/config.bfd
5699     fi
5700
5701     # Check whether this target is native and supports gcore.
5702     if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5703        && $gdb_have_gcore; then
5704       HAVE_NATIVE_GCORE_TARGET=1
5705     fi
5706   fi
5707 done
5708
5709 if test x${all_targets} = xtrue; then
5710
5711   # We want all 64-bit targets if we either:
5712   #  - run on a 64-bit host  or
5713   #  - already require 64-bit support for some other target  or
5714   #  - the --enable-64-bit-bfd option was supplied
5715   # Otherwise we only support all 32-bit targets.
5716   #
5717   # NOTE: This test must be in sync with the corresponding
5718   #       tests in BFD!
5719
5720   if test x${want64} = xfalse; then
5721     # The cast to long int works around a bug in the HP C Compiler
5722 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5723 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5724 # This bug is HP SR number 8606223364.
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5726 $as_echo_n "checking size of long... " >&6; }
5727 if test "${ac_cv_sizeof_long+set}" = set; then :
5728   $as_echo_n "(cached) " >&6
5729 else
5730   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
5731
5732 else
5733   if test "$ac_cv_type_long" = yes; then
5734      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5735 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5736 { as_fn_set_status 77
5737 as_fn_error "cannot compute sizeof (long)
5738 See \`config.log' for more details." "$LINENO" 5; }; }
5739    else
5740      ac_cv_sizeof_long=0
5741    fi
5742 fi
5743
5744 fi
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5746 $as_echo "$ac_cv_sizeof_long" >&6; }
5747
5748
5749
5750 cat >>confdefs.h <<_ACEOF
5751 #define SIZEOF_LONG $ac_cv_sizeof_long
5752 _ACEOF
5753
5754
5755     if test "x${ac_cv_sizeof_long}" = "x8"; then
5756       want64=true
5757     fi
5758   fi
5759   if test x${want64} = xtrue; then
5760     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5761   else
5762     TARGET_OBS='$(ALL_TARGET_OBS)'
5763   fi
5764 fi
5765
5766
5767
5768
5769 # For other settings, only the main target counts.
5770 gdb_sim=
5771 gdb_osabi=
5772 build_gdbserver=
5773 targ=$target; . ${srcdir}/configure.tgt
5774
5775 # Fetch the default architecture and default target vector from BFD.
5776 targ=$target; . $srcdir/../bfd/config.bfd
5777
5778 # We only want the first architecture, so strip off the others if
5779 # there is more than one.
5780 targ_archs=`echo $targ_archs | sed 's/ .*//'`
5781
5782 if test "x$targ_archs" != x; then
5783
5784 cat >>confdefs.h <<_ACEOF
5785 #define DEFAULT_BFD_ARCH $targ_archs
5786 _ACEOF
5787
5788 fi
5789 if test "x$targ_defvec" != x; then
5790
5791 cat >>confdefs.h <<_ACEOF
5792 #define DEFAULT_BFD_VEC $targ_defvec
5793 _ACEOF
5794
5795 fi
5796
5797 # The CLI cannot be disabled yet, but may be in the future.
5798
5799 # Enable CLI.
5800 # Check whether --enable-gdbcli was given.
5801 if test "${enable_gdbcli+set}" = set; then :
5802   enableval=$enable_gdbcli; case $enableval in
5803     yes)
5804       ;;
5805     no)
5806       as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
5807     *)
5808       as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
5809   esac
5810 else
5811   enable_gdbcli=yes
5812 fi
5813
5814 if test x"$enable_gdbcli" = xyes; then
5815   if test -d $srcdir/cli; then
5816     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5817     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5818     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5819     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5820   fi
5821 fi
5822
5823 # Enable MI.
5824 # Check whether --enable-gdbmi was given.
5825 if test "${enable_gdbmi+set}" = set; then :
5826   enableval=$enable_gdbmi; case $enableval in
5827     yes | no)
5828       ;;
5829     *)
5830       as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
5831   esac
5832 else
5833   enable_gdbmi=yes
5834 fi
5835
5836 if test x"$enable_gdbmi" = xyes; then
5837   if test -d $srcdir/mi; then
5838     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5839     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5840     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5841     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5842   fi
5843 fi
5844
5845 # Enable TUI.
5846 # Check whether --enable-tui was given.
5847 if test "${enable_tui+set}" = set; then :
5848   enableval=$enable_tui; case $enableval in
5849     yes | no | auto)
5850       ;;
5851     *)
5852       as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
5853   esac
5854 else
5855   enable_tui=auto
5856 fi
5857
5858
5859 # Enable gdbtk.
5860 # Check whether --enable-gdbtk was given.
5861 if test "${enable_gdbtk+set}" = set; then :
5862   enableval=$enable_gdbtk; case $enableval in
5863     yes | no)
5864       ;;
5865     *)
5866       as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
5867   esac
5868 else
5869   if test -d $srcdir/gdbtk; then
5870     enable_gdbtk=yes
5871   else
5872     enable_gdbtk=no
5873   fi
5874 fi
5875
5876 # We unconditionally disable gdbtk tests on selected platforms.
5877 case $host_os in
5878   go32* | windows*)
5879     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5880 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
5881     enable_gdbtk=no ;;
5882 esac
5883
5884 # Libunwind support for ia64.
5885
5886
5887 # Check whether --with-libunwind-ia64 was given.
5888 if test "${with_libunwind_ia64+set}" = set; then :
5889   withval=$with_libunwind_ia64;
5890 else
5891   with_libunwind_ia64=auto
5892 fi
5893
5894
5895 # Backward compatibility option.
5896 if test "${with_libunwind+set}" = set; then
5897   if test x"$with_libunwind_ia64" != xauto; then
5898     as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5899   fi
5900   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5901 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5902   with_libunwind_ia64="$with_libunwind"
5903 fi
5904
5905 case "$with_libunwind_ia64" in
5906   yes | no)
5907     ;;
5908   auto)
5909     for ac_header in libunwind-ia64.h
5910 do :
5911   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5912 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
5913   cat >>confdefs.h <<_ACEOF
5914 #define HAVE_LIBUNWIND_IA64_H 1
5915 _ACEOF
5916
5917 fi
5918
5919 done
5920
5921     with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5922     ;;
5923   *)
5924     as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5925     ;;
5926 esac
5927
5928 if test x"$with_libunwind_ia64" = xyes; then
5929   for ac_header in libunwind-ia64.h
5930 do :
5931   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5932 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
5933   cat >>confdefs.h <<_ACEOF
5934 #define HAVE_LIBUNWIND_IA64_H 1
5935 _ACEOF
5936
5937 fi
5938
5939 done
5940
5941   if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5942     as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5943   fi
5944   CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5945   CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5946   CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
5947 fi
5948
5949 opt_curses=no
5950
5951 # Check whether --with-curses was given.
5952 if test "${with_curses+set}" = set; then :
5953   withval=$with_curses; opt_curses=$withval
5954 fi
5955
5956
5957 prefer_curses=no
5958 if test "$opt_curses" = "yes"; then
5959   prefer_curses=yes
5960 fi
5961
5962 # Profiling support.
5963 # Check whether --enable-profiling was given.
5964 if test "${enable_profiling+set}" = set; then :
5965   enableval=$enable_profiling; case $enableval in
5966     yes | no)
5967       ;;
5968     *)
5969       as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
5970   esac
5971 else
5972   enable_profiling=no
5973 fi
5974
5975
5976 for ac_func in monstartup _mcleanup
5977 do :
5978   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5979 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5980 eval as_val=\$$as_ac_var
5981    if test "x$as_val" = x""yes; then :
5982   cat >>confdefs.h <<_ACEOF
5983 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5984 _ACEOF
5985
5986 fi
5987 done
5988
5989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5990 $as_echo_n "checking for _etext... " >&6; }
5991 if test "${ac_cv_var__etext+set}" = set; then :
5992   $as_echo_n "(cached) " >&6
5993 else
5994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5995 /* end confdefs.h.  */
5996 #include <stdlib.h>
5997 extern char _etext;
5998
5999 int
6000 main ()
6001 {
6002 free (&_etext);
6003   ;
6004   return 0;
6005 }
6006 _ACEOF
6007 if ac_fn_c_try_link "$LINENO"; then :
6008   ac_cv_var__etext=yes
6009 else
6010   ac_cv_var__etext=no
6011 fi
6012 rm -f core conftest.err conftest.$ac_objext \
6013     conftest$ac_exeext conftest.$ac_ext
6014 fi
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6016 $as_echo "$ac_cv_var__etext" >&6; }
6017 if test $ac_cv_var__etext = yes; then
6018
6019 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
6020
6021 fi
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6023 $as_echo_n "checking for etext... " >&6; }
6024 if test "${ac_cv_var_etext+set}" = set; then :
6025   $as_echo_n "(cached) " >&6
6026 else
6027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6028 /* end confdefs.h.  */
6029 #include <stdlib.h>
6030 extern char etext;
6031
6032 int
6033 main ()
6034 {
6035 free (&etext);
6036   ;
6037   return 0;
6038 }
6039 _ACEOF
6040 if ac_fn_c_try_link "$LINENO"; then :
6041   ac_cv_var_etext=yes
6042 else
6043   ac_cv_var_etext=no
6044 fi
6045 rm -f core conftest.err conftest.$ac_objext \
6046     conftest$ac_exeext conftest.$ac_ext
6047 fi
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6049 $as_echo "$ac_cv_var_etext" >&6; }
6050 if test $ac_cv_var_etext = yes; then
6051
6052 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
6053
6054 fi
6055 if test "$enable_profiling" = yes ; then
6056   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
6057     as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
6058   fi
6059   PROFILE_CFLAGS=-pg
6060   OLD_CFLAGS="$CFLAGS"
6061   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
6062
6063   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6064 $as_echo_n "checking whether $CC supports -pg... " >&6; }
6065 if test "${ac_cv_cc_supports_pg+set}" = set; then :
6066   $as_echo_n "(cached) " >&6
6067 else
6068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6069 /* end confdefs.h.  */
6070
6071 int
6072 main ()
6073 {
6074 int x;
6075   ;
6076   return 0;
6077 }
6078 _ACEOF
6079 if ac_fn_c_try_compile "$LINENO"; then :
6080   ac_cv_cc_supports_pg=yes
6081 else
6082   ac_cv_cc_supports_pg=no
6083 fi
6084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6085 fi
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6087 $as_echo "$ac_cv_cc_supports_pg" >&6; }
6088
6089   if test $ac_cv_cc_supports_pg = no; then
6090     as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
6091   fi
6092
6093   CFLAGS="$OLD_CFLAGS"
6094 fi
6095
6096
6097
6098 # Check whether --with-pkgversion was given.
6099 if test "${with_pkgversion+set}" = set; then :
6100   withval=$with_pkgversion; case "$withval" in
6101       yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
6102       no)  PKGVERSION= ;;
6103       *)   PKGVERSION="($withval) " ;;
6104      esac
6105 else
6106   PKGVERSION="(GDB) "
6107
6108 fi
6109
6110
6111
6112
6113
6114 # Check whether --with-bugurl was given.
6115 if test "${with_bugurl+set}" = set; then :
6116   withval=$with_bugurl; case "$withval" in
6117       yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
6118       no)  BUGURL=
6119            ;;
6120       *)   BUGURL="$withval"
6121            ;;
6122      esac
6123 else
6124   BUGURL="http://www.gnu.org/software/gdb/bugs/"
6125
6126 fi
6127
6128   case ${BUGURL} in
6129   "")
6130     REPORT_BUGS_TO=
6131     REPORT_BUGS_TEXI=
6132     ;;
6133   *)
6134     REPORT_BUGS_TO="<$BUGURL>"
6135     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6136     ;;
6137   esac;
6138
6139
6140
6141
6142 cat >>confdefs.h <<_ACEOF
6143 #define PKGVERSION "$PKGVERSION"
6144 _ACEOF
6145
6146
6147 cat >>confdefs.h <<_ACEOF
6148 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6149 _ACEOF
6150
6151
6152 # --------------------- #
6153 # Checks for programs.  #
6154 # --------------------- #
6155
6156 for ac_prog in gawk mawk nawk awk
6157 do
6158   # Extract the first word of "$ac_prog", so it can be a program name with args.
6159 set dummy $ac_prog; ac_word=$2
6160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6161 $as_echo_n "checking for $ac_word... " >&6; }
6162 if test "${ac_cv_prog_AWK+set}" = set; then :
6163   $as_echo_n "(cached) " >&6
6164 else
6165   if test -n "$AWK"; then
6166   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6167 else
6168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6169 for as_dir in $PATH
6170 do
6171   IFS=$as_save_IFS
6172   test -z "$as_dir" && as_dir=.
6173     for ac_exec_ext in '' $ac_executable_extensions; do
6174   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6175     ac_cv_prog_AWK="$ac_prog"
6176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6177     break 2
6178   fi
6179 done
6180   done
6181 IFS=$as_save_IFS
6182
6183 fi
6184 fi
6185 AWK=$ac_cv_prog_AWK
6186 if test -n "$AWK"; then
6187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6188 $as_echo "$AWK" >&6; }
6189 else
6190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6191 $as_echo "no" >&6; }
6192 fi
6193
6194
6195   test -n "$AWK" && break
6196 done
6197
6198 # Find a good install program.  We prefer a C program (faster),
6199 # so one script is as good as another.  But avoid the broken or
6200 # incompatible versions:
6201 # SysV /etc/install, /usr/sbin/install
6202 # SunOS /usr/etc/install
6203 # IRIX /sbin/install
6204 # AIX /bin/install
6205 # AmigaOS /C/install, which installs bootblocks on floppy discs
6206 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6207 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6208 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6209 # OS/2's system install, which has a completely different semantic
6210 # ./install, which can be erroneously created by make from ./install.sh.
6211 # Reject install programs that cannot install multiple files.
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6213 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6214 if test -z "$INSTALL"; then
6215 if test "${ac_cv_path_install+set}" = set; then :
6216   $as_echo_n "(cached) " >&6
6217 else
6218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6219 for as_dir in $PATH
6220 do
6221   IFS=$as_save_IFS
6222   test -z "$as_dir" && as_dir=.
6223     # Account for people who put trailing slashes in PATH elements.
6224 case $as_dir/ in #((
6225   ./ | .// | /[cC]/* | \
6226   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6227   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6228   /usr/ucb/* ) ;;
6229   *)
6230     # OSF1 and SCO ODT 3.0 have their own names for install.
6231     # Don't use installbsd from OSF since it installs stuff as root
6232     # by default.
6233     for ac_prog in ginstall scoinst install; do
6234       for ac_exec_ext in '' $ac_executable_extensions; do
6235         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6236           if test $ac_prog = install &&
6237             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6238             # AIX install.  It has an incompatible calling convention.
6239             :
6240           elif test $ac_prog = install &&
6241             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6242             # program-specific install script used by HP pwplus--don't use.
6243             :
6244           else
6245             rm -rf conftest.one conftest.two conftest.dir
6246             echo one > conftest.one
6247             echo two > conftest.two
6248             mkdir conftest.dir
6249             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6250               test -s conftest.one && test -s conftest.two &&
6251               test -s conftest.dir/conftest.one &&
6252               test -s conftest.dir/conftest.two
6253             then
6254               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6255               break 3
6256             fi
6257           fi
6258         fi
6259       done
6260     done
6261     ;;
6262 esac
6263
6264   done
6265 IFS=$as_save_IFS
6266
6267 rm -rf conftest.one conftest.two conftest.dir
6268
6269 fi
6270   if test "${ac_cv_path_install+set}" = set; then
6271     INSTALL=$ac_cv_path_install
6272   else
6273     # As a last resort, use the slow shell script.  Don't cache a
6274     # value for INSTALL within a source directory, because that will
6275     # break other packages using the cache if that directory is
6276     # removed, or if the value is a relative name.
6277     INSTALL=$ac_install_sh
6278   fi
6279 fi
6280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6281 $as_echo "$INSTALL" >&6; }
6282
6283 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6284 # It thinks the first close brace ends the variable substitution.
6285 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6286
6287 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6288
6289 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6290
6291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6292 $as_echo_n "checking whether ln -s works... " >&6; }
6293 LN_S=$as_ln_s
6294 if test "$LN_S" = "ln -s"; then
6295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6296 $as_echo "yes" >&6; }
6297 else
6298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6299 $as_echo "no, using $LN_S" >&6; }
6300 fi
6301
6302 if test -n "$ac_tool_prefix"; then
6303   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6304 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6306 $as_echo_n "checking for $ac_word... " >&6; }
6307 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6308   $as_echo_n "(cached) " >&6
6309 else
6310   if test -n "$RANLIB"; then
6311   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6312 else
6313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6314 for as_dir in $PATH
6315 do
6316   IFS=$as_save_IFS
6317   test -z "$as_dir" && as_dir=.
6318     for ac_exec_ext in '' $ac_executable_extensions; do
6319   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6320     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6321     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6322     break 2
6323   fi
6324 done
6325   done
6326 IFS=$as_save_IFS
6327
6328 fi
6329 fi
6330 RANLIB=$ac_cv_prog_RANLIB
6331 if test -n "$RANLIB"; then
6332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6333 $as_echo "$RANLIB" >&6; }
6334 else
6335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336 $as_echo "no" >&6; }
6337 fi
6338
6339
6340 fi
6341 if test -z "$ac_cv_prog_RANLIB"; then
6342   ac_ct_RANLIB=$RANLIB
6343   # Extract the first word of "ranlib", so it can be a program name with args.
6344 set dummy ranlib; ac_word=$2
6345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6346 $as_echo_n "checking for $ac_word... " >&6; }
6347 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6348   $as_echo_n "(cached) " >&6
6349 else
6350   if test -n "$ac_ct_RANLIB"; then
6351   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6352 else
6353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6354 for as_dir in $PATH
6355 do
6356   IFS=$as_save_IFS
6357   test -z "$as_dir" && as_dir=.
6358     for ac_exec_ext in '' $ac_executable_extensions; do
6359   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6360     ac_cv_prog_ac_ct_RANLIB="ranlib"
6361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6362     break 2
6363   fi
6364 done
6365   done
6366 IFS=$as_save_IFS
6367
6368 fi
6369 fi
6370 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6371 if test -n "$ac_ct_RANLIB"; then
6372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6373 $as_echo "$ac_ct_RANLIB" >&6; }
6374 else
6375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6376 $as_echo "no" >&6; }
6377 fi
6378
6379   if test "x$ac_ct_RANLIB" = x; then
6380     RANLIB=":"
6381   else
6382     case $cross_compiling:$ac_tool_warned in
6383 yes:)
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6385 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6386 ac_tool_warned=yes ;;
6387 esac
6388     RANLIB=$ac_ct_RANLIB
6389   fi
6390 else
6391   RANLIB="$ac_cv_prog_RANLIB"
6392 fi
6393
6394 for ac_prog in 'bison -y' byacc
6395 do
6396   # Extract the first word of "$ac_prog", so it can be a program name with args.
6397 set dummy $ac_prog; ac_word=$2
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6399 $as_echo_n "checking for $ac_word... " >&6; }
6400 if test "${ac_cv_prog_YACC+set}" = set; then :
6401   $as_echo_n "(cached) " >&6
6402 else
6403   if test -n "$YACC"; then
6404   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6405 else
6406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6407 for as_dir in $PATH
6408 do
6409   IFS=$as_save_IFS
6410   test -z "$as_dir" && as_dir=.
6411     for ac_exec_ext in '' $ac_executable_extensions; do
6412   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6413     ac_cv_prog_YACC="$ac_prog"
6414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6415     break 2
6416   fi
6417 done
6418   done
6419 IFS=$as_save_IFS
6420
6421 fi
6422 fi
6423 YACC=$ac_cv_prog_YACC
6424 if test -n "$YACC"; then
6425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6426 $as_echo "$YACC" >&6; }
6427 else
6428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429 $as_echo "no" >&6; }
6430 fi
6431
6432
6433   test -n "$YACC" && break
6434 done
6435 test -n "$YACC" || YACC="yacc"
6436
6437
6438 if test -n "$ac_tool_prefix"; then
6439   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6440 set dummy ${ac_tool_prefix}ar; ac_word=$2
6441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442 $as_echo_n "checking for $ac_word... " >&6; }
6443 if test "${ac_cv_prog_AR+set}" = set; then :
6444   $as_echo_n "(cached) " >&6
6445 else
6446   if test -n "$AR"; then
6447   ac_cv_prog_AR="$AR" # Let the user override the test.
6448 else
6449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450 for as_dir in $PATH
6451 do
6452   IFS=$as_save_IFS
6453   test -z "$as_dir" && as_dir=.
6454     for ac_exec_ext in '' $ac_executable_extensions; do
6455   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6456     ac_cv_prog_AR="${ac_tool_prefix}ar"
6457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6458     break 2
6459   fi
6460 done
6461   done
6462 IFS=$as_save_IFS
6463
6464 fi
6465 fi
6466 AR=$ac_cv_prog_AR
6467 if test -n "$AR"; then
6468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6469 $as_echo "$AR" >&6; }
6470 else
6471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472 $as_echo "no" >&6; }
6473 fi
6474
6475
6476 fi
6477 if test -z "$ac_cv_prog_AR"; then
6478   ac_ct_AR=$AR
6479   # Extract the first word of "ar", so it can be a program name with args.
6480 set dummy ar; ac_word=$2
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6482 $as_echo_n "checking for $ac_word... " >&6; }
6483 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6484   $as_echo_n "(cached) " >&6
6485 else
6486   if test -n "$ac_ct_AR"; then
6487   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6488 else
6489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6490 for as_dir in $PATH
6491 do
6492   IFS=$as_save_IFS
6493   test -z "$as_dir" && as_dir=.
6494     for ac_exec_ext in '' $ac_executable_extensions; do
6495   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6496     ac_cv_prog_ac_ct_AR="ar"
6497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6498     break 2
6499   fi
6500 done
6501   done
6502 IFS=$as_save_IFS
6503
6504 fi
6505 fi
6506 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6507 if test -n "$ac_ct_AR"; then
6508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6509 $as_echo "$ac_ct_AR" >&6; }
6510 else
6511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6512 $as_echo "no" >&6; }
6513 fi
6514
6515   if test "x$ac_ct_AR" = x; then
6516     AR=""
6517   else
6518     case $cross_compiling:$ac_tool_warned in
6519 yes:)
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6521 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6522 ac_tool_warned=yes ;;
6523 esac
6524     AR=$ac_ct_AR
6525   fi
6526 else
6527   AR="$ac_cv_prog_AR"
6528 fi
6529
6530 if test -n "$ac_tool_prefix"; then
6531   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6532 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6534 $as_echo_n "checking for $ac_word... " >&6; }
6535 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6536   $as_echo_n "(cached) " >&6
6537 else
6538   if test -n "$DLLTOOL"; then
6539   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6540 else
6541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542 for as_dir in $PATH
6543 do
6544   IFS=$as_save_IFS
6545   test -z "$as_dir" && as_dir=.
6546     for ac_exec_ext in '' $ac_executable_extensions; do
6547   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6548     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6550     break 2
6551   fi
6552 done
6553   done
6554 IFS=$as_save_IFS
6555
6556 fi
6557 fi
6558 DLLTOOL=$ac_cv_prog_DLLTOOL
6559 if test -n "$DLLTOOL"; then
6560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6561 $as_echo "$DLLTOOL" >&6; }
6562 else
6563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564 $as_echo "no" >&6; }
6565 fi
6566
6567
6568 fi
6569 if test -z "$ac_cv_prog_DLLTOOL"; then
6570   ac_ct_DLLTOOL=$DLLTOOL
6571   # Extract the first word of "dlltool", so it can be a program name with args.
6572 set dummy dlltool; ac_word=$2
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574 $as_echo_n "checking for $ac_word... " >&6; }
6575 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6576   $as_echo_n "(cached) " >&6
6577 else
6578   if test -n "$ac_ct_DLLTOOL"; then
6579   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6580 else
6581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6582 for as_dir in $PATH
6583 do
6584   IFS=$as_save_IFS
6585   test -z "$as_dir" && as_dir=.
6586     for ac_exec_ext in '' $ac_executable_extensions; do
6587   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6588     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6590     break 2
6591   fi
6592 done
6593   done
6594 IFS=$as_save_IFS
6595
6596 fi
6597 fi
6598 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6599 if test -n "$ac_ct_DLLTOOL"; then
6600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6601 $as_echo "$ac_ct_DLLTOOL" >&6; }
6602 else
6603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604 $as_echo "no" >&6; }
6605 fi
6606
6607   if test "x$ac_ct_DLLTOOL" = x; then
6608     DLLTOOL=""
6609   else
6610     case $cross_compiling:$ac_tool_warned in
6611 yes:)
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6613 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6614 ac_tool_warned=yes ;;
6615 esac
6616     DLLTOOL=$ac_ct_DLLTOOL
6617   fi
6618 else
6619   DLLTOOL="$ac_cv_prog_DLLTOOL"
6620 fi
6621
6622 if test -n "$ac_tool_prefix"; then
6623   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6624 set dummy ${ac_tool_prefix}windres; ac_word=$2
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6626 $as_echo_n "checking for $ac_word... " >&6; }
6627 if test "${ac_cv_prog_WINDRES+set}" = set; then :
6628   $as_echo_n "(cached) " >&6
6629 else
6630   if test -n "$WINDRES"; then
6631   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6632 else
6633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6634 for as_dir in $PATH
6635 do
6636   IFS=$as_save_IFS
6637   test -z "$as_dir" && as_dir=.
6638     for ac_exec_ext in '' $ac_executable_extensions; do
6639   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6640     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6641     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6642     break 2
6643   fi
6644 done
6645   done
6646 IFS=$as_save_IFS
6647
6648 fi
6649 fi
6650 WINDRES=$ac_cv_prog_WINDRES
6651 if test -n "$WINDRES"; then
6652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6653 $as_echo "$WINDRES" >&6; }
6654 else
6655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656 $as_echo "no" >&6; }
6657 fi
6658
6659
6660 fi
6661 if test -z "$ac_cv_prog_WINDRES"; then
6662   ac_ct_WINDRES=$WINDRES
6663   # Extract the first word of "windres", so it can be a program name with args.
6664 set dummy windres; ac_word=$2
6665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6666 $as_echo_n "checking for $ac_word... " >&6; }
6667 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6668   $as_echo_n "(cached) " >&6
6669 else
6670   if test -n "$ac_ct_WINDRES"; then
6671   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6672 else
6673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674 for as_dir in $PATH
6675 do
6676   IFS=$as_save_IFS
6677   test -z "$as_dir" && as_dir=.
6678     for ac_exec_ext in '' $ac_executable_extensions; do
6679   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6680     ac_cv_prog_ac_ct_WINDRES="windres"
6681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6682     break 2
6683   fi
6684 done
6685   done
6686 IFS=$as_save_IFS
6687
6688 fi
6689 fi
6690 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6691 if test -n "$ac_ct_WINDRES"; then
6692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6693 $as_echo "$ac_ct_WINDRES" >&6; }
6694 else
6695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6696 $as_echo "no" >&6; }
6697 fi
6698
6699   if test "x$ac_ct_WINDRES" = x; then
6700     WINDRES=""
6701   else
6702     case $cross_compiling:$ac_tool_warned in
6703 yes:)
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6705 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6706 ac_tool_warned=yes ;;
6707 esac
6708     WINDRES=$ac_ct_WINDRES
6709   fi
6710 else
6711   WINDRES="$ac_cv_prog_WINDRES"
6712 fi
6713
6714
6715 case $host_os in
6716   gnu*)
6717     # Needed for GNU Hurd hosts.
6718     if test -n "$ac_tool_prefix"; then
6719   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6720 set dummy ${ac_tool_prefix}mig; ac_word=$2
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6722 $as_echo_n "checking for $ac_word... " >&6; }
6723 if test "${ac_cv_prog_MIG+set}" = set; then :
6724   $as_echo_n "(cached) " >&6
6725 else
6726   if test -n "$MIG"; then
6727   ac_cv_prog_MIG="$MIG" # Let the user override the test.
6728 else
6729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6730 for as_dir in $PATH
6731 do
6732   IFS=$as_save_IFS
6733   test -z "$as_dir" && as_dir=.
6734     for ac_exec_ext in '' $ac_executable_extensions; do
6735   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6736     ac_cv_prog_MIG="${ac_tool_prefix}mig"
6737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6738     break 2
6739   fi
6740 done
6741   done
6742 IFS=$as_save_IFS
6743
6744 fi
6745 fi
6746 MIG=$ac_cv_prog_MIG
6747 if test -n "$MIG"; then
6748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6749 $as_echo "$MIG" >&6; }
6750 else
6751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6752 $as_echo "no" >&6; }
6753 fi
6754
6755
6756 fi
6757 if test -z "$ac_cv_prog_MIG"; then
6758   ac_ct_MIG=$MIG
6759   # Extract the first word of "mig", so it can be a program name with args.
6760 set dummy mig; ac_word=$2
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6762 $as_echo_n "checking for $ac_word... " >&6; }
6763 if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6764   $as_echo_n "(cached) " >&6
6765 else
6766   if test -n "$ac_ct_MIG"; then
6767   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6768 else
6769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6770 for as_dir in $PATH
6771 do
6772   IFS=$as_save_IFS
6773   test -z "$as_dir" && as_dir=.
6774     for ac_exec_ext in '' $ac_executable_extensions; do
6775   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6776     ac_cv_prog_ac_ct_MIG="mig"
6777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6778     break 2
6779   fi
6780 done
6781   done
6782 IFS=$as_save_IFS
6783
6784 fi
6785 fi
6786 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6787 if test -n "$ac_ct_MIG"; then
6788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6789 $as_echo "$ac_ct_MIG" >&6; }
6790 else
6791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6792 $as_echo "no" >&6; }
6793 fi
6794
6795   if test "x$ac_ct_MIG" = x; then
6796     MIG=""
6797   else
6798     case $cross_compiling:$ac_tool_warned in
6799 yes:)
6800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6801 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6802 ac_tool_warned=yes ;;
6803 esac
6804     MIG=$ac_ct_MIG
6805   fi
6806 else
6807   MIG="$ac_cv_prog_MIG"
6808 fi
6809
6810     if test x"$MIG" = x; then
6811       as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6812     fi
6813     ;;
6814 esac
6815
6816 # ---------------------- #
6817 # Checks for libraries.  #
6818 # ---------------------- #
6819
6820 # We might need to link with -lm; most simulators need it.
6821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6822 $as_echo_n "checking for main in -lm... " >&6; }
6823 if test "${ac_cv_lib_m_main+set}" = set; then :
6824   $as_echo_n "(cached) " >&6
6825 else
6826   ac_check_lib_save_LIBS=$LIBS
6827 LIBS="-lm  $LIBS"
6828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6829 /* end confdefs.h.  */
6830
6831
6832 int
6833 main ()
6834 {
6835 return main ();
6836   ;
6837   return 0;
6838 }
6839 _ACEOF
6840 if ac_fn_c_try_link "$LINENO"; then :
6841   ac_cv_lib_m_main=yes
6842 else
6843   ac_cv_lib_m_main=no
6844 fi
6845 rm -f core conftest.err conftest.$ac_objext \
6846     conftest$ac_exeext conftest.$ac_ext
6847 LIBS=$ac_check_lib_save_LIBS
6848 fi
6849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6850 $as_echo "$ac_cv_lib_m_main" >&6; }
6851 if test "x$ac_cv_lib_m_main" = x""yes; then :
6852   cat >>confdefs.h <<_ACEOF
6853 #define HAVE_LIBM 1
6854 _ACEOF
6855
6856   LIBS="-lm $LIBS"
6857
6858 fi
6859
6860
6861 # We need to link with -lw to get `wctype' on Solaris before Solaris
6862 # 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
6863 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6864 # is known to have this problem).  Therefore we avoid libw if we can.
6865 ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6866 if test "x$ac_cv_func_wctype" = x""yes; then :
6867
6868 else
6869   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6870 $as_echo_n "checking for wctype in -lw... " >&6; }
6871 if test "${ac_cv_lib_w_wctype+set}" = set; then :
6872   $as_echo_n "(cached) " >&6
6873 else
6874   ac_check_lib_save_LIBS=$LIBS
6875 LIBS="-lw  $LIBS"
6876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6877 /* end confdefs.h.  */
6878
6879 /* Override any GCC internal prototype to avoid an error.
6880    Use char because int might match the return type of a GCC
6881    builtin and then its argument prototype would still apply.  */
6882 #ifdef __cplusplus
6883 extern "C"
6884 #endif
6885 char wctype ();
6886 int
6887 main ()
6888 {
6889 return wctype ();
6890   ;
6891   return 0;
6892 }
6893 _ACEOF
6894 if ac_fn_c_try_link "$LINENO"; then :
6895   ac_cv_lib_w_wctype=yes
6896 else
6897   ac_cv_lib_w_wctype=no
6898 fi
6899 rm -f core conftest.err conftest.$ac_objext \
6900     conftest$ac_exeext conftest.$ac_ext
6901 LIBS=$ac_check_lib_save_LIBS
6902 fi
6903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6904 $as_echo "$ac_cv_lib_w_wctype" >&6; }
6905 if test "x$ac_cv_lib_w_wctype" = x""yes; then :
6906   cat >>confdefs.h <<_ACEOF
6907 #define HAVE_LIBW 1
6908 _ACEOF
6909
6910   LIBS="-lw $LIBS"
6911
6912 fi
6913
6914 fi
6915
6916
6917 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6919 $as_echo_n "checking for library containing gethostbyname... " >&6; }
6920 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6921   $as_echo_n "(cached) " >&6
6922 else
6923   ac_func_search_save_LIBS=$LIBS
6924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6925 /* end confdefs.h.  */
6926
6927 /* Override any GCC internal prototype to avoid an error.
6928    Use char because int might match the return type of a GCC
6929    builtin and then its argument prototype would still apply.  */
6930 #ifdef __cplusplus
6931 extern "C"
6932 #endif
6933 char gethostbyname ();
6934 int
6935 main ()
6936 {
6937 return gethostbyname ();
6938   ;
6939   return 0;
6940 }
6941 _ACEOF
6942 for ac_lib in '' nsl; do
6943   if test -z "$ac_lib"; then
6944     ac_res="none required"
6945   else
6946     ac_res=-l$ac_lib
6947     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6948   fi
6949   if ac_fn_c_try_link "$LINENO"; then :
6950   ac_cv_search_gethostbyname=$ac_res
6951 fi
6952 rm -f core conftest.err conftest.$ac_objext \
6953     conftest$ac_exeext
6954   if test "${ac_cv_search_gethostbyname+set}" = set; then :
6955   break
6956 fi
6957 done
6958 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6959
6960 else
6961   ac_cv_search_gethostbyname=no
6962 fi
6963 rm conftest.$ac_ext
6964 LIBS=$ac_func_search_save_LIBS
6965 fi
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6967 $as_echo "$ac_cv_search_gethostbyname" >&6; }
6968 ac_res=$ac_cv_search_gethostbyname
6969 if test "$ac_res" != no; then :
6970   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6971
6972 fi
6973
6974
6975 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6977 $as_echo_n "checking for library containing socketpair... " >&6; }
6978 if test "${ac_cv_search_socketpair+set}" = set; then :
6979   $as_echo_n "(cached) " >&6
6980 else
6981   ac_func_search_save_LIBS=$LIBS
6982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6983 /* end confdefs.h.  */
6984
6985 /* Override any GCC internal prototype to avoid an error.
6986    Use char because int might match the return type of a GCC
6987    builtin and then its argument prototype would still apply.  */
6988 #ifdef __cplusplus
6989 extern "C"
6990 #endif
6991 char socketpair ();
6992 int
6993 main ()
6994 {
6995 return socketpair ();
6996   ;
6997   return 0;
6998 }
6999 _ACEOF
7000 for ac_lib in '' socket; do
7001   if test -z "$ac_lib"; then
7002     ac_res="none required"
7003   else
7004     ac_res=-l$ac_lib
7005     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7006   fi
7007   if ac_fn_c_try_link "$LINENO"; then :
7008   ac_cv_search_socketpair=$ac_res
7009 fi
7010 rm -f core conftest.err conftest.$ac_objext \
7011     conftest$ac_exeext
7012   if test "${ac_cv_search_socketpair+set}" = set; then :
7013   break
7014 fi
7015 done
7016 if test "${ac_cv_search_socketpair+set}" = set; then :
7017
7018 else
7019   ac_cv_search_socketpair=no
7020 fi
7021 rm conftest.$ac_ext
7022 LIBS=$ac_func_search_save_LIBS
7023 fi
7024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7025 $as_echo "$ac_cv_search_socketpair" >&6; }
7026 ac_res=$ac_cv_search_socketpair
7027 if test "$ac_res" != no; then :
7028   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7029
7030 fi
7031
7032
7033 # Link in zlib if we can.  This allows us to read compressed debug sections.
7034
7035   # Use the system's zlib library.
7036   zlibdir="-L\$(top_builddir)/../zlib"
7037   zlibinc="-I\$(top_srcdir)/../zlib"
7038
7039 # Check whether --with-system-zlib was given.
7040 if test "${with_system_zlib+set}" = set; then :
7041   withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7042     zlibdir=
7043     zlibinc=
7044   fi
7045
7046 fi
7047
7048
7049
7050
7051
7052 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7053 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7055 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7056 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7057   $as_echo_n "(cached) " >&6
7058 else
7059   ac_func_search_save_LIBS=$LIBS
7060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7061 /* end confdefs.h.  */
7062
7063 /* Override any GCC internal prototype to avoid an error.
7064    Use char because int might match the return type of a GCC
7065    builtin and then its argument prototype would still apply.  */
7066 #ifdef __cplusplus
7067 extern "C"
7068 #endif
7069 char kinfo_getvmmap ();
7070 int
7071 main ()
7072 {
7073 return kinfo_getvmmap ();
7074   ;
7075   return 0;
7076 }
7077 _ACEOF
7078 for ac_lib in '' util util-freebsd; do
7079   if test -z "$ac_lib"; then
7080     ac_res="none required"
7081   else
7082     ac_res=-l$ac_lib
7083     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7084   fi
7085   if ac_fn_c_try_link "$LINENO"; then :
7086   ac_cv_search_kinfo_getvmmap=$ac_res
7087 fi
7088 rm -f core conftest.err conftest.$ac_objext \
7089     conftest$ac_exeext
7090   if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7091   break
7092 fi
7093 done
7094 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7095
7096 else
7097   ac_cv_search_kinfo_getvmmap=no
7098 fi
7099 rm conftest.$ac_ext
7100 LIBS=$ac_func_search_save_LIBS
7101 fi
7102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7103 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7104 ac_res=$ac_cv_search_kinfo_getvmmap
7105 if test "$ac_res" != no; then :
7106   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7107
7108 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7109
7110 fi
7111
7112
7113
7114       if test "X$prefix" = "XNONE"; then
7115     acl_final_prefix="$ac_default_prefix"
7116   else
7117     acl_final_prefix="$prefix"
7118   fi
7119   if test "X$exec_prefix" = "XNONE"; then
7120     acl_final_exec_prefix='${prefix}'
7121   else
7122     acl_final_exec_prefix="$exec_prefix"
7123   fi
7124   acl_save_prefix="$prefix"
7125   prefix="$acl_final_prefix"
7126   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7127   prefix="$acl_save_prefix"
7128
7129
7130 # Check whether --with-gnu-ld was given.
7131 if test "${with_gnu_ld+set}" = set; then :
7132   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7133 else
7134   with_gnu_ld=no
7135 fi
7136
7137 # Prepare PATH_SEPARATOR.
7138 # The user is always right.
7139 if test "${PATH_SEPARATOR+set}" != set; then
7140   echo "#! /bin/sh" >conf$$.sh
7141   echo  "exit 0"   >>conf$$.sh
7142   chmod +x conf$$.sh
7143   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7144     PATH_SEPARATOR=';'
7145   else
7146     PATH_SEPARATOR=:
7147   fi
7148   rm -f conf$$.sh
7149 fi
7150 ac_prog=ld
7151 if test "$GCC" = yes; then
7152   # Check if gcc -print-prog-name=ld gives a path.
7153   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7154 $as_echo_n "checking for ld used by GCC... " >&6; }
7155   case $host in
7156   *-*-mingw*)
7157     # gcc leaves a trailing carriage return which upsets mingw
7158     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7159   *)
7160     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7161   esac
7162   case $ac_prog in
7163     # Accept absolute paths.
7164     [\\/]* | [A-Za-z]:[\\/]*)
7165       re_direlt='/[^/][^/]*/\.\./'
7166       # Canonicalize the path of ld
7167       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7168       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7169         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7170       done
7171       test -z "$LD" && LD="$ac_prog"
7172       ;;
7173   "")
7174     # If it fails, then pretend we aren't using GCC.
7175     ac_prog=ld
7176     ;;
7177   *)
7178     # If it is relative, then search for the first ld in PATH.
7179     with_gnu_ld=unknown
7180     ;;
7181   esac
7182 elif test "$with_gnu_ld" = yes; then
7183   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7184 $as_echo_n "checking for GNU ld... " >&6; }
7185 else
7186   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7187 $as_echo_n "checking for non-GNU ld... " >&6; }
7188 fi
7189 if test "${acl_cv_path_LD+set}" = set; then :
7190   $as_echo_n "(cached) " >&6
7191 else
7192   if test -z "$LD"; then
7193   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7194   for ac_dir in $PATH; do
7195     test -z "$ac_dir" && ac_dir=.
7196     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7197       acl_cv_path_LD="$ac_dir/$ac_prog"
7198       # Check to see if the program is GNU ld.  I'd rather use --version,
7199       # but apparently some GNU ld's only accept -v.
7200       # Break only if it was the GNU/non-GNU ld that we prefer.
7201       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7202         test "$with_gnu_ld" != no && break
7203       else
7204         test "$with_gnu_ld" != yes && break
7205       fi
7206     fi
7207   done
7208   IFS="$ac_save_ifs"
7209 else
7210   acl_cv_path_LD="$LD" # Let the user override the test with a path.
7211 fi
7212 fi
7213
7214 LD="$acl_cv_path_LD"
7215 if test -n "$LD"; then
7216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7217 $as_echo "$LD" >&6; }
7218 else
7219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7220 $as_echo "no" >&6; }
7221 fi
7222 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7224 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7225 if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7226   $as_echo_n "(cached) " >&6
7227 else
7228   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7229 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7230   acl_cv_prog_gnu_ld=yes
7231 else
7232   acl_cv_prog_gnu_ld=no
7233 fi
7234 fi
7235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7236 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
7237 with_gnu_ld=$acl_cv_prog_gnu_ld
7238
7239
7240
7241                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7242 $as_echo_n "checking for shared library run path origin... " >&6; }
7243 if test "${acl_cv_rpath+set}" = set; then :
7244   $as_echo_n "(cached) " >&6
7245 else
7246
7247     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7248     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7249     . ./conftest.sh
7250     rm -f ./conftest.sh
7251     acl_cv_rpath=done
7252
7253 fi
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7255 $as_echo "$acl_cv_rpath" >&6; }
7256   wl="$acl_cv_wl"
7257   libext="$acl_cv_libext"
7258   shlibext="$acl_cv_shlibext"
7259   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7260   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7261   hardcode_direct="$acl_cv_hardcode_direct"
7262   hardcode_minus_L="$acl_cv_hardcode_minus_L"
7263     # Check whether --enable-rpath was given.
7264 if test "${enable_rpath+set}" = set; then :
7265   enableval=$enable_rpath; :
7266 else
7267   enable_rpath=yes
7268 fi
7269
7270
7271
7272
7273
7274
7275
7276
7277     use_additional=yes
7278
7279   acl_save_prefix="$prefix"
7280   prefix="$acl_final_prefix"
7281   acl_save_exec_prefix="$exec_prefix"
7282   exec_prefix="$acl_final_exec_prefix"
7283
7284     eval additional_includedir=\"$includedir\"
7285     eval additional_libdir=\"$libdir\"
7286
7287   exec_prefix="$acl_save_exec_prefix"
7288   prefix="$acl_save_prefix"
7289
7290
7291 # Check whether --with-libiconv-prefix was given.
7292 if test "${with_libiconv_prefix+set}" = set; then :
7293   withval=$with_libiconv_prefix;
7294     if test "X$withval" = "Xno"; then
7295       use_additional=no
7296     else
7297       if test "X$withval" = "X"; then
7298
7299   acl_save_prefix="$prefix"
7300   prefix="$acl_final_prefix"
7301   acl_save_exec_prefix="$exec_prefix"
7302   exec_prefix="$acl_final_exec_prefix"
7303
7304           eval additional_includedir=\"$includedir\"
7305           eval additional_libdir=\"$libdir\"
7306
7307   exec_prefix="$acl_save_exec_prefix"
7308   prefix="$acl_save_prefix"
7309
7310       else
7311         additional_includedir="$withval/include"
7312         additional_libdir="$withval/lib"
7313       fi
7314     fi
7315
7316 fi
7317
7318       LIBICONV=
7319   LTLIBICONV=
7320   INCICONV=
7321   rpathdirs=
7322   ltrpathdirs=
7323   names_already_handled=
7324   names_next_round='iconv '
7325   while test -n "$names_next_round"; do
7326     names_this_round="$names_next_round"
7327     names_next_round=
7328     for name in $names_this_round; do
7329       already_handled=
7330       for n in $names_already_handled; do
7331         if test "$n" = "$name"; then
7332           already_handled=yes
7333           break
7334         fi
7335       done
7336       if test -z "$already_handled"; then
7337         names_already_handled="$names_already_handled $name"
7338                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7339         eval value=\"\$HAVE_LIB$uppername\"
7340         if test -n "$value"; then
7341           if test "$value" = yes; then
7342             eval value=\"\$LIB$uppername\"
7343             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7344             eval value=\"\$LTLIB$uppername\"
7345             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7346           else
7347                                     :
7348           fi
7349         else
7350                               found_dir=
7351           found_la=
7352           found_so=
7353           found_a=
7354           if test $use_additional = yes; then
7355             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7356               found_dir="$additional_libdir"
7357               found_so="$additional_libdir/lib$name.$shlibext"
7358               if test -f "$additional_libdir/lib$name.la"; then
7359                 found_la="$additional_libdir/lib$name.la"
7360               fi
7361             else
7362               if test -f "$additional_libdir/lib$name.$libext"; then
7363                 found_dir="$additional_libdir"
7364                 found_a="$additional_libdir/lib$name.$libext"
7365                 if test -f "$additional_libdir/lib$name.la"; then
7366                   found_la="$additional_libdir/lib$name.la"
7367                 fi
7368               fi
7369             fi
7370           fi
7371           if test "X$found_dir" = "X"; then
7372             for x in $LDFLAGS $LTLIBICONV; do
7373
7374   acl_save_prefix="$prefix"
7375   prefix="$acl_final_prefix"
7376   acl_save_exec_prefix="$exec_prefix"
7377   exec_prefix="$acl_final_exec_prefix"
7378   eval x=\"$x\"
7379   exec_prefix="$acl_save_exec_prefix"
7380   prefix="$acl_save_prefix"
7381
7382               case "$x" in
7383                 -L*)
7384                   dir=`echo "X$x" | sed -e 's/^X-L//'`
7385                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7386                     found_dir="$dir"
7387                     found_so="$dir/lib$name.$shlibext"
7388                     if test -f "$dir/lib$name.la"; then
7389                       found_la="$dir/lib$name.la"
7390                     fi
7391                   else
7392                     if test -f "$dir/lib$name.$libext"; then
7393                       found_dir="$dir"
7394                       found_a="$dir/lib$name.$libext"
7395                       if test -f "$dir/lib$name.la"; then
7396                         found_la="$dir/lib$name.la"
7397                       fi
7398                     fi
7399                   fi
7400                   ;;
7401               esac
7402               if test "X$found_dir" != "X"; then
7403                 break
7404               fi
7405             done
7406           fi
7407           if test "X$found_dir" != "X"; then
7408                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7409             if test "X$found_so" != "X"; then
7410                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7411                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7412               else
7413                                                                                 haveit=
7414                 for x in $ltrpathdirs; do
7415                   if test "X$x" = "X$found_dir"; then
7416                     haveit=yes
7417                     break
7418                   fi
7419                 done
7420                 if test -z "$haveit"; then
7421                   ltrpathdirs="$ltrpathdirs $found_dir"
7422                 fi
7423                                 if test "$hardcode_direct" = yes; then
7424                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7425                 else
7426                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7427                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7428                                                             haveit=
7429                     for x in $rpathdirs; do
7430                       if test "X$x" = "X$found_dir"; then
7431                         haveit=yes
7432                         break
7433                       fi
7434                     done
7435                     if test -z "$haveit"; then
7436                       rpathdirs="$rpathdirs $found_dir"
7437                     fi
7438                   else
7439                                                                                 haveit=
7440                     for x in $LDFLAGS $LIBICONV; do
7441
7442   acl_save_prefix="$prefix"
7443   prefix="$acl_final_prefix"
7444   acl_save_exec_prefix="$exec_prefix"
7445   exec_prefix="$acl_final_exec_prefix"
7446   eval x=\"$x\"
7447   exec_prefix="$acl_save_exec_prefix"
7448   prefix="$acl_save_prefix"
7449
7450                       if test "X$x" = "X-L$found_dir"; then
7451                         haveit=yes
7452                         break
7453                       fi
7454                     done
7455                     if test -z "$haveit"; then
7456                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7457                     fi
7458                     if test "$hardcode_minus_L" != no; then
7459                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7460                     else
7461                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7462                     fi
7463                   fi
7464                 fi
7465               fi
7466             else
7467               if test "X$found_a" != "X"; then
7468                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7469               else
7470                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7471               fi
7472             fi
7473                         additional_includedir=
7474             case "$found_dir" in
7475               */lib | */lib/)
7476                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7477                 additional_includedir="$basedir/include"
7478                 ;;
7479             esac
7480             if test "X$additional_includedir" != "X"; then
7481                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
7482                 haveit=
7483                 if test "X$additional_includedir" = "X/usr/local/include"; then
7484                   if test -n "$GCC"; then
7485                     case $host_os in
7486                       linux*) haveit=yes;;
7487                     esac
7488                   fi
7489                 fi
7490                 if test -z "$haveit"; then
7491                   for x in $CPPFLAGS $INCICONV; do
7492
7493   acl_save_prefix="$prefix"
7494   prefix="$acl_final_prefix"
7495   acl_save_exec_prefix="$exec_prefix"
7496   exec_prefix="$acl_final_exec_prefix"
7497   eval x=\"$x\"
7498   exec_prefix="$acl_save_exec_prefix"
7499   prefix="$acl_save_prefix"
7500
7501                     if test "X$x" = "X-I$additional_includedir"; then
7502                       haveit=yes
7503                       break
7504                     fi
7505                   done
7506                   if test -z "$haveit"; then
7507                     if test -d "$additional_includedir"; then
7508                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7509                     fi
7510                   fi
7511                 fi
7512               fi
7513             fi
7514                         if test -n "$found_la"; then
7515                                                         save_libdir="$libdir"
7516               case "$found_la" in
7517                 */* | *\\*) . "$found_la" ;;
7518                 *) . "./$found_la" ;;
7519               esac
7520               libdir="$save_libdir"
7521                             for dep in $dependency_libs; do
7522                 case "$dep" in
7523                   -L*)
7524                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7525                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
7526                       haveit=
7527                       if test "X$additional_libdir" = "X/usr/local/lib"; then
7528                         if test -n "$GCC"; then
7529                           case $host_os in
7530                             linux*) haveit=yes;;
7531                           esac
7532                         fi
7533                       fi
7534                       if test -z "$haveit"; then
7535                         haveit=
7536                         for x in $LDFLAGS $LIBICONV; do
7537
7538   acl_save_prefix="$prefix"
7539   prefix="$acl_final_prefix"
7540   acl_save_exec_prefix="$exec_prefix"
7541   exec_prefix="$acl_final_exec_prefix"
7542   eval x=\"$x\"
7543   exec_prefix="$acl_save_exec_prefix"
7544   prefix="$acl_save_prefix"
7545
7546                           if test "X$x" = "X-L$additional_libdir"; then
7547                             haveit=yes
7548                             break
7549                           fi
7550                         done
7551                         if test -z "$haveit"; then
7552                           if test -d "$additional_libdir"; then
7553                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7554                           fi
7555                         fi
7556                         haveit=
7557                         for x in $LDFLAGS $LTLIBICONV; do
7558
7559   acl_save_prefix="$prefix"
7560   prefix="$acl_final_prefix"
7561   acl_save_exec_prefix="$exec_prefix"
7562   exec_prefix="$acl_final_exec_prefix"
7563   eval x=\"$x\"
7564   exec_prefix="$acl_save_exec_prefix"
7565   prefix="$acl_save_prefix"
7566
7567                           if test "X$x" = "X-L$additional_libdir"; then
7568                             haveit=yes
7569                             break
7570                           fi
7571                         done
7572                         if test -z "$haveit"; then
7573                           if test -d "$additional_libdir"; then
7574                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7575                           fi
7576                         fi
7577                       fi
7578                     fi
7579                     ;;
7580                   -R*)
7581                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
7582                     if test "$enable_rpath" != no; then
7583                                                                   haveit=
7584                       for x in $rpathdirs; do
7585                         if test "X$x" = "X$dir"; then
7586                           haveit=yes
7587                           break
7588                         fi
7589                       done
7590                       if test -z "$haveit"; then
7591                         rpathdirs="$rpathdirs $dir"
7592                       fi
7593                                                                   haveit=
7594                       for x in $ltrpathdirs; do
7595                         if test "X$x" = "X$dir"; then
7596                           haveit=yes
7597                           break
7598                         fi
7599                       done
7600                       if test -z "$haveit"; then
7601                         ltrpathdirs="$ltrpathdirs $dir"
7602                       fi
7603                     fi
7604                     ;;
7605                   -l*)
7606                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7607                     ;;
7608                   *.la)
7609                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7610                     ;;
7611                   *)
7612                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7613                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7614                     ;;
7615                 esac
7616               done
7617             fi
7618           else
7619                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7620             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7621           fi
7622         fi
7623       fi
7624     done
7625   done
7626   if test "X$rpathdirs" != "X"; then
7627     if test -n "$hardcode_libdir_separator"; then
7628                         alldirs=
7629       for found_dir in $rpathdirs; do
7630         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7631       done
7632             acl_save_libdir="$libdir"
7633       libdir="$alldirs"
7634       eval flag=\"$hardcode_libdir_flag_spec\"
7635       libdir="$acl_save_libdir"
7636       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7637     else
7638             for found_dir in $rpathdirs; do
7639         acl_save_libdir="$libdir"
7640         libdir="$found_dir"
7641         eval flag=\"$hardcode_libdir_flag_spec\"
7642         libdir="$acl_save_libdir"
7643         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7644       done
7645     fi
7646   fi
7647   if test "X$ltrpathdirs" != "X"; then
7648             for found_dir in $ltrpathdirs; do
7649       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7650     done
7651   fi
7652
7653
7654
7655
7656
7657
7658
7659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7660 $as_echo_n "checking for iconv... " >&6; }
7661 if test "${am_cv_func_iconv+set}" = set; then :
7662   $as_echo_n "(cached) " >&6
7663 else
7664
7665     am_cv_func_iconv="no, consider installing GNU libiconv"
7666     am_cv_lib_iconv=no
7667                     am_save_CPPFLAGS="$CPPFLAGS"
7668     CPPFLAGS="$CPPFLAGS $INCICONV"
7669     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7670 /* end confdefs.h.  */
7671 #include <stdlib.h>
7672 #include <iconv.h>
7673 int
7674 main ()
7675 {
7676 iconv_t cd = iconv_open("","");
7677        iconv(cd,NULL,NULL,NULL,NULL);
7678        iconv_close(cd);
7679   ;
7680   return 0;
7681 }
7682 _ACEOF
7683 if ac_fn_c_try_link "$LINENO"; then :
7684   am_cv_func_iconv=yes
7685 fi
7686 rm -f core conftest.err conftest.$ac_objext \
7687     conftest$ac_exeext conftest.$ac_ext
7688     CPPFLAGS="$am_save_CPPFLAGS"
7689
7690     if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
7691       for _libs in .libs _libs; do
7692         am_save_CPPFLAGS="$CPPFLAGS"
7693         am_save_LIBS="$LIBS"
7694         CPPFLAGS="$CPPFLAGS -I../libiconv/include"
7695         LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
7696         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7697 /* end confdefs.h.  */
7698 #include <stdlib.h>
7699 #include <iconv.h>
7700 int
7701 main ()
7702 {
7703 iconv_t cd = iconv_open("","");
7704            iconv(cd,NULL,NULL,NULL,NULL);
7705            iconv_close(cd);
7706   ;
7707   return 0;
7708 }
7709 _ACEOF
7710 if ac_fn_c_try_link "$LINENO"; then :
7711   INCICONV="-I../libiconv/include"
7712           LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
7713           LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
7714           am_cv_lib_iconv=yes
7715           am_cv_func_iconv=yes
7716 fi
7717 rm -f core conftest.err conftest.$ac_objext \
7718     conftest$ac_exeext conftest.$ac_ext
7719         CPPFLAGS="$am_save_CPPFLAGS"
7720         LIBS="$am_save_LIBS"
7721         if test "$am_cv_func_iconv" = "yes"; then
7722           break
7723         fi
7724       done
7725     fi
7726
7727     if test "$am_cv_func_iconv" != yes; then
7728       am_save_CPPFLAGS="$CPPFLAGS"
7729       am_save_LIBS="$LIBS"
7730       CPPFLAGS="$LIBS $INCICONV"
7731       LIBS="$LIBS $LIBICONV"
7732       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7733 /* end confdefs.h.  */
7734 #include <stdlib.h>
7735 #include <iconv.h>
7736 int
7737 main ()
7738 {
7739 iconv_t cd = iconv_open("","");
7740          iconv(cd,NULL,NULL,NULL,NULL);
7741          iconv_close(cd);
7742   ;
7743   return 0;
7744 }
7745 _ACEOF
7746 if ac_fn_c_try_link "$LINENO"; then :
7747   am_cv_lib_iconv=yes
7748         am_cv_func_iconv=yes
7749 fi
7750 rm -f core conftest.err conftest.$ac_objext \
7751     conftest$ac_exeext conftest.$ac_ext
7752       CPPFLAGS="$am_save_CPPFLAGS"
7753       LIBS="$am_save_LIBS"
7754     fi
7755
7756 fi
7757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7758 $as_echo "$am_cv_func_iconv" >&6; }
7759   if test "$am_cv_func_iconv" = yes; then
7760
7761 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
7762
7763   fi
7764   if test "$am_cv_lib_iconv" = yes; then
7765
7766   for element in $INCICONV; do
7767     haveit=
7768     for x in $CPPFLAGS; do
7769
7770   acl_save_prefix="$prefix"
7771   prefix="$acl_final_prefix"
7772   acl_save_exec_prefix="$exec_prefix"
7773   exec_prefix="$acl_final_exec_prefix"
7774   eval x=\"$x\"
7775   exec_prefix="$acl_save_exec_prefix"
7776   prefix="$acl_save_prefix"
7777
7778       if test "X$x" = "X$element"; then
7779         haveit=yes
7780         break
7781       fi
7782     done
7783     if test -z "$haveit"; then
7784       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7785     fi
7786   done
7787
7788     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7789 $as_echo_n "checking how to link with libiconv... " >&6; }
7790     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7791 $as_echo "$LIBICONV" >&6; }
7792   else
7793     LIBICONV=
7794     LTLIBICONV=
7795   fi
7796
7797
7798
7799   if test "$am_cv_func_iconv" = yes; then
7800     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7801 $as_echo_n "checking for iconv declaration... " >&6; }
7802     if test "${am_cv_proto_iconv+set}" = set; then :
7803   $as_echo_n "(cached) " >&6
7804 else
7805
7806       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7807 /* end confdefs.h.  */
7808
7809 #include <stdlib.h>
7810 #include <iconv.h>
7811 extern
7812 #ifdef __cplusplus
7813 "C"
7814 #endif
7815 #if defined(__STDC__) || defined(__cplusplus)
7816 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7817 #else
7818 size_t iconv();
7819 #endif
7820
7821 int
7822 main ()
7823 {
7824
7825   ;
7826   return 0;
7827 }
7828 _ACEOF
7829 if ac_fn_c_try_compile "$LINENO"; then :
7830   am_cv_proto_iconv_arg1=""
7831 else
7832   am_cv_proto_iconv_arg1="const"
7833 fi
7834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7835       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);"
7836 fi
7837
7838     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
7839     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
7840          }$am_cv_proto_iconv" >&5
7841 $as_echo "${ac_t:-
7842          }$am_cv_proto_iconv" >&6; }
7843
7844 cat >>confdefs.h <<_ACEOF
7845 #define ICONV_CONST $am_cv_proto_iconv_arg1
7846 _ACEOF
7847
7848   fi
7849
7850
7851 # GDB may fork/exec the iconv program to get the list of supported character
7852 # sets.  Allow the user to specify where to find it.
7853 # There are several factors affecting the choice of option name:
7854 # - There is already --with-libiconv-prefix but we can't use it, it specifies
7855 #   the build-time location of libiconv files.
7856 # - The program we need to find is iconv, which comes with glibc.  The user
7857 #   doesn't necessarily have libiconv installed.  Therefore naming this
7858 #   --with-libiconv-foo feels wrong.
7859 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7860 #   defined to work on directories not files (though it really doesn't know
7861 #   the difference).
7862 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
7863 #   with --with-libiconv-prefix.
7864 # Putting these together is why the option name is --with-iconv-bin.
7865
7866
7867 # Check whether --with-iconv-bin was given.
7868 if test "${with_iconv_bin+set}" = set; then :
7869   withval=$with_iconv_bin; iconv_bin="${withval}"
7870
7871 cat >>confdefs.h <<_ACEOF
7872 #define ICONV_BIN "${iconv_bin}"
7873 _ACEOF
7874
7875
7876   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7877      if test "x$prefix" = xNONE; then
7878         test_prefix=/usr/local
7879      else
7880         test_prefix=$prefix
7881      fi
7882   else
7883      test_prefix=$exec_prefix
7884   fi
7885   value=0
7886   case ${iconv_bin} in
7887      "${test_prefix}"|"${test_prefix}/"*|\
7888         '${exec_prefix}'|'${exec_prefix}/'*)
7889      value=1
7890      ;;
7891   esac
7892
7893 cat >>confdefs.h <<_ACEOF
7894 #define ICONV_BIN_RELOCATABLE $value
7895 _ACEOF
7896
7897
7898
7899 fi
7900
7901
7902 # For the TUI, we need enhanced curses functionality.
7903 if test x"$enable_tui" != xno; then
7904   prefer_curses=yes
7905 fi
7906
7907 curses_found=no
7908 if test x"$prefer_curses" = xyes; then
7909   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7910   # curses library because the latter might not provide all the
7911   # functionality we need.  However, this leads to problems on systems
7912   # where the linker searches /usr/local/lib, but the compiler doesn't
7913   # search /usr/local/include, if ncurses is installed in /usr/local.  A
7914   # default installation of ncurses on alpha*-dec-osf* will lead to such
7915   # a situation.
7916   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7917 $as_echo_n "checking for library containing waddstr... " >&6; }
7918 if test "${ac_cv_search_waddstr+set}" = set; then :
7919   $as_echo_n "(cached) " >&6
7920 else
7921   ac_func_search_save_LIBS=$LIBS
7922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7923 /* end confdefs.h.  */
7924
7925 /* Override any GCC internal prototype to avoid an error.
7926    Use char because int might match the return type of a GCC
7927    builtin and then its argument prototype would still apply.  */
7928 #ifdef __cplusplus
7929 extern "C"
7930 #endif
7931 char waddstr ();
7932 int
7933 main ()
7934 {
7935 return waddstr ();
7936   ;
7937   return 0;
7938 }
7939 _ACEOF
7940 for ac_lib in '' ncurses cursesX curses; do
7941   if test -z "$ac_lib"; then
7942     ac_res="none required"
7943   else
7944     ac_res=-l$ac_lib
7945     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7946   fi
7947   if ac_fn_c_try_link "$LINENO"; then :
7948   ac_cv_search_waddstr=$ac_res
7949 fi
7950 rm -f core conftest.err conftest.$ac_objext \
7951     conftest$ac_exeext
7952   if test "${ac_cv_search_waddstr+set}" = set; then :
7953   break
7954 fi
7955 done
7956 if test "${ac_cv_search_waddstr+set}" = set; then :
7957
7958 else
7959   ac_cv_search_waddstr=no
7960 fi
7961 rm conftest.$ac_ext
7962 LIBS=$ac_func_search_save_LIBS
7963 fi
7964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7965 $as_echo "$ac_cv_search_waddstr" >&6; }
7966 ac_res=$ac_cv_search_waddstr
7967 if test "$ac_res" != no; then :
7968   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7969
7970 fi
7971
7972
7973   if test "$ac_cv_search_waddstr" != no; then
7974     curses_found=yes
7975   fi
7976 fi
7977
7978 # Check whether we should enable the TUI, but only do so if we really
7979 # can.
7980 if test x"$enable_tui" != xno; then
7981   if test -d $srcdir/tui; then
7982     if test "$curses_found" != no; then
7983       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7984       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7985       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7986       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
7987     else
7988       if test x"$enable_tui" = xyes; then
7989         as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
7990       else
7991         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7992 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
7993       fi
7994     fi
7995   fi
7996 fi
7997
7998 # Since GDB uses Readline, we need termcap functionality.  In many
7999 # cases this will be provided by the curses library, but some systems
8000 # have a seperate termcap library, or no curses library at all.
8001
8002 case $host_os in
8003   cygwin*)
8004     if test -d $srcdir/libtermcap; then
8005       LIBS="../libtermcap/libtermcap.a $LIBS"
8006       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8007     fi ;;
8008   go32* | *djgpp*)
8009     ac_cv_search_tgetent="none required"
8010     ;;
8011 esac
8012
8013 # These are the libraries checked by Readline.
8014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8015 $as_echo_n "checking for library containing tgetent... " >&6; }
8016 if test "${ac_cv_search_tgetent+set}" = set; then :
8017   $as_echo_n "(cached) " >&6
8018 else
8019   ac_func_search_save_LIBS=$LIBS
8020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8021 /* end confdefs.h.  */
8022
8023 /* Override any GCC internal prototype to avoid an error.
8024    Use char because int might match the return type of a GCC
8025    builtin and then its argument prototype would still apply.  */
8026 #ifdef __cplusplus
8027 extern "C"
8028 #endif
8029 char tgetent ();
8030 int
8031 main ()
8032 {
8033 return tgetent ();
8034   ;
8035   return 0;
8036 }
8037 _ACEOF
8038 for ac_lib in '' termcap tinfo curses ncurses; do
8039   if test -z "$ac_lib"; then
8040     ac_res="none required"
8041   else
8042     ac_res=-l$ac_lib
8043     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8044   fi
8045   if ac_fn_c_try_link "$LINENO"; then :
8046   ac_cv_search_tgetent=$ac_res
8047 fi
8048 rm -f core conftest.err conftest.$ac_objext \
8049     conftest$ac_exeext
8050   if test "${ac_cv_search_tgetent+set}" = set; then :
8051   break
8052 fi
8053 done
8054 if test "${ac_cv_search_tgetent+set}" = set; then :
8055
8056 else
8057   ac_cv_search_tgetent=no
8058 fi
8059 rm conftest.$ac_ext
8060 LIBS=$ac_func_search_save_LIBS
8061 fi
8062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8063 $as_echo "$ac_cv_search_tgetent" >&6; }
8064 ac_res=$ac_cv_search_tgetent
8065 if test "$ac_res" != no; then :
8066   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8067
8068 fi
8069
8070
8071 if test "$ac_cv_search_tgetent" = no; then
8072   CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8073 fi
8074
8075
8076 # Check whether --with-system-readline was given.
8077 if test "${with_system_readline+set}" = set; then :
8078   withval=$with_system_readline;
8079 fi
8080
8081
8082 if test "$with_system_readline" = yes; then
8083   READLINE=-lreadline
8084   READLINE_DEPS=
8085   READLINE_CFLAGS=
8086   READLINE_TEXI_INCFLAG=
8087 else
8088   READLINE='$(READLINE_DIR)/libreadline.a'
8089   READLINE_DEPS='$(READLINE)'
8090   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
8091   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
8092 fi
8093
8094
8095
8096
8097
8098 # Generate jit-reader.h
8099
8100 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8101 TARGET_PTR=
8102
8103 # The cast to long int works around a bug in the HP C Compiler
8104 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8105 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8106 # This bug is HP SR number 8606223364.
8107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8108 $as_echo_n "checking size of unsigned long long... " >&6; }
8109 if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8110   $as_echo_n "(cached) " >&6
8111 else
8112   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
8113
8114 else
8115   if test "$ac_cv_type_unsigned_long_long" = yes; then
8116      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8117 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8118 { as_fn_set_status 77
8119 as_fn_error "cannot compute sizeof (unsigned long long)
8120 See \`config.log' for more details." "$LINENO" 5; }; }
8121    else
8122      ac_cv_sizeof_unsigned_long_long=0
8123    fi
8124 fi
8125
8126 fi
8127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8128 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8129
8130
8131
8132 cat >>confdefs.h <<_ACEOF
8133 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8134 _ACEOF
8135
8136
8137 # The cast to long int works around a bug in the HP C Compiler
8138 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8139 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8140 # This bug is HP SR number 8606223364.
8141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8142 $as_echo_n "checking size of unsigned long... " >&6; }
8143 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8144   $as_echo_n "(cached) " >&6
8145 else
8146   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
8147
8148 else
8149   if test "$ac_cv_type_unsigned_long" = yes; then
8150      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8151 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8152 { as_fn_set_status 77
8153 as_fn_error "cannot compute sizeof (unsigned long)
8154 See \`config.log' for more details." "$LINENO" 5; }; }
8155    else
8156      ac_cv_sizeof_unsigned_long=0
8157    fi
8158 fi
8159
8160 fi
8161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8162 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8163
8164
8165
8166 cat >>confdefs.h <<_ACEOF
8167 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8168 _ACEOF
8169
8170
8171 # The cast to long int works around a bug in the HP C Compiler
8172 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8173 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8174 # This bug is HP SR number 8606223364.
8175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8176 $as_echo_n "checking size of unsigned __int128... " >&6; }
8177 if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8178   $as_echo_n "(cached) " >&6
8179 else
8180   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
8181
8182 else
8183   if test "$ac_cv_type_unsigned___int128" = yes; then
8184      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8185 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8186 { as_fn_set_status 77
8187 as_fn_error "cannot compute sizeof (unsigned __int128)
8188 See \`config.log' for more details." "$LINENO" 5; }; }
8189    else
8190      ac_cv_sizeof_unsigned___int128=0
8191    fi
8192 fi
8193
8194 fi
8195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
8196 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
8197
8198
8199
8200 cat >>confdefs.h <<_ACEOF
8201 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
8202 _ACEOF
8203
8204
8205
8206 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
8207   TARGET_PTR="unsigned long"
8208 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
8209   TARGET_PTR="unsigned long long"
8210 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
8211   TARGET_PTR="unsigned __int128"
8212 else
8213   TARGET_PTR="unsigned long"
8214 fi
8215
8216
8217 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
8218
8219
8220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8221 $as_echo_n "checking for library containing dlopen... " >&6; }
8222 if test "${ac_cv_search_dlopen+set}" = set; then :
8223   $as_echo_n "(cached) " >&6
8224 else
8225   ac_func_search_save_LIBS=$LIBS
8226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8227 /* end confdefs.h.  */
8228
8229 /* Override any GCC internal prototype to avoid an error.
8230    Use char because int might match the return type of a GCC
8231    builtin and then its argument prototype would still apply.  */
8232 #ifdef __cplusplus
8233 extern "C"
8234 #endif
8235 char dlopen ();
8236 int
8237 main ()
8238 {
8239 return dlopen ();
8240   ;
8241   return 0;
8242 }
8243 _ACEOF
8244 for ac_lib in '' dl; do
8245   if test -z "$ac_lib"; then
8246     ac_res="none required"
8247   else
8248     ac_res=-l$ac_lib
8249     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8250   fi
8251   if ac_fn_c_try_link "$LINENO"; then :
8252   ac_cv_search_dlopen=$ac_res
8253 fi
8254 rm -f core conftest.err conftest.$ac_objext \
8255     conftest$ac_exeext
8256   if test "${ac_cv_search_dlopen+set}" = set; then :
8257   break
8258 fi
8259 done
8260 if test "${ac_cv_search_dlopen+set}" = set; then :
8261
8262 else
8263   ac_cv_search_dlopen=no
8264 fi
8265 rm conftest.$ac_ext
8266 LIBS=$ac_func_search_save_LIBS
8267 fi
8268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8269 $as_echo "$ac_cv_search_dlopen" >&6; }
8270 ac_res=$ac_cv_search_dlopen
8271 if test "$ac_res" != no; then :
8272   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8273
8274 fi
8275
8276
8277
8278
8279 # Check whether --with-jit-reader-dir was given.
8280 if test "${with_jit_reader_dir+set}" = set; then :
8281   withval=$with_jit_reader_dir;
8282     JIT_READER_DIR=$withval
8283 else
8284   JIT_READER_DIR=${libdir}/gdb
8285 fi
8286
8287
8288   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8289   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8290   ac_define_dir=`eval echo $JIT_READER_DIR`
8291   ac_define_dir=`eval echo $ac_define_dir`
8292
8293 cat >>confdefs.h <<_ACEOF
8294 #define JIT_READER_DIR "$ac_define_dir"
8295 _ACEOF
8296
8297
8298
8299
8300   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8301      if test "x$prefix" = xNONE; then
8302         test_prefix=/usr/local
8303      else
8304         test_prefix=$prefix
8305      fi
8306   else
8307      test_prefix=$exec_prefix
8308   fi
8309   value=0
8310   case ${ac_define_dir} in
8311      "${test_prefix}"|"${test_prefix}/"*|\
8312         '${exec_prefix}'|'${exec_prefix}/'*)
8313      value=1
8314      ;;
8315   esac
8316
8317 cat >>confdefs.h <<_ACEOF
8318 #define JIT_READER_DIR_RELOCATABLE $value
8319 _ACEOF
8320
8321
8322
8323
8324
8325 # Check whether --with-expat was given.
8326 if test "${with_expat+set}" = set; then :
8327   withval=$with_expat;
8328 else
8329   with_expat=auto
8330 fi
8331
8332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8333 $as_echo_n "checking whether to use expat... " >&6; }
8334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8335 $as_echo "$with_expat" >&6; }
8336
8337 if test "${with_expat}" = no; then
8338   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8339 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
8340   HAVE_LIBEXPAT=no
8341 else
8342
8343
8344
8345
8346
8347
8348
8349
8350     use_additional=yes
8351
8352   acl_save_prefix="$prefix"
8353   prefix="$acl_final_prefix"
8354   acl_save_exec_prefix="$exec_prefix"
8355   exec_prefix="$acl_final_exec_prefix"
8356
8357     eval additional_includedir=\"$includedir\"
8358     eval additional_libdir=\"$libdir\"
8359
8360   exec_prefix="$acl_save_exec_prefix"
8361   prefix="$acl_save_prefix"
8362
8363
8364 # Check whether --with-libexpat-prefix was given.
8365 if test "${with_libexpat_prefix+set}" = set; then :
8366   withval=$with_libexpat_prefix;
8367     if test "X$withval" = "Xno"; then
8368       use_additional=no
8369     else
8370       if test "X$withval" = "X"; then
8371
8372   acl_save_prefix="$prefix"
8373   prefix="$acl_final_prefix"
8374   acl_save_exec_prefix="$exec_prefix"
8375   exec_prefix="$acl_final_exec_prefix"
8376
8377           eval additional_includedir=\"$includedir\"
8378           eval additional_libdir=\"$libdir\"
8379
8380   exec_prefix="$acl_save_exec_prefix"
8381   prefix="$acl_save_prefix"
8382
8383       else
8384         additional_includedir="$withval/include"
8385         additional_libdir="$withval/lib"
8386       fi
8387     fi
8388
8389 fi
8390
8391       LIBEXPAT=
8392   LTLIBEXPAT=
8393   INCEXPAT=
8394   rpathdirs=
8395   ltrpathdirs=
8396   names_already_handled=
8397   names_next_round='expat '
8398   while test -n "$names_next_round"; do
8399     names_this_round="$names_next_round"
8400     names_next_round=
8401     for name in $names_this_round; do
8402       already_handled=
8403       for n in $names_already_handled; do
8404         if test "$n" = "$name"; then
8405           already_handled=yes
8406           break
8407         fi
8408       done
8409       if test -z "$already_handled"; then
8410         names_already_handled="$names_already_handled $name"
8411                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8412         eval value=\"\$HAVE_LIB$uppername\"
8413         if test -n "$value"; then
8414           if test "$value" = yes; then
8415             eval value=\"\$LIB$uppername\"
8416             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8417             eval value=\"\$LTLIB$uppername\"
8418             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8419           else
8420                                     :
8421           fi
8422         else
8423                               found_dir=
8424           found_la=
8425           found_so=
8426           found_a=
8427           if test $use_additional = yes; then
8428             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8429               found_dir="$additional_libdir"
8430               found_so="$additional_libdir/lib$name.$shlibext"
8431               if test -f "$additional_libdir/lib$name.la"; then
8432                 found_la="$additional_libdir/lib$name.la"
8433               fi
8434             else
8435               if test -f "$additional_libdir/lib$name.$libext"; then
8436                 found_dir="$additional_libdir"
8437                 found_a="$additional_libdir/lib$name.$libext"
8438                 if test -f "$additional_libdir/lib$name.la"; then
8439                   found_la="$additional_libdir/lib$name.la"
8440                 fi
8441               fi
8442             fi
8443           fi
8444           if test "X$found_dir" = "X"; then
8445             for x in $LDFLAGS $LTLIBEXPAT; do
8446
8447   acl_save_prefix="$prefix"
8448   prefix="$acl_final_prefix"
8449   acl_save_exec_prefix="$exec_prefix"
8450   exec_prefix="$acl_final_exec_prefix"
8451   eval x=\"$x\"
8452   exec_prefix="$acl_save_exec_prefix"
8453   prefix="$acl_save_prefix"
8454
8455               case "$x" in
8456                 -L*)
8457                   dir=`echo "X$x" | sed -e 's/^X-L//'`
8458                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8459                     found_dir="$dir"
8460                     found_so="$dir/lib$name.$shlibext"
8461                     if test -f "$dir/lib$name.la"; then
8462                       found_la="$dir/lib$name.la"
8463                     fi
8464                   else
8465                     if test -f "$dir/lib$name.$libext"; then
8466                       found_dir="$dir"
8467                       found_a="$dir/lib$name.$libext"
8468                       if test -f "$dir/lib$name.la"; then
8469                         found_la="$dir/lib$name.la"
8470                       fi
8471                     fi
8472                   fi
8473                   ;;
8474               esac
8475               if test "X$found_dir" != "X"; then
8476                 break
8477               fi
8478             done
8479           fi
8480           if test "X$found_dir" != "X"; then
8481                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8482             if test "X$found_so" != "X"; then
8483                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8484                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8485               else
8486                                                                                 haveit=
8487                 for x in $ltrpathdirs; do
8488                   if test "X$x" = "X$found_dir"; then
8489                     haveit=yes
8490                     break
8491                   fi
8492                 done
8493                 if test -z "$haveit"; then
8494                   ltrpathdirs="$ltrpathdirs $found_dir"
8495                 fi
8496                                 if test "$hardcode_direct" = yes; then
8497                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8498                 else
8499                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8500                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8501                                                             haveit=
8502                     for x in $rpathdirs; do
8503                       if test "X$x" = "X$found_dir"; then
8504                         haveit=yes
8505                         break
8506                       fi
8507                     done
8508                     if test -z "$haveit"; then
8509                       rpathdirs="$rpathdirs $found_dir"
8510                     fi
8511                   else
8512                                                                                 haveit=
8513                     for x in $LDFLAGS $LIBEXPAT; do
8514
8515   acl_save_prefix="$prefix"
8516   prefix="$acl_final_prefix"
8517   acl_save_exec_prefix="$exec_prefix"
8518   exec_prefix="$acl_final_exec_prefix"
8519   eval x=\"$x\"
8520   exec_prefix="$acl_save_exec_prefix"
8521   prefix="$acl_save_prefix"
8522
8523                       if test "X$x" = "X-L$found_dir"; then
8524                         haveit=yes
8525                         break
8526                       fi
8527                     done
8528                     if test -z "$haveit"; then
8529                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8530                     fi
8531                     if test "$hardcode_minus_L" != no; then
8532                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8533                     else
8534                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8535                     fi
8536                   fi
8537                 fi
8538               fi
8539             else
8540               if test "X$found_a" != "X"; then
8541                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8542               else
8543                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8544               fi
8545             fi
8546                         additional_includedir=
8547             case "$found_dir" in
8548               */lib | */lib/)
8549                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8550                 additional_includedir="$basedir/include"
8551                 ;;
8552             esac
8553             if test "X$additional_includedir" != "X"; then
8554                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
8555                 haveit=
8556                 if test "X$additional_includedir" = "X/usr/local/include"; then
8557                   if test -n "$GCC"; then
8558                     case $host_os in
8559                       linux*) haveit=yes;;
8560                     esac
8561                   fi
8562                 fi
8563                 if test -z "$haveit"; then
8564                   for x in $CPPFLAGS $INCEXPAT; do
8565
8566   acl_save_prefix="$prefix"
8567   prefix="$acl_final_prefix"
8568   acl_save_exec_prefix="$exec_prefix"
8569   exec_prefix="$acl_final_exec_prefix"
8570   eval x=\"$x\"
8571   exec_prefix="$acl_save_exec_prefix"
8572   prefix="$acl_save_prefix"
8573
8574                     if test "X$x" = "X-I$additional_includedir"; then
8575                       haveit=yes
8576                       break
8577                     fi
8578                   done
8579                   if test -z "$haveit"; then
8580                     if test -d "$additional_includedir"; then
8581                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8582                     fi
8583                   fi
8584                 fi
8585               fi
8586             fi
8587                         if test -n "$found_la"; then
8588                                                         save_libdir="$libdir"
8589               case "$found_la" in
8590                 */* | *\\*) . "$found_la" ;;
8591                 *) . "./$found_la" ;;
8592               esac
8593               libdir="$save_libdir"
8594                             for dep in $dependency_libs; do
8595                 case "$dep" in
8596                   -L*)
8597                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8598                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
8599                       haveit=
8600                       if test "X$additional_libdir" = "X/usr/local/lib"; then
8601                         if test -n "$GCC"; then
8602                           case $host_os in
8603                             linux*) haveit=yes;;
8604                           esac
8605                         fi
8606                       fi
8607                       if test -z "$haveit"; then
8608                         haveit=
8609                         for x in $LDFLAGS $LIBEXPAT; do
8610
8611   acl_save_prefix="$prefix"
8612   prefix="$acl_final_prefix"
8613   acl_save_exec_prefix="$exec_prefix"
8614   exec_prefix="$acl_final_exec_prefix"
8615   eval x=\"$x\"
8616   exec_prefix="$acl_save_exec_prefix"
8617   prefix="$acl_save_prefix"
8618
8619                           if test "X$x" = "X-L$additional_libdir"; then
8620                             haveit=yes
8621                             break
8622                           fi
8623                         done
8624                         if test -z "$haveit"; then
8625                           if test -d "$additional_libdir"; then
8626                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8627                           fi
8628                         fi
8629                         haveit=
8630                         for x in $LDFLAGS $LTLIBEXPAT; do
8631
8632   acl_save_prefix="$prefix"
8633   prefix="$acl_final_prefix"
8634   acl_save_exec_prefix="$exec_prefix"
8635   exec_prefix="$acl_final_exec_prefix"
8636   eval x=\"$x\"
8637   exec_prefix="$acl_save_exec_prefix"
8638   prefix="$acl_save_prefix"
8639
8640                           if test "X$x" = "X-L$additional_libdir"; then
8641                             haveit=yes
8642                             break
8643                           fi
8644                         done
8645                         if test -z "$haveit"; then
8646                           if test -d "$additional_libdir"; then
8647                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8648                           fi
8649                         fi
8650                       fi
8651                     fi
8652                     ;;
8653                   -R*)
8654                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
8655                     if test "$enable_rpath" != no; then
8656                                                                   haveit=
8657                       for x in $rpathdirs; do
8658                         if test "X$x" = "X$dir"; then
8659                           haveit=yes
8660                           break
8661                         fi
8662                       done
8663                       if test -z "$haveit"; then
8664                         rpathdirs="$rpathdirs $dir"
8665                       fi
8666                                                                   haveit=
8667                       for x in $ltrpathdirs; do
8668                         if test "X$x" = "X$dir"; then
8669                           haveit=yes
8670                           break
8671                         fi
8672                       done
8673                       if test -z "$haveit"; then
8674                         ltrpathdirs="$ltrpathdirs $dir"
8675                       fi
8676                     fi
8677                     ;;
8678                   -l*)
8679                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8680                     ;;
8681                   *.la)
8682                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8683                     ;;
8684                   *)
8685                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8686                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8687                     ;;
8688                 esac
8689               done
8690             fi
8691           else
8692                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8693             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8694           fi
8695         fi
8696       fi
8697     done
8698   done
8699   if test "X$rpathdirs" != "X"; then
8700     if test -n "$hardcode_libdir_separator"; then
8701                         alldirs=
8702       for found_dir in $rpathdirs; do
8703         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8704       done
8705             acl_save_libdir="$libdir"
8706       libdir="$alldirs"
8707       eval flag=\"$hardcode_libdir_flag_spec\"
8708       libdir="$acl_save_libdir"
8709       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8710     else
8711             for found_dir in $rpathdirs; do
8712         acl_save_libdir="$libdir"
8713         libdir="$found_dir"
8714         eval flag=\"$hardcode_libdir_flag_spec\"
8715         libdir="$acl_save_libdir"
8716         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8717       done
8718     fi
8719   fi
8720   if test "X$ltrpathdirs" != "X"; then
8721             for found_dir in $ltrpathdirs; do
8722       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8723     done
8724   fi
8725
8726
8727         ac_save_CPPFLAGS="$CPPFLAGS"
8728
8729   for element in $INCEXPAT; do
8730     haveit=
8731     for x in $CPPFLAGS; do
8732
8733   acl_save_prefix="$prefix"
8734   prefix="$acl_final_prefix"
8735   acl_save_exec_prefix="$exec_prefix"
8736   exec_prefix="$acl_final_exec_prefix"
8737   eval x=\"$x\"
8738   exec_prefix="$acl_save_exec_prefix"
8739   prefix="$acl_save_prefix"
8740
8741       if test "X$x" = "X$element"; then
8742         haveit=yes
8743         break
8744       fi
8745     done
8746     if test -z "$haveit"; then
8747       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8748     fi
8749   done
8750
8751
8752   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8753 $as_echo_n "checking for libexpat... " >&6; }
8754 if test "${ac_cv_libexpat+set}" = set; then :
8755   $as_echo_n "(cached) " >&6
8756 else
8757
8758     ac_save_LIBS="$LIBS"
8759     LIBS="$LIBS $LIBEXPAT"
8760     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8761 /* end confdefs.h.  */
8762 #include "expat.h"
8763 int
8764 main ()
8765 {
8766 XML_Parser p = XML_ParserCreate (0);
8767   ;
8768   return 0;
8769 }
8770 _ACEOF
8771 if ac_fn_c_try_link "$LINENO"; then :
8772   ac_cv_libexpat=yes
8773 else
8774   ac_cv_libexpat=no
8775 fi
8776 rm -f core conftest.err conftest.$ac_objext \
8777     conftest$ac_exeext conftest.$ac_ext
8778     LIBS="$ac_save_LIBS"
8779
8780 fi
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8782 $as_echo "$ac_cv_libexpat" >&6; }
8783   if test "$ac_cv_libexpat" = yes; then
8784     HAVE_LIBEXPAT=yes
8785
8786 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
8787
8788     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8789 $as_echo_n "checking how to link with libexpat... " >&6; }
8790     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8791 $as_echo "$LIBEXPAT" >&6; }
8792   else
8793     HAVE_LIBEXPAT=no
8794             CPPFLAGS="$ac_save_CPPFLAGS"
8795     LIBEXPAT=
8796     LTLIBEXPAT=
8797   fi
8798
8799
8800
8801
8802
8803
8804   if test "$HAVE_LIBEXPAT" != yes; then
8805     if test "$with_expat" = yes; then
8806       as_fn_error "expat is missing or unusable" "$LINENO" 5
8807     else
8808       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8809 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8810     fi
8811   else
8812     save_LIBS=$LIBS
8813     LIBS="$LIBS $LIBEXPAT"
8814     for ac_func in XML_StopParser
8815 do :
8816   ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8817 if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
8818   cat >>confdefs.h <<_ACEOF
8819 #define HAVE_XML_STOPPARSER 1
8820 _ACEOF
8821
8822 fi
8823 done
8824
8825     LIBS=$save_LIBS
8826   fi
8827 fi
8828
8829 # --------------------- #
8830 # Check for libpython.  #
8831 # --------------------- #
8832
8833
8834
8835
8836
8837
8838 # Check whether --with-python was given.
8839 if test "${with_python+set}" = set; then :
8840   withval=$with_python;
8841 else
8842   with_python=auto
8843 fi
8844
8845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8846 $as_echo_n "checking whether to use python... " >&6; }
8847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8848 $as_echo "$with_python" >&6; }
8849
8850 if test "${with_python}" = no; then
8851   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8852 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8853   have_libpython=no
8854 else
8855   case "${with_python}" in
8856   [\\/]* | ?:[\\/]*)
8857     if test -d ${with_python}; then
8858       # Assume the python binary is ${with_python}/bin/python.
8859       python_prog="${with_python}/bin/python"
8860       python_prefix=
8861       # If python does not exit ${with_python}/bin, then try in
8862       # ${with_python}.  On Windows/MinGW, this is where the Python
8863       # executable is.
8864       if test ! -x "${python_prog}"; then
8865         python_prog="${with_python}/python"
8866         python_prefix=
8867       fi
8868       if test ! -x "${python_prog}"; then
8869         # Fall back to gdb 7.0/7.1 behaviour.
8870         python_prog=missing
8871         python_prefix=${with_python}
8872       fi
8873     elif test -x "${with_python}"; then
8874       # While we can't run python compiled for $host (unless host == build),
8875       # the user could write a script that provides the needed information,
8876       # so we support that.
8877       python_prog=${with_python}
8878       python_prefix=
8879     else
8880       as_fn_error "invalid value for --with-python" "$LINENO" 5
8881     fi
8882     ;;
8883   */*)
8884     # Disallow --with-python=foo/bar.
8885     as_fn_error "invalid value for --with-python" "$LINENO" 5
8886     ;;
8887   *)
8888     # The user has either specified auto, yes, or the name of the python
8889     # program assumed to be in $PATH.
8890     python_prefix=
8891     case "${with_python}" in
8892     yes | auto)
8893       if test ${build} = ${host}; then
8894         # Extract the first word of "python", so it can be a program name with args.
8895 set dummy python; ac_word=$2
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897 $as_echo_n "checking for $ac_word... " >&6; }
8898 if test "${ac_cv_path_python_prog_path+set}" = set; then :
8899   $as_echo_n "(cached) " >&6
8900 else
8901   case $python_prog_path in
8902   [\\/]* | ?:[\\/]*)
8903   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8904   ;;
8905   *)
8906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907 for as_dir in $PATH
8908 do
8909   IFS=$as_save_IFS
8910   test -z "$as_dir" && as_dir=.
8911     for ac_exec_ext in '' $ac_executable_extensions; do
8912   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8913     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915     break 2
8916   fi
8917 done
8918   done
8919 IFS=$as_save_IFS
8920
8921   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8922   ;;
8923 esac
8924 fi
8925 python_prog_path=$ac_cv_path_python_prog_path
8926 if test -n "$python_prog_path"; then
8927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8928 $as_echo "$python_prog_path" >&6; }
8929 else
8930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8931 $as_echo "no" >&6; }
8932 fi
8933
8934
8935         if test "${python_prog_path}" = missing; then
8936           python_prog=missing
8937         else
8938           python_prog=${python_prog_path}
8939         fi
8940       else
8941         # Not much we can do except assume the cross-compiler will find the
8942         # right files.
8943         python_prog=missing
8944       fi
8945       ;;
8946     *)
8947       # While we can't run python compiled for $host (unless host == build),
8948       # the user could write a script that provides the needed information,
8949       # so we support that.
8950       python_prog="${with_python}"
8951       # Extract the first word of "${python_prog}", so it can be a program name with args.
8952 set dummy ${python_prog}; ac_word=$2
8953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8954 $as_echo_n "checking for $ac_word... " >&6; }
8955 if test "${ac_cv_path_python_prog_path+set}" = set; then :
8956   $as_echo_n "(cached) " >&6
8957 else
8958   case $python_prog_path in
8959   [\\/]* | ?:[\\/]*)
8960   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8961   ;;
8962   *)
8963   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8964 for as_dir in $PATH
8965 do
8966   IFS=$as_save_IFS
8967   test -z "$as_dir" && as_dir=.
8968     for ac_exec_ext in '' $ac_executable_extensions; do
8969   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8970     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8972     break 2
8973   fi
8974 done
8975   done
8976 IFS=$as_save_IFS
8977
8978   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8979   ;;
8980 esac
8981 fi
8982 python_prog_path=$ac_cv_path_python_prog_path
8983 if test -n "$python_prog_path"; then
8984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8985 $as_echo "$python_prog_path" >&6; }
8986 else
8987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8988 $as_echo "no" >&6; }
8989 fi
8990
8991
8992       if test "${python_prog_path}" = missing; then
8993         as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8994       fi
8995       ;;
8996     esac
8997   esac
8998
8999   if test "${python_prog}" != missing; then
9000     # We have a python program to use, but it may be too old.
9001     # Don't flag an error for --with-python=auto (the default).
9002     have_python_config=yes
9003     python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9004     if test $? != 0; then
9005       have_python_config=failed
9006       if test "${with_python}" != auto; then
9007         as_fn_error "failure running python-config --includes" "$LINENO" 5
9008       fi
9009     fi
9010     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9011     if test $? != 0; then
9012       have_python_config=failed
9013       if test "${with_python}" != auto; then
9014         as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9015       fi
9016     fi
9017     python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9018     if test $? != 0; then
9019       have_python_config=failed
9020       if test "${with_python}" != auto; then
9021         as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9022       fi
9023     fi
9024   else
9025     # We do not have a python executable we can use to determine where
9026     # to find the Python headers and libs.  We cannot guess the include
9027     # path from the python_prefix either, because that include path
9028     # depends on the Python version.  So, there is nothing much we can
9029     # do except assume that the compiler will be able to find those files.
9030     python_includes=
9031     python_libs=
9032     have_python_config=no
9033   fi
9034
9035   # If we have python-config, only try the configuration it provides.
9036   # Otherwise fallback on the old way of trying different versions of
9037   # python in turn.
9038
9039   have_libpython=no
9040   if test "${have_python_config}" = yes; then
9041     # Determine the Python version by extracting "-lpython<version>"
9042     # part of the python_libs. <version> is usually X.Y with X and Y
9043     # being decimal numbers, but can also be XY (seen on Windows).
9044     #
9045     # The extraction is performed using sed with a regular expression.
9046     # Initially, the regexp used was using the '?' quantifier to make
9047     # the dot in the version number optional.  Unfortunately, this
9048     # does not work with non-GNU versions of sed because, because of
9049     # what looks like a limitation (the '?' quantifier does not work
9050     # with back-references).  We work around this limitation by using
9051     # the '*' quantifier instead.  It means that, in theory, we might
9052     # match unexpected version strings such as "-lpython2..7", but
9053     # this seems unlikely in practice.  And even if that happens,
9054     # an error will be triggered later on, when checking that version
9055     # number.
9056     python_version=`echo " ${python_libs} " \
9057                          | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
9058     case "${python_version}" in
9059     python*)
9060
9061   version=${python_version}
9062
9063   new_CPPFLAGS=${python_includes}
9064   new_LIBS=${python_libs}
9065   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9066 $as_echo_n "checking for ${version}... " >&6; }
9067   save_CPPFLAGS=$CPPFLAGS
9068   save_LIBS=$LIBS
9069   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9070   LIBS="$LIBS $new_LIBS"
9071   found_usable_python=no
9072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9073 /* end confdefs.h.  */
9074 #include "Python.h"
9075 int
9076 main ()
9077 {
9078 Py_Initialize ();
9079   ;
9080   return 0;
9081 }
9082 _ACEOF
9083 if ac_fn_c_try_link "$LINENO"; then :
9084   have_libpython=${version}
9085                   found_usable_python=yes
9086                   PYTHON_CPPFLAGS=$new_CPPFLAGS
9087                   PYTHON_LIBS=$new_LIBS
9088 fi
9089 rm -f core conftest.err conftest.$ac_objext \
9090     conftest$ac_exeext conftest.$ac_ext
9091   CPPFLAGS=$save_CPPFLAGS
9092   LIBS=$save_LIBS
9093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9094 $as_echo "${found_usable_python}" >&6; }
9095
9096       ;;
9097     *)
9098       as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
9099       ;;
9100     esac
9101   elif test "${have_python_config}" != failed; then
9102     if test "${have_libpython}" = no; then
9103
9104   version=python2.7
9105
9106   new_CPPFLAGS=${python_includes}
9107   new_LIBS="${python_libs} -lpython2.7"
9108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9109 $as_echo_n "checking for ${version}... " >&6; }
9110   save_CPPFLAGS=$CPPFLAGS
9111   save_LIBS=$LIBS
9112   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9113   LIBS="$LIBS $new_LIBS"
9114   found_usable_python=no
9115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9116 /* end confdefs.h.  */
9117 #include "Python.h"
9118 int
9119 main ()
9120 {
9121 Py_Initialize ();
9122   ;
9123   return 0;
9124 }
9125 _ACEOF
9126 if ac_fn_c_try_link "$LINENO"; then :
9127   have_libpython=${version}
9128                   found_usable_python=yes
9129                   PYTHON_CPPFLAGS=$new_CPPFLAGS
9130                   PYTHON_LIBS=$new_LIBS
9131 fi
9132 rm -f core conftest.err conftest.$ac_objext \
9133     conftest$ac_exeext conftest.$ac_ext
9134   CPPFLAGS=$save_CPPFLAGS
9135   LIBS=$save_LIBS
9136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9137 $as_echo "${found_usable_python}" >&6; }
9138
9139     fi
9140     if test "${have_libpython}" = no; then
9141
9142   version=python2.6
9143
9144   new_CPPFLAGS=${python_includes}
9145   new_LIBS="${python_libs} -lpython2.6"
9146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9147 $as_echo_n "checking for ${version}... " >&6; }
9148   save_CPPFLAGS=$CPPFLAGS
9149   save_LIBS=$LIBS
9150   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9151   LIBS="$LIBS $new_LIBS"
9152   found_usable_python=no
9153   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9154 /* end confdefs.h.  */
9155 #include "Python.h"
9156 int
9157 main ()
9158 {
9159 Py_Initialize ();
9160   ;
9161   return 0;
9162 }
9163 _ACEOF
9164 if ac_fn_c_try_link "$LINENO"; then :
9165   have_libpython=${version}
9166                   found_usable_python=yes
9167                   PYTHON_CPPFLAGS=$new_CPPFLAGS
9168                   PYTHON_LIBS=$new_LIBS
9169 fi
9170 rm -f core conftest.err conftest.$ac_objext \
9171     conftest$ac_exeext conftest.$ac_ext
9172   CPPFLAGS=$save_CPPFLAGS
9173   LIBS=$save_LIBS
9174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9175 $as_echo "${found_usable_python}" >&6; }
9176
9177     fi
9178     if test ${have_libpython} = no; then
9179
9180   version=python2.5
9181
9182   new_CPPFLAGS=${python_includes}
9183   new_LIBS="${python_libs} -lpython2.5"
9184   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9185 $as_echo_n "checking for ${version}... " >&6; }
9186   save_CPPFLAGS=$CPPFLAGS
9187   save_LIBS=$LIBS
9188   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9189   LIBS="$LIBS $new_LIBS"
9190   found_usable_python=no
9191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9192 /* end confdefs.h.  */
9193 #include "Python.h"
9194 int
9195 main ()
9196 {
9197 Py_Initialize ();
9198   ;
9199   return 0;
9200 }
9201 _ACEOF
9202 if ac_fn_c_try_link "$LINENO"; then :
9203   have_libpython=${version}
9204                   found_usable_python=yes
9205                   PYTHON_CPPFLAGS=$new_CPPFLAGS
9206                   PYTHON_LIBS=$new_LIBS
9207 fi
9208 rm -f core conftest.err conftest.$ac_objext \
9209     conftest$ac_exeext conftest.$ac_ext
9210   CPPFLAGS=$save_CPPFLAGS
9211   LIBS=$save_LIBS
9212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9213 $as_echo "${found_usable_python}" >&6; }
9214
9215     fi
9216     if test ${have_libpython} = no; then
9217
9218   version=python2.4
9219
9220   new_CPPFLAGS=${python_includes}
9221   new_LIBS="${python_libs} -lpython2.4"
9222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9223 $as_echo_n "checking for ${version}... " >&6; }
9224   save_CPPFLAGS=$CPPFLAGS
9225   save_LIBS=$LIBS
9226   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9227   LIBS="$LIBS $new_LIBS"
9228   found_usable_python=no
9229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9230 /* end confdefs.h.  */
9231 #include "Python.h"
9232 int
9233 main ()
9234 {
9235 Py_Initialize ();
9236   ;
9237   return 0;
9238 }
9239 _ACEOF
9240 if ac_fn_c_try_link "$LINENO"; then :
9241   have_libpython=${version}
9242                   found_usable_python=yes
9243                   PYTHON_CPPFLAGS=$new_CPPFLAGS
9244                   PYTHON_LIBS=$new_LIBS
9245 fi
9246 rm -f core conftest.err conftest.$ac_objext \
9247     conftest$ac_exeext conftest.$ac_ext
9248   CPPFLAGS=$save_CPPFLAGS
9249   LIBS=$save_LIBS
9250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9251 $as_echo "${found_usable_python}" >&6; }
9252
9253     fi
9254   fi
9255   if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
9256
9257 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
9258
9259   elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
9260
9261 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9262
9263   elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
9264
9265 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
9266
9267   elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
9268
9269 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9270
9271   fi
9272
9273   if test "${have_libpython}" = no; then
9274     case "${with_python}" in
9275     yes)
9276       as_fn_error "python is missing or unusable" "$LINENO" 5
9277       ;;
9278     auto)
9279       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9280 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9281       ;;
9282     *)
9283       as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9284       ;;
9285     esac
9286   else
9287     if test -n "${python_prefix}"; then
9288
9289 cat >>confdefs.h <<_ACEOF
9290 #define WITH_PYTHON_PATH "${python_prefix}"
9291 _ACEOF
9292
9293
9294   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9295      if test "x$prefix" = xNONE; then
9296         test_prefix=/usr/local
9297      else
9298         test_prefix=$prefix
9299      fi
9300   else
9301      test_prefix=$exec_prefix
9302   fi
9303   value=0
9304   case ${python_prefix} in
9305      "${test_prefix}"|"${test_prefix}/"*|\
9306         '${exec_prefix}'|'${exec_prefix}/'*)
9307      value=1
9308      ;;
9309   esac
9310
9311 cat >>confdefs.h <<_ACEOF
9312 #define PYTHON_PATH_RELOCATABLE $value
9313 _ACEOF
9314
9315
9316     fi
9317   fi
9318 fi
9319
9320 if test "${have_libpython}" != no; then
9321
9322 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
9323
9324   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9325   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9326   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
9327   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
9328   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
9329
9330   # Flags needed to compile Python code (taken from python-config --cflags).
9331   # We cannot call python-config directly because it will output whatever was
9332   # used when compiling the Python interpreter itself, including flags which
9333   # would make the python-related objects be compiled differently from the
9334   # rest of GDB (e.g., -O2 and -fPIC).
9335   if test "${GCC}" = yes; then
9336     tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9337   fi
9338
9339   if test "x${tentative_python_cflags}" != x; then
9340     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9341 $as_echo_n "checking compiler flags for python code... " >&6; }
9342     for flag in ${tentative_python_cflags}; do
9343       # Check that the compiler accepts it
9344       saved_CFLAGS="$CFLAGS"
9345       CFLAGS="$CFLAGS $flag"
9346       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9347 /* end confdefs.h.  */
9348
9349 int
9350 main ()
9351 {
9352
9353   ;
9354   return 0;
9355 }
9356 _ACEOF
9357 if ac_fn_c_try_compile "$LINENO"; then :
9358   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
9359 fi
9360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9361       CFLAGS="$saved_CFLAGS"
9362     done
9363     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9364 $as_echo "${PYTHON_CFLAGS}" >&6; }
9365   fi
9366
9367   # On x64 Windows, Python's include headers, and pyconfig.h in
9368   # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9369   # version of Windows.  Unfortunately, MS_WIN64 is only defined if
9370   # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
9371   # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9372   # The issue was reported to the Python community, but still isn't
9373   # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9374
9375   case "$gdb_host" in
9376     mingw64)
9377            if test "${GCC}" = yes; then
9378              CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9379            fi
9380            ;;
9381   esac
9382
9383   # Note that "python -m threading" cannot be used to check for
9384   # threading support due to a bug in Python 2.7.3
9385   # (http://bugs.python.org/issue15567).
9386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9387 $as_echo_n "checking whether python supports threads... " >&6; }
9388   saved_CPPFLAGS="${CPPFLAGS}"
9389   CPPFLAGS="${PYTHON_CPPFLAGS}"
9390   # Note that the test is reversed so that python_has_threads=yes on
9391   # unexpected failures.
9392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9393 /* end confdefs.h.  */
9394
9395 #include <Python.h>
9396 #ifdef WITH_THREAD
9397 # error
9398 #endif
9399
9400 _ACEOF
9401 if ac_fn_c_try_cpp "$LINENO"; then :
9402   python_has_threads=no
9403 else
9404   python_has_threads=yes
9405 fi
9406 rm -f conftest.err conftest.$ac_ext
9407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9408 $as_echo "${python_has_threads}" >&6; }
9409   CPPFLAGS="${saved_CPPFLAGS}"
9410 else
9411   # Even if Python support is not compiled in, we need to have this file
9412   # included so that the "python" command, et.al., still exists.
9413   CONFIG_OBS="$CONFIG_OBS python.o"
9414   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
9415 fi
9416
9417 # Work around Python http://bugs.python.org/issue10112.  See also
9418 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
9419 # no effect.  Note that the only test after this that uses Python is
9420 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
9421 # run without -export-dynamic too.
9422 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
9423
9424
9425
9426
9427  if test "${have_libpython}" != no; then
9428   HAVE_PYTHON_TRUE=
9429   HAVE_PYTHON_FALSE='#'
9430 else
9431   HAVE_PYTHON_TRUE='#'
9432   HAVE_PYTHON_FALSE=
9433 fi
9434
9435
9436 # -------------------- #
9437 # Check for libguile.  #
9438 # -------------------- #
9439
9440
9441
9442
9443
9444
9445 # Check whether --with-guile was given.
9446 if test "${with_guile+set}" = set; then :
9447   withval=$with_guile;
9448 else
9449   with_guile=auto
9450 fi
9451
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9453 $as_echo_n "checking whether to use guile... " >&6; }
9454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9455 $as_echo "$with_guile" >&6; }
9456
9457 # Extract the first word of "pkg-config", so it can be a program name with args.
9458 set dummy pkg-config; ac_word=$2
9459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9460 $as_echo_n "checking for $ac_word... " >&6; }
9461 if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9462   $as_echo_n "(cached) " >&6
9463 else
9464   case $pkg_config_prog_path in
9465   [\\/]* | ?:[\\/]*)
9466   ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9467   ;;
9468   *)
9469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9470 for as_dir in $PATH
9471 do
9472   IFS=$as_save_IFS
9473   test -z "$as_dir" && as_dir=.
9474     for ac_exec_ext in '' $ac_executable_extensions; do
9475   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9476     ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9478     break 2
9479   fi
9480 done
9481   done
9482 IFS=$as_save_IFS
9483
9484   test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9485   ;;
9486 esac
9487 fi
9488 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9489 if test -n "$pkg_config_prog_path"; then
9490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9491 $as_echo "$pkg_config_prog_path" >&6; }
9492 else
9493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494 $as_echo "no" >&6; }
9495 fi
9496
9497
9498
9499 try_guile_versions="guile-2.2 guile-2.0"
9500 have_libguile=no
9501 case "${with_guile}" in
9502 no)
9503   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9504 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9505   ;;
9506 auto)
9507   if test "${pkg_config_prog_path}" = "missing"; then
9508     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9509 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9510   else
9511
9512   pkg_config=${pkg_config_prog_path}
9513   guile_version_list=${try_guile_versions}
9514   flag_errors=no
9515
9516   found_usable_guile=checking
9517   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9518 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9519   for guile_version in ${guile_version_list}; do
9520     ${pkg_config} --exists ${guile_version} 2>/dev/null
9521     if test $? != 0; then
9522       continue
9523     fi
9524             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9525     if test $? != 0; then
9526       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9527     fi
9528     new_LIBS=`${pkg_config} --libs ${guile_version}`
9529     if test $? != 0; then
9530       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9531     fi
9532         found_usable_guile=${guile_version}
9533     break
9534   done
9535   if test "${found_usable_guile}" = "checking"; then
9536     if test "${flag_errors}" = "yes"; then
9537       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9538     else
9539       found_usable_guile=no
9540     fi
9541   fi
9542       if test "${found_usable_guile}" != no; then
9543     save_CPPFLAGS=$CPPFLAGS
9544     save_LIBS=$LIBS
9545     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9546     LIBS="$LIBS $new_LIBS"
9547     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9548 /* end confdefs.h.  */
9549 #include "libguile.h"
9550 int
9551 main ()
9552 {
9553 scm_init_guile ();
9554   ;
9555   return 0;
9556 }
9557 _ACEOF
9558 if ac_fn_c_try_link "$LINENO"; then :
9559   have_libguile=yes
9560                     GUILE_CPPFLAGS=$new_CPPFLAGS
9561                     GUILE_LIBS=$new_LIBS
9562 else
9563   found_usable_guile=no
9564 fi
9565 rm -f core conftest.err conftest.$ac_objext \
9566     conftest$ac_exeext conftest.$ac_ext
9567         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9568 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9569
9570 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9571
9572
9573 fi
9574
9575     CPPFLAGS=$save_CPPFLAGS
9576     LIBS=$save_LIBS
9577     if test "${found_usable_guile}" = no; then
9578       if test "${flag_errors}" = yes; then
9579         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9580 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9581 as_fn_error "linking guile version ${guile_version} test program failed
9582 See \`config.log' for more details." "$LINENO" 5; }
9583       fi
9584     fi
9585   fi
9586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9587 $as_echo "${found_usable_guile}" >&6; }
9588
9589   fi
9590   ;;
9591 yes)
9592   if test "${pkg_config_prog_path}" = "missing"; then
9593     as_fn_error "pkg-config not found" "$LINENO" 5
9594   fi
9595
9596   pkg_config=${pkg_config_prog_path}
9597   guile_version_list=${try_guile_versions}
9598   flag_errors=yes
9599
9600   found_usable_guile=checking
9601   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9602 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9603   for guile_version in ${guile_version_list}; do
9604     ${pkg_config} --exists ${guile_version} 2>/dev/null
9605     if test $? != 0; then
9606       continue
9607     fi
9608             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9609     if test $? != 0; then
9610       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9611     fi
9612     new_LIBS=`${pkg_config} --libs ${guile_version}`
9613     if test $? != 0; then
9614       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9615     fi
9616         found_usable_guile=${guile_version}
9617     break
9618   done
9619   if test "${found_usable_guile}" = "checking"; then
9620     if test "${flag_errors}" = "yes"; then
9621       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9622     else
9623       found_usable_guile=no
9624     fi
9625   fi
9626       if test "${found_usable_guile}" != no; then
9627     save_CPPFLAGS=$CPPFLAGS
9628     save_LIBS=$LIBS
9629     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9630     LIBS="$LIBS $new_LIBS"
9631     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9632 /* end confdefs.h.  */
9633 #include "libguile.h"
9634 int
9635 main ()
9636 {
9637 scm_init_guile ();
9638   ;
9639   return 0;
9640 }
9641 _ACEOF
9642 if ac_fn_c_try_link "$LINENO"; then :
9643   have_libguile=yes
9644                     GUILE_CPPFLAGS=$new_CPPFLAGS
9645                     GUILE_LIBS=$new_LIBS
9646 else
9647   found_usable_guile=no
9648 fi
9649 rm -f core conftest.err conftest.$ac_objext \
9650     conftest$ac_exeext conftest.$ac_ext
9651         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9652 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9653
9654 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9655
9656
9657 fi
9658
9659     CPPFLAGS=$save_CPPFLAGS
9660     LIBS=$save_LIBS
9661     if test "${found_usable_guile}" = no; then
9662       if test "${flag_errors}" = yes; then
9663         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9664 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9665 as_fn_error "linking guile version ${guile_version} test program failed
9666 See \`config.log' for more details." "$LINENO" 5; }
9667       fi
9668     fi
9669   fi
9670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9671 $as_echo "${found_usable_guile}" >&6; }
9672
9673   ;;
9674 [\\/]* | ?:[\\/]*)
9675   if test -x "${with_guile}"; then
9676
9677   pkg_config=${with_guile}
9678   guile_version_list=${try_guile_versions}
9679   flag_errors=yes
9680
9681   found_usable_guile=checking
9682   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9683 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9684   for guile_version in ${guile_version_list}; do
9685     ${pkg_config} --exists ${guile_version} 2>/dev/null
9686     if test $? != 0; then
9687       continue
9688     fi
9689             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9690     if test $? != 0; then
9691       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9692     fi
9693     new_LIBS=`${pkg_config} --libs ${guile_version}`
9694     if test $? != 0; then
9695       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9696     fi
9697         found_usable_guile=${guile_version}
9698     break
9699   done
9700   if test "${found_usable_guile}" = "checking"; then
9701     if test "${flag_errors}" = "yes"; then
9702       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9703     else
9704       found_usable_guile=no
9705     fi
9706   fi
9707       if test "${found_usable_guile}" != no; then
9708     save_CPPFLAGS=$CPPFLAGS
9709     save_LIBS=$LIBS
9710     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9711     LIBS="$LIBS $new_LIBS"
9712     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9713 /* end confdefs.h.  */
9714 #include "libguile.h"
9715 int
9716 main ()
9717 {
9718 scm_init_guile ();
9719   ;
9720   return 0;
9721 }
9722 _ACEOF
9723 if ac_fn_c_try_link "$LINENO"; then :
9724   have_libguile=yes
9725                     GUILE_CPPFLAGS=$new_CPPFLAGS
9726                     GUILE_LIBS=$new_LIBS
9727 else
9728   found_usable_guile=no
9729 fi
9730 rm -f core conftest.err conftest.$ac_objext \
9731     conftest$ac_exeext conftest.$ac_ext
9732         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9733 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9734
9735 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9736
9737
9738 fi
9739
9740     CPPFLAGS=$save_CPPFLAGS
9741     LIBS=$save_LIBS
9742     if test "${found_usable_guile}" = no; then
9743       if test "${flag_errors}" = yes; then
9744         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9745 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9746 as_fn_error "linking guile version ${guile_version} test program failed
9747 See \`config.log' for more details." "$LINENO" 5; }
9748       fi
9749     fi
9750   fi
9751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9752 $as_echo "${found_usable_guile}" >&6; }
9753
9754   else
9755     as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9756   fi
9757   ;;
9758 "" | */*)
9759   # Disallow --with=guile="" and --with-guile=foo/bar.
9760   as_fn_error "invalid value for --with-guile" "$LINENO" 5
9761   ;;
9762 *)
9763   # A space separate list of guile versions to try, in order.
9764   if test "${pkg_config_prog_path}" = "missing"; then
9765     as_fn_error "pkg-config not found" "$LINENO" 5
9766   fi
9767
9768   pkg_config=${pkg_config_prog_path}
9769   guile_version_list=${with_guile}
9770   flag_errors=yes
9771
9772   found_usable_guile=checking
9773   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9774 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9775   for guile_version in ${guile_version_list}; do
9776     ${pkg_config} --exists ${guile_version} 2>/dev/null
9777     if test $? != 0; then
9778       continue
9779     fi
9780             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9781     if test $? != 0; then
9782       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9783     fi
9784     new_LIBS=`${pkg_config} --libs ${guile_version}`
9785     if test $? != 0; then
9786       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9787     fi
9788         found_usable_guile=${guile_version}
9789     break
9790   done
9791   if test "${found_usable_guile}" = "checking"; then
9792     if test "${flag_errors}" = "yes"; then
9793       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9794     else
9795       found_usable_guile=no
9796     fi
9797   fi
9798       if test "${found_usable_guile}" != no; then
9799     save_CPPFLAGS=$CPPFLAGS
9800     save_LIBS=$LIBS
9801     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9802     LIBS="$LIBS $new_LIBS"
9803     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9804 /* end confdefs.h.  */
9805 #include "libguile.h"
9806 int
9807 main ()
9808 {
9809 scm_init_guile ();
9810   ;
9811   return 0;
9812 }
9813 _ACEOF
9814 if ac_fn_c_try_link "$LINENO"; then :
9815   have_libguile=yes
9816                     GUILE_CPPFLAGS=$new_CPPFLAGS
9817                     GUILE_LIBS=$new_LIBS
9818 else
9819   found_usable_guile=no
9820 fi
9821 rm -f core conftest.err conftest.$ac_objext \
9822     conftest$ac_exeext conftest.$ac_ext
9823         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9824 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9825
9826 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9827
9828
9829 fi
9830
9831     CPPFLAGS=$save_CPPFLAGS
9832     LIBS=$save_LIBS
9833     if test "${found_usable_guile}" = no; then
9834       if test "${flag_errors}" = yes; then
9835         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9836 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9837 as_fn_error "linking guile version ${guile_version} test program failed
9838 See \`config.log' for more details." "$LINENO" 5; }
9839       fi
9840     fi
9841   fi
9842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9843 $as_echo "${found_usable_guile}" >&6; }
9844
9845   ;;
9846 esac
9847
9848 if test "${have_libguile}" != no; then
9849     case "${with_guile}" in
9850   [\\/]* | ?:[\\/]*)
9851
9852   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9853 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9854 if test "${ac_cv_guild_program_name+set}" = set; then :
9855   $as_echo_n "(cached) " >&6
9856 else
9857   ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
9858
9859      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9860      # the 'guild' and 'bindir' variables.  In that case, try to guess
9861      # what the program name is, at the risk of getting it wrong if
9862      # Guile was configured with '--program-suffix' or similar.
9863      if test "x$ac_cv_guild_program_name" = "x"; then
9864        guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
9865        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9866      fi
9867
9868 fi
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9870 $as_echo "$ac_cv_guild_program_name" >&6; }
9871
9872   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9873     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9874   fi
9875
9876   GUILD="$ac_cv_guild_program_name"
9877
9878
9879     ;;
9880   *)
9881
9882   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9883 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9884 if test "${ac_cv_guild_program_name+set}" = set; then :
9885   $as_echo_n "(cached) " >&6
9886 else
9887   ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9888
9889      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9890      # the 'guild' and 'bindir' variables.  In that case, try to guess
9891      # what the program name is, at the risk of getting it wrong if
9892      # Guile was configured with '--program-suffix' or similar.
9893      if test "x$ac_cv_guild_program_name" = "x"; then
9894        guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9895        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9896      fi
9897
9898 fi
9899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9900 $as_echo "$ac_cv_guild_program_name" >&6; }
9901
9902   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9903     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9904   fi
9905
9906   GUILD="$ac_cv_guild_program_name"
9907
9908
9909     ;;
9910   esac
9911
9912
9913   if test "$cross_compiling" = no; then
9914     GUILD_TARGET_FLAG=
9915   else
9916     GUILD_TARGET_FLAG="--target=$host"
9917   fi
9918
9919
9920
9921
9922   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9923 $as_echo_n "checking whether guild supports this host... " >&6; }
9924 if test "${ac_cv_guild_ok+set}" = set; then :
9925   $as_echo_n "(cached) " >&6
9926 else
9927   echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9928      if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9929        ac_cv_guild_ok=yes
9930      else
9931        ac_cv_guild_ok=no
9932      fi
9933 fi
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9935 $as_echo "$ac_cv_guild_ok" >&6; }
9936
9937     if test "$ac_cv_guild_ok" = no; then
9938     have_libguile=no
9939     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9940 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
9941   fi
9942 fi
9943
9944 if test "${have_libguile}" != no; then
9945
9946 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
9947
9948   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9949   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9950   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9951   CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9952   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
9953
9954     save_LIBS="$LIBS"
9955   save_CPPFLAGS="$CPPFLAGS"
9956   LIBS="$GUILE_LIBS"
9957   CPPFLAGS="$GUILE_CPPFLAGS"
9958   for ac_func in scm_new_smob
9959 do :
9960   ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9961 if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9962   cat >>confdefs.h <<_ACEOF
9963 #define HAVE_SCM_NEW_SMOB 1
9964 _ACEOF
9965
9966 fi
9967 done
9968
9969   LIBS="$save_LIBS"
9970   CPPFLAGS="$save_CPPFLAGS"
9971 else
9972   # Even if Guile support is not compiled in, we need to have these files
9973   # included.
9974   CONFIG_OBS="$CONFIG_OBS guile.o"
9975   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9976 fi
9977
9978
9979  if test "${have_libguile}" != no; then
9980   HAVE_GUILE_TRUE=
9981   HAVE_GUILE_FALSE='#'
9982 else
9983   HAVE_GUILE_TRUE='#'
9984   HAVE_GUILE_FALSE=
9985 fi
9986
9987
9988 # --------------------- #
9989 # Check for libmcheck.  #
9990 # --------------------- #
9991
9992 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
9993 # but turn it off if Python is enabled with threads, since -lmcheck is
9994 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9995 # and for releases.
9996 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9997    && $development; then
9998   libmcheck_default=yes
9999 else
10000   libmcheck_default=no
10001 fi
10002
10003   # Check whether --enable-libmcheck was given.
10004 if test "${enable_libmcheck+set}" = set; then :
10005   enableval=$enable_libmcheck; case "${enableval}" in
10006       yes | y) ENABLE_LIBMCHECK="yes" ;;
10007       no | n)  ENABLE_LIBMCHECK="no" ;;
10008       *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10009     esac
10010 fi
10011
10012
10013   if test -z "${ENABLE_LIBMCHECK}"; then
10014     ENABLE_LIBMCHECK=${libmcheck_default}
10015   fi
10016
10017   if test "$ENABLE_LIBMCHECK" = "yes" ; then
10018     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
10019 $as_echo_n "checking for main in -lmcheck... " >&6; }
10020 if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10021   $as_echo_n "(cached) " >&6
10022 else
10023   ac_check_lib_save_LIBS=$LIBS
10024 LIBS="-lmcheck  $LIBS"
10025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10026 /* end confdefs.h.  */
10027
10028
10029 int
10030 main ()
10031 {
10032 return main ();
10033   ;
10034   return 0;
10035 }
10036 _ACEOF
10037 if ac_fn_c_try_link "$LINENO"; then :
10038   ac_cv_lib_mcheck_main=yes
10039 else
10040   ac_cv_lib_mcheck_main=no
10041 fi
10042 rm -f core conftest.err conftest.$ac_objext \
10043     conftest$ac_exeext conftest.$ac_ext
10044 LIBS=$ac_check_lib_save_LIBS
10045 fi
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10047 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
10048 if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10049   cat >>confdefs.h <<_ACEOF
10050 #define HAVE_LIBMCHECK 1
10051 _ACEOF
10052
10053   LIBS="-lmcheck $LIBS"
10054
10055 fi
10056
10057   fi
10058
10059
10060 if test "$ENABLE_LIBMCHECK" = "yes" \
10061         -a "${have_libpython}" != "no" \
10062         -a "${python_has_threads}" = "yes" ; then
10063   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10064 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
10065 fi
10066
10067
10068 # Check whether --with-intel_pt was given.
10069 if test "${with_intel_pt+set}" = set; then :
10070   withval=$with_intel_pt;
10071 else
10072   with_intel_pt=auto
10073 fi
10074
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10076 $as_echo_n "checking whether to use intel pt... " >&6; }
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10078 $as_echo "$with_intel_pt" >&6; }
10079
10080 if test "${with_intel_pt}" = no; then
10081   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10082 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
10083   HAVE_LIBIPT=no
10084 else
10085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10086 /* end confdefs.h.  */
10087
10088 #include <linux/perf_event.h>
10089 #ifndef PERF_ATTR_SIZE_VER5
10090 # error
10091 #endif
10092
10093 _ACEOF
10094 if ac_fn_c_try_cpp "$LINENO"; then :
10095   perf_event=yes
10096 else
10097   perf_event=no
10098 fi
10099 rm -f conftest.err conftest.$ac_ext
10100   if test "$perf_event" != yes; then
10101     if test "$with_intel_pt" = yes; then
10102       as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10103     else
10104       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10105 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10106     fi
10107   fi
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117     use_additional=yes
10118
10119   acl_save_prefix="$prefix"
10120   prefix="$acl_final_prefix"
10121   acl_save_exec_prefix="$exec_prefix"
10122   exec_prefix="$acl_final_exec_prefix"
10123
10124     eval additional_includedir=\"$includedir\"
10125     eval additional_libdir=\"$libdir\"
10126
10127   exec_prefix="$acl_save_exec_prefix"
10128   prefix="$acl_save_prefix"
10129
10130
10131 # Check whether --with-libipt-prefix was given.
10132 if test "${with_libipt_prefix+set}" = set; then :
10133   withval=$with_libipt_prefix;
10134     if test "X$withval" = "Xno"; then
10135       use_additional=no
10136     else
10137       if test "X$withval" = "X"; then
10138
10139   acl_save_prefix="$prefix"
10140   prefix="$acl_final_prefix"
10141   acl_save_exec_prefix="$exec_prefix"
10142   exec_prefix="$acl_final_exec_prefix"
10143
10144           eval additional_includedir=\"$includedir\"
10145           eval additional_libdir=\"$libdir\"
10146
10147   exec_prefix="$acl_save_exec_prefix"
10148   prefix="$acl_save_prefix"
10149
10150       else
10151         additional_includedir="$withval/include"
10152         additional_libdir="$withval/lib"
10153       fi
10154     fi
10155
10156 fi
10157
10158       LIBIPT=
10159   LTLIBIPT=
10160   INCIPT=
10161   rpathdirs=
10162   ltrpathdirs=
10163   names_already_handled=
10164   names_next_round='ipt '
10165   while test -n "$names_next_round"; do
10166     names_this_round="$names_next_round"
10167     names_next_round=
10168     for name in $names_this_round; do
10169       already_handled=
10170       for n in $names_already_handled; do
10171         if test "$n" = "$name"; then
10172           already_handled=yes
10173           break
10174         fi
10175       done
10176       if test -z "$already_handled"; then
10177         names_already_handled="$names_already_handled $name"
10178                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10179         eval value=\"\$HAVE_LIB$uppername\"
10180         if test -n "$value"; then
10181           if test "$value" = yes; then
10182             eval value=\"\$LIB$uppername\"
10183             test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10184             eval value=\"\$LTLIB$uppername\"
10185             test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10186           else
10187                                     :
10188           fi
10189         else
10190                               found_dir=
10191           found_la=
10192           found_so=
10193           found_a=
10194           if test $use_additional = yes; then
10195             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10196               found_dir="$additional_libdir"
10197               found_so="$additional_libdir/lib$name.$shlibext"
10198               if test -f "$additional_libdir/lib$name.la"; then
10199                 found_la="$additional_libdir/lib$name.la"
10200               fi
10201             else
10202               if test -f "$additional_libdir/lib$name.$libext"; then
10203                 found_dir="$additional_libdir"
10204                 found_a="$additional_libdir/lib$name.$libext"
10205                 if test -f "$additional_libdir/lib$name.la"; then
10206                   found_la="$additional_libdir/lib$name.la"
10207                 fi
10208               fi
10209             fi
10210           fi
10211           if test "X$found_dir" = "X"; then
10212             for x in $LDFLAGS $LTLIBIPT; do
10213
10214   acl_save_prefix="$prefix"
10215   prefix="$acl_final_prefix"
10216   acl_save_exec_prefix="$exec_prefix"
10217   exec_prefix="$acl_final_exec_prefix"
10218   eval x=\"$x\"
10219   exec_prefix="$acl_save_exec_prefix"
10220   prefix="$acl_save_prefix"
10221
10222               case "$x" in
10223                 -L*)
10224                   dir=`echo "X$x" | sed -e 's/^X-L//'`
10225                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10226                     found_dir="$dir"
10227                     found_so="$dir/lib$name.$shlibext"
10228                     if test -f "$dir/lib$name.la"; then
10229                       found_la="$dir/lib$name.la"
10230                     fi
10231                   else
10232                     if test -f "$dir/lib$name.$libext"; then
10233                       found_dir="$dir"
10234                       found_a="$dir/lib$name.$libext"
10235                       if test -f "$dir/lib$name.la"; then
10236                         found_la="$dir/lib$name.la"
10237                       fi
10238                     fi
10239                   fi
10240                   ;;
10241               esac
10242               if test "X$found_dir" != "X"; then
10243                 break
10244               fi
10245             done
10246           fi
10247           if test "X$found_dir" != "X"; then
10248                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
10249             if test "X$found_so" != "X"; then
10250                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10251                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10252               else
10253                                                                                 haveit=
10254                 for x in $ltrpathdirs; do
10255                   if test "X$x" = "X$found_dir"; then
10256                     haveit=yes
10257                     break
10258                   fi
10259                 done
10260                 if test -z "$haveit"; then
10261                   ltrpathdirs="$ltrpathdirs $found_dir"
10262                 fi
10263                                 if test "$hardcode_direct" = yes; then
10264                                                       LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10265                 else
10266                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10267                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10268                                                             haveit=
10269                     for x in $rpathdirs; do
10270                       if test "X$x" = "X$found_dir"; then
10271                         haveit=yes
10272                         break
10273                       fi
10274                     done
10275                     if test -z "$haveit"; then
10276                       rpathdirs="$rpathdirs $found_dir"
10277                     fi
10278                   else
10279                                                                                 haveit=
10280                     for x in $LDFLAGS $LIBIPT; do
10281
10282   acl_save_prefix="$prefix"
10283   prefix="$acl_final_prefix"
10284   acl_save_exec_prefix="$exec_prefix"
10285   exec_prefix="$acl_final_exec_prefix"
10286   eval x=\"$x\"
10287   exec_prefix="$acl_save_exec_prefix"
10288   prefix="$acl_save_prefix"
10289
10290                       if test "X$x" = "X-L$found_dir"; then
10291                         haveit=yes
10292                         break
10293                       fi
10294                     done
10295                     if test -z "$haveit"; then
10296                       LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
10297                     fi
10298                     if test "$hardcode_minus_L" != no; then
10299                                                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10300                     else
10301                                                                                                                                                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10302                     fi
10303                   fi
10304                 fi
10305               fi
10306             else
10307               if test "X$found_a" != "X"; then
10308                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
10309               else
10310                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
10311               fi
10312             fi
10313                         additional_includedir=
10314             case "$found_dir" in
10315               */lib | */lib/)
10316                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10317                 additional_includedir="$basedir/include"
10318                 ;;
10319             esac
10320             if test "X$additional_includedir" != "X"; then
10321                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
10322                 haveit=
10323                 if test "X$additional_includedir" = "X/usr/local/include"; then
10324                   if test -n "$GCC"; then
10325                     case $host_os in
10326                       linux*) haveit=yes;;
10327                     esac
10328                   fi
10329                 fi
10330                 if test -z "$haveit"; then
10331                   for x in $CPPFLAGS $INCIPT; do
10332
10333   acl_save_prefix="$prefix"
10334   prefix="$acl_final_prefix"
10335   acl_save_exec_prefix="$exec_prefix"
10336   exec_prefix="$acl_final_exec_prefix"
10337   eval x=\"$x\"
10338   exec_prefix="$acl_save_exec_prefix"
10339   prefix="$acl_save_prefix"
10340
10341                     if test "X$x" = "X-I$additional_includedir"; then
10342                       haveit=yes
10343                       break
10344                     fi
10345                   done
10346                   if test -z "$haveit"; then
10347                     if test -d "$additional_includedir"; then
10348                                             INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
10349                     fi
10350                   fi
10351                 fi
10352               fi
10353             fi
10354                         if test -n "$found_la"; then
10355                                                         save_libdir="$libdir"
10356               case "$found_la" in
10357                 */* | *\\*) . "$found_la" ;;
10358                 *) . "./$found_la" ;;
10359               esac
10360               libdir="$save_libdir"
10361                             for dep in $dependency_libs; do
10362                 case "$dep" in
10363                   -L*)
10364                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10365                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
10366                       haveit=
10367                       if test "X$additional_libdir" = "X/usr/local/lib"; then
10368                         if test -n "$GCC"; then
10369                           case $host_os in
10370                             linux*) haveit=yes;;
10371                           esac
10372                         fi
10373                       fi
10374                       if test -z "$haveit"; then
10375                         haveit=
10376                         for x in $LDFLAGS $LIBIPT; do
10377
10378   acl_save_prefix="$prefix"
10379   prefix="$acl_final_prefix"
10380   acl_save_exec_prefix="$exec_prefix"
10381   exec_prefix="$acl_final_exec_prefix"
10382   eval x=\"$x\"
10383   exec_prefix="$acl_save_exec_prefix"
10384   prefix="$acl_save_prefix"
10385
10386                           if test "X$x" = "X-L$additional_libdir"; then
10387                             haveit=yes
10388                             break
10389                           fi
10390                         done
10391                         if test -z "$haveit"; then
10392                           if test -d "$additional_libdir"; then
10393                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10394                           fi
10395                         fi
10396                         haveit=
10397                         for x in $LDFLAGS $LTLIBIPT; do
10398
10399   acl_save_prefix="$prefix"
10400   prefix="$acl_final_prefix"
10401   acl_save_exec_prefix="$exec_prefix"
10402   exec_prefix="$acl_final_exec_prefix"
10403   eval x=\"$x\"
10404   exec_prefix="$acl_save_exec_prefix"
10405   prefix="$acl_save_prefix"
10406
10407                           if test "X$x" = "X-L$additional_libdir"; then
10408                             haveit=yes
10409                             break
10410                           fi
10411                         done
10412                         if test -z "$haveit"; then
10413                           if test -d "$additional_libdir"; then
10414                                                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10415                           fi
10416                         fi
10417                       fi
10418                     fi
10419                     ;;
10420                   -R*)
10421                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
10422                     if test "$enable_rpath" != no; then
10423                                                                   haveit=
10424                       for x in $rpathdirs; do
10425                         if test "X$x" = "X$dir"; then
10426                           haveit=yes
10427                           break
10428                         fi
10429                       done
10430                       if test -z "$haveit"; then
10431                         rpathdirs="$rpathdirs $dir"
10432                       fi
10433                                                                   haveit=
10434                       for x in $ltrpathdirs; do
10435                         if test "X$x" = "X$dir"; then
10436                           haveit=yes
10437                           break
10438                         fi
10439                       done
10440                       if test -z "$haveit"; then
10441                         ltrpathdirs="$ltrpathdirs $dir"
10442                       fi
10443                     fi
10444                     ;;
10445                   -l*)
10446                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10447                     ;;
10448                   *.la)
10449                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10450                     ;;
10451                   *)
10452                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10453                     LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10454                     ;;
10455                 esac
10456               done
10457             fi
10458           else
10459                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10460             LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10461           fi
10462         fi
10463       fi
10464     done
10465   done
10466   if test "X$rpathdirs" != "X"; then
10467     if test -n "$hardcode_libdir_separator"; then
10468                         alldirs=
10469       for found_dir in $rpathdirs; do
10470         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10471       done
10472             acl_save_libdir="$libdir"
10473       libdir="$alldirs"
10474       eval flag=\"$hardcode_libdir_flag_spec\"
10475       libdir="$acl_save_libdir"
10476       LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10477     else
10478             for found_dir in $rpathdirs; do
10479         acl_save_libdir="$libdir"
10480         libdir="$found_dir"
10481         eval flag=\"$hardcode_libdir_flag_spec\"
10482         libdir="$acl_save_libdir"
10483         LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10484       done
10485     fi
10486   fi
10487   if test "X$ltrpathdirs" != "X"; then
10488             for found_dir in $ltrpathdirs; do
10489       LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10490     done
10491   fi
10492
10493
10494         ac_save_CPPFLAGS="$CPPFLAGS"
10495
10496   for element in $INCIPT; do
10497     haveit=
10498     for x in $CPPFLAGS; do
10499
10500   acl_save_prefix="$prefix"
10501   prefix="$acl_final_prefix"
10502   acl_save_exec_prefix="$exec_prefix"
10503   exec_prefix="$acl_final_exec_prefix"
10504   eval x=\"$x\"
10505   exec_prefix="$acl_save_exec_prefix"
10506   prefix="$acl_save_prefix"
10507
10508       if test "X$x" = "X$element"; then
10509         haveit=yes
10510         break
10511       fi
10512     done
10513     if test -z "$haveit"; then
10514       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10515     fi
10516   done
10517
10518
10519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10520 $as_echo_n "checking for libipt... " >&6; }
10521 if test "${ac_cv_libipt+set}" = set; then :
10522   $as_echo_n "(cached) " >&6
10523 else
10524
10525     ac_save_LIBS="$LIBS"
10526     LIBS="$LIBS $LIBIPT"
10527     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10528 /* end confdefs.h.  */
10529 #include "intel-pt.h"
10530 int
10531 main ()
10532 {
10533 pt_insn_alloc_decoder (0);
10534   ;
10535   return 0;
10536 }
10537 _ACEOF
10538 if ac_fn_c_try_link "$LINENO"; then :
10539   ac_cv_libipt=yes
10540 else
10541   ac_cv_libipt=no
10542 fi
10543 rm -f core conftest.err conftest.$ac_objext \
10544     conftest$ac_exeext conftest.$ac_ext
10545     LIBS="$ac_save_LIBS"
10546
10547 fi
10548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10549 $as_echo "$ac_cv_libipt" >&6; }
10550   if test "$ac_cv_libipt" = yes; then
10551     HAVE_LIBIPT=yes
10552
10553 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10554
10555     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10556 $as_echo_n "checking how to link with libipt... " >&6; }
10557     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10558 $as_echo "$LIBIPT" >&6; }
10559   else
10560     HAVE_LIBIPT=no
10561             CPPFLAGS="$ac_save_CPPFLAGS"
10562     LIBIPT=
10563     LTLIBIPT=
10564   fi
10565
10566
10567
10568
10569
10570
10571   if test "$HAVE_LIBIPT" != yes; then
10572     if test "$with_intel_pt" = yes; then
10573       as_fn_error "libipt is missing or unusable" "$LINENO" 5
10574     else
10575       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10576 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10577     fi
10578   fi
10579 fi
10580
10581 # ------------------------- #
10582 # Checks for header files.  #
10583 # ------------------------- #
10584
10585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10586 $as_echo_n "checking for ANSI C header files... " >&6; }
10587 if test "${ac_cv_header_stdc+set}" = set; then :
10588   $as_echo_n "(cached) " >&6
10589 else
10590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10591 /* end confdefs.h.  */
10592 #include <stdlib.h>
10593 #include <stdarg.h>
10594 #include <string.h>
10595 #include <float.h>
10596
10597 int
10598 main ()
10599 {
10600
10601   ;
10602   return 0;
10603 }
10604 _ACEOF
10605 if ac_fn_c_try_compile "$LINENO"; then :
10606   ac_cv_header_stdc=yes
10607 else
10608   ac_cv_header_stdc=no
10609 fi
10610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10611
10612 if test $ac_cv_header_stdc = yes; then
10613   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10614   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10615 /* end confdefs.h.  */
10616 #include <string.h>
10617
10618 _ACEOF
10619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10620   $EGREP "memchr" >/dev/null 2>&1; then :
10621
10622 else
10623   ac_cv_header_stdc=no
10624 fi
10625 rm -f conftest*
10626
10627 fi
10628
10629 if test $ac_cv_header_stdc = yes; then
10630   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10631   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10632 /* end confdefs.h.  */
10633 #include <stdlib.h>
10634
10635 _ACEOF
10636 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10637   $EGREP "free" >/dev/null 2>&1; then :
10638
10639 else
10640   ac_cv_header_stdc=no
10641 fi
10642 rm -f conftest*
10643
10644 fi
10645
10646 if test $ac_cv_header_stdc = yes; then
10647   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10648   if test "$cross_compiling" = yes; then :
10649   :
10650 else
10651   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10652 /* end confdefs.h.  */
10653 #include <ctype.h>
10654 #include <stdlib.h>
10655 #if ((' ' & 0x0FF) == 0x020)
10656 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10657 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10658 #else
10659 # define ISLOWER(c) \
10660                    (('a' <= (c) && (c) <= 'i') \
10661                      || ('j' <= (c) && (c) <= 'r') \
10662                      || ('s' <= (c) && (c) <= 'z'))
10663 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10664 #endif
10665
10666 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10667 int
10668 main ()
10669 {
10670   int i;
10671   for (i = 0; i < 256; i++)
10672     if (XOR (islower (i), ISLOWER (i))
10673         || toupper (i) != TOUPPER (i))
10674       return 2;
10675   return 0;
10676 }
10677 _ACEOF
10678 if ac_fn_c_try_run "$LINENO"; then :
10679
10680 else
10681   ac_cv_header_stdc=no
10682 fi
10683 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10684   conftest.$ac_objext conftest.beam conftest.$ac_ext
10685 fi
10686
10687 fi
10688 fi
10689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10690 $as_echo "$ac_cv_header_stdc" >&6; }
10691 if test $ac_cv_header_stdc = yes; then
10692
10693 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10694
10695 fi
10696
10697 # elf_hp.h is for HP/UX 64-bit shared library support.
10698 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
10699                   thread_db.h \
10700                   sys/fault.h \
10701                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
10702                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
10703                   sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
10704                   termios.h termio.h \
10705                   sgtty.h elf_hp.h \
10706                   dlfcn.h
10707 do :
10708   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10709 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10710 eval as_val=\$$as_ac_Header
10711    if test "x$as_val" = x""yes; then :
10712   cat >>confdefs.h <<_ACEOF
10713 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10714 _ACEOF
10715
10716 fi
10717
10718 done
10719
10720 for ac_header in sys/proc.h
10721 do :
10722   ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10723 # include <sys/param.h>
10724 #endif
10725
10726 "
10727 if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
10728   cat >>confdefs.h <<_ACEOF
10729 #define HAVE_SYS_PROC_H 1
10730 _ACEOF
10731
10732 fi
10733
10734 done
10735
10736 for ac_header in sys/user.h
10737 do :
10738   ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10739 # include <sys/param.h>
10740 #endif
10741
10742 "
10743 if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10744   cat >>confdefs.h <<_ACEOF
10745 #define HAVE_SYS_USER_H 1
10746 _ACEOF
10747
10748 fi
10749
10750 done
10751
10752
10753 # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10754 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10755 # think that we don't have <curses.h> if we're using GCC.
10756 case $host_os in
10757   solaris2.[789])
10758     if test "$GCC" = yes; then
10759
10760 $as_echo "#define _MSE_INT_H 1" >>confdefs.h
10761
10762     fi ;;
10763 esac
10764 for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10765 do :
10766   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10767 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10768 eval as_val=\$$as_ac_Header
10769    if test "x$as_val" = x""yes; then :
10770   cat >>confdefs.h <<_ACEOF
10771 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10772 _ACEOF
10773
10774 fi
10775
10776 done
10777
10778 for ac_header in term.h
10779 do :
10780   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10781 # include <curses.h>
10782 #endif
10783
10784 "
10785 if test "x$ac_cv_header_term_h" = x""yes; then :
10786   cat >>confdefs.h <<_ACEOF
10787 #define HAVE_TERM_H 1
10788 _ACEOF
10789
10790 fi
10791
10792 done
10793
10794
10795 # ------------------------- #
10796 # Checks for declarations.  #
10797 # ------------------------- #
10798
10799
10800   # Check for presence and size of long long.
10801   ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10802 if test "x$ac_cv_type_long_long" = x""yes; then :
10803
10804 cat >>confdefs.h <<_ACEOF
10805 #define HAVE_LONG_LONG 1
10806 _ACEOF
10807
10808 # The cast to long int works around a bug in the HP C Compiler
10809 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10810 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10811 # This bug is HP SR number 8606223364.
10812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10813 $as_echo_n "checking size of long long... " >&6; }
10814 if test "${ac_cv_sizeof_long_long+set}" = set; then :
10815   $as_echo_n "(cached) " >&6
10816 else
10817   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
10818
10819 else
10820   if test "$ac_cv_type_long_long" = yes; then
10821      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10822 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10823 { as_fn_set_status 77
10824 as_fn_error "cannot compute sizeof (long long)
10825 See \`config.log' for more details." "$LINENO" 5; }; }
10826    else
10827      ac_cv_sizeof_long_long=0
10828    fi
10829 fi
10830
10831 fi
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10833 $as_echo "$ac_cv_sizeof_long_long" >&6; }
10834
10835
10836
10837 cat >>confdefs.h <<_ACEOF
10838 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10839 _ACEOF
10840
10841
10842 fi
10843
10844
10845   ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10846 if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10847   ac_have_decl=1
10848 else
10849   ac_have_decl=0
10850 fi
10851
10852 cat >>confdefs.h <<_ACEOF
10853 #define HAVE_DECL_BASENAME $ac_have_decl
10854 _ACEOF
10855 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10856 if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10857   ac_have_decl=1
10858 else
10859   ac_have_decl=0
10860 fi
10861
10862 cat >>confdefs.h <<_ACEOF
10863 #define HAVE_DECL_FFS $ac_have_decl
10864 _ACEOF
10865 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10866 if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10867   ac_have_decl=1
10868 else
10869   ac_have_decl=0
10870 fi
10871
10872 cat >>confdefs.h <<_ACEOF
10873 #define HAVE_DECL_ASPRINTF $ac_have_decl
10874 _ACEOF
10875 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10876 if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10877   ac_have_decl=1
10878 else
10879   ac_have_decl=0
10880 fi
10881
10882 cat >>confdefs.h <<_ACEOF
10883 #define HAVE_DECL_VASPRINTF $ac_have_decl
10884 _ACEOF
10885 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10886 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10887   ac_have_decl=1
10888 else
10889   ac_have_decl=0
10890 fi
10891
10892 cat >>confdefs.h <<_ACEOF
10893 #define HAVE_DECL_SNPRINTF $ac_have_decl
10894 _ACEOF
10895 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10896 if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10897   ac_have_decl=1
10898 else
10899   ac_have_decl=0
10900 fi
10901
10902 cat >>confdefs.h <<_ACEOF
10903 #define HAVE_DECL_VSNPRINTF $ac_have_decl
10904 _ACEOF
10905
10906   ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10907 if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10908   ac_have_decl=1
10909 else
10910   ac_have_decl=0
10911 fi
10912
10913 cat >>confdefs.h <<_ACEOF
10914 #define HAVE_DECL_STRTOL $ac_have_decl
10915 _ACEOF
10916 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10917 if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10918   ac_have_decl=1
10919 else
10920   ac_have_decl=0
10921 fi
10922
10923 cat >>confdefs.h <<_ACEOF
10924 #define HAVE_DECL_STRTOUL $ac_have_decl
10925 _ACEOF
10926 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10927 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10928   ac_have_decl=1
10929 else
10930   ac_have_decl=0
10931 fi
10932
10933 cat >>confdefs.h <<_ACEOF
10934 #define HAVE_DECL_STRTOLL $ac_have_decl
10935 _ACEOF
10936 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10937 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10938   ac_have_decl=1
10939 else
10940   ac_have_decl=0
10941 fi
10942
10943 cat >>confdefs.h <<_ACEOF
10944 #define HAVE_DECL_STRTOULL $ac_have_decl
10945 _ACEOF
10946
10947   ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10948 if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10949   ac_have_decl=1
10950 else
10951   ac_have_decl=0
10952 fi
10953
10954 cat >>confdefs.h <<_ACEOF
10955 #define HAVE_DECL_STRVERSCMP $ac_have_decl
10956 _ACEOF
10957
10958
10959
10960 ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10961 if test "x$ac_cv_have_decl_free" = x""yes; then :
10962   ac_have_decl=1
10963 else
10964   ac_have_decl=0
10965 fi
10966
10967 cat >>confdefs.h <<_ACEOF
10968 #define HAVE_DECL_FREE $ac_have_decl
10969 _ACEOF
10970 ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10971 if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10972   ac_have_decl=1
10973 else
10974   ac_have_decl=0
10975 fi
10976
10977 cat >>confdefs.h <<_ACEOF
10978 #define HAVE_DECL_MALLOC $ac_have_decl
10979 _ACEOF
10980 ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10981 if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10982   ac_have_decl=1
10983 else
10984   ac_have_decl=0
10985 fi
10986
10987 cat >>confdefs.h <<_ACEOF
10988 #define HAVE_DECL_REALLOC $ac_have_decl
10989 _ACEOF
10990 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10991 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10992   ac_have_decl=1
10993 else
10994   ac_have_decl=0
10995 fi
10996
10997 cat >>confdefs.h <<_ACEOF
10998 #define HAVE_DECL_SNPRINTF $ac_have_decl
10999 _ACEOF
11000
11001
11002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11003 $as_echo_n "checking for LC_MESSAGES... " >&6; }
11004 if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11005   $as_echo_n "(cached) " >&6
11006 else
11007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11008 /* end confdefs.h.  */
11009 #include <locale.h>
11010 int
11011 main ()
11012 {
11013 return LC_MESSAGES
11014   ;
11015   return 0;
11016 }
11017 _ACEOF
11018 if ac_fn_c_try_link "$LINENO"; then :
11019   am_cv_val_LC_MESSAGES=yes
11020 else
11021   am_cv_val_LC_MESSAGES=no
11022 fi
11023 rm -f core conftest.err conftest.$ac_objext \
11024     conftest$ac_exeext conftest.$ac_ext
11025 fi
11026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11027 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11028   if test $am_cv_val_LC_MESSAGES = yes; then
11029
11030 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11031
11032   fi
11033
11034
11035 # ----------------------- #
11036 # Checks for structures.  #
11037 # ----------------------- #
11038
11039 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11040 if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11041
11042 cat >>confdefs.h <<_ACEOF
11043 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
11044 _ACEOF
11045
11046
11047 fi
11048 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11049 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
11050
11051 cat >>confdefs.h <<_ACEOF
11052 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11053 _ACEOF
11054
11055
11056 fi
11057
11058
11059 # ------------------ #
11060 # Checks for types.  #
11061 # ------------------ #
11062
11063 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
11064 #include <sys/socket.h>
11065
11066 "
11067 if test "x$ac_cv_type_socklen_t" = x""yes; then :
11068
11069 cat >>confdefs.h <<_ACEOF
11070 #define HAVE_SOCKLEN_T 1
11071 _ACEOF
11072
11073
11074 fi
11075
11076
11077 # ------------------------------------- #
11078 # Checks for compiler characteristics.  #
11079 # ------------------------------------- #
11080
11081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11082 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11083 if test "${ac_cv_c_const+set}" = set; then :
11084   $as_echo_n "(cached) " >&6
11085 else
11086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11087 /* end confdefs.h.  */
11088
11089 int
11090 main ()
11091 {
11092 /* FIXME: Include the comments suggested by Paul. */
11093 #ifndef __cplusplus
11094   /* Ultrix mips cc rejects this.  */
11095   typedef int charset[2];
11096   const charset cs;
11097   /* SunOS 4.1.1 cc rejects this.  */
11098   char const *const *pcpcc;
11099   char **ppc;
11100   /* NEC SVR4.0.2 mips cc rejects this.  */
11101   struct point {int x, y;};
11102   static struct point const zero = {0,0};
11103   /* AIX XL C 1.02.0.0 rejects this.
11104      It does not let you subtract one const X* pointer from another in
11105      an arm of an if-expression whose if-part is not a constant
11106      expression */
11107   const char *g = "string";
11108   pcpcc = &g + (g ? g-g : 0);
11109   /* HPUX 7.0 cc rejects these. */
11110   ++pcpcc;
11111   ppc = (char**) pcpcc;
11112   pcpcc = (char const *const *) ppc;
11113   { /* SCO 3.2v4 cc rejects this.  */
11114     char *t;
11115     char const *s = 0 ? (char *) 0 : (char const *) 0;
11116
11117     *t++ = 0;
11118     if (s) return 0;
11119   }
11120   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11121     int x[] = {25, 17};
11122     const int *foo = &x[0];
11123     ++foo;
11124   }
11125   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11126     typedef const int *iptr;
11127     iptr p = 0;
11128     ++p;
11129   }
11130   { /* AIX XL C 1.02.0.0 rejects this saying
11131        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11132     struct s { int j; const int *ap[3]; };
11133     struct s *b; b->j = 5;
11134   }
11135   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11136     const int foo = 10;
11137     if (!foo) return 0;
11138   }
11139   return !cs[0] && !zero.x;
11140 #endif
11141
11142   ;
11143   return 0;
11144 }
11145 _ACEOF
11146 if ac_fn_c_try_compile "$LINENO"; then :
11147   ac_cv_c_const=yes
11148 else
11149   ac_cv_c_const=no
11150 fi
11151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11152 fi
11153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11154 $as_echo "$ac_cv_c_const" >&6; }
11155 if test $ac_cv_c_const = no; then
11156
11157 $as_echo "#define const /**/" >>confdefs.h
11158
11159 fi
11160
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11162 $as_echo_n "checking for inline... " >&6; }
11163 if test "${ac_cv_c_inline+set}" = set; then :
11164   $as_echo_n "(cached) " >&6
11165 else
11166   ac_cv_c_inline=no
11167 for ac_kw in inline __inline__ __inline; do
11168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11169 /* end confdefs.h.  */
11170 #ifndef __cplusplus
11171 typedef int foo_t;
11172 static $ac_kw foo_t static_foo () {return 0; }
11173 $ac_kw foo_t foo () {return 0; }
11174 #endif
11175
11176 _ACEOF
11177 if ac_fn_c_try_compile "$LINENO"; then :
11178   ac_cv_c_inline=$ac_kw
11179 fi
11180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11181   test "$ac_cv_c_inline" != no && break
11182 done
11183
11184 fi
11185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11186 $as_echo "$ac_cv_c_inline" >&6; }
11187
11188 case $ac_cv_c_inline in
11189   inline | yes) ;;
11190   *)
11191     case $ac_cv_c_inline in
11192       no) ac_val=;;
11193       *) ac_val=$ac_cv_c_inline;;
11194     esac
11195     cat >>confdefs.h <<_ACEOF
11196 #ifndef __cplusplus
11197 #define inline $ac_val
11198 #endif
11199 _ACEOF
11200     ;;
11201 esac
11202
11203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11204 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11205 if test "${ac_cv_c_bigendian+set}" = set; then :
11206   $as_echo_n "(cached) " >&6
11207 else
11208   ac_cv_c_bigendian=unknown
11209     # See if we're dealing with a universal compiler.
11210     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11211 /* end confdefs.h.  */
11212 #ifndef __APPLE_CC__
11213                not a universal capable compiler
11214              #endif
11215              typedef int dummy;
11216
11217 _ACEOF
11218 if ac_fn_c_try_compile "$LINENO"; then :
11219
11220         # Check for potential -arch flags.  It is not universal unless
11221         # there are at least two -arch flags with different values.
11222         ac_arch=
11223         ac_prev=
11224         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11225          if test -n "$ac_prev"; then
11226            case $ac_word in
11227              i?86 | x86_64 | ppc | ppc64)
11228                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11229                  ac_arch=$ac_word
11230                else
11231                  ac_cv_c_bigendian=universal
11232                  break
11233                fi
11234                ;;
11235            esac
11236            ac_prev=
11237          elif test "x$ac_word" = "x-arch"; then
11238            ac_prev=arch
11239          fi
11240        done
11241 fi
11242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11243     if test $ac_cv_c_bigendian = unknown; then
11244       # See if sys/param.h defines the BYTE_ORDER macro.
11245       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11246 /* end confdefs.h.  */
11247 #include <sys/types.h>
11248              #include <sys/param.h>
11249
11250 int
11251 main ()
11252 {
11253 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11254                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11255                      && LITTLE_ENDIAN)
11256               bogus endian macros
11257              #endif
11258
11259   ;
11260   return 0;
11261 }
11262 _ACEOF
11263 if ac_fn_c_try_compile "$LINENO"; then :
11264   # It does; now see whether it defined to BIG_ENDIAN or not.
11265          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11266 /* end confdefs.h.  */
11267 #include <sys/types.h>
11268                 #include <sys/param.h>
11269
11270 int
11271 main ()
11272 {
11273 #if BYTE_ORDER != BIG_ENDIAN
11274                  not big endian
11275                 #endif
11276
11277   ;
11278   return 0;
11279 }
11280 _ACEOF
11281 if ac_fn_c_try_compile "$LINENO"; then :
11282   ac_cv_c_bigendian=yes
11283 else
11284   ac_cv_c_bigendian=no
11285 fi
11286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11287 fi
11288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11289     fi
11290     if test $ac_cv_c_bigendian = unknown; then
11291       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11292       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11293 /* end confdefs.h.  */
11294 #include <limits.h>
11295
11296 int
11297 main ()
11298 {
11299 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11300               bogus endian macros
11301              #endif
11302
11303   ;
11304   return 0;
11305 }
11306 _ACEOF
11307 if ac_fn_c_try_compile "$LINENO"; then :
11308   # It does; now see whether it defined to _BIG_ENDIAN or not.
11309          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11310 /* end confdefs.h.  */
11311 #include <limits.h>
11312
11313 int
11314 main ()
11315 {
11316 #ifndef _BIG_ENDIAN
11317                  not big endian
11318                 #endif
11319
11320   ;
11321   return 0;
11322 }
11323 _ACEOF
11324 if ac_fn_c_try_compile "$LINENO"; then :
11325   ac_cv_c_bigendian=yes
11326 else
11327   ac_cv_c_bigendian=no
11328 fi
11329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11330 fi
11331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11332     fi
11333     if test $ac_cv_c_bigendian = unknown; then
11334       # Compile a test program.
11335       if test "$cross_compiling" = yes; then :
11336   # Try to guess by grepping values from an object file.
11337          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11338 /* end confdefs.h.  */
11339 short int ascii_mm[] =
11340                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11341                 short int ascii_ii[] =
11342                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11343                 int use_ascii (int i) {
11344                   return ascii_mm[i] + ascii_ii[i];
11345                 }
11346                 short int ebcdic_ii[] =
11347                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11348                 short int ebcdic_mm[] =
11349                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11350                 int use_ebcdic (int i) {
11351                   return ebcdic_mm[i] + ebcdic_ii[i];
11352                 }
11353                 extern int foo;
11354
11355 int
11356 main ()
11357 {
11358 return use_ascii (foo) == use_ebcdic (foo);
11359   ;
11360   return 0;
11361 }
11362 _ACEOF
11363 if ac_fn_c_try_compile "$LINENO"; then :
11364   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11365               ac_cv_c_bigendian=yes
11366             fi
11367             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11368               if test "$ac_cv_c_bigendian" = unknown; then
11369                 ac_cv_c_bigendian=no
11370               else
11371                 # finding both strings is unlikely to happen, but who knows?
11372                 ac_cv_c_bigendian=unknown
11373               fi
11374             fi
11375 fi
11376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11377 else
11378   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11379 /* end confdefs.h.  */
11380 $ac_includes_default
11381 int
11382 main ()
11383 {
11384
11385              /* Are we little or big endian?  From Harbison&Steele.  */
11386              union
11387              {
11388                long int l;
11389                char c[sizeof (long int)];
11390              } u;
11391              u.l = 1;
11392              return u.c[sizeof (long int) - 1] == 1;
11393
11394   ;
11395   return 0;
11396 }
11397 _ACEOF
11398 if ac_fn_c_try_run "$LINENO"; then :
11399   ac_cv_c_bigendian=no
11400 else
11401   ac_cv_c_bigendian=yes
11402 fi
11403 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11404   conftest.$ac_objext conftest.beam conftest.$ac_ext
11405 fi
11406
11407     fi
11408 fi
11409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11410 $as_echo "$ac_cv_c_bigendian" >&6; }
11411  case $ac_cv_c_bigendian in #(
11412    yes)
11413      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11414 ;; #(
11415    no)
11416       ;; #(
11417    universal)
11418
11419 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11420
11421      ;; #(
11422    *)
11423      as_fn_error "unknown endianness
11424  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11425  esac
11426
11427
11428 # ------------------------------ #
11429 # Checks for library functions.  #
11430 # ------------------------------ #
11431
11432 for ac_header in stdlib.h unistd.h
11433 do :
11434   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11435 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11436 eval as_val=\$$as_ac_Header
11437    if test "x$as_val" = x""yes; then :
11438   cat >>confdefs.h <<_ACEOF
11439 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11440 _ACEOF
11441
11442 fi
11443
11444 done
11445
11446 for ac_func in getpagesize
11447 do :
11448   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11449 if test "x$ac_cv_func_getpagesize" = x""yes; then :
11450   cat >>confdefs.h <<_ACEOF
11451 #define HAVE_GETPAGESIZE 1
11452 _ACEOF
11453
11454 fi
11455 done
11456
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
11458 $as_echo_n "checking for working mmap... " >&6; }
11459 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
11460   $as_echo_n "(cached) " >&6
11461 else
11462   if test "$cross_compiling" = yes; then :
11463   ac_cv_func_mmap_fixed_mapped=no
11464 else
11465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11466 /* end confdefs.h.  */
11467 $ac_includes_default
11468 /* malloc might have been renamed as rpl_malloc. */
11469 #undef malloc
11470
11471 /* Thanks to Mike Haertel and Jim Avera for this test.
11472    Here is a matrix of mmap possibilities:
11473         mmap private not fixed
11474         mmap private fixed at somewhere currently unmapped
11475         mmap private fixed at somewhere already mapped
11476         mmap shared not fixed
11477         mmap shared fixed at somewhere currently unmapped
11478         mmap shared fixed at somewhere already mapped
11479    For private mappings, we should verify that changes cannot be read()
11480    back from the file, nor mmap's back from the file at a different
11481    address.  (There have been systems where private was not correctly
11482    implemented like the infamous i386 svr4.0, and systems where the
11483    VM page cache was not coherent with the file system buffer cache
11484    like early versions of FreeBSD and possibly contemporary NetBSD.)
11485    For shared mappings, we should conversely verify that changes get
11486    propagated back to all the places they're supposed to be.
11487
11488    Grep wants private fixed already mapped.
11489    The main things grep needs to know about mmap are:
11490    * does it exist and is it safe to write into the mmap'd area
11491    * how to use it (BSD variants)  */
11492
11493 #include <fcntl.h>
11494 #include <sys/mman.h>
11495
11496 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
11497 char *malloc ();
11498 #endif
11499
11500 /* This mess was copied from the GNU getpagesize.h.  */
11501 #ifndef HAVE_GETPAGESIZE
11502 /* Assume that all systems that can run configure have sys/param.h.  */
11503 # ifndef HAVE_SYS_PARAM_H
11504 #  define HAVE_SYS_PARAM_H 1
11505 # endif
11506
11507 # ifdef _SC_PAGESIZE
11508 #  define getpagesize() sysconf(_SC_PAGESIZE)
11509 # else /* no _SC_PAGESIZE */
11510 #  ifdef HAVE_SYS_PARAM_H
11511 #   include <sys/param.h>
11512 #   ifdef EXEC_PAGESIZE
11513 #    define getpagesize() EXEC_PAGESIZE
11514 #   else /* no EXEC_PAGESIZE */
11515 #    ifdef NBPG
11516 #     define getpagesize() NBPG * CLSIZE
11517 #     ifndef CLSIZE
11518 #      define CLSIZE 1
11519 #     endif /* no CLSIZE */
11520 #    else /* no NBPG */
11521 #     ifdef NBPC
11522 #      define getpagesize() NBPC
11523 #     else /* no NBPC */
11524 #      ifdef PAGESIZE
11525 #       define getpagesize() PAGESIZE
11526 #      endif /* PAGESIZE */
11527 #     endif /* no NBPC */
11528 #    endif /* no NBPG */
11529 #   endif /* no EXEC_PAGESIZE */
11530 #  else /* no HAVE_SYS_PARAM_H */
11531 #   define getpagesize() 8192   /* punt totally */
11532 #  endif /* no HAVE_SYS_PARAM_H */
11533 # endif /* no _SC_PAGESIZE */
11534
11535 #endif /* no HAVE_GETPAGESIZE */
11536
11537 int
11538 main ()
11539 {
11540   char *data, *data2, *data3;
11541   int i, pagesize;
11542   int fd;
11543
11544   pagesize = getpagesize ();
11545
11546   /* First, make a file with some known garbage in it. */
11547   data = (char *) malloc (pagesize);
11548   if (!data)
11549     return 1;
11550   for (i = 0; i < pagesize; ++i)
11551     *(data + i) = rand ();
11552   umask (0);
11553   fd = creat ("conftest.mmap", 0600);
11554   if (fd < 0)
11555     return 1;
11556   if (write (fd, data, pagesize) != pagesize)
11557     return 1;
11558   close (fd);
11559
11560   /* Next, try to mmap the file at a fixed address which already has
11561      something else allocated at it.  If we can, also make sure that
11562      we see the same garbage.  */
11563   fd = open ("conftest.mmap", O_RDWR);
11564   if (fd < 0)
11565     return 1;
11566   data2 = (char *) malloc (2 * pagesize);
11567   if (!data2)
11568     return 1;
11569   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
11570   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11571                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
11572     return 1;
11573   for (i = 0; i < pagesize; ++i)
11574     if (*(data + i) != *(data2 + i))
11575       return 1;
11576
11577   /* Finally, make sure that changes to the mapped area do not
11578      percolate back to the file as seen by read().  (This is a bug on
11579      some variants of i386 svr4.0.)  */
11580   for (i = 0; i < pagesize; ++i)
11581     *(data2 + i) = *(data2 + i) + 1;
11582   data3 = (char *) malloc (pagesize);
11583   if (!data3)
11584     return 1;
11585   if (read (fd, data3, pagesize) != pagesize)
11586     return 1;
11587   for (i = 0; i < pagesize; ++i)
11588     if (*(data + i) != *(data3 + i))
11589       return 1;
11590   close (fd);
11591   return 0;
11592 }
11593 _ACEOF
11594 if ac_fn_c_try_run "$LINENO"; then :
11595   ac_cv_func_mmap_fixed_mapped=yes
11596 else
11597   ac_cv_func_mmap_fixed_mapped=no
11598 fi
11599 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11600   conftest.$ac_objext conftest.beam conftest.$ac_ext
11601 fi
11602
11603 fi
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11605 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
11606 if test $ac_cv_func_mmap_fixed_mapped = yes; then
11607
11608 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
11609
11610 fi
11611 rm -f conftest.mmap
11612
11613 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11614 if test "x$ac_cv_type_pid_t" = x""yes; then :
11615
11616 else
11617
11618 cat >>confdefs.h <<_ACEOF
11619 #define pid_t int
11620 _ACEOF
11621
11622 fi
11623
11624 for ac_header in vfork.h
11625 do :
11626   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11627 if test "x$ac_cv_header_vfork_h" = x""yes; then :
11628   cat >>confdefs.h <<_ACEOF
11629 #define HAVE_VFORK_H 1
11630 _ACEOF
11631
11632 fi
11633
11634 done
11635
11636 for ac_func in fork vfork
11637 do :
11638   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11639 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11640 eval as_val=\$$as_ac_var
11641    if test "x$as_val" = x""yes; then :
11642   cat >>confdefs.h <<_ACEOF
11643 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11644 _ACEOF
11645
11646 fi
11647 done
11648
11649 if test "x$ac_cv_func_fork" = xyes; then
11650   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11651 $as_echo_n "checking for working fork... " >&6; }
11652 if test "${ac_cv_func_fork_works+set}" = set; then :
11653   $as_echo_n "(cached) " >&6
11654 else
11655   if test "$cross_compiling" = yes; then :
11656   ac_cv_func_fork_works=cross
11657 else
11658   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11659 /* end confdefs.h.  */
11660 $ac_includes_default
11661 int
11662 main ()
11663 {
11664
11665           /* By Ruediger Kuhlmann. */
11666           return fork () < 0;
11667
11668   ;
11669   return 0;
11670 }
11671 _ACEOF
11672 if ac_fn_c_try_run "$LINENO"; then :
11673   ac_cv_func_fork_works=yes
11674 else
11675   ac_cv_func_fork_works=no
11676 fi
11677 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11678   conftest.$ac_objext conftest.beam conftest.$ac_ext
11679 fi
11680
11681 fi
11682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11683 $as_echo "$ac_cv_func_fork_works" >&6; }
11684
11685 else
11686   ac_cv_func_fork_works=$ac_cv_func_fork
11687 fi
11688 if test "x$ac_cv_func_fork_works" = xcross; then
11689   case $host in
11690     *-*-amigaos* | *-*-msdosdjgpp*)
11691       # Override, as these systems have only a dummy fork() stub
11692       ac_cv_func_fork_works=no
11693       ;;
11694     *)
11695       ac_cv_func_fork_works=yes
11696       ;;
11697   esac
11698   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11699 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
11700 fi
11701 ac_cv_func_vfork_works=$ac_cv_func_vfork
11702 if test "x$ac_cv_func_vfork" = xyes; then
11703   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11704 $as_echo_n "checking for working vfork... " >&6; }
11705 if test "${ac_cv_func_vfork_works+set}" = set; then :
11706   $as_echo_n "(cached) " >&6
11707 else
11708   if test "$cross_compiling" = yes; then :
11709   ac_cv_func_vfork_works=cross
11710 else
11711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11712 /* end confdefs.h.  */
11713 /* Thanks to Paul Eggert for this test.  */
11714 $ac_includes_default
11715 #include <sys/wait.h>
11716 #ifdef HAVE_VFORK_H
11717 # include <vfork.h>
11718 #endif
11719 /* On some sparc systems, changes by the child to local and incoming
11720    argument registers are propagated back to the parent.  The compiler
11721    is told about this with #include <vfork.h>, but some compilers
11722    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
11723    static variable whose address is put into a register that is
11724    clobbered by the vfork.  */
11725 static void
11726 #ifdef __cplusplus
11727 sparc_address_test (int arg)
11728 # else
11729 sparc_address_test (arg) int arg;
11730 #endif
11731 {
11732   static pid_t child;
11733   if (!child) {
11734     child = vfork ();
11735     if (child < 0) {
11736       perror ("vfork");
11737       _exit(2);
11738     }
11739     if (!child) {
11740       arg = getpid();
11741       write(-1, "", 0);
11742       _exit (arg);
11743     }
11744   }
11745 }
11746
11747 int
11748 main ()
11749 {
11750   pid_t parent = getpid ();
11751   pid_t child;
11752
11753   sparc_address_test (0);
11754
11755   child = vfork ();
11756
11757   if (child == 0) {
11758     /* Here is another test for sparc vfork register problems.  This
11759        test uses lots of local variables, at least as many local
11760        variables as main has allocated so far including compiler
11761        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
11762        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
11763        reuse the register of parent for one of the local variables,
11764        since it will think that parent can't possibly be used any more
11765        in this routine.  Assigning to the local variable will thus
11766        munge parent in the parent process.  */
11767     pid_t
11768       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11769       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11770     /* Convince the compiler that p..p7 are live; otherwise, it might
11771        use the same hardware register for all 8 local variables.  */
11772     if (p != p1 || p != p2 || p != p3 || p != p4
11773         || p != p5 || p != p6 || p != p7)
11774       _exit(1);
11775
11776     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11777        from child file descriptors.  If the child closes a descriptor
11778        before it execs or exits, this munges the parent's descriptor
11779        as well.  Test for this by closing stdout in the child.  */
11780     _exit(close(fileno(stdout)) != 0);
11781   } else {
11782     int status;
11783     struct stat st;
11784
11785     while (wait(&status) != child)
11786       ;
11787     return (
11788          /* Was there some problem with vforking?  */
11789          child < 0
11790
11791          /* Did the child fail?  (This shouldn't happen.)  */
11792          || status
11793
11794          /* Did the vfork/compiler bug occur?  */
11795          || parent != getpid()
11796
11797          /* Did the file descriptor bug occur?  */
11798          || fstat(fileno(stdout), &st) != 0
11799          );
11800   }
11801 }
11802 _ACEOF
11803 if ac_fn_c_try_run "$LINENO"; then :
11804   ac_cv_func_vfork_works=yes
11805 else
11806   ac_cv_func_vfork_works=no
11807 fi
11808 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11809   conftest.$ac_objext conftest.beam conftest.$ac_ext
11810 fi
11811
11812 fi
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11814 $as_echo "$ac_cv_func_vfork_works" >&6; }
11815
11816 fi;
11817 if test "x$ac_cv_func_fork_works" = xcross; then
11818   ac_cv_func_vfork_works=$ac_cv_func_vfork
11819   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11820 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
11821 fi
11822
11823 if test "x$ac_cv_func_vfork_works" = xyes; then
11824
11825 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
11826
11827 else
11828
11829 $as_echo "#define vfork fork" >>confdefs.h
11830
11831 fi
11832 if test "x$ac_cv_func_fork_works" = xyes; then
11833
11834 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
11835
11836 fi
11837
11838 for ac_func in getauxval getrusage getuid getgid \
11839                 pipe poll pread pread64 pwrite resize_term \
11840                 sbrk setpgid setpgrp setsid \
11841                 sigaction sigprocmask sigsetmask socketpair \
11842                 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
11843                 setrlimit getrlimit posix_madvise waitpid \
11844                 ptrace64 sigaltstack mkdtemp setns
11845 do :
11846   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11847 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11848 eval as_val=\$$as_ac_var
11849    if test "x$as_val" = x""yes; then :
11850   cat >>confdefs.h <<_ACEOF
11851 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11852 _ACEOF
11853
11854 fi
11855 done
11856
11857
11858   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11859 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11860 if test "${am_cv_langinfo_codeset+set}" = set; then :
11861   $as_echo_n "(cached) " >&6
11862 else
11863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11864 /* end confdefs.h.  */
11865 #include <langinfo.h>
11866 int
11867 main ()
11868 {
11869 char* cs = nl_langinfo(CODESET);
11870   ;
11871   return 0;
11872 }
11873 _ACEOF
11874 if ac_fn_c_try_link "$LINENO"; then :
11875   am_cv_langinfo_codeset=yes
11876 else
11877   am_cv_langinfo_codeset=no
11878 fi
11879 rm -f core conftest.err conftest.$ac_objext \
11880     conftest$ac_exeext conftest.$ac_ext
11881
11882 fi
11883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11884 $as_echo "$am_cv_langinfo_codeset" >&6; }
11885   if test $am_cv_langinfo_codeset = yes; then
11886
11887 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
11888
11889   fi
11890
11891
11892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11893 $as_echo_n "checking for ANSI C header files... " >&6; }
11894 if test "${ac_cv_header_stdc+set}" = set; then :
11895   $as_echo_n "(cached) " >&6
11896 else
11897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11898 /* end confdefs.h.  */
11899 #include <stdlib.h>
11900 #include <stdarg.h>
11901 #include <string.h>
11902 #include <float.h>
11903
11904 int
11905 main ()
11906 {
11907
11908   ;
11909   return 0;
11910 }
11911 _ACEOF
11912 if ac_fn_c_try_compile "$LINENO"; then :
11913   ac_cv_header_stdc=yes
11914 else
11915   ac_cv_header_stdc=no
11916 fi
11917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11918
11919 if test $ac_cv_header_stdc = yes; then
11920   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11921   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922 /* end confdefs.h.  */
11923 #include <string.h>
11924
11925 _ACEOF
11926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11927   $EGREP "memchr" >/dev/null 2>&1; then :
11928
11929 else
11930   ac_cv_header_stdc=no
11931 fi
11932 rm -f conftest*
11933
11934 fi
11935
11936 if test $ac_cv_header_stdc = yes; then
11937   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11939 /* end confdefs.h.  */
11940 #include <stdlib.h>
11941
11942 _ACEOF
11943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11944   $EGREP "free" >/dev/null 2>&1; then :
11945
11946 else
11947   ac_cv_header_stdc=no
11948 fi
11949 rm -f conftest*
11950
11951 fi
11952
11953 if test $ac_cv_header_stdc = yes; then
11954   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11955   if test "$cross_compiling" = yes; then :
11956   :
11957 else
11958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11959 /* end confdefs.h.  */
11960 #include <ctype.h>
11961 #include <stdlib.h>
11962 #if ((' ' & 0x0FF) == 0x020)
11963 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11964 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11965 #else
11966 # define ISLOWER(c) \
11967                    (('a' <= (c) && (c) <= 'i') \
11968                      || ('j' <= (c) && (c) <= 'r') \
11969                      || ('s' <= (c) && (c) <= 'z'))
11970 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11971 #endif
11972
11973 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11974 int
11975 main ()
11976 {
11977   int i;
11978   for (i = 0; i < 256; i++)
11979     if (XOR (islower (i), ISLOWER (i))
11980         || toupper (i) != TOUPPER (i))
11981       return 2;
11982   return 0;
11983 }
11984 _ACEOF
11985 if ac_fn_c_try_run "$LINENO"; then :
11986
11987 else
11988   ac_cv_header_stdc=no
11989 fi
11990 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11991   conftest.$ac_objext conftest.beam conftest.$ac_ext
11992 fi
11993
11994 fi
11995 fi
11996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11997 $as_echo "$ac_cv_header_stdc" >&6; }
11998 if test $ac_cv_header_stdc = yes; then
11999
12000 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12001
12002 fi
12003
12004   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12005 # for constant arguments.  Useless!
12006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12007 $as_echo_n "checking for working alloca.h... " >&6; }
12008 if test "${ac_cv_working_alloca_h+set}" = set; then :
12009   $as_echo_n "(cached) " >&6
12010 else
12011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12012 /* end confdefs.h.  */
12013 #include <alloca.h>
12014 int
12015 main ()
12016 {
12017 char *p = (char *) alloca (2 * sizeof (int));
12018                           if (p) return 0;
12019   ;
12020   return 0;
12021 }
12022 _ACEOF
12023 if ac_fn_c_try_link "$LINENO"; then :
12024   ac_cv_working_alloca_h=yes
12025 else
12026   ac_cv_working_alloca_h=no
12027 fi
12028 rm -f core conftest.err conftest.$ac_objext \
12029     conftest$ac_exeext conftest.$ac_ext
12030 fi
12031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12032 $as_echo "$ac_cv_working_alloca_h" >&6; }
12033 if test $ac_cv_working_alloca_h = yes; then
12034
12035 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12036
12037 fi
12038
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12040 $as_echo_n "checking for alloca... " >&6; }
12041 if test "${ac_cv_func_alloca_works+set}" = set; then :
12042   $as_echo_n "(cached) " >&6
12043 else
12044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12045 /* end confdefs.h.  */
12046 #ifdef __GNUC__
12047 # define alloca __builtin_alloca
12048 #else
12049 # ifdef _MSC_VER
12050 #  include <malloc.h>
12051 #  define alloca _alloca
12052 # else
12053 #  ifdef HAVE_ALLOCA_H
12054 #   include <alloca.h>
12055 #  else
12056 #   ifdef _AIX
12057  #pragma alloca
12058 #   else
12059 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12060 char *alloca ();
12061 #    endif
12062 #   endif
12063 #  endif
12064 # endif
12065 #endif
12066
12067 int
12068 main ()
12069 {
12070 char *p = (char *) alloca (1);
12071                                     if (p) return 0;
12072   ;
12073   return 0;
12074 }
12075 _ACEOF
12076 if ac_fn_c_try_link "$LINENO"; then :
12077   ac_cv_func_alloca_works=yes
12078 else
12079   ac_cv_func_alloca_works=no
12080 fi
12081 rm -f core conftest.err conftest.$ac_objext \
12082     conftest$ac_exeext conftest.$ac_ext
12083 fi
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12085 $as_echo "$ac_cv_func_alloca_works" >&6; }
12086
12087 if test $ac_cv_func_alloca_works = yes; then
12088
12089 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12090
12091 else
12092   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12093 # that cause trouble.  Some versions do not even contain alloca or
12094 # contain a buggy version.  If you still want to use their alloca,
12095 # use ar to extract alloca.o from them instead of compiling alloca.c.
12096
12097 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12098
12099 $as_echo "#define C_ALLOCA 1" >>confdefs.h
12100
12101
12102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12103 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12104 if test "${ac_cv_os_cray+set}" = set; then :
12105   $as_echo_n "(cached) " >&6
12106 else
12107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12108 /* end confdefs.h.  */
12109 #if defined CRAY && ! defined CRAY2
12110 webecray
12111 #else
12112 wenotbecray
12113 #endif
12114
12115 _ACEOF
12116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12117   $EGREP "webecray" >/dev/null 2>&1; then :
12118   ac_cv_os_cray=yes
12119 else
12120   ac_cv_os_cray=no
12121 fi
12122 rm -f conftest*
12123
12124 fi
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12126 $as_echo "$ac_cv_os_cray" >&6; }
12127 if test $ac_cv_os_cray = yes; then
12128   for ac_func in _getb67 GETB67 getb67; do
12129     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12130 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12131 eval as_val=\$$as_ac_var
12132    if test "x$as_val" = x""yes; then :
12133
12134 cat >>confdefs.h <<_ACEOF
12135 #define CRAY_STACKSEG_END $ac_func
12136 _ACEOF
12137
12138     break
12139 fi
12140
12141   done
12142 fi
12143
12144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12145 $as_echo_n "checking stack direction for C alloca... " >&6; }
12146 if test "${ac_cv_c_stack_direction+set}" = set; then :
12147   $as_echo_n "(cached) " >&6
12148 else
12149   if test "$cross_compiling" = yes; then :
12150   ac_cv_c_stack_direction=0
12151 else
12152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12153 /* end confdefs.h.  */
12154 $ac_includes_default
12155 int
12156 find_stack_direction ()
12157 {
12158   static char *addr = 0;
12159   auto char dummy;
12160   if (addr == 0)
12161     {
12162       addr = &dummy;
12163       return find_stack_direction ();
12164     }
12165   else
12166     return (&dummy > addr) ? 1 : -1;
12167 }
12168
12169 int
12170 main ()
12171 {
12172   return find_stack_direction () < 0;
12173 }
12174 _ACEOF
12175 if ac_fn_c_try_run "$LINENO"; then :
12176   ac_cv_c_stack_direction=1
12177 else
12178   ac_cv_c_stack_direction=-1
12179 fi
12180 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12181   conftest.$ac_objext conftest.beam conftest.$ac_ext
12182 fi
12183
12184 fi
12185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12186 $as_echo "$ac_cv_c_stack_direction" >&6; }
12187 cat >>confdefs.h <<_ACEOF
12188 #define STACK_DIRECTION $ac_cv_c_stack_direction
12189 _ACEOF
12190
12191
12192 fi
12193
12194
12195
12196   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12197 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12198 if test "${am_cv_langinfo_codeset+set}" = set; then :
12199   $as_echo_n "(cached) " >&6
12200 else
12201   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12202 /* end confdefs.h.  */
12203 #include <langinfo.h>
12204 int
12205 main ()
12206 {
12207 char* cs = nl_langinfo(CODESET);
12208   ;
12209   return 0;
12210 }
12211 _ACEOF
12212 if ac_fn_c_try_link "$LINENO"; then :
12213   am_cv_langinfo_codeset=yes
12214 else
12215   am_cv_langinfo_codeset=no
12216 fi
12217 rm -f core conftest.err conftest.$ac_objext \
12218     conftest$ac_exeext conftest.$ac_ext
12219
12220 fi
12221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12222 $as_echo "$am_cv_langinfo_codeset" >&6; }
12223   if test $am_cv_langinfo_codeset = yes; then
12224
12225 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12226
12227   fi
12228
12229
12230   for ac_header in linux/perf_event.h locale.h memory.h signal.h                   sys/resource.h sys/socket.h sys/syscall.h               sys/un.h sys/wait.h             thread_db.h wait.h
12231 do :
12232   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12233 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12234 eval as_val=\$$as_ac_Header
12235    if test "x$as_val" = x""yes; then :
12236   cat >>confdefs.h <<_ACEOF
12237 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12238 _ACEOF
12239
12240 fi
12241
12242 done
12243
12244
12245   for ac_func in fdwalk getrlimit pipe pipe2 socketpair
12246 do :
12247   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12248 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12249 eval as_val=\$$as_ac_var
12250    if test "x$as_val" = x""yes; then :
12251   cat >>confdefs.h <<_ACEOF
12252 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12253 _ACEOF
12254
12255 fi
12256 done
12257
12258
12259   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12260 if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12261   ac_have_decl=1
12262 else
12263   ac_have_decl=0
12264 fi
12265
12266 cat >>confdefs.h <<_ACEOF
12267 #define HAVE_DECL_STRERROR $ac_have_decl
12268 _ACEOF
12269 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12270 if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12271   ac_have_decl=1
12272 else
12273   ac_have_decl=0
12274 fi
12275
12276 cat >>confdefs.h <<_ACEOF
12277 #define HAVE_DECL_STRSTR $ac_have_decl
12278 _ACEOF
12279
12280
12281     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12282 $as_echo_n "checking for sigsetjmp... " >&6; }
12283 if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12284   $as_echo_n "(cached) " >&6
12285 else
12286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12287 /* end confdefs.h.  */
12288
12289 #include <setjmp.h>
12290
12291 int
12292 main ()
12293 {
12294 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
12295   ;
12296   return 0;
12297 }
12298 _ACEOF
12299 if ac_fn_c_try_compile "$LINENO"; then :
12300   gdb_cv_func_sigsetjmp=yes
12301 else
12302   gdb_cv_func_sigsetjmp=no
12303 fi
12304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12305 fi
12306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12307 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
12308 if test $gdb_cv_func_sigsetjmp = yes; then
12309
12310 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12311
12312 fi
12313
12314
12315 # Check the return and argument types of ptrace.
12316
12317
12318 for ac_header in sys/ptrace.h ptrace.h
12319 do :
12320   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12321 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12322 eval as_val=\$$as_ac_Header
12323    if test "x$as_val" = x""yes; then :
12324   cat >>confdefs.h <<_ACEOF
12325 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12326 _ACEOF
12327
12328 fi
12329
12330 done
12331
12332
12333 gdb_ptrace_headers='
12334 #include <sys/types.h>
12335 #if HAVE_SYS_PTRACE_H
12336 # include <sys/ptrace.h>
12337 #endif
12338 #if HAVE_UNISTD_H
12339 # include <unistd.h>
12340 #endif
12341 '
12342 # There is no point in checking if we don't have a prototype.
12343 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
12344 "
12345 if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12346   ac_have_decl=1
12347 else
12348   ac_have_decl=0
12349 fi
12350
12351 cat >>confdefs.h <<_ACEOF
12352 #define HAVE_DECL_PTRACE $ac_have_decl
12353 _ACEOF
12354 if test $ac_have_decl = 1; then :
12355
12356 else
12357
12358   : ${gdb_cv_func_ptrace_ret='int'}
12359   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12360
12361 fi
12362
12363 # Check return type.  Varargs (used on GNU/Linux) conflict with the
12364 # empty argument list, so check for that explicitly.
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12366 $as_echo_n "checking return type of ptrace... " >&6; }
12367 if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12368   $as_echo_n "(cached) " >&6
12369 else
12370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12371 /* end confdefs.h.  */
12372 $gdb_ptrace_headers
12373 int
12374 main ()
12375 {
12376 extern long ptrace (enum __ptrace_request, ...);
12377   ;
12378   return 0;
12379 }
12380 _ACEOF
12381 if ac_fn_c_try_compile "$LINENO"; then :
12382   gdb_cv_func_ptrace_ret='long'
12383 else
12384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12385 /* end confdefs.h.  */
12386 $gdb_ptrace_headers
12387 int
12388 main ()
12389 {
12390 extern int ptrace ();
12391   ;
12392   return 0;
12393 }
12394 _ACEOF
12395 if ac_fn_c_try_compile "$LINENO"; then :
12396   gdb_cv_func_ptrace_ret='int'
12397 else
12398   gdb_cv_func_ptrace_ret='long'
12399 fi
12400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12401 fi
12402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12403 fi
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12405 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
12406
12407 cat >>confdefs.h <<_ACEOF
12408 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
12409 _ACEOF
12410
12411 # Check argument types.
12412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12413 $as_echo_n "checking types of arguments for ptrace... " >&6; }
12414 if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12415   $as_echo_n "(cached) " >&6
12416 else
12417
12418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12419 /* end confdefs.h.  */
12420 $gdb_ptrace_headers
12421 int
12422 main ()
12423 {
12424 extern long ptrace (enum __ptrace_request, ...);
12425   ;
12426   return 0;
12427 }
12428 _ACEOF
12429 if ac_fn_c_try_compile "$LINENO"; then :
12430   gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
12431 else
12432
12433 for gdb_arg1 in 'int' 'long'; do
12434  for gdb_arg2 in 'pid_t' 'int' 'long'; do
12435   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
12436    for gdb_arg4 in 'int' 'long' 'void *'; do
12437      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12438 /* end confdefs.h.  */
12439 $gdb_ptrace_headers
12440 int
12441 main ()
12442 {
12443
12444 extern $gdb_cv_func_ptrace_ret
12445   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12446
12447   ;
12448   return 0;
12449 }
12450 _ACEOF
12451 if ac_fn_c_try_compile "$LINENO"; then :
12452   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12453     break 4;
12454 fi
12455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12456     for gdb_arg5 in 'int *' 'int' 'long'; do
12457      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12458 /* end confdefs.h.  */
12459 $gdb_ptrace_headers
12460 int
12461 main ()
12462 {
12463
12464 extern $gdb_cv_func_ptrace_ret
12465   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12466
12467   ;
12468   return 0;
12469 }
12470 _ACEOF
12471 if ac_fn_c_try_compile "$LINENO"; then :
12472
12473 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12474     break 5;
12475 fi
12476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12477     done
12478    done
12479   done
12480  done
12481 done
12482 # Provide a safe default value.
12483 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12484
12485 fi
12486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12487 fi
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12489 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
12490 ac_save_IFS=$IFS; IFS=','
12491 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12492 IFS=$ac_save_IFS
12493 shift
12494
12495 cat >>confdefs.h <<_ACEOF
12496 #define PTRACE_TYPE_ARG1 $1
12497 _ACEOF
12498
12499
12500 cat >>confdefs.h <<_ACEOF
12501 #define PTRACE_TYPE_ARG3 $3
12502 _ACEOF
12503
12504
12505 cat >>confdefs.h <<_ACEOF
12506 #define PTRACE_TYPE_ARG4 $4
12507 _ACEOF
12508
12509 if test -n "$5"; then
12510
12511 cat >>confdefs.h <<_ACEOF
12512 #define PTRACE_TYPE_ARG5 $5
12513 _ACEOF
12514
12515 fi
12516
12517
12518 if test "$cross_compiling" = no; then
12519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12520 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12521 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12522   $as_echo_n "(cached) " >&6
12523 else
12524   if test "$cross_compiling" = yes; then :
12525   as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
12526 else
12527   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12528 /* end confdefs.h.  */
12529 $ac_includes_default
12530 int
12531 main ()
12532 {
12533 /* If this system has a BSD-style setpgrp which takes arguments,
12534   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12535   exit successfully. */
12536   return setpgrp (1,1) != -1;
12537   ;
12538   return 0;
12539 }
12540 _ACEOF
12541 if ac_fn_c_try_run "$LINENO"; then :
12542   ac_cv_func_setpgrp_void=no
12543 else
12544   ac_cv_func_setpgrp_void=yes
12545 fi
12546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12547   conftest.$ac_objext conftest.beam conftest.$ac_ext
12548 fi
12549
12550 fi
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12552 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
12553 if test $ac_cv_func_setpgrp_void = yes; then
12554
12555 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
12556
12557 fi
12558
12559 else
12560   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12561 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12562 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12563   $as_echo_n "(cached) " >&6
12564 else
12565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12566 /* end confdefs.h.  */
12567
12568 #include <unistd.h>
12569
12570 int
12571 main ()
12572 {
12573
12574   if (setpgrp(1,1) == -1)
12575     exit (0);
12576   else
12577     exit (1);
12578
12579   ;
12580   return 0;
12581 }
12582 _ACEOF
12583 if ac_fn_c_try_compile "$LINENO"; then :
12584   ac_cv_func_setpgrp_void=no
12585 else
12586   ac_cv_func_setpgrp_void=yes
12587 fi
12588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12589 fi
12590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12591 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
12592 if test $ac_cv_func_setpgrp_void = yes; then
12593   $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
12594
12595 fi
12596 fi
12597
12598 # Assume we'll default to using the included libiberty regex.
12599 gdb_use_included_regex=yes
12600
12601 # However, if the system regex is GNU regex, then default to *not*
12602 # using the included regex.
12603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12604 $as_echo_n "checking for GNU regex... " >&6; }
12605 if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12606   $as_echo_n "(cached) " >&6
12607 else
12608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12609 /* end confdefs.h.  */
12610 #include <gnu-versions.h>
12611 int
12612 main ()
12613 {
12614 #define REGEX_INTERFACE_VERSION 1
12615 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12616 # error "Version mismatch"
12617 #endif
12618   ;
12619   return 0;
12620 }
12621 _ACEOF
12622 if ac_fn_c_try_compile "$LINENO"; then :
12623   gdb_cv_have_gnu_regex=yes
12624 else
12625   gdb_cv_have_gnu_regex=no
12626 fi
12627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12628 fi
12629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12630 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
12631 if test $gdb_cv_have_gnu_regex = yes; then
12632   gdb_use_included_regex=no
12633 fi
12634
12635
12636 # Check whether --with-included-regex was given.
12637 if test "${with_included_regex+set}" = set; then :
12638   withval=$with_included_regex; gdb_with_regex=$withval
12639 else
12640   gdb_with_regex=$gdb_use_included_regex
12641 fi
12642
12643 if test "$gdb_with_regex" = yes; then
12644
12645 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12646
12647 fi
12648
12649 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12650 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12651 #include <sys/proc.h>
12652
12653 "
12654 if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
12655
12656 cat >>confdefs.h <<_ACEOF
12657 #define HAVE_STRUCT_THREAD_TD_PCB 1
12658 _ACEOF
12659
12660
12661 fi
12662
12663
12664 # See if <sys/lwp.h> defines `struct lwp`.
12665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12666 $as_echo_n "checking for struct lwp... " >&6; }
12667 if test "${gdb_cv_struct_lwp+set}" = set; then :
12668   $as_echo_n "(cached) " >&6
12669 else
12670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12671 /* end confdefs.h.  */
12672 #include <sys/param.h>
12673 #include <sys/lwp.h>
12674 int
12675 main ()
12676 {
12677 struct lwp l;
12678   ;
12679   return 0;
12680 }
12681 _ACEOF
12682 if ac_fn_c_try_compile "$LINENO"; then :
12683   gdb_cv_struct_lwp=yes
12684 else
12685   gdb_cv_struct_lwp=no
12686 fi
12687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12688 fi
12689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12690 $as_echo "$gdb_cv_struct_lwp" >&6; }
12691 if test $gdb_cv_struct_lwp = yes; then
12692
12693 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
12694
12695 fi
12696
12697 # See if <machine/reg.h> degines `struct reg'.
12698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12699 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12700 if test "${gdb_cv_struct_reg+set}" = set; then :
12701   $as_echo_n "(cached) " >&6
12702 else
12703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12704 /* end confdefs.h.  */
12705 #include <sys/types.h>
12706 #include <machine/reg.h>
12707 int
12708 main ()
12709 {
12710 struct reg r;
12711   ;
12712   return 0;
12713 }
12714 _ACEOF
12715 if ac_fn_c_try_compile "$LINENO"; then :
12716   gdb_cv_struct_reg=yes
12717 else
12718   gdb_cv_struct_reg=no
12719 fi
12720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12721 fi
12722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12723 $as_echo "$gdb_cv_struct_reg" >&6; }
12724 if test $gdb_cv_struct_reg = yes; then
12725
12726 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
12727
12728 fi
12729
12730 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12731 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
12732 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
12733 #include <machine/reg.h>
12734 "
12735 if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
12736
12737 cat >>confdefs.h <<_ACEOF
12738 #define HAVE_STRUCT_REG_R_FS 1
12739 _ACEOF
12740
12741
12742 fi
12743 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
12744 #include <machine/reg.h>
12745 "
12746 if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
12747
12748 cat >>confdefs.h <<_ACEOF
12749 #define HAVE_STRUCT_REG_R_GS 1
12750 _ACEOF
12751
12752
12753 fi
12754
12755
12756 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
12757 # Older amd64 Linux's don't have the fs_base and gs_base members of
12758 # `struct user_regs_struct'.
12759 ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
12760 "
12761 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
12762
12763 cat >>confdefs.h <<_ACEOF
12764 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
12765 _ACEOF
12766
12767
12768 fi
12769 ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
12770 "
12771 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
12772
12773 cat >>confdefs.h <<_ACEOF
12774 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
12775 _ACEOF
12776
12777
12778 fi
12779
12780
12781 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
12782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12783 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12784 if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12785   $as_echo_n "(cached) " >&6
12786 else
12787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12788 /* end confdefs.h.  */
12789 #include <sys/ptrace.h>
12790 int
12791 main ()
12792 {
12793 PTRACE_GETREGS;
12794   ;
12795   return 0;
12796 }
12797 _ACEOF
12798 if ac_fn_c_try_compile "$LINENO"; then :
12799   gdb_cv_have_ptrace_getregs=yes
12800 else
12801   gdb_cv_have_ptrace_getregs=no
12802 fi
12803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12804 fi
12805
12806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
12807 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
12808 if test $gdb_cv_have_ptrace_getregs = yes; then
12809
12810 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
12811
12812 fi
12813
12814 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
12815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
12816 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
12817 if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
12818   $as_echo_n "(cached) " >&6
12819 else
12820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12821 /* end confdefs.h.  */
12822 #include <sys/ptrace.h>
12823 int
12824 main ()
12825 {
12826 PTRACE_GETFPXREGS;
12827   ;
12828   return 0;
12829 }
12830 _ACEOF
12831 if ac_fn_c_try_compile "$LINENO"; then :
12832   gdb_cv_have_ptrace_getfpxregs=yes
12833 else
12834   gdb_cv_have_ptrace_getfpxregs=no
12835 fi
12836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12837 fi
12838
12839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
12840 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
12841 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
12842
12843 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
12844
12845 fi
12846
12847 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
12848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
12849 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
12850 if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
12851   $as_echo_n "(cached) " >&6
12852 else
12853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12854 /* end confdefs.h.  */
12855 #include <sys/types.h>
12856 #include <sys/ptrace.h>
12857 int
12858 main ()
12859 {
12860 PT_GETDBREGS;
12861   ;
12862   return 0;
12863 }
12864 _ACEOF
12865 if ac_fn_c_try_compile "$LINENO"; then :
12866   gdb_cv_have_pt_getdbregs=yes
12867 else
12868   gdb_cv_have_pt_getdbregs=no
12869 fi
12870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12871 fi
12872
12873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
12874 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
12875 if test $gdb_cv_have_pt_getdbregs = yes; then
12876
12877 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
12878
12879 fi
12880
12881 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
12882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
12883 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
12884 if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
12885   $as_echo_n "(cached) " >&6
12886 else
12887   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12888 /* end confdefs.h.  */
12889 #include <sys/types.h>
12890 #include <sys/ptrace.h>
12891 int
12892 main ()
12893 {
12894 PT_GETXMMREGS;
12895   ;
12896   return 0;
12897 }
12898 _ACEOF
12899 if ac_fn_c_try_compile "$LINENO"; then :
12900   gdb_cv_have_pt_getxmmregs=yes
12901 else
12902   gdb_cv_have_pt_getxmmregs=no
12903 fi
12904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12905 fi
12906
12907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12908 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
12909 if test $gdb_cv_have_pt_getxmmregs = yes; then
12910
12911 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
12912
12913 fi
12914
12915 # See if <sys/ptrace.h> supports LWP names on FreeBSD
12916 # Older FreeBSD versions don't have the pl_tdname member of
12917 # `struct ptrace_lwpinfo'.
12918 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
12919 "
12920 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
12921
12922 cat >>confdefs.h <<_ACEOF
12923 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
12924 _ACEOF
12925
12926
12927 fi
12928
12929
12930 # See if <sys/ptrace.h> supports syscall fields on FreeBSD.  The
12931 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
12932 # FreeBSD 10.3.
12933 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>
12934 "
12935 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
12936
12937 cat >>confdefs.h <<_ACEOF
12938 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
12939 _ACEOF
12940
12941
12942 fi
12943
12944
12945 # Detect which type of /proc is in use, such as for Solaris.
12946
12947 if test "${target}" = "${host}"; then
12948   case "${host}" in
12949   *-*-sysv4.2* | *-*-sysv5* )
12950
12951 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
12952
12953       ;;
12954   *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
12955
12956 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
12957
12958       ;;
12959   mips-sgi-irix5*)
12960       # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
12961
12962 $as_echo "#define _KMEMUSER 1" >>confdefs.h
12963
12964       ;;
12965   esac
12966 fi
12967
12968 if test "$ac_cv_header_sys_procfs_h" = yes; then
12969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
12970 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
12971  if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
12972   $as_echo_n "(cached) " >&6
12973 else
12974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12975 /* end confdefs.h.  */
12976
12977 #define _SYSCALL32
12978 /* Needed for new procfs interface on sparc-solaris.  */
12979 #define _STRUCTURED_PROC 1
12980 #include <sys/procfs.h>
12981 int
12982 main ()
12983 {
12984 gregset_t avar
12985   ;
12986   return 0;
12987 }
12988 _ACEOF
12989 if ac_fn_c_try_compile "$LINENO"; then :
12990   bfd_cv_have_sys_procfs_type_gregset_t=yes
12991 else
12992   bfd_cv_have_sys_procfs_type_gregset_t=no
12993
12994 fi
12995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12996 fi
12997
12998  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
12999
13000 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
13001
13002  fi
13003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13004 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
13005
13006   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13007 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13008  if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13009   $as_echo_n "(cached) " >&6
13010 else
13011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13012 /* end confdefs.h.  */
13013
13014 #define _SYSCALL32
13015 /* Needed for new procfs interface on sparc-solaris.  */
13016 #define _STRUCTURED_PROC 1
13017 #include <sys/procfs.h>
13018 int
13019 main ()
13020 {
13021 fpregset_t avar
13022   ;
13023   return 0;
13024 }
13025 _ACEOF
13026 if ac_fn_c_try_compile "$LINENO"; then :
13027   bfd_cv_have_sys_procfs_type_fpregset_t=yes
13028 else
13029   bfd_cv_have_sys_procfs_type_fpregset_t=no
13030
13031 fi
13032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13033 fi
13034
13035  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
13036
13037 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
13038
13039  fi
13040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13041 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
13042
13043   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13044 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13045  if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13046   $as_echo_n "(cached) " >&6
13047 else
13048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13049 /* end confdefs.h.  */
13050
13051 #define _SYSCALL32
13052 /* Needed for new procfs interface on sparc-solaris.  */
13053 #define _STRUCTURED_PROC 1
13054 #include <sys/procfs.h>
13055 int
13056 main ()
13057 {
13058 prgregset_t avar
13059   ;
13060   return 0;
13061 }
13062 _ACEOF
13063 if ac_fn_c_try_compile "$LINENO"; then :
13064   bfd_cv_have_sys_procfs_type_prgregset_t=yes
13065 else
13066   bfd_cv_have_sys_procfs_type_prgregset_t=no
13067
13068 fi
13069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13070 fi
13071
13072  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
13073
13074 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
13075
13076  fi
13077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13078 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
13079
13080   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13081 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13082  if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13083   $as_echo_n "(cached) " >&6
13084 else
13085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13086 /* end confdefs.h.  */
13087
13088 #define _SYSCALL32
13089 /* Needed for new procfs interface on sparc-solaris.  */
13090 #define _STRUCTURED_PROC 1
13091 #include <sys/procfs.h>
13092 int
13093 main ()
13094 {
13095 prfpregset_t avar
13096   ;
13097   return 0;
13098 }
13099 _ACEOF
13100 if ac_fn_c_try_compile "$LINENO"; then :
13101   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
13102 else
13103   bfd_cv_have_sys_procfs_type_prfpregset_t=no
13104
13105 fi
13106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13107 fi
13108
13109  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
13110
13111 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
13112
13113  fi
13114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13115 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
13116
13117   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13118 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13119  if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13120   $as_echo_n "(cached) " >&6
13121 else
13122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13123 /* end confdefs.h.  */
13124
13125 #define _SYSCALL32
13126 /* Needed for new procfs interface on sparc-solaris.  */
13127 #define _STRUCTURED_PROC 1
13128 #include <sys/procfs.h>
13129 int
13130 main ()
13131 {
13132 prgregset32_t avar
13133   ;
13134   return 0;
13135 }
13136 _ACEOF
13137 if ac_fn_c_try_compile "$LINENO"; then :
13138   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
13139 else
13140   bfd_cv_have_sys_procfs_type_prgregset32_t=no
13141
13142 fi
13143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13144 fi
13145
13146  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
13147
13148 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
13149
13150  fi
13151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13152 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
13153
13154   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13155 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13156  if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13157   $as_echo_n "(cached) " >&6
13158 else
13159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13160 /* end confdefs.h.  */
13161
13162 #define _SYSCALL32
13163 /* Needed for new procfs interface on sparc-solaris.  */
13164 #define _STRUCTURED_PROC 1
13165 #include <sys/procfs.h>
13166 int
13167 main ()
13168 {
13169 lwpid_t avar
13170   ;
13171   return 0;
13172 }
13173 _ACEOF
13174 if ac_fn_c_try_compile "$LINENO"; then :
13175   bfd_cv_have_sys_procfs_type_lwpid_t=yes
13176 else
13177   bfd_cv_have_sys_procfs_type_lwpid_t=no
13178
13179 fi
13180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13181 fi
13182
13183  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
13184
13185 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
13186
13187  fi
13188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13189 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
13190
13191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13192 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13193  if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13194   $as_echo_n "(cached) " >&6
13195 else
13196   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13197 /* end confdefs.h.  */
13198
13199 #define _SYSCALL32
13200 /* Needed for new procfs interface on sparc-solaris.  */
13201 #define _STRUCTURED_PROC 1
13202 #include <sys/procfs.h>
13203 int
13204 main ()
13205 {
13206 psaddr_t avar
13207   ;
13208   return 0;
13209 }
13210 _ACEOF
13211 if ac_fn_c_try_compile "$LINENO"; then :
13212   bfd_cv_have_sys_procfs_type_psaddr_t=yes
13213 else
13214   bfd_cv_have_sys_procfs_type_psaddr_t=no
13215
13216 fi
13217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13218 fi
13219
13220  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
13221
13222 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
13223
13224  fi
13225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13226 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
13227
13228   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13229 $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13230  if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13231   $as_echo_n "(cached) " >&6
13232 else
13233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13234 /* end confdefs.h.  */
13235
13236 #define _SYSCALL32
13237 /* Needed for new procfs interface on sparc-solaris.  */
13238 #define _STRUCTURED_PROC 1
13239 #include <sys/procfs.h>
13240 int
13241 main ()
13242 {
13243 prsysent_t avar
13244   ;
13245   return 0;
13246 }
13247 _ACEOF
13248 if ac_fn_c_try_compile "$LINENO"; then :
13249   bfd_cv_have_sys_procfs_type_prsysent_t=yes
13250 else
13251   bfd_cv_have_sys_procfs_type_prsysent_t=no
13252
13253 fi
13254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13255 fi
13256
13257  if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
13258
13259 $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
13260
13261  fi
13262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13263 $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
13264
13265   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13266 $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13267  if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13268   $as_echo_n "(cached) " >&6
13269 else
13270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13271 /* end confdefs.h.  */
13272
13273 #define _SYSCALL32
13274 /* Needed for new procfs interface on sparc-solaris.  */
13275 #define _STRUCTURED_PROC 1
13276 #include <sys/procfs.h>
13277 int
13278 main ()
13279 {
13280 pr_sigset_t avar
13281   ;
13282   return 0;
13283 }
13284 _ACEOF
13285 if ac_fn_c_try_compile "$LINENO"; then :
13286   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
13287 else
13288   bfd_cv_have_sys_procfs_type_pr_sigset_t=no
13289
13290 fi
13291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13292 fi
13293
13294  if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
13295
13296 $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
13297
13298  fi
13299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13300 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
13301
13302   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13303 $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13304  if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13305   $as_echo_n "(cached) " >&6
13306 else
13307   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13308 /* end confdefs.h.  */
13309
13310 #define _SYSCALL32
13311 /* Needed for new procfs interface on sparc-solaris.  */
13312 #define _STRUCTURED_PROC 1
13313 #include <sys/procfs.h>
13314 int
13315 main ()
13316 {
13317 pr_sigaction64_t avar
13318   ;
13319   return 0;
13320 }
13321 _ACEOF
13322 if ac_fn_c_try_compile "$LINENO"; then :
13323   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
13324 else
13325   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
13326
13327 fi
13328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13329 fi
13330
13331  if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
13332
13333 $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
13334
13335  fi
13336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13337 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
13338
13339   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13340 $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13341  if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13342   $as_echo_n "(cached) " >&6
13343 else
13344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13345 /* end confdefs.h.  */
13346
13347 #define _SYSCALL32
13348 /* Needed for new procfs interface on sparc-solaris.  */
13349 #define _STRUCTURED_PROC 1
13350 #include <sys/procfs.h>
13351 int
13352 main ()
13353 {
13354 pr_siginfo64_t avar
13355   ;
13356   return 0;
13357 }
13358 _ACEOF
13359 if ac_fn_c_try_compile "$LINENO"; then :
13360   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13361 else
13362   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
13363
13364 fi
13365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13366 fi
13367
13368  if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
13369
13370 $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
13371
13372  fi
13373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13374 $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
13375
13376
13377
13378
13379
13380   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
13381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13382 $as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13383     if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13384   $as_echo_n "(cached) " >&6
13385 else
13386   if test "$cross_compiling" = yes; then :
13387   gdb_cv_prfpregset_t_broken=yes
13388 else
13389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13390 /* end confdefs.h.  */
13391 #include <sys/procfs.h>
13392        int main ()
13393        {
13394          if (sizeof (prfpregset_t) == sizeof (void *))
13395            return 1;
13396          return 0;
13397        }
13398 _ACEOF
13399 if ac_fn_c_try_run "$LINENO"; then :
13400   gdb_cv_prfpregset_t_broken=no
13401 else
13402   gdb_cv_prfpregset_t_broken=yes
13403 fi
13404 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13405   conftest.$ac_objext conftest.beam conftest.$ac_ext
13406 fi
13407
13408 fi
13409
13410     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13411 $as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
13412     if test $gdb_cv_prfpregset_t_broken = yes; then
13413
13414 $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
13415
13416     fi
13417   fi
13418 fi
13419
13420 # Check if the compiler supports the `long long' type.
13421
13422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13423 $as_echo_n "checking for long long support in compiler... " >&6; }
13424 if test "${gdb_cv_c_long_long+set}" = set; then :
13425   $as_echo_n "(cached) " >&6
13426 else
13427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13428 /* end confdefs.h.  */
13429 extern long long foo;
13430 int
13431 main ()
13432 {
13433 switch (foo & 2) { case 0: return 1; }
13434   ;
13435   return 0;
13436 }
13437 _ACEOF
13438 if ac_fn_c_try_compile "$LINENO"; then :
13439   gdb_cv_c_long_long=yes
13440 else
13441   gdb_cv_c_long_long=no
13442 fi
13443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13444 fi
13445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13446 $as_echo "$gdb_cv_c_long_long" >&6; }
13447 if test $gdb_cv_c_long_long != yes; then
13448   # libdecnumber requires long long.
13449   as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
13450 fi
13451
13452 # Check if the compiler and runtime support printing long longs.
13453
13454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13455 $as_echo_n "checking for long long support in printf... " >&6; }
13456 if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13457   $as_echo_n "(cached) " >&6
13458 else
13459   if test "$cross_compiling" = yes; then :
13460   gdb_cv_printf_has_long_long=no
13461 else
13462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13463 /* end confdefs.h.  */
13464 $ac_includes_default
13465 int
13466 main ()
13467 {
13468 char buf[32];
13469   long long l = 0;
13470   l = (l << 16) + 0x0123;
13471   l = (l << 16) + 0x4567;
13472   l = (l << 16) + 0x89ab;
13473   l = (l << 16) + 0xcdef;
13474   sprintf (buf, "0x%016llx", l);
13475   return (strcmp ("0x0123456789abcdef", buf));
13476   ;
13477   return 0;
13478 }
13479 _ACEOF
13480 if ac_fn_c_try_run "$LINENO"; then :
13481   gdb_cv_printf_has_long_long=yes
13482 else
13483   gdb_cv_printf_has_long_long=no
13484 fi
13485 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13486   conftest.$ac_objext conftest.beam conftest.$ac_ext
13487 fi
13488
13489 fi
13490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13491 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
13492 if test $gdb_cv_printf_has_long_long = yes; then
13493
13494 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
13495
13496 fi
13497
13498 # Check if the compiler and runtime support printing decfloats.
13499
13500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13501 $as_echo_n "checking for decfloat support in printf... " >&6; }
13502 if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13503   $as_echo_n "(cached) " >&6
13504 else
13505   if test "$cross_compiling" = yes; then :
13506   gdb_cv_printf_has_decfloat=no
13507 else
13508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13509 /* end confdefs.h.  */
13510 $ac_includes_default
13511 int
13512 main ()
13513 {
13514 char buf[64];
13515   _Decimal32 d32 = 1.2345df;
13516   _Decimal64 d64 = 1.2345dd;
13517   _Decimal128 d128 = 1.2345dl;
13518   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13519   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13520   ;
13521   return 0;
13522 }
13523 _ACEOF
13524 if ac_fn_c_try_run "$LINENO"; then :
13525   gdb_cv_printf_has_decfloat=yes
13526 else
13527   gdb_cv_printf_has_decfloat=no
13528 fi
13529 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13530   conftest.$ac_objext conftest.beam conftest.$ac_ext
13531 fi
13532
13533 fi
13534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
13535 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
13536 if test $gdb_cv_printf_has_decfloat = yes; then
13537
13538 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
13539
13540 fi
13541
13542 # Check if the compiler supports the `long double' type.  We can't use
13543 # AC_C_LONG_DOUBLE because that one does additional checks on the
13544 # constants defined in <float.h> that fail on some systems,
13545 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
13546
13547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
13548 $as_echo_n "checking for long double support in compiler... " >&6; }
13549 if test "${gdb_cv_c_long_double+set}" = set; then :
13550   $as_echo_n "(cached) " >&6
13551 else
13552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13553 /* end confdefs.h.  */
13554 long double foo;
13555 _ACEOF
13556 if ac_fn_c_try_compile "$LINENO"; then :
13557   gdb_cv_c_long_double=yes
13558 else
13559   gdb_cv_c_long_double=no
13560 fi
13561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13562 fi
13563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
13564 $as_echo "$gdb_cv_c_long_double" >&6; }
13565 if test $gdb_cv_c_long_double = yes; then
13566
13567 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
13568
13569 fi
13570
13571 # Check if the compiler and runtime support printing long doubles.
13572
13573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
13574 $as_echo_n "checking for long double support in printf... " >&6; }
13575 if test "${gdb_cv_printf_has_long_double+set}" = set; then :
13576   $as_echo_n "(cached) " >&6
13577 else
13578   if test "$cross_compiling" = yes; then :
13579   gdb_cv_printf_has_long_double=no
13580 else
13581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13582 /* end confdefs.h.  */
13583 $ac_includes_default
13584 int
13585 main ()
13586 {
13587 char buf[16];
13588   long double f = 3.141592653;
13589   sprintf (buf, "%Lg", f);
13590   return (strncmp ("3.14159", buf, 7));
13591   ;
13592   return 0;
13593 }
13594 _ACEOF
13595 if ac_fn_c_try_run "$LINENO"; then :
13596   gdb_cv_printf_has_long_double=yes
13597 else
13598   gdb_cv_printf_has_long_double=no
13599 fi
13600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13601   conftest.$ac_objext conftest.beam conftest.$ac_ext
13602 fi
13603
13604 fi
13605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
13606 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
13607 if test $gdb_cv_printf_has_long_double = yes; then
13608
13609 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
13610
13611 fi
13612
13613 # Check if the compiler and runtime support scanning long doubles.
13614
13615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
13616 $as_echo_n "checking for long double support in scanf... " >&6; }
13617 if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
13618   $as_echo_n "(cached) " >&6
13619 else
13620   if test "$cross_compiling" = yes; then :
13621   gdb_cv_scanf_has_long_double=no
13622 else
13623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13624 /* end confdefs.h.  */
13625 #include <stdio.h>
13626 int
13627 main ()
13628 {
13629 char *buf = "3.141592653";
13630   long double f = 0;
13631   sscanf (buf, "%Lg", &f);
13632   return !(f > 3.14159 && f < 3.14160);
13633   ;
13634   return 0;
13635 }
13636 _ACEOF
13637 if ac_fn_c_try_run "$LINENO"; then :
13638   gdb_cv_scanf_has_long_double=yes
13639 else
13640   gdb_cv_scanf_has_long_double=no
13641 fi
13642 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13643   conftest.$ac_objext conftest.beam conftest.$ac_ext
13644 fi
13645
13646 fi
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
13648 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
13649 if test $gdb_cv_scanf_has_long_double = yes; then
13650
13651 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
13652
13653 fi
13654
13655 case ${host_os} in
13656 aix*)
13657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
13658 $as_echo_n "checking for -bbigtoc option... " >&6; }
13659 if test "${gdb_cv_bigtoc+set}" = set; then :
13660   $as_echo_n "(cached) " >&6
13661 else
13662
13663     SAVE_LDFLAGS=$LDFLAGS
13664
13665     case $GCC in
13666     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
13667     *) gdb_cv_bigtoc=-bbigtoc ;;
13668     esac
13669
13670     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
13671     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13672 /* end confdefs.h.  */
13673
13674 int
13675 main ()
13676 {
13677 int i;
13678   ;
13679   return 0;
13680 }
13681 _ACEOF
13682 if ac_fn_c_try_link "$LINENO"; then :
13683
13684 else
13685   gdb_cv_bigtoc=
13686 fi
13687 rm -f core conftest.err conftest.$ac_objext \
13688     conftest$ac_exeext conftest.$ac_ext
13689     LDFLAGS="${SAVE_LDFLAGS}"
13690
13691 fi
13692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
13693 $as_echo "$gdb_cv_bigtoc" >&6; }
13694   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
13695   ;;
13696 esac
13697
13698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
13699 $as_echo_n "checking for the dynamic export flag... " >&6; }
13700 dynamic_list=false
13701 if test "${gdb_native}" = yes; then
13702    # The dynamically loaded libthread_db needs access to symbols in the gdb
13703    # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
13704    # may not be supported there.
13705    old_LDFLAGS="$LDFLAGS"
13706    # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
13707    RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
13708    LDFLAGS="$LDFLAGS $RDYNAMIC"
13709    if test "${have_libpython}" = no; then
13710      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13711 /* end confdefs.h.  */
13712
13713 int
13714 main ()
13715 {
13716
13717   ;
13718   return 0;
13719 }
13720 _ACEOF
13721 if ac_fn_c_try_link "$LINENO"; then :
13722   dynamic_list=true
13723 fi
13724 rm -f core conftest.err conftest.$ac_objext \
13725     conftest$ac_exeext conftest.$ac_ext
13726    else
13727      # Workaround http://bugs.python.org/issue4434 where static
13728      # libpythonX.Y.a would get its symbols required for
13729      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
13730      # Problem does not happen for the recommended libpythonX.Y.so linkage.
13731
13732      # Note the workaround for Python
13733      # http://bugs.python.org/issue10112 earlier has removed
13734      # -export-dynamic from PYTHON_LIBS.  That's exactly what we want
13735      # here too, as otherwise it'd make this -Wl,--dynamic-list test
13736      # always pass.
13737      old_CFLAGS="$CFLAGS"
13738      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
13739      old_LIBS="$LIBS"
13740      LIBS="$LIBS $PYTHON_LIBS"
13741      old_CPPFLAGS="$CPPFLAGS"
13742      CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
13743      if test "$cross_compiling" = yes; then :
13744   true
13745 else
13746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13747 /* end confdefs.h.  */
13748 #include "Python.h"
13749 int
13750 main ()
13751 {
13752 int err;
13753           Py_Initialize ();
13754           err = PyRun_SimpleString ("import itertools\n");
13755           Py_Finalize ();
13756           return err == 0 ? 0 : 1;
13757   ;
13758   return 0;
13759 }
13760 _ACEOF
13761 if ac_fn_c_try_run "$LINENO"; then :
13762   dynamic_list=true
13763 fi
13764 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13765   conftest.$ac_objext conftest.beam conftest.$ac_ext
13766 fi
13767
13768      LIBS="$old_LIBS"
13769      CFLAGS="$old_CFLAGS"
13770      CPPFLAGS="$old_CPPFLAGS"
13771    fi
13772    LDFLAGS="$old_LDFLAGS"
13773 fi
13774 if $dynamic_list; then
13775   found="-Wl,--dynamic-list"
13776   RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
13777 else
13778   found="-rdynamic"
13779   RDYNAMIC="-rdynamic"
13780 fi
13781
13782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
13783 $as_echo "$found" >&6; }
13784
13785
13786 if test ${build} = ${host} -a ${host} = ${target} ; then
13787    case ${host_os} in
13788    solaris*)
13789       # See if thread_db library is around for Solaris thread debugging.
13790       # Note that we must explicitly test for version 1 of the library
13791       # because version 0 (present on Solaris 2.4 or earlier) doesn't have
13792       # the same API.
13793       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
13794 $as_echo_n "checking for Solaris thread debugging library... " >&6; }
13795       if test -f /usr/lib/libthread_db.so.1 ; then
13796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13797 $as_echo "yes" >&6; }
13798
13799 $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
13800
13801          CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
13802          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
13803          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13804 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13805 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
13806   $as_echo_n "(cached) " >&6
13807 else
13808   ac_check_lib_save_LIBS=$LIBS
13809 LIBS="-ldl  $LIBS"
13810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13811 /* end confdefs.h.  */
13812
13813 /* Override any GCC internal prototype to avoid an error.
13814    Use char because int might match the return type of a GCC
13815    builtin and then its argument prototype would still apply.  */
13816 #ifdef __cplusplus
13817 extern "C"
13818 #endif
13819 char dlopen ();
13820 int
13821 main ()
13822 {
13823 return dlopen ();
13824   ;
13825   return 0;
13826 }
13827 _ACEOF
13828 if ac_fn_c_try_link "$LINENO"; then :
13829   ac_cv_lib_dl_dlopen=yes
13830 else
13831   ac_cv_lib_dl_dlopen=no
13832 fi
13833 rm -f core conftest.err conftest.$ac_objext \
13834     conftest$ac_exeext conftest.$ac_ext
13835 LIBS=$ac_check_lib_save_LIBS
13836 fi
13837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13838 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13839 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
13840   cat >>confdefs.h <<_ACEOF
13841 #define HAVE_LIBDL 1
13842 _ACEOF
13843
13844   LIBS="-ldl $LIBS"
13845
13846 fi
13847
13848          CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
13849          # Sun randomly tweaked the prototypes in <proc_service.h>
13850          # at one point.
13851          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13852 $as_echo_n "checking if <proc_service.h> is old... " >&6; }
13853          if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13854   $as_echo_n "(cached) " >&6
13855 else
13856
13857             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13858 /* end confdefs.h.  */
13859
13860                 #include <proc_service.h>
13861                 ps_err_e ps_pdwrite
13862                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
13863
13864 int
13865 main ()
13866 {
13867
13868   ;
13869   return 0;
13870 }
13871 _ACEOF
13872 if ac_fn_c_try_compile "$LINENO"; then :
13873   gdb_cv_proc_service_is_old=no
13874 else
13875   gdb_cv_proc_service_is_old=yes
13876 fi
13877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13878
13879 fi
13880
13881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13882 $as_echo "$gdb_cv_proc_service_is_old" >&6; }
13883          if test $gdb_cv_proc_service_is_old = yes; then
13884
13885 $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
13886
13887          fi
13888       else
13889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13890 $as_echo "no" >&6; }
13891       fi
13892       ;;
13893    aix*)
13894       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13895 $as_echo_n "checking for AiX thread debugging library... " >&6; }
13896       if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13897   $as_echo_n "(cached) " >&6
13898 else
13899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13900 /* end confdefs.h.  */
13901 #include <sys/pthdebug.h>
13902 int
13903 main ()
13904 {
13905 #ifndef PTHDB_VERSION_3
13906                                     #error
13907                                     #endif
13908   ;
13909   return 0;
13910 }
13911 _ACEOF
13912 if ac_fn_c_try_compile "$LINENO"; then :
13913   gdb_cv_have_aix_thread_debug=yes
13914 else
13915   gdb_cv_have_aix_thread_debug=no
13916 fi
13917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13918 fi
13919
13920       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13921 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
13922       if test $gdb_cv_have_aix_thread_debug = yes; then
13923          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
13924          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
13925          LIBS="$LIBS -lpthdebug"
13926
13927          # Older versions of AIX do not provide the declaration for
13928          # the getthrds function (it appears that it was introduced
13929          # with AIX 6.x).
13930          ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
13931 "
13932 if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
13933   ac_have_decl=1
13934 else
13935   ac_have_decl=0
13936 fi
13937
13938 cat >>confdefs.h <<_ACEOF
13939 #define HAVE_DECL_GETTHRDS $ac_have_decl
13940 _ACEOF
13941
13942       fi
13943       ;;
13944    esac
13945
13946 fi
13947
13948 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
13949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13950 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13951 if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13952   $as_echo_n "(cached) " >&6
13953 else
13954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13955 /* end confdefs.h.  */
13956 #include <thread_db.h>
13957 int
13958 main ()
13959 {
13960 int i = TD_NOTALLOC;
13961   ;
13962   return 0;
13963 }
13964 _ACEOF
13965 if ac_fn_c_try_compile "$LINENO"; then :
13966   gdb_cv_thread_db_h_has_td_notalloc=yes
13967 else
13968   gdb_cv_thread_db_h_has_td_notalloc=no
13969
13970 fi
13971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13972
13973 fi
13974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13975 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13977 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13978 if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13979   $as_echo_n "(cached) " >&6
13980 else
13981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13982 /* end confdefs.h.  */
13983 #include <thread_db.h>
13984 int
13985 main ()
13986 {
13987 int i = TD_VERSION;
13988   ;
13989   return 0;
13990 }
13991 _ACEOF
13992 if ac_fn_c_try_compile "$LINENO"; then :
13993   gdb_cv_thread_db_h_has_td_version=yes
13994 else
13995   gdb_cv_thread_db_h_has_td_version=no
13996
13997 fi
13998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13999
14000 fi
14001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14002 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14004 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14005 if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14006   $as_echo_n "(cached) " >&6
14007 else
14008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14009 /* end confdefs.h.  */
14010 #include <thread_db.h>
14011 int
14012 main ()
14013 {
14014 int i = TD_NOTLS;
14015   ;
14016   return 0;
14017 }
14018 _ACEOF
14019 if ac_fn_c_try_compile "$LINENO"; then :
14020   gdb_cv_thread_db_h_has_td_notls=yes
14021 else
14022   gdb_cv_thread_db_h_has_td_notls=no
14023
14024 fi
14025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14026
14027 fi
14028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14029 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
14030 fi
14031 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
14032
14033 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
14034
14035 fi
14036 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14037
14038 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
14039
14040 fi
14041 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14042
14043 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
14044
14045 fi
14046
14047 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14048 "
14049 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14050   ac_have_decl=1
14051 else
14052   ac_have_decl=0
14053 fi
14054
14055 cat >>confdefs.h <<_ACEOF
14056 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
14057 _ACEOF
14058
14059
14060 if test "$cross_compiling" = yes; then :
14061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14062 /* end confdefs.h.  */
14063 #include <sys/personality.h>
14064 int
14065 main ()
14066 {
14067
14068 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
14069 #       define ADDR_NO_RANDOMIZE 0x0040000
14070 #      endif
14071        /* Test the flag could be set and stays set.  */
14072        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14073        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14074            return 1
14075   ;
14076   return 0;
14077 }
14078 _ACEOF
14079 if ac_fn_c_try_link "$LINENO"; then :
14080   have_personality=true
14081 else
14082   have_personality=false
14083 fi
14084 rm -f core conftest.err conftest.$ac_objext \
14085     conftest$ac_exeext conftest.$ac_ext
14086 else
14087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14088 /* end confdefs.h.  */
14089 #include <sys/personality.h>
14090 int
14091 main ()
14092 {
14093
14094 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
14095 #       define ADDR_NO_RANDOMIZE 0x0040000
14096 #      endif
14097        /* Test the flag could be set and stays set.  */
14098        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14099        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14100            return 1
14101   ;
14102   return 0;
14103 }
14104 _ACEOF
14105 if ac_fn_c_try_run "$LINENO"; then :
14106   have_personality=true
14107 else
14108   have_personality=false
14109 fi
14110 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14111   conftest.$ac_objext conftest.beam conftest.$ac_ext
14112 fi
14113
14114 if $have_personality
14115 then
14116
14117 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
14118
14119 fi
14120
14121 case $host_os in
14122   go32* | *djgpp*)
14123     gdbinit=gdb.ini
14124     ;;
14125   *)
14126     gdbinit=.gdbinit
14127     ;;
14128 esac
14129
14130 cat >>confdefs.h <<_ACEOF
14131 #define GDBINIT "$gdbinit"
14132 _ACEOF
14133
14134
14135
14136 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14137 # except that the argument to --with-sysroot is optional.
14138 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14139 if test "x$with_sysroot" = xyes; then
14140   with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14141 fi
14142
14143 # Check whether --with-sysroot was given.
14144 if test "${with_sysroot+set}" = set; then :
14145   withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14146 else
14147   TARGET_SYSTEM_ROOT=
14148 fi
14149
14150
14151   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14152   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14153   ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14154   ac_define_dir=`eval echo $ac_define_dir`
14155
14156 cat >>confdefs.h <<_ACEOF
14157 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
14158 _ACEOF
14159
14160
14161
14162
14163   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14164      if test "x$prefix" = xNONE; then
14165         test_prefix=/usr/local
14166      else
14167         test_prefix=$prefix
14168      fi
14169   else
14170      test_prefix=$exec_prefix
14171   fi
14172   value=0
14173   case ${ac_define_dir} in
14174      "${test_prefix}"|"${test_prefix}/"*|\
14175         '${exec_prefix}'|'${exec_prefix}/'*)
14176      value=1
14177      ;;
14178   esac
14179
14180 cat >>confdefs.h <<_ACEOF
14181 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14182 _ACEOF
14183
14184
14185
14186
14187
14188 # Check whether --with-system-gdbinit was given.
14189 if test "${with_system_gdbinit+set}" = set; then :
14190   withval=$with_system_gdbinit;
14191     SYSTEM_GDBINIT=$withval
14192 else
14193   SYSTEM_GDBINIT=
14194 fi
14195
14196
14197   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14198   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14199   ac_define_dir=`eval echo $SYSTEM_GDBINIT`
14200   ac_define_dir=`eval echo $ac_define_dir`
14201
14202 cat >>confdefs.h <<_ACEOF
14203 #define SYSTEM_GDBINIT "$ac_define_dir"
14204 _ACEOF
14205
14206
14207
14208
14209   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14210      if test "x$prefix" = xNONE; then
14211         test_prefix=/usr/local
14212      else
14213         test_prefix=$prefix
14214      fi
14215   else
14216      test_prefix=$exec_prefix
14217   fi
14218   value=0
14219   case ${ac_define_dir} in
14220      "${test_prefix}"|"${test_prefix}/"*|\
14221         '${exec_prefix}'|'${exec_prefix}/'*)
14222      value=1
14223      ;;
14224   esac
14225
14226 cat >>confdefs.h <<_ACEOF
14227 #define SYSTEM_GDBINIT_RELOCATABLE $value
14228 _ACEOF
14229
14230
14231
14232
14233
14234
14235 # Check whether --enable-werror was given.
14236 if test "${enable_werror+set}" = set; then :
14237   enableval=$enable_werror; case "${enableval}" in
14238      yes | y) ERROR_ON_WARNING="yes" ;;
14239      no | n)  ERROR_ON_WARNING="no" ;;
14240      *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
14241    esac
14242 fi
14243
14244
14245 # Enable -Werror by default when using gcc.  Turn it off for releases.
14246 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
14247     ERROR_ON_WARNING=yes
14248 fi
14249
14250 WERROR_CFLAGS=""
14251 if test "${ERROR_ON_WARNING}" = yes ; then
14252     WERROR_CFLAGS="-Werror"
14253 fi
14254
14255 # These options work in either C or C++ modes.
14256 build_warnings="-Wall -Wpointer-arith \
14257 -Wno-unused -Wunused-value -Wunused-function \
14258 -Wno-switch -Wno-char-subscripts \
14259 -Wempty-body"
14260
14261 # Now add in C and C++ specific options, depending on mode.
14262 if test "$enable_build_with_cxx" = "yes"; then
14263    build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
14264 -Wno-narrowing"
14265 else
14266    build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
14267 -Wdeclaration-after-statement -Wmissing-parameter-type \
14268 -Wold-style-declaration -Wold-style-definition"
14269 fi
14270
14271 # Enable -Wno-format by default when using gcc on mingw since many
14272 # GCC versions complain about %I64.
14273 case "${host}" in
14274   *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
14275   *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
14276 esac
14277
14278 # Check whether --enable-build-warnings was given.
14279 if test "${enable_build_warnings+set}" = set; then :
14280   enableval=$enable_build_warnings; case "${enableval}" in
14281   yes)  ;;
14282   no)   build_warnings="-w";;
14283   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
14284         build_warnings="${build_warnings} ${t}";;
14285   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
14286         build_warnings="${t} ${build_warnings}";;
14287   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14288 esac
14289 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14290   echo "Setting compiler warning flags = $build_warnings" 6>&1
14291 fi
14292 fi
14293 # Check whether --enable-gdb-build-warnings was given.
14294 if test "${enable_gdb_build_warnings+set}" = set; then :
14295   enableval=$enable_gdb_build_warnings; case "${enableval}" in
14296   yes)  ;;
14297   no)   build_warnings="-w";;
14298   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
14299         build_warnings="${build_warnings} ${t}";;
14300   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
14301         build_warnings="${t} ${build_warnings}";;
14302   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14303 esac
14304 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14305   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14306 fi
14307 fi
14308
14309 # The set of warnings supported by a C++ compiler is not the same as
14310 # of the C compiler.
14311 if test "$enable_build_with_cxx" = "yes"; then
14312     ac_ext=cpp
14313 ac_cpp='$CXXCPP $CPPFLAGS'
14314 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14315 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14316 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14317
14318 fi
14319
14320 WARN_CFLAGS=""
14321 if test "x${build_warnings}" != x -a "x$GCC" = xyes
14322 then
14323     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14324 $as_echo_n "checking compiler warning flags... " >&6; }
14325     # Separate out the -Werror flag as some files just cannot be
14326     # compiled with it enabled.
14327     for w in ${build_warnings}; do
14328         # GCC does not complain about -Wno-unknown-warning.  Invert
14329         # and test -Wunknown-warning instead.
14330         case $w in
14331         -Wno-*)
14332                 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
14333         *)
14334                 wtest=$w ;;
14335         esac
14336
14337         case $w in
14338         -Werr*) WERROR_CFLAGS=-Werror ;;
14339         *)
14340             # Check whether GCC accepts it.
14341             saved_CFLAGS="$CFLAGS"
14342             CFLAGS="$CFLAGS $wtest"
14343             saved_CXXFLAGS="$CXXFLAGS"
14344             CXXFLAGS="$CXXFLAGS $wtest"
14345             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14346 /* end confdefs.h.  */
14347
14348 int
14349 main ()
14350 {
14351
14352   ;
14353   return 0;
14354 }
14355 _ACEOF
14356 if ac_fn_cxx_try_compile "$LINENO"; then :
14357   WARN_CFLAGS="${WARN_CFLAGS} $w"
14358 fi
14359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14360             CFLAGS="$saved_CFLAGS"
14361             CXXFLAGS="$saved_CXXFLAGS"
14362         esac
14363     done
14364     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14365 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
14366 fi
14367
14368
14369
14370 if test "$enable_build_with_cxx" = "yes"; then
14371    ac_ext=c
14372 ac_cpp='$CPP $CPPFLAGS'
14373 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14374 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14375 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14376
14377 fi
14378
14379
14380 # In the Cygwin environment, we need some additional flags.
14381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14382 $as_echo_n "checking for cygwin... " >&6; }
14383 if test "${gdb_cv_os_cygwin+set}" = set; then :
14384   $as_echo_n "(cached) " >&6
14385 else
14386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14387 /* end confdefs.h.  */
14388
14389 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
14390 lose
14391 #endif
14392 _ACEOF
14393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14394   $EGREP "^lose$" >/dev/null 2>&1; then :
14395   gdb_cv_os_cygwin=yes
14396 else
14397   gdb_cv_os_cygwin=no
14398 fi
14399 rm -f conftest*
14400
14401 fi
14402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14403 $as_echo "$gdb_cv_os_cygwin" >&6; }
14404
14405
14406 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
14407 case ${host} in
14408   *go32* ) SER_HARDWIRE=ser-go32.o ;;
14409   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
14410   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
14411 esac
14412
14413
14414 # libreadline needs libuser32.a in a cygwin environment
14415 WIN32LIBS=
14416 if test x$gdb_cv_os_cygwin = xyes; then
14417     WIN32LIBS="-luser32"
14418     case "${target}" in
14419         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14420         ;;
14421     esac
14422 fi
14423
14424 # The ser-tcp.c module requires sockets.
14425 case ${host} in
14426   *mingw32*)
14427
14428 $as_echo "#define USE_WIN32API 1" >>confdefs.h
14429
14430     WIN32LIBS="$WIN32LIBS -lws2_32"
14431     ;;
14432 esac
14433
14434
14435 # Add ELF support to GDB, but only if BFD includes ELF support.
14436
14437   OLD_CFLAGS=$CFLAGS
14438   OLD_LDFLAGS=$LDFLAGS
14439   OLD_LIBS=$LIBS
14440   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14441   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
14442   # always want our bfd.
14443   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
14444   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14445   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
14446   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
14447   LIBS="-lbfd -liberty -lz $intl $LIBS"
14448   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
14449 $as_echo_n "checking for ELF support in BFD... " >&6; }
14450 if test "${gdb_cv_var_elf+set}" = set; then :
14451   $as_echo_n "(cached) " >&6
14452 else
14453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14454 /* end confdefs.h.  */
14455 #include <stdlib.h>
14456   #include "bfd.h"
14457   #include "elf-bfd.h"
14458
14459 int
14460 main ()
14461 {
14462 return bfd_get_elf_phdr_upper_bound (NULL);
14463   ;
14464   return 0;
14465 }
14466 _ACEOF
14467 if ac_fn_c_try_link "$LINENO"; then :
14468   gdb_cv_var_elf=yes
14469 else
14470   gdb_cv_var_elf=no
14471 fi
14472 rm -f core conftest.err conftest.$ac_objext \
14473     conftest$ac_exeext conftest.$ac_ext
14474 fi
14475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14476 $as_echo "$gdb_cv_var_elf" >&6; }
14477   CFLAGS=$OLD_CFLAGS
14478   LDFLAGS=$OLD_LDFLAGS
14479   LIBS=$OLD_LIBS
14480 if test $gdb_cv_var_elf = yes; then
14481   CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
14482
14483 $as_echo "#define HAVE_ELF 1" >>confdefs.h
14484
14485   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14486   if test "$plugins" = "yes"; then
14487     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14488 $as_echo_n "checking for library containing dlopen... " >&6; }
14489 if test "${ac_cv_search_dlopen+set}" = set; then :
14490   $as_echo_n "(cached) " >&6
14491 else
14492   ac_func_search_save_LIBS=$LIBS
14493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14494 /* end confdefs.h.  */
14495
14496 /* Override any GCC internal prototype to avoid an error.
14497    Use char because int might match the return type of a GCC
14498    builtin and then its argument prototype would still apply.  */
14499 #ifdef __cplusplus
14500 extern "C"
14501 #endif
14502 char dlopen ();
14503 int
14504 main ()
14505 {
14506 return dlopen ();
14507   ;
14508   return 0;
14509 }
14510 _ACEOF
14511 for ac_lib in '' dl; do
14512   if test -z "$ac_lib"; then
14513     ac_res="none required"
14514   else
14515     ac_res=-l$ac_lib
14516     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14517   fi
14518   if ac_fn_c_try_link "$LINENO"; then :
14519   ac_cv_search_dlopen=$ac_res
14520 fi
14521 rm -f core conftest.err conftest.$ac_objext \
14522     conftest$ac_exeext
14523   if test "${ac_cv_search_dlopen+set}" = set; then :
14524   break
14525 fi
14526 done
14527 if test "${ac_cv_search_dlopen+set}" = set; then :
14528
14529 else
14530   ac_cv_search_dlopen=no
14531 fi
14532 rm conftest.$ac_ext
14533 LIBS=$ac_func_search_save_LIBS
14534 fi
14535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14536 $as_echo "$ac_cv_search_dlopen" >&6; }
14537 ac_res=$ac_cv_search_dlopen
14538 if test "$ac_res" != no; then :
14539   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14540
14541 fi
14542
14543   fi
14544 fi
14545
14546 # Add macho support to GDB, but only if BFD includes it.
14547
14548   OLD_CFLAGS=$CFLAGS
14549   OLD_LDFLAGS=$LDFLAGS
14550   OLD_LIBS=$LIBS
14551   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14552   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
14553   # always want our bfd.
14554   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
14555   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14556   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
14557   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
14558   LIBS="-lbfd -liberty -lz $intl $LIBS"
14559   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
14560 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
14561 if test "${gdb_cv_var_macho+set}" = set; then :
14562   $as_echo_n "(cached) " >&6
14563 else
14564   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14565 /* end confdefs.h.  */
14566 #include <stdlib.h>
14567   #include "bfd.h"
14568   #include "mach-o.h"
14569
14570 int
14571 main ()
14572 {
14573 return bfd_mach_o_lookup_command (NULL, 0, NULL);
14574   ;
14575   return 0;
14576 }
14577 _ACEOF
14578 if ac_fn_c_try_link "$LINENO"; then :
14579   gdb_cv_var_macho=yes
14580 else
14581   gdb_cv_var_macho=no
14582 fi
14583 rm -f core conftest.err conftest.$ac_objext \
14584     conftest$ac_exeext conftest.$ac_ext
14585 fi
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
14587 $as_echo "$gdb_cv_var_macho" >&6; }
14588   CFLAGS=$OLD_CFLAGS
14589   LDFLAGS=$OLD_LDFLAGS
14590   LIBS=$OLD_LIBS
14591 if test $gdb_cv_var_macho = yes; then
14592   CONFIG_OBS="$CONFIG_OBS machoread.o"
14593 fi
14594
14595 # Add any host-specific objects to GDB.
14596 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14597
14598 # If building on ELF, look for lzma support for embedded compressed debug info.
14599 if test $gdb_cv_var_elf = yes; then
14600
14601 # Check whether --with-lzma was given.
14602 if test "${with_lzma+set}" = set; then :
14603   withval=$with_lzma;
14604 else
14605   with_lzma=auto
14606 fi
14607
14608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
14609 $as_echo_n "checking whether to use lzma... " >&6; }
14610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
14611 $as_echo "$with_lzma" >&6; }
14612
14613   if test "${with_lzma}" != no; then
14614
14615
14616
14617
14618
14619
14620
14621
14622     use_additional=yes
14623
14624   acl_save_prefix="$prefix"
14625   prefix="$acl_final_prefix"
14626   acl_save_exec_prefix="$exec_prefix"
14627   exec_prefix="$acl_final_exec_prefix"
14628
14629     eval additional_includedir=\"$includedir\"
14630     eval additional_libdir=\"$libdir\"
14631
14632   exec_prefix="$acl_save_exec_prefix"
14633   prefix="$acl_save_prefix"
14634
14635
14636 # Check whether --with-liblzma-prefix was given.
14637 if test "${with_liblzma_prefix+set}" = set; then :
14638   withval=$with_liblzma_prefix;
14639     if test "X$withval" = "Xno"; then
14640       use_additional=no
14641     else
14642       if test "X$withval" = "X"; then
14643
14644   acl_save_prefix="$prefix"
14645   prefix="$acl_final_prefix"
14646   acl_save_exec_prefix="$exec_prefix"
14647   exec_prefix="$acl_final_exec_prefix"
14648
14649           eval additional_includedir=\"$includedir\"
14650           eval additional_libdir=\"$libdir\"
14651
14652   exec_prefix="$acl_save_exec_prefix"
14653   prefix="$acl_save_prefix"
14654
14655       else
14656         additional_includedir="$withval/include"
14657         additional_libdir="$withval/lib"
14658       fi
14659     fi
14660
14661 fi
14662
14663       LIBLZMA=
14664   LTLIBLZMA=
14665   INCLZMA=
14666   rpathdirs=
14667   ltrpathdirs=
14668   names_already_handled=
14669   names_next_round='lzma '
14670   while test -n "$names_next_round"; do
14671     names_this_round="$names_next_round"
14672     names_next_round=
14673     for name in $names_this_round; do
14674       already_handled=
14675       for n in $names_already_handled; do
14676         if test "$n" = "$name"; then
14677           already_handled=yes
14678           break
14679         fi
14680       done
14681       if test -z "$already_handled"; then
14682         names_already_handled="$names_already_handled $name"
14683                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14684         eval value=\"\$HAVE_LIB$uppername\"
14685         if test -n "$value"; then
14686           if test "$value" = yes; then
14687             eval value=\"\$LIB$uppername\"
14688             test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
14689             eval value=\"\$LTLIB$uppername\"
14690             test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
14691           else
14692                                     :
14693           fi
14694         else
14695                               found_dir=
14696           found_la=
14697           found_so=
14698           found_a=
14699           if test $use_additional = yes; then
14700             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14701               found_dir="$additional_libdir"
14702               found_so="$additional_libdir/lib$name.$shlibext"
14703               if test -f "$additional_libdir/lib$name.la"; then
14704                 found_la="$additional_libdir/lib$name.la"
14705               fi
14706             else
14707               if test -f "$additional_libdir/lib$name.$libext"; then
14708                 found_dir="$additional_libdir"
14709                 found_a="$additional_libdir/lib$name.$libext"
14710                 if test -f "$additional_libdir/lib$name.la"; then
14711                   found_la="$additional_libdir/lib$name.la"
14712                 fi
14713               fi
14714             fi
14715           fi
14716           if test "X$found_dir" = "X"; then
14717             for x in $LDFLAGS $LTLIBLZMA; do
14718
14719   acl_save_prefix="$prefix"
14720   prefix="$acl_final_prefix"
14721   acl_save_exec_prefix="$exec_prefix"
14722   exec_prefix="$acl_final_exec_prefix"
14723   eval x=\"$x\"
14724   exec_prefix="$acl_save_exec_prefix"
14725   prefix="$acl_save_prefix"
14726
14727               case "$x" in
14728                 -L*)
14729                   dir=`echo "X$x" | sed -e 's/^X-L//'`
14730                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14731                     found_dir="$dir"
14732                     found_so="$dir/lib$name.$shlibext"
14733                     if test -f "$dir/lib$name.la"; then
14734                       found_la="$dir/lib$name.la"
14735                     fi
14736                   else
14737                     if test -f "$dir/lib$name.$libext"; then
14738                       found_dir="$dir"
14739                       found_a="$dir/lib$name.$libext"
14740                       if test -f "$dir/lib$name.la"; then
14741                         found_la="$dir/lib$name.la"
14742                       fi
14743                     fi
14744                   fi
14745                   ;;
14746               esac
14747               if test "X$found_dir" != "X"; then
14748                 break
14749               fi
14750             done
14751           fi
14752           if test "X$found_dir" != "X"; then
14753                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14754             if test "X$found_so" != "X"; then
14755                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14756                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14757               else
14758                                                                                 haveit=
14759                 for x in $ltrpathdirs; do
14760                   if test "X$x" = "X$found_dir"; then
14761                     haveit=yes
14762                     break
14763                   fi
14764                 done
14765                 if test -z "$haveit"; then
14766                   ltrpathdirs="$ltrpathdirs $found_dir"
14767                 fi
14768                                 if test "$hardcode_direct" = yes; then
14769                                                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14770                 else
14771                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14772                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14773                                                             haveit=
14774                     for x in $rpathdirs; do
14775                       if test "X$x" = "X$found_dir"; then
14776                         haveit=yes
14777                         break
14778                       fi
14779                     done
14780                     if test -z "$haveit"; then
14781                       rpathdirs="$rpathdirs $found_dir"
14782                     fi
14783                   else
14784                                                                                 haveit=
14785                     for x in $LDFLAGS $LIBLZMA; do
14786
14787   acl_save_prefix="$prefix"
14788   prefix="$acl_final_prefix"
14789   acl_save_exec_prefix="$exec_prefix"
14790   exec_prefix="$acl_final_exec_prefix"
14791   eval x=\"$x\"
14792   exec_prefix="$acl_save_exec_prefix"
14793   prefix="$acl_save_prefix"
14794
14795                       if test "X$x" = "X-L$found_dir"; then
14796                         haveit=yes
14797                         break
14798                       fi
14799                     done
14800                     if test -z "$haveit"; then
14801                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14802                     fi
14803                     if test "$hardcode_minus_L" != no; then
14804                                                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14805                     else
14806                                                                                                                                                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14807                     fi
14808                   fi
14809                 fi
14810               fi
14811             else
14812               if test "X$found_a" != "X"; then
14813                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14814               else
14815                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14816               fi
14817             fi
14818                         additional_includedir=
14819             case "$found_dir" in
14820               */lib | */lib/)
14821                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14822                 additional_includedir="$basedir/include"
14823                 ;;
14824             esac
14825             if test "X$additional_includedir" != "X"; then
14826                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
14827                 haveit=
14828                 if test "X$additional_includedir" = "X/usr/local/include"; then
14829                   if test -n "$GCC"; then
14830                     case $host_os in
14831                       linux*) haveit=yes;;
14832                     esac
14833                   fi
14834                 fi
14835                 if test -z "$haveit"; then
14836                   for x in $CPPFLAGS $INCLZMA; do
14837
14838   acl_save_prefix="$prefix"
14839   prefix="$acl_final_prefix"
14840   acl_save_exec_prefix="$exec_prefix"
14841   exec_prefix="$acl_final_exec_prefix"
14842   eval x=\"$x\"
14843   exec_prefix="$acl_save_exec_prefix"
14844   prefix="$acl_save_prefix"
14845
14846                     if test "X$x" = "X-I$additional_includedir"; then
14847                       haveit=yes
14848                       break
14849                     fi
14850                   done
14851                   if test -z "$haveit"; then
14852                     if test -d "$additional_includedir"; then
14853                                             INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14854                     fi
14855                   fi
14856                 fi
14857               fi
14858             fi
14859                         if test -n "$found_la"; then
14860                                                         save_libdir="$libdir"
14861               case "$found_la" in
14862                 */* | *\\*) . "$found_la" ;;
14863                 *) . "./$found_la" ;;
14864               esac
14865               libdir="$save_libdir"
14866                             for dep in $dependency_libs; do
14867                 case "$dep" in
14868                   -L*)
14869                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14870                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
14871                       haveit=
14872                       if test "X$additional_libdir" = "X/usr/local/lib"; then
14873                         if test -n "$GCC"; then
14874                           case $host_os in
14875                             linux*) haveit=yes;;
14876                           esac
14877                         fi
14878                       fi
14879                       if test -z "$haveit"; then
14880                         haveit=
14881                         for x in $LDFLAGS $LIBLZMA; do
14882
14883   acl_save_prefix="$prefix"
14884   prefix="$acl_final_prefix"
14885   acl_save_exec_prefix="$exec_prefix"
14886   exec_prefix="$acl_final_exec_prefix"
14887   eval x=\"$x\"
14888   exec_prefix="$acl_save_exec_prefix"
14889   prefix="$acl_save_prefix"
14890
14891                           if test "X$x" = "X-L$additional_libdir"; then
14892                             haveit=yes
14893                             break
14894                           fi
14895                         done
14896                         if test -z "$haveit"; then
14897                           if test -d "$additional_libdir"; then
14898                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14899                           fi
14900                         fi
14901                         haveit=
14902                         for x in $LDFLAGS $LTLIBLZMA; do
14903
14904   acl_save_prefix="$prefix"
14905   prefix="$acl_final_prefix"
14906   acl_save_exec_prefix="$exec_prefix"
14907   exec_prefix="$acl_final_exec_prefix"
14908   eval x=\"$x\"
14909   exec_prefix="$acl_save_exec_prefix"
14910   prefix="$acl_save_prefix"
14911
14912                           if test "X$x" = "X-L$additional_libdir"; then
14913                             haveit=yes
14914                             break
14915                           fi
14916                         done
14917                         if test -z "$haveit"; then
14918                           if test -d "$additional_libdir"; then
14919                                                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14920                           fi
14921                         fi
14922                       fi
14923                     fi
14924                     ;;
14925                   -R*)
14926                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
14927                     if test "$enable_rpath" != no; then
14928                                                                   haveit=
14929                       for x in $rpathdirs; do
14930                         if test "X$x" = "X$dir"; then
14931                           haveit=yes
14932                           break
14933                         fi
14934                       done
14935                       if test -z "$haveit"; then
14936                         rpathdirs="$rpathdirs $dir"
14937                       fi
14938                                                                   haveit=
14939                       for x in $ltrpathdirs; do
14940                         if test "X$x" = "X$dir"; then
14941                           haveit=yes
14942                           break
14943                         fi
14944                       done
14945                       if test -z "$haveit"; then
14946                         ltrpathdirs="$ltrpathdirs $dir"
14947                       fi
14948                     fi
14949                     ;;
14950                   -l*)
14951                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14952                     ;;
14953                   *.la)
14954                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14955                     ;;
14956                   *)
14957                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
14958                     LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
14959                     ;;
14960                 esac
14961               done
14962             fi
14963           else
14964                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14965             LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
14966           fi
14967         fi
14968       fi
14969     done
14970   done
14971   if test "X$rpathdirs" != "X"; then
14972     if test -n "$hardcode_libdir_separator"; then
14973                         alldirs=
14974       for found_dir in $rpathdirs; do
14975         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14976       done
14977             acl_save_libdir="$libdir"
14978       libdir="$alldirs"
14979       eval flag=\"$hardcode_libdir_flag_spec\"
14980       libdir="$acl_save_libdir"
14981       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14982     else
14983             for found_dir in $rpathdirs; do
14984         acl_save_libdir="$libdir"
14985         libdir="$found_dir"
14986         eval flag=\"$hardcode_libdir_flag_spec\"
14987         libdir="$acl_save_libdir"
14988         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14989       done
14990     fi
14991   fi
14992   if test "X$ltrpathdirs" != "X"; then
14993             for found_dir in $ltrpathdirs; do
14994       LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
14995     done
14996   fi
14997
14998
14999         ac_save_CPPFLAGS="$CPPFLAGS"
15000
15001   for element in $INCLZMA; do
15002     haveit=
15003     for x in $CPPFLAGS; do
15004
15005   acl_save_prefix="$prefix"
15006   prefix="$acl_final_prefix"
15007   acl_save_exec_prefix="$exec_prefix"
15008   exec_prefix="$acl_final_exec_prefix"
15009   eval x=\"$x\"
15010   exec_prefix="$acl_save_exec_prefix"
15011   prefix="$acl_save_prefix"
15012
15013       if test "X$x" = "X$element"; then
15014         haveit=yes
15015         break
15016       fi
15017     done
15018     if test -z "$haveit"; then
15019       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15020     fi
15021   done
15022
15023
15024   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15025 $as_echo_n "checking for liblzma... " >&6; }
15026 if test "${ac_cv_liblzma+set}" = set; then :
15027   $as_echo_n "(cached) " >&6
15028 else
15029
15030     ac_save_LIBS="$LIBS"
15031     LIBS="$LIBS $LIBLZMA"
15032     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15033 /* end confdefs.h.  */
15034 #include "lzma.h"
15035 int
15036 main ()
15037 {
15038 lzma_index_iter iter;
15039                            lzma_index_iter_init (&iter, 0);
15040                            lzma_mf_is_supported (LZMA_MF_HC3);
15041   ;
15042   return 0;
15043 }
15044 _ACEOF
15045 if ac_fn_c_try_link "$LINENO"; then :
15046   ac_cv_liblzma=yes
15047 else
15048   ac_cv_liblzma=no
15049 fi
15050 rm -f core conftest.err conftest.$ac_objext \
15051     conftest$ac_exeext conftest.$ac_ext
15052     LIBS="$ac_save_LIBS"
15053
15054 fi
15055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15056 $as_echo "$ac_cv_liblzma" >&6; }
15057   if test "$ac_cv_liblzma" = yes; then
15058     HAVE_LIBLZMA=yes
15059
15060 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15061
15062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15063 $as_echo_n "checking how to link with liblzma... " >&6; }
15064     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15065 $as_echo "$LIBLZMA" >&6; }
15066   else
15067     HAVE_LIBLZMA=no
15068             CPPFLAGS="$ac_save_CPPFLAGS"
15069     LIBLZMA=
15070     LTLIBLZMA=
15071   fi
15072
15073
15074
15075
15076
15077
15078     if test "$HAVE_LIBLZMA" != yes; then
15079       if test "$with_lzma" = yes; then
15080         as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15081       fi
15082     fi
15083   fi
15084 fi
15085
15086 LIBGUI="../libgui/src/libgui.a"
15087 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15088
15089
15090
15091 WIN32LDAPP=
15092
15093
15094
15095 case "${host}" in
15096 *-*-cygwin* | *-*-mingw* )
15097     configdir="win"
15098     ;;
15099 *)
15100     configdir="unix"
15101     ;;
15102 esac
15103
15104 GDBTKLIBS=
15105 if test "${enable_gdbtk}" = "yes"; then
15106
15107     # Gdbtk must have an absolute path to srcdir in order to run
15108     # properly when not installed.
15109     here=`pwd`
15110     cd ${srcdir}
15111     GDBTK_SRC_DIR=`pwd`
15112     cd $here
15113
15114
15115     #
15116     # Ok, lets find the tcl configuration
15117     # First, look for one uninstalled.
15118     # the alternative search directory is invoked by --with-tcl
15119     #
15120
15121     if test x"${no_tcl}" = x ; then
15122         # we reset no_tcl in case something fails here
15123         no_tcl=true
15124
15125 # Check whether --with-tcl was given.
15126 if test "${with_tcl+set}" = set; then :
15127   withval=$with_tcl; with_tclconfig=${withval}
15128 fi
15129
15130         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15131 $as_echo_n "checking for Tcl configuration... " >&6; }
15132         if test "${ac_cv_c_tclconfig+set}" = set; then :
15133   $as_echo_n "(cached) " >&6
15134 else
15135
15136
15137             # First check to see if --with-tcl was specified.
15138             case "${host}" in
15139                 *-*-cygwin*) platDir="win" ;;
15140                 *) platDir="unix" ;;
15141             esac
15142             if test x"${with_tclconfig}" != x ; then
15143                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15144                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15145                 else
15146                     as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
15147                 fi
15148             fi
15149
15150             # then check for a private Tcl installation
15151             if test x"${ac_cv_c_tclconfig}" = x ; then
15152                 for i in \
15153                         ../tcl \
15154                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15155                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15156                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15157                         ../../tcl \
15158                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15159                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15160                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15161                         ../../../tcl \
15162                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15163                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15164                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15165                     if test -f "$i/$platDir/tclConfig.sh" ; then
15166                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15167                         break
15168                     fi
15169                 done
15170             fi
15171
15172             # on Darwin, check in Framework installation locations
15173             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15174                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15175                         `ls -d /Library/Frameworks 2>/dev/null` \
15176                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
15177                         `ls -d /System/Library/Frameworks 2>/dev/null` \
15178                         ; do
15179                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15180                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15181                         break
15182                     fi
15183                 done
15184             fi
15185
15186             # check in a few common install locations
15187             if test x"${ac_cv_c_tclconfig}" = x ; then
15188                 for i in `ls -d ${libdir} 2>/dev/null` \
15189                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
15190                         `ls -d ${prefix}/lib 2>/dev/null` \
15191                         `ls -d /usr/local/lib 2>/dev/null` \
15192                         `ls -d /usr/contrib/lib 2>/dev/null` \
15193                         `ls -d /usr/lib 2>/dev/null` \
15194                         ; do
15195                     if test -f "$i/tclConfig.sh" ; then
15196                         ac_cv_c_tclconfig=`(cd $i; pwd)`
15197                         break
15198                     fi
15199                 done
15200             fi
15201
15202             # check in a few other private locations
15203             if test x"${ac_cv_c_tclconfig}" = x ; then
15204                 for i in \
15205                         ${srcdir}/../tcl \
15206                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15207                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15208                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15209                     if test -f "$i/$platDir/tclConfig.sh" ; then
15210                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15211                     break
15212                 fi
15213                 done
15214             fi
15215
15216 fi
15217
15218
15219         if test x"${ac_cv_c_tclconfig}" = x ; then
15220             TCL_BIN_DIR="# no Tcl configs found"
15221             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15222 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
15223         else
15224             no_tcl=
15225             TCL_BIN_DIR=${ac_cv_c_tclconfig}
15226             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15227 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
15228         fi
15229     fi
15230
15231
15232     # If $no_tk is nonempty, then we can't do Tk, and there is no
15233     # point to doing Tcl.
15234
15235     #
15236     # Ok, lets find the tk configuration
15237     # First, look for one uninstalled.
15238     # the alternative search directory is invoked by --with-tk
15239     #
15240
15241     if test x"${no_tk}" = x ; then
15242         # we reset no_tk in case something fails here
15243         no_tk=true
15244
15245 # Check whether --with-tk was given.
15246 if test "${with_tk+set}" = set; then :
15247   withval=$with_tk; with_tkconfig=${withval}
15248 fi
15249
15250         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15251 $as_echo_n "checking for Tk configuration... " >&6; }
15252         if test "${ac_cv_c_tkconfig+set}" = set; then :
15253   $as_echo_n "(cached) " >&6
15254 else
15255
15256
15257             # First check to see if --with-tkconfig was specified.
15258             if test x"${with_tkconfig}" != x ; then
15259                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15260                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15261                 else
15262                     as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
15263                 fi
15264             fi
15265
15266             # then check for a private Tk library
15267             case "${host}" in
15268                 *-*-cygwin*) platDir="win" ;;
15269                 *) platDir="unix" ;;
15270             esac
15271             if test x"${ac_cv_c_tkconfig}" = x ; then
15272                 for i in \
15273                         ../tk \
15274                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15275                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15276                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15277                         ../../tk \
15278                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15279                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15280                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15281                         ../../../tk \
15282                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15283                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15284                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15285                     if test -f "$i/$platDir/tkConfig.sh" ; then
15286                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15287                         break
15288                     fi
15289                 done
15290             fi
15291
15292             # on Darwin, check in Framework installation locations
15293             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15294                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15295                         `ls -d /Library/Frameworks 2>/dev/null` \
15296                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
15297                         `ls -d /System/Library/Frameworks 2>/dev/null` \
15298                         ; do
15299                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
15300                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15301                         break
15302                     fi
15303                 done
15304             fi
15305
15306             # check in a few common install locations
15307             if test x"${ac_cv_c_tkconfig}" = x ; then
15308                 for i in `ls -d ${libdir} 2>/dev/null` \
15309                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
15310                         `ls -d ${prefix}/lib 2>/dev/null` \
15311                         `ls -d /usr/local/lib 2>/dev/null` \
15312                         `ls -d /usr/contrib/lib 2>/dev/null` \
15313                         `ls -d /usr/lib 2>/dev/null` \
15314                         ; do
15315                     if test -f "$i/tkConfig.sh" ; then
15316                         ac_cv_c_tkconfig=`(cd $i; pwd)`
15317                         break
15318                     fi
15319                 done
15320             fi
15321             # check in a few other private locations
15322             if test x"${ac_cv_c_tkconfig}" = x ; then
15323                 for i in \
15324                         ${srcdir}/../tk \
15325                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15326                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15327                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15328                     if test -f "$i/$platDir/tkConfig.sh" ; then
15329                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15330                         break
15331                     fi
15332                 done
15333             fi
15334
15335 fi
15336
15337
15338         if test x"${ac_cv_c_tkconfig}" = x ; then
15339             TK_BIN_DIR="# no Tk configs found"
15340             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15341 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
15342         else
15343             no_tk=
15344             TK_BIN_DIR=${ac_cv_c_tkconfig}
15345             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15346 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
15347         fi
15348     fi
15349
15350
15351     if test -z "${no_tcl}" -a -z "${no_tk}"; then
15352
15353     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15354 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
15355
15356     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
15357         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15358 $as_echo "loading" >&6; }
15359         . ${TCL_BIN_DIR}/tclConfig.sh
15360     else
15361         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15362 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
15363     fi
15364
15365     # eval is required to do the TCL_DBGX substitution
15366     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15367     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15368
15369     # If the TCL_BIN_DIR is the build directory (not the install directory),
15370     # then set the common variable name to the value of the build variables.
15371     # For example, the variable TCL_LIB_SPEC will be set to the value
15372     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15373     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15374     # installed and uninstalled version of Tcl.
15375     if test -f "${TCL_BIN_DIR}/Makefile" ; then
15376         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15377         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15378         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15379     elif test "`uname -s`" = "Darwin"; then
15380         # If Tcl was built as a framework, attempt to use the libraries
15381         # from the framework at the given location so that linking works
15382         # against Tcl.framework installed in an arbitrary location.
15383         case ${TCL_DEFS} in
15384             *TCL_FRAMEWORK*)
15385                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15386                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15387                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15388                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15389                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15390                             break
15391                         fi
15392                     done
15393                 fi
15394                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15395                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15396                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15397                 fi
15398                 ;;
15399         esac
15400     fi
15401
15402     # eval is required to do the TCL_DBGX substitution
15403     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15404     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15405     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15406     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422         # Check for in-tree tcl
15423         here=`pwd`
15424         cd ${srcdir}/..
15425         topdir=`pwd`
15426         cd ${here}
15427
15428         intree="no"
15429         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15430           intree="yes"
15431         fi
15432
15433         # Find Tcl private headers
15434         if test x"${intree}" = xno; then
15435
15436   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15437 $as_echo_n "checking for Tcl private headers... " >&6; }
15438   private_dir=""
15439   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15440   if test -f ${dir}/tclInt.h ; then
15441     private_dir=${dir}
15442   fi
15443
15444   if test x"${private_dir}" = x; then
15445     as_fn_error "could not find private Tcl headers" "$LINENO" 5
15446   else
15447     TCL_PRIVATE_INCLUDE="-I${private_dir}"
15448     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15449 $as_echo "${private_dir}" >&6; }
15450   fi
15451
15452           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15453           TCL_LIBRARY="${TCL_LIB_SPEC}"
15454           TCL_DEPS=""
15455         else
15456           # If building tcl in the same src tree, private headers
15457           # are not needed, but we need to be sure to use the right
15458           # headers library
15459           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15460           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15461           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15462         fi
15463
15464
15465
15466
15467
15468     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15469 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
15470
15471     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
15472         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15473 $as_echo "loading" >&6; }
15474         . ${TK_BIN_DIR}/tkConfig.sh
15475     else
15476         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15477 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
15478     fi
15479
15480     # eval is required to do the TK_DBGX substitution
15481     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15482     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15483
15484     # If the TK_BIN_DIR is the build directory (not the install directory),
15485     # then set the common variable name to the value of the build variables.
15486     # For example, the variable TK_LIB_SPEC will be set to the value
15487     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15488     # instead of TK_BUILD_LIB_SPEC since it will work with both an
15489     # installed and uninstalled version of Tcl.
15490     if test -f "${TK_BIN_DIR}/Makefile" ; then
15491         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15492         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15493         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15494     elif test "`uname -s`" = "Darwin"; then
15495         # If Tk was built as a framework, attempt to use the libraries
15496         # from the framework at the given location so that linking works
15497         # against Tk.framework installed in an arbitrary location.
15498         case ${TK_DEFS} in
15499             *TK_FRAMEWORK*)
15500                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
15501                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
15502                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15503                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15504                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15505                             break
15506                         fi
15507                     done
15508                 fi
15509                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
15510                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15511                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15512                 fi
15513                 ;;
15514         esac
15515     fi
15516
15517     # eval is required to do the TK_DBGX substitution
15518     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15519     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15520     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15521     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536         # Check for in-tree Tk
15537         intree="no"
15538         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15539           intree="yes"
15540         fi
15541
15542         # Find Tk private headers
15543         if test x"${intree}" = xno; then
15544
15545   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15546 $as_echo_n "checking for Tk private headers... " >&6; }
15547   private_dir=""
15548   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15549   if test -f ${dir}/tkInt.h; then
15550     private_dir=${dir}
15551   fi
15552
15553   if test x"${private_dir}" = x; then
15554     as_fn_error "could not find Tk private headers" "$LINENO" 5
15555   else
15556     TK_PRIVATE_INCLUDE="-I${private_dir}"
15557     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15558 $as_echo "${private_dir}" >&6; }
15559   fi
15560
15561           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15562           TK_LIBRARY=${TK_LIB_SPEC}
15563           TK_DEPS=""
15564         else
15565           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15566           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15567           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15568         fi
15569
15570
15571
15572
15573
15574         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
15575
15576         # Include some libraries that Tcl and Tk want.
15577         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15578         # Yes, the ordering seems wrong here.  But it isn't.
15579         # TK_LIBS is the list of libraries that need to be linked
15580         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
15581         # were in LIBS then any link tests after this point would
15582         # try to include things like `$(LIBGUI)', which wouldn't work.
15583         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
15584
15585         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15586         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15587         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15588         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15589         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15590         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15591         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
15592
15593         if test x$gdb_cv_os_cygwin = xyes; then
15594           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15595           WIN32LDAPP="-Wl,--subsystem,console"
15596           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
15597         fi
15598
15599         subdirs="$subdirs gdbtk"
15600
15601     fi
15602 fi
15603
15604
15605
15606
15607
15608
15609
15610
15611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15612 $as_echo_n "checking for X... " >&6; }
15613
15614
15615 # Check whether --with-x was given.
15616 if test "${with_x+set}" = set; then :
15617   withval=$with_x;
15618 fi
15619
15620 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15621 if test "x$with_x" = xno; then
15622   # The user explicitly disabled X.
15623   have_x=disabled
15624 else
15625   case $x_includes,$x_libraries in #(
15626     *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15627     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15628   $as_echo_n "(cached) " >&6
15629 else
15630   # One or both of the vars are not set, and there is no cached value.
15631 ac_x_includes=no ac_x_libraries=no
15632 rm -f -r conftest.dir
15633 if mkdir conftest.dir; then
15634   cd conftest.dir
15635   cat >Imakefile <<'_ACEOF'
15636 incroot:
15637         @echo incroot='${INCROOT}'
15638 usrlibdir:
15639         @echo usrlibdir='${USRLIBDIR}'
15640 libdir:
15641         @echo libdir='${LIBDIR}'
15642 _ACEOF
15643   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
15644     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
15645     for ac_var in incroot usrlibdir libdir; do
15646       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15647     done
15648     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
15649     for ac_extension in a so sl dylib la dll; do
15650       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15651          test -f "$ac_im_libdir/libX11.$ac_extension"; then
15652         ac_im_usrlibdir=$ac_im_libdir; break
15653       fi
15654     done
15655     # Screen out bogus values from the imake configuration.  They are
15656     # bogus both because they are the default anyway, and because
15657     # using them would break gcc on systems where it needs fixed includes.
15658     case $ac_im_incroot in
15659         /usr/include) ac_x_includes= ;;
15660         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
15661     esac
15662     case $ac_im_usrlibdir in
15663         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
15664         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
15665     esac
15666   fi
15667   cd ..
15668   rm -f -r conftest.dir
15669 fi
15670
15671 # Standard set of common directories for X headers.
15672 # Check X11 before X11Rn because it is often a symlink to the current release.
15673 ac_x_header_dirs='
15674 /usr/X11/include
15675 /usr/X11R7/include
15676 /usr/X11R6/include
15677 /usr/X11R5/include
15678 /usr/X11R4/include
15679
15680 /usr/include/X11
15681 /usr/include/X11R7
15682 /usr/include/X11R6
15683 /usr/include/X11R5
15684 /usr/include/X11R4
15685
15686 /usr/local/X11/include
15687 /usr/local/X11R7/include
15688 /usr/local/X11R6/include
15689 /usr/local/X11R5/include
15690 /usr/local/X11R4/include
15691
15692 /usr/local/include/X11
15693 /usr/local/include/X11R7
15694 /usr/local/include/X11R6
15695 /usr/local/include/X11R5
15696 /usr/local/include/X11R4
15697
15698 /usr/X386/include
15699 /usr/x386/include
15700 /usr/XFree86/include/X11
15701
15702 /usr/include
15703 /usr/local/include
15704 /usr/unsupported/include
15705 /usr/athena/include
15706 /usr/local/x11r5/include
15707 /usr/lpp/Xamples/include
15708
15709 /usr/openwin/include
15710 /usr/openwin/share/include'
15711
15712 if test "$ac_x_includes" = no; then
15713   # Guess where to find include files, by looking for Xlib.h.
15714   # First, try using that file with no special directory specified.
15715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15716 /* end confdefs.h.  */
15717 #include <X11/Xlib.h>
15718 _ACEOF
15719 if ac_fn_c_try_cpp "$LINENO"; then :
15720   # We can compile using X headers with no special include directory.
15721 ac_x_includes=
15722 else
15723   for ac_dir in $ac_x_header_dirs; do
15724   if test -r "$ac_dir/X11/Xlib.h"; then
15725     ac_x_includes=$ac_dir
15726     break
15727   fi
15728 done
15729 fi
15730 rm -f conftest.err conftest.$ac_ext
15731 fi # $ac_x_includes = no
15732
15733 if test "$ac_x_libraries" = no; then
15734   # Check for the libraries.
15735   # See if we find them without any special options.
15736   # Don't add to $LIBS permanently.
15737   ac_save_LIBS=$LIBS
15738   LIBS="-lX11 $LIBS"
15739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15740 /* end confdefs.h.  */
15741 #include <X11/Xlib.h>
15742 int
15743 main ()
15744 {
15745 XrmInitialize ()
15746   ;
15747   return 0;
15748 }
15749 _ACEOF
15750 if ac_fn_c_try_link "$LINENO"; then :
15751   LIBS=$ac_save_LIBS
15752 # We can link X programs with no special library path.
15753 ac_x_libraries=
15754 else
15755   LIBS=$ac_save_LIBS
15756 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
15757 do
15758   # Don't even attempt the hair of trying to link an X program!
15759   for ac_extension in a so sl dylib la dll; do
15760     if test -r "$ac_dir/libX11.$ac_extension"; then
15761       ac_x_libraries=$ac_dir
15762       break 2
15763     fi
15764   done
15765 done
15766 fi
15767 rm -f core conftest.err conftest.$ac_objext \
15768     conftest$ac_exeext conftest.$ac_ext
15769 fi # $ac_x_libraries = no
15770
15771 case $ac_x_includes,$ac_x_libraries in #(
15772   no,* | *,no | *\'*)
15773     # Didn't find X, or a directory has "'" in its name.
15774     ac_cv_have_x="have_x=no";; #(
15775   *)
15776     # Record where we found X for the cache.
15777     ac_cv_have_x="have_x=yes\
15778         ac_x_includes='$ac_x_includes'\
15779         ac_x_libraries='$ac_x_libraries'"
15780 esac
15781 fi
15782 ;; #(
15783     *) have_x=yes;;
15784   esac
15785   eval "$ac_cv_have_x"
15786 fi # $with_x != no
15787
15788 if test "$have_x" != yes; then
15789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15790 $as_echo "$have_x" >&6; }
15791   no_x=yes
15792 else
15793   # If each of the values was on the command line, it overrides each guess.
15794   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15795   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15796   # Update the cache value to reflect the command line values.
15797   ac_cv_have_x="have_x=yes\
15798         ac_x_includes='$x_includes'\
15799         ac_x_libraries='$x_libraries'"
15800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15801 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
15802 fi
15803
15804
15805 # Unlike the sim directory, whether a simulator is linked is controlled by
15806 # presence of a gdb_sim definition in the target configure.tgt entry.
15807 # This code just checks for a few cases where we'd like to ignore those
15808 # definitions, even when they're present in the '.mt' file.  These cases
15809 # are when --disable-sim is specified, or if the simulator directory is
15810 # not part of the source tree.
15811 #
15812 # Check whether --enable-sim was given.
15813 if test "${enable_sim+set}" = set; then :
15814   enableval=$enable_sim; echo "enable_sim = $enable_sim";
15815  echo "enableval = ${enableval}";
15816  case "${enableval}" in
15817   yes) ignore_sim=false ;;
15818   no)  ignore_sim=true ;;
15819   *)   ignore_sim=false ;;
15820  esac
15821 else
15822   ignore_sim=false
15823 fi
15824
15825
15826 if test ! -d "${srcdir}/../sim"; then
15827   ignore_sim=true
15828 fi
15829
15830 SIM=
15831 SIM_OBS=
15832 if test "${ignore_sim}" = "false"; then
15833   if test x"${gdb_sim}" != x ; then
15834     SIM="${gdb_sim}"
15835     SIM_OBS="remote-sim.o"
15836
15837 $as_echo "#define WITH_SIM 1" >>confdefs.h
15838
15839
15840     # Some tdep code should only be compiled in when the ppc sim is
15841     # built.  PR sim/13418.
15842     case $target in
15843       powerpc*-*-*)
15844
15845 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
15846
15847         ;;
15848     esac
15849   fi
15850 fi
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865 # List of host floatformats.
15866
15867 cat >>confdefs.h <<_ACEOF
15868 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
15869 _ACEOF
15870
15871
15872 cat >>confdefs.h <<_ACEOF
15873 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
15874 _ACEOF
15875
15876
15877 cat >>confdefs.h <<_ACEOF
15878 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
15879 _ACEOF
15880
15881
15882 # target_subdir is used by the testsuite to find the target libraries.
15883 target_subdir=
15884 if test "${host}" != "${target}"; then
15885     target_subdir="${target_alias}/"
15886 fi
15887
15888
15889 frags=
15890 if test "${gdb_native}" = "yes"; then
15891   host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15892   if test ! -f ${host_makefile_frag}; then
15893     as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
15894   fi
15895   frags="$frags $host_makefile_frag"
15896 else
15897   host_makefile_frag=/dev/null
15898 fi
15899
15900
15901
15902
15903 if test "${gdb_native}" = "yes"; then
15904 # We pick this up from the host configuration file (.mh) because we
15905 # do not have a native configuration Makefile fragment.
15906 nativefile=`sed -n '
15907 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
15908 ' ${host_makefile_frag}`
15909 fi
15910
15911
15912 if test x"${gdb_osabi}" != x ; then
15913
15914 cat >>confdefs.h <<_ACEOF
15915 #define GDB_OSABI_DEFAULT $gdb_osabi
15916 _ACEOF
15917
15918 fi
15919
15920 # Enable multi-ice-gdb-server.
15921 # Check whether --enable-multi-ice was given.
15922 if test "${enable_multi_ice+set}" = set; then :
15923   enableval=$enable_multi_ice; case $enableval in
15924     yes | no)
15925       ;;
15926     *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
15927   esac
15928 fi
15929
15930 if test "x$enable_multi_ice" = xyes; then
15931    subdirs="$subdirs multi-ice"
15932
15933 fi
15934
15935 # Check whether --enable-gdbserver was given.
15936 if test "${enable_gdbserver+set}" = set; then :
15937   enableval=$enable_gdbserver; case "${enableval}" in
15938   yes| no|auto) ;;
15939   *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15940 esac
15941 else
15942   enable_gdbserver=auto
15943 fi
15944
15945
15946 # We only build gdbserver automatically in a native configuration, and
15947 # only if the user did not explicitly disable its build.
15948 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
15949   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15950 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
15951   if test "x$build_gdbserver" = xyes; then
15952     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15953 $as_echo "yes" >&6; }
15954     subdirs="$subdirs gdbserver"
15955
15956     gdbserver_build_enabled=yes
15957   else
15958     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15959 $as_echo "no" >&6; }
15960   fi
15961 fi
15962
15963 # If the user explicitly request the gdbserver to be built, verify that
15964 # we were in fact able to enable it.
15965 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15966   as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15967 fi
15968
15969 # Check for babeltrace and babeltrace-ctf
15970
15971 # Check whether --with-babeltrace was given.
15972 if test "${with_babeltrace+set}" = set; then :
15973   withval=$with_babeltrace;
15974 else
15975   with_babeltrace=auto
15976 fi
15977
15978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
15979 $as_echo_n "checking whether to use babeltrace... " >&6; }
15980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
15981 $as_echo "$with_babeltrace" >&6; }
15982
15983 if test "x$with_babeltrace" = "xno"; then
15984   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
15985 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
15986 else
15987   # Append -Werror to CFLAGS so that configure can catch the warning
15988   # "assignment from incompatible pointer type", which is related to
15989   # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
15990   # in GDB, while babeltrace 1.0.3 is broken.
15991   # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
15992   # safe to save and restore CFLAGS here.
15993   saved_CFLAGS=$CFLAGS
15994   CFLAGS="$CFLAGS -Werror"
15995
15996
15997
15998
15999
16000
16001
16002
16003     use_additional=yes
16004
16005   acl_save_prefix="$prefix"
16006   prefix="$acl_final_prefix"
16007   acl_save_exec_prefix="$exec_prefix"
16008   exec_prefix="$acl_final_exec_prefix"
16009
16010     eval additional_includedir=\"$includedir\"
16011     eval additional_libdir=\"$libdir\"
16012
16013   exec_prefix="$acl_save_exec_prefix"
16014   prefix="$acl_save_prefix"
16015
16016
16017 # Check whether --with-libbabeltrace-prefix was given.
16018 if test "${with_libbabeltrace_prefix+set}" = set; then :
16019   withval=$with_libbabeltrace_prefix;
16020     if test "X$withval" = "Xno"; then
16021       use_additional=no
16022     else
16023       if test "X$withval" = "X"; then
16024
16025   acl_save_prefix="$prefix"
16026   prefix="$acl_final_prefix"
16027   acl_save_exec_prefix="$exec_prefix"
16028   exec_prefix="$acl_final_exec_prefix"
16029
16030           eval additional_includedir=\"$includedir\"
16031           eval additional_libdir=\"$libdir\"
16032
16033   exec_prefix="$acl_save_exec_prefix"
16034   prefix="$acl_save_prefix"
16035
16036       else
16037         additional_includedir="$withval/include"
16038         additional_libdir="$withval/lib"
16039       fi
16040     fi
16041
16042 fi
16043
16044       LIBBABELTRACE=
16045   LTLIBBABELTRACE=
16046   INCBABELTRACE=
16047   rpathdirs=
16048   ltrpathdirs=
16049   names_already_handled=
16050   names_next_round='babeltrace babeltrace-ctf'
16051   while test -n "$names_next_round"; do
16052     names_this_round="$names_next_round"
16053     names_next_round=
16054     for name in $names_this_round; do
16055       already_handled=
16056       for n in $names_already_handled; do
16057         if test "$n" = "$name"; then
16058           already_handled=yes
16059           break
16060         fi
16061       done
16062       if test -z "$already_handled"; then
16063         names_already_handled="$names_already_handled $name"
16064                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16065         eval value=\"\$HAVE_LIB$uppername\"
16066         if test -n "$value"; then
16067           if test "$value" = yes; then
16068             eval value=\"\$LIB$uppername\"
16069             test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16070             eval value=\"\$LTLIB$uppername\"
16071             test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16072           else
16073                                     :
16074           fi
16075         else
16076                               found_dir=
16077           found_la=
16078           found_so=
16079           found_a=
16080           if test $use_additional = yes; then
16081             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16082               found_dir="$additional_libdir"
16083               found_so="$additional_libdir/lib$name.$shlibext"
16084               if test -f "$additional_libdir/lib$name.la"; then
16085                 found_la="$additional_libdir/lib$name.la"
16086               fi
16087             else
16088               if test -f "$additional_libdir/lib$name.$libext"; then
16089                 found_dir="$additional_libdir"
16090                 found_a="$additional_libdir/lib$name.$libext"
16091                 if test -f "$additional_libdir/lib$name.la"; then
16092                   found_la="$additional_libdir/lib$name.la"
16093                 fi
16094               fi
16095             fi
16096           fi
16097           if test "X$found_dir" = "X"; then
16098             for x in $LDFLAGS $LTLIBBABELTRACE; do
16099
16100   acl_save_prefix="$prefix"
16101   prefix="$acl_final_prefix"
16102   acl_save_exec_prefix="$exec_prefix"
16103   exec_prefix="$acl_final_exec_prefix"
16104   eval x=\"$x\"
16105   exec_prefix="$acl_save_exec_prefix"
16106   prefix="$acl_save_prefix"
16107
16108               case "$x" in
16109                 -L*)
16110                   dir=`echo "X$x" | sed -e 's/^X-L//'`
16111                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16112                     found_dir="$dir"
16113                     found_so="$dir/lib$name.$shlibext"
16114                     if test -f "$dir/lib$name.la"; then
16115                       found_la="$dir/lib$name.la"
16116                     fi
16117                   else
16118                     if test -f "$dir/lib$name.$libext"; then
16119                       found_dir="$dir"
16120                       found_a="$dir/lib$name.$libext"
16121                       if test -f "$dir/lib$name.la"; then
16122                         found_la="$dir/lib$name.la"
16123                       fi
16124                     fi
16125                   fi
16126                   ;;
16127               esac
16128               if test "X$found_dir" != "X"; then
16129                 break
16130               fi
16131             done
16132           fi
16133           if test "X$found_dir" != "X"; then
16134                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16135             if test "X$found_so" != "X"; then
16136                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16137                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16138               else
16139                                                                                 haveit=
16140                 for x in $ltrpathdirs; do
16141                   if test "X$x" = "X$found_dir"; then
16142                     haveit=yes
16143                     break
16144                   fi
16145                 done
16146                 if test -z "$haveit"; then
16147                   ltrpathdirs="$ltrpathdirs $found_dir"
16148                 fi
16149                                 if test "$hardcode_direct" = yes; then
16150                                                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16151                 else
16152                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16153                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16154                                                             haveit=
16155                     for x in $rpathdirs; do
16156                       if test "X$x" = "X$found_dir"; then
16157                         haveit=yes
16158                         break
16159                       fi
16160                     done
16161                     if test -z "$haveit"; then
16162                       rpathdirs="$rpathdirs $found_dir"
16163                     fi
16164                   else
16165                                                                                 haveit=
16166                     for x in $LDFLAGS $LIBBABELTRACE; do
16167
16168   acl_save_prefix="$prefix"
16169   prefix="$acl_final_prefix"
16170   acl_save_exec_prefix="$exec_prefix"
16171   exec_prefix="$acl_final_exec_prefix"
16172   eval x=\"$x\"
16173   exec_prefix="$acl_save_exec_prefix"
16174   prefix="$acl_save_prefix"
16175
16176                       if test "X$x" = "X-L$found_dir"; then
16177                         haveit=yes
16178                         break
16179                       fi
16180                     done
16181                     if test -z "$haveit"; then
16182                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16183                     fi
16184                     if test "$hardcode_minus_L" != no; then
16185                                                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16186                     else
16187                                                                                                                                                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16188                     fi
16189                   fi
16190                 fi
16191               fi
16192             else
16193               if test "X$found_a" != "X"; then
16194                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16195               else
16196                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16197               fi
16198             fi
16199                         additional_includedir=
16200             case "$found_dir" in
16201               */lib | */lib/)
16202                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16203                 additional_includedir="$basedir/include"
16204                 ;;
16205             esac
16206             if test "X$additional_includedir" != "X"; then
16207                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
16208                 haveit=
16209                 if test "X$additional_includedir" = "X/usr/local/include"; then
16210                   if test -n "$GCC"; then
16211                     case $host_os in
16212                       linux*) haveit=yes;;
16213                     esac
16214                   fi
16215                 fi
16216                 if test -z "$haveit"; then
16217                   for x in $CPPFLAGS $INCBABELTRACE; do
16218
16219   acl_save_prefix="$prefix"
16220   prefix="$acl_final_prefix"
16221   acl_save_exec_prefix="$exec_prefix"
16222   exec_prefix="$acl_final_exec_prefix"
16223   eval x=\"$x\"
16224   exec_prefix="$acl_save_exec_prefix"
16225   prefix="$acl_save_prefix"
16226
16227                     if test "X$x" = "X-I$additional_includedir"; then
16228                       haveit=yes
16229                       break
16230                     fi
16231                   done
16232                   if test -z "$haveit"; then
16233                     if test -d "$additional_includedir"; then
16234                                             INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16235                     fi
16236                   fi
16237                 fi
16238               fi
16239             fi
16240                         if test -n "$found_la"; then
16241                                                         save_libdir="$libdir"
16242               case "$found_la" in
16243                 */* | *\\*) . "$found_la" ;;
16244                 *) . "./$found_la" ;;
16245               esac
16246               libdir="$save_libdir"
16247                             for dep in $dependency_libs; do
16248                 case "$dep" in
16249                   -L*)
16250                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16251                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
16252                       haveit=
16253                       if test "X$additional_libdir" = "X/usr/local/lib"; then
16254                         if test -n "$GCC"; then
16255                           case $host_os in
16256                             linux*) haveit=yes;;
16257                           esac
16258                         fi
16259                       fi
16260                       if test -z "$haveit"; then
16261                         haveit=
16262                         for x in $LDFLAGS $LIBBABELTRACE; do
16263
16264   acl_save_prefix="$prefix"
16265   prefix="$acl_final_prefix"
16266   acl_save_exec_prefix="$exec_prefix"
16267   exec_prefix="$acl_final_exec_prefix"
16268   eval x=\"$x\"
16269   exec_prefix="$acl_save_exec_prefix"
16270   prefix="$acl_save_prefix"
16271
16272                           if test "X$x" = "X-L$additional_libdir"; then
16273                             haveit=yes
16274                             break
16275                           fi
16276                         done
16277                         if test -z "$haveit"; then
16278                           if test -d "$additional_libdir"; then
16279                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16280                           fi
16281                         fi
16282                         haveit=
16283                         for x in $LDFLAGS $LTLIBBABELTRACE; do
16284
16285   acl_save_prefix="$prefix"
16286   prefix="$acl_final_prefix"
16287   acl_save_exec_prefix="$exec_prefix"
16288   exec_prefix="$acl_final_exec_prefix"
16289   eval x=\"$x\"
16290   exec_prefix="$acl_save_exec_prefix"
16291   prefix="$acl_save_prefix"
16292
16293                           if test "X$x" = "X-L$additional_libdir"; then
16294                             haveit=yes
16295                             break
16296                           fi
16297                         done
16298                         if test -z "$haveit"; then
16299                           if test -d "$additional_libdir"; then
16300                                                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
16301                           fi
16302                         fi
16303                       fi
16304                     fi
16305                     ;;
16306                   -R*)
16307                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
16308                     if test "$enable_rpath" != no; then
16309                                                                   haveit=
16310                       for x in $rpathdirs; do
16311                         if test "X$x" = "X$dir"; then
16312                           haveit=yes
16313                           break
16314                         fi
16315                       done
16316                       if test -z "$haveit"; then
16317                         rpathdirs="$rpathdirs $dir"
16318                       fi
16319                                                                   haveit=
16320                       for x in $ltrpathdirs; do
16321                         if test "X$x" = "X$dir"; then
16322                           haveit=yes
16323                           break
16324                         fi
16325                       done
16326                       if test -z "$haveit"; then
16327                         ltrpathdirs="$ltrpathdirs $dir"
16328                       fi
16329                     fi
16330                     ;;
16331                   -l*)
16332                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16333                     ;;
16334                   *.la)
16335                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16336                     ;;
16337                   *)
16338                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
16339                     LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
16340                     ;;
16341                 esac
16342               done
16343             fi
16344           else
16345                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16346             LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
16347           fi
16348         fi
16349       fi
16350     done
16351   done
16352   if test "X$rpathdirs" != "X"; then
16353     if test -n "$hardcode_libdir_separator"; then
16354                         alldirs=
16355       for found_dir in $rpathdirs; do
16356         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16357       done
16358             acl_save_libdir="$libdir"
16359       libdir="$alldirs"
16360       eval flag=\"$hardcode_libdir_flag_spec\"
16361       libdir="$acl_save_libdir"
16362       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16363     else
16364             for found_dir in $rpathdirs; do
16365         acl_save_libdir="$libdir"
16366         libdir="$found_dir"
16367         eval flag=\"$hardcode_libdir_flag_spec\"
16368         libdir="$acl_save_libdir"
16369         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16370       done
16371     fi
16372   fi
16373   if test "X$ltrpathdirs" != "X"; then
16374             for found_dir in $ltrpathdirs; do
16375       LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
16376     done
16377   fi
16378
16379
16380         ac_save_CPPFLAGS="$CPPFLAGS"
16381
16382   for element in $INCBABELTRACE; do
16383     haveit=
16384     for x in $CPPFLAGS; do
16385
16386   acl_save_prefix="$prefix"
16387   prefix="$acl_final_prefix"
16388   acl_save_exec_prefix="$exec_prefix"
16389   exec_prefix="$acl_final_exec_prefix"
16390   eval x=\"$x\"
16391   exec_prefix="$acl_save_exec_prefix"
16392   prefix="$acl_save_prefix"
16393
16394       if test "X$x" = "X$element"; then
16395         haveit=yes
16396         break
16397       fi
16398     done
16399     if test -z "$haveit"; then
16400       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16401     fi
16402   done
16403
16404
16405   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
16406 $as_echo_n "checking for libbabeltrace... " >&6; }
16407 if test "${ac_cv_libbabeltrace+set}" = set; then :
16408   $as_echo_n "(cached) " >&6
16409 else
16410
16411     ac_save_LIBS="$LIBS"
16412     LIBS="$LIBS $LIBBABELTRACE"
16413     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16414 /* end confdefs.h.  */
16415 #include <babeltrace/babeltrace.h>
16416                          #include <babeltrace/ctf/events.h>
16417                          #include <babeltrace/ctf/iterator.h>
16418 int
16419 main ()
16420 {
16421 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
16422                         struct bt_ctf_event *event = NULL;
16423                         const struct bt_definition *scope;
16424
16425                         pos.type = BT_SEEK_BEGIN;
16426                         bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
16427                         scope = bt_ctf_get_top_level_scope (event,
16428                                                            BT_STREAM_EVENT_HEADER);
16429                         bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
16430
16431   ;
16432   return 0;
16433 }
16434 _ACEOF
16435 if ac_fn_c_try_link "$LINENO"; then :
16436   ac_cv_libbabeltrace=yes
16437 else
16438   ac_cv_libbabeltrace=no
16439 fi
16440 rm -f core conftest.err conftest.$ac_objext \
16441     conftest$ac_exeext conftest.$ac_ext
16442     LIBS="$ac_save_LIBS"
16443
16444 fi
16445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
16446 $as_echo "$ac_cv_libbabeltrace" >&6; }
16447   if test "$ac_cv_libbabeltrace" = yes; then
16448     HAVE_LIBBABELTRACE=yes
16449
16450 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
16451
16452     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
16453 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
16454     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
16455 $as_echo "$LIBBABELTRACE" >&6; }
16456   else
16457     HAVE_LIBBABELTRACE=no
16458             CPPFLAGS="$ac_save_CPPFLAGS"
16459     LIBBABELTRACE=
16460     LTLIBBABELTRACE=
16461   fi
16462
16463
16464
16465
16466
16467
16468   CFLAGS=$saved_CFLAGS
16469
16470   if test "$HAVE_LIBBABELTRACE" != yes; then
16471      if test "$with_babeltrace" = yes; then
16472        as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
16473      else
16474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
16475 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
16476      fi
16477   fi
16478 fi
16479
16480 # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
16481 # to an empty version.
16482
16483 files=
16484 links=
16485
16486 rm -f nm.h
16487 if test "${nativefile}" != ""; then
16488     case "${nativefile}" in
16489       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16490       * ) GDB_NM_FILE="${nativefile}"
16491     esac
16492     files="${files} ${GDB_NM_FILE}"
16493     links="${links} nm.h"
16494
16495 cat >>confdefs.h <<_ACEOF
16496 #define GDB_NM_FILE "${GDB_NM_FILE}"
16497 _ACEOF
16498
16499 fi
16500
16501
16502 ac_sources="$files"
16503 ac_dests="$links"
16504 while test -n "$ac_sources"; do
16505   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16506   set $ac_sources; ac_source=$1; shift; ac_sources=$*
16507   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16508 done
16509 ac_config_links="$ac_config_links $ac_config_links_1"
16510
16511
16512
16513
16514
16515 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
16516
16517
16518 if $development; then
16519
16520 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
16521
16522 fi
16523
16524
16525   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16526   GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
16527   if test "x$GDB_TRANSFORM_NAME" = x; then
16528      GDB_TRANSFORM_NAME=gdb
16529   fi
16530
16531
16532
16533   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16534   GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
16535   if test "x$GCORE_TRANSFORM_NAME" = x; then
16536      GCORE_TRANSFORM_NAME=gcore
16537   fi
16538
16539
16540 ac_config_files="$ac_config_files gcore"
16541
16542 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
16543
16544
16545 cat >confcache <<\_ACEOF
16546 # This file is a shell script that caches the results of configure
16547 # tests run on this system so they can be shared between configure
16548 # scripts and configure runs, see configure's option --config-cache.
16549 # It is not useful on other systems.  If it contains results you don't
16550 # want to keep, you may remove or edit it.
16551 #
16552 # config.status only pays attention to the cache file if you give it
16553 # the --recheck option to rerun configure.
16554 #
16555 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16556 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16557 # following values.
16558
16559 _ACEOF
16560
16561 # The following way of writing the cache mishandles newlines in values,
16562 # but we know of no workaround that is simple, portable, and efficient.
16563 # So, we kill variables containing newlines.
16564 # Ultrix sh set writes to stderr and can't be redirected directly,
16565 # and sets the high bit in the cache file unless we assign to the vars.
16566 (
16567   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16568     eval ac_val=\$$ac_var
16569     case $ac_val in #(
16570     *${as_nl}*)
16571       case $ac_var in #(
16572       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16573 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16574       esac
16575       case $ac_var in #(
16576       _ | IFS | as_nl) ;; #(
16577       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16578       *) { eval $ac_var=; unset $ac_var;} ;;
16579       esac ;;
16580     esac
16581   done
16582
16583   (set) 2>&1 |
16584     case $as_nl`(ac_space=' '; set) 2>&1` in #(
16585     *${as_nl}ac_space=\ *)
16586       # `set' does not quote correctly, so add quotes: double-quote
16587       # substitution turns \\\\ into \\, and sed turns \\ into \.
16588       sed -n \
16589         "s/'/'\\\\''/g;
16590           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16591       ;; #(
16592     *)
16593       # `set' quotes correctly as required by POSIX, so do not add quotes.
16594       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16595       ;;
16596     esac |
16597     sort
16598 ) |
16599   sed '
16600      /^ac_cv_env_/b end
16601      t clear
16602      :clear
16603      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16604      t end
16605      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16606      :end' >>confcache
16607 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16608   if test -w "$cache_file"; then
16609     test "x$cache_file" != "x/dev/null" &&
16610       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16611 $as_echo "$as_me: updating cache $cache_file" >&6;}
16612     cat confcache >$cache_file
16613   else
16614     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16615 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16616   fi
16617 fi
16618 rm -f confcache
16619
16620 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16621 # Let make expand exec_prefix.
16622 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16623
16624 DEFS=-DHAVE_CONFIG_H
16625
16626 ac_libobjs=
16627 ac_ltlibobjs=
16628 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16629   # 1. Remove the extension, and $U if already installed.
16630   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16631   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16632   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16633   #    will be set to the directory where LIBOBJS objects are built.
16634   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16635   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16636 done
16637 LIBOBJS=$ac_libobjs
16638
16639 LTLIBOBJS=$ac_ltlibobjs
16640
16641
16642 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
16643   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16644 Usually this means the macro was only invoked conditionally." "$LINENO" 5
16645 fi
16646 if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
16647   as_fn_error "conditional \"GMAKE\" was never defined.
16648 Usually this means the macro was only invoked conditionally." "$LINENO" 5
16649 fi
16650 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
16651   as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
16652 Usually this means the macro was only invoked conditionally." "$LINENO" 5
16653 fi
16654 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
16655   as_fn_error "conditional \"HAVE_GUILE\" was never defined.
16656 Usually this means the macro was only invoked conditionally." "$LINENO" 5
16657 fi
16658
16659
16660 : ${CONFIG_STATUS=./config.status}
16661 ac_write_fail=0
16662 ac_clean_files_save=$ac_clean_files
16663 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16664 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16665 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16666 as_write_fail=0
16667 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16668 #! $SHELL
16669 # Generated by $as_me.
16670 # Run this file to recreate the current configuration.
16671 # Compiler output produced by configure, useful for debugging
16672 # configure, is in config.log if it exists.
16673
16674 debug=false
16675 ac_cs_recheck=false
16676 ac_cs_silent=false
16677
16678 SHELL=\${CONFIG_SHELL-$SHELL}
16679 export SHELL
16680 _ASEOF
16681 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16682 ## -------------------- ##
16683 ## M4sh Initialization. ##
16684 ## -------------------- ##
16685
16686 # Be more Bourne compatible
16687 DUALCASE=1; export DUALCASE # for MKS sh
16688 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16689   emulate sh
16690   NULLCMD=:
16691   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16692   # is contrary to our usage.  Disable this feature.
16693   alias -g '${1+"$@"}'='"$@"'
16694   setopt NO_GLOB_SUBST
16695 else
16696   case `(set -o) 2>/dev/null` in #(
16697   *posix*) :
16698     set -o posix ;; #(
16699   *) :
16700      ;;
16701 esac
16702 fi
16703
16704
16705 as_nl='
16706 '
16707 export as_nl
16708 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16709 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16710 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16711 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16712 # Prefer a ksh shell builtin over an external printf program on Solaris,
16713 # but without wasting forks for bash or zsh.
16714 if test -z "$BASH_VERSION$ZSH_VERSION" \
16715     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16716   as_echo='print -r --'
16717   as_echo_n='print -rn --'
16718 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16719   as_echo='printf %s\n'
16720   as_echo_n='printf %s'
16721 else
16722   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16723     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16724     as_echo_n='/usr/ucb/echo -n'
16725   else
16726     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16727     as_echo_n_body='eval
16728       arg=$1;
16729       case $arg in #(
16730       *"$as_nl"*)
16731         expr "X$arg" : "X\\(.*\\)$as_nl";
16732         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16733       esac;
16734       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16735     '
16736     export as_echo_n_body
16737     as_echo_n='sh -c $as_echo_n_body as_echo'
16738   fi
16739   export as_echo_body
16740   as_echo='sh -c $as_echo_body as_echo'
16741 fi
16742
16743 # The user is always right.
16744 if test "${PATH_SEPARATOR+set}" != set; then
16745   PATH_SEPARATOR=:
16746   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16747     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16748       PATH_SEPARATOR=';'
16749   }
16750 fi
16751
16752
16753 # IFS
16754 # We need space, tab and new line, in precisely that order.  Quoting is
16755 # there to prevent editors from complaining about space-tab.
16756 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
16757 # splitting by setting IFS to empty value.)
16758 IFS=" ""        $as_nl"
16759
16760 # Find who we are.  Look in the path if we contain no directory separator.
16761 case $0 in #((
16762   *[\\/]* ) as_myself=$0 ;;
16763   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16764 for as_dir in $PATH
16765 do
16766   IFS=$as_save_IFS
16767   test -z "$as_dir" && as_dir=.
16768     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16769   done
16770 IFS=$as_save_IFS
16771
16772      ;;
16773 esac
16774 # We did not find ourselves, most probably we were run as `sh COMMAND'
16775 # in which case we are not to be found in the path.
16776 if test "x$as_myself" = x; then
16777   as_myself=$0
16778 fi
16779 if test ! -f "$as_myself"; then
16780   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16781   exit 1
16782 fi
16783
16784 # Unset variables that we do not need and which cause bugs (e.g. in
16785 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
16786 # suppresses any "Segmentation fault" message there.  '((' could
16787 # trigger a bug in pdksh 5.2.14.
16788 for as_var in BASH_ENV ENV MAIL MAILPATH
16789 do eval test x\${$as_var+set} = xset \
16790   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16791 done
16792 PS1='$ '
16793 PS2='> '
16794 PS4='+ '
16795
16796 # NLS nuisances.
16797 LC_ALL=C
16798 export LC_ALL
16799 LANGUAGE=C
16800 export LANGUAGE
16801
16802 # CDPATH.
16803 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16804
16805
16806 # as_fn_error ERROR [LINENO LOG_FD]
16807 # ---------------------------------
16808 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16809 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16810 # script with status $?, using 1 if that was 0.
16811 as_fn_error ()
16812 {
16813   as_status=$?; test $as_status -eq 0 && as_status=1
16814   if test "$3"; then
16815     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16816     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16817   fi
16818   $as_echo "$as_me: error: $1" >&2
16819   as_fn_exit $as_status
16820 } # as_fn_error
16821
16822
16823 # as_fn_set_status STATUS
16824 # -----------------------
16825 # Set $? to STATUS, without forking.
16826 as_fn_set_status ()
16827 {
16828   return $1
16829 } # as_fn_set_status
16830
16831 # as_fn_exit STATUS
16832 # -----------------
16833 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16834 as_fn_exit ()
16835 {
16836   set +e
16837   as_fn_set_status $1
16838   exit $1
16839 } # as_fn_exit
16840
16841 # as_fn_unset VAR
16842 # ---------------
16843 # Portably unset VAR.
16844 as_fn_unset ()
16845 {
16846   { eval $1=; unset $1;}
16847 }
16848 as_unset=as_fn_unset
16849 # as_fn_append VAR VALUE
16850 # ----------------------
16851 # Append the text in VALUE to the end of the definition contained in VAR. Take
16852 # advantage of any shell optimizations that allow amortized linear growth over
16853 # repeated appends, instead of the typical quadratic growth present in naive
16854 # implementations.
16855 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16856   eval 'as_fn_append ()
16857   {
16858     eval $1+=\$2
16859   }'
16860 else
16861   as_fn_append ()
16862   {
16863     eval $1=\$$1\$2
16864   }
16865 fi # as_fn_append
16866
16867 # as_fn_arith ARG...
16868 # ------------------
16869 # Perform arithmetic evaluation on the ARGs, and store the result in the
16870 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16871 # must be portable across $(()) and expr.
16872 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16873   eval 'as_fn_arith ()
16874   {
16875     as_val=$(( $* ))
16876   }'
16877 else
16878   as_fn_arith ()
16879   {
16880     as_val=`expr "$@" || test $? -eq 1`
16881   }
16882 fi # as_fn_arith
16883
16884
16885 if expr a : '\(a\)' >/dev/null 2>&1 &&
16886    test "X`expr 00001 : '.*\(...\)'`" = X001; then
16887   as_expr=expr
16888 else
16889   as_expr=false
16890 fi
16891
16892 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16893   as_basename=basename
16894 else
16895   as_basename=false
16896 fi
16897
16898 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16899   as_dirname=dirname
16900 else
16901   as_dirname=false
16902 fi
16903
16904 as_me=`$as_basename -- "$0" ||
16905 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16906          X"$0" : 'X\(//\)$' \| \
16907          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16908 $as_echo X/"$0" |
16909     sed '/^.*\/\([^/][^/]*\)\/*$/{
16910             s//\1/
16911             q
16912           }
16913           /^X\/\(\/\/\)$/{
16914             s//\1/
16915             q
16916           }
16917           /^X\/\(\/\).*/{
16918             s//\1/
16919             q
16920           }
16921           s/.*/./; q'`
16922
16923 # Avoid depending upon Character Ranges.
16924 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16925 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16926 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16927 as_cr_digits='0123456789'
16928 as_cr_alnum=$as_cr_Letters$as_cr_digits
16929
16930 ECHO_C= ECHO_N= ECHO_T=
16931 case `echo -n x` in #(((((
16932 -n*)
16933   case `echo 'xy\c'` in
16934   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
16935   xy)  ECHO_C='\c';;
16936   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16937        ECHO_T=' ';;
16938   esac;;
16939 *)
16940   ECHO_N='-n';;
16941 esac
16942
16943 rm -f conf$$ conf$$.exe conf$$.file
16944 if test -d conf$$.dir; then
16945   rm -f conf$$.dir/conf$$.file
16946 else
16947   rm -f conf$$.dir
16948   mkdir conf$$.dir 2>/dev/null
16949 fi
16950 if (echo >conf$$.file) 2>/dev/null; then
16951   if ln -s conf$$.file conf$$ 2>/dev/null; then
16952     as_ln_s='ln -s'
16953     # ... but there are two gotchas:
16954     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16955     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16956     # In both cases, we have to default to `cp -p'.
16957     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16958       as_ln_s='cp -p'
16959   elif ln conf$$.file conf$$ 2>/dev/null; then
16960     as_ln_s=ln
16961   else
16962     as_ln_s='cp -p'
16963   fi
16964 else
16965   as_ln_s='cp -p'
16966 fi
16967 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16968 rmdir conf$$.dir 2>/dev/null
16969
16970
16971 # as_fn_mkdir_p
16972 # -------------
16973 # Create "$as_dir" as a directory, including parents if necessary.
16974 as_fn_mkdir_p ()
16975 {
16976
16977   case $as_dir in #(
16978   -*) as_dir=./$as_dir;;
16979   esac
16980   test -d "$as_dir" || eval $as_mkdir_p || {
16981     as_dirs=
16982     while :; do
16983       case $as_dir in #(
16984       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16985       *) as_qdir=$as_dir;;
16986       esac
16987       as_dirs="'$as_qdir' $as_dirs"
16988       as_dir=`$as_dirname -- "$as_dir" ||
16989 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16990          X"$as_dir" : 'X\(//\)[^/]' \| \
16991          X"$as_dir" : 'X\(//\)$' \| \
16992          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16993 $as_echo X"$as_dir" |
16994     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16995             s//\1/
16996             q
16997           }
16998           /^X\(\/\/\)[^/].*/{
16999             s//\1/
17000             q
17001           }
17002           /^X\(\/\/\)$/{
17003             s//\1/
17004             q
17005           }
17006           /^X\(\/\).*/{
17007             s//\1/
17008             q
17009           }
17010           s/.*/./; q'`
17011       test -d "$as_dir" && break
17012     done
17013     test -z "$as_dirs" || eval "mkdir $as_dirs"
17014   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17015
17016
17017 } # as_fn_mkdir_p
17018 if mkdir -p . 2>/dev/null; then
17019   as_mkdir_p='mkdir -p "$as_dir"'
17020 else
17021   test -d ./-p && rmdir ./-p
17022   as_mkdir_p=false
17023 fi
17024
17025 if test -x / >/dev/null 2>&1; then
17026   as_test_x='test -x'
17027 else
17028   if ls -dL / >/dev/null 2>&1; then
17029     as_ls_L_option=L
17030   else
17031     as_ls_L_option=
17032   fi
17033   as_test_x='
17034     eval sh -c '\''
17035       if test -d "$1"; then
17036         test -d "$1/.";
17037       else
17038         case $1 in #(
17039         -*)set "./$1";;
17040         esac;
17041         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17042         ???[sx]*):;;*)false;;esac;fi
17043     '\'' sh
17044   '
17045 fi
17046 as_executable_p=$as_test_x
17047
17048 # Sed expression to map a string onto a valid CPP name.
17049 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17050
17051 # Sed expression to map a string onto a valid variable name.
17052 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17053
17054
17055 exec 6>&1
17056 ## ----------------------------------- ##
17057 ## Main body of $CONFIG_STATUS script. ##
17058 ## ----------------------------------- ##
17059 _ASEOF
17060 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17061
17062 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17063 # Save the log message, to keep $0 and so on meaningful, and to
17064 # report actual input values of CONFIG_FILES etc. instead of their
17065 # values after options handling.
17066 ac_log="
17067 This file was extended by $as_me, which was
17068 generated by GNU Autoconf 2.64.  Invocation command line was
17069
17070   CONFIG_FILES    = $CONFIG_FILES
17071   CONFIG_HEADERS  = $CONFIG_HEADERS
17072   CONFIG_LINKS    = $CONFIG_LINKS
17073   CONFIG_COMMANDS = $CONFIG_COMMANDS
17074   $ $0 $@
17075
17076 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17077 "
17078
17079 _ACEOF
17080
17081 case $ac_config_files in *"
17082 "*) set x $ac_config_files; shift; ac_config_files=$*;;
17083 esac
17084
17085 case $ac_config_headers in *"
17086 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17087 esac
17088
17089
17090 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17091 # Files that config.status was made for.
17092 config_files="$ac_config_files"
17093 config_headers="$ac_config_headers"
17094 config_links="$ac_config_links"
17095 config_commands="$ac_config_commands"
17096
17097 _ACEOF
17098
17099 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17100 ac_cs_usage="\
17101 \`$as_me' instantiates files and other configuration actions
17102 from templates according to the current configuration.  Unless the files
17103 and actions are specified as TAGs, all are instantiated by default.
17104
17105 Usage: $0 [OPTION]... [TAG]...
17106
17107   -h, --help       print this help, then exit
17108   -V, --version    print version number and configuration settings, then exit
17109   -q, --quiet, --silent
17110                    do not print progress messages
17111   -d, --debug      don't remove temporary files
17112       --recheck    update $as_me by reconfiguring in the same conditions
17113       --file=FILE[:TEMPLATE]
17114                    instantiate the configuration file FILE
17115       --header=FILE[:TEMPLATE]
17116                    instantiate the configuration header FILE
17117
17118 Configuration files:
17119 $config_files
17120
17121 Configuration headers:
17122 $config_headers
17123
17124 Configuration links:
17125 $config_links
17126
17127 Configuration commands:
17128 $config_commands
17129
17130 Report bugs to the package provider."
17131
17132 _ACEOF
17133 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17134 ac_cs_version="\\
17135 config.status
17136 configured by $0, generated by GNU Autoconf 2.64,
17137   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
17138
17139 Copyright (C) 2009 Free Software Foundation, Inc.
17140 This config.status script is free software; the Free Software Foundation
17141 gives unlimited permission to copy, distribute and modify it."
17142
17143 ac_pwd='$ac_pwd'
17144 srcdir='$srcdir'
17145 INSTALL='$INSTALL'
17146 AWK='$AWK'
17147 test -n "\$AWK" || AWK=awk
17148 _ACEOF
17149
17150 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17151 # The default lists apply if the user does not specify any file.
17152 ac_need_defaults=:
17153 while test $# != 0
17154 do
17155   case $1 in
17156   --*=*)
17157     ac_option=`expr "X$1" : 'X\([^=]*\)='`
17158     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
17159     ac_shift=:
17160     ;;
17161   *)
17162     ac_option=$1
17163     ac_optarg=$2
17164     ac_shift=shift
17165     ;;
17166   esac
17167
17168   case $ac_option in
17169   # Handling of the options.
17170   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17171     ac_cs_recheck=: ;;
17172   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17173     $as_echo "$ac_cs_version"; exit ;;
17174   --debug | --debu | --deb | --de | --d | -d )
17175     debug=: ;;
17176   --file | --fil | --fi | --f )
17177     $ac_shift
17178     case $ac_optarg in
17179     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17180     esac
17181     as_fn_append CONFIG_FILES " '$ac_optarg'"
17182     ac_need_defaults=false;;
17183   --header | --heade | --head | --hea )
17184     $ac_shift
17185     case $ac_optarg in
17186     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17187     esac
17188     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
17189     ac_need_defaults=false;;
17190   --he | --h)
17191     # Conflict between --help and --header
17192     as_fn_error "ambiguous option: \`$1'
17193 Try \`$0 --help' for more information.";;
17194   --help | --hel | -h )
17195     $as_echo "$ac_cs_usage"; exit ;;
17196   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17197   | -silent | --silent | --silen | --sile | --sil | --si | --s)
17198     ac_cs_silent=: ;;
17199
17200   # This is an error.
17201   -*) as_fn_error "unrecognized option: \`$1'
17202 Try \`$0 --help' for more information." ;;
17203
17204   *) as_fn_append ac_config_targets " $1"
17205      ac_need_defaults=false ;;
17206
17207   esac
17208   shift
17209 done
17210
17211 ac_configure_extra_args=
17212
17213 if $ac_cs_silent; then
17214   exec 6>/dev/null
17215   ac_configure_extra_args="$ac_configure_extra_args --silent"
17216 fi
17217
17218 _ACEOF
17219 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17220 if \$ac_cs_recheck; then
17221   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17222   shift
17223   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17224   CONFIG_SHELL='$SHELL'
17225   export CONFIG_SHELL
17226   exec "\$@"
17227 fi
17228
17229 _ACEOF
17230 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17231 exec 5>>config.log
17232 {
17233   echo
17234   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17235 ## Running $as_me. ##
17236 _ASBOX
17237   $as_echo "$ac_log"
17238 } >&5
17239
17240 _ACEOF
17241 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17242 #
17243 # INIT-COMMANDS
17244 #
17245 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
17246
17247 _ACEOF
17248
17249 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17250
17251 # Handling of arguments.
17252 for ac_config_target in $ac_config_targets
17253 do
17254   case $ac_config_target in
17255     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17256     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
17257     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
17258     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
17259     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
17260     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17261     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
17262     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
17263     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
17264
17265   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
17266   esac
17267 done
17268
17269
17270 # If the user did not use the arguments to specify the items to instantiate,
17271 # then the envvar interface is used.  Set only those that are not.
17272 # We use the long form for the default assignment because of an extremely
17273 # bizarre bug on SunOS 4.1.3.
17274 if $ac_need_defaults; then
17275   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17276   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17277   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17278   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17279 fi
17280
17281 # Have a temporary directory for convenience.  Make it in the build tree
17282 # simply because there is no reason against having it here, and in addition,
17283 # creating and moving files from /tmp can sometimes cause problems.
17284 # Hook for its removal unless debugging.
17285 # Note that there is a small window in which the directory will not be cleaned:
17286 # after its creation but before its name has been assigned to `$tmp'.
17287 $debug ||
17288 {
17289   tmp=
17290   trap 'exit_status=$?
17291   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17292 ' 0
17293   trap 'as_fn_exit 1' 1 2 13 15
17294 }
17295 # Create a (secure) tmp directory for tmp files.
17296
17297 {
17298   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17299   test -n "$tmp" && test -d "$tmp"
17300 }  ||
17301 {
17302   tmp=./conf$$-$RANDOM
17303   (umask 077 && mkdir "$tmp")
17304 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17305
17306 # Set up the scripts for CONFIG_FILES section.
17307 # No need to generate them if there are no CONFIG_FILES.
17308 # This happens for instance with `./config.status config.h'.
17309 if test -n "$CONFIG_FILES"; then
17310
17311 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17312   ac_cs_awk_getline=:
17313   ac_cs_awk_pipe_init=
17314   ac_cs_awk_read_file='
17315       while ((getline aline < (F[key])) > 0)
17316         print(aline)
17317       close(F[key])'
17318   ac_cs_awk_pipe_fini=
17319 else
17320   ac_cs_awk_getline=false
17321   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17322   ac_cs_awk_read_file='
17323       print "|#_!!_#|"
17324       print "cat " F[key] " &&"
17325       '$ac_cs_awk_pipe_init
17326   # The final `:' finishes the AND list.
17327   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17328 fi
17329 ac_cr=`echo X | tr X '\015'`
17330 # On cygwin, bash can eat \r inside `` if the user requested igncr.
17331 # But we know of no other shell where ac_cr would be empty at this
17332 # point, so we can use a bashism as a fallback.
17333 if test "x$ac_cr" = x; then
17334   eval ac_cr=\$\'\\r\'
17335 fi
17336 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17337 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17338   ac_cs_awk_cr='\r'
17339 else
17340   ac_cs_awk_cr=$ac_cr
17341 fi
17342
17343 echo 'BEGIN {' >"$tmp/subs1.awk" &&
17344 _ACEOF
17345
17346 # Create commands to substitute file output variables.
17347 {
17348   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17349   echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17350   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17351   echo "_ACAWK" &&
17352   echo "_ACEOF"
17353 } >conf$$files.sh &&
17354 . ./conf$$files.sh ||
17355   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17356 rm -f conf$$files.sh
17357
17358 {
17359   echo "cat >conf$$subs.awk <<_ACEOF" &&
17360   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17361   echo "_ACEOF"
17362 } >conf$$subs.sh ||
17363   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17364 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17365 ac_delim='%!_!# '
17366 for ac_last_try in false false false false false :; do
17367   . ./conf$$subs.sh ||
17368     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17369
17370   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17371   if test $ac_delim_n = $ac_delim_num; then
17372     break
17373   elif $ac_last_try; then
17374     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17375   else
17376     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17377   fi
17378 done
17379 rm -f conf$$subs.sh
17380
17381 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17382 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17383 _ACEOF
17384 sed -n '
17385 h
17386 s/^/S["/; s/!.*/"]=/
17387 p
17388 g
17389 s/^[^!]*!//
17390 :repl
17391 t repl
17392 s/'"$ac_delim"'$//
17393 t delim
17394 :nl
17395 h
17396 s/\(.\{148\}\).*/\1/
17397 t more1
17398 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17399 p
17400 n
17401 b repl
17402 :more1
17403 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17404 p
17405 g
17406 s/.\{148\}//
17407 t nl
17408 :delim
17409 h
17410 s/\(.\{148\}\).*/\1/
17411 t more2
17412 s/["\\]/\\&/g; s/^/"/; s/$/"/
17413 p
17414 b
17415 :more2
17416 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17417 p
17418 g
17419 s/.\{148\}//
17420 t delim
17421 ' <conf$$subs.awk | sed '
17422 /^[^""]/{
17423   N
17424   s/\n//
17425 }
17426 ' >>$CONFIG_STATUS || ac_write_fail=1
17427 rm -f conf$$subs.awk
17428 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17429 _ACAWK
17430 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17431   for (key in S) S_is_set[key] = 1
17432   FS = "\a"
17433   \$ac_cs_awk_pipe_init
17434 }
17435 {
17436   line = $ 0
17437   nfields = split(line, field, "@")
17438   substed = 0
17439   len = length(field[1])
17440   for (i = 2; i < nfields; i++) {
17441     key = field[i]
17442     keylen = length(key)
17443     if (S_is_set[key]) {
17444       value = S[key]
17445       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17446       len += length(value) + length(field[++i])
17447       substed = 1
17448     } else
17449       len += 1 + keylen
17450   }
17451   if (nfields == 3 && !substed) {
17452     key = field[2]
17453     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
17454       \$ac_cs_awk_read_file
17455       next
17456     }
17457   }
17458   print line
17459 }
17460 \$ac_cs_awk_pipe_fini
17461 _ACAWK
17462 _ACEOF
17463 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17464 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17465   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17466 else
17467   cat
17468 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17469   || as_fn_error "could not setup config files machinery" "$LINENO" 5
17470 _ACEOF
17471
17472 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17473 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17474 # trailing colons and then remove the whole line if VPATH becomes empty
17475 # (actually we leave an empty line to preserve line numbers).
17476 if test "x$srcdir" = x.; then
17477   ac_vpsub='/^[  ]*VPATH[        ]*=/{
17478 s/:*\$(srcdir):*/:/
17479 s/:*\${srcdir}:*/:/
17480 s/:*@srcdir@:*/:/
17481 s/^\([^=]*=[     ]*\):*/\1/
17482 s/:*$//
17483 s/^[^=]*=[       ]*$//
17484 }'
17485 fi
17486
17487 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17488 fi # test -n "$CONFIG_FILES"
17489
17490 # Set up the scripts for CONFIG_HEADERS section.
17491 # No need to generate them if there are no CONFIG_HEADERS.
17492 # This happens for instance with `./config.status Makefile'.
17493 if test -n "$CONFIG_HEADERS"; then
17494 cat >"$tmp/defines.awk" <<\_ACAWK ||
17495 BEGIN {
17496 _ACEOF
17497
17498 # Transform confdefs.h into an awk script `defines.awk', embedded as
17499 # here-document in config.status, that substitutes the proper values into
17500 # config.h.in to produce config.h.
17501
17502 # Create a delimiter string that does not exist in confdefs.h, to ease
17503 # handling of long lines.
17504 ac_delim='%!_!# '
17505 for ac_last_try in false false :; do
17506   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17507   if test -z "$ac_t"; then
17508     break
17509   elif $ac_last_try; then
17510     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17511   else
17512     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17513   fi
17514 done
17515
17516 # For the awk script, D is an array of macro values keyed by name,
17517 # likewise P contains macro parameters if any.  Preserve backslash
17518 # newline sequences.
17519
17520 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17521 sed -n '
17522 s/.\{148\}/&'"$ac_delim"'/g
17523 t rset
17524 :rset
17525 s/^[     ]*#[    ]*define[       ][      ]*/ /
17526 t def
17527 d
17528 :def
17529 s/\\$//
17530 t bsnl
17531 s/["\\]/\\&/g
17532 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17533 D["\1"]=" \3"/p
17534 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
17535 d
17536 :bsnl
17537 s/["\\]/\\&/g
17538 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17539 D["\1"]=" \3\\\\\\n"\\/p
17540 t cont
17541 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17542 t cont
17543 d
17544 :cont
17545 n
17546 s/.\{148\}/&'"$ac_delim"'/g
17547 t clear
17548 :clear
17549 s/\\$//
17550 t bsnlc
17551 s/["\\]/\\&/g; s/^/"/; s/$/"/p
17552 d
17553 :bsnlc
17554 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17555 b cont
17556 ' <confdefs.h | sed '
17557 s/'"$ac_delim"'/"\\\
17558 "/g' >>$CONFIG_STATUS || ac_write_fail=1
17559
17560 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17561   for (key in D) D_is_set[key] = 1
17562   FS = "\a"
17563 }
17564 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17565   line = \$ 0
17566   split(line, arg, " ")
17567   if (arg[1] == "#") {
17568     defundef = arg[2]
17569     mac1 = arg[3]
17570   } else {
17571     defundef = substr(arg[1], 2)
17572     mac1 = arg[2]
17573   }
17574   split(mac1, mac2, "(") #)
17575   macro = mac2[1]
17576   prefix = substr(line, 1, index(line, defundef) - 1)
17577   if (D_is_set[macro]) {
17578     # Preserve the white space surrounding the "#".
17579     print prefix "define", macro P[macro] D[macro]
17580     next
17581   } else {
17582     # Replace #undef with comments.  This is necessary, for example,
17583     # in the case of _POSIX_SOURCE, which is predefined and required
17584     # on some systems where configure will not decide to define it.
17585     if (defundef == "undef") {
17586       print "/*", prefix defundef, macro, "*/"
17587       next
17588     }
17589   }
17590 }
17591 { print }
17592 _ACAWK
17593 _ACEOF
17594 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17595   as_fn_error "could not setup config headers machinery" "$LINENO" 5
17596 fi # test -n "$CONFIG_HEADERS"
17597
17598
17599 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
17600 shift
17601 for ac_tag
17602 do
17603   case $ac_tag in
17604   :[FHLC]) ac_mode=$ac_tag; continue;;
17605   esac
17606   case $ac_mode$ac_tag in
17607   :[FHL]*:*);;
17608   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17609   :[FH]-) ac_tag=-:-;;
17610   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17611   esac
17612   ac_save_IFS=$IFS
17613   IFS=:
17614   set x $ac_tag
17615   IFS=$ac_save_IFS
17616   shift
17617   ac_file=$1
17618   shift
17619
17620   case $ac_mode in
17621   :L) ac_source=$1;;
17622   :[FH])
17623     ac_file_inputs=
17624     for ac_f
17625     do
17626       case $ac_f in
17627       -) ac_f="$tmp/stdin";;
17628       *) # Look for the file first in the build tree, then in the source tree
17629          # (if the path is not absolute).  The absolute path cannot be DOS-style,
17630          # because $ac_f cannot contain `:'.
17631          test -f "$ac_f" ||
17632            case $ac_f in
17633            [\\/$]*) false;;
17634            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17635            esac ||
17636            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17637       esac
17638       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17639       as_fn_append ac_file_inputs " '$ac_f'"
17640     done
17641
17642     # Let's still pretend it is `configure' which instantiates (i.e., don't
17643     # use $as_me), people would be surprised to read:
17644     #    /* config.h.  Generated by config.status.  */
17645     configure_input='Generated from '`
17646           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17647         `' by configure.'
17648     if test x"$ac_file" != x-; then
17649       configure_input="$ac_file.  $configure_input"
17650       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17651 $as_echo "$as_me: creating $ac_file" >&6;}
17652     fi
17653     # Neutralize special characters interpreted by sed in replacement strings.
17654     case $configure_input in #(
17655     *\&* | *\|* | *\\* )
17656        ac_sed_conf_input=`$as_echo "$configure_input" |
17657        sed 's/[\\\\&|]/\\\\&/g'`;; #(
17658     *) ac_sed_conf_input=$configure_input;;
17659     esac
17660
17661     case $ac_tag in
17662     *:-:* | *:-) cat >"$tmp/stdin" \
17663       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17664     esac
17665     ;;
17666   esac
17667
17668   ac_dir=`$as_dirname -- "$ac_file" ||
17669 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17670          X"$ac_file" : 'X\(//\)[^/]' \| \
17671          X"$ac_file" : 'X\(//\)$' \| \
17672          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17673 $as_echo X"$ac_file" |
17674     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17675             s//\1/
17676             q
17677           }
17678           /^X\(\/\/\)[^/].*/{
17679             s//\1/
17680             q
17681           }
17682           /^X\(\/\/\)$/{
17683             s//\1/
17684             q
17685           }
17686           /^X\(\/\).*/{
17687             s//\1/
17688             q
17689           }
17690           s/.*/./; q'`
17691   as_dir="$ac_dir"; as_fn_mkdir_p
17692   ac_builddir=.
17693
17694 case "$ac_dir" in
17695 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17696 *)
17697   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17698   # A ".." for each directory in $ac_dir_suffix.
17699   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17700   case $ac_top_builddir_sub in
17701   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17702   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17703   esac ;;
17704 esac
17705 ac_abs_top_builddir=$ac_pwd
17706 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17707 # for backward compatibility:
17708 ac_top_builddir=$ac_top_build_prefix
17709
17710 case $srcdir in
17711   .)  # We are building in place.
17712     ac_srcdir=.
17713     ac_top_srcdir=$ac_top_builddir_sub
17714     ac_abs_top_srcdir=$ac_pwd ;;
17715   [\\/]* | ?:[\\/]* )  # Absolute name.
17716     ac_srcdir=$srcdir$ac_dir_suffix;
17717     ac_top_srcdir=$srcdir
17718     ac_abs_top_srcdir=$srcdir ;;
17719   *) # Relative name.
17720     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17721     ac_top_srcdir=$ac_top_build_prefix$srcdir
17722     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17723 esac
17724 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17725
17726
17727   case $ac_mode in
17728   :F)
17729   #
17730   # CONFIG_FILE
17731   #
17732
17733   case $INSTALL in
17734   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17735   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17736   esac
17737 _ACEOF
17738
17739 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17740 # If the template does not know about datarootdir, expand it.
17741 # FIXME: This hack should be removed a few years after 2.60.
17742 ac_datarootdir_hack=; ac_datarootdir_seen=
17743 ac_sed_dataroot='
17744 /datarootdir/ {
17745   p
17746   q
17747 }
17748 /@datadir@/p
17749 /@docdir@/p
17750 /@infodir@/p
17751 /@localedir@/p
17752 /@mandir@/p'
17753 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17754 *datarootdir*) ac_datarootdir_seen=yes;;
17755 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17756   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17757 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17758 _ACEOF
17759 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17760   ac_datarootdir_hack='
17761   s&@datadir@&$datadir&g
17762   s&@docdir@&$docdir&g
17763   s&@infodir@&$infodir&g
17764   s&@localedir@&$localedir&g
17765   s&@mandir@&$mandir&g
17766   s&\\\${datarootdir}&$datarootdir&g' ;;
17767 esac
17768 _ACEOF
17769
17770 # Neutralize VPATH when `$srcdir' = `.'.
17771 # Shell code in configure.ac might set extrasub.
17772 # FIXME: do we really want to maintain this feature?
17773 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17774 ac_sed_extra="$ac_vpsub
17775 $extrasub
17776 _ACEOF
17777 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17778 :t
17779 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17780 s|@configure_input@|$ac_sed_conf_input|;t t
17781 s&@top_builddir@&$ac_top_builddir_sub&;t t
17782 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17783 s&@srcdir@&$ac_srcdir&;t t
17784 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17785 s&@top_srcdir@&$ac_top_srcdir&;t t
17786 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17787 s&@builddir@&$ac_builddir&;t t
17788 s&@abs_builddir@&$ac_abs_builddir&;t t
17789 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17790 s&@INSTALL@&$ac_INSTALL&;t t
17791 $ac_datarootdir_hack
17792 "
17793 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17794 if $ac_cs_awk_getline; then
17795   $AWK -f "$tmp/subs.awk"
17796 else
17797   $AWK -f "$tmp/subs.awk" | $SHELL
17798 fi >$tmp/out \
17799   || as_fn_error "could not create $ac_file" "$LINENO" 5
17800
17801 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17802   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17803   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17804   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17805 which seems to be undefined.  Please make sure it is defined." >&5
17806 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17807 which seems to be undefined.  Please make sure it is defined." >&2;}
17808
17809   rm -f "$tmp/stdin"
17810   case $ac_file in
17811   -) cat "$tmp/out" && rm -f "$tmp/out";;
17812   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17813   esac \
17814   || as_fn_error "could not create $ac_file" "$LINENO" 5
17815  ;;
17816   :H)
17817   #
17818   # CONFIG_HEADER
17819   #
17820   if test x"$ac_file" != x-; then
17821     {
17822       $as_echo "/* $configure_input  */" \
17823       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17824     } >"$tmp/config.h" \
17825       || as_fn_error "could not create $ac_file" "$LINENO" 5
17826     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17827       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17828 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17829     else
17830       rm -f "$ac_file"
17831       mv "$tmp/config.h" "$ac_file" \
17832         || as_fn_error "could not create $ac_file" "$LINENO" 5
17833     fi
17834   else
17835     $as_echo "/* $configure_input  */" \
17836       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17837       || as_fn_error "could not create -" "$LINENO" 5
17838   fi
17839  ;;
17840   :L)
17841   #
17842   # CONFIG_LINK
17843   #
17844
17845   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17846     :
17847   else
17848     # Prefer the file from the source tree if names are identical.
17849     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17850       ac_source=$srcdir/$ac_source
17851     fi
17852
17853     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17854 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
17855
17856     if test ! -r "$ac_source"; then
17857       as_fn_error "$ac_source: file not found" "$LINENO" 5
17858     fi
17859     rm -f "$ac_file"
17860
17861     # Try a relative symlink, then a hard link, then a copy.
17862     case $srcdir in
17863     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17864         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17865     esac
17866     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17867       ln "$ac_source" "$ac_file" 2>/dev/null ||
17868       cp -p "$ac_source" "$ac_file" ||
17869       as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17870   fi
17871  ;;
17872   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17873 $as_echo "$as_me: executing $ac_file commands" >&6;}
17874  ;;
17875   esac
17876
17877
17878   case $ac_file$ac_mode in
17879     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
17880     "gcore":F) chmod +x gcore ;;
17881     "Makefile":F)
17882 case x$CONFIG_HEADERS in
17883 xconfig.h:config.in)
17884 echo > stamp-h ;;
17885 esac
17886  ;;
17887     "gdb-gdb.gdb":F)
17888 case x$CONFIG_HEADERS in
17889 xconfig.h:config.in)
17890 echo > stamp-h ;;
17891 esac
17892  ;;
17893     "doc/Makefile":F)
17894 case x$CONFIG_HEADERS in
17895 xconfig.h:config.in)
17896 echo > stamp-h ;;
17897 esac
17898  ;;
17899     "data-directory/Makefile":F)
17900 case x$CONFIG_HEADERS in
17901 xconfig.h:config.in)
17902 echo > stamp-h ;;
17903 esac
17904  ;;
17905
17906   esac
17907 done # for ac_tag
17908
17909
17910 as_fn_exit 0
17911 _ACEOF
17912 ac_clean_files=$ac_clean_files_save
17913
17914 test $ac_write_fail = 0 ||
17915   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17916
17917
17918 # configure is writing to config.log, and then calls config.status.
17919 # config.status does its own redirection, appending to config.log.
17920 # Unfortunately, on DOS this fails, as config.log is still kept open
17921 # by configure, so config.status won't be able to write to it; its
17922 # output is simply discarded.  So we exec the FD to /dev/null,
17923 # effectively closing config.log, so it can be properly (re)opened and
17924 # appended to by config.status.  When coming back to configure, we
17925 # need to make the FD available again.
17926 if test "$no_create" != yes; then
17927   ac_cs_success=:
17928   ac_config_status_args=
17929   test "$silent" = yes &&
17930     ac_config_status_args="$ac_config_status_args --quiet"
17931   exec 5>/dev/null
17932   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17933   exec 5>>config.log
17934   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17935   # would make configure fail if this is the last instruction.
17936   $ac_cs_success || as_fn_exit $?
17937 fi
17938
17939 #
17940 # CONFIG_SUBDIRS section.
17941 #
17942 if test "$no_recursion" != yes; then
17943
17944   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17945   # so they do not pile up.
17946   ac_sub_configure_args=
17947   ac_prev=
17948   eval "set x $ac_configure_args"
17949   shift
17950   for ac_arg
17951   do
17952     if test -n "$ac_prev"; then
17953       ac_prev=
17954       continue
17955     fi
17956     case $ac_arg in
17957     -cache-file | --cache-file | --cache-fil | --cache-fi \
17958     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17959       ac_prev=cache_file ;;
17960     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
17961     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17962     | --c=*)
17963       ;;
17964     --config-cache | -C)
17965       ;;
17966     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17967       ac_prev=srcdir ;;
17968     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17969       ;;
17970     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17971       ac_prev=prefix ;;
17972     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17973       ;;
17974     --disable-option-checking)
17975       ;;
17976     *)
17977       case $ac_arg in
17978       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
17979       esac
17980       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
17981     esac
17982   done
17983
17984   # Always prepend --prefix to ensure using the same prefix
17985   # in subdir configurations.
17986   ac_arg="--prefix=$prefix"
17987   case $ac_arg in
17988   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
17989   esac
17990   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17991
17992   # Pass --silent
17993   if test "$silent" = yes; then
17994     ac_sub_configure_args="--silent $ac_sub_configure_args"
17995   fi
17996
17997   # Always prepend --disable-option-checking to silence warnings, since
17998   # different subdirs can have different --enable and --with options.
17999   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
18000
18001   ac_popdir=`pwd`
18002   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
18003
18004     # Do not complain, so a configure script can configure whichever
18005     # parts of a large source tree are present.
18006     test -d "$srcdir/$ac_dir" || continue
18007
18008     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18009     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18010     $as_echo "$ac_msg" >&6
18011     as_dir="$ac_dir"; as_fn_mkdir_p
18012     ac_builddir=.
18013
18014 case "$ac_dir" in
18015 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18016 *)
18017   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18018   # A ".." for each directory in $ac_dir_suffix.
18019   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18020   case $ac_top_builddir_sub in
18021   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18022   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18023   esac ;;
18024 esac
18025 ac_abs_top_builddir=$ac_pwd
18026 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18027 # for backward compatibility:
18028 ac_top_builddir=$ac_top_build_prefix
18029
18030 case $srcdir in
18031   .)  # We are building in place.
18032     ac_srcdir=.
18033     ac_top_srcdir=$ac_top_builddir_sub
18034     ac_abs_top_srcdir=$ac_pwd ;;
18035   [\\/]* | ?:[\\/]* )  # Absolute name.
18036     ac_srcdir=$srcdir$ac_dir_suffix;
18037     ac_top_srcdir=$srcdir
18038     ac_abs_top_srcdir=$srcdir ;;
18039   *) # Relative name.
18040     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18041     ac_top_srcdir=$ac_top_build_prefix$srcdir
18042     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18043 esac
18044 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18045
18046
18047     cd "$ac_dir"
18048
18049     # Check for guested configure; otherwise get Cygnus style configure.
18050     if test -f "$ac_srcdir/configure.gnu"; then
18051       ac_sub_configure=$ac_srcdir/configure.gnu
18052     elif test -f "$ac_srcdir/configure"; then
18053       ac_sub_configure=$ac_srcdir/configure
18054     elif test -f "$ac_srcdir/configure.in"; then
18055       # This should be Cygnus configure.
18056       ac_sub_configure=$ac_aux_dir/configure
18057     else
18058       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18059 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
18060       ac_sub_configure=
18061     fi
18062
18063     # The recursion is here.
18064     if test -n "$ac_sub_configure"; then
18065       # Make the cache file name correct relative to the subdirectory.
18066       case $cache_file in
18067       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
18068       *) # Relative name.
18069         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
18070       esac
18071
18072       { $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
18073 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
18074       # The eval makes quoting arguments work.
18075       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18076            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
18077         as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
18078     fi
18079
18080     cd "$ac_popdir"
18081   done
18082 fi
18083 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18084   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18085 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18086 fi
18087