Regenerate gdb/{,gdbserver/}configure (for commit be628ab814f1c90e185d7482d27aa8a991a...
[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 XSLTPROC
597 GDB_NM_FILE
598 LTLIBBABELTRACE
599 LIBBABELTRACE
600 HAVE_LIBBABELTRACE
601 frags
602 target_subdir
603 CONFIG_UNINSTALL
604 CONFIG_INSTALL
605 CONFIG_CLEAN
606 CONFIG_ALL
607 CONFIG_SRCS
608 CONFIG_DEPS
609 CONFIG_OBS
610 PROFILE_CFLAGS
611 ENABLE_CFLAGS
612 SIM_OBS
613 SIM
614 XMKMF
615 GDBTK_SRC_DIR
616 GDBTK_CFLAGS
617 GDBTKLIBS
618 X_LIBS
619 X_LDFLAGS
620 X_CFLAGS
621 TK_XINCLUDES
622 TK_DEPS
623 TK_LIBRARY
624 TK_INCLUDE
625 TK_STUB_LIB_SPEC
626 TK_STUB_LIB_FLAG
627 TK_STUB_LIB_FILE
628 TK_LIB_SPEC
629 TK_LIB_FLAG
630 TK_LIB_FILE
631 TK_SRC_DIR
632 TK_BIN_DIR
633 TK_VERSION
634 TCL_DEPS
635 TCL_LIBRARY
636 TCL_INCLUDE
637 TCL_STUB_LIB_SPEC
638 TCL_STUB_LIB_FLAG
639 TCL_STUB_LIB_FILE
640 TCL_LIB_SPEC
641 TCL_LIB_FLAG
642 TCL_LIB_FILE
643 TCL_SRC_DIR
644 TCL_BIN_DIR
645 TCL_PATCH_LEVEL
646 TCL_VERSION
647 WIN32LDAPP
648 GUI_CFLAGS_X
649 LIBGUI
650 LTLIBLZMA
651 LIBLZMA
652 HAVE_LIBLZMA
653 WIN32LIBS
654 SER_HARDWIRE
655 WERROR_CFLAGS
656 WARN_CFLAGS
657 SYSTEM_GDBINIT
658 TARGET_SYSTEM_ROOT
659 CONFIG_LDFLAGS
660 RDYNAMIC
661 ALLOCA
662 LTLIBIPT
663 LIBIPT
664 HAVE_LIBIPT
665 HAVE_GUILE_FALSE
666 HAVE_GUILE_TRUE
667 GUILE_LIBS
668 GUILE_CPPFLAGS
669 GUILD_TARGET_FLAG
670 GUILD
671 pkg_config_prog_path
672 HAVE_PYTHON_FALSE
673 HAVE_PYTHON_TRUE
674 PYTHON_LIBS
675 PYTHON_CPPFLAGS
676 PYTHON_CFLAGS
677 python_prog_path
678 LTLIBEXPAT
679 LIBEXPAT
680 HAVE_LIBEXPAT
681 JIT_READER_DIR
682 TARGET_PTR
683 READLINE_TEXI_INCFLAG
684 READLINE_CFLAGS
685 READLINE_DEPS
686 READLINE
687 LTLIBICONV
688 LIBICONV
689 zlibinc
690 zlibdir
691 MIG
692 WINDRES
693 DLLTOOL
694 AR
695 YFLAGS
696 YACC
697 RANLIB
698 LN_S
699 INSTALL_DATA
700 INSTALL_SCRIPT
701 INSTALL_PROGRAM
702 AWK
703 REPORT_BUGS_TEXI
704 REPORT_BUGS_TO
705 PKGVERSION
706 HAVE_NATIVE_GCORE_TARGET
707 TARGET_OBS
708 subdirs
709 GDB_DATADIR
710 DEBUGDIR
711 MAKEINFO_EXTRA_FLAGS
712 MAKEINFOFLAGS
713 MAKEINFO
714 PACKAGE
715 GNULIB_STDINT_H
716 CATOBJEXT
717 GENCAT
718 INSTOBJEXT
719 DATADIRNAME
720 CATALOGS
721 POSUB
722 GMSGFMT
723 XGETTEXT
724 INCINTL
725 LIBINTL_DEP
726 LIBINTL
727 USE_NLS
728 CCDEPMODE
729 DEPDIR
730 am__leading_dot
731 CXX_DIALECT
732 HAVE_CXX11
733 INSTALL_STRIP_PROGRAM
734 STRIP
735 install_sh
736 target_os
737 target_vendor
738 target_cpu
739 target
740 host_os
741 host_vendor
742 host_cpu
743 host
744 build_os
745 build_vendor
746 build_cpu
747 build
748 EGREP
749 GREP
750 CPP
751 ac_ct_CXX
752 CXXFLAGS
753 CXX
754 OBJEXT
755 EXEEXT
756 ac_ct_CC
757 CPPFLAGS
758 LDFLAGS
759 CFLAGS
760 CC
761 MAINT
762 MAINTAINER_MODE_FALSE
763 MAINTAINER_MODE_TRUE
764 target_alias
765 host_alias
766 build_alias
767 LIBS
768 ECHO_T
769 ECHO_N
770 ECHO_C
771 DEFS
772 mandir
773 localedir
774 libdir
775 psdir
776 pdfdir
777 dvidir
778 htmldir
779 infodir
780 docdir
781 oldincludedir
782 includedir
783 localstatedir
784 sharedstatedir
785 sysconfdir
786 datadir
787 datarootdir
788 libexecdir
789 sbindir
790 bindir
791 program_transform_name
792 prefix
793 exec_prefix
794 PACKAGE_URL
795 PACKAGE_BUGREPORT
796 PACKAGE_STRING
797 PACKAGE_VERSION
798 PACKAGE_TARNAME
799 PACKAGE_NAME
800 PATH_SEPARATOR
801 SHELL'
802 ac_subst_files='host_makefile_frag'
803 ac_user_opts='
804 enable_option_checking
805 enable_maintainer_mode
806 enable_plugins
807 enable_largefile
808 with_separate_debug_dir
809 with_gdb_datadir
810 with_relocated_sources
811 with_auto_load_dir
812 with_auto_load_safe_path
813 enable_targets
814 enable_64_bit_bfd
815 enable_gdbcli
816 enable_gdbmi
817 enable_tui
818 enable_gdbtk
819 with_libunwind_ia64
820 with_curses
821 enable_profiling
822 with_pkgversion
823 with_bugurl
824 with_system_zlib
825 with_gnu_ld
826 enable_rpath
827 with_libiconv_prefix
828 with_iconv_bin
829 with_system_readline
830 with_jit_reader_dir
831 with_expat
832 with_libexpat_prefix
833 with_python
834 with_guile
835 enable_libmcheck
836 with_intel_pt
837 with_libipt_prefix
838 with_included_regex
839 with_sysroot
840 with_system_gdbinit
841 enable_werror
842 enable_build_warnings
843 enable_gdb_build_warnings
844 with_lzma
845 with_liblzma_prefix
846 with_tcl
847 with_tk
848 with_x
849 enable_sim
850 enable_multi_ice
851 enable_gdbserver
852 with_babeltrace
853 with_libbabeltrace_prefix
854 '
855       ac_precious_vars='build_alias
856 host_alias
857 target_alias
858 CC
859 CFLAGS
860 LDFLAGS
861 LIBS
862 CPPFLAGS
863 CXX
864 CXXFLAGS
865 CCC
866 CPP
867 MAKEINFO
868 MAKEINFOFLAGS
869 YACC
870 YFLAGS
871 XMKMF'
872 ac_subdirs_all='testsuite
873 gdbtk
874 multi-ice
875 gdbserver'
876
877 # Initialize some variables set by options.
878 ac_init_help=
879 ac_init_version=false
880 ac_unrecognized_opts=
881 ac_unrecognized_sep=
882 # The variables have the same names as the options, with
883 # dashes changed to underlines.
884 cache_file=/dev/null
885 exec_prefix=NONE
886 no_create=
887 no_recursion=
888 prefix=NONE
889 program_prefix=NONE
890 program_suffix=NONE
891 program_transform_name=s,x,x,
892 silent=
893 site=
894 srcdir=
895 verbose=
896 x_includes=NONE
897 x_libraries=NONE
898
899 # Installation directory options.
900 # These are left unexpanded so users can "make install exec_prefix=/foo"
901 # and all the variables that are supposed to be based on exec_prefix
902 # by default will actually change.
903 # Use braces instead of parens because sh, perl, etc. also accept them.
904 # (The list follows the same order as the GNU Coding Standards.)
905 bindir='${exec_prefix}/bin'
906 sbindir='${exec_prefix}/sbin'
907 libexecdir='${exec_prefix}/libexec'
908 datarootdir='${prefix}/share'
909 datadir='${datarootdir}'
910 sysconfdir='${prefix}/etc'
911 sharedstatedir='${prefix}/com'
912 localstatedir='${prefix}/var'
913 includedir='${prefix}/include'
914 oldincludedir='/usr/include'
915 docdir='${datarootdir}/doc/${PACKAGE}'
916 infodir='${datarootdir}/info'
917 htmldir='${docdir}'
918 dvidir='${docdir}'
919 pdfdir='${docdir}'
920 psdir='${docdir}'
921 libdir='${exec_prefix}/lib'
922 localedir='${datarootdir}/locale'
923 mandir='${datarootdir}/man'
924
925 ac_prev=
926 ac_dashdash=
927 for ac_option
928 do
929   # If the previous option needs an argument, assign it.
930   if test -n "$ac_prev"; then
931     eval $ac_prev=\$ac_option
932     ac_prev=
933     continue
934   fi
935
936   case $ac_option in
937   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
938   *)    ac_optarg=yes ;;
939   esac
940
941   # Accept the important Cygnus configure options, so we can diagnose typos.
942
943   case $ac_dashdash$ac_option in
944   --)
945     ac_dashdash=yes ;;
946
947   -bindir | --bindir | --bindi | --bind | --bin | --bi)
948     ac_prev=bindir ;;
949   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
950     bindir=$ac_optarg ;;
951
952   -build | --build | --buil | --bui | --bu)
953     ac_prev=build_alias ;;
954   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
955     build_alias=$ac_optarg ;;
956
957   -cache-file | --cache-file | --cache-fil | --cache-fi \
958   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
959     ac_prev=cache_file ;;
960   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
961   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
962     cache_file=$ac_optarg ;;
963
964   --config-cache | -C)
965     cache_file=config.cache ;;
966
967   -datadir | --datadir | --datadi | --datad)
968     ac_prev=datadir ;;
969   -datadir=* | --datadir=* | --datadi=* | --datad=*)
970     datadir=$ac_optarg ;;
971
972   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
973   | --dataroo | --dataro | --datar)
974     ac_prev=datarootdir ;;
975   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
976   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
977     datarootdir=$ac_optarg ;;
978
979   -disable-* | --disable-*)
980     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
981     # Reject names that are not valid shell variable names.
982     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
983       as_fn_error "invalid feature name: $ac_useropt"
984     ac_useropt_orig=$ac_useropt
985     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
986     case $ac_user_opts in
987       *"
988 "enable_$ac_useropt"
989 "*) ;;
990       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
991          ac_unrecognized_sep=', ';;
992     esac
993     eval enable_$ac_useropt=no ;;
994
995   -docdir | --docdir | --docdi | --doc | --do)
996     ac_prev=docdir ;;
997   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
998     docdir=$ac_optarg ;;
999
1000   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1001     ac_prev=dvidir ;;
1002   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1003     dvidir=$ac_optarg ;;
1004
1005   -enable-* | --enable-*)
1006     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1007     # Reject names that are not valid shell variable names.
1008     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1009       as_fn_error "invalid feature name: $ac_useropt"
1010     ac_useropt_orig=$ac_useropt
1011     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1012     case $ac_user_opts in
1013       *"
1014 "enable_$ac_useropt"
1015 "*) ;;
1016       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1017          ac_unrecognized_sep=', ';;
1018     esac
1019     eval enable_$ac_useropt=\$ac_optarg ;;
1020
1021   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1022   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1023   | --exec | --exe | --ex)
1024     ac_prev=exec_prefix ;;
1025   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1026   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1027   | --exec=* | --exe=* | --ex=*)
1028     exec_prefix=$ac_optarg ;;
1029
1030   -gas | --gas | --ga | --g)
1031     # Obsolete; use --with-gas.
1032     with_gas=yes ;;
1033
1034   -help | --help | --hel | --he | -h)
1035     ac_init_help=long ;;
1036   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1037     ac_init_help=recursive ;;
1038   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1039     ac_init_help=short ;;
1040
1041   -host | --host | --hos | --ho)
1042     ac_prev=host_alias ;;
1043   -host=* | --host=* | --hos=* | --ho=*)
1044     host_alias=$ac_optarg ;;
1045
1046   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1047     ac_prev=htmldir ;;
1048   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1049   | --ht=*)
1050     htmldir=$ac_optarg ;;
1051
1052   -includedir | --includedir | --includedi | --included | --include \
1053   | --includ | --inclu | --incl | --inc)
1054     ac_prev=includedir ;;
1055   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1056   | --includ=* | --inclu=* | --incl=* | --inc=*)
1057     includedir=$ac_optarg ;;
1058
1059   -infodir | --infodir | --infodi | --infod | --info | --inf)
1060     ac_prev=infodir ;;
1061   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1062     infodir=$ac_optarg ;;
1063
1064   -libdir | --libdir | --libdi | --libd)
1065     ac_prev=libdir ;;
1066   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1067     libdir=$ac_optarg ;;
1068
1069   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1070   | --libexe | --libex | --libe)
1071     ac_prev=libexecdir ;;
1072   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1073   | --libexe=* | --libex=* | --libe=*)
1074     libexecdir=$ac_optarg ;;
1075
1076   -localedir | --localedir | --localedi | --localed | --locale)
1077     ac_prev=localedir ;;
1078   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1079     localedir=$ac_optarg ;;
1080
1081   -localstatedir | --localstatedir | --localstatedi | --localstated \
1082   | --localstate | --localstat | --localsta | --localst | --locals)
1083     ac_prev=localstatedir ;;
1084   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1085   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1086     localstatedir=$ac_optarg ;;
1087
1088   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1089     ac_prev=mandir ;;
1090   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1091     mandir=$ac_optarg ;;
1092
1093   -nfp | --nfp | --nf)
1094     # Obsolete; use --without-fp.
1095     with_fp=no ;;
1096
1097   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1098   | --no-cr | --no-c | -n)
1099     no_create=yes ;;
1100
1101   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1102   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1103     no_recursion=yes ;;
1104
1105   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1106   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1107   | --oldin | --oldi | --old | --ol | --o)
1108     ac_prev=oldincludedir ;;
1109   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1110   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1111   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1112     oldincludedir=$ac_optarg ;;
1113
1114   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1115     ac_prev=prefix ;;
1116   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1117     prefix=$ac_optarg ;;
1118
1119   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1120   | --program-pre | --program-pr | --program-p)
1121     ac_prev=program_prefix ;;
1122   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1123   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1124     program_prefix=$ac_optarg ;;
1125
1126   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1127   | --program-suf | --program-su | --program-s)
1128     ac_prev=program_suffix ;;
1129   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1130   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1131     program_suffix=$ac_optarg ;;
1132
1133   -program-transform-name | --program-transform-name \
1134   | --program-transform-nam | --program-transform-na \
1135   | --program-transform-n | --program-transform- \
1136   | --program-transform | --program-transfor \
1137   | --program-transfo | --program-transf \
1138   | --program-trans | --program-tran \
1139   | --progr-tra | --program-tr | --program-t)
1140     ac_prev=program_transform_name ;;
1141   -program-transform-name=* | --program-transform-name=* \
1142   | --program-transform-nam=* | --program-transform-na=* \
1143   | --program-transform-n=* | --program-transform-=* \
1144   | --program-transform=* | --program-transfor=* \
1145   | --program-transfo=* | --program-transf=* \
1146   | --program-trans=* | --program-tran=* \
1147   | --progr-tra=* | --program-tr=* | --program-t=*)
1148     program_transform_name=$ac_optarg ;;
1149
1150   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1151     ac_prev=pdfdir ;;
1152   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1153     pdfdir=$ac_optarg ;;
1154
1155   -psdir | --psdir | --psdi | --psd | --ps)
1156     ac_prev=psdir ;;
1157   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1158     psdir=$ac_optarg ;;
1159
1160   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1161   | -silent | --silent | --silen | --sile | --sil)
1162     silent=yes ;;
1163
1164   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1165     ac_prev=sbindir ;;
1166   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1167   | --sbi=* | --sb=*)
1168     sbindir=$ac_optarg ;;
1169
1170   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1171   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1172   | --sharedst | --shareds | --shared | --share | --shar \
1173   | --sha | --sh)
1174     ac_prev=sharedstatedir ;;
1175   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1176   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1177   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1178   | --sha=* | --sh=*)
1179     sharedstatedir=$ac_optarg ;;
1180
1181   -site | --site | --sit)
1182     ac_prev=site ;;
1183   -site=* | --site=* | --sit=*)
1184     site=$ac_optarg ;;
1185
1186   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1187     ac_prev=srcdir ;;
1188   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1189     srcdir=$ac_optarg ;;
1190
1191   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1192   | --syscon | --sysco | --sysc | --sys | --sy)
1193     ac_prev=sysconfdir ;;
1194   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1195   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1196     sysconfdir=$ac_optarg ;;
1197
1198   -target | --target | --targe | --targ | --tar | --ta | --t)
1199     ac_prev=target_alias ;;
1200   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1201     target_alias=$ac_optarg ;;
1202
1203   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1204     verbose=yes ;;
1205
1206   -version | --version | --versio | --versi | --vers | -V)
1207     ac_init_version=: ;;
1208
1209   -with-* | --with-*)
1210     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1211     # Reject names that are not valid shell variable names.
1212     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1213       as_fn_error "invalid package name: $ac_useropt"
1214     ac_useropt_orig=$ac_useropt
1215     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216     case $ac_user_opts in
1217       *"
1218 "with_$ac_useropt"
1219 "*) ;;
1220       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1221          ac_unrecognized_sep=', ';;
1222     esac
1223     eval with_$ac_useropt=\$ac_optarg ;;
1224
1225   -without-* | --without-*)
1226     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1227     # Reject names that are not valid shell variable names.
1228     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1229       as_fn_error "invalid package name: $ac_useropt"
1230     ac_useropt_orig=$ac_useropt
1231     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1232     case $ac_user_opts in
1233       *"
1234 "with_$ac_useropt"
1235 "*) ;;
1236       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1237          ac_unrecognized_sep=', ';;
1238     esac
1239     eval with_$ac_useropt=no ;;
1240
1241   --x)
1242     # Obsolete; use --with-x.
1243     with_x=yes ;;
1244
1245   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1246   | --x-incl | --x-inc | --x-in | --x-i)
1247     ac_prev=x_includes ;;
1248   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1249   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1250     x_includes=$ac_optarg ;;
1251
1252   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1253   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1254     ac_prev=x_libraries ;;
1255   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1256   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1257     x_libraries=$ac_optarg ;;
1258
1259   -*) as_fn_error "unrecognized option: \`$ac_option'
1260 Try \`$0 --help' for more information."
1261     ;;
1262
1263   *=*)
1264     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1265     # Reject names that are not valid shell variable names.
1266     case $ac_envvar in #(
1267       '' | [0-9]* | *[!_$as_cr_alnum]* )
1268       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1269     esac
1270     eval $ac_envvar=\$ac_optarg
1271     export $ac_envvar ;;
1272
1273   *)
1274     # FIXME: should be removed in autoconf 3.0.
1275     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1276     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1277       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1278     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1279     ;;
1280
1281   esac
1282 done
1283
1284 if test -n "$ac_prev"; then
1285   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1286   as_fn_error "missing argument to $ac_option"
1287 fi
1288
1289 if test -n "$ac_unrecognized_opts"; then
1290   case $enable_option_checking in
1291     no) ;;
1292     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1293     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1294   esac
1295 fi
1296
1297 # Check all directory arguments for consistency.
1298 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1299                 datadir sysconfdir sharedstatedir localstatedir includedir \
1300                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1301                 libdir localedir mandir
1302 do
1303   eval ac_val=\$$ac_var
1304   # Remove trailing slashes.
1305   case $ac_val in
1306     */ )
1307       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1308       eval $ac_var=\$ac_val;;
1309   esac
1310   # Be sure to have absolute directory names.
1311   case $ac_val in
1312     [\\/$]* | ?:[\\/]* )  continue;;
1313     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1314   esac
1315   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1316 done
1317
1318 # There might be people who depend on the old broken behavior: `$host'
1319 # used to hold the argument of --host etc.
1320 # FIXME: To remove some day.
1321 build=$build_alias
1322 host=$host_alias
1323 target=$target_alias
1324
1325 # FIXME: To remove some day.
1326 if test "x$host_alias" != x; then
1327   if test "x$build_alias" = x; then
1328     cross_compiling=maybe
1329     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1330     If a cross compiler is detected then cross compile mode will be used." >&2
1331   elif test "x$build_alias" != "x$host_alias"; then
1332     cross_compiling=yes
1333   fi
1334 fi
1335
1336 ac_tool_prefix=
1337 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1338
1339 test "$silent" = yes && exec 6>/dev/null
1340
1341
1342 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1343 ac_ls_di=`ls -di .` &&
1344 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1345   as_fn_error "working directory cannot be determined"
1346 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1347   as_fn_error "pwd does not report name of working directory"
1348
1349
1350 # Find the source files, if location was not specified.
1351 if test -z "$srcdir"; then
1352   ac_srcdir_defaulted=yes
1353   # Try the directory containing this script, then the parent directory.
1354   ac_confdir=`$as_dirname -- "$as_myself" ||
1355 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1356          X"$as_myself" : 'X\(//\)[^/]' \| \
1357          X"$as_myself" : 'X\(//\)$' \| \
1358          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1359 $as_echo X"$as_myself" |
1360     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1361             s//\1/
1362             q
1363           }
1364           /^X\(\/\/\)[^/].*/{
1365             s//\1/
1366             q
1367           }
1368           /^X\(\/\/\)$/{
1369             s//\1/
1370             q
1371           }
1372           /^X\(\/\).*/{
1373             s//\1/
1374             q
1375           }
1376           s/.*/./; q'`
1377   srcdir=$ac_confdir
1378   if test ! -r "$srcdir/$ac_unique_file"; then
1379     srcdir=..
1380   fi
1381 else
1382   ac_srcdir_defaulted=no
1383 fi
1384 if test ! -r "$srcdir/$ac_unique_file"; then
1385   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1386   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1387 fi
1388 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1389 ac_abs_confdir=`(
1390         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1391         pwd)`
1392 # When building in place, set srcdir=.
1393 if test "$ac_abs_confdir" = "$ac_pwd"; then
1394   srcdir=.
1395 fi
1396 # Remove unnecessary trailing slashes from srcdir.
1397 # Double slashes in file names in object file debugging info
1398 # mess up M-x gdb in Emacs.
1399 case $srcdir in
1400 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1401 esac
1402 for ac_var in $ac_precious_vars; do
1403   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1404   eval ac_env_${ac_var}_value=\$${ac_var}
1405   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1406   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1407 done
1408
1409 #
1410 # Report the --help message.
1411 #
1412 if test "$ac_init_help" = "long"; then
1413   # Omit some internal or obsolete options to make the list less imposing.
1414   # This message is too long to be a string in the A/UX 3.1 sh.
1415   cat <<_ACEOF
1416 \`configure' configures this package to adapt to many kinds of systems.
1417
1418 Usage: $0 [OPTION]... [VAR=VALUE]...
1419
1420 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1421 VAR=VALUE.  See below for descriptions of some of the useful variables.
1422
1423 Defaults for the options are specified in brackets.
1424
1425 Configuration:
1426   -h, --help              display this help and exit
1427       --help=short        display options specific to this package
1428       --help=recursive    display the short help of all the included packages
1429   -V, --version           display version information and exit
1430   -q, --quiet, --silent   do not print \`checking...' messages
1431       --cache-file=FILE   cache test results in FILE [disabled]
1432   -C, --config-cache      alias for \`--cache-file=config.cache'
1433   -n, --no-create         do not create output files
1434       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1435
1436 Installation directories:
1437   --prefix=PREFIX         install architecture-independent files in PREFIX
1438                           [$ac_default_prefix]
1439   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1440                           [PREFIX]
1441
1442 By default, \`make install' will install all the files in
1443 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1444 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1445 for instance \`--prefix=\$HOME'.
1446
1447 For better control, use the options below.
1448
1449 Fine tuning of the installation directories:
1450   --bindir=DIR            user executables [EPREFIX/bin]
1451   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1452   --libexecdir=DIR        program executables [EPREFIX/libexec]
1453   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1454   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1455   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1456   --libdir=DIR            object code libraries [EPREFIX/lib]
1457   --includedir=DIR        C header files [PREFIX/include]
1458   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1459   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1460   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1461   --infodir=DIR           info documentation [DATAROOTDIR/info]
1462   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1463   --mandir=DIR            man documentation [DATAROOTDIR/man]
1464   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1465   --htmldir=DIR           html documentation [DOCDIR]
1466   --dvidir=DIR            dvi documentation [DOCDIR]
1467   --pdfdir=DIR            pdf documentation [DOCDIR]
1468   --psdir=DIR             ps documentation [DOCDIR]
1469 _ACEOF
1470
1471   cat <<\_ACEOF
1472
1473 Program names:
1474   --program-prefix=PREFIX            prepend PREFIX to installed program names
1475   --program-suffix=SUFFIX            append SUFFIX to installed program names
1476   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1477
1478 X features:
1479   --x-includes=DIR    X include files are in DIR
1480   --x-libraries=DIR   X library files are in DIR
1481
1482 System types:
1483   --build=BUILD     configure for building on BUILD [guessed]
1484   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1485   --target=TARGET   configure for building compilers for TARGET [HOST]
1486 _ACEOF
1487 fi
1488
1489 if test -n "$ac_init_help"; then
1490
1491   cat <<\_ACEOF
1492
1493 Optional Features:
1494   --disable-option-checking  ignore unrecognized --enable/--with options
1495   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1496   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1497   --enable-maintainer-mode  enable make rules and dependencies not useful
1498                           (and sometimes confusing) to the casual installer
1499   --enable-plugins        Enable support for plugins
1500   --disable-largefile     omit support for large files
1501   --enable-targets=TARGETS
1502                           alternative target configurations
1503   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
1504   --disable-gdbcli        disable command-line interface (CLI)
1505   --disable-gdbmi         disable machine-interface (MI)
1506   --enable-tui            enable full-screen terminal user interface (TUI)
1507   --enable-gdbtk          enable gdbtk graphical user interface (GUI)
1508   --enable-profiling      enable profiling of GDB
1509   --disable-rpath         do not hardcode runtime library paths
1510   --enable-libmcheck      Try linking with -lmcheck if available
1511   --enable-werror         treat compile warnings as errors
1512   --enable-build-warnings enable build-time compiler warnings if gcc is used
1513   --enable-gdb-build-warnings
1514                           enable GDB specific build-time compiler warnings if
1515                           gcc is used
1516   --enable-sim            link gdb with simulator
1517   --enable-multi-ice      build the multi-ice-gdb-server
1518   --enable-gdbserver      automatically build gdbserver (yes/no/auto, default
1519                           is auto)
1520
1521 Optional Packages:
1522   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1523   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1524   --with-separate-debug-dir=PATH
1525                           look for global separate debug info in this path
1526                           [LIBDIR/debug]
1527   --with-gdb-datadir=PATH look for global separate data files in this path
1528                           [DATADIR/gdb]
1529   --with-relocated-sources=PATH
1530                           automatically relocate this path for source files
1531   --with-auto-load-dir=PATH
1532                           directories from which to load auto-loaded scripts
1533                           [$debugdir:$datadir/auto-load]
1534   --with-auto-load-safe-path=PATH
1535                           directories safe to hold auto-loaded files
1536                           [--with-auto-load-dir]
1537   --without-auto-load-safe-path
1538                           do not restrict auto-loaded files locations
1539   --with-libunwind-ia64   use libunwind frame unwinding for ia64 targets
1540   --with-curses           use the curses library instead of the termcap
1541                           library
1542   --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
1543   --with-bugurl=URL       Direct users to URL to report a bug
1544   --with-system-zlib      use installed libz
1545   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1546   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
1547   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
1548   --with-iconv-bin=PATH   specify where to find the iconv program
1549   --with-system-readline  use installed readline library
1550   --with-jit-reader-dir=PATH
1551                           directory to load the JIT readers from
1552   --with-expat            include expat support (auto/yes/no)
1553   --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
1554   --without-libexpat-prefix     don't search for libexpat in includedir and libdir
1555   --with-python[=PYTHON]  include python support
1556                           (auto/yes/no/<python-program>)
1557   --with-guile[=GUILE]    include guile support
1558                           (auto/yes/no/<guile-version>/<pkg-config-program>)
1559   --with-intel-pt         include Intel Processor Trace support (auto/yes/no)
1560   --with-libipt-prefix[=DIR]  search for libipt in DIR/include and DIR/lib
1561   --without-libipt-prefix     don't search for libipt in includedir and libdir
1562   --without-included-regex
1563                           don't use included regex; this is the default on
1564                           systems with version 2 of the GNU C library (use
1565                           with caution on other system)
1566   --with-sysroot[=DIR]    search for usr/lib et al within DIR
1567   --with-system-gdbinit=PATH
1568                           automatically load a system-wide gdbinit file
1569   --with-lzma             support lzma compression (auto/yes/no)
1570   --with-liblzma-prefix[=DIR]  search for liblzma in DIR/include and DIR/lib
1571   --without-liblzma-prefix     don't search for liblzma in includedir and libdir
1572   --with-tcl              directory containing tcl configuration (tclConfig.sh)
1573   --with-tk               directory containing tk configuration (tkConfig.sh)
1574   --with-x                use the X Window System
1575   --with-babeltrace       include babeltrace support (auto/yes/no)
1576   --with-libbabeltrace-prefix[=DIR]  search for libbabeltrace in DIR/include and DIR/lib
1577   --without-libbabeltrace-prefix     don't search for libbabeltrace in includedir and libdir
1578
1579 Some influential environment variables:
1580   CC          C compiler command
1581   CFLAGS      C compiler flags
1582   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1583               nonstandard directory <lib dir>
1584   LIBS        libraries to pass to the linker, e.g. -l<library>
1585   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1586               you have headers in a nonstandard directory <include dir>
1587   CXX         C++ compiler command
1588   CXXFLAGS    C++ compiler flags
1589   CPP         C preprocessor
1590   MAKEINFO    Parent configure detects if it is of sufficient version.
1591   MAKEINFOFLAGS
1592               Parameters for MAKEINFO.
1593   YACC        The `Yet Another C Compiler' implementation to use. Defaults to
1594               the first program found out of: `bison -y', `byacc', `yacc'.
1595   YFLAGS      The list of arguments that will be passed by default to $YACC.
1596               This script will default YFLAGS to the empty string to avoid a
1597               default value of `-d' given by some make applications.
1598   XMKMF       Path to xmkmf, Makefile generator for X Window System
1599
1600 Use these variables to override the choices made by `configure' or to help
1601 it to find libraries and programs with nonstandard names/locations.
1602
1603 Report bugs to the package provider.
1604 _ACEOF
1605 ac_status=$?
1606 fi
1607
1608 if test "$ac_init_help" = "recursive"; then
1609   # If there are subdirs, report their specific --help.
1610   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1611     test -d "$ac_dir" ||
1612       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1613       continue
1614     ac_builddir=.
1615
1616 case "$ac_dir" in
1617 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1618 *)
1619   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1620   # A ".." for each directory in $ac_dir_suffix.
1621   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1622   case $ac_top_builddir_sub in
1623   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1624   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1625   esac ;;
1626 esac
1627 ac_abs_top_builddir=$ac_pwd
1628 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1629 # for backward compatibility:
1630 ac_top_builddir=$ac_top_build_prefix
1631
1632 case $srcdir in
1633   .)  # We are building in place.
1634     ac_srcdir=.
1635     ac_top_srcdir=$ac_top_builddir_sub
1636     ac_abs_top_srcdir=$ac_pwd ;;
1637   [\\/]* | ?:[\\/]* )  # Absolute name.
1638     ac_srcdir=$srcdir$ac_dir_suffix;
1639     ac_top_srcdir=$srcdir
1640     ac_abs_top_srcdir=$srcdir ;;
1641   *) # Relative name.
1642     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1643     ac_top_srcdir=$ac_top_build_prefix$srcdir
1644     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1645 esac
1646 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1647
1648     cd "$ac_dir" || { ac_status=$?; continue; }
1649     # Check for guested configure.
1650     if test -f "$ac_srcdir/configure.gnu"; then
1651       echo &&
1652       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1653     elif test -f "$ac_srcdir/configure"; then
1654       echo &&
1655       $SHELL "$ac_srcdir/configure" --help=recursive
1656     else
1657       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1658     fi || ac_status=$?
1659     cd "$ac_pwd" || { ac_status=$?; break; }
1660   done
1661 fi
1662
1663 test -n "$ac_init_help" && exit $ac_status
1664 if $ac_init_version; then
1665   cat <<\_ACEOF
1666 configure
1667 generated by GNU Autoconf 2.64
1668
1669 Copyright (C) 2009 Free Software Foundation, Inc.
1670 This configure script is free software; the Free Software Foundation
1671 gives unlimited permission to copy, distribute and modify it.
1672 _ACEOF
1673   exit
1674 fi
1675
1676 ## ------------------------ ##
1677 ## Autoconf initialization. ##
1678 ## ------------------------ ##
1679
1680 # ac_fn_c_try_compile LINENO
1681 # --------------------------
1682 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1683 ac_fn_c_try_compile ()
1684 {
1685   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1686   rm -f conftest.$ac_objext
1687   if { { ac_try="$ac_compile"
1688 case "(($ac_try" in
1689   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690   *) ac_try_echo=$ac_try;;
1691 esac
1692 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1693 $as_echo "$ac_try_echo"; } >&5
1694   (eval "$ac_compile") 2>conftest.err
1695   ac_status=$?
1696   if test -s conftest.err; then
1697     grep -v '^ *+' conftest.err >conftest.er1
1698     cat conftest.er1 >&5
1699     mv -f conftest.er1 conftest.err
1700   fi
1701   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702   test $ac_status = 0; } && {
1703          test -z "$ac_c_werror_flag" ||
1704          test ! -s conftest.err
1705        } && test -s conftest.$ac_objext; then :
1706   ac_retval=0
1707 else
1708   $as_echo "$as_me: failed program was:" >&5
1709 sed 's/^/| /' conftest.$ac_ext >&5
1710
1711         ac_retval=1
1712 fi
1713   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1714   return $ac_retval
1715
1716 } # ac_fn_c_try_compile
1717
1718 # ac_fn_cxx_try_compile LINENO
1719 # ----------------------------
1720 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1721 ac_fn_cxx_try_compile ()
1722 {
1723   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1724   rm -f conftest.$ac_objext
1725   if { { ac_try="$ac_compile"
1726 case "(($ac_try" in
1727   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728   *) ac_try_echo=$ac_try;;
1729 esac
1730 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1731 $as_echo "$ac_try_echo"; } >&5
1732   (eval "$ac_compile") 2>conftest.err
1733   ac_status=$?
1734   if test -s conftest.err; then
1735     grep -v '^ *+' conftest.err >conftest.er1
1736     cat conftest.er1 >&5
1737     mv -f conftest.er1 conftest.err
1738   fi
1739   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1740   test $ac_status = 0; } && {
1741          test -z "$ac_cxx_werror_flag" ||
1742          test ! -s conftest.err
1743        } && test -s conftest.$ac_objext; then :
1744   ac_retval=0
1745 else
1746   $as_echo "$as_me: failed program was:" >&5
1747 sed 's/^/| /' conftest.$ac_ext >&5
1748
1749         ac_retval=1
1750 fi
1751   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1752   return $ac_retval
1753
1754 } # ac_fn_cxx_try_compile
1755
1756 # ac_fn_c_try_cpp LINENO
1757 # ----------------------
1758 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1759 ac_fn_c_try_cpp ()
1760 {
1761   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1762   if { { ac_try="$ac_cpp conftest.$ac_ext"
1763 case "(($ac_try" in
1764   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1765   *) ac_try_echo=$ac_try;;
1766 esac
1767 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1768 $as_echo "$ac_try_echo"; } >&5
1769   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1770   ac_status=$?
1771   if test -s conftest.err; then
1772     grep -v '^ *+' conftest.err >conftest.er1
1773     cat conftest.er1 >&5
1774     mv -f conftest.er1 conftest.err
1775   fi
1776   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1777   test $ac_status = 0; } >/dev/null && {
1778          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1779          test ! -s conftest.err
1780        }; then :
1781   ac_retval=0
1782 else
1783   $as_echo "$as_me: failed program was:" >&5
1784 sed 's/^/| /' conftest.$ac_ext >&5
1785
1786     ac_retval=1
1787 fi
1788   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1789   return $ac_retval
1790
1791 } # ac_fn_c_try_cpp
1792
1793 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1794 # -------------------------------------------------------
1795 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1796 # the include files in INCLUDES and setting the cache variable VAR
1797 # accordingly.
1798 ac_fn_c_check_header_mongrel ()
1799 {
1800   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1801   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1802   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1803 $as_echo_n "checking for $2... " >&6; }
1804 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1805   $as_echo_n "(cached) " >&6
1806 fi
1807 eval ac_res=\$$3
1808                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1809 $as_echo "$ac_res" >&6; }
1810 else
1811   # Is the header compilable?
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1813 $as_echo_n "checking $2 usability... " >&6; }
1814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1815 /* end confdefs.h.  */
1816 $4
1817 #include <$2>
1818 _ACEOF
1819 if ac_fn_c_try_compile "$LINENO"; then :
1820   ac_header_compiler=yes
1821 else
1822   ac_header_compiler=no
1823 fi
1824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1826 $as_echo "$ac_header_compiler" >&6; }
1827
1828 # Is the header present?
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1830 $as_echo_n "checking $2 presence... " >&6; }
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832 /* end confdefs.h.  */
1833 #include <$2>
1834 _ACEOF
1835 if ac_fn_c_try_cpp "$LINENO"; then :
1836   ac_header_preproc=yes
1837 else
1838   ac_header_preproc=no
1839 fi
1840 rm -f conftest.err conftest.$ac_ext
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1842 $as_echo "$ac_header_preproc" >&6; }
1843
1844 # So?  What about this header?
1845 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1846   yes:no: )
1847     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1848 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1849     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1850 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1851     ;;
1852   no:yes:* )
1853     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1854 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1855     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1856 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1857     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1858 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1859     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1860 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1861     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1862 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1863     ;;
1864 esac
1865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1866 $as_echo_n "checking for $2... " >&6; }
1867 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1868   $as_echo_n "(cached) " >&6
1869 else
1870   eval "$3=\$ac_header_compiler"
1871 fi
1872 eval ac_res=\$$3
1873                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1874 $as_echo "$ac_res" >&6; }
1875 fi
1876   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1877
1878 } # ac_fn_c_check_header_mongrel
1879
1880 # ac_fn_c_try_run LINENO
1881 # ----------------------
1882 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1883 # that executables *can* be run.
1884 ac_fn_c_try_run ()
1885 {
1886   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887   if { { ac_try="$ac_link"
1888 case "(($ac_try" in
1889   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1890   *) ac_try_echo=$ac_try;;
1891 esac
1892 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1893 $as_echo "$ac_try_echo"; } >&5
1894   (eval "$ac_link") 2>&5
1895   ac_status=$?
1896   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1898   { { case "(($ac_try" in
1899   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1900   *) ac_try_echo=$ac_try;;
1901 esac
1902 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1903 $as_echo "$ac_try_echo"; } >&5
1904   (eval "$ac_try") 2>&5
1905   ac_status=$?
1906   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1907   test $ac_status = 0; }; }; then :
1908   ac_retval=0
1909 else
1910   $as_echo "$as_me: program exited with status $ac_status" >&5
1911        $as_echo "$as_me: failed program was:" >&5
1912 sed 's/^/| /' conftest.$ac_ext >&5
1913
1914        ac_retval=$ac_status
1915 fi
1916   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1917   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1918   return $ac_retval
1919
1920 } # ac_fn_c_try_run
1921
1922 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1923 # -------------------------------------------------------
1924 # Tests whether HEADER exists and can be compiled using the include files in
1925 # INCLUDES, setting the cache variable VAR accordingly.
1926 ac_fn_c_check_header_compile ()
1927 {
1928   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930 $as_echo_n "checking for $2... " >&6; }
1931 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1932   $as_echo_n "(cached) " >&6
1933 else
1934   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935 /* end confdefs.h.  */
1936 $4
1937 #include <$2>
1938 _ACEOF
1939 if ac_fn_c_try_compile "$LINENO"; then :
1940   eval "$3=yes"
1941 else
1942   eval "$3=no"
1943 fi
1944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1945 fi
1946 eval ac_res=\$$3
1947                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948 $as_echo "$ac_res" >&6; }
1949   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1950
1951 } # ac_fn_c_check_header_compile
1952
1953 # ac_fn_c_try_link LINENO
1954 # -----------------------
1955 # Try to link conftest.$ac_ext, and return whether this succeeded.
1956 ac_fn_c_try_link ()
1957 {
1958   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959   rm -f conftest.$ac_objext conftest$ac_exeext
1960   if { { ac_try="$ac_link"
1961 case "(($ac_try" in
1962   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1963   *) ac_try_echo=$ac_try;;
1964 esac
1965 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1966 $as_echo "$ac_try_echo"; } >&5
1967   (eval "$ac_link") 2>conftest.err
1968   ac_status=$?
1969   if test -s conftest.err; then
1970     grep -v '^ *+' conftest.err >conftest.er1
1971     cat conftest.er1 >&5
1972     mv -f conftest.er1 conftest.err
1973   fi
1974   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975   test $ac_status = 0; } && {
1976          test -z "$ac_c_werror_flag" ||
1977          test ! -s conftest.err
1978        } && test -s conftest$ac_exeext && {
1979          test "$cross_compiling" = yes ||
1980          $as_test_x conftest$ac_exeext
1981        }; then :
1982   ac_retval=0
1983 else
1984   $as_echo "$as_me: failed program was:" >&5
1985 sed 's/^/| /' conftest.$ac_ext >&5
1986
1987         ac_retval=1
1988 fi
1989   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1990   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1991   # interfere with the next link command; also delete a directory that is
1992   # left behind by Apple's compiler.  We do this before executing the actions.
1993   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1994   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1995   return $ac_retval
1996
1997 } # ac_fn_c_try_link
1998
1999 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2000 # --------------------------------------------
2001 # Tries to find the compile-time value of EXPR in a program that includes
2002 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2003 # computed
2004 ac_fn_c_compute_int ()
2005 {
2006   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007   if test "$cross_compiling" = yes; then
2008     # Depending upon the size, compute the lo and hi bounds.
2009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010 /* end confdefs.h.  */
2011 $4
2012 int
2013 main ()
2014 {
2015 static int test_array [1 - 2 * !(($2) >= 0)];
2016 test_array [0] = 0
2017
2018   ;
2019   return 0;
2020 }
2021 _ACEOF
2022 if ac_fn_c_try_compile "$LINENO"; then :
2023   ac_lo=0 ac_mid=0
2024   while :; do
2025     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026 /* end confdefs.h.  */
2027 $4
2028 int
2029 main ()
2030 {
2031 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2032 test_array [0] = 0
2033
2034   ;
2035   return 0;
2036 }
2037 _ACEOF
2038 if ac_fn_c_try_compile "$LINENO"; then :
2039   ac_hi=$ac_mid; break
2040 else
2041   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2042                         if test $ac_lo -le $ac_mid; then
2043                           ac_lo= ac_hi=
2044                           break
2045                         fi
2046                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2047 fi
2048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2049   done
2050 else
2051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052 /* end confdefs.h.  */
2053 $4
2054 int
2055 main ()
2056 {
2057 static int test_array [1 - 2 * !(($2) < 0)];
2058 test_array [0] = 0
2059
2060   ;
2061   return 0;
2062 }
2063 _ACEOF
2064 if ac_fn_c_try_compile "$LINENO"; then :
2065   ac_hi=-1 ac_mid=-1
2066   while :; do
2067     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068 /* end confdefs.h.  */
2069 $4
2070 int
2071 main ()
2072 {
2073 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2074 test_array [0] = 0
2075
2076   ;
2077   return 0;
2078 }
2079 _ACEOF
2080 if ac_fn_c_try_compile "$LINENO"; then :
2081   ac_lo=$ac_mid; break
2082 else
2083   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2084                         if test $ac_mid -le $ac_hi; then
2085                           ac_lo= ac_hi=
2086                           break
2087                         fi
2088                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2089 fi
2090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091   done
2092 else
2093   ac_lo= ac_hi=
2094 fi
2095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096 fi
2097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098 # Binary search between lo and hi bounds.
2099 while test "x$ac_lo" != "x$ac_hi"; do
2100   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102 /* end confdefs.h.  */
2103 $4
2104 int
2105 main ()
2106 {
2107 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2108 test_array [0] = 0
2109
2110   ;
2111   return 0;
2112 }
2113 _ACEOF
2114 if ac_fn_c_try_compile "$LINENO"; then :
2115   ac_hi=$ac_mid
2116 else
2117   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2118 fi
2119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120 done
2121 case $ac_lo in #((
2122 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2123 '') ac_retval=1 ;;
2124 esac
2125   else
2126     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127 /* end confdefs.h.  */
2128 $4
2129 static long int longval () { return $2; }
2130 static unsigned long int ulongval () { return $2; }
2131 #include <stdio.h>
2132 #include <stdlib.h>
2133 int
2134 main ()
2135 {
2136
2137   FILE *f = fopen ("conftest.val", "w");
2138   if (! f)
2139     return 1;
2140   if (($2) < 0)
2141     {
2142       long int i = longval ();
2143       if (i != ($2))
2144         return 1;
2145       fprintf (f, "%ld", i);
2146     }
2147   else
2148     {
2149       unsigned long int i = ulongval ();
2150       if (i != ($2))
2151         return 1;
2152       fprintf (f, "%lu", i);
2153     }
2154   /* Do not output a trailing newline, as this causes \r\n confusion
2155      on some platforms.  */
2156   return ferror (f) || fclose (f) != 0;
2157
2158   ;
2159   return 0;
2160 }
2161 _ACEOF
2162 if ac_fn_c_try_run "$LINENO"; then :
2163   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2164 else
2165   ac_retval=1
2166 fi
2167 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2168   conftest.$ac_objext conftest.beam conftest.$ac_ext
2169 rm -f conftest.val
2170
2171   fi
2172   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2173   return $ac_retval
2174
2175 } # ac_fn_c_compute_int
2176
2177 # ac_fn_c_check_func LINENO FUNC VAR
2178 # ----------------------------------
2179 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2180 ac_fn_c_check_func ()
2181 {
2182   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2184 $as_echo_n "checking for $2... " >&6; }
2185 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2186   $as_echo_n "(cached) " >&6
2187 else
2188   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189 /* end confdefs.h.  */
2190 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2191    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2192 #define $2 innocuous_$2
2193
2194 /* System header to define __stub macros and hopefully few prototypes,
2195     which can conflict with char $2 (); below.
2196     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2197     <limits.h> exists even on freestanding compilers.  */
2198
2199 #ifdef __STDC__
2200 # include <limits.h>
2201 #else
2202 # include <assert.h>
2203 #endif
2204
2205 #undef $2
2206
2207 /* Override any GCC internal prototype to avoid an error.
2208    Use char because int might match the return type of a GCC
2209    builtin and then its argument prototype would still apply.  */
2210 #ifdef __cplusplus
2211 extern "C"
2212 #endif
2213 char $2 ();
2214 /* The GNU C library defines this for functions which it implements
2215     to always fail with ENOSYS.  Some functions are actually named
2216     something starting with __ and the normal name is an alias.  */
2217 #if defined __stub_$2 || defined __stub___$2
2218 choke me
2219 #endif
2220
2221 int
2222 main ()
2223 {
2224 return $2 ();
2225   ;
2226   return 0;
2227 }
2228 _ACEOF
2229 if ac_fn_c_try_link "$LINENO"; then :
2230   eval "$3=yes"
2231 else
2232   eval "$3=no"
2233 fi
2234 rm -f core conftest.err conftest.$ac_objext \
2235     conftest$ac_exeext conftest.$ac_ext
2236 fi
2237 eval ac_res=\$$3
2238                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2239 $as_echo "$ac_res" >&6; }
2240   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2241
2242 } # ac_fn_c_check_func
2243
2244 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2245 # -------------------------------------------
2246 # Tests whether TYPE exists after having included INCLUDES, setting cache
2247 # variable VAR accordingly.
2248 ac_fn_c_check_type ()
2249 {
2250   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2251   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2252 $as_echo_n "checking for $2... " >&6; }
2253 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2254   $as_echo_n "(cached) " >&6
2255 else
2256   eval "$3=no"
2257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2258 /* end confdefs.h.  */
2259 $4
2260 int
2261 main ()
2262 {
2263 if (sizeof ($2))
2264          return 0;
2265   ;
2266   return 0;
2267 }
2268 _ACEOF
2269 if ac_fn_c_try_compile "$LINENO"; then :
2270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271 /* end confdefs.h.  */
2272 $4
2273 int
2274 main ()
2275 {
2276 if (sizeof (($2)))
2277             return 0;
2278   ;
2279   return 0;
2280 }
2281 _ACEOF
2282 if ac_fn_c_try_compile "$LINENO"; then :
2283
2284 else
2285   eval "$3=yes"
2286 fi
2287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288 fi
2289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290 fi
2291 eval ac_res=\$$3
2292                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2293 $as_echo "$ac_res" >&6; }
2294   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2295
2296 } # ac_fn_c_check_type
2297
2298 # ac_fn_c_check_decl LINENO SYMBOL VAR
2299 # ------------------------------------
2300 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2301 ac_fn_c_check_decl ()
2302 {
2303   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304   as_decl_name=`echo $2|sed 's/ *(.*//'`
2305   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2306   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2307 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2308 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2309   $as_echo_n "(cached) " >&6
2310 else
2311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312 /* end confdefs.h.  */
2313 $4
2314 int
2315 main ()
2316 {
2317 #ifndef $as_decl_name
2318 #ifdef __cplusplus
2319   (void) $as_decl_use;
2320 #else
2321   (void) $as_decl_name;
2322 #endif
2323 #endif
2324
2325   ;
2326   return 0;
2327 }
2328 _ACEOF
2329 if ac_fn_c_try_compile "$LINENO"; then :
2330   eval "$3=yes"
2331 else
2332   eval "$3=no"
2333 fi
2334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335 fi
2336 eval ac_res=\$$3
2337                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338 $as_echo "$ac_res" >&6; }
2339   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2340
2341 } # ac_fn_c_check_decl
2342
2343 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2344 # ----------------------------------------------------
2345 # Tries to find if the field MEMBER exists in type AGGR, after including
2346 # INCLUDES, setting cache variable VAR accordingly.
2347 ac_fn_c_check_member ()
2348 {
2349   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2350   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2351 $as_echo_n "checking for $2.$3... " >&6; }
2352 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2353   $as_echo_n "(cached) " >&6
2354 else
2355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356 /* end confdefs.h.  */
2357 $5
2358 int
2359 main ()
2360 {
2361 static $2 ac_aggr;
2362 if (ac_aggr.$3)
2363 return 0;
2364   ;
2365   return 0;
2366 }
2367 _ACEOF
2368 if ac_fn_c_try_compile "$LINENO"; then :
2369   eval "$4=yes"
2370 else
2371   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372 /* end confdefs.h.  */
2373 $5
2374 int
2375 main ()
2376 {
2377 static $2 ac_aggr;
2378 if (sizeof ac_aggr.$3)
2379 return 0;
2380   ;
2381   return 0;
2382 }
2383 _ACEOF
2384 if ac_fn_c_try_compile "$LINENO"; then :
2385   eval "$4=yes"
2386 else
2387   eval "$4=no"
2388 fi
2389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390 fi
2391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2392 fi
2393 eval ac_res=\$$4
2394                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2395 $as_echo "$ac_res" >&6; }
2396   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2397
2398 } # ac_fn_c_check_member
2399 cat >config.log <<_ACEOF
2400 This file contains any messages produced by compilers while
2401 running configure, to aid debugging if configure makes a mistake.
2402
2403 It was created by $as_me, which was
2404 generated by GNU Autoconf 2.64.  Invocation command line was
2405
2406   $ $0 $@
2407
2408 _ACEOF
2409 exec 5>>config.log
2410 {
2411 cat <<_ASUNAME
2412 ## --------- ##
2413 ## Platform. ##
2414 ## --------- ##
2415
2416 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2417 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2418 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2419 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2420 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2421
2422 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2423 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2424
2425 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2426 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2427 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2428 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2429 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2430 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2431 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2432
2433 _ASUNAME
2434
2435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2436 for as_dir in $PATH
2437 do
2438   IFS=$as_save_IFS
2439   test -z "$as_dir" && as_dir=.
2440     $as_echo "PATH: $as_dir"
2441   done
2442 IFS=$as_save_IFS
2443
2444 } >&5
2445
2446 cat >&5 <<_ACEOF
2447
2448
2449 ## ----------- ##
2450 ## Core tests. ##
2451 ## ----------- ##
2452
2453 _ACEOF
2454
2455
2456 # Keep a trace of the command line.
2457 # Strip out --no-create and --no-recursion so they do not pile up.
2458 # Strip out --silent because we don't want to record it for future runs.
2459 # Also quote any args containing shell meta-characters.
2460 # Make two passes to allow for proper duplicate-argument suppression.
2461 ac_configure_args=
2462 ac_configure_args0=
2463 ac_configure_args1=
2464 ac_must_keep_next=false
2465 for ac_pass in 1 2
2466 do
2467   for ac_arg
2468   do
2469     case $ac_arg in
2470     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2471     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2472     | -silent | --silent | --silen | --sile | --sil)
2473       continue ;;
2474     *\'*)
2475       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2476     esac
2477     case $ac_pass in
2478     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2479     2)
2480       as_fn_append ac_configure_args1 " '$ac_arg'"
2481       if test $ac_must_keep_next = true; then
2482         ac_must_keep_next=false # Got value, back to normal.
2483       else
2484         case $ac_arg in
2485           *=* | --config-cache | -C | -disable-* | --disable-* \
2486           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2487           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2488           | -with-* | --with-* | -without-* | --without-* | --x)
2489             case "$ac_configure_args0 " in
2490               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2491             esac
2492             ;;
2493           -* ) ac_must_keep_next=true ;;
2494         esac
2495       fi
2496       as_fn_append ac_configure_args " '$ac_arg'"
2497       ;;
2498     esac
2499   done
2500 done
2501 { ac_configure_args0=; unset ac_configure_args0;}
2502 { ac_configure_args1=; unset ac_configure_args1;}
2503
2504 # When interrupted or exit'd, cleanup temporary files, and complete
2505 # config.log.  We remove comments because anyway the quotes in there
2506 # would cause problems or look ugly.
2507 # WARNING: Use '\'' to represent an apostrophe within the trap.
2508 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2509 trap 'exit_status=$?
2510   # Save into config.log some information that might help in debugging.
2511   {
2512     echo
2513
2514     cat <<\_ASBOX
2515 ## ---------------- ##
2516 ## Cache variables. ##
2517 ## ---------------- ##
2518 _ASBOX
2519     echo
2520     # The following way of writing the cache mishandles newlines in values,
2521 (
2522   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2523     eval ac_val=\$$ac_var
2524     case $ac_val in #(
2525     *${as_nl}*)
2526       case $ac_var in #(
2527       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2528 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2529       esac
2530       case $ac_var in #(
2531       _ | IFS | as_nl) ;; #(
2532       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2533       *) { eval $ac_var=; unset $ac_var;} ;;
2534       esac ;;
2535     esac
2536   done
2537   (set) 2>&1 |
2538     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2539     *${as_nl}ac_space=\ *)
2540       sed -n \
2541         "s/'\''/'\''\\\\'\'''\''/g;
2542           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2543       ;; #(
2544     *)
2545       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2546       ;;
2547     esac |
2548     sort
2549 )
2550     echo
2551
2552     cat <<\_ASBOX
2553 ## ----------------- ##
2554 ## Output variables. ##
2555 ## ----------------- ##
2556 _ASBOX
2557     echo
2558     for ac_var in $ac_subst_vars
2559     do
2560       eval ac_val=\$$ac_var
2561       case $ac_val in
2562       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2563       esac
2564       $as_echo "$ac_var='\''$ac_val'\''"
2565     done | sort
2566     echo
2567
2568     if test -n "$ac_subst_files"; then
2569       cat <<\_ASBOX
2570 ## ------------------- ##
2571 ## File substitutions. ##
2572 ## ------------------- ##
2573 _ASBOX
2574       echo
2575       for ac_var in $ac_subst_files
2576       do
2577         eval ac_val=\$$ac_var
2578         case $ac_val in
2579         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2580         esac
2581         $as_echo "$ac_var='\''$ac_val'\''"
2582       done | sort
2583       echo
2584     fi
2585
2586     if test -s confdefs.h; then
2587       cat <<\_ASBOX
2588 ## ----------- ##
2589 ## confdefs.h. ##
2590 ## ----------- ##
2591 _ASBOX
2592       echo
2593       cat confdefs.h
2594       echo
2595     fi
2596     test "$ac_signal" != 0 &&
2597       $as_echo "$as_me: caught signal $ac_signal"
2598     $as_echo "$as_me: exit $exit_status"
2599   } >&5
2600   rm -f core *.core core.conftest.* &&
2601     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2602     exit $exit_status
2603 ' 0
2604 for ac_signal in 1 2 13 15; do
2605   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2606 done
2607 ac_signal=0
2608
2609 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2610 rm -f -r conftest* confdefs.h
2611
2612 $as_echo "/* confdefs.h */" > confdefs.h
2613
2614 # Predefined preprocessor variables.
2615
2616 cat >>confdefs.h <<_ACEOF
2617 #define PACKAGE_NAME "$PACKAGE_NAME"
2618 _ACEOF
2619
2620 cat >>confdefs.h <<_ACEOF
2621 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2622 _ACEOF
2623
2624 cat >>confdefs.h <<_ACEOF
2625 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2626 _ACEOF
2627
2628 cat >>confdefs.h <<_ACEOF
2629 #define PACKAGE_STRING "$PACKAGE_STRING"
2630 _ACEOF
2631
2632 cat >>confdefs.h <<_ACEOF
2633 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2634 _ACEOF
2635
2636 cat >>confdefs.h <<_ACEOF
2637 #define PACKAGE_URL "$PACKAGE_URL"
2638 _ACEOF
2639
2640
2641 # Let the site file select an alternate cache file if it wants to.
2642 # Prefer an explicitly selected file to automatically selected ones.
2643 ac_site_file1=NONE
2644 ac_site_file2=NONE
2645 if test -n "$CONFIG_SITE"; then
2646   ac_site_file1=$CONFIG_SITE
2647 elif test "x$prefix" != xNONE; then
2648   ac_site_file1=$prefix/share/config.site
2649   ac_site_file2=$prefix/etc/config.site
2650 else
2651   ac_site_file1=$ac_default_prefix/share/config.site
2652   ac_site_file2=$ac_default_prefix/etc/config.site
2653 fi
2654 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2655 do
2656   test "x$ac_site_file" = xNONE && continue
2657   if test -r "$ac_site_file"; then
2658     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2659 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2660     sed 's/^/| /' "$ac_site_file" >&5
2661     . "$ac_site_file"
2662   fi
2663 done
2664
2665 if test -r "$cache_file"; then
2666   # Some versions of bash will fail to source /dev/null (special
2667   # files actually), so we avoid doing that.
2668   if test -f "$cache_file"; then
2669     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2670 $as_echo "$as_me: loading cache $cache_file" >&6;}
2671     case $cache_file in
2672       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2673       *)                      . "./$cache_file";;
2674     esac
2675   fi
2676 else
2677   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2678 $as_echo "$as_me: creating cache $cache_file" >&6;}
2679   >$cache_file
2680 fi
2681
2682 # Check that the precious variables saved in the cache have kept the same
2683 # value.
2684 ac_cache_corrupted=false
2685 for ac_var in $ac_precious_vars; do
2686   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2687   eval ac_new_set=\$ac_env_${ac_var}_set
2688   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2689   eval ac_new_val=\$ac_env_${ac_var}_value
2690   case $ac_old_set,$ac_new_set in
2691     set,)
2692       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2693 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2694       ac_cache_corrupted=: ;;
2695     ,set)
2696       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2697 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2698       ac_cache_corrupted=: ;;
2699     ,);;
2700     *)
2701       if test "x$ac_old_val" != "x$ac_new_val"; then
2702         # differences in whitespace do not lead to failure.
2703         ac_old_val_w=`echo x $ac_old_val`
2704         ac_new_val_w=`echo x $ac_new_val`
2705         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2706           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2707 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2708           ac_cache_corrupted=:
2709         else
2710           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2711 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2712           eval $ac_var=\$ac_old_val
2713         fi
2714         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2715 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2716         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2717 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2718       fi;;
2719   esac
2720   # Pass precious variables to config.status.
2721   if test "$ac_new_set" = set; then
2722     case $ac_new_val in
2723     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2724     *) ac_arg=$ac_var=$ac_new_val ;;
2725     esac
2726     case " $ac_configure_args " in
2727       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2728       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2729     esac
2730   fi
2731 done
2732 if $ac_cache_corrupted; then
2733   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2734 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2735   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2736 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2737   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2738 fi
2739 ## -------------------- ##
2740 ## Main body of script. ##
2741 ## -------------------- ##
2742
2743 ac_ext=c
2744 ac_cpp='$CPP $CPPFLAGS'
2745 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2746 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2747 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2748
2749
2750
2751
2752
2753 ac_config_headers="$ac_config_headers config.h:config.in"
2754
2755
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2757 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2758     # Check whether --enable-maintainer-mode was given.
2759 if test "${enable_maintainer_mode+set}" = set; then :
2760   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2761 else
2762   USE_MAINTAINER_MODE=no
2763 fi
2764
2765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2766 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2767    if test $USE_MAINTAINER_MODE = yes; then
2768   MAINTAINER_MODE_TRUE=
2769   MAINTAINER_MODE_FALSE='#'
2770 else
2771   MAINTAINER_MODE_TRUE='#'
2772   MAINTAINER_MODE_FALSE=
2773 fi
2774
2775   MAINT=$MAINTAINER_MODE_TRUE
2776
2777
2778
2779 # Set the 'development' global.
2780 . $srcdir/../bfd/development.sh
2781
2782 ac_ext=c
2783 ac_cpp='$CPP $CPPFLAGS'
2784 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2785 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2786 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2787 if test -n "$ac_tool_prefix"; then
2788   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2789 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2791 $as_echo_n "checking for $ac_word... " >&6; }
2792 if test "${ac_cv_prog_CC+set}" = set; then :
2793   $as_echo_n "(cached) " >&6
2794 else
2795   if test -n "$CC"; then
2796   ac_cv_prog_CC="$CC" # Let the user override the test.
2797 else
2798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2799 for as_dir in $PATH
2800 do
2801   IFS=$as_save_IFS
2802   test -z "$as_dir" && as_dir=.
2803     for ac_exec_ext in '' $ac_executable_extensions; do
2804   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2805     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2807     break 2
2808   fi
2809 done
2810   done
2811 IFS=$as_save_IFS
2812
2813 fi
2814 fi
2815 CC=$ac_cv_prog_CC
2816 if test -n "$CC"; then
2817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2818 $as_echo "$CC" >&6; }
2819 else
2820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2821 $as_echo "no" >&6; }
2822 fi
2823
2824
2825 fi
2826 if test -z "$ac_cv_prog_CC"; then
2827   ac_ct_CC=$CC
2828   # Extract the first word of "gcc", so it can be a program name with args.
2829 set dummy gcc; ac_word=$2
2830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2831 $as_echo_n "checking for $ac_word... " >&6; }
2832 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2833   $as_echo_n "(cached) " >&6
2834 else
2835   if test -n "$ac_ct_CC"; then
2836   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2837 else
2838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2839 for as_dir in $PATH
2840 do
2841   IFS=$as_save_IFS
2842   test -z "$as_dir" && as_dir=.
2843     for ac_exec_ext in '' $ac_executable_extensions; do
2844   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2845     ac_cv_prog_ac_ct_CC="gcc"
2846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2847     break 2
2848   fi
2849 done
2850   done
2851 IFS=$as_save_IFS
2852
2853 fi
2854 fi
2855 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2856 if test -n "$ac_ct_CC"; then
2857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2858 $as_echo "$ac_ct_CC" >&6; }
2859 else
2860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2861 $as_echo "no" >&6; }
2862 fi
2863
2864   if test "x$ac_ct_CC" = x; then
2865     CC=""
2866   else
2867     case $cross_compiling:$ac_tool_warned in
2868 yes:)
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2870 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2871 ac_tool_warned=yes ;;
2872 esac
2873     CC=$ac_ct_CC
2874   fi
2875 else
2876   CC="$ac_cv_prog_CC"
2877 fi
2878
2879 if test -z "$CC"; then
2880           if test -n "$ac_tool_prefix"; then
2881     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2882 set dummy ${ac_tool_prefix}cc; ac_word=$2
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2884 $as_echo_n "checking for $ac_word... " >&6; }
2885 if test "${ac_cv_prog_CC+set}" = set; then :
2886   $as_echo_n "(cached) " >&6
2887 else
2888   if test -n "$CC"; then
2889   ac_cv_prog_CC="$CC" # Let the user override the test.
2890 else
2891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2892 for as_dir in $PATH
2893 do
2894   IFS=$as_save_IFS
2895   test -z "$as_dir" && as_dir=.
2896     for ac_exec_ext in '' $ac_executable_extensions; do
2897   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2898     ac_cv_prog_CC="${ac_tool_prefix}cc"
2899     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2900     break 2
2901   fi
2902 done
2903   done
2904 IFS=$as_save_IFS
2905
2906 fi
2907 fi
2908 CC=$ac_cv_prog_CC
2909 if test -n "$CC"; then
2910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2911 $as_echo "$CC" >&6; }
2912 else
2913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914 $as_echo "no" >&6; }
2915 fi
2916
2917
2918   fi
2919 fi
2920 if test -z "$CC"; then
2921   # Extract the first word of "cc", so it can be a program name with args.
2922 set dummy cc; ac_word=$2
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2924 $as_echo_n "checking for $ac_word... " >&6; }
2925 if test "${ac_cv_prog_CC+set}" = set; then :
2926   $as_echo_n "(cached) " >&6
2927 else
2928   if test -n "$CC"; then
2929   ac_cv_prog_CC="$CC" # Let the user override the test.
2930 else
2931   ac_prog_rejected=no
2932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2933 for as_dir in $PATH
2934 do
2935   IFS=$as_save_IFS
2936   test -z "$as_dir" && as_dir=.
2937     for ac_exec_ext in '' $ac_executable_extensions; do
2938   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2939     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2940        ac_prog_rejected=yes
2941        continue
2942      fi
2943     ac_cv_prog_CC="cc"
2944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2945     break 2
2946   fi
2947 done
2948   done
2949 IFS=$as_save_IFS
2950
2951 if test $ac_prog_rejected = yes; then
2952   # We found a bogon in the path, so make sure we never use it.
2953   set dummy $ac_cv_prog_CC
2954   shift
2955   if test $# != 0; then
2956     # We chose a different compiler from the bogus one.
2957     # However, it has the same basename, so the bogon will be chosen
2958     # first if we set CC to just the basename; use the full file name.
2959     shift
2960     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2961   fi
2962 fi
2963 fi
2964 fi
2965 CC=$ac_cv_prog_CC
2966 if test -n "$CC"; then
2967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2968 $as_echo "$CC" >&6; }
2969 else
2970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2971 $as_echo "no" >&6; }
2972 fi
2973
2974
2975 fi
2976 if test -z "$CC"; then
2977   if test -n "$ac_tool_prefix"; then
2978   for ac_prog in cl.exe
2979   do
2980     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2981 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2983 $as_echo_n "checking for $ac_word... " >&6; }
2984 if test "${ac_cv_prog_CC+set}" = set; then :
2985   $as_echo_n "(cached) " >&6
2986 else
2987   if test -n "$CC"; then
2988   ac_cv_prog_CC="$CC" # Let the user override the test.
2989 else
2990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2991 for as_dir in $PATH
2992 do
2993   IFS=$as_save_IFS
2994   test -z "$as_dir" && as_dir=.
2995     for ac_exec_ext in '' $ac_executable_extensions; do
2996   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2997     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2999     break 2
3000   fi
3001 done
3002   done
3003 IFS=$as_save_IFS
3004
3005 fi
3006 fi
3007 CC=$ac_cv_prog_CC
3008 if test -n "$CC"; then
3009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3010 $as_echo "$CC" >&6; }
3011 else
3012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3013 $as_echo "no" >&6; }
3014 fi
3015
3016
3017     test -n "$CC" && break
3018   done
3019 fi
3020 if test -z "$CC"; then
3021   ac_ct_CC=$CC
3022   for ac_prog in cl.exe
3023 do
3024   # Extract the first word of "$ac_prog", so it can be a program name with args.
3025 set dummy $ac_prog; ac_word=$2
3026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3027 $as_echo_n "checking for $ac_word... " >&6; }
3028 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3029   $as_echo_n "(cached) " >&6
3030 else
3031   if test -n "$ac_ct_CC"; then
3032   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3033 else
3034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3035 for as_dir in $PATH
3036 do
3037   IFS=$as_save_IFS
3038   test -z "$as_dir" && as_dir=.
3039     for ac_exec_ext in '' $ac_executable_extensions; do
3040   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3041     ac_cv_prog_ac_ct_CC="$ac_prog"
3042     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3043     break 2
3044   fi
3045 done
3046   done
3047 IFS=$as_save_IFS
3048
3049 fi
3050 fi
3051 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3052 if test -n "$ac_ct_CC"; then
3053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3054 $as_echo "$ac_ct_CC" >&6; }
3055 else
3056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3057 $as_echo "no" >&6; }
3058 fi
3059
3060
3061   test -n "$ac_ct_CC" && break
3062 done
3063
3064   if test "x$ac_ct_CC" = x; then
3065     CC=""
3066   else
3067     case $cross_compiling:$ac_tool_warned in
3068 yes:)
3069 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3070 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3071 ac_tool_warned=yes ;;
3072 esac
3073     CC=$ac_ct_CC
3074   fi
3075 fi
3076
3077 fi
3078
3079
3080 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3081 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3082 as_fn_error "no acceptable C compiler found in \$PATH
3083 See \`config.log' for more details." "$LINENO" 5; }
3084
3085 # Provide some information about the compiler.
3086 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3087 set X $ac_compile
3088 ac_compiler=$2
3089 for ac_option in --version -v -V -qversion; do
3090   { { ac_try="$ac_compiler $ac_option >&5"
3091 case "(($ac_try" in
3092   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3093   *) ac_try_echo=$ac_try;;
3094 esac
3095 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3096 $as_echo "$ac_try_echo"; } >&5
3097   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3098   ac_status=$?
3099   if test -s conftest.err; then
3100     sed '10a\
3101 ... rest of stderr output deleted ...
3102          10q' conftest.err >conftest.er1
3103     cat conftest.er1 >&5
3104     rm -f conftest.er1 conftest.err
3105   fi
3106   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3107   test $ac_status = 0; }
3108 done
3109
3110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3111 /* end confdefs.h.  */
3112
3113 int
3114 main ()
3115 {
3116
3117   ;
3118   return 0;
3119 }
3120 _ACEOF
3121 ac_clean_files_save=$ac_clean_files
3122 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3123 # Try to create an executable without -o first, disregard a.out.
3124 # It will help us diagnose broken compilers, and finding out an intuition
3125 # of exeext.
3126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3127 $as_echo_n "checking for C compiler default output file name... " >&6; }
3128 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3129
3130 # The possible output files:
3131 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3132
3133 ac_rmfiles=
3134 for ac_file in $ac_files
3135 do
3136   case $ac_file in
3137     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3138     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3139   esac
3140 done
3141 rm -f $ac_rmfiles
3142
3143 if { { ac_try="$ac_link_default"
3144 case "(($ac_try" in
3145   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146   *) ac_try_echo=$ac_try;;
3147 esac
3148 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3149 $as_echo "$ac_try_echo"; } >&5
3150   (eval "$ac_link_default") 2>&5
3151   ac_status=$?
3152   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3153   test $ac_status = 0; }; then :
3154   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3155 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3156 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3157 # so that the user can short-circuit this test for compilers unknown to
3158 # Autoconf.
3159 for ac_file in $ac_files ''
3160 do
3161   test -f "$ac_file" || continue
3162   case $ac_file in
3163     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3164         ;;
3165     [ab].out )
3166         # We found the default executable, but exeext='' is most
3167         # certainly right.
3168         break;;
3169     *.* )
3170         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3171         then :; else
3172            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3173         fi
3174         # We set ac_cv_exeext here because the later test for it is not
3175         # safe: cross compilers may not add the suffix if given an `-o'
3176         # argument, so we may need to know it at that point already.
3177         # Even if this section looks crufty: it has the advantage of
3178         # actually working.
3179         break;;
3180     * )
3181         break;;
3182   esac
3183 done
3184 test "$ac_cv_exeext" = no && ac_cv_exeext=
3185
3186 else
3187   ac_file=''
3188 fi
3189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3190 $as_echo "$ac_file" >&6; }
3191 if test -z "$ac_file"; then :
3192   $as_echo "$as_me: failed program was:" >&5
3193 sed 's/^/| /' conftest.$ac_ext >&5
3194
3195 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3196 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3197 { as_fn_set_status 77
3198 as_fn_error "C compiler cannot create executables
3199 See \`config.log' for more details." "$LINENO" 5; }; }
3200 fi
3201 ac_exeext=$ac_cv_exeext
3202
3203 # Check that the compiler produces executables we can run.  If not, either
3204 # the compiler is broken, or we cross compile.
3205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3206 $as_echo_n "checking whether the C compiler works... " >&6; }
3207 # If not cross compiling, check that we can run a simple program.
3208 if test "$cross_compiling" != yes; then
3209   if { ac_try='./$ac_file'
3210   { { case "(($ac_try" in
3211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3212   *) ac_try_echo=$ac_try;;
3213 esac
3214 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3215 $as_echo "$ac_try_echo"; } >&5
3216   (eval "$ac_try") 2>&5
3217   ac_status=$?
3218   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3219   test $ac_status = 0; }; }; then
3220     cross_compiling=no
3221   else
3222     if test "$cross_compiling" = maybe; then
3223         cross_compiling=yes
3224     else
3225         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3227 as_fn_error "cannot run C compiled programs.
3228 If you meant to cross compile, use \`--host'.
3229 See \`config.log' for more details." "$LINENO" 5; }
3230     fi
3231   fi
3232 fi
3233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3234 $as_echo "yes" >&6; }
3235
3236 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3237 ac_clean_files=$ac_clean_files_save
3238 # Check that the compiler produces executables we can run.  If not, either
3239 # the compiler is broken, or we cross compile.
3240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3241 $as_echo_n "checking whether we are cross compiling... " >&6; }
3242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3243 $as_echo "$cross_compiling" >&6; }
3244
3245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3246 $as_echo_n "checking for suffix of executables... " >&6; }
3247 if { { ac_try="$ac_link"
3248 case "(($ac_try" in
3249   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3250   *) ac_try_echo=$ac_try;;
3251 esac
3252 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3253 $as_echo "$ac_try_echo"; } >&5
3254   (eval "$ac_link") 2>&5
3255   ac_status=$?
3256   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3257   test $ac_status = 0; }; then :
3258   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3259 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3260 # work properly (i.e., refer to `conftest.exe'), while it won't with
3261 # `rm'.
3262 for ac_file in conftest.exe conftest conftest.*; do
3263   test -f "$ac_file" || continue
3264   case $ac_file in
3265     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3266     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3267           break;;
3268     * ) break;;
3269   esac
3270 done
3271 else
3272   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3273 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3274 as_fn_error "cannot compute suffix of executables: cannot compile and link
3275 See \`config.log' for more details." "$LINENO" 5; }
3276 fi
3277 rm -f conftest$ac_cv_exeext
3278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3279 $as_echo "$ac_cv_exeext" >&6; }
3280
3281 rm -f conftest.$ac_ext
3282 EXEEXT=$ac_cv_exeext
3283 ac_exeext=$EXEEXT
3284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3285 $as_echo_n "checking for suffix of object files... " >&6; }
3286 if test "${ac_cv_objext+set}" = set; then :
3287   $as_echo_n "(cached) " >&6
3288 else
3289   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3290 /* end confdefs.h.  */
3291
3292 int
3293 main ()
3294 {
3295
3296   ;
3297   return 0;
3298 }
3299 _ACEOF
3300 rm -f conftest.o conftest.obj
3301 if { { ac_try="$ac_compile"
3302 case "(($ac_try" in
3303   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3304   *) ac_try_echo=$ac_try;;
3305 esac
3306 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3307 $as_echo "$ac_try_echo"; } >&5
3308   (eval "$ac_compile") 2>&5
3309   ac_status=$?
3310   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3311   test $ac_status = 0; }; then :
3312   for ac_file in conftest.o conftest.obj conftest.*; do
3313   test -f "$ac_file" || continue;
3314   case $ac_file in
3315     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3316     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3317        break;;
3318   esac
3319 done
3320 else
3321   $as_echo "$as_me: failed program was:" >&5
3322 sed 's/^/| /' conftest.$ac_ext >&5
3323
3324 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3325 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3326 as_fn_error "cannot compute suffix of object files: cannot compile
3327 See \`config.log' for more details." "$LINENO" 5; }
3328 fi
3329 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3330 fi
3331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3332 $as_echo "$ac_cv_objext" >&6; }
3333 OBJEXT=$ac_cv_objext
3334 ac_objext=$OBJEXT
3335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3336 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3337 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3338   $as_echo_n "(cached) " >&6
3339 else
3340   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3341 /* end confdefs.h.  */
3342
3343 int
3344 main ()
3345 {
3346 #ifndef __GNUC__
3347        choke me
3348 #endif
3349
3350   ;
3351   return 0;
3352 }
3353 _ACEOF
3354 if ac_fn_c_try_compile "$LINENO"; then :
3355   ac_compiler_gnu=yes
3356 else
3357   ac_compiler_gnu=no
3358 fi
3359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3360 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3361
3362 fi
3363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3364 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3365 if test $ac_compiler_gnu = yes; then
3366   GCC=yes
3367 else
3368   GCC=
3369 fi
3370 ac_test_CFLAGS=${CFLAGS+set}
3371 ac_save_CFLAGS=$CFLAGS
3372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3373 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3374 if test "${ac_cv_prog_cc_g+set}" = set; then :
3375   $as_echo_n "(cached) " >&6
3376 else
3377   ac_save_c_werror_flag=$ac_c_werror_flag
3378    ac_c_werror_flag=yes
3379    ac_cv_prog_cc_g=no
3380    CFLAGS="-g"
3381    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3382 /* end confdefs.h.  */
3383
3384 int
3385 main ()
3386 {
3387
3388   ;
3389   return 0;
3390 }
3391 _ACEOF
3392 if ac_fn_c_try_compile "$LINENO"; then :
3393   ac_cv_prog_cc_g=yes
3394 else
3395   CFLAGS=""
3396       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3397 /* end confdefs.h.  */
3398
3399 int
3400 main ()
3401 {
3402
3403   ;
3404   return 0;
3405 }
3406 _ACEOF
3407 if ac_fn_c_try_compile "$LINENO"; then :
3408
3409 else
3410   ac_c_werror_flag=$ac_save_c_werror_flag
3411          CFLAGS="-g"
3412          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3413 /* end confdefs.h.  */
3414
3415 int
3416 main ()
3417 {
3418
3419   ;
3420   return 0;
3421 }
3422 _ACEOF
3423 if ac_fn_c_try_compile "$LINENO"; then :
3424   ac_cv_prog_cc_g=yes
3425 fi
3426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3427 fi
3428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3429 fi
3430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3431    ac_c_werror_flag=$ac_save_c_werror_flag
3432 fi
3433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3434 $as_echo "$ac_cv_prog_cc_g" >&6; }
3435 if test "$ac_test_CFLAGS" = set; then
3436   CFLAGS=$ac_save_CFLAGS
3437 elif test $ac_cv_prog_cc_g = yes; then
3438   if test "$GCC" = yes; then
3439     CFLAGS="-g -O2"
3440   else
3441     CFLAGS="-g"
3442   fi
3443 else
3444   if test "$GCC" = yes; then
3445     CFLAGS="-O2"
3446   else
3447     CFLAGS=
3448   fi
3449 fi
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3451 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3452 if test "${ac_cv_prog_cc_c89+set}" = set; then :
3453   $as_echo_n "(cached) " >&6
3454 else
3455   ac_cv_prog_cc_c89=no
3456 ac_save_CC=$CC
3457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3458 /* end confdefs.h.  */
3459 #include <stdarg.h>
3460 #include <stdio.h>
3461 #include <sys/types.h>
3462 #include <sys/stat.h>
3463 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3464 struct buf { int x; };
3465 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3466 static char *e (p, i)
3467      char **p;
3468      int i;
3469 {
3470   return p[i];
3471 }
3472 static char *f (char * (*g) (char **, int), char **p, ...)
3473 {
3474   char *s;
3475   va_list v;
3476   va_start (v,p);
3477   s = g (p, va_arg (v,int));
3478   va_end (v);
3479   return s;
3480 }
3481
3482 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3483    function prototypes and stuff, but not '\xHH' hex character constants.
3484    These don't provoke an error unfortunately, instead are silently treated
3485    as 'x'.  The following induces an error, until -std is added to get
3486    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3487    array size at least.  It's necessary to write '\x00'==0 to get something
3488    that's true only with -std.  */
3489 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3490
3491 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3492    inside strings and character constants.  */
3493 #define FOO(x) 'x'
3494 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3495
3496 int test (int i, double x);
3497 struct s1 {int (*f) (int a);};
3498 struct s2 {int (*f) (double a);};
3499 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3500 int argc;
3501 char **argv;
3502 int
3503 main ()
3504 {
3505 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3506   ;
3507   return 0;
3508 }
3509 _ACEOF
3510 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3511         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3512 do
3513   CC="$ac_save_CC $ac_arg"
3514   if ac_fn_c_try_compile "$LINENO"; then :
3515   ac_cv_prog_cc_c89=$ac_arg
3516 fi
3517 rm -f core conftest.err conftest.$ac_objext
3518   test "x$ac_cv_prog_cc_c89" != "xno" && break
3519 done
3520 rm -f conftest.$ac_ext
3521 CC=$ac_save_CC
3522
3523 fi
3524 # AC_CACHE_VAL
3525 case "x$ac_cv_prog_cc_c89" in
3526   x)
3527     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3528 $as_echo "none needed" >&6; } ;;
3529   xno)
3530     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3531 $as_echo "unsupported" >&6; } ;;
3532   *)
3533     CC="$CC $ac_cv_prog_cc_c89"
3534     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3535 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3536 esac
3537 if test "x$ac_cv_prog_cc_c89" != xno; then :
3538
3539 fi
3540
3541 ac_ext=c
3542 ac_cpp='$CPP $CPPFLAGS'
3543 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3544 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3545 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3546
3547 ac_ext=cpp
3548 ac_cpp='$CXXCPP $CPPFLAGS'
3549 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3550 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3551 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3552 if test -z "$CXX"; then
3553   if test -n "$CCC"; then
3554     CXX=$CCC
3555   else
3556     if test -n "$ac_tool_prefix"; then
3557   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3558   do
3559     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3560 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3562 $as_echo_n "checking for $ac_word... " >&6; }
3563 if test "${ac_cv_prog_CXX+set}" = set; then :
3564   $as_echo_n "(cached) " >&6
3565 else
3566   if test -n "$CXX"; then
3567   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3568 else
3569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3570 for as_dir in $PATH
3571 do
3572   IFS=$as_save_IFS
3573   test -z "$as_dir" && as_dir=.
3574     for ac_exec_ext in '' $ac_executable_extensions; do
3575   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3576     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3578     break 2
3579   fi
3580 done
3581   done
3582 IFS=$as_save_IFS
3583
3584 fi
3585 fi
3586 CXX=$ac_cv_prog_CXX
3587 if test -n "$CXX"; then
3588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3589 $as_echo "$CXX" >&6; }
3590 else
3591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3592 $as_echo "no" >&6; }
3593 fi
3594
3595
3596     test -n "$CXX" && break
3597   done
3598 fi
3599 if test -z "$CXX"; then
3600   ac_ct_CXX=$CXX
3601   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3602 do
3603   # Extract the first word of "$ac_prog", so it can be a program name with args.
3604 set dummy $ac_prog; ac_word=$2
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3606 $as_echo_n "checking for $ac_word... " >&6; }
3607 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3608   $as_echo_n "(cached) " >&6
3609 else
3610   if test -n "$ac_ct_CXX"; then
3611   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3612 else
3613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3614 for as_dir in $PATH
3615 do
3616   IFS=$as_save_IFS
3617   test -z "$as_dir" && as_dir=.
3618     for ac_exec_ext in '' $ac_executable_extensions; do
3619   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3620     ac_cv_prog_ac_ct_CXX="$ac_prog"
3621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3622     break 2
3623   fi
3624 done
3625   done
3626 IFS=$as_save_IFS
3627
3628 fi
3629 fi
3630 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3631 if test -n "$ac_ct_CXX"; then
3632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3633 $as_echo "$ac_ct_CXX" >&6; }
3634 else
3635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3636 $as_echo "no" >&6; }
3637 fi
3638
3639
3640   test -n "$ac_ct_CXX" && break
3641 done
3642
3643   if test "x$ac_ct_CXX" = x; then
3644     CXX="g++"
3645   else
3646     case $cross_compiling:$ac_tool_warned in
3647 yes:)
3648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3649 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3650 ac_tool_warned=yes ;;
3651 esac
3652     CXX=$ac_ct_CXX
3653   fi
3654 fi
3655
3656   fi
3657 fi
3658 # Provide some information about the compiler.
3659 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3660 set X $ac_compile
3661 ac_compiler=$2
3662 for ac_option in --version -v -V -qversion; do
3663   { { ac_try="$ac_compiler $ac_option >&5"
3664 case "(($ac_try" in
3665   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3666   *) ac_try_echo=$ac_try;;
3667 esac
3668 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3669 $as_echo "$ac_try_echo"; } >&5
3670   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3671   ac_status=$?
3672   if test -s conftest.err; then
3673     sed '10a\
3674 ... rest of stderr output deleted ...
3675          10q' conftest.err >conftest.er1
3676     cat conftest.er1 >&5
3677     rm -f conftest.er1 conftest.err
3678   fi
3679   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3680   test $ac_status = 0; }
3681 done
3682
3683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3684 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3685 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3686   $as_echo_n "(cached) " >&6
3687 else
3688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3689 /* end confdefs.h.  */
3690
3691 int
3692 main ()
3693 {
3694 #ifndef __GNUC__
3695        choke me
3696 #endif
3697
3698   ;
3699   return 0;
3700 }
3701 _ACEOF
3702 if ac_fn_cxx_try_compile "$LINENO"; then :
3703   ac_compiler_gnu=yes
3704 else
3705   ac_compiler_gnu=no
3706 fi
3707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3708 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3709
3710 fi
3711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3712 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3713 if test $ac_compiler_gnu = yes; then
3714   GXX=yes
3715 else
3716   GXX=
3717 fi
3718 ac_test_CXXFLAGS=${CXXFLAGS+set}
3719 ac_save_CXXFLAGS=$CXXFLAGS
3720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3721 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3722 if test "${ac_cv_prog_cxx_g+set}" = set; then :
3723   $as_echo_n "(cached) " >&6
3724 else
3725   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3726    ac_cxx_werror_flag=yes
3727    ac_cv_prog_cxx_g=no
3728    CXXFLAGS="-g"
3729    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3730 /* end confdefs.h.  */
3731
3732 int
3733 main ()
3734 {
3735
3736   ;
3737   return 0;
3738 }
3739 _ACEOF
3740 if ac_fn_cxx_try_compile "$LINENO"; then :
3741   ac_cv_prog_cxx_g=yes
3742 else
3743   CXXFLAGS=""
3744       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3745 /* end confdefs.h.  */
3746
3747 int
3748 main ()
3749 {
3750
3751   ;
3752   return 0;
3753 }
3754 _ACEOF
3755 if ac_fn_cxx_try_compile "$LINENO"; then :
3756
3757 else
3758   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3759          CXXFLAGS="-g"
3760          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3761 /* end confdefs.h.  */
3762
3763 int
3764 main ()
3765 {
3766
3767   ;
3768   return 0;
3769 }
3770 _ACEOF
3771 if ac_fn_cxx_try_compile "$LINENO"; then :
3772   ac_cv_prog_cxx_g=yes
3773 fi
3774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3775 fi
3776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3777 fi
3778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3779    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3780 fi
3781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3782 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3783 if test "$ac_test_CXXFLAGS" = set; then
3784   CXXFLAGS=$ac_save_CXXFLAGS
3785 elif test $ac_cv_prog_cxx_g = yes; then
3786   if test "$GXX" = yes; then
3787     CXXFLAGS="-g -O2"
3788   else
3789     CXXFLAGS="-g"
3790   fi
3791 else
3792   if test "$GXX" = yes; then
3793     CXXFLAGS="-O2"
3794   else
3795     CXXFLAGS=
3796   fi
3797 fi
3798 ac_ext=c
3799 ac_cpp='$CPP $CPPFLAGS'
3800 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3801 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3802 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3803
3804
3805
3806 ac_ext=c
3807 ac_cpp='$CPP $CPPFLAGS'
3808 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3809 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3810 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3812 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3813 # On Suns, sometimes $CPP names a directory.
3814 if test -n "$CPP" && test -d "$CPP"; then
3815   CPP=
3816 fi
3817 if test -z "$CPP"; then
3818   if test "${ac_cv_prog_CPP+set}" = set; then :
3819   $as_echo_n "(cached) " >&6
3820 else
3821       # Double quotes because CPP needs to be expanded
3822     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3823     do
3824       ac_preproc_ok=false
3825 for ac_c_preproc_warn_flag in '' yes
3826 do
3827   # Use a header file that comes with gcc, so configuring glibc
3828   # with a fresh cross-compiler works.
3829   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3830   # <limits.h> exists even on freestanding compilers.
3831   # On the NeXT, cc -E runs the code through the compiler's parser,
3832   # not just through cpp. "Syntax error" is here to catch this case.
3833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3834 /* end confdefs.h.  */
3835 #ifdef __STDC__
3836 # include <limits.h>
3837 #else
3838 # include <assert.h>
3839 #endif
3840                      Syntax error
3841 _ACEOF
3842 if ac_fn_c_try_cpp "$LINENO"; then :
3843
3844 else
3845   # Broken: fails on valid input.
3846 continue
3847 fi
3848 rm -f conftest.err conftest.$ac_ext
3849
3850   # OK, works on sane cases.  Now check whether nonexistent headers
3851   # can be detected and how.
3852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3853 /* end confdefs.h.  */
3854 #include <ac_nonexistent.h>
3855 _ACEOF
3856 if ac_fn_c_try_cpp "$LINENO"; then :
3857   # Broken: success on invalid input.
3858 continue
3859 else
3860   # Passes both tests.
3861 ac_preproc_ok=:
3862 break
3863 fi
3864 rm -f conftest.err conftest.$ac_ext
3865
3866 done
3867 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3868 rm -f conftest.err conftest.$ac_ext
3869 if $ac_preproc_ok; then :
3870   break
3871 fi
3872
3873     done
3874     ac_cv_prog_CPP=$CPP
3875
3876 fi
3877   CPP=$ac_cv_prog_CPP
3878 else
3879   ac_cv_prog_CPP=$CPP
3880 fi
3881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3882 $as_echo "$CPP" >&6; }
3883 ac_preproc_ok=false
3884 for ac_c_preproc_warn_flag in '' yes
3885 do
3886   # Use a header file that comes with gcc, so configuring glibc
3887   # with a fresh cross-compiler works.
3888   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3889   # <limits.h> exists even on freestanding compilers.
3890   # On the NeXT, cc -E runs the code through the compiler's parser,
3891   # not just through cpp. "Syntax error" is here to catch this case.
3892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3893 /* end confdefs.h.  */
3894 #ifdef __STDC__
3895 # include <limits.h>
3896 #else
3897 # include <assert.h>
3898 #endif
3899                      Syntax error
3900 _ACEOF
3901 if ac_fn_c_try_cpp "$LINENO"; then :
3902
3903 else
3904   # Broken: fails on valid input.
3905 continue
3906 fi
3907 rm -f conftest.err conftest.$ac_ext
3908
3909   # OK, works on sane cases.  Now check whether nonexistent headers
3910   # can be detected and how.
3911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3912 /* end confdefs.h.  */
3913 #include <ac_nonexistent.h>
3914 _ACEOF
3915 if ac_fn_c_try_cpp "$LINENO"; then :
3916   # Broken: success on invalid input.
3917 continue
3918 else
3919   # Passes both tests.
3920 ac_preproc_ok=:
3921 break
3922 fi
3923 rm -f conftest.err conftest.$ac_ext
3924
3925 done
3926 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3927 rm -f conftest.err conftest.$ac_ext
3928 if $ac_preproc_ok; then :
3929
3930 else
3931   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3932 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3933 as_fn_error "C preprocessor \"$CPP\" fails sanity check
3934 See \`config.log' for more details." "$LINENO" 5; }
3935 fi
3936
3937 ac_ext=c
3938 ac_cpp='$CPP $CPPFLAGS'
3939 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3940 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3941 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3942
3943
3944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3945 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3946 if test "${ac_cv_path_GREP+set}" = set; then :
3947   $as_echo_n "(cached) " >&6
3948 else
3949   if test -z "$GREP"; then
3950   ac_path_GREP_found=false
3951   # Loop through the user's path and test for each of PROGNAME-LIST
3952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3953 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3954 do
3955   IFS=$as_save_IFS
3956   test -z "$as_dir" && as_dir=.
3957     for ac_prog in grep ggrep; do
3958     for ac_exec_ext in '' $ac_executable_extensions; do
3959       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3960       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3961 # Check for GNU ac_path_GREP and select it if it is found.
3962   # Check for GNU $ac_path_GREP
3963 case `"$ac_path_GREP" --version 2>&1` in
3964 *GNU*)
3965   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3966 *)
3967   ac_count=0
3968   $as_echo_n 0123456789 >"conftest.in"
3969   while :
3970   do
3971     cat "conftest.in" "conftest.in" >"conftest.tmp"
3972     mv "conftest.tmp" "conftest.in"
3973     cp "conftest.in" "conftest.nl"
3974     $as_echo 'GREP' >> "conftest.nl"
3975     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3976     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3977     as_fn_arith $ac_count + 1 && ac_count=$as_val
3978     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3979       # Best one so far, save it but keep looking for a better one
3980       ac_cv_path_GREP="$ac_path_GREP"
3981       ac_path_GREP_max=$ac_count
3982     fi
3983     # 10*(2^10) chars as input seems more than enough
3984     test $ac_count -gt 10 && break
3985   done
3986   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3987 esac
3988
3989       $ac_path_GREP_found && break 3
3990     done
3991   done
3992   done
3993 IFS=$as_save_IFS
3994   if test -z "$ac_cv_path_GREP"; then
3995     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3996   fi
3997 else
3998   ac_cv_path_GREP=$GREP
3999 fi
4000
4001 fi
4002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4003 $as_echo "$ac_cv_path_GREP" >&6; }
4004  GREP="$ac_cv_path_GREP"
4005
4006
4007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4008 $as_echo_n "checking for egrep... " >&6; }
4009 if test "${ac_cv_path_EGREP+set}" = set; then :
4010   $as_echo_n "(cached) " >&6
4011 else
4012   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4013    then ac_cv_path_EGREP="$GREP -E"
4014    else
4015      if test -z "$EGREP"; then
4016   ac_path_EGREP_found=false
4017   # Loop through the user's path and test for each of PROGNAME-LIST
4018   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4019 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4020 do
4021   IFS=$as_save_IFS
4022   test -z "$as_dir" && as_dir=.
4023     for ac_prog in egrep; do
4024     for ac_exec_ext in '' $ac_executable_extensions; do
4025       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4026       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4027 # Check for GNU ac_path_EGREP and select it if it is found.
4028   # Check for GNU $ac_path_EGREP
4029 case `"$ac_path_EGREP" --version 2>&1` in
4030 *GNU*)
4031   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4032 *)
4033   ac_count=0
4034   $as_echo_n 0123456789 >"conftest.in"
4035   while :
4036   do
4037     cat "conftest.in" "conftest.in" >"conftest.tmp"
4038     mv "conftest.tmp" "conftest.in"
4039     cp "conftest.in" "conftest.nl"
4040     $as_echo 'EGREP' >> "conftest.nl"
4041     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4042     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4043     as_fn_arith $ac_count + 1 && ac_count=$as_val
4044     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4045       # Best one so far, save it but keep looking for a better one
4046       ac_cv_path_EGREP="$ac_path_EGREP"
4047       ac_path_EGREP_max=$ac_count
4048     fi
4049     # 10*(2^10) chars as input seems more than enough
4050     test $ac_count -gt 10 && break
4051   done
4052   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4053 esac
4054
4055       $ac_path_EGREP_found && break 3
4056     done
4057   done
4058   done
4059 IFS=$as_save_IFS
4060   if test -z "$ac_cv_path_EGREP"; then
4061     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4062   fi
4063 else
4064   ac_cv_path_EGREP=$EGREP
4065 fi
4066
4067    fi
4068 fi
4069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4070 $as_echo "$ac_cv_path_EGREP" >&6; }
4071  EGREP="$ac_cv_path_EGREP"
4072
4073
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4075 $as_echo_n "checking for ANSI C header files... " >&6; }
4076 if test "${ac_cv_header_stdc+set}" = set; then :
4077   $as_echo_n "(cached) " >&6
4078 else
4079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4080 /* end confdefs.h.  */
4081 #include <stdlib.h>
4082 #include <stdarg.h>
4083 #include <string.h>
4084 #include <float.h>
4085
4086 int
4087 main ()
4088 {
4089
4090   ;
4091   return 0;
4092 }
4093 _ACEOF
4094 if ac_fn_c_try_compile "$LINENO"; then :
4095   ac_cv_header_stdc=yes
4096 else
4097   ac_cv_header_stdc=no
4098 fi
4099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4100
4101 if test $ac_cv_header_stdc = yes; then
4102   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4104 /* end confdefs.h.  */
4105 #include <string.h>
4106
4107 _ACEOF
4108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4109   $EGREP "memchr" >/dev/null 2>&1; then :
4110
4111 else
4112   ac_cv_header_stdc=no
4113 fi
4114 rm -f conftest*
4115
4116 fi
4117
4118 if test $ac_cv_header_stdc = yes; then
4119   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4121 /* end confdefs.h.  */
4122 #include <stdlib.h>
4123
4124 _ACEOF
4125 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4126   $EGREP "free" >/dev/null 2>&1; then :
4127
4128 else
4129   ac_cv_header_stdc=no
4130 fi
4131 rm -f conftest*
4132
4133 fi
4134
4135 if test $ac_cv_header_stdc = yes; then
4136   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4137   if test "$cross_compiling" = yes; then :
4138   :
4139 else
4140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4141 /* end confdefs.h.  */
4142 #include <ctype.h>
4143 #include <stdlib.h>
4144 #if ((' ' & 0x0FF) == 0x020)
4145 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4146 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4147 #else
4148 # define ISLOWER(c) \
4149                    (('a' <= (c) && (c) <= 'i') \
4150                      || ('j' <= (c) && (c) <= 'r') \
4151                      || ('s' <= (c) && (c) <= 'z'))
4152 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4153 #endif
4154
4155 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4156 int
4157 main ()
4158 {
4159   int i;
4160   for (i = 0; i < 256; i++)
4161     if (XOR (islower (i), ISLOWER (i))
4162         || toupper (i) != TOUPPER (i))
4163       return 2;
4164   return 0;
4165 }
4166 _ACEOF
4167 if ac_fn_c_try_run "$LINENO"; then :
4168
4169 else
4170   ac_cv_header_stdc=no
4171 fi
4172 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4173   conftest.$ac_objext conftest.beam conftest.$ac_ext
4174 fi
4175
4176 fi
4177 fi
4178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4179 $as_echo "$ac_cv_header_stdc" >&6; }
4180 if test $ac_cv_header_stdc = yes; then
4181
4182 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4183
4184 fi
4185
4186 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4187 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4188                   inttypes.h stdint.h unistd.h
4189 do :
4190   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4191 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4192 "
4193 eval as_val=\$$as_ac_Header
4194    if test "x$as_val" = x""yes; then :
4195   cat >>confdefs.h <<_ACEOF
4196 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4197 _ACEOF
4198
4199 fi
4200
4201 done
4202
4203
4204
4205   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4206 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4207   MINIX=yes
4208 else
4209   MINIX=
4210 fi
4211
4212
4213   if test "$MINIX" = yes; then
4214
4215 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4216
4217
4218 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4219
4220
4221 $as_echo "#define _MINIX 1" >>confdefs.h
4222
4223   fi
4224
4225
4226   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4227 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4228 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4229   $as_echo_n "(cached) " >&6
4230 else
4231   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4232 /* end confdefs.h.  */
4233
4234 #         define __EXTENSIONS__ 1
4235           $ac_includes_default
4236 int
4237 main ()
4238 {
4239
4240   ;
4241   return 0;
4242 }
4243 _ACEOF
4244 if ac_fn_c_try_compile "$LINENO"; then :
4245   ac_cv_safe_to_define___extensions__=yes
4246 else
4247   ac_cv_safe_to_define___extensions__=no
4248 fi
4249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4250 fi
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4252 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4253   test $ac_cv_safe_to_define___extensions__ = yes &&
4254     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4255
4256   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4257
4258   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4259
4260   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4261
4262   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4263
4264
4265 ac_aux_dir=
4266 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4267   for ac_t in install-sh install.sh shtool; do
4268     if test -f "$ac_dir/$ac_t"; then
4269       ac_aux_dir=$ac_dir
4270       ac_install_sh="$ac_aux_dir/$ac_t -c"
4271       break 2
4272     fi
4273   done
4274 done
4275 if test -z "$ac_aux_dir"; then
4276   as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4277 fi
4278
4279 # These three variables are undocumented and unsupported,
4280 # and are intended to be withdrawn in a future Autoconf release.
4281 # They can cause serious problems if a builder's source tree is in a directory
4282 # whose full name contains unusual characters.
4283 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4284 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4285 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4286
4287
4288 # Make sure we can run config.sub.
4289 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4290   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4291
4292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4293 $as_echo_n "checking build system type... " >&6; }
4294 if test "${ac_cv_build+set}" = set; then :
4295   $as_echo_n "(cached) " >&6
4296 else
4297   ac_build_alias=$build_alias
4298 test "x$ac_build_alias" = x &&
4299   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4300 test "x$ac_build_alias" = x &&
4301   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4302 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4303   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4304
4305 fi
4306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4307 $as_echo "$ac_cv_build" >&6; }
4308 case $ac_cv_build in
4309 *-*-*) ;;
4310 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4311 esac
4312 build=$ac_cv_build
4313 ac_save_IFS=$IFS; IFS='-'
4314 set x $ac_cv_build
4315 shift
4316 build_cpu=$1
4317 build_vendor=$2
4318 shift; shift
4319 # Remember, the first character of IFS is used to create $*,
4320 # except with old shells:
4321 build_os=$*
4322 IFS=$ac_save_IFS
4323 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4324
4325
4326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4327 $as_echo_n "checking host system type... " >&6; }
4328 if test "${ac_cv_host+set}" = set; then :
4329   $as_echo_n "(cached) " >&6
4330 else
4331   if test "x$host_alias" = x; then
4332   ac_cv_host=$ac_cv_build
4333 else
4334   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4335     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4336 fi
4337
4338 fi
4339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4340 $as_echo "$ac_cv_host" >&6; }
4341 case $ac_cv_host in
4342 *-*-*) ;;
4343 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4344 esac
4345 host=$ac_cv_host
4346 ac_save_IFS=$IFS; IFS='-'
4347 set x $ac_cv_host
4348 shift
4349 host_cpu=$1
4350 host_vendor=$2
4351 shift; shift
4352 # Remember, the first character of IFS is used to create $*,
4353 # except with old shells:
4354 host_os=$*
4355 IFS=$ac_save_IFS
4356 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4357
4358
4359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4360 $as_echo_n "checking target system type... " >&6; }
4361 if test "${ac_cv_target+set}" = set; then :
4362   $as_echo_n "(cached) " >&6
4363 else
4364   if test "x$target_alias" = x; then
4365   ac_cv_target=$ac_cv_host
4366 else
4367   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4368     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4369 fi
4370
4371 fi
4372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4373 $as_echo "$ac_cv_target" >&6; }
4374 case $ac_cv_target in
4375 *-*-*) ;;
4376 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4377 esac
4378 target=$ac_cv_target
4379 ac_save_IFS=$IFS; IFS='-'
4380 set x $ac_cv_target
4381 shift
4382 target_cpu=$1
4383 target_vendor=$2
4384 shift; shift
4385 # Remember, the first character of IFS is used to create $*,
4386 # except with old shells:
4387 target_os=$*
4388 IFS=$ac_save_IFS
4389 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4390
4391
4392 # The aliases save the names the user supplied, while $host etc.
4393 # will get canonicalized.
4394 test -n "$target_alias" &&
4395   test "$program_prefix$program_suffix$program_transform_name" = \
4396     NONENONEs,x,x, &&
4397   program_prefix=${target_alias}-
4398
4399 # The tests for host and target for $enable_largefile require
4400 # canonical names.
4401
4402
4403
4404 # As the $enable_largefile decision depends on --enable-plugins we must set it
4405 # even in directories otherwise not depending on the $plugins option.
4406
4407
4408   maybe_plugins=no
4409   for ac_header in dlfcn.h
4410 do :
4411   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4412 "
4413 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4414   cat >>confdefs.h <<_ACEOF
4415 #define HAVE_DLFCN_H 1
4416 _ACEOF
4417  maybe_plugins=yes
4418 fi
4419
4420 done
4421
4422   for ac_header in windows.h
4423 do :
4424   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4425 "
4426 if test "x$ac_cv_header_windows_h" = x""yes; then :
4427   cat >>confdefs.h <<_ACEOF
4428 #define HAVE_WINDOWS_H 1
4429 _ACEOF
4430  maybe_plugins=yes
4431 fi
4432
4433 done
4434
4435
4436   # Check whether --enable-plugins was given.
4437 if test "${enable_plugins+set}" = set; then :
4438   enableval=$enable_plugins; case "${enableval}" in
4439       no) plugins=no ;;
4440       *) plugins=yes
4441          if test "$maybe_plugins" != "yes" ; then
4442            as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4443          fi ;;
4444      esac
4445 else
4446   plugins=$maybe_plugins
4447
4448 fi
4449
4450   if test "$plugins" = "yes"; then
4451     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4452 $as_echo_n "checking for library containing dlopen... " >&6; }
4453 if test "${ac_cv_search_dlopen+set}" = set; then :
4454   $as_echo_n "(cached) " >&6
4455 else
4456   ac_func_search_save_LIBS=$LIBS
4457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4458 /* end confdefs.h.  */
4459
4460 /* Override any GCC internal prototype to avoid an error.
4461    Use char because int might match the return type of a GCC
4462    builtin and then its argument prototype would still apply.  */
4463 #ifdef __cplusplus
4464 extern "C"
4465 #endif
4466 char dlopen ();
4467 int
4468 main ()
4469 {
4470 return dlopen ();
4471   ;
4472   return 0;
4473 }
4474 _ACEOF
4475 for ac_lib in '' dl; do
4476   if test -z "$ac_lib"; then
4477     ac_res="none required"
4478   else
4479     ac_res=-l$ac_lib
4480     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4481   fi
4482   if ac_fn_c_try_link "$LINENO"; then :
4483   ac_cv_search_dlopen=$ac_res
4484 fi
4485 rm -f core conftest.err conftest.$ac_objext \
4486     conftest$ac_exeext
4487   if test "${ac_cv_search_dlopen+set}" = set; then :
4488   break
4489 fi
4490 done
4491 if test "${ac_cv_search_dlopen+set}" = set; then :
4492
4493 else
4494   ac_cv_search_dlopen=no
4495 fi
4496 rm conftest.$ac_ext
4497 LIBS=$ac_func_search_save_LIBS
4498 fi
4499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4500 $as_echo "$ac_cv_search_dlopen" >&6; }
4501 ac_res=$ac_cv_search_dlopen
4502 if test "$ac_res" != no; then :
4503   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4504
4505 fi
4506
4507   fi
4508
4509
4510 case "${host}" in
4511   sparc-*-solaris*|i[3-7]86-*-solaris*)
4512     # On native 32bit sparc and ia32 solaris, large-file and procfs support
4513     # are mutually exclusive; and without procfs support, the bfd/ elf module
4514     # cannot provide certain routines such as elfcore_write_prpsinfo
4515     # or elfcore_write_prstatus.  So unless the user explicitly requested
4516     # large-file support through the --enable-largefile switch, disable
4517     # large-file support in favor of procfs support.
4518     test "${target}" = "${host}" -a "x$plugins" = xno \
4519       && : ${enable_largefile="no"}
4520     ;;
4521 esac
4522
4523 # Check whether --enable-largefile was given.
4524 if test "${enable_largefile+set}" = set; then :
4525   enableval=$enable_largefile;
4526 fi
4527
4528 if test "$enable_largefile" != no; then
4529
4530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4531 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4532 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4533   $as_echo_n "(cached) " >&6
4534 else
4535   ac_cv_sys_largefile_CC=no
4536      if test "$GCC" != yes; then
4537        ac_save_CC=$CC
4538        while :; do
4539          # IRIX 6.2 and later do not support large files by default,
4540          # so use the C compiler's -n32 option if that helps.
4541          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4542 /* end confdefs.h.  */
4543 #include <sys/types.h>
4544  /* Check that off_t can represent 2**63 - 1 correctly.
4545     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4546     since some C++ compilers masquerading as C compilers
4547     incorrectly reject 9223372036854775807.  */
4548 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4549   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4550                        && LARGE_OFF_T % 2147483647 == 1)
4551                       ? 1 : -1];
4552 int
4553 main ()
4554 {
4555
4556   ;
4557   return 0;
4558 }
4559 _ACEOF
4560          if ac_fn_c_try_compile "$LINENO"; then :
4561   break
4562 fi
4563 rm -f core conftest.err conftest.$ac_objext
4564          CC="$CC -n32"
4565          if ac_fn_c_try_compile "$LINENO"; then :
4566   ac_cv_sys_largefile_CC=' -n32'; break
4567 fi
4568 rm -f core conftest.err conftest.$ac_objext
4569          break
4570        done
4571        CC=$ac_save_CC
4572        rm -f conftest.$ac_ext
4573     fi
4574 fi
4575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4576 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4577   if test "$ac_cv_sys_largefile_CC" != no; then
4578     CC=$CC$ac_cv_sys_largefile_CC
4579   fi
4580
4581   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4582 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4583 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4584   $as_echo_n "(cached) " >&6
4585 else
4586   while :; do
4587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4588 /* end confdefs.h.  */
4589 #include <sys/types.h>
4590  /* Check that off_t can represent 2**63 - 1 correctly.
4591     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4592     since some C++ compilers masquerading as C compilers
4593     incorrectly reject 9223372036854775807.  */
4594 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4595   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4596                        && LARGE_OFF_T % 2147483647 == 1)
4597                       ? 1 : -1];
4598 int
4599 main ()
4600 {
4601
4602   ;
4603   return 0;
4604 }
4605 _ACEOF
4606 if ac_fn_c_try_compile "$LINENO"; then :
4607   ac_cv_sys_file_offset_bits=no; break
4608 fi
4609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4610   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611 /* end confdefs.h.  */
4612 #define _FILE_OFFSET_BITS 64
4613 #include <sys/types.h>
4614  /* Check that off_t can represent 2**63 - 1 correctly.
4615     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4616     since some C++ compilers masquerading as C compilers
4617     incorrectly reject 9223372036854775807.  */
4618 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4619   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4620                        && LARGE_OFF_T % 2147483647 == 1)
4621                       ? 1 : -1];
4622 int
4623 main ()
4624 {
4625
4626   ;
4627   return 0;
4628 }
4629 _ACEOF
4630 if ac_fn_c_try_compile "$LINENO"; then :
4631   ac_cv_sys_file_offset_bits=64; break
4632 fi
4633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4634   ac_cv_sys_file_offset_bits=unknown
4635   break
4636 done
4637 fi
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4639 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4640 case $ac_cv_sys_file_offset_bits in #(
4641   no | unknown) ;;
4642   *)
4643 cat >>confdefs.h <<_ACEOF
4644 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4645 _ACEOF
4646 ;;
4647 esac
4648 rm -rf conftest*
4649   if test $ac_cv_sys_file_offset_bits = unknown; then
4650     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4651 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4652 if test "${ac_cv_sys_large_files+set}" = set; then :
4653   $as_echo_n "(cached) " >&6
4654 else
4655   while :; do
4656   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4657 /* end confdefs.h.  */
4658 #include <sys/types.h>
4659  /* Check that off_t can represent 2**63 - 1 correctly.
4660     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4661     since some C++ compilers masquerading as C compilers
4662     incorrectly reject 9223372036854775807.  */
4663 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4664   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4665                        && LARGE_OFF_T % 2147483647 == 1)
4666                       ? 1 : -1];
4667 int
4668 main ()
4669 {
4670
4671   ;
4672   return 0;
4673 }
4674 _ACEOF
4675 if ac_fn_c_try_compile "$LINENO"; then :
4676   ac_cv_sys_large_files=no; break
4677 fi
4678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4680 /* end confdefs.h.  */
4681 #define _LARGE_FILES 1
4682 #include <sys/types.h>
4683  /* Check that off_t can represent 2**63 - 1 correctly.
4684     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4685     since some C++ compilers masquerading as C compilers
4686     incorrectly reject 9223372036854775807.  */
4687 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4688   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4689                        && LARGE_OFF_T % 2147483647 == 1)
4690                       ? 1 : -1];
4691 int
4692 main ()
4693 {
4694
4695   ;
4696   return 0;
4697 }
4698 _ACEOF
4699 if ac_fn_c_try_compile "$LINENO"; then :
4700   ac_cv_sys_large_files=1; break
4701 fi
4702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4703   ac_cv_sys_large_files=unknown
4704   break
4705 done
4706 fi
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4708 $as_echo "$ac_cv_sys_large_files" >&6; }
4709 case $ac_cv_sys_large_files in #(
4710   no | unknown) ;;
4711   *)
4712 cat >>confdefs.h <<_ACEOF
4713 #define _LARGE_FILES $ac_cv_sys_large_files
4714 _ACEOF
4715 ;;
4716 esac
4717 rm -rf conftest*
4718   fi
4719 fi
4720
4721
4722
4723
4724
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4726 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4727 if test "${am_cv_prog_cc_stdc+set}" = set; then :
4728   $as_echo_n "(cached) " >&6
4729 else
4730   am_cv_prog_cc_stdc=no
4731 ac_save_CC="$CC"
4732 # Don't try gcc -ansi; that turns off useful extensions and
4733 # breaks some systems' header files.
4734 # AIX                   -qlanglvl=ansi
4735 # Ultrix and OSF/1      -std1
4736 # HP-UX 10.20 and later -Ae
4737 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4738 # SVR4                  -Xc -D__EXTENSIONS__
4739 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4740 do
4741   CC="$ac_save_CC $ac_arg"
4742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4743 /* end confdefs.h.  */
4744 #include <stdarg.h>
4745 #include <stdio.h>
4746 #include <sys/types.h>
4747 #include <sys/stat.h>
4748 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4749 struct buf { int x; };
4750 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4751 static char *e (p, i)
4752      char **p;
4753      int i;
4754 {
4755   return p[i];
4756 }
4757 static char *f (char * (*g) (char **, int), char **p, ...)
4758 {
4759   char *s;
4760   va_list v;
4761   va_start (v,p);
4762   s = g (p, va_arg (v,int));
4763   va_end (v);
4764   return s;
4765 }
4766 int test (int i, double x);
4767 struct s1 {int (*f) (int a);};
4768 struct s2 {int (*f) (double a);};
4769 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4770 int argc;
4771 char **argv;
4772
4773 int
4774 main ()
4775 {
4776
4777 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4778
4779   ;
4780   return 0;
4781 }
4782 _ACEOF
4783 if ac_fn_c_try_compile "$LINENO"; then :
4784   am_cv_prog_cc_stdc="$ac_arg"; break
4785 fi
4786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4787 done
4788 CC="$ac_save_CC"
4789
4790 fi
4791
4792 if test -z "$am_cv_prog_cc_stdc"; then
4793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4794 $as_echo "none needed" >&6; }
4795 else
4796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4797 $as_echo "$am_cv_prog_cc_stdc" >&6; }
4798 fi
4799 case "x$am_cv_prog_cc_stdc" in
4800   x|xno) ;;
4801   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4802 esac
4803
4804 # expand $ac_aux_dir to an absolute path
4805 am_aux_dir=`cd $ac_aux_dir && pwd`
4806
4807 if test x"${install_sh}" != xset; then
4808   case $am_aux_dir in
4809   *\ * | *\     *)
4810     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4811   *)
4812     install_sh="\${SHELL} $am_aux_dir/install-sh"
4813   esac
4814 fi
4815
4816 # Installed binaries are usually stripped using `strip' when the user
4817 # run `make install-strip'.  However `strip' might not be the right
4818 # tool to use in cross-compilation environments, therefore Automake
4819 # will honor the `STRIP' environment variable to overrule this program.
4820 if test "$cross_compiling" != no; then
4821   if test -n "$ac_tool_prefix"; then
4822   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4823 set dummy ${ac_tool_prefix}strip; ac_word=$2
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825 $as_echo_n "checking for $ac_word... " >&6; }
4826 if test "${ac_cv_prog_STRIP+set}" = set; then :
4827   $as_echo_n "(cached) " >&6
4828 else
4829   if test -n "$STRIP"; then
4830   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4831 else
4832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4833 for as_dir in $PATH
4834 do
4835   IFS=$as_save_IFS
4836   test -z "$as_dir" && as_dir=.
4837     for ac_exec_ext in '' $ac_executable_extensions; do
4838   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4839     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4841     break 2
4842   fi
4843 done
4844   done
4845 IFS=$as_save_IFS
4846
4847 fi
4848 fi
4849 STRIP=$ac_cv_prog_STRIP
4850 if test -n "$STRIP"; then
4851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4852 $as_echo "$STRIP" >&6; }
4853 else
4854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855 $as_echo "no" >&6; }
4856 fi
4857
4858
4859 fi
4860 if test -z "$ac_cv_prog_STRIP"; then
4861   ac_ct_STRIP=$STRIP
4862   # Extract the first word of "strip", so it can be a program name with args.
4863 set dummy strip; ac_word=$2
4864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4865 $as_echo_n "checking for $ac_word... " >&6; }
4866 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4867   $as_echo_n "(cached) " >&6
4868 else
4869   if test -n "$ac_ct_STRIP"; then
4870   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4871 else
4872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4873 for as_dir in $PATH
4874 do
4875   IFS=$as_save_IFS
4876   test -z "$as_dir" && as_dir=.
4877     for ac_exec_ext in '' $ac_executable_extensions; do
4878   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4879     ac_cv_prog_ac_ct_STRIP="strip"
4880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4881     break 2
4882   fi
4883 done
4884   done
4885 IFS=$as_save_IFS
4886
4887 fi
4888 fi
4889 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4890 if test -n "$ac_ct_STRIP"; then
4891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4892 $as_echo "$ac_ct_STRIP" >&6; }
4893 else
4894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895 $as_echo "no" >&6; }
4896 fi
4897
4898   if test "x$ac_ct_STRIP" = x; then
4899     STRIP=":"
4900   else
4901     case $cross_compiling:$ac_tool_warned in
4902 yes:)
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4904 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4905 ac_tool_warned=yes ;;
4906 esac
4907     STRIP=$ac_ct_STRIP
4908   fi
4909 else
4910   STRIP="$ac_cv_prog_STRIP"
4911 fi
4912
4913 fi
4914 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4915
4916
4917 ac_aux_dir=
4918 for ac_dir in .. "$srcdir"/..; do
4919   for ac_t in install-sh install.sh shtool; do
4920     if test -f "$ac_dir/$ac_t"; then
4921       ac_aux_dir=$ac_dir
4922       ac_install_sh="$ac_aux_dir/$ac_t -c"
4923       break 2
4924     fi
4925   done
4926 done
4927 if test -z "$ac_aux_dir"; then
4928   as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
4929 fi
4930
4931 # These three variables are undocumented and unsupported,
4932 # and are intended to be withdrawn in a future Autoconf release.
4933 # They can cause serious problems if a builder's source tree is in a directory
4934 # whose full name contains unusual characters.
4935 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4936 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4937 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4938
4939
4940
4941 test "$program_prefix" != NONE &&
4942   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4943 # Use a double $ so make ignores it.
4944 test "$program_suffix" != NONE &&
4945   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4946 # Double any \ or $.
4947 # By default was `s,x,x', remove it if useless.
4948 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4949 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4950
4951
4952 # We require a C++11 compiler.  Check if one is available, and if
4953 # necessary, set CXX_DIALECT to some -std=xxx switch.
4954
4955       ax_cxx_compile_cxx11_required=true
4956   ac_ext=cpp
4957 ac_cpp='$CXXCPP $CPPFLAGS'
4958 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4959 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4960 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4961   CXX_DIALECT=""
4962   ac_success=no
4963   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4964 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
4965 if test "${ax_cv_cxx_compile_cxx11+set}" = set; then :
4966   $as_echo_n "(cached) " >&6
4967 else
4968   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4969 /* end confdefs.h.  */
4970
4971
4972 // If the compiler admits that it is not ready for C++11, why torture it?
4973 // Hopefully, this will speed up the test.
4974
4975 #ifndef __cplusplus
4976
4977 #error "This is not a C++ compiler"
4978
4979 #elif __cplusplus < 201103L
4980
4981 #error "This is not a C++11 compiler"
4982
4983 #else
4984
4985 namespace cxx11
4986 {
4987
4988   namespace test_static_assert
4989   {
4990
4991     template <typename T>
4992     struct check
4993     {
4994       static_assert(sizeof(int) <= sizeof(T), "not big enough");
4995     };
4996
4997   }
4998
4999   namespace test_final_override
5000   {
5001
5002     struct Base
5003     {
5004       virtual void f() {}
5005     };
5006
5007     struct Derived : public Base
5008     {
5009       virtual void f() override {}
5010     };
5011
5012   }
5013
5014   namespace test_double_right_angle_brackets
5015   {
5016
5017     template < typename T >
5018     struct check {};
5019
5020     typedef check<void> single_type;
5021     typedef check<check<void>> double_type;
5022     typedef check<check<check<void>>> triple_type;
5023     typedef check<check<check<check<void>>>> quadruple_type;
5024
5025   }
5026
5027   namespace test_decltype
5028   {
5029
5030     int
5031     f()
5032     {
5033       int a = 1;
5034       decltype(a) b = 2;
5035       return a + b;
5036     }
5037
5038   }
5039
5040   namespace test_type_deduction
5041   {
5042
5043     template < typename T1, typename T2 >
5044     struct is_same
5045     {
5046       static const bool value = false;
5047     };
5048
5049     template < typename T >
5050     struct is_same<T, T>
5051     {
5052       static const bool value = true;
5053     };
5054
5055     template < typename T1, typename T2 >
5056     auto
5057     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5058     {
5059       return a1 + a2;
5060     }
5061
5062     int
5063     test(const int c, volatile int v)
5064     {
5065       static_assert(is_same<int, decltype(0)>::value == true, "");
5066       static_assert(is_same<int, decltype(c)>::value == false, "");
5067       static_assert(is_same<int, decltype(v)>::value == false, "");
5068       auto ac = c;
5069       auto av = v;
5070       auto sumi = ac + av + 'x';
5071       auto sumf = ac + av + 1.0;
5072       static_assert(is_same<int, decltype(ac)>::value == true, "");
5073       static_assert(is_same<int, decltype(av)>::value == true, "");
5074       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5075       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5076       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5077       return (sumf > 0.0) ? sumi : add(c, v);
5078     }
5079
5080   }
5081
5082   namespace test_noexcept
5083   {
5084
5085     int f() { return 0; }
5086     int g() noexcept { return 0; }
5087
5088     static_assert(noexcept(f()) == false, "");
5089     static_assert(noexcept(g()) == true, "");
5090
5091   }
5092
5093   namespace test_constexpr
5094   {
5095
5096     template < typename CharT >
5097     unsigned long constexpr
5098     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5099     {
5100       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5101     }
5102
5103     template < typename CharT >
5104     unsigned long constexpr
5105     strlen_c(const CharT *const s) noexcept
5106     {
5107       return strlen_c_r(s, 0UL);
5108     }
5109
5110     static_assert(strlen_c("") == 0UL, "");
5111     static_assert(strlen_c("1") == 1UL, "");
5112     static_assert(strlen_c("example") == 7UL, "");
5113     static_assert(strlen_c("another\0example") == 7UL, "");
5114
5115   }
5116
5117   namespace test_rvalue_references
5118   {
5119
5120     template < int N >
5121     struct answer
5122     {
5123       static constexpr int value = N;
5124     };
5125
5126     answer<1> f(int&)       { return answer<1>(); }
5127     answer<2> f(const int&) { return answer<2>(); }
5128     answer<3> f(int&&)      { return answer<3>(); }
5129
5130     void
5131     test()
5132     {
5133       int i = 0;
5134       const int c = 0;
5135       static_assert(decltype(f(i))::value == 1, "");
5136       static_assert(decltype(f(c))::value == 2, "");
5137       static_assert(decltype(f(0))::value == 3, "");
5138     }
5139
5140   }
5141
5142   namespace test_uniform_initialization
5143   {
5144
5145     struct test
5146     {
5147       static const int zero {};
5148       static const int one {1};
5149     };
5150
5151     static_assert(test::zero == 0, "");
5152     static_assert(test::one == 1, "");
5153
5154   }
5155
5156   namespace test_lambdas
5157   {
5158
5159     void
5160     test1()
5161     {
5162       auto lambda1 = [](){};
5163       auto lambda2 = lambda1;
5164       lambda1();
5165       lambda2();
5166     }
5167
5168     int
5169     test2()
5170     {
5171       auto a = [](int i, int j){ return i + j; }(1, 2);
5172       auto b = []() -> int { return '0'; }();
5173       auto c = [=](){ return a + b; }();
5174       auto d = [&](){ return c; }();
5175       auto e = [a, &b](int x) mutable {
5176         const auto identity = [](int y){ return y; };
5177         for (auto i = 0; i < a; ++i)
5178           a += b--;
5179         return x + identity(a + b);
5180       }(0);
5181       return a + b + c + d + e;
5182     }
5183
5184     int
5185     test3()
5186     {
5187       const auto nullary = [](){ return 0; };
5188       const auto unary = [](int x){ return x; };
5189       using nullary_t = decltype(nullary);
5190       using unary_t = decltype(unary);
5191       const auto higher1st = [](nullary_t f){ return f(); };
5192       const auto higher2nd = [unary](nullary_t f1){
5193         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5194       };
5195       return higher1st(nullary) + higher2nd(nullary)(unary);
5196     }
5197
5198   }
5199
5200   namespace test_variadic_templates
5201   {
5202
5203     template <int...>
5204     struct sum;
5205
5206     template <int N0, int... N1toN>
5207     struct sum<N0, N1toN...>
5208     {
5209       static constexpr auto value = N0 + sum<N1toN...>::value;
5210     };
5211
5212     template <>
5213     struct sum<>
5214     {
5215       static constexpr auto value = 0;
5216     };
5217
5218     static_assert(sum<>::value == 0, "");
5219     static_assert(sum<1>::value == 1, "");
5220     static_assert(sum<23>::value == 23, "");
5221     static_assert(sum<1, 2>::value == 3, "");
5222     static_assert(sum<5, 5, 11>::value == 21, "");
5223     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5224
5225   }
5226
5227   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5228   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5229   // because of this.
5230   namespace test_template_alias_sfinae
5231   {
5232
5233     struct foo {};
5234
5235     template<typename T>
5236     using member = typename T::member_type;
5237
5238     template<typename T>
5239     void func(...) {}
5240
5241     template<typename T>
5242     void func(member<T>*) {}
5243
5244     void test();
5245
5246     void test() { func<foo>(0); }
5247
5248   }
5249
5250 }  // namespace cxx11
5251
5252 #endif  // __cplusplus >= 201103L
5253
5254
5255
5256 _ACEOF
5257 if ac_fn_cxx_try_compile "$LINENO"; then :
5258   ax_cv_cxx_compile_cxx11=yes
5259 else
5260   ax_cv_cxx_compile_cxx11=no
5261 fi
5262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5263 fi
5264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5265 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5266   if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5267     ac_success=yes
5268   fi
5269
5270     if test x$ac_success = xno; then
5271     for switch in -std=gnu++11 -std=gnu++0x; do
5272       cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5273       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5274 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5275 if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5276   $as_echo_n "(cached) " >&6
5277 else
5278   ac_save_CXX="$CXX"
5279          CXX="$CXX $switch"
5280          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5281 /* end confdefs.h.  */
5282
5283
5284 // If the compiler admits that it is not ready for C++11, why torture it?
5285 // Hopefully, this will speed up the test.
5286
5287 #ifndef __cplusplus
5288
5289 #error "This is not a C++ compiler"
5290
5291 #elif __cplusplus < 201103L
5292
5293 #error "This is not a C++11 compiler"
5294
5295 #else
5296
5297 namespace cxx11
5298 {
5299
5300   namespace test_static_assert
5301   {
5302
5303     template <typename T>
5304     struct check
5305     {
5306       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5307     };
5308
5309   }
5310
5311   namespace test_final_override
5312   {
5313
5314     struct Base
5315     {
5316       virtual void f() {}
5317     };
5318
5319     struct Derived : public Base
5320     {
5321       virtual void f() override {}
5322     };
5323
5324   }
5325
5326   namespace test_double_right_angle_brackets
5327   {
5328
5329     template < typename T >
5330     struct check {};
5331
5332     typedef check<void> single_type;
5333     typedef check<check<void>> double_type;
5334     typedef check<check<check<void>>> triple_type;
5335     typedef check<check<check<check<void>>>> quadruple_type;
5336
5337   }
5338
5339   namespace test_decltype
5340   {
5341
5342     int
5343     f()
5344     {
5345       int a = 1;
5346       decltype(a) b = 2;
5347       return a + b;
5348     }
5349
5350   }
5351
5352   namespace test_type_deduction
5353   {
5354
5355     template < typename T1, typename T2 >
5356     struct is_same
5357     {
5358       static const bool value = false;
5359     };
5360
5361     template < typename T >
5362     struct is_same<T, T>
5363     {
5364       static const bool value = true;
5365     };
5366
5367     template < typename T1, typename T2 >
5368     auto
5369     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5370     {
5371       return a1 + a2;
5372     }
5373
5374     int
5375     test(const int c, volatile int v)
5376     {
5377       static_assert(is_same<int, decltype(0)>::value == true, "");
5378       static_assert(is_same<int, decltype(c)>::value == false, "");
5379       static_assert(is_same<int, decltype(v)>::value == false, "");
5380       auto ac = c;
5381       auto av = v;
5382       auto sumi = ac + av + 'x';
5383       auto sumf = ac + av + 1.0;
5384       static_assert(is_same<int, decltype(ac)>::value == true, "");
5385       static_assert(is_same<int, decltype(av)>::value == true, "");
5386       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5387       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5388       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5389       return (sumf > 0.0) ? sumi : add(c, v);
5390     }
5391
5392   }
5393
5394   namespace test_noexcept
5395   {
5396
5397     int f() { return 0; }
5398     int g() noexcept { return 0; }
5399
5400     static_assert(noexcept(f()) == false, "");
5401     static_assert(noexcept(g()) == true, "");
5402
5403   }
5404
5405   namespace test_constexpr
5406   {
5407
5408     template < typename CharT >
5409     unsigned long constexpr
5410     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5411     {
5412       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5413     }
5414
5415     template < typename CharT >
5416     unsigned long constexpr
5417     strlen_c(const CharT *const s) noexcept
5418     {
5419       return strlen_c_r(s, 0UL);
5420     }
5421
5422     static_assert(strlen_c("") == 0UL, "");
5423     static_assert(strlen_c("1") == 1UL, "");
5424     static_assert(strlen_c("example") == 7UL, "");
5425     static_assert(strlen_c("another\0example") == 7UL, "");
5426
5427   }
5428
5429   namespace test_rvalue_references
5430   {
5431
5432     template < int N >
5433     struct answer
5434     {
5435       static constexpr int value = N;
5436     };
5437
5438     answer<1> f(int&)       { return answer<1>(); }
5439     answer<2> f(const int&) { return answer<2>(); }
5440     answer<3> f(int&&)      { return answer<3>(); }
5441
5442     void
5443     test()
5444     {
5445       int i = 0;
5446       const int c = 0;
5447       static_assert(decltype(f(i))::value == 1, "");
5448       static_assert(decltype(f(c))::value == 2, "");
5449       static_assert(decltype(f(0))::value == 3, "");
5450     }
5451
5452   }
5453
5454   namespace test_uniform_initialization
5455   {
5456
5457     struct test
5458     {
5459       static const int zero {};
5460       static const int one {1};
5461     };
5462
5463     static_assert(test::zero == 0, "");
5464     static_assert(test::one == 1, "");
5465
5466   }
5467
5468   namespace test_lambdas
5469   {
5470
5471     void
5472     test1()
5473     {
5474       auto lambda1 = [](){};
5475       auto lambda2 = lambda1;
5476       lambda1();
5477       lambda2();
5478     }
5479
5480     int
5481     test2()
5482     {
5483       auto a = [](int i, int j){ return i + j; }(1, 2);
5484       auto b = []() -> int { return '0'; }();
5485       auto c = [=](){ return a + b; }();
5486       auto d = [&](){ return c; }();
5487       auto e = [a, &b](int x) mutable {
5488         const auto identity = [](int y){ return y; };
5489         for (auto i = 0; i < a; ++i)
5490           a += b--;
5491         return x + identity(a + b);
5492       }(0);
5493       return a + b + c + d + e;
5494     }
5495
5496     int
5497     test3()
5498     {
5499       const auto nullary = [](){ return 0; };
5500       const auto unary = [](int x){ return x; };
5501       using nullary_t = decltype(nullary);
5502       using unary_t = decltype(unary);
5503       const auto higher1st = [](nullary_t f){ return f(); };
5504       const auto higher2nd = [unary](nullary_t f1){
5505         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5506       };
5507       return higher1st(nullary) + higher2nd(nullary)(unary);
5508     }
5509
5510   }
5511
5512   namespace test_variadic_templates
5513   {
5514
5515     template <int...>
5516     struct sum;
5517
5518     template <int N0, int... N1toN>
5519     struct sum<N0, N1toN...>
5520     {
5521       static constexpr auto value = N0 + sum<N1toN...>::value;
5522     };
5523
5524     template <>
5525     struct sum<>
5526     {
5527       static constexpr auto value = 0;
5528     };
5529
5530     static_assert(sum<>::value == 0, "");
5531     static_assert(sum<1>::value == 1, "");
5532     static_assert(sum<23>::value == 23, "");
5533     static_assert(sum<1, 2>::value == 3, "");
5534     static_assert(sum<5, 5, 11>::value == 21, "");
5535     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5536
5537   }
5538
5539   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5540   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5541   // because of this.
5542   namespace test_template_alias_sfinae
5543   {
5544
5545     struct foo {};
5546
5547     template<typename T>
5548     using member = typename T::member_type;
5549
5550     template<typename T>
5551     void func(...) {}
5552
5553     template<typename T>
5554     void func(member<T>*) {}
5555
5556     void test();
5557
5558     void test() { func<foo>(0); }
5559
5560   }
5561
5562 }  // namespace cxx11
5563
5564 #endif  // __cplusplus >= 201103L
5565
5566
5567
5568 _ACEOF
5569 if ac_fn_cxx_try_compile "$LINENO"; then :
5570   eval $cachevar=yes
5571 else
5572   eval $cachevar=no
5573 fi
5574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5575          CXX="$ac_save_CXX"
5576 fi
5577 eval ac_res=\$$cachevar
5578                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5579 $as_echo "$ac_res" >&6; }
5580       if eval test x\$$cachevar = xyes; then
5581         CXX_DIALECT="$switch"
5582         ac_success=yes
5583         break
5584       fi
5585     done
5586   fi
5587
5588     if test x$ac_success = xno; then
5589                 for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
5590       cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5591       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5592 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5593 if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5594   $as_echo_n "(cached) " >&6
5595 else
5596   ac_save_CXX="$CXX"
5597          CXX="$CXX $switch"
5598          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5599 /* end confdefs.h.  */
5600
5601
5602 // If the compiler admits that it is not ready for C++11, why torture it?
5603 // Hopefully, this will speed up the test.
5604
5605 #ifndef __cplusplus
5606
5607 #error "This is not a C++ compiler"
5608
5609 #elif __cplusplus < 201103L
5610
5611 #error "This is not a C++11 compiler"
5612
5613 #else
5614
5615 namespace cxx11
5616 {
5617
5618   namespace test_static_assert
5619   {
5620
5621     template <typename T>
5622     struct check
5623     {
5624       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5625     };
5626
5627   }
5628
5629   namespace test_final_override
5630   {
5631
5632     struct Base
5633     {
5634       virtual void f() {}
5635     };
5636
5637     struct Derived : public Base
5638     {
5639       virtual void f() override {}
5640     };
5641
5642   }
5643
5644   namespace test_double_right_angle_brackets
5645   {
5646
5647     template < typename T >
5648     struct check {};
5649
5650     typedef check<void> single_type;
5651     typedef check<check<void>> double_type;
5652     typedef check<check<check<void>>> triple_type;
5653     typedef check<check<check<check<void>>>> quadruple_type;
5654
5655   }
5656
5657   namespace test_decltype
5658   {
5659
5660     int
5661     f()
5662     {
5663       int a = 1;
5664       decltype(a) b = 2;
5665       return a + b;
5666     }
5667
5668   }
5669
5670   namespace test_type_deduction
5671   {
5672
5673     template < typename T1, typename T2 >
5674     struct is_same
5675     {
5676       static const bool value = false;
5677     };
5678
5679     template < typename T >
5680     struct is_same<T, T>
5681     {
5682       static const bool value = true;
5683     };
5684
5685     template < typename T1, typename T2 >
5686     auto
5687     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5688     {
5689       return a1 + a2;
5690     }
5691
5692     int
5693     test(const int c, volatile int v)
5694     {
5695       static_assert(is_same<int, decltype(0)>::value == true, "");
5696       static_assert(is_same<int, decltype(c)>::value == false, "");
5697       static_assert(is_same<int, decltype(v)>::value == false, "");
5698       auto ac = c;
5699       auto av = v;
5700       auto sumi = ac + av + 'x';
5701       auto sumf = ac + av + 1.0;
5702       static_assert(is_same<int, decltype(ac)>::value == true, "");
5703       static_assert(is_same<int, decltype(av)>::value == true, "");
5704       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5705       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5706       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5707       return (sumf > 0.0) ? sumi : add(c, v);
5708     }
5709
5710   }
5711
5712   namespace test_noexcept
5713   {
5714
5715     int f() { return 0; }
5716     int g() noexcept { return 0; }
5717
5718     static_assert(noexcept(f()) == false, "");
5719     static_assert(noexcept(g()) == true, "");
5720
5721   }
5722
5723   namespace test_constexpr
5724   {
5725
5726     template < typename CharT >
5727     unsigned long constexpr
5728     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5729     {
5730       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5731     }
5732
5733     template < typename CharT >
5734     unsigned long constexpr
5735     strlen_c(const CharT *const s) noexcept
5736     {
5737       return strlen_c_r(s, 0UL);
5738     }
5739
5740     static_assert(strlen_c("") == 0UL, "");
5741     static_assert(strlen_c("1") == 1UL, "");
5742     static_assert(strlen_c("example") == 7UL, "");
5743     static_assert(strlen_c("another\0example") == 7UL, "");
5744
5745   }
5746
5747   namespace test_rvalue_references
5748   {
5749
5750     template < int N >
5751     struct answer
5752     {
5753       static constexpr int value = N;
5754     };
5755
5756     answer<1> f(int&)       { return answer<1>(); }
5757     answer<2> f(const int&) { return answer<2>(); }
5758     answer<3> f(int&&)      { return answer<3>(); }
5759
5760     void
5761     test()
5762     {
5763       int i = 0;
5764       const int c = 0;
5765       static_assert(decltype(f(i))::value == 1, "");
5766       static_assert(decltype(f(c))::value == 2, "");
5767       static_assert(decltype(f(0))::value == 3, "");
5768     }
5769
5770   }
5771
5772   namespace test_uniform_initialization
5773   {
5774
5775     struct test
5776     {
5777       static const int zero {};
5778       static const int one {1};
5779     };
5780
5781     static_assert(test::zero == 0, "");
5782     static_assert(test::one == 1, "");
5783
5784   }
5785
5786   namespace test_lambdas
5787   {
5788
5789     void
5790     test1()
5791     {
5792       auto lambda1 = [](){};
5793       auto lambda2 = lambda1;
5794       lambda1();
5795       lambda2();
5796     }
5797
5798     int
5799     test2()
5800     {
5801       auto a = [](int i, int j){ return i + j; }(1, 2);
5802       auto b = []() -> int { return '0'; }();
5803       auto c = [=](){ return a + b; }();
5804       auto d = [&](){ return c; }();
5805       auto e = [a, &b](int x) mutable {
5806         const auto identity = [](int y){ return y; };
5807         for (auto i = 0; i < a; ++i)
5808           a += b--;
5809         return x + identity(a + b);
5810       }(0);
5811       return a + b + c + d + e;
5812     }
5813
5814     int
5815     test3()
5816     {
5817       const auto nullary = [](){ return 0; };
5818       const auto unary = [](int x){ return x; };
5819       using nullary_t = decltype(nullary);
5820       using unary_t = decltype(unary);
5821       const auto higher1st = [](nullary_t f){ return f(); };
5822       const auto higher2nd = [unary](nullary_t f1){
5823         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5824       };
5825       return higher1st(nullary) + higher2nd(nullary)(unary);
5826     }
5827
5828   }
5829
5830   namespace test_variadic_templates
5831   {
5832
5833     template <int...>
5834     struct sum;
5835
5836     template <int N0, int... N1toN>
5837     struct sum<N0, N1toN...>
5838     {
5839       static constexpr auto value = N0 + sum<N1toN...>::value;
5840     };
5841
5842     template <>
5843     struct sum<>
5844     {
5845       static constexpr auto value = 0;
5846     };
5847
5848     static_assert(sum<>::value == 0, "");
5849     static_assert(sum<1>::value == 1, "");
5850     static_assert(sum<23>::value == 23, "");
5851     static_assert(sum<1, 2>::value == 3, "");
5852     static_assert(sum<5, 5, 11>::value == 21, "");
5853     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5854
5855   }
5856
5857   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5858   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5859   // because of this.
5860   namespace test_template_alias_sfinae
5861   {
5862
5863     struct foo {};
5864
5865     template<typename T>
5866     using member = typename T::member_type;
5867
5868     template<typename T>
5869     void func(...) {}
5870
5871     template<typename T>
5872     void func(member<T>*) {}
5873
5874     void test();
5875
5876     void test() { func<foo>(0); }
5877
5878   }
5879
5880 }  // namespace cxx11
5881
5882 #endif  // __cplusplus >= 201103L
5883
5884
5885
5886 _ACEOF
5887 if ac_fn_cxx_try_compile "$LINENO"; then :
5888   eval $cachevar=yes
5889 else
5890   eval $cachevar=no
5891 fi
5892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5893          CXX="$ac_save_CXX"
5894 fi
5895 eval ac_res=\$$cachevar
5896                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5897 $as_echo "$ac_res" >&6; }
5898       if eval test x\$$cachevar = xyes; then
5899         CXX_DIALECT="$switch"
5900         ac_success=yes
5901         break
5902       fi
5903     done
5904   fi
5905   ac_ext=c
5906 ac_cpp='$CPP $CPPFLAGS'
5907 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5908 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5909 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5910
5911   if test x$ax_cxx_compile_cxx11_required = xtrue; then
5912     if test x$ac_success = xno; then
5913       as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5914     fi
5915   fi
5916   if test x$ac_success = xno; then
5917     HAVE_CXX11=0
5918     { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5919 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5920   else
5921     HAVE_CXX11=1
5922
5923 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
5924
5925   fi
5926
5927
5928
5929
5930 # Dependency checking.
5931 rm -rf .tst 2>/dev/null
5932 mkdir .tst 2>/dev/null
5933 if test -d .tst; then
5934   am__leading_dot=.
5935 else
5936   am__leading_dot=_
5937 fi
5938 rmdir .tst 2>/dev/null
5939
5940 DEPDIR="${am__leading_dot}deps"
5941
5942 ac_config_commands="$ac_config_commands depdir"
5943
5944
5945 depcc="$CC"   am_compiler_list=
5946
5947 am_depcomp=$ac_aux_dir/depcomp
5948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5949 $as_echo_n "checking dependency style of $depcc... " >&6; }
5950 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5951   $as_echo_n "(cached) " >&6
5952 else
5953   if test -f "$am_depcomp"; then
5954   # We make a subdir and do the tests there.  Otherwise we can end up
5955   # making bogus files that we don't know about and never remove.  For
5956   # instance it was reported that on HP-UX the gcc test will end up
5957   # making a dummy file named `D' -- because `-MD' means `put the output
5958   # in D'.
5959   mkdir conftest.dir
5960   # Copy depcomp to subdir because otherwise we won't find it if we're
5961   # using a relative directory.
5962   cp "$am_depcomp" conftest.dir
5963   cd conftest.dir
5964   # We will build objects and dependencies in a subdirectory because
5965   # it helps to detect inapplicable dependency modes.  For instance
5966   # both Tru64's cc and ICC support -MD to output dependencies as a
5967   # side effect of compilation, but ICC will put the dependencies in
5968   # the current directory while Tru64 will put them in the object
5969   # directory.
5970   mkdir sub
5971
5972   am_cv_CC_dependencies_compiler_type=none
5973   if test "$am_compiler_list" = ""; then
5974      am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5975   fi
5976   for depmode in $am_compiler_list; do
5977     if test $depmode = none; then break; fi
5978
5979     $as_echo "$as_me:$LINENO: trying $depmode" >&5
5980     # Setup a source with many dependencies, because some compilers
5981     # like to wrap large dependency lists on column 80 (with \), and
5982     # we should not choose a depcomp mode which is confused by this.
5983     #
5984     # We need to recreate these files for each test, as the compiler may
5985     # overwrite some of them when testing with obscure command lines.
5986     # This happens at least with the AIX C compiler.
5987     : > sub/conftest.c
5988     for i in 1 2 3 4 5 6; do
5989       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5990       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5991       # Solaris 8's {/usr,}/bin/sh.
5992       touch sub/conftst$i.h
5993     done
5994     echo "include sub/conftest.Po" > confmf
5995
5996     # We check with `-c' and `-o' for the sake of the "dashmstdout"
5997     # mode.  It turns out that the SunPro C++ compiler does not properly
5998     # handle `-M -o', and we need to detect this.
5999     depcmd="depmode=$depmode \
6000        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6001        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6002        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6003     echo "| $depcmd" | sed -e 's/  */ /g' >&5
6004     if env $depcmd > conftest.err 2>&1 &&
6005        grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6006        grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6007        ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6008       # icc doesn't choke on unknown options, it will just issue warnings
6009       # or remarks (even with -Werror).  So we grep stderr for any message
6010       # that says an option was ignored or not supported.
6011       # When given -MP, icc 7.0 and 7.1 complain thusly:
6012       #   icc: Command line warning: ignoring option '-M'; no argument required
6013       # The diagnosis changed in icc 8.0:
6014       #   icc: Command line remark: option '-MP' not supported
6015       if (grep 'ignoring option' conftest.err ||
6016           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6017         am_cv_CC_dependencies_compiler_type=$depmode
6018         $as_echo "$as_me:$LINENO: success" >&5
6019         break
6020       fi
6021     fi
6022     $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6023     sed -e 's/^/| /' < conftest.err >&5
6024   done
6025
6026   cd ..
6027   rm -rf conftest.dir
6028 else
6029   am_cv_CC_dependencies_compiler_type=none
6030 fi
6031
6032 fi
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6034 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6035 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6036 then as_fn_error "no usable dependency style found" "$LINENO" 5
6037 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6038
6039 fi
6040
6041
6042 gnulib_extra_configure_args=
6043 # If large-file support is disabled, make sure gnulib does the same.
6044 if test "$enable_largefile" = no; then
6045 gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6046 fi
6047
6048 # Configure gnulib.  We need to build gnulib under some other
6049 # directory not "gnulib", to avoid the problem of both GDB and
6050 # GDBserver wanting to build it in the same directory, when building
6051 # in the source dir.
6052
6053   in_src="gnulib"
6054   in_build="build-gnulib"
6055   in_extra_args="$gnulib_extra_configure_args"
6056
6057   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6058   # so they do not pile up.
6059   ac_sub_configure_args=
6060   ac_prev=
6061   eval "set x $ac_configure_args"
6062   shift
6063   for ac_arg
6064   do
6065     if test -n "$ac_prev"; then
6066       ac_prev=
6067       continue
6068     fi
6069     case $ac_arg in
6070     -cache-file | --cache-file | --cache-fil | --cache-fi \
6071     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6072       ac_prev=cache_file ;;
6073     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6074     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6075     | --c=*)
6076       ;;
6077     --config-cache | -C)
6078       ;;
6079     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6080       ac_prev=srcdir ;;
6081     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6082       ;;
6083     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6084       ac_prev=prefix ;;
6085     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6086       ;;
6087     --disable-option-checking)
6088       ;;
6089     *)
6090       case $ac_arg in
6091       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6092       esac
6093       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6094     esac
6095   done
6096
6097   # Always prepend --prefix to ensure using the same prefix
6098   # in subdir configurations.
6099   ac_arg="--prefix=$prefix"
6100   case $ac_arg in
6101   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6102   esac
6103   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6104
6105   # Pass --silent
6106   if test "$silent" = yes; then
6107     ac_sub_configure_args="--silent $ac_sub_configure_args"
6108   fi
6109
6110   # Always prepend --disable-option-checking to silence warnings, since
6111   # different subdirs can have different --enable and --with options.
6112   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6113
6114   ac_popdir=`pwd`
6115   ac_dir=$in_build
6116
6117   ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6118   $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6119   $as_echo "$ac_msg" >&6
6120   as_dir="$ac_dir"; as_fn_mkdir_p
6121
6122   case $srcdir in
6123   [\\/]* | ?:[\\/]* )
6124     ac_srcdir=$srcdir/$in_src ;;
6125   *) # Relative name.
6126     ac_srcdir=../$srcdir/$in_src ;;
6127   esac
6128
6129   cd "$ac_dir"
6130
6131   ac_sub_configure=$ac_srcdir/configure
6132
6133   # Make the cache file name correct relative to the subdirectory.
6134   case $cache_file in
6135   [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6136   *) # Relative name.
6137     ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6138   esac
6139
6140   if test -n "$in_extra_args"; then
6141     # Add the extra args at the end.
6142     ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6143   fi
6144
6145   { $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
6146 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6147   # The eval makes quoting arguments work.
6148   eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6149        --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6150     as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6151
6152   cd "$ac_popdir"
6153
6154
6155
6156 CONFIG_OBS=
6157 CONFIG_DEPS=
6158 CONFIG_SRCS=
6159 ENABLE_CFLAGS=
6160
6161 CONFIG_ALL=
6162 CONFIG_CLEAN=
6163 CONFIG_INSTALL=
6164 CONFIG_UNINSTALL=
6165
6166 # If we haven't got the data from the intl directory,
6167 # assume NLS is disabled.
6168 USE_NLS=no
6169 LIBINTL=
6170 LIBINTL_DEP=
6171 INCINTL=
6172 XGETTEXT=
6173 GMSGFMT=
6174 POSUB=
6175
6176 if test -f  ../intl/config.intl; then
6177   .  ../intl/config.intl
6178 fi
6179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6180 $as_echo_n "checking whether NLS is requested... " >&6; }
6181 if test x"$USE_NLS" != xyes; then
6182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6183 $as_echo "no" >&6; }
6184 else
6185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6186 $as_echo "yes" >&6; }
6187
6188 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6189
6190
6191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6192 $as_echo_n "checking for catalogs to be installed... " >&6; }
6193   # Look for .po and .gmo files in the source directory.
6194   CATALOGS=
6195   XLINGUAS=
6196   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6197     # If there aren't any .gmo files the shell will give us the
6198     # literal string "../path/to/srcdir/po/*.gmo" which has to be
6199     # weeded out.
6200     case "$cat" in *\**)
6201       continue;;
6202     esac
6203     # The quadruple backslash is collapsed to a double backslash
6204     # by the backticks, then collapsed again by the double quotes,
6205     # leaving us with one backslash in the sed expression (right
6206     # before the dot that mustn't act as a wildcard).
6207     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6208     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6209     # The user is allowed to set LINGUAS to a list of languages to
6210     # install catalogs for.  If it's empty that means "all of them."
6211     if test "x$LINGUAS" = x; then
6212       CATALOGS="$CATALOGS $cat"
6213       XLINGUAS="$XLINGUAS $lang"
6214     else
6215       case "$LINGUAS" in *$lang*)
6216         CATALOGS="$CATALOGS $cat"
6217         XLINGUAS="$XLINGUAS $lang"
6218         ;;
6219       esac
6220     fi
6221   done
6222   LINGUAS="$XLINGUAS"
6223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6224 $as_echo "$LINGUAS" >&6; }
6225
6226
6227     DATADIRNAME=share
6228
6229   INSTOBJEXT=.mo
6230
6231   GENCAT=gencat
6232
6233   CATOBJEXT=.gmo
6234
6235 fi
6236
6237 localedir='${datadir}/locale'
6238
6239
6240 if test x"$USE_NLS" = xyes; then
6241    CONFIG_ALL="$CONFIG_ALL all-po"
6242    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6243    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6244    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6245 fi
6246
6247 GNULIB=build-gnulib/import
6248
6249 # For Makefile dependencies.
6250 GNULIB_STDINT_H=
6251 if test x"$STDINT_H" != x; then
6252   GNULIB_STDINT_H=$GNULIB/$STDINT_H
6253 fi
6254
6255
6256 PACKAGE=gdb
6257
6258 cat >>confdefs.h <<_ACEOF
6259 #define PACKAGE "$PACKAGE"
6260 _ACEOF
6261
6262
6263
6264 # We never need to detect it in this sub-configure.
6265 # But preserve it for config.status --recheck.
6266
6267
6268
6269 MAKEINFO_EXTRA_FLAGS=""
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6271 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6272 if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
6273   $as_echo_n "(cached) " >&6
6274 else
6275   echo '@clicksequence{a @click{} b}' >conftest.texinfo
6276   if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6277     gdb_cv_have_makeinfo_click=yes
6278   else
6279     gdb_cv_have_makeinfo_click=no
6280   fi
6281 fi
6282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6283 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6284 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6285   MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6286 fi
6287
6288
6289
6290
6291 # Check whether --with-separate-debug-dir was given.
6292 if test "${with_separate_debug_dir+set}" = set; then :
6293   withval=$with_separate_debug_dir;
6294     DEBUGDIR=$withval
6295 else
6296   DEBUGDIR=${libdir}/debug
6297 fi
6298
6299
6300   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6301   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6302   ac_define_dir=`eval echo $DEBUGDIR`
6303   ac_define_dir=`eval echo $ac_define_dir`
6304
6305 cat >>confdefs.h <<_ACEOF
6306 #define DEBUGDIR "$ac_define_dir"
6307 _ACEOF
6308
6309
6310
6311
6312   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6313      if test "x$prefix" = xNONE; then
6314         test_prefix=/usr/local
6315      else
6316         test_prefix=$prefix
6317      fi
6318   else
6319      test_prefix=$exec_prefix
6320   fi
6321   value=0
6322   case ${ac_define_dir} in
6323      "${test_prefix}"|"${test_prefix}/"*|\
6324         '${exec_prefix}'|'${exec_prefix}/'*)
6325      value=1
6326      ;;
6327   esac
6328
6329 cat >>confdefs.h <<_ACEOF
6330 #define DEBUGDIR_RELOCATABLE $value
6331 _ACEOF
6332
6333
6334
6335
6336 # We can't pass paths as command line arguments.
6337 # Mingw32 tries to be clever and will convert the paths for us.
6338 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6339 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6340 # This breaks GDB's relocatable path conversions since paths passed in
6341 # config.h would not get so translated, the path prefixes no longer match.
6342
6343   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6344   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6345   ac_define_dir=`eval echo $bindir`
6346   ac_define_dir=`eval echo $ac_define_dir`
6347
6348 cat >>confdefs.h <<_ACEOF
6349 #define BINDIR "$ac_define_dir"
6350 _ACEOF
6351
6352
6353
6354 # GDB's datadir relocation
6355
6356
6357
6358 # Check whether --with-gdb-datadir was given.
6359 if test "${with_gdb_datadir+set}" = set; then :
6360   withval=$with_gdb_datadir;
6361     GDB_DATADIR=$withval
6362 else
6363   GDB_DATADIR=${datadir}/gdb
6364 fi
6365
6366
6367   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6368   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6369   ac_define_dir=`eval echo $GDB_DATADIR`
6370   ac_define_dir=`eval echo $ac_define_dir`
6371
6372 cat >>confdefs.h <<_ACEOF
6373 #define GDB_DATADIR "$ac_define_dir"
6374 _ACEOF
6375
6376
6377
6378
6379   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6380      if test "x$prefix" = xNONE; then
6381         test_prefix=/usr/local
6382      else
6383         test_prefix=$prefix
6384      fi
6385   else
6386      test_prefix=$exec_prefix
6387   fi
6388   value=0
6389   case ${ac_define_dir} in
6390      "${test_prefix}"|"${test_prefix}/"*|\
6391         '${exec_prefix}'|'${exec_prefix}/'*)
6392      value=1
6393      ;;
6394   esac
6395
6396 cat >>confdefs.h <<_ACEOF
6397 #define GDB_DATADIR_RELOCATABLE $value
6398 _ACEOF
6399
6400
6401
6402
6403
6404 # Check whether --with-relocated-sources was given.
6405 if test "${with_relocated_sources+set}" = set; then :
6406   withval=$with_relocated_sources; reloc_srcdir="${withval}"
6407
6408   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6409   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6410   ac_define_dir=`eval echo $reloc_srcdir`
6411   ac_define_dir=`eval echo $ac_define_dir`
6412
6413 cat >>confdefs.h <<_ACEOF
6414 #define RELOC_SRCDIR "$ac_define_dir"
6415 _ACEOF
6416
6417
6418
6419 fi
6420
6421
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6423 $as_echo_n "checking for default auto-load directory... " >&6; }
6424
6425 # Check whether --with-auto-load-dir was given.
6426 if test "${with_auto_load_dir+set}" = set; then :
6427   withval=$with_auto_load_dir;
6428 else
6429   with_auto_load_dir='$debugdir:$datadir/auto-load'
6430 fi
6431
6432 escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6433
6434   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6435   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6436   ac_define_dir=`eval echo $escape_dir`
6437   ac_define_dir=`eval echo $ac_define_dir`
6438
6439 cat >>confdefs.h <<_ACEOF
6440 #define AUTO_LOAD_DIR "$ac_define_dir"
6441 _ACEOF
6442
6443
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6445 $as_echo "$with_auto_load_dir" >&6; }
6446
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6448 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6449
6450 # Check whether --with-auto-load-safe-path was given.
6451 if test "${with_auto_load_safe_path+set}" = set; then :
6452   withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6453      with_auto_load_safe_path="/"
6454      fi
6455 else
6456   with_auto_load_safe_path="$with_auto_load_dir"
6457 fi
6458
6459 escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6460
6461   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6462   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6463   ac_define_dir=`eval echo $escape_dir`
6464   ac_define_dir=`eval echo $ac_define_dir`
6465
6466 cat >>confdefs.h <<_ACEOF
6467 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6468 _ACEOF
6469
6470
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6472 $as_echo "$with_auto_load_safe_path" >&6; }
6473
6474
6475
6476 subdirs="$subdirs testsuite"
6477
6478
6479 # Check whether to support alternative target configurations
6480 # Check whether --enable-targets was given.
6481 if test "${enable_targets+set}" = set; then :
6482   enableval=$enable_targets; case "${enableval}" in
6483   yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
6484             ;;
6485   no)       enable_targets= ;;
6486   *)        enable_targets=$enableval ;;
6487 esac
6488 fi
6489
6490
6491 # Check whether to enable 64-bit support on 32-bit hosts
6492 # Check whether --enable-64-bit-bfd was given.
6493 if test "${enable_64_bit_bfd+set}" = set; then :
6494   enableval=$enable_64_bit_bfd; case "${enableval}" in
6495   yes)  want64=true  ;;
6496   no)   want64=false ;;
6497   *)    as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6498 esac
6499 else
6500   want64=false
6501 fi
6502
6503 # Provide defaults for some variables set by the per-host and per-target
6504 # configuration.
6505 gdb_host_obs=posix-hdep.o
6506
6507 if test "${target}" = "${host}"; then
6508   gdb_native=yes
6509 else
6510   gdb_native=no
6511 fi
6512
6513 . $srcdir/configure.host
6514
6515 # Add in the common host objects.
6516 . $srcdir/common/common.host
6517 gdb_host_obs="$gdb_host_obs $common_host_obs"
6518
6519 # Accumulate some settings from configure.tgt over all enabled targets
6520
6521 TARGET_OBS=
6522 all_targets=
6523 HAVE_NATIVE_GCORE_TARGET=
6524
6525 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6526 do
6527   if test "$targ_alias" = "all"; then
6528     all_targets=true
6529   else
6530     # Canonicalize the secondary target names.
6531     result=`$ac_config_sub $targ_alias 2>/dev/null`
6532     if test -n "$result"; then
6533         targ=$result
6534     else
6535         targ=$targ_alias
6536     fi
6537
6538     . ${srcdir}/configure.tgt
6539
6540     if test -z "${gdb_target_obs}"; then :
6541   as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
6542 fi
6543
6544     # Target-specific object files
6545     for i in ${gdb_target_obs}; do
6546         case " $TARGET_OBS " in
6547         *" ${i} "*) ;;
6548         *)
6549           TARGET_OBS="$TARGET_OBS ${i}"
6550           ;;
6551         esac
6552     done
6553
6554     # Check whether this target needs 64-bit CORE_ADDR
6555     if test x${want64} = xfalse; then
6556       . ${srcdir}/../bfd/config.bfd
6557     fi
6558
6559     # Check whether this target is native and supports gcore.
6560     if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6561        && $gdb_have_gcore; then
6562       HAVE_NATIVE_GCORE_TARGET=1
6563     fi
6564   fi
6565 done
6566
6567 if test x${all_targets} = xtrue; then
6568
6569   # We want all 64-bit targets if we either:
6570   #  - run on a 64-bit host  or
6571   #  - already require 64-bit support for some other target  or
6572   #  - the --enable-64-bit-bfd option was supplied
6573   # Otherwise we only support all 32-bit targets.
6574   #
6575   # NOTE: This test must be in sync with the corresponding
6576   #       tests in BFD!
6577
6578   if test x${want64} = xfalse; then
6579     # The cast to long int works around a bug in the HP C Compiler
6580 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6581 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6582 # This bug is HP SR number 8606223364.
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6584 $as_echo_n "checking size of long... " >&6; }
6585 if test "${ac_cv_sizeof_long+set}" = set; then :
6586   $as_echo_n "(cached) " >&6
6587 else
6588   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
6589
6590 else
6591   if test "$ac_cv_type_long" = yes; then
6592      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6593 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6594 { as_fn_set_status 77
6595 as_fn_error "cannot compute sizeof (long)
6596 See \`config.log' for more details." "$LINENO" 5; }; }
6597    else
6598      ac_cv_sizeof_long=0
6599    fi
6600 fi
6601
6602 fi
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6604 $as_echo "$ac_cv_sizeof_long" >&6; }
6605
6606
6607
6608 cat >>confdefs.h <<_ACEOF
6609 #define SIZEOF_LONG $ac_cv_sizeof_long
6610 _ACEOF
6611
6612
6613     if test "x${ac_cv_sizeof_long}" = "x8"; then
6614       want64=true
6615     fi
6616   fi
6617   if test x${want64} = xtrue; then
6618     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6619   else
6620     TARGET_OBS='$(ALL_TARGET_OBS)'
6621   fi
6622 fi
6623
6624
6625
6626
6627 # For other settings, only the main target counts.
6628 gdb_sim=
6629 gdb_osabi=
6630 build_gdbserver=
6631 targ=$target; . ${srcdir}/configure.tgt
6632
6633 # Fetch the default architecture and default target vector from BFD.
6634 targ=$target; . $srcdir/../bfd/config.bfd
6635
6636 # We only want the first architecture, so strip off the others if
6637 # there is more than one.
6638 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6639
6640 if test "x$targ_archs" != x; then
6641
6642 cat >>confdefs.h <<_ACEOF
6643 #define DEFAULT_BFD_ARCH $targ_archs
6644 _ACEOF
6645
6646 fi
6647 if test "x$targ_defvec" != x; then
6648
6649 cat >>confdefs.h <<_ACEOF
6650 #define DEFAULT_BFD_VEC $targ_defvec
6651 _ACEOF
6652
6653 fi
6654
6655 # The CLI cannot be disabled yet, but may be in the future.
6656
6657 # Enable CLI.
6658 # Check whether --enable-gdbcli was given.
6659 if test "${enable_gdbcli+set}" = set; then :
6660   enableval=$enable_gdbcli; case $enableval in
6661     yes)
6662       ;;
6663     no)
6664       as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
6665     *)
6666       as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
6667   esac
6668 else
6669   enable_gdbcli=yes
6670 fi
6671
6672 if test x"$enable_gdbcli" = xyes; then
6673   if test -d $srcdir/cli; then
6674     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6675     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6676     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6677     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6678   fi
6679 fi
6680
6681 # Enable MI.
6682 # Check whether --enable-gdbmi was given.
6683 if test "${enable_gdbmi+set}" = set; then :
6684   enableval=$enable_gdbmi; case $enableval in
6685     yes | no)
6686       ;;
6687     *)
6688       as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6689   esac
6690 else
6691   enable_gdbmi=yes
6692 fi
6693
6694 if test x"$enable_gdbmi" = xyes; then
6695   if test -d $srcdir/mi; then
6696     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6697     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6698     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6699     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6700   fi
6701 fi
6702
6703 # Enable TUI.
6704 # Check whether --enable-tui was given.
6705 if test "${enable_tui+set}" = set; then :
6706   enableval=$enable_tui; case $enableval in
6707     yes | no | auto)
6708       ;;
6709     *)
6710       as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6711   esac
6712 else
6713   enable_tui=auto
6714 fi
6715
6716
6717 # Enable gdbtk.
6718 # Check whether --enable-gdbtk was given.
6719 if test "${enable_gdbtk+set}" = set; then :
6720   enableval=$enable_gdbtk; case $enableval in
6721     yes | no)
6722       ;;
6723     *)
6724       as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6725   esac
6726 else
6727   if test -d $srcdir/gdbtk; then
6728     enable_gdbtk=yes
6729   else
6730     enable_gdbtk=no
6731   fi
6732 fi
6733
6734 # We unconditionally disable gdbtk tests on selected platforms.
6735 case $host_os in
6736   go32* | windows*)
6737     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6738 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6739     enable_gdbtk=no ;;
6740 esac
6741
6742 # Libunwind support for ia64.
6743
6744
6745 # Check whether --with-libunwind-ia64 was given.
6746 if test "${with_libunwind_ia64+set}" = set; then :
6747   withval=$with_libunwind_ia64;
6748 else
6749   with_libunwind_ia64=auto
6750 fi
6751
6752
6753 # Backward compatibility option.
6754 if test "${with_libunwind+set}" = set; then
6755   if test x"$with_libunwind_ia64" != xauto; then
6756     as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6757   fi
6758   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6759 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6760   with_libunwind_ia64="$with_libunwind"
6761 fi
6762
6763 case "$with_libunwind_ia64" in
6764   yes | no)
6765     ;;
6766   auto)
6767     for ac_header in libunwind-ia64.h
6768 do :
6769   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6770 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
6771   cat >>confdefs.h <<_ACEOF
6772 #define HAVE_LIBUNWIND_IA64_H 1
6773 _ACEOF
6774
6775 fi
6776
6777 done
6778
6779     with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6780     ;;
6781   *)
6782     as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6783     ;;
6784 esac
6785
6786 if test x"$with_libunwind_ia64" = xyes; then
6787   for ac_header in libunwind-ia64.h
6788 do :
6789   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6790 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
6791   cat >>confdefs.h <<_ACEOF
6792 #define HAVE_LIBUNWIND_IA64_H 1
6793 _ACEOF
6794
6795 fi
6796
6797 done
6798
6799   if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6800     as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6801   fi
6802   CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6803   CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6804   CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6805 fi
6806
6807 opt_curses=no
6808
6809 # Check whether --with-curses was given.
6810 if test "${with_curses+set}" = set; then :
6811   withval=$with_curses; opt_curses=$withval
6812 fi
6813
6814
6815 prefer_curses=no
6816 if test "$opt_curses" = "yes"; then
6817   prefer_curses=yes
6818 fi
6819
6820 # Profiling support.
6821 # Check whether --enable-profiling was given.
6822 if test "${enable_profiling+set}" = set; then :
6823   enableval=$enable_profiling; case $enableval in
6824     yes | no)
6825       ;;
6826     *)
6827       as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6828   esac
6829 else
6830   enable_profiling=no
6831 fi
6832
6833
6834 for ac_func in monstartup _mcleanup
6835 do :
6836   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6837 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6838 eval as_val=\$$as_ac_var
6839    if test "x$as_val" = x""yes; then :
6840   cat >>confdefs.h <<_ACEOF
6841 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6842 _ACEOF
6843
6844 fi
6845 done
6846
6847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6848 $as_echo_n "checking for _etext... " >&6; }
6849 if test "${ac_cv_var__etext+set}" = set; then :
6850   $as_echo_n "(cached) " >&6
6851 else
6852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6853 /* end confdefs.h.  */
6854 #include <stdlib.h>
6855 extern char _etext;
6856
6857 int
6858 main ()
6859 {
6860 free (&_etext);
6861   ;
6862   return 0;
6863 }
6864 _ACEOF
6865 if ac_fn_c_try_link "$LINENO"; then :
6866   ac_cv_var__etext=yes
6867 else
6868   ac_cv_var__etext=no
6869 fi
6870 rm -f core conftest.err conftest.$ac_objext \
6871     conftest$ac_exeext conftest.$ac_ext
6872 fi
6873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6874 $as_echo "$ac_cv_var__etext" >&6; }
6875 if test $ac_cv_var__etext = yes; then
6876
6877 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
6878
6879 fi
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6881 $as_echo_n "checking for etext... " >&6; }
6882 if test "${ac_cv_var_etext+set}" = set; then :
6883   $as_echo_n "(cached) " >&6
6884 else
6885   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6886 /* end confdefs.h.  */
6887 #include <stdlib.h>
6888 extern char etext;
6889
6890 int
6891 main ()
6892 {
6893 free (&etext);
6894   ;
6895   return 0;
6896 }
6897 _ACEOF
6898 if ac_fn_c_try_link "$LINENO"; then :
6899   ac_cv_var_etext=yes
6900 else
6901   ac_cv_var_etext=no
6902 fi
6903 rm -f core conftest.err conftest.$ac_objext \
6904     conftest$ac_exeext conftest.$ac_ext
6905 fi
6906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6907 $as_echo "$ac_cv_var_etext" >&6; }
6908 if test $ac_cv_var_etext = yes; then
6909
6910 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
6911
6912 fi
6913 if test "$enable_profiling" = yes ; then
6914   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
6915     as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
6916   fi
6917   PROFILE_CFLAGS=-pg
6918   OLD_CFLAGS="$CFLAGS"
6919   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
6920
6921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6922 $as_echo_n "checking whether $CC supports -pg... " >&6; }
6923 if test "${ac_cv_cc_supports_pg+set}" = set; then :
6924   $as_echo_n "(cached) " >&6
6925 else
6926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6927 /* end confdefs.h.  */
6928
6929 int
6930 main ()
6931 {
6932 int x;
6933   ;
6934   return 0;
6935 }
6936 _ACEOF
6937 if ac_fn_c_try_compile "$LINENO"; then :
6938   ac_cv_cc_supports_pg=yes
6939 else
6940   ac_cv_cc_supports_pg=no
6941 fi
6942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6943 fi
6944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6945 $as_echo "$ac_cv_cc_supports_pg" >&6; }
6946
6947   if test $ac_cv_cc_supports_pg = no; then
6948     as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
6949   fi
6950
6951   CFLAGS="$OLD_CFLAGS"
6952 fi
6953
6954
6955
6956 # Check whether --with-pkgversion was given.
6957 if test "${with_pkgversion+set}" = set; then :
6958   withval=$with_pkgversion; case "$withval" in
6959       yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
6960       no)  PKGVERSION= ;;
6961       *)   PKGVERSION="($withval) " ;;
6962      esac
6963 else
6964   PKGVERSION="(GDB) "
6965
6966 fi
6967
6968
6969
6970
6971
6972 # Check whether --with-bugurl was given.
6973 if test "${with_bugurl+set}" = set; then :
6974   withval=$with_bugurl; case "$withval" in
6975       yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
6976       no)  BUGURL=
6977            ;;
6978       *)   BUGURL="$withval"
6979            ;;
6980      esac
6981 else
6982   BUGURL="http://www.gnu.org/software/gdb/bugs/"
6983
6984 fi
6985
6986   case ${BUGURL} in
6987   "")
6988     REPORT_BUGS_TO=
6989     REPORT_BUGS_TEXI=
6990     ;;
6991   *)
6992     REPORT_BUGS_TO="<$BUGURL>"
6993     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6994     ;;
6995   esac;
6996
6997
6998
6999
7000 cat >>confdefs.h <<_ACEOF
7001 #define PKGVERSION "$PKGVERSION"
7002 _ACEOF
7003
7004
7005 cat >>confdefs.h <<_ACEOF
7006 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7007 _ACEOF
7008
7009
7010 # --------------------- #
7011 # Checks for programs.  #
7012 # --------------------- #
7013
7014 for ac_prog in gawk mawk nawk awk
7015 do
7016   # Extract the first word of "$ac_prog", so it can be a program name with args.
7017 set dummy $ac_prog; ac_word=$2
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7019 $as_echo_n "checking for $ac_word... " >&6; }
7020 if test "${ac_cv_prog_AWK+set}" = set; then :
7021   $as_echo_n "(cached) " >&6
7022 else
7023   if test -n "$AWK"; then
7024   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7025 else
7026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7027 for as_dir in $PATH
7028 do
7029   IFS=$as_save_IFS
7030   test -z "$as_dir" && as_dir=.
7031     for ac_exec_ext in '' $ac_executable_extensions; do
7032   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7033     ac_cv_prog_AWK="$ac_prog"
7034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7035     break 2
7036   fi
7037 done
7038   done
7039 IFS=$as_save_IFS
7040
7041 fi
7042 fi
7043 AWK=$ac_cv_prog_AWK
7044 if test -n "$AWK"; then
7045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7046 $as_echo "$AWK" >&6; }
7047 else
7048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7049 $as_echo "no" >&6; }
7050 fi
7051
7052
7053   test -n "$AWK" && break
7054 done
7055
7056 # Find a good install program.  We prefer a C program (faster),
7057 # so one script is as good as another.  But avoid the broken or
7058 # incompatible versions:
7059 # SysV /etc/install, /usr/sbin/install
7060 # SunOS /usr/etc/install
7061 # IRIX /sbin/install
7062 # AIX /bin/install
7063 # AmigaOS /C/install, which installs bootblocks on floppy discs
7064 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7065 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7066 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7067 # OS/2's system install, which has a completely different semantic
7068 # ./install, which can be erroneously created by make from ./install.sh.
7069 # Reject install programs that cannot install multiple files.
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7071 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7072 if test -z "$INSTALL"; then
7073 if test "${ac_cv_path_install+set}" = set; then :
7074   $as_echo_n "(cached) " >&6
7075 else
7076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7077 for as_dir in $PATH
7078 do
7079   IFS=$as_save_IFS
7080   test -z "$as_dir" && as_dir=.
7081     # Account for people who put trailing slashes in PATH elements.
7082 case $as_dir/ in #((
7083   ./ | .// | /[cC]/* | \
7084   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7085   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7086   /usr/ucb/* ) ;;
7087   *)
7088     # OSF1 and SCO ODT 3.0 have their own names for install.
7089     # Don't use installbsd from OSF since it installs stuff as root
7090     # by default.
7091     for ac_prog in ginstall scoinst install; do
7092       for ac_exec_ext in '' $ac_executable_extensions; do
7093         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
7094           if test $ac_prog = install &&
7095             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7096             # AIX install.  It has an incompatible calling convention.
7097             :
7098           elif test $ac_prog = install &&
7099             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7100             # program-specific install script used by HP pwplus--don't use.
7101             :
7102           else
7103             rm -rf conftest.one conftest.two conftest.dir
7104             echo one > conftest.one
7105             echo two > conftest.two
7106             mkdir conftest.dir
7107             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7108               test -s conftest.one && test -s conftest.two &&
7109               test -s conftest.dir/conftest.one &&
7110               test -s conftest.dir/conftest.two
7111             then
7112               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7113               break 3
7114             fi
7115           fi
7116         fi
7117       done
7118     done
7119     ;;
7120 esac
7121
7122   done
7123 IFS=$as_save_IFS
7124
7125 rm -rf conftest.one conftest.two conftest.dir
7126
7127 fi
7128   if test "${ac_cv_path_install+set}" = set; then
7129     INSTALL=$ac_cv_path_install
7130   else
7131     # As a last resort, use the slow shell script.  Don't cache a
7132     # value for INSTALL within a source directory, because that will
7133     # break other packages using the cache if that directory is
7134     # removed, or if the value is a relative name.
7135     INSTALL=$ac_install_sh
7136   fi
7137 fi
7138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7139 $as_echo "$INSTALL" >&6; }
7140
7141 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7142 # It thinks the first close brace ends the variable substitution.
7143 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7144
7145 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7146
7147 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7148
7149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7150 $as_echo_n "checking whether ln -s works... " >&6; }
7151 LN_S=$as_ln_s
7152 if test "$LN_S" = "ln -s"; then
7153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7154 $as_echo "yes" >&6; }
7155 else
7156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7157 $as_echo "no, using $LN_S" >&6; }
7158 fi
7159
7160 if test -n "$ac_tool_prefix"; then
7161   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7162 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7164 $as_echo_n "checking for $ac_word... " >&6; }
7165 if test "${ac_cv_prog_RANLIB+set}" = set; then :
7166   $as_echo_n "(cached) " >&6
7167 else
7168   if test -n "$RANLIB"; then
7169   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7170 else
7171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7172 for as_dir in $PATH
7173 do
7174   IFS=$as_save_IFS
7175   test -z "$as_dir" && as_dir=.
7176     for ac_exec_ext in '' $ac_executable_extensions; do
7177   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7178     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7180     break 2
7181   fi
7182 done
7183   done
7184 IFS=$as_save_IFS
7185
7186 fi
7187 fi
7188 RANLIB=$ac_cv_prog_RANLIB
7189 if test -n "$RANLIB"; then
7190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7191 $as_echo "$RANLIB" >&6; }
7192 else
7193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7194 $as_echo "no" >&6; }
7195 fi
7196
7197
7198 fi
7199 if test -z "$ac_cv_prog_RANLIB"; then
7200   ac_ct_RANLIB=$RANLIB
7201   # Extract the first word of "ranlib", so it can be a program name with args.
7202 set dummy ranlib; ac_word=$2
7203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7204 $as_echo_n "checking for $ac_word... " >&6; }
7205 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7206   $as_echo_n "(cached) " >&6
7207 else
7208   if test -n "$ac_ct_RANLIB"; then
7209   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7210 else
7211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212 for as_dir in $PATH
7213 do
7214   IFS=$as_save_IFS
7215   test -z "$as_dir" && as_dir=.
7216     for ac_exec_ext in '' $ac_executable_extensions; do
7217   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7218     ac_cv_prog_ac_ct_RANLIB="ranlib"
7219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7220     break 2
7221   fi
7222 done
7223   done
7224 IFS=$as_save_IFS
7225
7226 fi
7227 fi
7228 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7229 if test -n "$ac_ct_RANLIB"; then
7230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7231 $as_echo "$ac_ct_RANLIB" >&6; }
7232 else
7233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7234 $as_echo "no" >&6; }
7235 fi
7236
7237   if test "x$ac_ct_RANLIB" = x; then
7238     RANLIB=":"
7239   else
7240     case $cross_compiling:$ac_tool_warned in
7241 yes:)
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7243 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7244 ac_tool_warned=yes ;;
7245 esac
7246     RANLIB=$ac_ct_RANLIB
7247   fi
7248 else
7249   RANLIB="$ac_cv_prog_RANLIB"
7250 fi
7251
7252 for ac_prog in 'bison -y' byacc
7253 do
7254   # Extract the first word of "$ac_prog", so it can be a program name with args.
7255 set dummy $ac_prog; ac_word=$2
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7257 $as_echo_n "checking for $ac_word... " >&6; }
7258 if test "${ac_cv_prog_YACC+set}" = set; then :
7259   $as_echo_n "(cached) " >&6
7260 else
7261   if test -n "$YACC"; then
7262   ac_cv_prog_YACC="$YACC" # Let the user override the test.
7263 else
7264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7265 for as_dir in $PATH
7266 do
7267   IFS=$as_save_IFS
7268   test -z "$as_dir" && as_dir=.
7269     for ac_exec_ext in '' $ac_executable_extensions; do
7270   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7271     ac_cv_prog_YACC="$ac_prog"
7272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7273     break 2
7274   fi
7275 done
7276   done
7277 IFS=$as_save_IFS
7278
7279 fi
7280 fi
7281 YACC=$ac_cv_prog_YACC
7282 if test -n "$YACC"; then
7283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7284 $as_echo "$YACC" >&6; }
7285 else
7286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7287 $as_echo "no" >&6; }
7288 fi
7289
7290
7291   test -n "$YACC" && break
7292 done
7293 test -n "$YACC" || YACC="yacc"
7294
7295
7296 if test -n "$ac_tool_prefix"; then
7297   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7298 set dummy ${ac_tool_prefix}ar; ac_word=$2
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7300 $as_echo_n "checking for $ac_word... " >&6; }
7301 if test "${ac_cv_prog_AR+set}" = set; then :
7302   $as_echo_n "(cached) " >&6
7303 else
7304   if test -n "$AR"; then
7305   ac_cv_prog_AR="$AR" # Let the user override the test.
7306 else
7307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7308 for as_dir in $PATH
7309 do
7310   IFS=$as_save_IFS
7311   test -z "$as_dir" && as_dir=.
7312     for ac_exec_ext in '' $ac_executable_extensions; do
7313   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7314     ac_cv_prog_AR="${ac_tool_prefix}ar"
7315     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7316     break 2
7317   fi
7318 done
7319   done
7320 IFS=$as_save_IFS
7321
7322 fi
7323 fi
7324 AR=$ac_cv_prog_AR
7325 if test -n "$AR"; then
7326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7327 $as_echo "$AR" >&6; }
7328 else
7329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7330 $as_echo "no" >&6; }
7331 fi
7332
7333
7334 fi
7335 if test -z "$ac_cv_prog_AR"; then
7336   ac_ct_AR=$AR
7337   # Extract the first word of "ar", so it can be a program name with args.
7338 set dummy ar; ac_word=$2
7339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7340 $as_echo_n "checking for $ac_word... " >&6; }
7341 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7342   $as_echo_n "(cached) " >&6
7343 else
7344   if test -n "$ac_ct_AR"; then
7345   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7346 else
7347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7348 for as_dir in $PATH
7349 do
7350   IFS=$as_save_IFS
7351   test -z "$as_dir" && as_dir=.
7352     for ac_exec_ext in '' $ac_executable_extensions; do
7353   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7354     ac_cv_prog_ac_ct_AR="ar"
7355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7356     break 2
7357   fi
7358 done
7359   done
7360 IFS=$as_save_IFS
7361
7362 fi
7363 fi
7364 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7365 if test -n "$ac_ct_AR"; then
7366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7367 $as_echo "$ac_ct_AR" >&6; }
7368 else
7369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7370 $as_echo "no" >&6; }
7371 fi
7372
7373   if test "x$ac_ct_AR" = x; then
7374     AR=""
7375   else
7376     case $cross_compiling:$ac_tool_warned in
7377 yes:)
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7379 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7380 ac_tool_warned=yes ;;
7381 esac
7382     AR=$ac_ct_AR
7383   fi
7384 else
7385   AR="$ac_cv_prog_AR"
7386 fi
7387
7388 if test -n "$ac_tool_prefix"; then
7389   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7390 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7392 $as_echo_n "checking for $ac_word... " >&6; }
7393 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7394   $as_echo_n "(cached) " >&6
7395 else
7396   if test -n "$DLLTOOL"; then
7397   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7398 else
7399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7400 for as_dir in $PATH
7401 do
7402   IFS=$as_save_IFS
7403   test -z "$as_dir" && as_dir=.
7404     for ac_exec_ext in '' $ac_executable_extensions; do
7405   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7406     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7408     break 2
7409   fi
7410 done
7411   done
7412 IFS=$as_save_IFS
7413
7414 fi
7415 fi
7416 DLLTOOL=$ac_cv_prog_DLLTOOL
7417 if test -n "$DLLTOOL"; then
7418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7419 $as_echo "$DLLTOOL" >&6; }
7420 else
7421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422 $as_echo "no" >&6; }
7423 fi
7424
7425
7426 fi
7427 if test -z "$ac_cv_prog_DLLTOOL"; then
7428   ac_ct_DLLTOOL=$DLLTOOL
7429   # Extract the first word of "dlltool", so it can be a program name with args.
7430 set dummy dlltool; ac_word=$2
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432 $as_echo_n "checking for $ac_word... " >&6; }
7433 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7434   $as_echo_n "(cached) " >&6
7435 else
7436   if test -n "$ac_ct_DLLTOOL"; then
7437   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7438 else
7439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440 for as_dir in $PATH
7441 do
7442   IFS=$as_save_IFS
7443   test -z "$as_dir" && as_dir=.
7444     for ac_exec_ext in '' $ac_executable_extensions; do
7445   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7446     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7448     break 2
7449   fi
7450 done
7451   done
7452 IFS=$as_save_IFS
7453
7454 fi
7455 fi
7456 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7457 if test -n "$ac_ct_DLLTOOL"; then
7458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7459 $as_echo "$ac_ct_DLLTOOL" >&6; }
7460 else
7461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462 $as_echo "no" >&6; }
7463 fi
7464
7465   if test "x$ac_ct_DLLTOOL" = x; then
7466     DLLTOOL=""
7467   else
7468     case $cross_compiling:$ac_tool_warned in
7469 yes:)
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7471 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7472 ac_tool_warned=yes ;;
7473 esac
7474     DLLTOOL=$ac_ct_DLLTOOL
7475   fi
7476 else
7477   DLLTOOL="$ac_cv_prog_DLLTOOL"
7478 fi
7479
7480 if test -n "$ac_tool_prefix"; then
7481   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7482 set dummy ${ac_tool_prefix}windres; ac_word=$2
7483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7484 $as_echo_n "checking for $ac_word... " >&6; }
7485 if test "${ac_cv_prog_WINDRES+set}" = set; then :
7486   $as_echo_n "(cached) " >&6
7487 else
7488   if test -n "$WINDRES"; then
7489   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7490 else
7491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7492 for as_dir in $PATH
7493 do
7494   IFS=$as_save_IFS
7495   test -z "$as_dir" && as_dir=.
7496     for ac_exec_ext in '' $ac_executable_extensions; do
7497   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7498     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7500     break 2
7501   fi
7502 done
7503   done
7504 IFS=$as_save_IFS
7505
7506 fi
7507 fi
7508 WINDRES=$ac_cv_prog_WINDRES
7509 if test -n "$WINDRES"; then
7510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7511 $as_echo "$WINDRES" >&6; }
7512 else
7513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7514 $as_echo "no" >&6; }
7515 fi
7516
7517
7518 fi
7519 if test -z "$ac_cv_prog_WINDRES"; then
7520   ac_ct_WINDRES=$WINDRES
7521   # Extract the first word of "windres", so it can be a program name with args.
7522 set dummy windres; ac_word=$2
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524 $as_echo_n "checking for $ac_word... " >&6; }
7525 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7526   $as_echo_n "(cached) " >&6
7527 else
7528   if test -n "$ac_ct_WINDRES"; then
7529   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7530 else
7531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7532 for as_dir in $PATH
7533 do
7534   IFS=$as_save_IFS
7535   test -z "$as_dir" && as_dir=.
7536     for ac_exec_ext in '' $ac_executable_extensions; do
7537   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7538     ac_cv_prog_ac_ct_WINDRES="windres"
7539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7540     break 2
7541   fi
7542 done
7543   done
7544 IFS=$as_save_IFS
7545
7546 fi
7547 fi
7548 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7549 if test -n "$ac_ct_WINDRES"; then
7550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7551 $as_echo "$ac_ct_WINDRES" >&6; }
7552 else
7553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554 $as_echo "no" >&6; }
7555 fi
7556
7557   if test "x$ac_ct_WINDRES" = x; then
7558     WINDRES=""
7559   else
7560     case $cross_compiling:$ac_tool_warned in
7561 yes:)
7562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7563 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7564 ac_tool_warned=yes ;;
7565 esac
7566     WINDRES=$ac_ct_WINDRES
7567   fi
7568 else
7569   WINDRES="$ac_cv_prog_WINDRES"
7570 fi
7571
7572
7573 case $host_os in
7574   gnu*)
7575     # Needed for GNU Hurd hosts.
7576     if test -n "$ac_tool_prefix"; then
7577   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7578 set dummy ${ac_tool_prefix}mig; ac_word=$2
7579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7580 $as_echo_n "checking for $ac_word... " >&6; }
7581 if test "${ac_cv_prog_MIG+set}" = set; then :
7582   $as_echo_n "(cached) " >&6
7583 else
7584   if test -n "$MIG"; then
7585   ac_cv_prog_MIG="$MIG" # Let the user override the test.
7586 else
7587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588 for as_dir in $PATH
7589 do
7590   IFS=$as_save_IFS
7591   test -z "$as_dir" && as_dir=.
7592     for ac_exec_ext in '' $ac_executable_extensions; do
7593   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7594     ac_cv_prog_MIG="${ac_tool_prefix}mig"
7595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7596     break 2
7597   fi
7598 done
7599   done
7600 IFS=$as_save_IFS
7601
7602 fi
7603 fi
7604 MIG=$ac_cv_prog_MIG
7605 if test -n "$MIG"; then
7606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7607 $as_echo "$MIG" >&6; }
7608 else
7609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7610 $as_echo "no" >&6; }
7611 fi
7612
7613
7614 fi
7615 if test -z "$ac_cv_prog_MIG"; then
7616   ac_ct_MIG=$MIG
7617   # Extract the first word of "mig", so it can be a program name with args.
7618 set dummy mig; ac_word=$2
7619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7620 $as_echo_n "checking for $ac_word... " >&6; }
7621 if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7622   $as_echo_n "(cached) " >&6
7623 else
7624   if test -n "$ac_ct_MIG"; then
7625   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7626 else
7627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7628 for as_dir in $PATH
7629 do
7630   IFS=$as_save_IFS
7631   test -z "$as_dir" && as_dir=.
7632     for ac_exec_ext in '' $ac_executable_extensions; do
7633   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7634     ac_cv_prog_ac_ct_MIG="mig"
7635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7636     break 2
7637   fi
7638 done
7639   done
7640 IFS=$as_save_IFS
7641
7642 fi
7643 fi
7644 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7645 if test -n "$ac_ct_MIG"; then
7646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7647 $as_echo "$ac_ct_MIG" >&6; }
7648 else
7649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7650 $as_echo "no" >&6; }
7651 fi
7652
7653   if test "x$ac_ct_MIG" = x; then
7654     MIG=""
7655   else
7656     case $cross_compiling:$ac_tool_warned in
7657 yes:)
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7659 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7660 ac_tool_warned=yes ;;
7661 esac
7662     MIG=$ac_ct_MIG
7663   fi
7664 else
7665   MIG="$ac_cv_prog_MIG"
7666 fi
7667
7668     if test x"$MIG" = x; then
7669       as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
7670     fi
7671     ;;
7672 esac
7673
7674 # ---------------------- #
7675 # Checks for libraries.  #
7676 # ---------------------- #
7677
7678 # We might need to link with -lm; most simulators need it.
7679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7680 $as_echo_n "checking for main in -lm... " >&6; }
7681 if test "${ac_cv_lib_m_main+set}" = set; then :
7682   $as_echo_n "(cached) " >&6
7683 else
7684   ac_check_lib_save_LIBS=$LIBS
7685 LIBS="-lm  $LIBS"
7686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7687 /* end confdefs.h.  */
7688
7689
7690 int
7691 main ()
7692 {
7693 return main ();
7694   ;
7695   return 0;
7696 }
7697 _ACEOF
7698 if ac_fn_c_try_link "$LINENO"; then :
7699   ac_cv_lib_m_main=yes
7700 else
7701   ac_cv_lib_m_main=no
7702 fi
7703 rm -f core conftest.err conftest.$ac_objext \
7704     conftest$ac_exeext conftest.$ac_ext
7705 LIBS=$ac_check_lib_save_LIBS
7706 fi
7707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7708 $as_echo "$ac_cv_lib_m_main" >&6; }
7709 if test "x$ac_cv_lib_m_main" = x""yes; then :
7710   cat >>confdefs.h <<_ACEOF
7711 #define HAVE_LIBM 1
7712 _ACEOF
7713
7714   LIBS="-lm $LIBS"
7715
7716 fi
7717
7718
7719 # We need to link with -lw to get `wctype' on Solaris before Solaris
7720 # 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
7721 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
7722 # is known to have this problem).  Therefore we avoid libw if we can.
7723 ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
7724 if test "x$ac_cv_func_wctype" = x""yes; then :
7725
7726 else
7727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
7728 $as_echo_n "checking for wctype in -lw... " >&6; }
7729 if test "${ac_cv_lib_w_wctype+set}" = set; then :
7730   $as_echo_n "(cached) " >&6
7731 else
7732   ac_check_lib_save_LIBS=$LIBS
7733 LIBS="-lw  $LIBS"
7734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7735 /* end confdefs.h.  */
7736
7737 /* Override any GCC internal prototype to avoid an error.
7738    Use char because int might match the return type of a GCC
7739    builtin and then its argument prototype would still apply.  */
7740 #ifdef __cplusplus
7741 extern "C"
7742 #endif
7743 char wctype ();
7744 int
7745 main ()
7746 {
7747 return wctype ();
7748   ;
7749   return 0;
7750 }
7751 _ACEOF
7752 if ac_fn_c_try_link "$LINENO"; then :
7753   ac_cv_lib_w_wctype=yes
7754 else
7755   ac_cv_lib_w_wctype=no
7756 fi
7757 rm -f core conftest.err conftest.$ac_objext \
7758     conftest$ac_exeext conftest.$ac_ext
7759 LIBS=$ac_check_lib_save_LIBS
7760 fi
7761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
7762 $as_echo "$ac_cv_lib_w_wctype" >&6; }
7763 if test "x$ac_cv_lib_w_wctype" = x""yes; then :
7764   cat >>confdefs.h <<_ACEOF
7765 #define HAVE_LIBW 1
7766 _ACEOF
7767
7768   LIBS="-lw $LIBS"
7769
7770 fi
7771
7772 fi
7773
7774
7775 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7777 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7778 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7779   $as_echo_n "(cached) " >&6
7780 else
7781   ac_func_search_save_LIBS=$LIBS
7782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7783 /* end confdefs.h.  */
7784
7785 /* Override any GCC internal prototype to avoid an error.
7786    Use char because int might match the return type of a GCC
7787    builtin and then its argument prototype would still apply.  */
7788 #ifdef __cplusplus
7789 extern "C"
7790 #endif
7791 char gethostbyname ();
7792 int
7793 main ()
7794 {
7795 return gethostbyname ();
7796   ;
7797   return 0;
7798 }
7799 _ACEOF
7800 for ac_lib in '' nsl; do
7801   if test -z "$ac_lib"; then
7802     ac_res="none required"
7803   else
7804     ac_res=-l$ac_lib
7805     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7806   fi
7807   if ac_fn_c_try_link "$LINENO"; then :
7808   ac_cv_search_gethostbyname=$ac_res
7809 fi
7810 rm -f core conftest.err conftest.$ac_objext \
7811     conftest$ac_exeext
7812   if test "${ac_cv_search_gethostbyname+set}" = set; then :
7813   break
7814 fi
7815 done
7816 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7817
7818 else
7819   ac_cv_search_gethostbyname=no
7820 fi
7821 rm conftest.$ac_ext
7822 LIBS=$ac_func_search_save_LIBS
7823 fi
7824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7825 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7826 ac_res=$ac_cv_search_gethostbyname
7827 if test "$ac_res" != no; then :
7828   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7829
7830 fi
7831
7832
7833 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7835 $as_echo_n "checking for library containing socketpair... " >&6; }
7836 if test "${ac_cv_search_socketpair+set}" = set; then :
7837   $as_echo_n "(cached) " >&6
7838 else
7839   ac_func_search_save_LIBS=$LIBS
7840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7841 /* end confdefs.h.  */
7842
7843 /* Override any GCC internal prototype to avoid an error.
7844    Use char because int might match the return type of a GCC
7845    builtin and then its argument prototype would still apply.  */
7846 #ifdef __cplusplus
7847 extern "C"
7848 #endif
7849 char socketpair ();
7850 int
7851 main ()
7852 {
7853 return socketpair ();
7854   ;
7855   return 0;
7856 }
7857 _ACEOF
7858 for ac_lib in '' socket; do
7859   if test -z "$ac_lib"; then
7860     ac_res="none required"
7861   else
7862     ac_res=-l$ac_lib
7863     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7864   fi
7865   if ac_fn_c_try_link "$LINENO"; then :
7866   ac_cv_search_socketpair=$ac_res
7867 fi
7868 rm -f core conftest.err conftest.$ac_objext \
7869     conftest$ac_exeext
7870   if test "${ac_cv_search_socketpair+set}" = set; then :
7871   break
7872 fi
7873 done
7874 if test "${ac_cv_search_socketpair+set}" = set; then :
7875
7876 else
7877   ac_cv_search_socketpair=no
7878 fi
7879 rm conftest.$ac_ext
7880 LIBS=$ac_func_search_save_LIBS
7881 fi
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7883 $as_echo "$ac_cv_search_socketpair" >&6; }
7884 ac_res=$ac_cv_search_socketpair
7885 if test "$ac_res" != no; then :
7886   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7887
7888 fi
7889
7890
7891 # Link in zlib if we can.  This allows us to read compressed debug sections.
7892
7893   # Use the system's zlib library.
7894   zlibdir="-L\$(top_builddir)/../zlib"
7895   zlibinc="-I\$(top_srcdir)/../zlib"
7896
7897 # Check whether --with-system-zlib was given.
7898 if test "${with_system_zlib+set}" = set; then :
7899   withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7900     zlibdir=
7901     zlibinc=
7902   fi
7903
7904 fi
7905
7906
7907
7908
7909
7910 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7911 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7913 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7914 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7915   $as_echo_n "(cached) " >&6
7916 else
7917   ac_func_search_save_LIBS=$LIBS
7918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7919 /* end confdefs.h.  */
7920
7921 /* Override any GCC internal prototype to avoid an error.
7922    Use char because int might match the return type of a GCC
7923    builtin and then its argument prototype would still apply.  */
7924 #ifdef __cplusplus
7925 extern "C"
7926 #endif
7927 char kinfo_getvmmap ();
7928 int
7929 main ()
7930 {
7931 return kinfo_getvmmap ();
7932   ;
7933   return 0;
7934 }
7935 _ACEOF
7936 for ac_lib in '' util util-freebsd; do
7937   if test -z "$ac_lib"; then
7938     ac_res="none required"
7939   else
7940     ac_res=-l$ac_lib
7941     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7942   fi
7943   if ac_fn_c_try_link "$LINENO"; then :
7944   ac_cv_search_kinfo_getvmmap=$ac_res
7945 fi
7946 rm -f core conftest.err conftest.$ac_objext \
7947     conftest$ac_exeext
7948   if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7949   break
7950 fi
7951 done
7952 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7953
7954 else
7955   ac_cv_search_kinfo_getvmmap=no
7956 fi
7957 rm conftest.$ac_ext
7958 LIBS=$ac_func_search_save_LIBS
7959 fi
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7961 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7962 ac_res=$ac_cv_search_kinfo_getvmmap
7963 if test "$ac_res" != no; then :
7964   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7965
7966 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7967
7968 fi
7969
7970
7971
7972       if test "X$prefix" = "XNONE"; then
7973     acl_final_prefix="$ac_default_prefix"
7974   else
7975     acl_final_prefix="$prefix"
7976   fi
7977   if test "X$exec_prefix" = "XNONE"; then
7978     acl_final_exec_prefix='${prefix}'
7979   else
7980     acl_final_exec_prefix="$exec_prefix"
7981   fi
7982   acl_save_prefix="$prefix"
7983   prefix="$acl_final_prefix"
7984   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7985   prefix="$acl_save_prefix"
7986
7987
7988 # Check whether --with-gnu-ld was given.
7989 if test "${with_gnu_ld+set}" = set; then :
7990   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7991 else
7992   with_gnu_ld=no
7993 fi
7994
7995 # Prepare PATH_SEPARATOR.
7996 # The user is always right.
7997 if test "${PATH_SEPARATOR+set}" != set; then
7998   echo "#! /bin/sh" >conf$$.sh
7999   echo  "exit 0"   >>conf$$.sh
8000   chmod +x conf$$.sh
8001   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8002     PATH_SEPARATOR=';'
8003   else
8004     PATH_SEPARATOR=:
8005   fi
8006   rm -f conf$$.sh
8007 fi
8008 ac_prog=ld
8009 if test "$GCC" = yes; then
8010   # Check if gcc -print-prog-name=ld gives a path.
8011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8012 $as_echo_n "checking for ld used by GCC... " >&6; }
8013   case $host in
8014   *-*-mingw*)
8015     # gcc leaves a trailing carriage return which upsets mingw
8016     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8017   *)
8018     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8019   esac
8020   case $ac_prog in
8021     # Accept absolute paths.
8022     [\\/]* | [A-Za-z]:[\\/]*)
8023       re_direlt='/[^/][^/]*/\.\./'
8024       # Canonicalize the path of ld
8025       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8026       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8027         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8028       done
8029       test -z "$LD" && LD="$ac_prog"
8030       ;;
8031   "")
8032     # If it fails, then pretend we aren't using GCC.
8033     ac_prog=ld
8034     ;;
8035   *)
8036     # If it is relative, then search for the first ld in PATH.
8037     with_gnu_ld=unknown
8038     ;;
8039   esac
8040 elif test "$with_gnu_ld" = yes; then
8041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8042 $as_echo_n "checking for GNU ld... " >&6; }
8043 else
8044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8045 $as_echo_n "checking for non-GNU ld... " >&6; }
8046 fi
8047 if test "${acl_cv_path_LD+set}" = set; then :
8048   $as_echo_n "(cached) " >&6
8049 else
8050   if test -z "$LD"; then
8051   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8052   for ac_dir in $PATH; do
8053     test -z "$ac_dir" && ac_dir=.
8054     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8055       acl_cv_path_LD="$ac_dir/$ac_prog"
8056       # Check to see if the program is GNU ld.  I'd rather use --version,
8057       # but apparently some GNU ld's only accept -v.
8058       # Break only if it was the GNU/non-GNU ld that we prefer.
8059       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8060         test "$with_gnu_ld" != no && break
8061       else
8062         test "$with_gnu_ld" != yes && break
8063       fi
8064     fi
8065   done
8066   IFS="$ac_save_ifs"
8067 else
8068   acl_cv_path_LD="$LD" # Let the user override the test with a path.
8069 fi
8070 fi
8071
8072 LD="$acl_cv_path_LD"
8073 if test -n "$LD"; then
8074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8075 $as_echo "$LD" >&6; }
8076 else
8077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8078 $as_echo "no" >&6; }
8079 fi
8080 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8082 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8083 if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8084   $as_echo_n "(cached) " >&6
8085 else
8086   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8087 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8088   acl_cv_prog_gnu_ld=yes
8089 else
8090   acl_cv_prog_gnu_ld=no
8091 fi
8092 fi
8093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8094 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8095 with_gnu_ld=$acl_cv_prog_gnu_ld
8096
8097
8098
8099                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8100 $as_echo_n "checking for shared library run path origin... " >&6; }
8101 if test "${acl_cv_rpath+set}" = set; then :
8102   $as_echo_n "(cached) " >&6
8103 else
8104
8105     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8106     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8107     . ./conftest.sh
8108     rm -f ./conftest.sh
8109     acl_cv_rpath=done
8110
8111 fi
8112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8113 $as_echo "$acl_cv_rpath" >&6; }
8114   wl="$acl_cv_wl"
8115   libext="$acl_cv_libext"
8116   shlibext="$acl_cv_shlibext"
8117   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8118   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8119   hardcode_direct="$acl_cv_hardcode_direct"
8120   hardcode_minus_L="$acl_cv_hardcode_minus_L"
8121     # Check whether --enable-rpath was given.
8122 if test "${enable_rpath+set}" = set; then :
8123   enableval=$enable_rpath; :
8124 else
8125   enable_rpath=yes
8126 fi
8127
8128
8129
8130
8131
8132
8133
8134
8135     use_additional=yes
8136
8137   acl_save_prefix="$prefix"
8138   prefix="$acl_final_prefix"
8139   acl_save_exec_prefix="$exec_prefix"
8140   exec_prefix="$acl_final_exec_prefix"
8141
8142     eval additional_includedir=\"$includedir\"
8143     eval additional_libdir=\"$libdir\"
8144
8145   exec_prefix="$acl_save_exec_prefix"
8146   prefix="$acl_save_prefix"
8147
8148
8149 # Check whether --with-libiconv-prefix was given.
8150 if test "${with_libiconv_prefix+set}" = set; then :
8151   withval=$with_libiconv_prefix;
8152     if test "X$withval" = "Xno"; then
8153       use_additional=no
8154     else
8155       if test "X$withval" = "X"; then
8156
8157   acl_save_prefix="$prefix"
8158   prefix="$acl_final_prefix"
8159   acl_save_exec_prefix="$exec_prefix"
8160   exec_prefix="$acl_final_exec_prefix"
8161
8162           eval additional_includedir=\"$includedir\"
8163           eval additional_libdir=\"$libdir\"
8164
8165   exec_prefix="$acl_save_exec_prefix"
8166   prefix="$acl_save_prefix"
8167
8168       else
8169         additional_includedir="$withval/include"
8170         additional_libdir="$withval/lib"
8171       fi
8172     fi
8173
8174 fi
8175
8176       LIBICONV=
8177   LTLIBICONV=
8178   INCICONV=
8179   rpathdirs=
8180   ltrpathdirs=
8181   names_already_handled=
8182   names_next_round='iconv '
8183   while test -n "$names_next_round"; do
8184     names_this_round="$names_next_round"
8185     names_next_round=
8186     for name in $names_this_round; do
8187       already_handled=
8188       for n in $names_already_handled; do
8189         if test "$n" = "$name"; then
8190           already_handled=yes
8191           break
8192         fi
8193       done
8194       if test -z "$already_handled"; then
8195         names_already_handled="$names_already_handled $name"
8196                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8197         eval value=\"\$HAVE_LIB$uppername\"
8198         if test -n "$value"; then
8199           if test "$value" = yes; then
8200             eval value=\"\$LIB$uppername\"
8201             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8202             eval value=\"\$LTLIB$uppername\"
8203             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8204           else
8205                                     :
8206           fi
8207         else
8208                               found_dir=
8209           found_la=
8210           found_so=
8211           found_a=
8212           if test $use_additional = yes; then
8213             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8214               found_dir="$additional_libdir"
8215               found_so="$additional_libdir/lib$name.$shlibext"
8216               if test -f "$additional_libdir/lib$name.la"; then
8217                 found_la="$additional_libdir/lib$name.la"
8218               fi
8219             else
8220               if test -f "$additional_libdir/lib$name.$libext"; then
8221                 found_dir="$additional_libdir"
8222                 found_a="$additional_libdir/lib$name.$libext"
8223                 if test -f "$additional_libdir/lib$name.la"; then
8224                   found_la="$additional_libdir/lib$name.la"
8225                 fi
8226               fi
8227             fi
8228           fi
8229           if test "X$found_dir" = "X"; then
8230             for x in $LDFLAGS $LTLIBICONV; do
8231
8232   acl_save_prefix="$prefix"
8233   prefix="$acl_final_prefix"
8234   acl_save_exec_prefix="$exec_prefix"
8235   exec_prefix="$acl_final_exec_prefix"
8236   eval x=\"$x\"
8237   exec_prefix="$acl_save_exec_prefix"
8238   prefix="$acl_save_prefix"
8239
8240               case "$x" in
8241                 -L*)
8242                   dir=`echo "X$x" | sed -e 's/^X-L//'`
8243                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8244                     found_dir="$dir"
8245                     found_so="$dir/lib$name.$shlibext"
8246                     if test -f "$dir/lib$name.la"; then
8247                       found_la="$dir/lib$name.la"
8248                     fi
8249                   else
8250                     if test -f "$dir/lib$name.$libext"; then
8251                       found_dir="$dir"
8252                       found_a="$dir/lib$name.$libext"
8253                       if test -f "$dir/lib$name.la"; then
8254                         found_la="$dir/lib$name.la"
8255                       fi
8256                     fi
8257                   fi
8258                   ;;
8259               esac
8260               if test "X$found_dir" != "X"; then
8261                 break
8262               fi
8263             done
8264           fi
8265           if test "X$found_dir" != "X"; then
8266                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8267             if test "X$found_so" != "X"; then
8268                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8269                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8270               else
8271                                                                                 haveit=
8272                 for x in $ltrpathdirs; do
8273                   if test "X$x" = "X$found_dir"; then
8274                     haveit=yes
8275                     break
8276                   fi
8277                 done
8278                 if test -z "$haveit"; then
8279                   ltrpathdirs="$ltrpathdirs $found_dir"
8280                 fi
8281                                 if test "$hardcode_direct" = yes; then
8282                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8283                 else
8284                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8285                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8286                                                             haveit=
8287                     for x in $rpathdirs; do
8288                       if test "X$x" = "X$found_dir"; then
8289                         haveit=yes
8290                         break
8291                       fi
8292                     done
8293                     if test -z "$haveit"; then
8294                       rpathdirs="$rpathdirs $found_dir"
8295                     fi
8296                   else
8297                                                                                 haveit=
8298                     for x in $LDFLAGS $LIBICONV; do
8299
8300   acl_save_prefix="$prefix"
8301   prefix="$acl_final_prefix"
8302   acl_save_exec_prefix="$exec_prefix"
8303   exec_prefix="$acl_final_exec_prefix"
8304   eval x=\"$x\"
8305   exec_prefix="$acl_save_exec_prefix"
8306   prefix="$acl_save_prefix"
8307
8308                       if test "X$x" = "X-L$found_dir"; then
8309                         haveit=yes
8310                         break
8311                       fi
8312                     done
8313                     if test -z "$haveit"; then
8314                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8315                     fi
8316                     if test "$hardcode_minus_L" != no; then
8317                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8318                     else
8319                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8320                     fi
8321                   fi
8322                 fi
8323               fi
8324             else
8325               if test "X$found_a" != "X"; then
8326                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8327               else
8328                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8329               fi
8330             fi
8331                         additional_includedir=
8332             case "$found_dir" in
8333               */lib | */lib/)
8334                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8335                 additional_includedir="$basedir/include"
8336                 ;;
8337             esac
8338             if test "X$additional_includedir" != "X"; then
8339                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
8340                 haveit=
8341                 if test "X$additional_includedir" = "X/usr/local/include"; then
8342                   if test -n "$GCC"; then
8343                     case $host_os in
8344                       linux*) haveit=yes;;
8345                     esac
8346                   fi
8347                 fi
8348                 if test -z "$haveit"; then
8349                   for x in $CPPFLAGS $INCICONV; do
8350
8351   acl_save_prefix="$prefix"
8352   prefix="$acl_final_prefix"
8353   acl_save_exec_prefix="$exec_prefix"
8354   exec_prefix="$acl_final_exec_prefix"
8355   eval x=\"$x\"
8356   exec_prefix="$acl_save_exec_prefix"
8357   prefix="$acl_save_prefix"
8358
8359                     if test "X$x" = "X-I$additional_includedir"; then
8360                       haveit=yes
8361                       break
8362                     fi
8363                   done
8364                   if test -z "$haveit"; then
8365                     if test -d "$additional_includedir"; then
8366                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8367                     fi
8368                   fi
8369                 fi
8370               fi
8371             fi
8372                         if test -n "$found_la"; then
8373                                                         save_libdir="$libdir"
8374               case "$found_la" in
8375                 */* | *\\*) . "$found_la" ;;
8376                 *) . "./$found_la" ;;
8377               esac
8378               libdir="$save_libdir"
8379                             for dep in $dependency_libs; do
8380                 case "$dep" in
8381                   -L*)
8382                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8383                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
8384                       haveit=
8385                       if test "X$additional_libdir" = "X/usr/local/lib"; then
8386                         if test -n "$GCC"; then
8387                           case $host_os in
8388                             linux*) haveit=yes;;
8389                           esac
8390                         fi
8391                       fi
8392                       if test -z "$haveit"; then
8393                         haveit=
8394                         for x in $LDFLAGS $LIBICONV; do
8395
8396   acl_save_prefix="$prefix"
8397   prefix="$acl_final_prefix"
8398   acl_save_exec_prefix="$exec_prefix"
8399   exec_prefix="$acl_final_exec_prefix"
8400   eval x=\"$x\"
8401   exec_prefix="$acl_save_exec_prefix"
8402   prefix="$acl_save_prefix"
8403
8404                           if test "X$x" = "X-L$additional_libdir"; then
8405                             haveit=yes
8406                             break
8407                           fi
8408                         done
8409                         if test -z "$haveit"; then
8410                           if test -d "$additional_libdir"; then
8411                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8412                           fi
8413                         fi
8414                         haveit=
8415                         for x in $LDFLAGS $LTLIBICONV; do
8416
8417   acl_save_prefix="$prefix"
8418   prefix="$acl_final_prefix"
8419   acl_save_exec_prefix="$exec_prefix"
8420   exec_prefix="$acl_final_exec_prefix"
8421   eval x=\"$x\"
8422   exec_prefix="$acl_save_exec_prefix"
8423   prefix="$acl_save_prefix"
8424
8425                           if test "X$x" = "X-L$additional_libdir"; then
8426                             haveit=yes
8427                             break
8428                           fi
8429                         done
8430                         if test -z "$haveit"; then
8431                           if test -d "$additional_libdir"; then
8432                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8433                           fi
8434                         fi
8435                       fi
8436                     fi
8437                     ;;
8438                   -R*)
8439                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
8440                     if test "$enable_rpath" != no; then
8441                                                                   haveit=
8442                       for x in $rpathdirs; do
8443                         if test "X$x" = "X$dir"; then
8444                           haveit=yes
8445                           break
8446                         fi
8447                       done
8448                       if test -z "$haveit"; then
8449                         rpathdirs="$rpathdirs $dir"
8450                       fi
8451                                                                   haveit=
8452                       for x in $ltrpathdirs; do
8453                         if test "X$x" = "X$dir"; then
8454                           haveit=yes
8455                           break
8456                         fi
8457                       done
8458                       if test -z "$haveit"; then
8459                         ltrpathdirs="$ltrpathdirs $dir"
8460                       fi
8461                     fi
8462                     ;;
8463                   -l*)
8464                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8465                     ;;
8466                   *.la)
8467                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8468                     ;;
8469                   *)
8470                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8471                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8472                     ;;
8473                 esac
8474               done
8475             fi
8476           else
8477                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8478             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8479           fi
8480         fi
8481       fi
8482     done
8483   done
8484   if test "X$rpathdirs" != "X"; then
8485     if test -n "$hardcode_libdir_separator"; then
8486                         alldirs=
8487       for found_dir in $rpathdirs; do
8488         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8489       done
8490             acl_save_libdir="$libdir"
8491       libdir="$alldirs"
8492       eval flag=\"$hardcode_libdir_flag_spec\"
8493       libdir="$acl_save_libdir"
8494       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8495     else
8496             for found_dir in $rpathdirs; do
8497         acl_save_libdir="$libdir"
8498         libdir="$found_dir"
8499         eval flag=\"$hardcode_libdir_flag_spec\"
8500         libdir="$acl_save_libdir"
8501         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8502       done
8503     fi
8504   fi
8505   if test "X$ltrpathdirs" != "X"; then
8506             for found_dir in $ltrpathdirs; do
8507       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8508     done
8509   fi
8510
8511
8512
8513
8514
8515
8516
8517   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8518 $as_echo_n "checking for iconv... " >&6; }
8519 if test "${am_cv_func_iconv+set}" = set; then :
8520   $as_echo_n "(cached) " >&6
8521 else
8522
8523     am_cv_func_iconv="no, consider installing GNU libiconv"
8524     am_cv_lib_iconv=no
8525                     am_save_CPPFLAGS="$CPPFLAGS"
8526     CPPFLAGS="$CPPFLAGS $INCICONV"
8527     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8528 /* end confdefs.h.  */
8529 #include <stdlib.h>
8530 #include <iconv.h>
8531 int
8532 main ()
8533 {
8534 iconv_t cd = iconv_open("","");
8535        iconv(cd,NULL,NULL,NULL,NULL);
8536        iconv_close(cd);
8537   ;
8538   return 0;
8539 }
8540 _ACEOF
8541 if ac_fn_c_try_link "$LINENO"; then :
8542   am_cv_func_iconv=yes
8543 fi
8544 rm -f core conftest.err conftest.$ac_objext \
8545     conftest$ac_exeext conftest.$ac_ext
8546     CPPFLAGS="$am_save_CPPFLAGS"
8547
8548     if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8549       for _libs in .libs _libs; do
8550         am_save_CPPFLAGS="$CPPFLAGS"
8551         am_save_LIBS="$LIBS"
8552         CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8553         LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8554         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8555 /* end confdefs.h.  */
8556 #include <stdlib.h>
8557 #include <iconv.h>
8558 int
8559 main ()
8560 {
8561 iconv_t cd = iconv_open("","");
8562            iconv(cd,NULL,NULL,NULL,NULL);
8563            iconv_close(cd);
8564   ;
8565   return 0;
8566 }
8567 _ACEOF
8568 if ac_fn_c_try_link "$LINENO"; then :
8569   INCICONV="-I../libiconv/include"
8570           LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8571           LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8572           am_cv_lib_iconv=yes
8573           am_cv_func_iconv=yes
8574 fi
8575 rm -f core conftest.err conftest.$ac_objext \
8576     conftest$ac_exeext conftest.$ac_ext
8577         CPPFLAGS="$am_save_CPPFLAGS"
8578         LIBS="$am_save_LIBS"
8579         if test "$am_cv_func_iconv" = "yes"; then
8580           break
8581         fi
8582       done
8583     fi
8584
8585     if test "$am_cv_func_iconv" != yes; then
8586       am_save_CPPFLAGS="$CPPFLAGS"
8587       am_save_LIBS="$LIBS"
8588       CPPFLAGS="$LIBS $INCICONV"
8589       LIBS="$LIBS $LIBICONV"
8590       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8591 /* end confdefs.h.  */
8592 #include <stdlib.h>
8593 #include <iconv.h>
8594 int
8595 main ()
8596 {
8597 iconv_t cd = iconv_open("","");
8598          iconv(cd,NULL,NULL,NULL,NULL);
8599          iconv_close(cd);
8600   ;
8601   return 0;
8602 }
8603 _ACEOF
8604 if ac_fn_c_try_link "$LINENO"; then :
8605   am_cv_lib_iconv=yes
8606         am_cv_func_iconv=yes
8607 fi
8608 rm -f core conftest.err conftest.$ac_objext \
8609     conftest$ac_exeext conftest.$ac_ext
8610       CPPFLAGS="$am_save_CPPFLAGS"
8611       LIBS="$am_save_LIBS"
8612     fi
8613
8614 fi
8615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8616 $as_echo "$am_cv_func_iconv" >&6; }
8617   if test "$am_cv_func_iconv" = yes; then
8618
8619 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8620
8621   fi
8622   if test "$am_cv_lib_iconv" = yes; then
8623
8624   for element in $INCICONV; do
8625     haveit=
8626     for x in $CPPFLAGS; do
8627
8628   acl_save_prefix="$prefix"
8629   prefix="$acl_final_prefix"
8630   acl_save_exec_prefix="$exec_prefix"
8631   exec_prefix="$acl_final_exec_prefix"
8632   eval x=\"$x\"
8633   exec_prefix="$acl_save_exec_prefix"
8634   prefix="$acl_save_prefix"
8635
8636       if test "X$x" = "X$element"; then
8637         haveit=yes
8638         break
8639       fi
8640     done
8641     if test -z "$haveit"; then
8642       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8643     fi
8644   done
8645
8646     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8647 $as_echo_n "checking how to link with libiconv... " >&6; }
8648     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8649 $as_echo "$LIBICONV" >&6; }
8650   else
8651     LIBICONV=
8652     LTLIBICONV=
8653   fi
8654
8655
8656
8657   if test "$am_cv_func_iconv" = yes; then
8658     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8659 $as_echo_n "checking for iconv declaration... " >&6; }
8660     if test "${am_cv_proto_iconv+set}" = set; then :
8661   $as_echo_n "(cached) " >&6
8662 else
8663
8664       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8665 /* end confdefs.h.  */
8666
8667 #include <stdlib.h>
8668 #include <iconv.h>
8669 extern
8670 #ifdef __cplusplus
8671 "C"
8672 #endif
8673 #if defined(__STDC__) || defined(__cplusplus)
8674 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8675 #else
8676 size_t iconv();
8677 #endif
8678
8679 int
8680 main ()
8681 {
8682
8683   ;
8684   return 0;
8685 }
8686 _ACEOF
8687 if ac_fn_c_try_compile "$LINENO"; then :
8688   am_cv_proto_iconv_arg1=""
8689 else
8690   am_cv_proto_iconv_arg1="const"
8691 fi
8692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8693       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);"
8694 fi
8695
8696     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8697     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8698          }$am_cv_proto_iconv" >&5
8699 $as_echo "${ac_t:-
8700          }$am_cv_proto_iconv" >&6; }
8701
8702 cat >>confdefs.h <<_ACEOF
8703 #define ICONV_CONST $am_cv_proto_iconv_arg1
8704 _ACEOF
8705
8706   fi
8707
8708
8709 # GDB may fork/exec the iconv program to get the list of supported character
8710 # sets.  Allow the user to specify where to find it.
8711 # There are several factors affecting the choice of option name:
8712 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8713 #   the build-time location of libiconv files.
8714 # - The program we need to find is iconv, which comes with glibc.  The user
8715 #   doesn't necessarily have libiconv installed.  Therefore naming this
8716 #   --with-libiconv-foo feels wrong.
8717 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8718 #   defined to work on directories not files (though it really doesn't know
8719 #   the difference).
8720 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8721 #   with --with-libiconv-prefix.
8722 # Putting these together is why the option name is --with-iconv-bin.
8723
8724
8725 # Check whether --with-iconv-bin was given.
8726 if test "${with_iconv_bin+set}" = set; then :
8727   withval=$with_iconv_bin; iconv_bin="${withval}"
8728
8729 cat >>confdefs.h <<_ACEOF
8730 #define ICONV_BIN "${iconv_bin}"
8731 _ACEOF
8732
8733
8734   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8735      if test "x$prefix" = xNONE; then
8736         test_prefix=/usr/local
8737      else
8738         test_prefix=$prefix
8739      fi
8740   else
8741      test_prefix=$exec_prefix
8742   fi
8743   value=0
8744   case ${iconv_bin} in
8745      "${test_prefix}"|"${test_prefix}/"*|\
8746         '${exec_prefix}'|'${exec_prefix}/'*)
8747      value=1
8748      ;;
8749   esac
8750
8751 cat >>confdefs.h <<_ACEOF
8752 #define ICONV_BIN_RELOCATABLE $value
8753 _ACEOF
8754
8755
8756
8757 fi
8758
8759
8760 # For the TUI, we need enhanced curses functionality.
8761 if test x"$enable_tui" != xno; then
8762   prefer_curses=yes
8763 fi
8764
8765 curses_found=no
8766 if test x"$prefer_curses" = xyes; then
8767   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8768   # curses library because the latter might not provide all the
8769   # functionality we need.  However, this leads to problems on systems
8770   # where the linker searches /usr/local/lib, but the compiler doesn't
8771   # search /usr/local/include, if ncurses is installed in /usr/local.  A
8772   # default installation of ncurses on alpha*-dec-osf* will lead to such
8773   # a situation.
8774   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8775 $as_echo_n "checking for library containing waddstr... " >&6; }
8776 if test "${ac_cv_search_waddstr+set}" = set; then :
8777   $as_echo_n "(cached) " >&6
8778 else
8779   ac_func_search_save_LIBS=$LIBS
8780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8781 /* end confdefs.h.  */
8782
8783 /* Override any GCC internal prototype to avoid an error.
8784    Use char because int might match the return type of a GCC
8785    builtin and then its argument prototype would still apply.  */
8786 #ifdef __cplusplus
8787 extern "C"
8788 #endif
8789 char waddstr ();
8790 int
8791 main ()
8792 {
8793 return waddstr ();
8794   ;
8795   return 0;
8796 }
8797 _ACEOF
8798 for ac_lib in '' ncurses cursesX curses; do
8799   if test -z "$ac_lib"; then
8800     ac_res="none required"
8801   else
8802     ac_res=-l$ac_lib
8803     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8804   fi
8805   if ac_fn_c_try_link "$LINENO"; then :
8806   ac_cv_search_waddstr=$ac_res
8807 fi
8808 rm -f core conftest.err conftest.$ac_objext \
8809     conftest$ac_exeext
8810   if test "${ac_cv_search_waddstr+set}" = set; then :
8811   break
8812 fi
8813 done
8814 if test "${ac_cv_search_waddstr+set}" = set; then :
8815
8816 else
8817   ac_cv_search_waddstr=no
8818 fi
8819 rm conftest.$ac_ext
8820 LIBS=$ac_func_search_save_LIBS
8821 fi
8822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8823 $as_echo "$ac_cv_search_waddstr" >&6; }
8824 ac_res=$ac_cv_search_waddstr
8825 if test "$ac_res" != no; then :
8826   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8827
8828 fi
8829
8830
8831   if test "$ac_cv_search_waddstr" != no; then
8832     curses_found=yes
8833   fi
8834 fi
8835
8836 # Check whether we should enable the TUI, but only do so if we really
8837 # can.
8838 if test x"$enable_tui" != xno; then
8839   if test -d $srcdir/tui; then
8840     if test "$curses_found" != no; then
8841       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8842       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8843       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8844       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8845     else
8846       if test x"$enable_tui" = xyes; then
8847         as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
8848       else
8849         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8850 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8851       fi
8852     fi
8853   fi
8854 fi
8855
8856 # Since GDB uses Readline, we need termcap functionality.  In many
8857 # cases this will be provided by the curses library, but some systems
8858 # have a separate termcap library, or no curses library at all.
8859
8860 case $host_os in
8861   cygwin*)
8862     if test -d $srcdir/libtermcap; then
8863       LIBS="../libtermcap/libtermcap.a $LIBS"
8864       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8865     fi ;;
8866   go32* | *djgpp*)
8867     ac_cv_search_tgetent="none required"
8868     ;;
8869 esac
8870
8871 # These are the libraries checked by Readline.
8872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8873 $as_echo_n "checking for library containing tgetent... " >&6; }
8874 if test "${ac_cv_search_tgetent+set}" = set; then :
8875   $as_echo_n "(cached) " >&6
8876 else
8877   ac_func_search_save_LIBS=$LIBS
8878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8879 /* end confdefs.h.  */
8880
8881 /* Override any GCC internal prototype to avoid an error.
8882    Use char because int might match the return type of a GCC
8883    builtin and then its argument prototype would still apply.  */
8884 #ifdef __cplusplus
8885 extern "C"
8886 #endif
8887 char tgetent ();
8888 int
8889 main ()
8890 {
8891 return tgetent ();
8892   ;
8893   return 0;
8894 }
8895 _ACEOF
8896 for ac_lib in '' termcap tinfo curses ncurses; do
8897   if test -z "$ac_lib"; then
8898     ac_res="none required"
8899   else
8900     ac_res=-l$ac_lib
8901     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8902   fi
8903   if ac_fn_c_try_link "$LINENO"; then :
8904   ac_cv_search_tgetent=$ac_res
8905 fi
8906 rm -f core conftest.err conftest.$ac_objext \
8907     conftest$ac_exeext
8908   if test "${ac_cv_search_tgetent+set}" = set; then :
8909   break
8910 fi
8911 done
8912 if test "${ac_cv_search_tgetent+set}" = set; then :
8913
8914 else
8915   ac_cv_search_tgetent=no
8916 fi
8917 rm conftest.$ac_ext
8918 LIBS=$ac_func_search_save_LIBS
8919 fi
8920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8921 $as_echo "$ac_cv_search_tgetent" >&6; }
8922 ac_res=$ac_cv_search_tgetent
8923 if test "$ac_res" != no; then :
8924   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8925
8926 fi
8927
8928
8929 if test "$ac_cv_search_tgetent" = no; then
8930   CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8931 fi
8932
8933
8934 # Check whether --with-system-readline was given.
8935 if test "${with_system_readline+set}" = set; then :
8936   withval=$with_system_readline;
8937 fi
8938
8939
8940 if test "$with_system_readline" = yes; then
8941   READLINE=-lreadline
8942   READLINE_DEPS=
8943   READLINE_CFLAGS=
8944   READLINE_TEXI_INCFLAG=
8945 else
8946   READLINE='$(READLINE_DIR)/libreadline.a'
8947   READLINE_DEPS='$(READLINE)'
8948   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
8949   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
8950 fi
8951
8952
8953
8954
8955
8956 # Generate jit-reader.h
8957
8958 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8959 TARGET_PTR=
8960
8961 # The cast to long int works around a bug in the HP C Compiler
8962 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8963 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8964 # This bug is HP SR number 8606223364.
8965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8966 $as_echo_n "checking size of unsigned long long... " >&6; }
8967 if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8968   $as_echo_n "(cached) " >&6
8969 else
8970   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
8971
8972 else
8973   if test "$ac_cv_type_unsigned_long_long" = yes; then
8974      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8975 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8976 { as_fn_set_status 77
8977 as_fn_error "cannot compute sizeof (unsigned long long)
8978 See \`config.log' for more details." "$LINENO" 5; }; }
8979    else
8980      ac_cv_sizeof_unsigned_long_long=0
8981    fi
8982 fi
8983
8984 fi
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8986 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8987
8988
8989
8990 cat >>confdefs.h <<_ACEOF
8991 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8992 _ACEOF
8993
8994
8995 # The cast to long int works around a bug in the HP C Compiler
8996 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8997 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8998 # This bug is HP SR number 8606223364.
8999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9000 $as_echo_n "checking size of unsigned long... " >&6; }
9001 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
9002   $as_echo_n "(cached) " >&6
9003 else
9004   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
9005
9006 else
9007   if test "$ac_cv_type_unsigned_long" = yes; then
9008      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9009 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9010 { as_fn_set_status 77
9011 as_fn_error "cannot compute sizeof (unsigned long)
9012 See \`config.log' for more details." "$LINENO" 5; }; }
9013    else
9014      ac_cv_sizeof_unsigned_long=0
9015    fi
9016 fi
9017
9018 fi
9019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9020 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9021
9022
9023
9024 cat >>confdefs.h <<_ACEOF
9025 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9026 _ACEOF
9027
9028
9029 # The cast to long int works around a bug in the HP C Compiler
9030 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9031 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9032 # This bug is HP SR number 8606223364.
9033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9034 $as_echo_n "checking size of unsigned __int128... " >&6; }
9035 if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
9036   $as_echo_n "(cached) " >&6
9037 else
9038   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
9039
9040 else
9041   if test "$ac_cv_type_unsigned___int128" = yes; then
9042      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9043 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9044 { as_fn_set_status 77
9045 as_fn_error "cannot compute sizeof (unsigned __int128)
9046 See \`config.log' for more details." "$LINENO" 5; }; }
9047    else
9048      ac_cv_sizeof_unsigned___int128=0
9049    fi
9050 fi
9051
9052 fi
9053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9054 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9055
9056
9057
9058 cat >>confdefs.h <<_ACEOF
9059 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9060 _ACEOF
9061
9062
9063
9064 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9065   TARGET_PTR="unsigned long"
9066 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9067   TARGET_PTR="unsigned long long"
9068 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9069   TARGET_PTR="unsigned __int128"
9070 else
9071   TARGET_PTR="unsigned long"
9072 fi
9073
9074
9075 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9076
9077
9078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9079 $as_echo_n "checking for library containing dlopen... " >&6; }
9080 if test "${ac_cv_search_dlopen+set}" = set; then :
9081   $as_echo_n "(cached) " >&6
9082 else
9083   ac_func_search_save_LIBS=$LIBS
9084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9085 /* end confdefs.h.  */
9086
9087 /* Override any GCC internal prototype to avoid an error.
9088    Use char because int might match the return type of a GCC
9089    builtin and then its argument prototype would still apply.  */
9090 #ifdef __cplusplus
9091 extern "C"
9092 #endif
9093 char dlopen ();
9094 int
9095 main ()
9096 {
9097 return dlopen ();
9098   ;
9099   return 0;
9100 }
9101 _ACEOF
9102 for ac_lib in '' dl; do
9103   if test -z "$ac_lib"; then
9104     ac_res="none required"
9105   else
9106     ac_res=-l$ac_lib
9107     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9108   fi
9109   if ac_fn_c_try_link "$LINENO"; then :
9110   ac_cv_search_dlopen=$ac_res
9111 fi
9112 rm -f core conftest.err conftest.$ac_objext \
9113     conftest$ac_exeext
9114   if test "${ac_cv_search_dlopen+set}" = set; then :
9115   break
9116 fi
9117 done
9118 if test "${ac_cv_search_dlopen+set}" = set; then :
9119
9120 else
9121   ac_cv_search_dlopen=no
9122 fi
9123 rm conftest.$ac_ext
9124 LIBS=$ac_func_search_save_LIBS
9125 fi
9126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9127 $as_echo "$ac_cv_search_dlopen" >&6; }
9128 ac_res=$ac_cv_search_dlopen
9129 if test "$ac_res" != no; then :
9130   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9131
9132 fi
9133
9134
9135
9136
9137 # Check whether --with-jit-reader-dir was given.
9138 if test "${with_jit_reader_dir+set}" = set; then :
9139   withval=$with_jit_reader_dir;
9140     JIT_READER_DIR=$withval
9141 else
9142   JIT_READER_DIR=${libdir}/gdb
9143 fi
9144
9145
9146   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9147   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9148   ac_define_dir=`eval echo $JIT_READER_DIR`
9149   ac_define_dir=`eval echo $ac_define_dir`
9150
9151 cat >>confdefs.h <<_ACEOF
9152 #define JIT_READER_DIR "$ac_define_dir"
9153 _ACEOF
9154
9155
9156
9157
9158   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9159      if test "x$prefix" = xNONE; then
9160         test_prefix=/usr/local
9161      else
9162         test_prefix=$prefix
9163      fi
9164   else
9165      test_prefix=$exec_prefix
9166   fi
9167   value=0
9168   case ${ac_define_dir} in
9169      "${test_prefix}"|"${test_prefix}/"*|\
9170         '${exec_prefix}'|'${exec_prefix}/'*)
9171      value=1
9172      ;;
9173   esac
9174
9175 cat >>confdefs.h <<_ACEOF
9176 #define JIT_READER_DIR_RELOCATABLE $value
9177 _ACEOF
9178
9179
9180
9181
9182
9183 # Check whether --with-expat was given.
9184 if test "${with_expat+set}" = set; then :
9185   withval=$with_expat;
9186 else
9187   with_expat=auto
9188 fi
9189
9190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9191 $as_echo_n "checking whether to use expat... " >&6; }
9192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9193 $as_echo "$with_expat" >&6; }
9194
9195 if test "${with_expat}" = no; then
9196   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9197 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9198   HAVE_LIBEXPAT=no
9199 else
9200
9201
9202
9203
9204
9205
9206
9207
9208     use_additional=yes
9209
9210   acl_save_prefix="$prefix"
9211   prefix="$acl_final_prefix"
9212   acl_save_exec_prefix="$exec_prefix"
9213   exec_prefix="$acl_final_exec_prefix"
9214
9215     eval additional_includedir=\"$includedir\"
9216     eval additional_libdir=\"$libdir\"
9217
9218   exec_prefix="$acl_save_exec_prefix"
9219   prefix="$acl_save_prefix"
9220
9221
9222 # Check whether --with-libexpat-prefix was given.
9223 if test "${with_libexpat_prefix+set}" = set; then :
9224   withval=$with_libexpat_prefix;
9225     if test "X$withval" = "Xno"; then
9226       use_additional=no
9227     else
9228       if test "X$withval" = "X"; then
9229
9230   acl_save_prefix="$prefix"
9231   prefix="$acl_final_prefix"
9232   acl_save_exec_prefix="$exec_prefix"
9233   exec_prefix="$acl_final_exec_prefix"
9234
9235           eval additional_includedir=\"$includedir\"
9236           eval additional_libdir=\"$libdir\"
9237
9238   exec_prefix="$acl_save_exec_prefix"
9239   prefix="$acl_save_prefix"
9240
9241       else
9242         additional_includedir="$withval/include"
9243         additional_libdir="$withval/lib"
9244       fi
9245     fi
9246
9247 fi
9248
9249       LIBEXPAT=
9250   LTLIBEXPAT=
9251   INCEXPAT=
9252   rpathdirs=
9253   ltrpathdirs=
9254   names_already_handled=
9255   names_next_round='expat '
9256   while test -n "$names_next_round"; do
9257     names_this_round="$names_next_round"
9258     names_next_round=
9259     for name in $names_this_round; do
9260       already_handled=
9261       for n in $names_already_handled; do
9262         if test "$n" = "$name"; then
9263           already_handled=yes
9264           break
9265         fi
9266       done
9267       if test -z "$already_handled"; then
9268         names_already_handled="$names_already_handled $name"
9269                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9270         eval value=\"\$HAVE_LIB$uppername\"
9271         if test -n "$value"; then
9272           if test "$value" = yes; then
9273             eval value=\"\$LIB$uppername\"
9274             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9275             eval value=\"\$LTLIB$uppername\"
9276             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9277           else
9278                                     :
9279           fi
9280         else
9281                               found_dir=
9282           found_la=
9283           found_so=
9284           found_a=
9285           if test $use_additional = yes; then
9286             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9287               found_dir="$additional_libdir"
9288               found_so="$additional_libdir/lib$name.$shlibext"
9289               if test -f "$additional_libdir/lib$name.la"; then
9290                 found_la="$additional_libdir/lib$name.la"
9291               fi
9292             else
9293               if test -f "$additional_libdir/lib$name.$libext"; then
9294                 found_dir="$additional_libdir"
9295                 found_a="$additional_libdir/lib$name.$libext"
9296                 if test -f "$additional_libdir/lib$name.la"; then
9297                   found_la="$additional_libdir/lib$name.la"
9298                 fi
9299               fi
9300             fi
9301           fi
9302           if test "X$found_dir" = "X"; then
9303             for x in $LDFLAGS $LTLIBEXPAT; do
9304
9305   acl_save_prefix="$prefix"
9306   prefix="$acl_final_prefix"
9307   acl_save_exec_prefix="$exec_prefix"
9308   exec_prefix="$acl_final_exec_prefix"
9309   eval x=\"$x\"
9310   exec_prefix="$acl_save_exec_prefix"
9311   prefix="$acl_save_prefix"
9312
9313               case "$x" in
9314                 -L*)
9315                   dir=`echo "X$x" | sed -e 's/^X-L//'`
9316                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9317                     found_dir="$dir"
9318                     found_so="$dir/lib$name.$shlibext"
9319                     if test -f "$dir/lib$name.la"; then
9320                       found_la="$dir/lib$name.la"
9321                     fi
9322                   else
9323                     if test -f "$dir/lib$name.$libext"; then
9324                       found_dir="$dir"
9325                       found_a="$dir/lib$name.$libext"
9326                       if test -f "$dir/lib$name.la"; then
9327                         found_la="$dir/lib$name.la"
9328                       fi
9329                     fi
9330                   fi
9331                   ;;
9332               esac
9333               if test "X$found_dir" != "X"; then
9334                 break
9335               fi
9336             done
9337           fi
9338           if test "X$found_dir" != "X"; then
9339                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9340             if test "X$found_so" != "X"; then
9341                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9342                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9343               else
9344                                                                                 haveit=
9345                 for x in $ltrpathdirs; do
9346                   if test "X$x" = "X$found_dir"; then
9347                     haveit=yes
9348                     break
9349                   fi
9350                 done
9351                 if test -z "$haveit"; then
9352                   ltrpathdirs="$ltrpathdirs $found_dir"
9353                 fi
9354                                 if test "$hardcode_direct" = yes; then
9355                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9356                 else
9357                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9358                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9359                                                             haveit=
9360                     for x in $rpathdirs; do
9361                       if test "X$x" = "X$found_dir"; then
9362                         haveit=yes
9363                         break
9364                       fi
9365                     done
9366                     if test -z "$haveit"; then
9367                       rpathdirs="$rpathdirs $found_dir"
9368                     fi
9369                   else
9370                                                                                 haveit=
9371                     for x in $LDFLAGS $LIBEXPAT; do
9372
9373   acl_save_prefix="$prefix"
9374   prefix="$acl_final_prefix"
9375   acl_save_exec_prefix="$exec_prefix"
9376   exec_prefix="$acl_final_exec_prefix"
9377   eval x=\"$x\"
9378   exec_prefix="$acl_save_exec_prefix"
9379   prefix="$acl_save_prefix"
9380
9381                       if test "X$x" = "X-L$found_dir"; then
9382                         haveit=yes
9383                         break
9384                       fi
9385                     done
9386                     if test -z "$haveit"; then
9387                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9388                     fi
9389                     if test "$hardcode_minus_L" != no; then
9390                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9391                     else
9392                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9393                     fi
9394                   fi
9395                 fi
9396               fi
9397             else
9398               if test "X$found_a" != "X"; then
9399                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9400               else
9401                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9402               fi
9403             fi
9404                         additional_includedir=
9405             case "$found_dir" in
9406               */lib | */lib/)
9407                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9408                 additional_includedir="$basedir/include"
9409                 ;;
9410             esac
9411             if test "X$additional_includedir" != "X"; then
9412                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
9413                 haveit=
9414                 if test "X$additional_includedir" = "X/usr/local/include"; then
9415                   if test -n "$GCC"; then
9416                     case $host_os in
9417                       linux*) haveit=yes;;
9418                     esac
9419                   fi
9420                 fi
9421                 if test -z "$haveit"; then
9422                   for x in $CPPFLAGS $INCEXPAT; do
9423
9424   acl_save_prefix="$prefix"
9425   prefix="$acl_final_prefix"
9426   acl_save_exec_prefix="$exec_prefix"
9427   exec_prefix="$acl_final_exec_prefix"
9428   eval x=\"$x\"
9429   exec_prefix="$acl_save_exec_prefix"
9430   prefix="$acl_save_prefix"
9431
9432                     if test "X$x" = "X-I$additional_includedir"; then
9433                       haveit=yes
9434                       break
9435                     fi
9436                   done
9437                   if test -z "$haveit"; then
9438                     if test -d "$additional_includedir"; then
9439                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9440                     fi
9441                   fi
9442                 fi
9443               fi
9444             fi
9445                         if test -n "$found_la"; then
9446                                                         save_libdir="$libdir"
9447               case "$found_la" in
9448                 */* | *\\*) . "$found_la" ;;
9449                 *) . "./$found_la" ;;
9450               esac
9451               libdir="$save_libdir"
9452                             for dep in $dependency_libs; do
9453                 case "$dep" in
9454                   -L*)
9455                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9456                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
9457                       haveit=
9458                       if test "X$additional_libdir" = "X/usr/local/lib"; then
9459                         if test -n "$GCC"; then
9460                           case $host_os in
9461                             linux*) haveit=yes;;
9462                           esac
9463                         fi
9464                       fi
9465                       if test -z "$haveit"; then
9466                         haveit=
9467                         for x in $LDFLAGS $LIBEXPAT; do
9468
9469   acl_save_prefix="$prefix"
9470   prefix="$acl_final_prefix"
9471   acl_save_exec_prefix="$exec_prefix"
9472   exec_prefix="$acl_final_exec_prefix"
9473   eval x=\"$x\"
9474   exec_prefix="$acl_save_exec_prefix"
9475   prefix="$acl_save_prefix"
9476
9477                           if test "X$x" = "X-L$additional_libdir"; then
9478                             haveit=yes
9479                             break
9480                           fi
9481                         done
9482                         if test -z "$haveit"; then
9483                           if test -d "$additional_libdir"; then
9484                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9485                           fi
9486                         fi
9487                         haveit=
9488                         for x in $LDFLAGS $LTLIBEXPAT; do
9489
9490   acl_save_prefix="$prefix"
9491   prefix="$acl_final_prefix"
9492   acl_save_exec_prefix="$exec_prefix"
9493   exec_prefix="$acl_final_exec_prefix"
9494   eval x=\"$x\"
9495   exec_prefix="$acl_save_exec_prefix"
9496   prefix="$acl_save_prefix"
9497
9498                           if test "X$x" = "X-L$additional_libdir"; then
9499                             haveit=yes
9500                             break
9501                           fi
9502                         done
9503                         if test -z "$haveit"; then
9504                           if test -d "$additional_libdir"; then
9505                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9506                           fi
9507                         fi
9508                       fi
9509                     fi
9510                     ;;
9511                   -R*)
9512                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
9513                     if test "$enable_rpath" != no; then
9514                                                                   haveit=
9515                       for x in $rpathdirs; do
9516                         if test "X$x" = "X$dir"; then
9517                           haveit=yes
9518                           break
9519                         fi
9520                       done
9521                       if test -z "$haveit"; then
9522                         rpathdirs="$rpathdirs $dir"
9523                       fi
9524                                                                   haveit=
9525                       for x in $ltrpathdirs; do
9526                         if test "X$x" = "X$dir"; then
9527                           haveit=yes
9528                           break
9529                         fi
9530                       done
9531                       if test -z "$haveit"; then
9532                         ltrpathdirs="$ltrpathdirs $dir"
9533                       fi
9534                     fi
9535                     ;;
9536                   -l*)
9537                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9538                     ;;
9539                   *.la)
9540                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9541                     ;;
9542                   *)
9543                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9544                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9545                     ;;
9546                 esac
9547               done
9548             fi
9549           else
9550                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9551             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9552           fi
9553         fi
9554       fi
9555     done
9556   done
9557   if test "X$rpathdirs" != "X"; then
9558     if test -n "$hardcode_libdir_separator"; then
9559                         alldirs=
9560       for found_dir in $rpathdirs; do
9561         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9562       done
9563             acl_save_libdir="$libdir"
9564       libdir="$alldirs"
9565       eval flag=\"$hardcode_libdir_flag_spec\"
9566       libdir="$acl_save_libdir"
9567       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9568     else
9569             for found_dir in $rpathdirs; do
9570         acl_save_libdir="$libdir"
9571         libdir="$found_dir"
9572         eval flag=\"$hardcode_libdir_flag_spec\"
9573         libdir="$acl_save_libdir"
9574         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9575       done
9576     fi
9577   fi
9578   if test "X$ltrpathdirs" != "X"; then
9579             for found_dir in $ltrpathdirs; do
9580       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9581     done
9582   fi
9583
9584
9585         ac_save_CPPFLAGS="$CPPFLAGS"
9586
9587   for element in $INCEXPAT; do
9588     haveit=
9589     for x in $CPPFLAGS; do
9590
9591   acl_save_prefix="$prefix"
9592   prefix="$acl_final_prefix"
9593   acl_save_exec_prefix="$exec_prefix"
9594   exec_prefix="$acl_final_exec_prefix"
9595   eval x=\"$x\"
9596   exec_prefix="$acl_save_exec_prefix"
9597   prefix="$acl_save_prefix"
9598
9599       if test "X$x" = "X$element"; then
9600         haveit=yes
9601         break
9602       fi
9603     done
9604     if test -z "$haveit"; then
9605       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9606     fi
9607   done
9608
9609
9610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9611 $as_echo_n "checking for libexpat... " >&6; }
9612 if test "${ac_cv_libexpat+set}" = set; then :
9613   $as_echo_n "(cached) " >&6
9614 else
9615
9616     ac_save_LIBS="$LIBS"
9617     LIBS="$LIBS $LIBEXPAT"
9618     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9619 /* end confdefs.h.  */
9620 #include "expat.h"
9621 int
9622 main ()
9623 {
9624 XML_Parser p = XML_ParserCreate (0);
9625   ;
9626   return 0;
9627 }
9628 _ACEOF
9629 if ac_fn_c_try_link "$LINENO"; then :
9630   ac_cv_libexpat=yes
9631 else
9632   ac_cv_libexpat=no
9633 fi
9634 rm -f core conftest.err conftest.$ac_objext \
9635     conftest$ac_exeext conftest.$ac_ext
9636     LIBS="$ac_save_LIBS"
9637
9638 fi
9639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9640 $as_echo "$ac_cv_libexpat" >&6; }
9641   if test "$ac_cv_libexpat" = yes; then
9642     HAVE_LIBEXPAT=yes
9643
9644 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9645
9646     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9647 $as_echo_n "checking how to link with libexpat... " >&6; }
9648     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9649 $as_echo "$LIBEXPAT" >&6; }
9650   else
9651     HAVE_LIBEXPAT=no
9652             CPPFLAGS="$ac_save_CPPFLAGS"
9653     LIBEXPAT=
9654     LTLIBEXPAT=
9655   fi
9656
9657
9658
9659
9660
9661
9662   if test "$HAVE_LIBEXPAT" != yes; then
9663     if test "$with_expat" = yes; then
9664       as_fn_error "expat is missing or unusable" "$LINENO" 5
9665     else
9666       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9667 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9668     fi
9669   else
9670     save_LIBS=$LIBS
9671     LIBS="$LIBS $LIBEXPAT"
9672     for ac_func in XML_StopParser
9673 do :
9674   ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9675 if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
9676   cat >>confdefs.h <<_ACEOF
9677 #define HAVE_XML_STOPPARSER 1
9678 _ACEOF
9679
9680 fi
9681 done
9682
9683     LIBS=$save_LIBS
9684   fi
9685 fi
9686
9687 # --------------------- #
9688 # Check for libpython.  #
9689 # --------------------- #
9690
9691
9692
9693
9694
9695
9696 # Check whether --with-python was given.
9697 if test "${with_python+set}" = set; then :
9698   withval=$with_python;
9699 else
9700   with_python=auto
9701 fi
9702
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
9704 $as_echo_n "checking whether to use python... " >&6; }
9705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
9706 $as_echo "$with_python" >&6; }
9707
9708 if test "${with_python}" = no; then
9709   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
9710 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
9711   have_libpython=no
9712 else
9713   case "${with_python}" in
9714   [\\/]* | ?:[\\/]*)
9715     if test -d ${with_python}; then
9716       # Assume the python binary is ${with_python}/bin/python.
9717       python_prog="${with_python}/bin/python"
9718       python_prefix=
9719       # If python does not exit ${with_python}/bin, then try in
9720       # ${with_python}.  On Windows/MinGW, this is where the Python
9721       # executable is.
9722       if test ! -x "${python_prog}"; then
9723         python_prog="${with_python}/python"
9724         python_prefix=
9725       fi
9726       if test ! -x "${python_prog}"; then
9727         # Fall back to gdb 7.0/7.1 behaviour.
9728         python_prog=missing
9729         python_prefix=${with_python}
9730       fi
9731     elif test -x "${with_python}"; then
9732       # While we can't run python compiled for $host (unless host == build),
9733       # the user could write a script that provides the needed information,
9734       # so we support that.
9735       python_prog=${with_python}
9736       python_prefix=
9737     else
9738       as_fn_error "invalid value for --with-python" "$LINENO" 5
9739     fi
9740     ;;
9741   */*)
9742     # Disallow --with-python=foo/bar.
9743     as_fn_error "invalid value for --with-python" "$LINENO" 5
9744     ;;
9745   *)
9746     # The user has either specified auto, yes, or the name of the python
9747     # program assumed to be in $PATH.
9748     python_prefix=
9749     case "${with_python}" in
9750     yes | auto)
9751       if test ${build} = ${host}; then
9752         # Extract the first word of "python", so it can be a program name with args.
9753 set dummy python; ac_word=$2
9754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9755 $as_echo_n "checking for $ac_word... " >&6; }
9756 if test "${ac_cv_path_python_prog_path+set}" = set; then :
9757   $as_echo_n "(cached) " >&6
9758 else
9759   case $python_prog_path in
9760   [\\/]* | ?:[\\/]*)
9761   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9762   ;;
9763   *)
9764   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9765 for as_dir in $PATH
9766 do
9767   IFS=$as_save_IFS
9768   test -z "$as_dir" && as_dir=.
9769     for ac_exec_ext in '' $ac_executable_extensions; do
9770   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9771     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9773     break 2
9774   fi
9775 done
9776   done
9777 IFS=$as_save_IFS
9778
9779   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9780   ;;
9781 esac
9782 fi
9783 python_prog_path=$ac_cv_path_python_prog_path
9784 if test -n "$python_prog_path"; then
9785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9786 $as_echo "$python_prog_path" >&6; }
9787 else
9788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789 $as_echo "no" >&6; }
9790 fi
9791
9792
9793         if test "${python_prog_path}" = missing; then
9794           python_prog=missing
9795         else
9796           python_prog=${python_prog_path}
9797         fi
9798       else
9799         # Not much we can do except assume the cross-compiler will find the
9800         # right files.
9801         python_prog=missing
9802       fi
9803       ;;
9804     *)
9805       # While we can't run python compiled for $host (unless host == build),
9806       # the user could write a script that provides the needed information,
9807       # so we support that.
9808       python_prog="${with_python}"
9809       # Extract the first word of "${python_prog}", so it can be a program name with args.
9810 set dummy ${python_prog}; ac_word=$2
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9812 $as_echo_n "checking for $ac_word... " >&6; }
9813 if test "${ac_cv_path_python_prog_path+set}" = set; then :
9814   $as_echo_n "(cached) " >&6
9815 else
9816   case $python_prog_path in
9817   [\\/]* | ?:[\\/]*)
9818   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9819   ;;
9820   *)
9821   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9822 for as_dir in $PATH
9823 do
9824   IFS=$as_save_IFS
9825   test -z "$as_dir" && as_dir=.
9826     for ac_exec_ext in '' $ac_executable_extensions; do
9827   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9828     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9829     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9830     break 2
9831   fi
9832 done
9833   done
9834 IFS=$as_save_IFS
9835
9836   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9837   ;;
9838 esac
9839 fi
9840 python_prog_path=$ac_cv_path_python_prog_path
9841 if test -n "$python_prog_path"; then
9842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9843 $as_echo "$python_prog_path" >&6; }
9844 else
9845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9846 $as_echo "no" >&6; }
9847 fi
9848
9849
9850       if test "${python_prog_path}" = missing; then
9851         as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9852       fi
9853       ;;
9854     esac
9855   esac
9856
9857   if test "${python_prog}" != missing; then
9858     # We have a python program to use, but it may be too old.
9859     # Don't flag an error for --with-python=auto (the default).
9860     have_python_config=yes
9861     python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9862     if test $? != 0; then
9863       have_python_config=failed
9864       if test "${with_python}" != auto; then
9865         as_fn_error "failure running python-config --includes" "$LINENO" 5
9866       fi
9867     fi
9868     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9869     if test $? != 0; then
9870       have_python_config=failed
9871       if test "${with_python}" != auto; then
9872         as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9873       fi
9874     fi
9875     python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9876     if test $? != 0; then
9877       have_python_config=failed
9878       if test "${with_python}" != auto; then
9879         as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9880       fi
9881     fi
9882   else
9883     # We do not have a python executable we can use to determine where
9884     # to find the Python headers and libs.  We cannot guess the include
9885     # path from the python_prefix either, because that include path
9886     # depends on the Python version.  So, there is nothing much we can
9887     # do except assume that the compiler will be able to find those files.
9888     python_includes=
9889     python_libs=
9890     have_python_config=no
9891   fi
9892
9893   # If we have python-config, only try the configuration it provides.
9894   # Otherwise fallback on the old way of trying different versions of
9895   # python in turn.
9896
9897   have_libpython=no
9898   if test "${have_python_config}" = yes; then
9899     # Determine the Python version by extracting "-lpython<version>"
9900     # part of the python_libs. <version> is usually X.Y with X and Y
9901     # being decimal numbers, but can also be XY (seen on Windows).
9902     #
9903     # The extraction is performed using sed with a regular expression.
9904     # Initially, the regexp used was using the '?' quantifier to make
9905     # the dot in the version number optional.  Unfortunately, this
9906     # does not work with non-GNU versions of sed because, because of
9907     # what looks like a limitation (the '?' quantifier does not work
9908     # with back-references).  We work around this limitation by using
9909     # the '*' quantifier instead.  It means that, in theory, we might
9910     # match unexpected version strings such as "-lpython2..7", but
9911     # this seems unlikely in practice.  And even if that happens,
9912     # an error will be triggered later on, when checking that version
9913     # number.
9914     python_version=`echo " ${python_libs} " \
9915                          | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
9916     case "${python_version}" in
9917     python*)
9918
9919   version=${python_version}
9920
9921   new_CPPFLAGS=${python_includes}
9922   new_LIBS=${python_libs}
9923   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9924 $as_echo_n "checking for ${version}... " >&6; }
9925   save_CPPFLAGS=$CPPFLAGS
9926   save_LIBS=$LIBS
9927   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9928   LIBS="$LIBS $new_LIBS"
9929   found_usable_python=no
9930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9931 /* end confdefs.h.  */
9932 #include "Python.h"
9933 int
9934 main ()
9935 {
9936 Py_Initialize ();
9937   ;
9938   return 0;
9939 }
9940 _ACEOF
9941 if ac_fn_c_try_link "$LINENO"; then :
9942   have_libpython=${version}
9943                   found_usable_python=yes
9944                   PYTHON_CPPFLAGS=$new_CPPFLAGS
9945                   PYTHON_LIBS=$new_LIBS
9946 fi
9947 rm -f core conftest.err conftest.$ac_objext \
9948     conftest$ac_exeext conftest.$ac_ext
9949   CPPFLAGS=$save_CPPFLAGS
9950   LIBS=$save_LIBS
9951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9952 $as_echo "${found_usable_python}" >&6; }
9953
9954       ;;
9955     *)
9956       as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
9957       ;;
9958     esac
9959   elif test "${have_python_config}" != failed; then
9960     if test "${have_libpython}" = no; then
9961
9962   version=python2.7
9963
9964   new_CPPFLAGS=${python_includes}
9965   new_LIBS="${python_libs} -lpython2.7"
9966   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9967 $as_echo_n "checking for ${version}... " >&6; }
9968   save_CPPFLAGS=$CPPFLAGS
9969   save_LIBS=$LIBS
9970   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9971   LIBS="$LIBS $new_LIBS"
9972   found_usable_python=no
9973   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9974 /* end confdefs.h.  */
9975 #include "Python.h"
9976 int
9977 main ()
9978 {
9979 Py_Initialize ();
9980   ;
9981   return 0;
9982 }
9983 _ACEOF
9984 if ac_fn_c_try_link "$LINENO"; then :
9985   have_libpython=${version}
9986                   found_usable_python=yes
9987                   PYTHON_CPPFLAGS=$new_CPPFLAGS
9988                   PYTHON_LIBS=$new_LIBS
9989 fi
9990 rm -f core conftest.err conftest.$ac_objext \
9991     conftest$ac_exeext conftest.$ac_ext
9992   CPPFLAGS=$save_CPPFLAGS
9993   LIBS=$save_LIBS
9994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9995 $as_echo "${found_usable_python}" >&6; }
9996
9997     fi
9998     if test "${have_libpython}" = no; then
9999
10000   version=python2.6
10001
10002   new_CPPFLAGS=${python_includes}
10003   new_LIBS="${python_libs} -lpython2.6"
10004   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10005 $as_echo_n "checking for ${version}... " >&6; }
10006   save_CPPFLAGS=$CPPFLAGS
10007   save_LIBS=$LIBS
10008   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10009   LIBS="$LIBS $new_LIBS"
10010   found_usable_python=no
10011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10012 /* end confdefs.h.  */
10013 #include "Python.h"
10014 int
10015 main ()
10016 {
10017 Py_Initialize ();
10018   ;
10019   return 0;
10020 }
10021 _ACEOF
10022 if ac_fn_c_try_link "$LINENO"; then :
10023   have_libpython=${version}
10024                   found_usable_python=yes
10025                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10026                   PYTHON_LIBS=$new_LIBS
10027 fi
10028 rm -f core conftest.err conftest.$ac_objext \
10029     conftest$ac_exeext conftest.$ac_ext
10030   CPPFLAGS=$save_CPPFLAGS
10031   LIBS=$save_LIBS
10032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10033 $as_echo "${found_usable_python}" >&6; }
10034
10035     fi
10036     if test ${have_libpython} = no; then
10037
10038   version=python2.5
10039
10040   new_CPPFLAGS=${python_includes}
10041   new_LIBS="${python_libs} -lpython2.5"
10042   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10043 $as_echo_n "checking for ${version}... " >&6; }
10044   save_CPPFLAGS=$CPPFLAGS
10045   save_LIBS=$LIBS
10046   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10047   LIBS="$LIBS $new_LIBS"
10048   found_usable_python=no
10049   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10050 /* end confdefs.h.  */
10051 #include "Python.h"
10052 int
10053 main ()
10054 {
10055 Py_Initialize ();
10056   ;
10057   return 0;
10058 }
10059 _ACEOF
10060 if ac_fn_c_try_link "$LINENO"; then :
10061   have_libpython=${version}
10062                   found_usable_python=yes
10063                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10064                   PYTHON_LIBS=$new_LIBS
10065 fi
10066 rm -f core conftest.err conftest.$ac_objext \
10067     conftest$ac_exeext conftest.$ac_ext
10068   CPPFLAGS=$save_CPPFLAGS
10069   LIBS=$save_LIBS
10070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10071 $as_echo "${found_usable_python}" >&6; }
10072
10073     fi
10074     if test ${have_libpython} = no; then
10075
10076   version=python2.4
10077
10078   new_CPPFLAGS=${python_includes}
10079   new_LIBS="${python_libs} -lpython2.4"
10080   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10081 $as_echo_n "checking for ${version}... " >&6; }
10082   save_CPPFLAGS=$CPPFLAGS
10083   save_LIBS=$LIBS
10084   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10085   LIBS="$LIBS $new_LIBS"
10086   found_usable_python=no
10087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10088 /* end confdefs.h.  */
10089 #include "Python.h"
10090 int
10091 main ()
10092 {
10093 Py_Initialize ();
10094   ;
10095   return 0;
10096 }
10097 _ACEOF
10098 if ac_fn_c_try_link "$LINENO"; then :
10099   have_libpython=${version}
10100                   found_usable_python=yes
10101                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10102                   PYTHON_LIBS=$new_LIBS
10103 fi
10104 rm -f core conftest.err conftest.$ac_objext \
10105     conftest$ac_exeext conftest.$ac_ext
10106   CPPFLAGS=$save_CPPFLAGS
10107   LIBS=$save_LIBS
10108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10109 $as_echo "${found_usable_python}" >&6; }
10110
10111     fi
10112   fi
10113   if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
10114
10115 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10116
10117   elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
10118
10119 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10120
10121   elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
10122
10123 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10124
10125   elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
10126
10127 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10128
10129   fi
10130
10131   if test "${have_libpython}" = no; then
10132     case "${with_python}" in
10133     yes)
10134       as_fn_error "python is missing or unusable" "$LINENO" 5
10135       ;;
10136     auto)
10137       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10138 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10139       ;;
10140     *)
10141       as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10142       ;;
10143     esac
10144   else
10145     if test -n "${python_prefix}"; then
10146
10147 cat >>confdefs.h <<_ACEOF
10148 #define WITH_PYTHON_PATH "${python_prefix}"
10149 _ACEOF
10150
10151
10152   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10153      if test "x$prefix" = xNONE; then
10154         test_prefix=/usr/local
10155      else
10156         test_prefix=$prefix
10157      fi
10158   else
10159      test_prefix=$exec_prefix
10160   fi
10161   value=0
10162   case ${python_prefix} in
10163      "${test_prefix}"|"${test_prefix}/"*|\
10164         '${exec_prefix}'|'${exec_prefix}/'*)
10165      value=1
10166      ;;
10167   esac
10168
10169 cat >>confdefs.h <<_ACEOF
10170 #define PYTHON_PATH_RELOCATABLE $value
10171 _ACEOF
10172
10173
10174     fi
10175   fi
10176 fi
10177
10178 if test "${have_libpython}" != no; then
10179
10180 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10181
10182   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10183   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10184   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10185   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10186   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10187
10188   # Flags needed to compile Python code (taken from python-config --cflags).
10189   # We cannot call python-config directly because it will output whatever was
10190   # used when compiling the Python interpreter itself, including flags which
10191   # would make the python-related objects be compiled differently from the
10192   # rest of GDB (e.g., -O2 and -fPIC).
10193   if test "${GCC}" = yes; then
10194     tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10195   fi
10196
10197   if test "x${tentative_python_cflags}" != x; then
10198     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10199 $as_echo_n "checking compiler flags for python code... " >&6; }
10200     for flag in ${tentative_python_cflags}; do
10201       # Check that the compiler accepts it
10202       saved_CFLAGS="$CFLAGS"
10203       CFLAGS="$CFLAGS $flag"
10204       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10205 /* end confdefs.h.  */
10206
10207 int
10208 main ()
10209 {
10210
10211   ;
10212   return 0;
10213 }
10214 _ACEOF
10215 if ac_fn_c_try_compile "$LINENO"; then :
10216   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10217 fi
10218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10219       CFLAGS="$saved_CFLAGS"
10220     done
10221     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10222 $as_echo "${PYTHON_CFLAGS}" >&6; }
10223   fi
10224
10225   # On x64 Windows, Python's include headers, and pyconfig.h in
10226   # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10227   # version of Windows.  Unfortunately, MS_WIN64 is only defined if
10228   # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
10229   # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10230   # The issue was reported to the Python community, but still isn't
10231   # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10232
10233   case "$gdb_host" in
10234     mingw64)
10235            if test "${GCC}" = yes; then
10236              CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10237            fi
10238            ;;
10239   esac
10240
10241   # Note that "python -m threading" cannot be used to check for
10242   # threading support due to a bug in Python 2.7.3
10243   # (http://bugs.python.org/issue15567).
10244   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10245 $as_echo_n "checking whether python supports threads... " >&6; }
10246   saved_CPPFLAGS="${CPPFLAGS}"
10247   CPPFLAGS="${PYTHON_CPPFLAGS}"
10248   # Note that the test is reversed so that python_has_threads=yes on
10249   # unexpected failures.
10250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10251 /* end confdefs.h.  */
10252
10253 #include <Python.h>
10254 #ifdef WITH_THREAD
10255 # error
10256 #endif
10257
10258 _ACEOF
10259 if ac_fn_c_try_cpp "$LINENO"; then :
10260   python_has_threads=no
10261 else
10262   python_has_threads=yes
10263 fi
10264 rm -f conftest.err conftest.$ac_ext
10265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10266 $as_echo "${python_has_threads}" >&6; }
10267   CPPFLAGS="${saved_CPPFLAGS}"
10268 else
10269   # Even if Python support is not compiled in, we need to have this file
10270   # included so that the "python" command, et.al., still exists.
10271   CONFIG_OBS="$CONFIG_OBS python.o"
10272   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10273 fi
10274
10275 # Work around Python http://bugs.python.org/issue10112.  See also
10276 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10277 # no effect.  Note that the only test after this that uses Python is
10278 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10279 # run without -export-dynamic too.
10280 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10281
10282
10283
10284
10285  if test "${have_libpython}" != no; then
10286   HAVE_PYTHON_TRUE=
10287   HAVE_PYTHON_FALSE='#'
10288 else
10289   HAVE_PYTHON_TRUE='#'
10290   HAVE_PYTHON_FALSE=
10291 fi
10292
10293
10294 # -------------------- #
10295 # Check for libguile.  #
10296 # -------------------- #
10297
10298
10299
10300
10301
10302
10303 # Check whether --with-guile was given.
10304 if test "${with_guile+set}" = set; then :
10305   withval=$with_guile;
10306 else
10307   with_guile=auto
10308 fi
10309
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10311 $as_echo_n "checking whether to use guile... " >&6; }
10312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10313 $as_echo "$with_guile" >&6; }
10314
10315 # Extract the first word of "pkg-config", so it can be a program name with args.
10316 set dummy pkg-config; ac_word=$2
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10318 $as_echo_n "checking for $ac_word... " >&6; }
10319 if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
10320   $as_echo_n "(cached) " >&6
10321 else
10322   case $pkg_config_prog_path in
10323   [\\/]* | ?:[\\/]*)
10324   ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10325   ;;
10326   *)
10327   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10328 for as_dir in $PATH
10329 do
10330   IFS=$as_save_IFS
10331   test -z "$as_dir" && as_dir=.
10332     for ac_exec_ext in '' $ac_executable_extensions; do
10333   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10334     ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10336     break 2
10337   fi
10338 done
10339   done
10340 IFS=$as_save_IFS
10341
10342   test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10343   ;;
10344 esac
10345 fi
10346 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10347 if test -n "$pkg_config_prog_path"; then
10348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10349 $as_echo "$pkg_config_prog_path" >&6; }
10350 else
10351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10352 $as_echo "no" >&6; }
10353 fi
10354
10355
10356
10357 try_guile_versions="guile-2.2 guile-2.0"
10358 have_libguile=no
10359 case "${with_guile}" in
10360 no)
10361   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10362 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10363   ;;
10364 auto)
10365   if test "${pkg_config_prog_path}" = "missing"; then
10366     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10367 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10368   else
10369
10370   pkg_config=${pkg_config_prog_path}
10371   guile_version_list=${try_guile_versions}
10372   flag_errors=no
10373
10374   found_usable_guile=checking
10375   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10376 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10377   for guile_version in ${guile_version_list}; do
10378     ${pkg_config} --exists ${guile_version} 2>/dev/null
10379     if test $? != 0; then
10380       continue
10381     fi
10382             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10383     if test $? != 0; then
10384       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10385     fi
10386     new_LIBS=`${pkg_config} --libs ${guile_version}`
10387     if test $? != 0; then
10388       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10389     fi
10390         found_usable_guile=${guile_version}
10391     break
10392   done
10393   if test "${found_usable_guile}" = "checking"; then
10394     if test "${flag_errors}" = "yes"; then
10395       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10396     else
10397       found_usable_guile=no
10398     fi
10399   fi
10400       if test "${found_usable_guile}" != no; then
10401     save_CPPFLAGS=$CPPFLAGS
10402     save_LIBS=$LIBS
10403     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10404     LIBS="$LIBS $new_LIBS"
10405     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10406 /* end confdefs.h.  */
10407 #include "libguile.h"
10408 int
10409 main ()
10410 {
10411 scm_init_guile ();
10412   ;
10413   return 0;
10414 }
10415 _ACEOF
10416 if ac_fn_c_try_link "$LINENO"; then :
10417   have_libguile=yes
10418                     GUILE_CPPFLAGS=$new_CPPFLAGS
10419                     GUILE_LIBS=$new_LIBS
10420 else
10421   found_usable_guile=no
10422 fi
10423 rm -f core conftest.err conftest.$ac_objext \
10424     conftest$ac_exeext conftest.$ac_ext
10425         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10426 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10427
10428 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10429
10430
10431 fi
10432
10433     CPPFLAGS=$save_CPPFLAGS
10434     LIBS=$save_LIBS
10435     if test "${found_usable_guile}" = no; then
10436       if test "${flag_errors}" = yes; then
10437         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10438 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10439 as_fn_error "linking guile version ${guile_version} test program failed
10440 See \`config.log' for more details." "$LINENO" 5; }
10441       fi
10442     fi
10443   fi
10444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10445 $as_echo "${found_usable_guile}" >&6; }
10446
10447   fi
10448   ;;
10449 yes)
10450   if test "${pkg_config_prog_path}" = "missing"; then
10451     as_fn_error "pkg-config not found" "$LINENO" 5
10452   fi
10453
10454   pkg_config=${pkg_config_prog_path}
10455   guile_version_list=${try_guile_versions}
10456   flag_errors=yes
10457
10458   found_usable_guile=checking
10459   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10460 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10461   for guile_version in ${guile_version_list}; do
10462     ${pkg_config} --exists ${guile_version} 2>/dev/null
10463     if test $? != 0; then
10464       continue
10465     fi
10466             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10467     if test $? != 0; then
10468       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10469     fi
10470     new_LIBS=`${pkg_config} --libs ${guile_version}`
10471     if test $? != 0; then
10472       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10473     fi
10474         found_usable_guile=${guile_version}
10475     break
10476   done
10477   if test "${found_usable_guile}" = "checking"; then
10478     if test "${flag_errors}" = "yes"; then
10479       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10480     else
10481       found_usable_guile=no
10482     fi
10483   fi
10484       if test "${found_usable_guile}" != no; then
10485     save_CPPFLAGS=$CPPFLAGS
10486     save_LIBS=$LIBS
10487     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10488     LIBS="$LIBS $new_LIBS"
10489     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10490 /* end confdefs.h.  */
10491 #include "libguile.h"
10492 int
10493 main ()
10494 {
10495 scm_init_guile ();
10496   ;
10497   return 0;
10498 }
10499 _ACEOF
10500 if ac_fn_c_try_link "$LINENO"; then :
10501   have_libguile=yes
10502                     GUILE_CPPFLAGS=$new_CPPFLAGS
10503                     GUILE_LIBS=$new_LIBS
10504 else
10505   found_usable_guile=no
10506 fi
10507 rm -f core conftest.err conftest.$ac_objext \
10508     conftest$ac_exeext conftest.$ac_ext
10509         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10510 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10511
10512 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10513
10514
10515 fi
10516
10517     CPPFLAGS=$save_CPPFLAGS
10518     LIBS=$save_LIBS
10519     if test "${found_usable_guile}" = no; then
10520       if test "${flag_errors}" = yes; then
10521         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10522 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10523 as_fn_error "linking guile version ${guile_version} test program failed
10524 See \`config.log' for more details." "$LINENO" 5; }
10525       fi
10526     fi
10527   fi
10528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10529 $as_echo "${found_usable_guile}" >&6; }
10530
10531   ;;
10532 [\\/]* | ?:[\\/]*)
10533   if test -x "${with_guile}"; then
10534
10535   pkg_config=${with_guile}
10536   guile_version_list=${try_guile_versions}
10537   flag_errors=yes
10538
10539   found_usable_guile=checking
10540   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10541 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10542   for guile_version in ${guile_version_list}; do
10543     ${pkg_config} --exists ${guile_version} 2>/dev/null
10544     if test $? != 0; then
10545       continue
10546     fi
10547             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10548     if test $? != 0; then
10549       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10550     fi
10551     new_LIBS=`${pkg_config} --libs ${guile_version}`
10552     if test $? != 0; then
10553       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10554     fi
10555         found_usable_guile=${guile_version}
10556     break
10557   done
10558   if test "${found_usable_guile}" = "checking"; then
10559     if test "${flag_errors}" = "yes"; then
10560       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10561     else
10562       found_usable_guile=no
10563     fi
10564   fi
10565       if test "${found_usable_guile}" != no; then
10566     save_CPPFLAGS=$CPPFLAGS
10567     save_LIBS=$LIBS
10568     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10569     LIBS="$LIBS $new_LIBS"
10570     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10571 /* end confdefs.h.  */
10572 #include "libguile.h"
10573 int
10574 main ()
10575 {
10576 scm_init_guile ();
10577   ;
10578   return 0;
10579 }
10580 _ACEOF
10581 if ac_fn_c_try_link "$LINENO"; then :
10582   have_libguile=yes
10583                     GUILE_CPPFLAGS=$new_CPPFLAGS
10584                     GUILE_LIBS=$new_LIBS
10585 else
10586   found_usable_guile=no
10587 fi
10588 rm -f core conftest.err conftest.$ac_objext \
10589     conftest$ac_exeext conftest.$ac_ext
10590         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10591 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10592
10593 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10594
10595
10596 fi
10597
10598     CPPFLAGS=$save_CPPFLAGS
10599     LIBS=$save_LIBS
10600     if test "${found_usable_guile}" = no; then
10601       if test "${flag_errors}" = yes; then
10602         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10603 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10604 as_fn_error "linking guile version ${guile_version} test program failed
10605 See \`config.log' for more details." "$LINENO" 5; }
10606       fi
10607     fi
10608   fi
10609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10610 $as_echo "${found_usable_guile}" >&6; }
10611
10612   else
10613     as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
10614   fi
10615   ;;
10616 "" | */*)
10617   # Disallow --with=guile="" and --with-guile=foo/bar.
10618   as_fn_error "invalid value for --with-guile" "$LINENO" 5
10619   ;;
10620 *)
10621   # A space separate list of guile versions to try, in order.
10622   if test "${pkg_config_prog_path}" = "missing"; then
10623     as_fn_error "pkg-config not found" "$LINENO" 5
10624   fi
10625
10626   pkg_config=${pkg_config_prog_path}
10627   guile_version_list=${with_guile}
10628   flag_errors=yes
10629
10630   found_usable_guile=checking
10631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10632 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10633   for guile_version in ${guile_version_list}; do
10634     ${pkg_config} --exists ${guile_version} 2>/dev/null
10635     if test $? != 0; then
10636       continue
10637     fi
10638             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10639     if test $? != 0; then
10640       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10641     fi
10642     new_LIBS=`${pkg_config} --libs ${guile_version}`
10643     if test $? != 0; then
10644       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10645     fi
10646         found_usable_guile=${guile_version}
10647     break
10648   done
10649   if test "${found_usable_guile}" = "checking"; then
10650     if test "${flag_errors}" = "yes"; then
10651       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10652     else
10653       found_usable_guile=no
10654     fi
10655   fi
10656       if test "${found_usable_guile}" != no; then
10657     save_CPPFLAGS=$CPPFLAGS
10658     save_LIBS=$LIBS
10659     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10660     LIBS="$LIBS $new_LIBS"
10661     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10662 /* end confdefs.h.  */
10663 #include "libguile.h"
10664 int
10665 main ()
10666 {
10667 scm_init_guile ();
10668   ;
10669   return 0;
10670 }
10671 _ACEOF
10672 if ac_fn_c_try_link "$LINENO"; then :
10673   have_libguile=yes
10674                     GUILE_CPPFLAGS=$new_CPPFLAGS
10675                     GUILE_LIBS=$new_LIBS
10676 else
10677   found_usable_guile=no
10678 fi
10679 rm -f core conftest.err conftest.$ac_objext \
10680     conftest$ac_exeext conftest.$ac_ext
10681         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10682 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10683
10684 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10685
10686
10687 fi
10688
10689     CPPFLAGS=$save_CPPFLAGS
10690     LIBS=$save_LIBS
10691     if test "${found_usable_guile}" = no; then
10692       if test "${flag_errors}" = yes; then
10693         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10694 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10695 as_fn_error "linking guile version ${guile_version} test program failed
10696 See \`config.log' for more details." "$LINENO" 5; }
10697       fi
10698     fi
10699   fi
10700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10701 $as_echo "${found_usable_guile}" >&6; }
10702
10703   ;;
10704 esac
10705
10706 if test "${have_libguile}" != no; then
10707     case "${with_guile}" in
10708   [\\/]* | ?:[\\/]*)
10709
10710   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10711 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10712 if test "${ac_cv_guild_program_name+set}" = set; then :
10713   $as_echo_n "(cached) " >&6
10714 else
10715   ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
10716
10717      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10718      # the 'guild' and 'bindir' variables.  In that case, try to guess
10719      # what the program name is, at the risk of getting it wrong if
10720      # Guile was configured with '--program-suffix' or similar.
10721      if test "x$ac_cv_guild_program_name" = "x"; then
10722        guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
10723        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10724      fi
10725
10726 fi
10727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10728 $as_echo "$ac_cv_guild_program_name" >&6; }
10729
10730   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10731     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10732   fi
10733
10734   GUILD="$ac_cv_guild_program_name"
10735
10736
10737     ;;
10738   *)
10739
10740   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10741 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10742 if test "${ac_cv_guild_program_name+set}" = set; then :
10743   $as_echo_n "(cached) " >&6
10744 else
10745   ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
10746
10747      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10748      # the 'guild' and 'bindir' variables.  In that case, try to guess
10749      # what the program name is, at the risk of getting it wrong if
10750      # Guile was configured with '--program-suffix' or similar.
10751      if test "x$ac_cv_guild_program_name" = "x"; then
10752        guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
10753        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10754      fi
10755
10756 fi
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10758 $as_echo "$ac_cv_guild_program_name" >&6; }
10759
10760   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10761     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10762   fi
10763
10764   GUILD="$ac_cv_guild_program_name"
10765
10766
10767     ;;
10768   esac
10769
10770
10771   if test "$cross_compiling" = no; then
10772     GUILD_TARGET_FLAG=
10773   else
10774     GUILD_TARGET_FLAG="--target=$host"
10775   fi
10776
10777
10778
10779
10780   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
10781 $as_echo_n "checking whether guild supports this host... " >&6; }
10782 if test "${ac_cv_guild_ok+set}" = set; then :
10783   $as_echo_n "(cached) " >&6
10784 else
10785   echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
10786      if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
10787        ac_cv_guild_ok=yes
10788      else
10789        ac_cv_guild_ok=no
10790      fi
10791 fi
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
10793 $as_echo "$ac_cv_guild_ok" >&6; }
10794
10795     if test "$ac_cv_guild_ok" = no; then
10796     have_libguile=no
10797     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
10798 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
10799   fi
10800 fi
10801
10802 if test "${have_libguile}" != no; then
10803
10804 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
10805
10806   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
10807   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
10808   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
10809   CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
10810   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
10811
10812     save_LIBS="$LIBS"
10813   save_CPPFLAGS="$CPPFLAGS"
10814   LIBS="$GUILE_LIBS"
10815   CPPFLAGS="$GUILE_CPPFLAGS"
10816   for ac_func in scm_new_smob
10817 do :
10818   ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
10819 if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
10820   cat >>confdefs.h <<_ACEOF
10821 #define HAVE_SCM_NEW_SMOB 1
10822 _ACEOF
10823
10824 fi
10825 done
10826
10827   LIBS="$save_LIBS"
10828   CPPFLAGS="$save_CPPFLAGS"
10829 else
10830   # Even if Guile support is not compiled in, we need to have these files
10831   # included.
10832   CONFIG_OBS="$CONFIG_OBS guile.o"
10833   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10834 fi
10835
10836
10837  if test "${have_libguile}" != no; then
10838   HAVE_GUILE_TRUE=
10839   HAVE_GUILE_FALSE='#'
10840 else
10841   HAVE_GUILE_TRUE='#'
10842   HAVE_GUILE_FALSE=
10843 fi
10844
10845
10846 # --------------------- #
10847 # Check for libmcheck.  #
10848 # --------------------- #
10849
10850 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
10851 # but turn it off if Python is enabled with threads, since -lmcheck is
10852 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10853 # and for releases.
10854 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10855    && $development; then
10856   libmcheck_default=yes
10857 else
10858   libmcheck_default=no
10859 fi
10860
10861   # Check whether --enable-libmcheck was given.
10862 if test "${enable_libmcheck+set}" = set; then :
10863   enableval=$enable_libmcheck; case "${enableval}" in
10864       yes | y) ENABLE_LIBMCHECK="yes" ;;
10865       no | n)  ENABLE_LIBMCHECK="no" ;;
10866       *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10867     esac
10868 fi
10869
10870
10871   if test -z "${ENABLE_LIBMCHECK}"; then
10872     ENABLE_LIBMCHECK=${libmcheck_default}
10873   fi
10874
10875   if test "$ENABLE_LIBMCHECK" = "yes" ; then
10876     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
10877 $as_echo_n "checking for main in -lmcheck... " >&6; }
10878 if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10879   $as_echo_n "(cached) " >&6
10880 else
10881   ac_check_lib_save_LIBS=$LIBS
10882 LIBS="-lmcheck  $LIBS"
10883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10884 /* end confdefs.h.  */
10885
10886
10887 int
10888 main ()
10889 {
10890 return main ();
10891   ;
10892   return 0;
10893 }
10894 _ACEOF
10895 if ac_fn_c_try_link "$LINENO"; then :
10896   ac_cv_lib_mcheck_main=yes
10897 else
10898   ac_cv_lib_mcheck_main=no
10899 fi
10900 rm -f core conftest.err conftest.$ac_objext \
10901     conftest$ac_exeext conftest.$ac_ext
10902 LIBS=$ac_check_lib_save_LIBS
10903 fi
10904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10905 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
10906 if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10907   cat >>confdefs.h <<_ACEOF
10908 #define HAVE_LIBMCHECK 1
10909 _ACEOF
10910
10911   LIBS="-lmcheck $LIBS"
10912
10913 fi
10914
10915   fi
10916
10917
10918 if test "$ENABLE_LIBMCHECK" = "yes" \
10919         -a "${have_libpython}" != "no" \
10920         -a "${python_has_threads}" = "yes" ; then
10921   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10922 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
10923 fi
10924
10925
10926 # Check whether --with-intel_pt was given.
10927 if test "${with_intel_pt+set}" = set; then :
10928   withval=$with_intel_pt;
10929 else
10930   with_intel_pt=auto
10931 fi
10932
10933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10934 $as_echo_n "checking whether to use intel pt... " >&6; }
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10936 $as_echo "$with_intel_pt" >&6; }
10937
10938 if test "${with_intel_pt}" = no; then
10939   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10940 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
10941   HAVE_LIBIPT=no
10942 else
10943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10944 /* end confdefs.h.  */
10945
10946 #include <linux/perf_event.h>
10947 #ifndef PERF_ATTR_SIZE_VER5
10948 # error
10949 #endif
10950
10951 _ACEOF
10952 if ac_fn_c_try_cpp "$LINENO"; then :
10953   perf_event=yes
10954 else
10955   perf_event=no
10956 fi
10957 rm -f conftest.err conftest.$ac_ext
10958   if test "$perf_event" != yes; then
10959     if test "$with_intel_pt" = yes; then
10960       as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10961     else
10962       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10963 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10964     fi
10965   fi
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975     use_additional=yes
10976
10977   acl_save_prefix="$prefix"
10978   prefix="$acl_final_prefix"
10979   acl_save_exec_prefix="$exec_prefix"
10980   exec_prefix="$acl_final_exec_prefix"
10981
10982     eval additional_includedir=\"$includedir\"
10983     eval additional_libdir=\"$libdir\"
10984
10985   exec_prefix="$acl_save_exec_prefix"
10986   prefix="$acl_save_prefix"
10987
10988
10989 # Check whether --with-libipt-prefix was given.
10990 if test "${with_libipt_prefix+set}" = set; then :
10991   withval=$with_libipt_prefix;
10992     if test "X$withval" = "Xno"; then
10993       use_additional=no
10994     else
10995       if test "X$withval" = "X"; then
10996
10997   acl_save_prefix="$prefix"
10998   prefix="$acl_final_prefix"
10999   acl_save_exec_prefix="$exec_prefix"
11000   exec_prefix="$acl_final_exec_prefix"
11001
11002           eval additional_includedir=\"$includedir\"
11003           eval additional_libdir=\"$libdir\"
11004
11005   exec_prefix="$acl_save_exec_prefix"
11006   prefix="$acl_save_prefix"
11007
11008       else
11009         additional_includedir="$withval/include"
11010         additional_libdir="$withval/lib"
11011       fi
11012     fi
11013
11014 fi
11015
11016       LIBIPT=
11017   LTLIBIPT=
11018   INCIPT=
11019   rpathdirs=
11020   ltrpathdirs=
11021   names_already_handled=
11022   names_next_round='ipt '
11023   while test -n "$names_next_round"; do
11024     names_this_round="$names_next_round"
11025     names_next_round=
11026     for name in $names_this_round; do
11027       already_handled=
11028       for n in $names_already_handled; do
11029         if test "$n" = "$name"; then
11030           already_handled=yes
11031           break
11032         fi
11033       done
11034       if test -z "$already_handled"; then
11035         names_already_handled="$names_already_handled $name"
11036                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11037         eval value=\"\$HAVE_LIB$uppername\"
11038         if test -n "$value"; then
11039           if test "$value" = yes; then
11040             eval value=\"\$LIB$uppername\"
11041             test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11042             eval value=\"\$LTLIB$uppername\"
11043             test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11044           else
11045                                     :
11046           fi
11047         else
11048                               found_dir=
11049           found_la=
11050           found_so=
11051           found_a=
11052           if test $use_additional = yes; then
11053             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11054               found_dir="$additional_libdir"
11055               found_so="$additional_libdir/lib$name.$shlibext"
11056               if test -f "$additional_libdir/lib$name.la"; then
11057                 found_la="$additional_libdir/lib$name.la"
11058               fi
11059             else
11060               if test -f "$additional_libdir/lib$name.$libext"; then
11061                 found_dir="$additional_libdir"
11062                 found_a="$additional_libdir/lib$name.$libext"
11063                 if test -f "$additional_libdir/lib$name.la"; then
11064                   found_la="$additional_libdir/lib$name.la"
11065                 fi
11066               fi
11067             fi
11068           fi
11069           if test "X$found_dir" = "X"; then
11070             for x in $LDFLAGS $LTLIBIPT; do
11071
11072   acl_save_prefix="$prefix"
11073   prefix="$acl_final_prefix"
11074   acl_save_exec_prefix="$exec_prefix"
11075   exec_prefix="$acl_final_exec_prefix"
11076   eval x=\"$x\"
11077   exec_prefix="$acl_save_exec_prefix"
11078   prefix="$acl_save_prefix"
11079
11080               case "$x" in
11081                 -L*)
11082                   dir=`echo "X$x" | sed -e 's/^X-L//'`
11083                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11084                     found_dir="$dir"
11085                     found_so="$dir/lib$name.$shlibext"
11086                     if test -f "$dir/lib$name.la"; then
11087                       found_la="$dir/lib$name.la"
11088                     fi
11089                   else
11090                     if test -f "$dir/lib$name.$libext"; then
11091                       found_dir="$dir"
11092                       found_a="$dir/lib$name.$libext"
11093                       if test -f "$dir/lib$name.la"; then
11094                         found_la="$dir/lib$name.la"
11095                       fi
11096                     fi
11097                   fi
11098                   ;;
11099               esac
11100               if test "X$found_dir" != "X"; then
11101                 break
11102               fi
11103             done
11104           fi
11105           if test "X$found_dir" != "X"; then
11106                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11107             if test "X$found_so" != "X"; then
11108                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11109                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11110               else
11111                                                                                 haveit=
11112                 for x in $ltrpathdirs; do
11113                   if test "X$x" = "X$found_dir"; then
11114                     haveit=yes
11115                     break
11116                   fi
11117                 done
11118                 if test -z "$haveit"; then
11119                   ltrpathdirs="$ltrpathdirs $found_dir"
11120                 fi
11121                                 if test "$hardcode_direct" = yes; then
11122                                                       LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11123                 else
11124                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11125                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11126                                                             haveit=
11127                     for x in $rpathdirs; do
11128                       if test "X$x" = "X$found_dir"; then
11129                         haveit=yes
11130                         break
11131                       fi
11132                     done
11133                     if test -z "$haveit"; then
11134                       rpathdirs="$rpathdirs $found_dir"
11135                     fi
11136                   else
11137                                                                                 haveit=
11138                     for x in $LDFLAGS $LIBIPT; do
11139
11140   acl_save_prefix="$prefix"
11141   prefix="$acl_final_prefix"
11142   acl_save_exec_prefix="$exec_prefix"
11143   exec_prefix="$acl_final_exec_prefix"
11144   eval x=\"$x\"
11145   exec_prefix="$acl_save_exec_prefix"
11146   prefix="$acl_save_prefix"
11147
11148                       if test "X$x" = "X-L$found_dir"; then
11149                         haveit=yes
11150                         break
11151                       fi
11152                     done
11153                     if test -z "$haveit"; then
11154                       LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11155                     fi
11156                     if test "$hardcode_minus_L" != no; then
11157                                                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11158                     else
11159                                                                                                                                                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11160                     fi
11161                   fi
11162                 fi
11163               fi
11164             else
11165               if test "X$found_a" != "X"; then
11166                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11167               else
11168                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11169               fi
11170             fi
11171                         additional_includedir=
11172             case "$found_dir" in
11173               */lib | */lib/)
11174                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11175                 additional_includedir="$basedir/include"
11176                 ;;
11177             esac
11178             if test "X$additional_includedir" != "X"; then
11179                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
11180                 haveit=
11181                 if test "X$additional_includedir" = "X/usr/local/include"; then
11182                   if test -n "$GCC"; then
11183                     case $host_os in
11184                       linux*) haveit=yes;;
11185                     esac
11186                   fi
11187                 fi
11188                 if test -z "$haveit"; then
11189                   for x in $CPPFLAGS $INCIPT; do
11190
11191   acl_save_prefix="$prefix"
11192   prefix="$acl_final_prefix"
11193   acl_save_exec_prefix="$exec_prefix"
11194   exec_prefix="$acl_final_exec_prefix"
11195   eval x=\"$x\"
11196   exec_prefix="$acl_save_exec_prefix"
11197   prefix="$acl_save_prefix"
11198
11199                     if test "X$x" = "X-I$additional_includedir"; then
11200                       haveit=yes
11201                       break
11202                     fi
11203                   done
11204                   if test -z "$haveit"; then
11205                     if test -d "$additional_includedir"; then
11206                                             INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11207                     fi
11208                   fi
11209                 fi
11210               fi
11211             fi
11212                         if test -n "$found_la"; then
11213                                                         save_libdir="$libdir"
11214               case "$found_la" in
11215                 */* | *\\*) . "$found_la" ;;
11216                 *) . "./$found_la" ;;
11217               esac
11218               libdir="$save_libdir"
11219                             for dep in $dependency_libs; do
11220                 case "$dep" in
11221                   -L*)
11222                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11223                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
11224                       haveit=
11225                       if test "X$additional_libdir" = "X/usr/local/lib"; then
11226                         if test -n "$GCC"; then
11227                           case $host_os in
11228                             linux*) haveit=yes;;
11229                           esac
11230                         fi
11231                       fi
11232                       if test -z "$haveit"; then
11233                         haveit=
11234                         for x in $LDFLAGS $LIBIPT; do
11235
11236   acl_save_prefix="$prefix"
11237   prefix="$acl_final_prefix"
11238   acl_save_exec_prefix="$exec_prefix"
11239   exec_prefix="$acl_final_exec_prefix"
11240   eval x=\"$x\"
11241   exec_prefix="$acl_save_exec_prefix"
11242   prefix="$acl_save_prefix"
11243
11244                           if test "X$x" = "X-L$additional_libdir"; then
11245                             haveit=yes
11246                             break
11247                           fi
11248                         done
11249                         if test -z "$haveit"; then
11250                           if test -d "$additional_libdir"; then
11251                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11252                           fi
11253                         fi
11254                         haveit=
11255                         for x in $LDFLAGS $LTLIBIPT; do
11256
11257   acl_save_prefix="$prefix"
11258   prefix="$acl_final_prefix"
11259   acl_save_exec_prefix="$exec_prefix"
11260   exec_prefix="$acl_final_exec_prefix"
11261   eval x=\"$x\"
11262   exec_prefix="$acl_save_exec_prefix"
11263   prefix="$acl_save_prefix"
11264
11265                           if test "X$x" = "X-L$additional_libdir"; then
11266                             haveit=yes
11267                             break
11268                           fi
11269                         done
11270                         if test -z "$haveit"; then
11271                           if test -d "$additional_libdir"; then
11272                                                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11273                           fi
11274                         fi
11275                       fi
11276                     fi
11277                     ;;
11278                   -R*)
11279                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
11280                     if test "$enable_rpath" != no; then
11281                                                                   haveit=
11282                       for x in $rpathdirs; do
11283                         if test "X$x" = "X$dir"; then
11284                           haveit=yes
11285                           break
11286                         fi
11287                       done
11288                       if test -z "$haveit"; then
11289                         rpathdirs="$rpathdirs $dir"
11290                       fi
11291                                                                   haveit=
11292                       for x in $ltrpathdirs; do
11293                         if test "X$x" = "X$dir"; then
11294                           haveit=yes
11295                           break
11296                         fi
11297                       done
11298                       if test -z "$haveit"; then
11299                         ltrpathdirs="$ltrpathdirs $dir"
11300                       fi
11301                     fi
11302                     ;;
11303                   -l*)
11304                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11305                     ;;
11306                   *.la)
11307                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11308                     ;;
11309                   *)
11310                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11311                     LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11312                     ;;
11313                 esac
11314               done
11315             fi
11316           else
11317                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11318             LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11319           fi
11320         fi
11321       fi
11322     done
11323   done
11324   if test "X$rpathdirs" != "X"; then
11325     if test -n "$hardcode_libdir_separator"; then
11326                         alldirs=
11327       for found_dir in $rpathdirs; do
11328         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11329       done
11330             acl_save_libdir="$libdir"
11331       libdir="$alldirs"
11332       eval flag=\"$hardcode_libdir_flag_spec\"
11333       libdir="$acl_save_libdir"
11334       LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11335     else
11336             for found_dir in $rpathdirs; do
11337         acl_save_libdir="$libdir"
11338         libdir="$found_dir"
11339         eval flag=\"$hardcode_libdir_flag_spec\"
11340         libdir="$acl_save_libdir"
11341         LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11342       done
11343     fi
11344   fi
11345   if test "X$ltrpathdirs" != "X"; then
11346             for found_dir in $ltrpathdirs; do
11347       LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11348     done
11349   fi
11350
11351
11352         ac_save_CPPFLAGS="$CPPFLAGS"
11353
11354   for element in $INCIPT; do
11355     haveit=
11356     for x in $CPPFLAGS; do
11357
11358   acl_save_prefix="$prefix"
11359   prefix="$acl_final_prefix"
11360   acl_save_exec_prefix="$exec_prefix"
11361   exec_prefix="$acl_final_exec_prefix"
11362   eval x=\"$x\"
11363   exec_prefix="$acl_save_exec_prefix"
11364   prefix="$acl_save_prefix"
11365
11366       if test "X$x" = "X$element"; then
11367         haveit=yes
11368         break
11369       fi
11370     done
11371     if test -z "$haveit"; then
11372       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11373     fi
11374   done
11375
11376
11377   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11378 $as_echo_n "checking for libipt... " >&6; }
11379 if test "${ac_cv_libipt+set}" = set; then :
11380   $as_echo_n "(cached) " >&6
11381 else
11382
11383     ac_save_LIBS="$LIBS"
11384     LIBS="$LIBS $LIBIPT"
11385     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11386 /* end confdefs.h.  */
11387 #include "intel-pt.h"
11388 int
11389 main ()
11390 {
11391 pt_insn_alloc_decoder (0);
11392   ;
11393   return 0;
11394 }
11395 _ACEOF
11396 if ac_fn_c_try_link "$LINENO"; then :
11397   ac_cv_libipt=yes
11398 else
11399   ac_cv_libipt=no
11400 fi
11401 rm -f core conftest.err conftest.$ac_objext \
11402     conftest$ac_exeext conftest.$ac_ext
11403     LIBS="$ac_save_LIBS"
11404
11405 fi
11406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11407 $as_echo "$ac_cv_libipt" >&6; }
11408   if test "$ac_cv_libipt" = yes; then
11409     HAVE_LIBIPT=yes
11410
11411 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11412
11413     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11414 $as_echo_n "checking how to link with libipt... " >&6; }
11415     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11416 $as_echo "$LIBIPT" >&6; }
11417   else
11418     HAVE_LIBIPT=no
11419             CPPFLAGS="$ac_save_CPPFLAGS"
11420     LIBIPT=
11421     LTLIBIPT=
11422   fi
11423
11424
11425
11426
11427
11428
11429   if test "$HAVE_LIBIPT" != yes; then
11430     if test "$with_intel_pt" = yes; then
11431       as_fn_error "libipt is missing or unusable" "$LINENO" 5
11432     else
11433       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11434 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11435     fi
11436   fi
11437 fi
11438
11439 # ------------------------- #
11440 # Checks for header files.  #
11441 # ------------------------- #
11442
11443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11444 $as_echo_n "checking for ANSI C header files... " >&6; }
11445 if test "${ac_cv_header_stdc+set}" = set; then :
11446   $as_echo_n "(cached) " >&6
11447 else
11448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11449 /* end confdefs.h.  */
11450 #include <stdlib.h>
11451 #include <stdarg.h>
11452 #include <string.h>
11453 #include <float.h>
11454
11455 int
11456 main ()
11457 {
11458
11459   ;
11460   return 0;
11461 }
11462 _ACEOF
11463 if ac_fn_c_try_compile "$LINENO"; then :
11464   ac_cv_header_stdc=yes
11465 else
11466   ac_cv_header_stdc=no
11467 fi
11468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11469
11470 if test $ac_cv_header_stdc = yes; then
11471   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11472   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11473 /* end confdefs.h.  */
11474 #include <string.h>
11475
11476 _ACEOF
11477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11478   $EGREP "memchr" >/dev/null 2>&1; then :
11479
11480 else
11481   ac_cv_header_stdc=no
11482 fi
11483 rm -f conftest*
11484
11485 fi
11486
11487 if test $ac_cv_header_stdc = yes; then
11488   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11489   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11490 /* end confdefs.h.  */
11491 #include <stdlib.h>
11492
11493 _ACEOF
11494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11495   $EGREP "free" >/dev/null 2>&1; then :
11496
11497 else
11498   ac_cv_header_stdc=no
11499 fi
11500 rm -f conftest*
11501
11502 fi
11503
11504 if test $ac_cv_header_stdc = yes; then
11505   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11506   if test "$cross_compiling" = yes; then :
11507   :
11508 else
11509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11510 /* end confdefs.h.  */
11511 #include <ctype.h>
11512 #include <stdlib.h>
11513 #if ((' ' & 0x0FF) == 0x020)
11514 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11515 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11516 #else
11517 # define ISLOWER(c) \
11518                    (('a' <= (c) && (c) <= 'i') \
11519                      || ('j' <= (c) && (c) <= 'r') \
11520                      || ('s' <= (c) && (c) <= 'z'))
11521 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11522 #endif
11523
11524 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11525 int
11526 main ()
11527 {
11528   int i;
11529   for (i = 0; i < 256; i++)
11530     if (XOR (islower (i), ISLOWER (i))
11531         || toupper (i) != TOUPPER (i))
11532       return 2;
11533   return 0;
11534 }
11535 _ACEOF
11536 if ac_fn_c_try_run "$LINENO"; then :
11537
11538 else
11539   ac_cv_header_stdc=no
11540 fi
11541 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11542   conftest.$ac_objext conftest.beam conftest.$ac_ext
11543 fi
11544
11545 fi
11546 fi
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11548 $as_echo "$ac_cv_header_stdc" >&6; }
11549 if test $ac_cv_header_stdc = yes; then
11550
11551 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11552
11553 fi
11554
11555 # elf_hp.h is for HP/UX 64-bit shared library support.
11556 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11557                   thread_db.h \
11558                   sys/fault.h \
11559                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11560                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11561                   sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11562                   termios.h termio.h \
11563                   sgtty.h elf_hp.h \
11564                   dlfcn.h
11565 do :
11566   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11567 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11568 eval as_val=\$$as_ac_Header
11569    if test "x$as_val" = x""yes; then :
11570   cat >>confdefs.h <<_ACEOF
11571 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11572 _ACEOF
11573
11574 fi
11575
11576 done
11577
11578 for ac_header in sys/proc.h
11579 do :
11580   ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11581 # include <sys/param.h>
11582 #endif
11583
11584 "
11585 if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
11586   cat >>confdefs.h <<_ACEOF
11587 #define HAVE_SYS_PROC_H 1
11588 _ACEOF
11589
11590 fi
11591
11592 done
11593
11594 for ac_header in sys/user.h
11595 do :
11596   ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11597 # include <sys/param.h>
11598 #endif
11599
11600 "
11601 if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11602   cat >>confdefs.h <<_ACEOF
11603 #define HAVE_SYS_USER_H 1
11604 _ACEOF
11605
11606 fi
11607
11608 done
11609
11610
11611 # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11612 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11613 # think that we don't have <curses.h> if we're using GCC.
11614 case $host_os in
11615   solaris2.[789])
11616     if test "$GCC" = yes; then
11617
11618 $as_echo "#define _MSE_INT_H 1" >>confdefs.h
11619
11620     fi ;;
11621 esac
11622 for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11623 do :
11624   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11625 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11626 eval as_val=\$$as_ac_Header
11627    if test "x$as_val" = x""yes; then :
11628   cat >>confdefs.h <<_ACEOF
11629 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11630 _ACEOF
11631
11632 fi
11633
11634 done
11635
11636 for ac_header in term.h
11637 do :
11638   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11639 # include <curses.h>
11640 #endif
11641
11642 "
11643 if test "x$ac_cv_header_term_h" = x""yes; then :
11644   cat >>confdefs.h <<_ACEOF
11645 #define HAVE_TERM_H 1
11646 _ACEOF
11647
11648 fi
11649
11650 done
11651
11652
11653 # ------------------------- #
11654 # Checks for declarations.  #
11655 # ------------------------- #
11656
11657
11658   # Check for presence and size of long long.
11659   ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11660 if test "x$ac_cv_type_long_long" = x""yes; then :
11661
11662 cat >>confdefs.h <<_ACEOF
11663 #define HAVE_LONG_LONG 1
11664 _ACEOF
11665
11666 # The cast to long int works around a bug in the HP C Compiler
11667 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11668 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11669 # This bug is HP SR number 8606223364.
11670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11671 $as_echo_n "checking size of long long... " >&6; }
11672 if test "${ac_cv_sizeof_long_long+set}" = set; then :
11673   $as_echo_n "(cached) " >&6
11674 else
11675   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
11676
11677 else
11678   if test "$ac_cv_type_long_long" = yes; then
11679      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11680 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11681 { as_fn_set_status 77
11682 as_fn_error "cannot compute sizeof (long long)
11683 See \`config.log' for more details." "$LINENO" 5; }; }
11684    else
11685      ac_cv_sizeof_long_long=0
11686    fi
11687 fi
11688
11689 fi
11690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11691 $as_echo "$ac_cv_sizeof_long_long" >&6; }
11692
11693
11694
11695 cat >>confdefs.h <<_ACEOF
11696 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11697 _ACEOF
11698
11699
11700 fi
11701
11702
11703   ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
11704 if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
11705   ac_have_decl=1
11706 else
11707   ac_have_decl=0
11708 fi
11709
11710 cat >>confdefs.h <<_ACEOF
11711 #define HAVE_DECL_BASENAME $ac_have_decl
11712 _ACEOF
11713 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11714 if test "x$ac_cv_have_decl_ffs" = x""yes; then :
11715   ac_have_decl=1
11716 else
11717   ac_have_decl=0
11718 fi
11719
11720 cat >>confdefs.h <<_ACEOF
11721 #define HAVE_DECL_FFS $ac_have_decl
11722 _ACEOF
11723 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11724 if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
11725   ac_have_decl=1
11726 else
11727   ac_have_decl=0
11728 fi
11729
11730 cat >>confdefs.h <<_ACEOF
11731 #define HAVE_DECL_ASPRINTF $ac_have_decl
11732 _ACEOF
11733 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11734 if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
11735   ac_have_decl=1
11736 else
11737   ac_have_decl=0
11738 fi
11739
11740 cat >>confdefs.h <<_ACEOF
11741 #define HAVE_DECL_VASPRINTF $ac_have_decl
11742 _ACEOF
11743 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11744 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11745   ac_have_decl=1
11746 else
11747   ac_have_decl=0
11748 fi
11749
11750 cat >>confdefs.h <<_ACEOF
11751 #define HAVE_DECL_SNPRINTF $ac_have_decl
11752 _ACEOF
11753 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11754 if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11755   ac_have_decl=1
11756 else
11757   ac_have_decl=0
11758 fi
11759
11760 cat >>confdefs.h <<_ACEOF
11761 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11762 _ACEOF
11763
11764   ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11765 if test "x$ac_cv_have_decl_strtol" = x""yes; then :
11766   ac_have_decl=1
11767 else
11768   ac_have_decl=0
11769 fi
11770
11771 cat >>confdefs.h <<_ACEOF
11772 #define HAVE_DECL_STRTOL $ac_have_decl
11773 _ACEOF
11774 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11775 if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
11776   ac_have_decl=1
11777 else
11778   ac_have_decl=0
11779 fi
11780
11781 cat >>confdefs.h <<_ACEOF
11782 #define HAVE_DECL_STRTOUL $ac_have_decl
11783 _ACEOF
11784 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11785 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
11786   ac_have_decl=1
11787 else
11788   ac_have_decl=0
11789 fi
11790
11791 cat >>confdefs.h <<_ACEOF
11792 #define HAVE_DECL_STRTOLL $ac_have_decl
11793 _ACEOF
11794 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11795 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
11796   ac_have_decl=1
11797 else
11798   ac_have_decl=0
11799 fi
11800
11801 cat >>confdefs.h <<_ACEOF
11802 #define HAVE_DECL_STRTOULL $ac_have_decl
11803 _ACEOF
11804
11805   ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11806 if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
11807   ac_have_decl=1
11808 else
11809   ac_have_decl=0
11810 fi
11811
11812 cat >>confdefs.h <<_ACEOF
11813 #define HAVE_DECL_STRVERSCMP $ac_have_decl
11814 _ACEOF
11815
11816
11817
11818 ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11819 if test "x$ac_cv_have_decl_free" = x""yes; then :
11820   ac_have_decl=1
11821 else
11822   ac_have_decl=0
11823 fi
11824
11825 cat >>confdefs.h <<_ACEOF
11826 #define HAVE_DECL_FREE $ac_have_decl
11827 _ACEOF
11828 ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11829 if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11830   ac_have_decl=1
11831 else
11832   ac_have_decl=0
11833 fi
11834
11835 cat >>confdefs.h <<_ACEOF
11836 #define HAVE_DECL_MALLOC $ac_have_decl
11837 _ACEOF
11838 ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11839 if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11840   ac_have_decl=1
11841 else
11842   ac_have_decl=0
11843 fi
11844
11845 cat >>confdefs.h <<_ACEOF
11846 #define HAVE_DECL_REALLOC $ac_have_decl
11847 _ACEOF
11848 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11849 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11850   ac_have_decl=1
11851 else
11852   ac_have_decl=0
11853 fi
11854
11855 cat >>confdefs.h <<_ACEOF
11856 #define HAVE_DECL_SNPRINTF $ac_have_decl
11857 _ACEOF
11858
11859
11860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11861 $as_echo_n "checking for LC_MESSAGES... " >&6; }
11862 if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11863   $as_echo_n "(cached) " >&6
11864 else
11865   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11866 /* end confdefs.h.  */
11867 #include <locale.h>
11868 int
11869 main ()
11870 {
11871 return LC_MESSAGES
11872   ;
11873   return 0;
11874 }
11875 _ACEOF
11876 if ac_fn_c_try_link "$LINENO"; then :
11877   am_cv_val_LC_MESSAGES=yes
11878 else
11879   am_cv_val_LC_MESSAGES=no
11880 fi
11881 rm -f core conftest.err conftest.$ac_objext \
11882     conftest$ac_exeext conftest.$ac_ext
11883 fi
11884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11885 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11886   if test $am_cv_val_LC_MESSAGES = yes; then
11887
11888 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11889
11890   fi
11891
11892
11893 # ----------------------- #
11894 # Checks for structures.  #
11895 # ----------------------- #
11896
11897 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11898 if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11899
11900 cat >>confdefs.h <<_ACEOF
11901 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
11902 _ACEOF
11903
11904
11905 fi
11906 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11907 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
11908
11909 cat >>confdefs.h <<_ACEOF
11910 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11911 _ACEOF
11912
11913
11914 fi
11915
11916
11917 # ------------------ #
11918 # Checks for types.  #
11919 # ------------------ #
11920
11921 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
11922 #include <sys/socket.h>
11923
11924 "
11925 if test "x$ac_cv_type_socklen_t" = x""yes; then :
11926
11927 cat >>confdefs.h <<_ACEOF
11928 #define HAVE_SOCKLEN_T 1
11929 _ACEOF
11930
11931
11932 fi
11933
11934
11935 # ------------------------------------- #
11936 # Checks for compiler characteristics.  #
11937 # ------------------------------------- #
11938
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11940 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11941 if test "${ac_cv_c_const+set}" = set; then :
11942   $as_echo_n "(cached) " >&6
11943 else
11944   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11945 /* end confdefs.h.  */
11946
11947 int
11948 main ()
11949 {
11950 /* FIXME: Include the comments suggested by Paul. */
11951 #ifndef __cplusplus
11952   /* Ultrix mips cc rejects this.  */
11953   typedef int charset[2];
11954   const charset cs;
11955   /* SunOS 4.1.1 cc rejects this.  */
11956   char const *const *pcpcc;
11957   char **ppc;
11958   /* NEC SVR4.0.2 mips cc rejects this.  */
11959   struct point {int x, y;};
11960   static struct point const zero = {0,0};
11961   /* AIX XL C 1.02.0.0 rejects this.
11962      It does not let you subtract one const X* pointer from another in
11963      an arm of an if-expression whose if-part is not a constant
11964      expression */
11965   const char *g = "string";
11966   pcpcc = &g + (g ? g-g : 0);
11967   /* HPUX 7.0 cc rejects these. */
11968   ++pcpcc;
11969   ppc = (char**) pcpcc;
11970   pcpcc = (char const *const *) ppc;
11971   { /* SCO 3.2v4 cc rejects this.  */
11972     char *t;
11973     char const *s = 0 ? (char *) 0 : (char const *) 0;
11974
11975     *t++ = 0;
11976     if (s) return 0;
11977   }
11978   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11979     int x[] = {25, 17};
11980     const int *foo = &x[0];
11981     ++foo;
11982   }
11983   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11984     typedef const int *iptr;
11985     iptr p = 0;
11986     ++p;
11987   }
11988   { /* AIX XL C 1.02.0.0 rejects this saying
11989        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11990     struct s { int j; const int *ap[3]; };
11991     struct s *b; b->j = 5;
11992   }
11993   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11994     const int foo = 10;
11995     if (!foo) return 0;
11996   }
11997   return !cs[0] && !zero.x;
11998 #endif
11999
12000   ;
12001   return 0;
12002 }
12003 _ACEOF
12004 if ac_fn_c_try_compile "$LINENO"; then :
12005   ac_cv_c_const=yes
12006 else
12007   ac_cv_c_const=no
12008 fi
12009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12010 fi
12011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12012 $as_echo "$ac_cv_c_const" >&6; }
12013 if test $ac_cv_c_const = no; then
12014
12015 $as_echo "#define const /**/" >>confdefs.h
12016
12017 fi
12018
12019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12020 $as_echo_n "checking for inline... " >&6; }
12021 if test "${ac_cv_c_inline+set}" = set; then :
12022   $as_echo_n "(cached) " >&6
12023 else
12024   ac_cv_c_inline=no
12025 for ac_kw in inline __inline__ __inline; do
12026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12027 /* end confdefs.h.  */
12028 #ifndef __cplusplus
12029 typedef int foo_t;
12030 static $ac_kw foo_t static_foo () {return 0; }
12031 $ac_kw foo_t foo () {return 0; }
12032 #endif
12033
12034 _ACEOF
12035 if ac_fn_c_try_compile "$LINENO"; then :
12036   ac_cv_c_inline=$ac_kw
12037 fi
12038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12039   test "$ac_cv_c_inline" != no && break
12040 done
12041
12042 fi
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12044 $as_echo "$ac_cv_c_inline" >&6; }
12045
12046 case $ac_cv_c_inline in
12047   inline | yes) ;;
12048   *)
12049     case $ac_cv_c_inline in
12050       no) ac_val=;;
12051       *) ac_val=$ac_cv_c_inline;;
12052     esac
12053     cat >>confdefs.h <<_ACEOF
12054 #ifndef __cplusplus
12055 #define inline $ac_val
12056 #endif
12057 _ACEOF
12058     ;;
12059 esac
12060
12061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12062 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12063 if test "${ac_cv_c_bigendian+set}" = set; then :
12064   $as_echo_n "(cached) " >&6
12065 else
12066   ac_cv_c_bigendian=unknown
12067     # See if we're dealing with a universal compiler.
12068     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12069 /* end confdefs.h.  */
12070 #ifndef __APPLE_CC__
12071                not a universal capable compiler
12072              #endif
12073              typedef int dummy;
12074
12075 _ACEOF
12076 if ac_fn_c_try_compile "$LINENO"; then :
12077
12078         # Check for potential -arch flags.  It is not universal unless
12079         # there are at least two -arch flags with different values.
12080         ac_arch=
12081         ac_prev=
12082         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12083          if test -n "$ac_prev"; then
12084            case $ac_word in
12085              i?86 | x86_64 | ppc | ppc64)
12086                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12087                  ac_arch=$ac_word
12088                else
12089                  ac_cv_c_bigendian=universal
12090                  break
12091                fi
12092                ;;
12093            esac
12094            ac_prev=
12095          elif test "x$ac_word" = "x-arch"; then
12096            ac_prev=arch
12097          fi
12098        done
12099 fi
12100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12101     if test $ac_cv_c_bigendian = unknown; then
12102       # See if sys/param.h defines the BYTE_ORDER macro.
12103       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12104 /* end confdefs.h.  */
12105 #include <sys/types.h>
12106              #include <sys/param.h>
12107
12108 int
12109 main ()
12110 {
12111 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12112                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12113                      && LITTLE_ENDIAN)
12114               bogus endian macros
12115              #endif
12116
12117   ;
12118   return 0;
12119 }
12120 _ACEOF
12121 if ac_fn_c_try_compile "$LINENO"; then :
12122   # It does; now see whether it defined to BIG_ENDIAN or not.
12123          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12124 /* end confdefs.h.  */
12125 #include <sys/types.h>
12126                 #include <sys/param.h>
12127
12128 int
12129 main ()
12130 {
12131 #if BYTE_ORDER != BIG_ENDIAN
12132                  not big endian
12133                 #endif
12134
12135   ;
12136   return 0;
12137 }
12138 _ACEOF
12139 if ac_fn_c_try_compile "$LINENO"; then :
12140   ac_cv_c_bigendian=yes
12141 else
12142   ac_cv_c_bigendian=no
12143 fi
12144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12145 fi
12146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12147     fi
12148     if test $ac_cv_c_bigendian = unknown; then
12149       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12150       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12151 /* end confdefs.h.  */
12152 #include <limits.h>
12153
12154 int
12155 main ()
12156 {
12157 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12158               bogus endian macros
12159              #endif
12160
12161   ;
12162   return 0;
12163 }
12164 _ACEOF
12165 if ac_fn_c_try_compile "$LINENO"; then :
12166   # It does; now see whether it defined to _BIG_ENDIAN or not.
12167          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12168 /* end confdefs.h.  */
12169 #include <limits.h>
12170
12171 int
12172 main ()
12173 {
12174 #ifndef _BIG_ENDIAN
12175                  not big endian
12176                 #endif
12177
12178   ;
12179   return 0;
12180 }
12181 _ACEOF
12182 if ac_fn_c_try_compile "$LINENO"; then :
12183   ac_cv_c_bigendian=yes
12184 else
12185   ac_cv_c_bigendian=no
12186 fi
12187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12188 fi
12189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12190     fi
12191     if test $ac_cv_c_bigendian = unknown; then
12192       # Compile a test program.
12193       if test "$cross_compiling" = yes; then :
12194   # Try to guess by grepping values from an object file.
12195          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12196 /* end confdefs.h.  */
12197 short int ascii_mm[] =
12198                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12199                 short int ascii_ii[] =
12200                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12201                 int use_ascii (int i) {
12202                   return ascii_mm[i] + ascii_ii[i];
12203                 }
12204                 short int ebcdic_ii[] =
12205                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12206                 short int ebcdic_mm[] =
12207                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12208                 int use_ebcdic (int i) {
12209                   return ebcdic_mm[i] + ebcdic_ii[i];
12210                 }
12211                 extern int foo;
12212
12213 int
12214 main ()
12215 {
12216 return use_ascii (foo) == use_ebcdic (foo);
12217   ;
12218   return 0;
12219 }
12220 _ACEOF
12221 if ac_fn_c_try_compile "$LINENO"; then :
12222   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12223               ac_cv_c_bigendian=yes
12224             fi
12225             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12226               if test "$ac_cv_c_bigendian" = unknown; then
12227                 ac_cv_c_bigendian=no
12228               else
12229                 # finding both strings is unlikely to happen, but who knows?
12230                 ac_cv_c_bigendian=unknown
12231               fi
12232             fi
12233 fi
12234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12235 else
12236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12237 /* end confdefs.h.  */
12238 $ac_includes_default
12239 int
12240 main ()
12241 {
12242
12243              /* Are we little or big endian?  From Harbison&Steele.  */
12244              union
12245              {
12246                long int l;
12247                char c[sizeof (long int)];
12248              } u;
12249              u.l = 1;
12250              return u.c[sizeof (long int) - 1] == 1;
12251
12252   ;
12253   return 0;
12254 }
12255 _ACEOF
12256 if ac_fn_c_try_run "$LINENO"; then :
12257   ac_cv_c_bigendian=no
12258 else
12259   ac_cv_c_bigendian=yes
12260 fi
12261 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12262   conftest.$ac_objext conftest.beam conftest.$ac_ext
12263 fi
12264
12265     fi
12266 fi
12267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12268 $as_echo "$ac_cv_c_bigendian" >&6; }
12269  case $ac_cv_c_bigendian in #(
12270    yes)
12271      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12272 ;; #(
12273    no)
12274       ;; #(
12275    universal)
12276
12277 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12278
12279      ;; #(
12280    *)
12281      as_fn_error "unknown endianness
12282  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12283  esac
12284
12285
12286 # ------------------------------ #
12287 # Checks for library functions.  #
12288 # ------------------------------ #
12289
12290 for ac_header in stdlib.h unistd.h
12291 do :
12292   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12293 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12294 eval as_val=\$$as_ac_Header
12295    if test "x$as_val" = x""yes; then :
12296   cat >>confdefs.h <<_ACEOF
12297 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12298 _ACEOF
12299
12300 fi
12301
12302 done
12303
12304 for ac_func in getpagesize
12305 do :
12306   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12307 if test "x$ac_cv_func_getpagesize" = x""yes; then :
12308   cat >>confdefs.h <<_ACEOF
12309 #define HAVE_GETPAGESIZE 1
12310 _ACEOF
12311
12312 fi
12313 done
12314
12315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12316 $as_echo_n "checking for working mmap... " >&6; }
12317 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12318   $as_echo_n "(cached) " >&6
12319 else
12320   if test "$cross_compiling" = yes; then :
12321   ac_cv_func_mmap_fixed_mapped=no
12322 else
12323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12324 /* end confdefs.h.  */
12325 $ac_includes_default
12326 /* malloc might have been renamed as rpl_malloc. */
12327 #undef malloc
12328
12329 /* Thanks to Mike Haertel and Jim Avera for this test.
12330    Here is a matrix of mmap possibilities:
12331         mmap private not fixed
12332         mmap private fixed at somewhere currently unmapped
12333         mmap private fixed at somewhere already mapped
12334         mmap shared not fixed
12335         mmap shared fixed at somewhere currently unmapped
12336         mmap shared fixed at somewhere already mapped
12337    For private mappings, we should verify that changes cannot be read()
12338    back from the file, nor mmap's back from the file at a different
12339    address.  (There have been systems where private was not correctly
12340    implemented like the infamous i386 svr4.0, and systems where the
12341    VM page cache was not coherent with the file system buffer cache
12342    like early versions of FreeBSD and possibly contemporary NetBSD.)
12343    For shared mappings, we should conversely verify that changes get
12344    propagated back to all the places they're supposed to be.
12345
12346    Grep wants private fixed already mapped.
12347    The main things grep needs to know about mmap are:
12348    * does it exist and is it safe to write into the mmap'd area
12349    * how to use it (BSD variants)  */
12350
12351 #include <fcntl.h>
12352 #include <sys/mman.h>
12353
12354 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12355 char *malloc ();
12356 #endif
12357
12358 /* This mess was copied from the GNU getpagesize.h.  */
12359 #ifndef HAVE_GETPAGESIZE
12360 /* Assume that all systems that can run configure have sys/param.h.  */
12361 # ifndef HAVE_SYS_PARAM_H
12362 #  define HAVE_SYS_PARAM_H 1
12363 # endif
12364
12365 # ifdef _SC_PAGESIZE
12366 #  define getpagesize() sysconf(_SC_PAGESIZE)
12367 # else /* no _SC_PAGESIZE */
12368 #  ifdef HAVE_SYS_PARAM_H
12369 #   include <sys/param.h>
12370 #   ifdef EXEC_PAGESIZE
12371 #    define getpagesize() EXEC_PAGESIZE
12372 #   else /* no EXEC_PAGESIZE */
12373 #    ifdef NBPG
12374 #     define getpagesize() NBPG * CLSIZE
12375 #     ifndef CLSIZE
12376 #      define CLSIZE 1
12377 #     endif /* no CLSIZE */
12378 #    else /* no NBPG */
12379 #     ifdef NBPC
12380 #      define getpagesize() NBPC
12381 #     else /* no NBPC */
12382 #      ifdef PAGESIZE
12383 #       define getpagesize() PAGESIZE
12384 #      endif /* PAGESIZE */
12385 #     endif /* no NBPC */
12386 #    endif /* no NBPG */
12387 #   endif /* no EXEC_PAGESIZE */
12388 #  else /* no HAVE_SYS_PARAM_H */
12389 #   define getpagesize() 8192   /* punt totally */
12390 #  endif /* no HAVE_SYS_PARAM_H */
12391 # endif /* no _SC_PAGESIZE */
12392
12393 #endif /* no HAVE_GETPAGESIZE */
12394
12395 int
12396 main ()
12397 {
12398   char *data, *data2, *data3;
12399   int i, pagesize;
12400   int fd;
12401
12402   pagesize = getpagesize ();
12403
12404   /* First, make a file with some known garbage in it. */
12405   data = (char *) malloc (pagesize);
12406   if (!data)
12407     return 1;
12408   for (i = 0; i < pagesize; ++i)
12409     *(data + i) = rand ();
12410   umask (0);
12411   fd = creat ("conftest.mmap", 0600);
12412   if (fd < 0)
12413     return 1;
12414   if (write (fd, data, pagesize) != pagesize)
12415     return 1;
12416   close (fd);
12417
12418   /* Next, try to mmap the file at a fixed address which already has
12419      something else allocated at it.  If we can, also make sure that
12420      we see the same garbage.  */
12421   fd = open ("conftest.mmap", O_RDWR);
12422   if (fd < 0)
12423     return 1;
12424   data2 = (char *) malloc (2 * pagesize);
12425   if (!data2)
12426     return 1;
12427   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
12428   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12429                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
12430     return 1;
12431   for (i = 0; i < pagesize; ++i)
12432     if (*(data + i) != *(data2 + i))
12433       return 1;
12434
12435   /* Finally, make sure that changes to the mapped area do not
12436      percolate back to the file as seen by read().  (This is a bug on
12437      some variants of i386 svr4.0.)  */
12438   for (i = 0; i < pagesize; ++i)
12439     *(data2 + i) = *(data2 + i) + 1;
12440   data3 = (char *) malloc (pagesize);
12441   if (!data3)
12442     return 1;
12443   if (read (fd, data3, pagesize) != pagesize)
12444     return 1;
12445   for (i = 0; i < pagesize; ++i)
12446     if (*(data + i) != *(data3 + i))
12447       return 1;
12448   close (fd);
12449   return 0;
12450 }
12451 _ACEOF
12452 if ac_fn_c_try_run "$LINENO"; then :
12453   ac_cv_func_mmap_fixed_mapped=yes
12454 else
12455   ac_cv_func_mmap_fixed_mapped=no
12456 fi
12457 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12458   conftest.$ac_objext conftest.beam conftest.$ac_ext
12459 fi
12460
12461 fi
12462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12463 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
12464 if test $ac_cv_func_mmap_fixed_mapped = yes; then
12465
12466 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
12467
12468 fi
12469 rm -f conftest.mmap
12470
12471 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12472 if test "x$ac_cv_type_pid_t" = x""yes; then :
12473
12474 else
12475
12476 cat >>confdefs.h <<_ACEOF
12477 #define pid_t int
12478 _ACEOF
12479
12480 fi
12481
12482 for ac_header in vfork.h
12483 do :
12484   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12485 if test "x$ac_cv_header_vfork_h" = x""yes; then :
12486   cat >>confdefs.h <<_ACEOF
12487 #define HAVE_VFORK_H 1
12488 _ACEOF
12489
12490 fi
12491
12492 done
12493
12494 for ac_func in fork vfork
12495 do :
12496   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12497 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12498 eval as_val=\$$as_ac_var
12499    if test "x$as_val" = x""yes; then :
12500   cat >>confdefs.h <<_ACEOF
12501 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12502 _ACEOF
12503
12504 fi
12505 done
12506
12507 if test "x$ac_cv_func_fork" = xyes; then
12508   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12509 $as_echo_n "checking for working fork... " >&6; }
12510 if test "${ac_cv_func_fork_works+set}" = set; then :
12511   $as_echo_n "(cached) " >&6
12512 else
12513   if test "$cross_compiling" = yes; then :
12514   ac_cv_func_fork_works=cross
12515 else
12516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517 /* end confdefs.h.  */
12518 $ac_includes_default
12519 int
12520 main ()
12521 {
12522
12523           /* By Ruediger Kuhlmann. */
12524           return fork () < 0;
12525
12526   ;
12527   return 0;
12528 }
12529 _ACEOF
12530 if ac_fn_c_try_run "$LINENO"; then :
12531   ac_cv_func_fork_works=yes
12532 else
12533   ac_cv_func_fork_works=no
12534 fi
12535 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12536   conftest.$ac_objext conftest.beam conftest.$ac_ext
12537 fi
12538
12539 fi
12540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12541 $as_echo "$ac_cv_func_fork_works" >&6; }
12542
12543 else
12544   ac_cv_func_fork_works=$ac_cv_func_fork
12545 fi
12546 if test "x$ac_cv_func_fork_works" = xcross; then
12547   case $host in
12548     *-*-amigaos* | *-*-msdosdjgpp*)
12549       # Override, as these systems have only a dummy fork() stub
12550       ac_cv_func_fork_works=no
12551       ;;
12552     *)
12553       ac_cv_func_fork_works=yes
12554       ;;
12555   esac
12556   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12557 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
12558 fi
12559 ac_cv_func_vfork_works=$ac_cv_func_vfork
12560 if test "x$ac_cv_func_vfork" = xyes; then
12561   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12562 $as_echo_n "checking for working vfork... " >&6; }
12563 if test "${ac_cv_func_vfork_works+set}" = set; then :
12564   $as_echo_n "(cached) " >&6
12565 else
12566   if test "$cross_compiling" = yes; then :
12567   ac_cv_func_vfork_works=cross
12568 else
12569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12570 /* end confdefs.h.  */
12571 /* Thanks to Paul Eggert for this test.  */
12572 $ac_includes_default
12573 #include <sys/wait.h>
12574 #ifdef HAVE_VFORK_H
12575 # include <vfork.h>
12576 #endif
12577 /* On some sparc systems, changes by the child to local and incoming
12578    argument registers are propagated back to the parent.  The compiler
12579    is told about this with #include <vfork.h>, but some compilers
12580    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
12581    static variable whose address is put into a register that is
12582    clobbered by the vfork.  */
12583 static void
12584 #ifdef __cplusplus
12585 sparc_address_test (int arg)
12586 # else
12587 sparc_address_test (arg) int arg;
12588 #endif
12589 {
12590   static pid_t child;
12591   if (!child) {
12592     child = vfork ();
12593     if (child < 0) {
12594       perror ("vfork");
12595       _exit(2);
12596     }
12597     if (!child) {
12598       arg = getpid();
12599       write(-1, "", 0);
12600       _exit (arg);
12601     }
12602   }
12603 }
12604
12605 int
12606 main ()
12607 {
12608   pid_t parent = getpid ();
12609   pid_t child;
12610
12611   sparc_address_test (0);
12612
12613   child = vfork ();
12614
12615   if (child == 0) {
12616     /* Here is another test for sparc vfork register problems.  This
12617        test uses lots of local variables, at least as many local
12618        variables as main has allocated so far including compiler
12619        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
12620        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
12621        reuse the register of parent for one of the local variables,
12622        since it will think that parent can't possibly be used any more
12623        in this routine.  Assigning to the local variable will thus
12624        munge parent in the parent process.  */
12625     pid_t
12626       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12627       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12628     /* Convince the compiler that p..p7 are live; otherwise, it might
12629        use the same hardware register for all 8 local variables.  */
12630     if (p != p1 || p != p2 || p != p3 || p != p4
12631         || p != p5 || p != p6 || p != p7)
12632       _exit(1);
12633
12634     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12635        from child file descriptors.  If the child closes a descriptor
12636        before it execs or exits, this munges the parent's descriptor
12637        as well.  Test for this by closing stdout in the child.  */
12638     _exit(close(fileno(stdout)) != 0);
12639   } else {
12640     int status;
12641     struct stat st;
12642
12643     while (wait(&status) != child)
12644       ;
12645     return (
12646          /* Was there some problem with vforking?  */
12647          child < 0
12648
12649          /* Did the child fail?  (This shouldn't happen.)  */
12650          || status
12651
12652          /* Did the vfork/compiler bug occur?  */
12653          || parent != getpid()
12654
12655          /* Did the file descriptor bug occur?  */
12656          || fstat(fileno(stdout), &st) != 0
12657          );
12658   }
12659 }
12660 _ACEOF
12661 if ac_fn_c_try_run "$LINENO"; then :
12662   ac_cv_func_vfork_works=yes
12663 else
12664   ac_cv_func_vfork_works=no
12665 fi
12666 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12667   conftest.$ac_objext conftest.beam conftest.$ac_ext
12668 fi
12669
12670 fi
12671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12672 $as_echo "$ac_cv_func_vfork_works" >&6; }
12673
12674 fi;
12675 if test "x$ac_cv_func_fork_works" = xcross; then
12676   ac_cv_func_vfork_works=$ac_cv_func_vfork
12677   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12678 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
12679 fi
12680
12681 if test "x$ac_cv_func_vfork_works" = xyes; then
12682
12683 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
12684
12685 else
12686
12687 $as_echo "#define vfork fork" >>confdefs.h
12688
12689 fi
12690 if test "x$ac_cv_func_fork_works" = xyes; then
12691
12692 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
12693
12694 fi
12695
12696 for ac_func in getauxval getrusage getuid getgid \
12697                 pipe poll pread pread64 pwrite resize_term \
12698                 sbrk setpgid setpgrp setsid \
12699                 sigaction sigprocmask sigsetmask socketpair \
12700                 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12701                 setrlimit getrlimit posix_madvise waitpid \
12702                 ptrace64 sigaltstack mkdtemp setns
12703 do :
12704   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12705 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12706 eval as_val=\$$as_ac_var
12707    if test "x$as_val" = x""yes; then :
12708   cat >>confdefs.h <<_ACEOF
12709 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12710 _ACEOF
12711
12712 fi
12713 done
12714
12715
12716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12717 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12718 if test "${am_cv_langinfo_codeset+set}" = set; then :
12719   $as_echo_n "(cached) " >&6
12720 else
12721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12722 /* end confdefs.h.  */
12723 #include <langinfo.h>
12724 int
12725 main ()
12726 {
12727 char* cs = nl_langinfo(CODESET);
12728   ;
12729   return 0;
12730 }
12731 _ACEOF
12732 if ac_fn_c_try_link "$LINENO"; then :
12733   am_cv_langinfo_codeset=yes
12734 else
12735   am_cv_langinfo_codeset=no
12736 fi
12737 rm -f core conftest.err conftest.$ac_objext \
12738     conftest$ac_exeext conftest.$ac_ext
12739
12740 fi
12741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12742 $as_echo "$am_cv_langinfo_codeset" >&6; }
12743   if test $am_cv_langinfo_codeset = yes; then
12744
12745 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12746
12747   fi
12748
12749
12750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12751 $as_echo_n "checking for ANSI C header files... " >&6; }
12752 if test "${ac_cv_header_stdc+set}" = set; then :
12753   $as_echo_n "(cached) " >&6
12754 else
12755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756 /* end confdefs.h.  */
12757 #include <stdlib.h>
12758 #include <stdarg.h>
12759 #include <string.h>
12760 #include <float.h>
12761
12762 int
12763 main ()
12764 {
12765
12766   ;
12767   return 0;
12768 }
12769 _ACEOF
12770 if ac_fn_c_try_compile "$LINENO"; then :
12771   ac_cv_header_stdc=yes
12772 else
12773   ac_cv_header_stdc=no
12774 fi
12775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12776
12777 if test $ac_cv_header_stdc = yes; then
12778   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12780 /* end confdefs.h.  */
12781 #include <string.h>
12782
12783 _ACEOF
12784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12785   $EGREP "memchr" >/dev/null 2>&1; then :
12786
12787 else
12788   ac_cv_header_stdc=no
12789 fi
12790 rm -f conftest*
12791
12792 fi
12793
12794 if test $ac_cv_header_stdc = yes; then
12795   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12797 /* end confdefs.h.  */
12798 #include <stdlib.h>
12799
12800 _ACEOF
12801 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12802   $EGREP "free" >/dev/null 2>&1; then :
12803
12804 else
12805   ac_cv_header_stdc=no
12806 fi
12807 rm -f conftest*
12808
12809 fi
12810
12811 if test $ac_cv_header_stdc = yes; then
12812   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12813   if test "$cross_compiling" = yes; then :
12814   :
12815 else
12816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12817 /* end confdefs.h.  */
12818 #include <ctype.h>
12819 #include <stdlib.h>
12820 #if ((' ' & 0x0FF) == 0x020)
12821 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12822 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12823 #else
12824 # define ISLOWER(c) \
12825                    (('a' <= (c) && (c) <= 'i') \
12826                      || ('j' <= (c) && (c) <= 'r') \
12827                      || ('s' <= (c) && (c) <= 'z'))
12828 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12829 #endif
12830
12831 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12832 int
12833 main ()
12834 {
12835   int i;
12836   for (i = 0; i < 256; i++)
12837     if (XOR (islower (i), ISLOWER (i))
12838         || toupper (i) != TOUPPER (i))
12839       return 2;
12840   return 0;
12841 }
12842 _ACEOF
12843 if ac_fn_c_try_run "$LINENO"; then :
12844
12845 else
12846   ac_cv_header_stdc=no
12847 fi
12848 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12849   conftest.$ac_objext conftest.beam conftest.$ac_ext
12850 fi
12851
12852 fi
12853 fi
12854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12855 $as_echo "$ac_cv_header_stdc" >&6; }
12856 if test $ac_cv_header_stdc = yes; then
12857
12858 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12859
12860 fi
12861
12862   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12863 # for constant arguments.  Useless!
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12865 $as_echo_n "checking for working alloca.h... " >&6; }
12866 if test "${ac_cv_working_alloca_h+set}" = set; then :
12867   $as_echo_n "(cached) " >&6
12868 else
12869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12870 /* end confdefs.h.  */
12871 #include <alloca.h>
12872 int
12873 main ()
12874 {
12875 char *p = (char *) alloca (2 * sizeof (int));
12876                           if (p) return 0;
12877   ;
12878   return 0;
12879 }
12880 _ACEOF
12881 if ac_fn_c_try_link "$LINENO"; then :
12882   ac_cv_working_alloca_h=yes
12883 else
12884   ac_cv_working_alloca_h=no
12885 fi
12886 rm -f core conftest.err conftest.$ac_objext \
12887     conftest$ac_exeext conftest.$ac_ext
12888 fi
12889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12890 $as_echo "$ac_cv_working_alloca_h" >&6; }
12891 if test $ac_cv_working_alloca_h = yes; then
12892
12893 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12894
12895 fi
12896
12897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12898 $as_echo_n "checking for alloca... " >&6; }
12899 if test "${ac_cv_func_alloca_works+set}" = set; then :
12900   $as_echo_n "(cached) " >&6
12901 else
12902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12903 /* end confdefs.h.  */
12904 #ifdef __GNUC__
12905 # define alloca __builtin_alloca
12906 #else
12907 # ifdef _MSC_VER
12908 #  include <malloc.h>
12909 #  define alloca _alloca
12910 # else
12911 #  ifdef HAVE_ALLOCA_H
12912 #   include <alloca.h>
12913 #  else
12914 #   ifdef _AIX
12915  #pragma alloca
12916 #   else
12917 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12918 char *alloca ();
12919 #    endif
12920 #   endif
12921 #  endif
12922 # endif
12923 #endif
12924
12925 int
12926 main ()
12927 {
12928 char *p = (char *) alloca (1);
12929                                     if (p) return 0;
12930   ;
12931   return 0;
12932 }
12933 _ACEOF
12934 if ac_fn_c_try_link "$LINENO"; then :
12935   ac_cv_func_alloca_works=yes
12936 else
12937   ac_cv_func_alloca_works=no
12938 fi
12939 rm -f core conftest.err conftest.$ac_objext \
12940     conftest$ac_exeext conftest.$ac_ext
12941 fi
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12943 $as_echo "$ac_cv_func_alloca_works" >&6; }
12944
12945 if test $ac_cv_func_alloca_works = yes; then
12946
12947 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12948
12949 else
12950   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12951 # that cause trouble.  Some versions do not even contain alloca or
12952 # contain a buggy version.  If you still want to use their alloca,
12953 # use ar to extract alloca.o from them instead of compiling alloca.c.
12954
12955 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12956
12957 $as_echo "#define C_ALLOCA 1" >>confdefs.h
12958
12959
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12961 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12962 if test "${ac_cv_os_cray+set}" = set; then :
12963   $as_echo_n "(cached) " >&6
12964 else
12965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12966 /* end confdefs.h.  */
12967 #if defined CRAY && ! defined CRAY2
12968 webecray
12969 #else
12970 wenotbecray
12971 #endif
12972
12973 _ACEOF
12974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12975   $EGREP "webecray" >/dev/null 2>&1; then :
12976   ac_cv_os_cray=yes
12977 else
12978   ac_cv_os_cray=no
12979 fi
12980 rm -f conftest*
12981
12982 fi
12983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12984 $as_echo "$ac_cv_os_cray" >&6; }
12985 if test $ac_cv_os_cray = yes; then
12986   for ac_func in _getb67 GETB67 getb67; do
12987     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12988 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12989 eval as_val=\$$as_ac_var
12990    if test "x$as_val" = x""yes; then :
12991
12992 cat >>confdefs.h <<_ACEOF
12993 #define CRAY_STACKSEG_END $ac_func
12994 _ACEOF
12995
12996     break
12997 fi
12998
12999   done
13000 fi
13001
13002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13003 $as_echo_n "checking stack direction for C alloca... " >&6; }
13004 if test "${ac_cv_c_stack_direction+set}" = set; then :
13005   $as_echo_n "(cached) " >&6
13006 else
13007   if test "$cross_compiling" = yes; then :
13008   ac_cv_c_stack_direction=0
13009 else
13010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13011 /* end confdefs.h.  */
13012 $ac_includes_default
13013 int
13014 find_stack_direction ()
13015 {
13016   static char *addr = 0;
13017   auto char dummy;
13018   if (addr == 0)
13019     {
13020       addr = &dummy;
13021       return find_stack_direction ();
13022     }
13023   else
13024     return (&dummy > addr) ? 1 : -1;
13025 }
13026
13027 int
13028 main ()
13029 {
13030   return find_stack_direction () < 0;
13031 }
13032 _ACEOF
13033 if ac_fn_c_try_run "$LINENO"; then :
13034   ac_cv_c_stack_direction=1
13035 else
13036   ac_cv_c_stack_direction=-1
13037 fi
13038 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13039   conftest.$ac_objext conftest.beam conftest.$ac_ext
13040 fi
13041
13042 fi
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13044 $as_echo "$ac_cv_c_stack_direction" >&6; }
13045 cat >>confdefs.h <<_ACEOF
13046 #define STACK_DIRECTION $ac_cv_c_stack_direction
13047 _ACEOF
13048
13049
13050 fi
13051
13052
13053
13054   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13055 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13056 if test "${am_cv_langinfo_codeset+set}" = set; then :
13057   $as_echo_n "(cached) " >&6
13058 else
13059   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13060 /* end confdefs.h.  */
13061 #include <langinfo.h>
13062 int
13063 main ()
13064 {
13065 char* cs = nl_langinfo(CODESET);
13066   ;
13067   return 0;
13068 }
13069 _ACEOF
13070 if ac_fn_c_try_link "$LINENO"; then :
13071   am_cv_langinfo_codeset=yes
13072 else
13073   am_cv_langinfo_codeset=no
13074 fi
13075 rm -f core conftest.err conftest.$ac_objext \
13076     conftest$ac_exeext conftest.$ac_ext
13077
13078 fi
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13080 $as_echo "$am_cv_langinfo_codeset" >&6; }
13081   if test $am_cv_langinfo_codeset = yes; then
13082
13083 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13084
13085   fi
13086
13087
13088   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              termios.h termio.h sgtty.h
13089 do :
13090   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13091 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13092 eval as_val=\$$as_ac_Header
13093    if test "x$as_val" = x""yes; then :
13094   cat >>confdefs.h <<_ACEOF
13095 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13096 _ACEOF
13097
13098 fi
13099
13100 done
13101
13102
13103   for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
13104 do :
13105   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13106 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13107 eval as_val=\$$as_ac_var
13108    if test "x$as_val" = x""yes; then :
13109   cat >>confdefs.h <<_ACEOF
13110 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13111 _ACEOF
13112
13113 fi
13114 done
13115
13116
13117   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13118 if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13119   ac_have_decl=1
13120 else
13121   ac_have_decl=0
13122 fi
13123
13124 cat >>confdefs.h <<_ACEOF
13125 #define HAVE_DECL_STRERROR $ac_have_decl
13126 _ACEOF
13127 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13128 if test "x$ac_cv_have_decl_strstr" = x""yes; then :
13129   ac_have_decl=1
13130 else
13131   ac_have_decl=0
13132 fi
13133
13134 cat >>confdefs.h <<_ACEOF
13135 #define HAVE_DECL_STRSTR $ac_have_decl
13136 _ACEOF
13137
13138
13139     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13140 $as_echo_n "checking for sigsetjmp... " >&6; }
13141 if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13142   $as_echo_n "(cached) " >&6
13143 else
13144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13145 /* end confdefs.h.  */
13146
13147 #include <setjmp.h>
13148
13149 int
13150 main ()
13151 {
13152 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13153   ;
13154   return 0;
13155 }
13156 _ACEOF
13157 if ac_fn_c_try_compile "$LINENO"; then :
13158   gdb_cv_func_sigsetjmp=yes
13159 else
13160   gdb_cv_func_sigsetjmp=no
13161 fi
13162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13163 fi
13164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13165 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13166 if test $gdb_cv_func_sigsetjmp = yes; then
13167
13168 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13169
13170 fi
13171
13172
13173 # Check the return and argument types of ptrace.
13174
13175
13176 for ac_header in sys/ptrace.h ptrace.h
13177 do :
13178   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13179 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13180 eval as_val=\$$as_ac_Header
13181    if test "x$as_val" = x""yes; then :
13182   cat >>confdefs.h <<_ACEOF
13183 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13184 _ACEOF
13185
13186 fi
13187
13188 done
13189
13190
13191 gdb_ptrace_headers='
13192 #include <sys/types.h>
13193 #if HAVE_SYS_PTRACE_H
13194 # include <sys/ptrace.h>
13195 #endif
13196 #if HAVE_UNISTD_H
13197 # include <unistd.h>
13198 #endif
13199 '
13200 # There is no point in checking if we don't have a prototype.
13201 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
13202 "
13203 if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
13204   ac_have_decl=1
13205 else
13206   ac_have_decl=0
13207 fi
13208
13209 cat >>confdefs.h <<_ACEOF
13210 #define HAVE_DECL_PTRACE $ac_have_decl
13211 _ACEOF
13212 if test $ac_have_decl = 1; then :
13213
13214 else
13215
13216   : ${gdb_cv_func_ptrace_ret='int'}
13217   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13218
13219 fi
13220
13221 # Check return type.  Varargs (used on GNU/Linux) conflict with the
13222 # empty argument list, so check for that explicitly.
13223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13224 $as_echo_n "checking return type of ptrace... " >&6; }
13225 if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
13226   $as_echo_n "(cached) " >&6
13227 else
13228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13229 /* end confdefs.h.  */
13230 $gdb_ptrace_headers
13231 int
13232 main ()
13233 {
13234 extern long ptrace (enum __ptrace_request, ...);
13235   ;
13236   return 0;
13237 }
13238 _ACEOF
13239 if ac_fn_c_try_compile "$LINENO"; then :
13240   gdb_cv_func_ptrace_ret='long'
13241 else
13242   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13243 /* end confdefs.h.  */
13244 $gdb_ptrace_headers
13245 int
13246 main ()
13247 {
13248 extern int ptrace ();
13249   ;
13250   return 0;
13251 }
13252 _ACEOF
13253 if ac_fn_c_try_compile "$LINENO"; then :
13254   gdb_cv_func_ptrace_ret='int'
13255 else
13256   gdb_cv_func_ptrace_ret='long'
13257 fi
13258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13259 fi
13260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13261 fi
13262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13263 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13264
13265 cat >>confdefs.h <<_ACEOF
13266 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13267 _ACEOF
13268
13269 # Check argument types.
13270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13271 $as_echo_n "checking types of arguments for ptrace... " >&6; }
13272 if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13273   $as_echo_n "(cached) " >&6
13274 else
13275
13276   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277 /* end confdefs.h.  */
13278 $gdb_ptrace_headers
13279 int
13280 main ()
13281 {
13282 extern long ptrace (enum __ptrace_request, ...);
13283   ;
13284   return 0;
13285 }
13286 _ACEOF
13287 if ac_fn_c_try_compile "$LINENO"; then :
13288   gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
13289 else
13290
13291 for gdb_arg1 in 'int' 'long'; do
13292  for gdb_arg2 in 'pid_t' 'int' 'long'; do
13293   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13294    for gdb_arg4 in 'int' 'long' 'void *'; do
13295      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13296 /* end confdefs.h.  */
13297 $gdb_ptrace_headers
13298 int
13299 main ()
13300 {
13301
13302 extern $gdb_cv_func_ptrace_ret
13303   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13304
13305   ;
13306   return 0;
13307 }
13308 _ACEOF
13309 if ac_fn_c_try_compile "$LINENO"; then :
13310   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13311     break 4;
13312 fi
13313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13314     for gdb_arg5 in 'int *' 'int' 'long'; do
13315      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13316 /* end confdefs.h.  */
13317 $gdb_ptrace_headers
13318 int
13319 main ()
13320 {
13321
13322 extern $gdb_cv_func_ptrace_ret
13323   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13324
13325   ;
13326   return 0;
13327 }
13328 _ACEOF
13329 if ac_fn_c_try_compile "$LINENO"; then :
13330
13331 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13332     break 5;
13333 fi
13334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13335     done
13336    done
13337   done
13338  done
13339 done
13340 # Provide a safe default value.
13341 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13342
13343 fi
13344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13345 fi
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13347 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
13348 ac_save_IFS=$IFS; IFS=','
13349 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13350 IFS=$ac_save_IFS
13351 shift
13352
13353 cat >>confdefs.h <<_ACEOF
13354 #define PTRACE_TYPE_ARG1 $1
13355 _ACEOF
13356
13357
13358 cat >>confdefs.h <<_ACEOF
13359 #define PTRACE_TYPE_ARG3 $3
13360 _ACEOF
13361
13362
13363 cat >>confdefs.h <<_ACEOF
13364 #define PTRACE_TYPE_ARG4 $4
13365 _ACEOF
13366
13367 if test -n "$5"; then
13368
13369 cat >>confdefs.h <<_ACEOF
13370 #define PTRACE_TYPE_ARG5 $5
13371 _ACEOF
13372
13373 fi
13374
13375
13376 if test "$cross_compiling" = no; then
13377   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13378 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13379 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13380   $as_echo_n "(cached) " >&6
13381 else
13382   if test "$cross_compiling" = yes; then :
13383   as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
13384 else
13385   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13386 /* end confdefs.h.  */
13387 $ac_includes_default
13388 int
13389 main ()
13390 {
13391 /* If this system has a BSD-style setpgrp which takes arguments,
13392   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13393   exit successfully. */
13394   return setpgrp (1,1) != -1;
13395   ;
13396   return 0;
13397 }
13398 _ACEOF
13399 if ac_fn_c_try_run "$LINENO"; then :
13400   ac_cv_func_setpgrp_void=no
13401 else
13402   ac_cv_func_setpgrp_void=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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13410 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
13411 if test $ac_cv_func_setpgrp_void = yes; then
13412
13413 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
13414
13415 fi
13416
13417 else
13418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13419 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13420 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13421   $as_echo_n "(cached) " >&6
13422 else
13423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13424 /* end confdefs.h.  */
13425
13426 #include <unistd.h>
13427
13428 int
13429 main ()
13430 {
13431
13432   if (setpgrp(1,1) == -1)
13433     exit (0);
13434   else
13435     exit (1);
13436
13437   ;
13438   return 0;
13439 }
13440 _ACEOF
13441 if ac_fn_c_try_compile "$LINENO"; then :
13442   ac_cv_func_setpgrp_void=no
13443 else
13444   ac_cv_func_setpgrp_void=yes
13445 fi
13446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13447 fi
13448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13449 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
13450 if test $ac_cv_func_setpgrp_void = yes; then
13451   $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
13452
13453 fi
13454 fi
13455
13456 # Assume we'll default to using the included libiberty regex.
13457 gdb_use_included_regex=yes
13458
13459 # However, if the system regex is GNU regex, then default to *not*
13460 # using the included regex.
13461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13462 $as_echo_n "checking for GNU regex... " >&6; }
13463 if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13464   $as_echo_n "(cached) " >&6
13465 else
13466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13467 /* end confdefs.h.  */
13468 #include <gnu-versions.h>
13469 int
13470 main ()
13471 {
13472 #define REGEX_INTERFACE_VERSION 1
13473 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13474 # error "Version mismatch"
13475 #endif
13476   ;
13477   return 0;
13478 }
13479 _ACEOF
13480 if ac_fn_c_try_compile "$LINENO"; then :
13481   gdb_cv_have_gnu_regex=yes
13482 else
13483   gdb_cv_have_gnu_regex=no
13484 fi
13485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13486 fi
13487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13488 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
13489 if test $gdb_cv_have_gnu_regex = yes; then
13490   gdb_use_included_regex=no
13491 fi
13492
13493
13494 # Check whether --with-included-regex was given.
13495 if test "${with_included_regex+set}" = set; then :
13496   withval=$with_included_regex; gdb_with_regex=$withval
13497 else
13498   gdb_with_regex=$gdb_use_included_regex
13499 fi
13500
13501 if test "$gdb_with_regex" = yes; then
13502
13503 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13504
13505 fi
13506
13507 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13508 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13509 #include <sys/proc.h>
13510
13511 "
13512 if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
13513
13514 cat >>confdefs.h <<_ACEOF
13515 #define HAVE_STRUCT_THREAD_TD_PCB 1
13516 _ACEOF
13517
13518
13519 fi
13520
13521
13522 # See if <sys/lwp.h> defines `struct lwp`.
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13524 $as_echo_n "checking for struct lwp... " >&6; }
13525 if test "${gdb_cv_struct_lwp+set}" = set; then :
13526   $as_echo_n "(cached) " >&6
13527 else
13528   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13529 /* end confdefs.h.  */
13530 #include <sys/param.h>
13531 #include <sys/lwp.h>
13532 int
13533 main ()
13534 {
13535 struct lwp l;
13536   ;
13537   return 0;
13538 }
13539 _ACEOF
13540 if ac_fn_c_try_compile "$LINENO"; then :
13541   gdb_cv_struct_lwp=yes
13542 else
13543   gdb_cv_struct_lwp=no
13544 fi
13545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13546 fi
13547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13548 $as_echo "$gdb_cv_struct_lwp" >&6; }
13549 if test $gdb_cv_struct_lwp = yes; then
13550
13551 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
13552
13553 fi
13554
13555 # See if <machine/reg.h> degines `struct reg'.
13556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13557 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13558 if test "${gdb_cv_struct_reg+set}" = set; then :
13559   $as_echo_n "(cached) " >&6
13560 else
13561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13562 /* end confdefs.h.  */
13563 #include <sys/types.h>
13564 #include <machine/reg.h>
13565 int
13566 main ()
13567 {
13568 struct reg r;
13569   ;
13570   return 0;
13571 }
13572 _ACEOF
13573 if ac_fn_c_try_compile "$LINENO"; then :
13574   gdb_cv_struct_reg=yes
13575 else
13576   gdb_cv_struct_reg=no
13577 fi
13578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13579 fi
13580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13581 $as_echo "$gdb_cv_struct_reg" >&6; }
13582 if test $gdb_cv_struct_reg = yes; then
13583
13584 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
13585
13586 fi
13587
13588 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13589 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
13590 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
13591 #include <machine/reg.h>
13592 "
13593 if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
13594
13595 cat >>confdefs.h <<_ACEOF
13596 #define HAVE_STRUCT_REG_R_FS 1
13597 _ACEOF
13598
13599
13600 fi
13601 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
13602 #include <machine/reg.h>
13603 "
13604 if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
13605
13606 cat >>confdefs.h <<_ACEOF
13607 #define HAVE_STRUCT_REG_R_GS 1
13608 _ACEOF
13609
13610
13611 fi
13612
13613
13614 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
13615 # Older amd64 Linux's don't have the fs_base and gs_base members of
13616 # `struct user_regs_struct'.
13617 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>
13618 "
13619 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
13620
13621 cat >>confdefs.h <<_ACEOF
13622 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
13623 _ACEOF
13624
13625
13626 fi
13627 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>
13628 "
13629 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
13630
13631 cat >>confdefs.h <<_ACEOF
13632 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
13633 _ACEOF
13634
13635
13636 fi
13637
13638
13639 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
13640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13641 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13642 if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13643   $as_echo_n "(cached) " >&6
13644 else
13645   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13646 /* end confdefs.h.  */
13647 #include <sys/ptrace.h>
13648 int
13649 main ()
13650 {
13651 PTRACE_GETREGS;
13652   ;
13653   return 0;
13654 }
13655 _ACEOF
13656 if ac_fn_c_try_compile "$LINENO"; then :
13657   gdb_cv_have_ptrace_getregs=yes
13658 else
13659   gdb_cv_have_ptrace_getregs=no
13660 fi
13661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13662 fi
13663
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13665 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
13666 if test $gdb_cv_have_ptrace_getregs = yes; then
13667
13668 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
13669
13670 fi
13671
13672 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
13673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13674 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13675 if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13676   $as_echo_n "(cached) " >&6
13677 else
13678   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13679 /* end confdefs.h.  */
13680 #include <sys/ptrace.h>
13681 int
13682 main ()
13683 {
13684 PTRACE_GETFPXREGS;
13685   ;
13686   return 0;
13687 }
13688 _ACEOF
13689 if ac_fn_c_try_compile "$LINENO"; then :
13690   gdb_cv_have_ptrace_getfpxregs=yes
13691 else
13692   gdb_cv_have_ptrace_getfpxregs=no
13693 fi
13694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13695 fi
13696
13697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13698 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
13699 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
13700
13701 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
13702
13703 fi
13704
13705 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
13706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13707 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
13708 if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13709   $as_echo_n "(cached) " >&6
13710 else
13711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13712 /* end confdefs.h.  */
13713 #include <sys/types.h>
13714 #include <sys/ptrace.h>
13715 int
13716 main ()
13717 {
13718 PT_GETDBREGS;
13719   ;
13720   return 0;
13721 }
13722 _ACEOF
13723 if ac_fn_c_try_compile "$LINENO"; then :
13724   gdb_cv_have_pt_getdbregs=yes
13725 else
13726   gdb_cv_have_pt_getdbregs=no
13727 fi
13728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13729 fi
13730
13731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13732 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
13733 if test $gdb_cv_have_pt_getdbregs = yes; then
13734
13735 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
13736
13737 fi
13738
13739 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
13740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13741 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13742 if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13743   $as_echo_n "(cached) " >&6
13744 else
13745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13746 /* end confdefs.h.  */
13747 #include <sys/types.h>
13748 #include <sys/ptrace.h>
13749 int
13750 main ()
13751 {
13752 PT_GETXMMREGS;
13753   ;
13754   return 0;
13755 }
13756 _ACEOF
13757 if ac_fn_c_try_compile "$LINENO"; then :
13758   gdb_cv_have_pt_getxmmregs=yes
13759 else
13760   gdb_cv_have_pt_getxmmregs=no
13761 fi
13762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13763 fi
13764
13765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13766 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
13767 if test $gdb_cv_have_pt_getxmmregs = yes; then
13768
13769 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
13770
13771 fi
13772
13773 # See if <sys/ptrace.h> supports LWP names on FreeBSD
13774 # Older FreeBSD versions don't have the pl_tdname member of
13775 # `struct ptrace_lwpinfo'.
13776 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
13777 "
13778 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
13779
13780 cat >>confdefs.h <<_ACEOF
13781 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
13782 _ACEOF
13783
13784
13785 fi
13786
13787
13788 # See if <sys/ptrace.h> supports syscall fields on FreeBSD.  The
13789 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
13790 # FreeBSD 10.3.
13791 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>
13792 "
13793 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
13794
13795 cat >>confdefs.h <<_ACEOF
13796 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
13797 _ACEOF
13798
13799
13800 fi
13801
13802
13803 # Detect which type of /proc is in use, such as for Solaris.
13804
13805 if test "${target}" = "${host}"; then
13806   case "${host}" in
13807   *-*-sysv4.2* | *-*-sysv5* )
13808
13809 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
13810
13811       ;;
13812   *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
13813
13814 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
13815
13816       ;;
13817   esac
13818 fi
13819
13820 if test "$ac_cv_header_sys_procfs_h" = yes; then
13821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13822 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13823  if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13824   $as_echo_n "(cached) " >&6
13825 else
13826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13827 /* end confdefs.h.  */
13828
13829 #define _SYSCALL32
13830 /* Needed for new procfs interface on sparc-solaris.  */
13831 #define _STRUCTURED_PROC 1
13832 #include <sys/procfs.h>
13833 int
13834 main ()
13835 {
13836 gregset_t avar
13837   ;
13838   return 0;
13839 }
13840 _ACEOF
13841 if ac_fn_c_try_compile "$LINENO"; then :
13842   bfd_cv_have_sys_procfs_type_gregset_t=yes
13843 else
13844   bfd_cv_have_sys_procfs_type_gregset_t=no
13845
13846 fi
13847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13848 fi
13849
13850  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
13851
13852 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
13853
13854  fi
13855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13856 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
13857
13858   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13859 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13860  if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13861   $as_echo_n "(cached) " >&6
13862 else
13863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13864 /* end confdefs.h.  */
13865
13866 #define _SYSCALL32
13867 /* Needed for new procfs interface on sparc-solaris.  */
13868 #define _STRUCTURED_PROC 1
13869 #include <sys/procfs.h>
13870 int
13871 main ()
13872 {
13873 fpregset_t avar
13874   ;
13875   return 0;
13876 }
13877 _ACEOF
13878 if ac_fn_c_try_compile "$LINENO"; then :
13879   bfd_cv_have_sys_procfs_type_fpregset_t=yes
13880 else
13881   bfd_cv_have_sys_procfs_type_fpregset_t=no
13882
13883 fi
13884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13885 fi
13886
13887  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
13888
13889 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
13890
13891  fi
13892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13893 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
13894
13895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13896 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13897  if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13898   $as_echo_n "(cached) " >&6
13899 else
13900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13901 /* end confdefs.h.  */
13902
13903 #define _SYSCALL32
13904 /* Needed for new procfs interface on sparc-solaris.  */
13905 #define _STRUCTURED_PROC 1
13906 #include <sys/procfs.h>
13907 int
13908 main ()
13909 {
13910 prgregset_t avar
13911   ;
13912   return 0;
13913 }
13914 _ACEOF
13915 if ac_fn_c_try_compile "$LINENO"; then :
13916   bfd_cv_have_sys_procfs_type_prgregset_t=yes
13917 else
13918   bfd_cv_have_sys_procfs_type_prgregset_t=no
13919
13920 fi
13921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13922 fi
13923
13924  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
13925
13926 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
13927
13928  fi
13929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13930 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
13931
13932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13933 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13934  if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13935   $as_echo_n "(cached) " >&6
13936 else
13937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13938 /* end confdefs.h.  */
13939
13940 #define _SYSCALL32
13941 /* Needed for new procfs interface on sparc-solaris.  */
13942 #define _STRUCTURED_PROC 1
13943 #include <sys/procfs.h>
13944 int
13945 main ()
13946 {
13947 prfpregset_t avar
13948   ;
13949   return 0;
13950 }
13951 _ACEOF
13952 if ac_fn_c_try_compile "$LINENO"; then :
13953   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
13954 else
13955   bfd_cv_have_sys_procfs_type_prfpregset_t=no
13956
13957 fi
13958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13959 fi
13960
13961  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
13962
13963 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
13964
13965  fi
13966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13967 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
13968
13969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13970 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13971  if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13972   $as_echo_n "(cached) " >&6
13973 else
13974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13975 /* end confdefs.h.  */
13976
13977 #define _SYSCALL32
13978 /* Needed for new procfs interface on sparc-solaris.  */
13979 #define _STRUCTURED_PROC 1
13980 #include <sys/procfs.h>
13981 int
13982 main ()
13983 {
13984 prgregset32_t avar
13985   ;
13986   return 0;
13987 }
13988 _ACEOF
13989 if ac_fn_c_try_compile "$LINENO"; then :
13990   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
13991 else
13992   bfd_cv_have_sys_procfs_type_prgregset32_t=no
13993
13994 fi
13995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13996 fi
13997
13998  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
13999
14000 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14001
14002  fi
14003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14004 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14005
14006   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14007 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14008  if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
14009   $as_echo_n "(cached) " >&6
14010 else
14011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14012 /* end confdefs.h.  */
14013
14014 #define _SYSCALL32
14015 /* Needed for new procfs interface on sparc-solaris.  */
14016 #define _STRUCTURED_PROC 1
14017 #include <sys/procfs.h>
14018 int
14019 main ()
14020 {
14021 lwpid_t avar
14022   ;
14023   return 0;
14024 }
14025 _ACEOF
14026 if ac_fn_c_try_compile "$LINENO"; then :
14027   bfd_cv_have_sys_procfs_type_lwpid_t=yes
14028 else
14029   bfd_cv_have_sys_procfs_type_lwpid_t=no
14030
14031 fi
14032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14033 fi
14034
14035  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14036
14037 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14038
14039  fi
14040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14041 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14042
14043   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14044 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14045  if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
14046   $as_echo_n "(cached) " >&6
14047 else
14048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14049 /* end confdefs.h.  */
14050
14051 #define _SYSCALL32
14052 /* Needed for new procfs interface on sparc-solaris.  */
14053 #define _STRUCTURED_PROC 1
14054 #include <sys/procfs.h>
14055 int
14056 main ()
14057 {
14058 psaddr_t avar
14059   ;
14060   return 0;
14061 }
14062 _ACEOF
14063 if ac_fn_c_try_compile "$LINENO"; then :
14064   bfd_cv_have_sys_procfs_type_psaddr_t=yes
14065 else
14066   bfd_cv_have_sys_procfs_type_psaddr_t=no
14067
14068 fi
14069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14070 fi
14071
14072  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14073
14074 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14075
14076  fi
14077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14078 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14079
14080   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
14081 $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
14082  if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
14083   $as_echo_n "(cached) " >&6
14084 else
14085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14086 /* end confdefs.h.  */
14087
14088 #define _SYSCALL32
14089 /* Needed for new procfs interface on sparc-solaris.  */
14090 #define _STRUCTURED_PROC 1
14091 #include <sys/procfs.h>
14092 int
14093 main ()
14094 {
14095 prsysent_t avar
14096   ;
14097   return 0;
14098 }
14099 _ACEOF
14100 if ac_fn_c_try_compile "$LINENO"; then :
14101   bfd_cv_have_sys_procfs_type_prsysent_t=yes
14102 else
14103   bfd_cv_have_sys_procfs_type_prsysent_t=no
14104
14105 fi
14106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14107 fi
14108
14109  if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
14110
14111 $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
14112
14113  fi
14114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
14115 $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
14116
14117   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
14118 $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
14119  if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
14120   $as_echo_n "(cached) " >&6
14121 else
14122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14123 /* end confdefs.h.  */
14124
14125 #define _SYSCALL32
14126 /* Needed for new procfs interface on sparc-solaris.  */
14127 #define _STRUCTURED_PROC 1
14128 #include <sys/procfs.h>
14129 int
14130 main ()
14131 {
14132 pr_sigset_t avar
14133   ;
14134   return 0;
14135 }
14136 _ACEOF
14137 if ac_fn_c_try_compile "$LINENO"; then :
14138   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
14139 else
14140   bfd_cv_have_sys_procfs_type_pr_sigset_t=no
14141
14142 fi
14143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14144 fi
14145
14146  if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
14147
14148 $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
14149
14150  fi
14151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
14152 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
14153
14154   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
14155 $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
14156  if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
14157   $as_echo_n "(cached) " >&6
14158 else
14159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14160 /* end confdefs.h.  */
14161
14162 #define _SYSCALL32
14163 /* Needed for new procfs interface on sparc-solaris.  */
14164 #define _STRUCTURED_PROC 1
14165 #include <sys/procfs.h>
14166 int
14167 main ()
14168 {
14169 pr_sigaction64_t avar
14170   ;
14171   return 0;
14172 }
14173 _ACEOF
14174 if ac_fn_c_try_compile "$LINENO"; then :
14175   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
14176 else
14177   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
14178
14179 fi
14180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14181 fi
14182
14183  if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
14184
14185 $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
14186
14187  fi
14188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14189 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
14190
14191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14192 $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14193  if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14194   $as_echo_n "(cached) " >&6
14195 else
14196   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14197 /* end confdefs.h.  */
14198
14199 #define _SYSCALL32
14200 /* Needed for new procfs interface on sparc-solaris.  */
14201 #define _STRUCTURED_PROC 1
14202 #include <sys/procfs.h>
14203 int
14204 main ()
14205 {
14206 pr_siginfo64_t avar
14207   ;
14208   return 0;
14209 }
14210 _ACEOF
14211 if ac_fn_c_try_compile "$LINENO"; then :
14212   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14213 else
14214   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
14215
14216 fi
14217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14218 fi
14219
14220  if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
14221
14222 $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
14223
14224  fi
14225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14226 $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
14227
14228
14229
14230
14231
14232   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14234 $as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14235     if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14236   $as_echo_n "(cached) " >&6
14237 else
14238   if test "$cross_compiling" = yes; then :
14239   gdb_cv_prfpregset_t_broken=yes
14240 else
14241   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14242 /* end confdefs.h.  */
14243 #include <sys/procfs.h>
14244        int main ()
14245        {
14246          if (sizeof (prfpregset_t) == sizeof (void *))
14247            return 1;
14248          return 0;
14249        }
14250 _ACEOF
14251 if ac_fn_c_try_run "$LINENO"; then :
14252   gdb_cv_prfpregset_t_broken=no
14253 else
14254   gdb_cv_prfpregset_t_broken=yes
14255 fi
14256 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14257   conftest.$ac_objext conftest.beam conftest.$ac_ext
14258 fi
14259
14260 fi
14261
14262     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14263 $as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
14264     if test $gdb_cv_prfpregset_t_broken = yes; then
14265
14266 $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
14267
14268     fi
14269   fi
14270 fi
14271
14272 # Check if the compiler supports the `long long' type.
14273
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14275 $as_echo_n "checking for long long support in compiler... " >&6; }
14276 if test "${gdb_cv_c_long_long+set}" = set; then :
14277   $as_echo_n "(cached) " >&6
14278 else
14279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14280 /* end confdefs.h.  */
14281 extern long long foo;
14282 int
14283 main ()
14284 {
14285 switch (foo & 2) { case 0: return 1; }
14286   ;
14287   return 0;
14288 }
14289 _ACEOF
14290 if ac_fn_c_try_compile "$LINENO"; then :
14291   gdb_cv_c_long_long=yes
14292 else
14293   gdb_cv_c_long_long=no
14294 fi
14295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14296 fi
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14298 $as_echo "$gdb_cv_c_long_long" >&6; }
14299 if test $gdb_cv_c_long_long != yes; then
14300   # libdecnumber requires long long.
14301   as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
14302 fi
14303
14304 # Check if the compiler and runtime support printing long longs.
14305
14306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14307 $as_echo_n "checking for long long support in printf... " >&6; }
14308 if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14309   $as_echo_n "(cached) " >&6
14310 else
14311   if test "$cross_compiling" = yes; then :
14312   gdb_cv_printf_has_long_long=no
14313 else
14314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14315 /* end confdefs.h.  */
14316 $ac_includes_default
14317 int
14318 main ()
14319 {
14320 char buf[32];
14321   long long l = 0;
14322   l = (l << 16) + 0x0123;
14323   l = (l << 16) + 0x4567;
14324   l = (l << 16) + 0x89ab;
14325   l = (l << 16) + 0xcdef;
14326   sprintf (buf, "0x%016llx", l);
14327   return (strcmp ("0x0123456789abcdef", buf));
14328   ;
14329   return 0;
14330 }
14331 _ACEOF
14332 if ac_fn_c_try_run "$LINENO"; then :
14333   gdb_cv_printf_has_long_long=yes
14334 else
14335   gdb_cv_printf_has_long_long=no
14336 fi
14337 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14338   conftest.$ac_objext conftest.beam conftest.$ac_ext
14339 fi
14340
14341 fi
14342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14343 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
14344 if test $gdb_cv_printf_has_long_long = yes; then
14345
14346 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
14347
14348 fi
14349
14350 # Check if the compiler and runtime support printing decfloats.
14351
14352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14353 $as_echo_n "checking for decfloat support in printf... " >&6; }
14354 if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14355   $as_echo_n "(cached) " >&6
14356 else
14357   if test "$cross_compiling" = yes; then :
14358   gdb_cv_printf_has_decfloat=no
14359 else
14360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14361 /* end confdefs.h.  */
14362 $ac_includes_default
14363 int
14364 main ()
14365 {
14366 char buf[64];
14367   _Decimal32 d32 = 1.2345df;
14368   _Decimal64 d64 = 1.2345dd;
14369   _Decimal128 d128 = 1.2345dl;
14370   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14371   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14372   ;
14373   return 0;
14374 }
14375 _ACEOF
14376 if ac_fn_c_try_run "$LINENO"; then :
14377   gdb_cv_printf_has_decfloat=yes
14378 else
14379   gdb_cv_printf_has_decfloat=no
14380 fi
14381 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14382   conftest.$ac_objext conftest.beam conftest.$ac_ext
14383 fi
14384
14385 fi
14386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14387 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
14388 if test $gdb_cv_printf_has_decfloat = yes; then
14389
14390 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
14391
14392 fi
14393
14394 # Check if the compiler supports the `long double' type.  We can't use
14395 # AC_C_LONG_DOUBLE because that one does additional checks on the
14396 # constants defined in <float.h> that fail on some systems,
14397 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
14398
14399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14400 $as_echo_n "checking for long double support in compiler... " >&6; }
14401 if test "${gdb_cv_c_long_double+set}" = set; then :
14402   $as_echo_n "(cached) " >&6
14403 else
14404   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14405 /* end confdefs.h.  */
14406 long double foo;
14407 _ACEOF
14408 if ac_fn_c_try_compile "$LINENO"; then :
14409   gdb_cv_c_long_double=yes
14410 else
14411   gdb_cv_c_long_double=no
14412 fi
14413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14414 fi
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14416 $as_echo "$gdb_cv_c_long_double" >&6; }
14417 if test $gdb_cv_c_long_double = yes; then
14418
14419 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
14420
14421 fi
14422
14423 # Check if the compiler and runtime support printing long doubles.
14424
14425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14426 $as_echo_n "checking for long double support in printf... " >&6; }
14427 if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14428   $as_echo_n "(cached) " >&6
14429 else
14430   if test "$cross_compiling" = yes; then :
14431   gdb_cv_printf_has_long_double=no
14432 else
14433   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14434 /* end confdefs.h.  */
14435 $ac_includes_default
14436 int
14437 main ()
14438 {
14439 char buf[16];
14440   long double f = 3.141592653;
14441   sprintf (buf, "%Lg", f);
14442   return (strncmp ("3.14159", buf, 7));
14443   ;
14444   return 0;
14445 }
14446 _ACEOF
14447 if ac_fn_c_try_run "$LINENO"; then :
14448   gdb_cv_printf_has_long_double=yes
14449 else
14450   gdb_cv_printf_has_long_double=no
14451 fi
14452 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14453   conftest.$ac_objext conftest.beam conftest.$ac_ext
14454 fi
14455
14456 fi
14457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14458 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
14459 if test $gdb_cv_printf_has_long_double = yes; then
14460
14461 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
14462
14463 fi
14464
14465 # Check if the compiler and runtime support scanning long doubles.
14466
14467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14468 $as_echo_n "checking for long double support in scanf... " >&6; }
14469 if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14470   $as_echo_n "(cached) " >&6
14471 else
14472   if test "$cross_compiling" = yes; then :
14473   gdb_cv_scanf_has_long_double=no
14474 else
14475   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14476 /* end confdefs.h.  */
14477 #include <stdio.h>
14478 int
14479 main ()
14480 {
14481 char *buf = "3.141592653";
14482   long double f = 0;
14483   sscanf (buf, "%Lg", &f);
14484   return !(f > 3.14159 && f < 3.14160);
14485   ;
14486   return 0;
14487 }
14488 _ACEOF
14489 if ac_fn_c_try_run "$LINENO"; then :
14490   gdb_cv_scanf_has_long_double=yes
14491 else
14492   gdb_cv_scanf_has_long_double=no
14493 fi
14494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14495   conftest.$ac_objext conftest.beam conftest.$ac_ext
14496 fi
14497
14498 fi
14499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14500 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
14501 if test $gdb_cv_scanf_has_long_double = yes; then
14502
14503 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
14504
14505 fi
14506
14507 case ${host_os} in
14508 aix*)
14509   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14510 $as_echo_n "checking for -bbigtoc option... " >&6; }
14511 if test "${gdb_cv_bigtoc+set}" = set; then :
14512   $as_echo_n "(cached) " >&6
14513 else
14514
14515     SAVE_LDFLAGS=$LDFLAGS
14516
14517     case $GCC in
14518     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14519     *) gdb_cv_bigtoc=-bbigtoc ;;
14520     esac
14521
14522     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
14523     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14524 /* end confdefs.h.  */
14525
14526 int
14527 main ()
14528 {
14529 int i;
14530   ;
14531   return 0;
14532 }
14533 _ACEOF
14534 if ac_fn_c_try_link "$LINENO"; then :
14535
14536 else
14537   gdb_cv_bigtoc=
14538 fi
14539 rm -f core conftest.err conftest.$ac_objext \
14540     conftest$ac_exeext conftest.$ac_ext
14541     LDFLAGS="${SAVE_LDFLAGS}"
14542
14543 fi
14544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14545 $as_echo "$gdb_cv_bigtoc" >&6; }
14546   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14547   ;;
14548 esac
14549
14550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
14551 $as_echo_n "checking for the dynamic export flag... " >&6; }
14552 dynamic_list=false
14553 if test "${gdb_native}" = yes; then
14554    # The dynamically loaded libthread_db needs access to symbols in the gdb
14555    # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
14556    # may not be supported there.
14557    old_LDFLAGS="$LDFLAGS"
14558    # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14559    RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14560    LDFLAGS="$LDFLAGS $RDYNAMIC"
14561    if test "${have_libpython}" = no; then
14562      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14563 /* end confdefs.h.  */
14564
14565 int
14566 main ()
14567 {
14568
14569   ;
14570   return 0;
14571 }
14572 _ACEOF
14573 if ac_fn_c_try_link "$LINENO"; then :
14574   dynamic_list=true
14575 fi
14576 rm -f core conftest.err conftest.$ac_objext \
14577     conftest$ac_exeext conftest.$ac_ext
14578    else
14579      # Workaround http://bugs.python.org/issue4434 where static
14580      # libpythonX.Y.a would get its symbols required for
14581      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14582      # Problem does not happen for the recommended libpythonX.Y.so linkage.
14583
14584      # Note the workaround for Python
14585      # http://bugs.python.org/issue10112 earlier has removed
14586      # -export-dynamic from PYTHON_LIBS.  That's exactly what we want
14587      # here too, as otherwise it'd make this -Wl,--dynamic-list test
14588      # always pass.
14589      old_CFLAGS="$CFLAGS"
14590      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14591      old_LIBS="$LIBS"
14592      LIBS="$LIBS $PYTHON_LIBS"
14593      old_CPPFLAGS="$CPPFLAGS"
14594      CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
14595      if test "$cross_compiling" = yes; then :
14596   true
14597 else
14598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14599 /* end confdefs.h.  */
14600 #include "Python.h"
14601 int
14602 main ()
14603 {
14604 int err;
14605           Py_Initialize ();
14606           err = PyRun_SimpleString ("import itertools\n");
14607           Py_Finalize ();
14608           return err == 0 ? 0 : 1;
14609   ;
14610   return 0;
14611 }
14612 _ACEOF
14613 if ac_fn_c_try_run "$LINENO"; then :
14614   dynamic_list=true
14615 fi
14616 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14617   conftest.$ac_objext conftest.beam conftest.$ac_ext
14618 fi
14619
14620      LIBS="$old_LIBS"
14621      CFLAGS="$old_CFLAGS"
14622      CPPFLAGS="$old_CPPFLAGS"
14623    fi
14624    LDFLAGS="$old_LDFLAGS"
14625 fi
14626 if $dynamic_list; then
14627   found="-Wl,--dynamic-list"
14628   RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
14629 else
14630   found="-rdynamic"
14631   RDYNAMIC="-rdynamic"
14632 fi
14633
14634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
14635 $as_echo "$found" >&6; }
14636
14637
14638 if test ${build} = ${host} -a ${host} = ${target} ; then
14639    case ${host_os} in
14640    solaris*)
14641       # See if thread_db library is around for Solaris thread debugging.
14642       # Note that we must explicitly test for version 1 of the library
14643       # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14644       # the same API.
14645       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14646 $as_echo_n "checking for Solaris thread debugging library... " >&6; }
14647       if test -f /usr/lib/libthread_db.so.1 ; then
14648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14649 $as_echo "yes" >&6; }
14650
14651 $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
14652
14653          CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
14654          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
14655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14656 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14657 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14658   $as_echo_n "(cached) " >&6
14659 else
14660   ac_check_lib_save_LIBS=$LIBS
14661 LIBS="-ldl  $LIBS"
14662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14663 /* end confdefs.h.  */
14664
14665 /* Override any GCC internal prototype to avoid an error.
14666    Use char because int might match the return type of a GCC
14667    builtin and then its argument prototype would still apply.  */
14668 #ifdef __cplusplus
14669 extern "C"
14670 #endif
14671 char dlopen ();
14672 int
14673 main ()
14674 {
14675 return dlopen ();
14676   ;
14677   return 0;
14678 }
14679 _ACEOF
14680 if ac_fn_c_try_link "$LINENO"; then :
14681   ac_cv_lib_dl_dlopen=yes
14682 else
14683   ac_cv_lib_dl_dlopen=no
14684 fi
14685 rm -f core conftest.err conftest.$ac_objext \
14686     conftest$ac_exeext conftest.$ac_ext
14687 LIBS=$ac_check_lib_save_LIBS
14688 fi
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14690 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14691 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
14692   cat >>confdefs.h <<_ACEOF
14693 #define HAVE_LIBDL 1
14694 _ACEOF
14695
14696   LIBS="-ldl $LIBS"
14697
14698 fi
14699
14700          CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
14701          # Sun randomly tweaked the prototypes in <proc_service.h>
14702          # at one point.
14703          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14704 $as_echo_n "checking if <proc_service.h> is old... " >&6; }
14705          if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14706   $as_echo_n "(cached) " >&6
14707 else
14708
14709             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14710 /* end confdefs.h.  */
14711
14712                 #include <proc_service.h>
14713                 ps_err_e ps_pdwrite
14714                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
14715
14716 int
14717 main ()
14718 {
14719
14720   ;
14721   return 0;
14722 }
14723 _ACEOF
14724 if ac_fn_c_try_compile "$LINENO"; then :
14725   gdb_cv_proc_service_is_old=no
14726 else
14727   gdb_cv_proc_service_is_old=yes
14728 fi
14729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14730
14731 fi
14732
14733          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14734 $as_echo "$gdb_cv_proc_service_is_old" >&6; }
14735          if test $gdb_cv_proc_service_is_old = yes; then
14736
14737 $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
14738
14739          fi
14740       else
14741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14742 $as_echo "no" >&6; }
14743       fi
14744       ;;
14745    aix*)
14746       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14747 $as_echo_n "checking for AiX thread debugging library... " >&6; }
14748       if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14749   $as_echo_n "(cached) " >&6
14750 else
14751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14752 /* end confdefs.h.  */
14753 #include <sys/pthdebug.h>
14754 int
14755 main ()
14756 {
14757 #ifndef PTHDB_VERSION_3
14758                                     #error
14759                                     #endif
14760   ;
14761   return 0;
14762 }
14763 _ACEOF
14764 if ac_fn_c_try_compile "$LINENO"; then :
14765   gdb_cv_have_aix_thread_debug=yes
14766 else
14767   gdb_cv_have_aix_thread_debug=no
14768 fi
14769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14770 fi
14771
14772       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14773 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
14774       if test $gdb_cv_have_aix_thread_debug = yes; then
14775          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
14776          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
14777          LIBS="$LIBS -lpthdebug"
14778
14779          # Older versions of AIX do not provide the declaration for
14780          # the getthrds function (it appears that it was introduced
14781          # with AIX 6.x).
14782          ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14783 "
14784 if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14785   ac_have_decl=1
14786 else
14787   ac_have_decl=0
14788 fi
14789
14790 cat >>confdefs.h <<_ACEOF
14791 #define HAVE_DECL_GETTHRDS $ac_have_decl
14792 _ACEOF
14793
14794       fi
14795       ;;
14796    esac
14797
14798 fi
14799
14800 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
14801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14802 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14803 if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14804   $as_echo_n "(cached) " >&6
14805 else
14806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14807 /* end confdefs.h.  */
14808 #include <thread_db.h>
14809 int
14810 main ()
14811 {
14812 int i = TD_NOTALLOC;
14813   ;
14814   return 0;
14815 }
14816 _ACEOF
14817 if ac_fn_c_try_compile "$LINENO"; then :
14818   gdb_cv_thread_db_h_has_td_notalloc=yes
14819 else
14820   gdb_cv_thread_db_h_has_td_notalloc=no
14821
14822 fi
14823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14824
14825 fi
14826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14827 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14829 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14830 if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14831   $as_echo_n "(cached) " >&6
14832 else
14833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14834 /* end confdefs.h.  */
14835 #include <thread_db.h>
14836 int
14837 main ()
14838 {
14839 int i = TD_VERSION;
14840   ;
14841   return 0;
14842 }
14843 _ACEOF
14844 if ac_fn_c_try_compile "$LINENO"; then :
14845   gdb_cv_thread_db_h_has_td_version=yes
14846 else
14847   gdb_cv_thread_db_h_has_td_version=no
14848
14849 fi
14850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14851
14852 fi
14853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14854 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14856 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14857 if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14858   $as_echo_n "(cached) " >&6
14859 else
14860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14861 /* end confdefs.h.  */
14862 #include <thread_db.h>
14863 int
14864 main ()
14865 {
14866 int i = TD_NOTLS;
14867   ;
14868   return 0;
14869 }
14870 _ACEOF
14871 if ac_fn_c_try_compile "$LINENO"; then :
14872   gdb_cv_thread_db_h_has_td_notls=yes
14873 else
14874   gdb_cv_thread_db_h_has_td_notls=no
14875
14876 fi
14877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14878
14879 fi
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14881 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
14882 fi
14883 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
14884
14885 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
14886
14887 fi
14888 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14889
14890 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
14891
14892 fi
14893 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14894
14895 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
14896
14897 fi
14898
14899 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14900 "
14901 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14902   ac_have_decl=1
14903 else
14904   ac_have_decl=0
14905 fi
14906
14907 cat >>confdefs.h <<_ACEOF
14908 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
14909 _ACEOF
14910
14911
14912 if test "$cross_compiling" = yes; then :
14913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14914 /* end confdefs.h.  */
14915 #include <sys/personality.h>
14916 int
14917 main ()
14918 {
14919
14920 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
14921 #       define ADDR_NO_RANDOMIZE 0x0040000
14922 #      endif
14923        /* Test the flag could be set and stays set.  */
14924        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14925        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14926            return 1
14927   ;
14928   return 0;
14929 }
14930 _ACEOF
14931 if ac_fn_c_try_link "$LINENO"; then :
14932   have_personality=true
14933 else
14934   have_personality=false
14935 fi
14936 rm -f core conftest.err conftest.$ac_objext \
14937     conftest$ac_exeext conftest.$ac_ext
14938 else
14939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14940 /* end confdefs.h.  */
14941 #include <sys/personality.h>
14942 int
14943 main ()
14944 {
14945
14946 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
14947 #       define ADDR_NO_RANDOMIZE 0x0040000
14948 #      endif
14949        /* Test the flag could be set and stays set.  */
14950        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14951        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14952            return 1
14953   ;
14954   return 0;
14955 }
14956 _ACEOF
14957 if ac_fn_c_try_run "$LINENO"; then :
14958   have_personality=true
14959 else
14960   have_personality=false
14961 fi
14962 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14963   conftest.$ac_objext conftest.beam conftest.$ac_ext
14964 fi
14965
14966 if $have_personality
14967 then
14968
14969 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
14970
14971 fi
14972
14973 case $host_os in
14974   go32* | *djgpp*)
14975     gdbinit=gdb.ini
14976     ;;
14977   *)
14978     gdbinit=.gdbinit
14979     ;;
14980 esac
14981
14982 cat >>confdefs.h <<_ACEOF
14983 #define GDBINIT "$gdbinit"
14984 _ACEOF
14985
14986
14987
14988 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14989 # except that the argument to --with-sysroot is optional.
14990 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14991 if test "x$with_sysroot" = xyes; then
14992   with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14993 fi
14994
14995 # Check whether --with-sysroot was given.
14996 if test "${with_sysroot+set}" = set; then :
14997   withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14998 else
14999   TARGET_SYSTEM_ROOT=
15000 fi
15001
15002
15003   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15004   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15005   ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15006   ac_define_dir=`eval echo $ac_define_dir`
15007
15008 cat >>confdefs.h <<_ACEOF
15009 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
15010 _ACEOF
15011
15012
15013
15014
15015   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15016      if test "x$prefix" = xNONE; then
15017         test_prefix=/usr/local
15018      else
15019         test_prefix=$prefix
15020      fi
15021   else
15022      test_prefix=$exec_prefix
15023   fi
15024   value=0
15025   case ${ac_define_dir} in
15026      "${test_prefix}"|"${test_prefix}/"*|\
15027         '${exec_prefix}'|'${exec_prefix}/'*)
15028      value=1
15029      ;;
15030   esac
15031
15032 cat >>confdefs.h <<_ACEOF
15033 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15034 _ACEOF
15035
15036
15037
15038
15039
15040 # Check whether --with-system-gdbinit was given.
15041 if test "${with_system_gdbinit+set}" = set; then :
15042   withval=$with_system_gdbinit;
15043     SYSTEM_GDBINIT=$withval
15044 else
15045   SYSTEM_GDBINIT=
15046 fi
15047
15048
15049   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15050   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15051   ac_define_dir=`eval echo $SYSTEM_GDBINIT`
15052   ac_define_dir=`eval echo $ac_define_dir`
15053
15054 cat >>confdefs.h <<_ACEOF
15055 #define SYSTEM_GDBINIT "$ac_define_dir"
15056 _ACEOF
15057
15058
15059
15060
15061   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15062      if test "x$prefix" = xNONE; then
15063         test_prefix=/usr/local
15064      else
15065         test_prefix=$prefix
15066      fi
15067   else
15068      test_prefix=$exec_prefix
15069   fi
15070   value=0
15071   case ${ac_define_dir} in
15072      "${test_prefix}"|"${test_prefix}/"*|\
15073         '${exec_prefix}'|'${exec_prefix}/'*)
15074      value=1
15075      ;;
15076   esac
15077
15078 cat >>confdefs.h <<_ACEOF
15079 #define SYSTEM_GDBINIT_RELOCATABLE $value
15080 _ACEOF
15081
15082
15083
15084
15085
15086 # Check whether --enable-werror was given.
15087 if test "${enable_werror+set}" = set; then :
15088   enableval=$enable_werror; case "${enableval}" in
15089      yes | y) ERROR_ON_WARNING="yes" ;;
15090      no | n)  ERROR_ON_WARNING="no" ;;
15091      *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
15092    esac
15093 fi
15094
15095
15096 # Enable -Werror by default when using gcc.  Turn it off for releases.
15097 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
15098     ERROR_ON_WARNING=yes
15099 fi
15100
15101 WERROR_CFLAGS=""
15102 if test "${ERROR_ON_WARNING}" = yes ; then
15103     WERROR_CFLAGS="-Werror"
15104 fi
15105
15106 # The options we'll try to enable.
15107 build_warnings="-Wall -Wpointer-arith \
15108 -Wno-unused -Wunused-value -Wunused-function \
15109 -Wno-switch -Wno-char-subscripts \
15110 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
15111 -Wno-sign-compare -Wno-narrowing"
15112
15113 # Enable -Wno-format by default when using gcc on mingw since many
15114 # GCC versions complain about %I64.
15115 case "${host}" in
15116   *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
15117   *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
15118 esac
15119
15120 # Check whether --enable-build-warnings was given.
15121 if test "${enable_build_warnings+set}" = set; then :
15122   enableval=$enable_build_warnings; case "${enableval}" in
15123   yes)  ;;
15124   no)   build_warnings="-w";;
15125   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15126         build_warnings="${build_warnings} ${t}";;
15127   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15128         build_warnings="${t} ${build_warnings}";;
15129   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15130 esac
15131 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15132   echo "Setting compiler warning flags = $build_warnings" 6>&1
15133 fi
15134 fi
15135 # Check whether --enable-gdb-build-warnings was given.
15136 if test "${enable_gdb_build_warnings+set}" = set; then :
15137   enableval=$enable_gdb_build_warnings; case "${enableval}" in
15138   yes)  ;;
15139   no)   build_warnings="-w";;
15140   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15141         build_warnings="${build_warnings} ${t}";;
15142   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15143         build_warnings="${t} ${build_warnings}";;
15144   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15145 esac
15146 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15147   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15148 fi
15149 fi
15150
15151 # The set of warnings supported by a C++ compiler is not the same as
15152 # of the C compiler.
15153 ac_ext=cpp
15154 ac_cpp='$CXXCPP $CPPFLAGS'
15155 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15156 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15157 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15158
15159
15160 WARN_CFLAGS=""
15161 if test "x${build_warnings}" != x -a "x$GCC" = xyes
15162 then
15163     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15164 $as_echo_n "checking compiler warning flags... " >&6; }
15165     # Separate out the -Werror flag as some files just cannot be
15166     # compiled with it enabled.
15167     for w in ${build_warnings}; do
15168         # GCC does not complain about -Wno-unknown-warning.  Invert
15169         # and test -Wunknown-warning instead.
15170         case $w in
15171         -Wno-*)
15172                 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15173         *)
15174                 wtest=$w ;;
15175         esac
15176
15177         case $w in
15178         -Werr*) WERROR_CFLAGS=-Werror ;;
15179         *)
15180             # Check whether GCC accepts it.
15181             saved_CFLAGS="$CFLAGS"
15182             CFLAGS="$CFLAGS $wtest"
15183             saved_CXXFLAGS="$CXXFLAGS"
15184             CXXFLAGS="$CXXFLAGS $wtest"
15185             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15186 /* end confdefs.h.  */
15187
15188 int
15189 main ()
15190 {
15191
15192   ;
15193   return 0;
15194 }
15195 _ACEOF
15196 if ac_fn_cxx_try_compile "$LINENO"; then :
15197   WARN_CFLAGS="${WARN_CFLAGS} $w"
15198 fi
15199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15200             CFLAGS="$saved_CFLAGS"
15201             CXXFLAGS="$saved_CXXFLAGS"
15202         esac
15203     done
15204     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15205 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
15206 fi
15207
15208
15209
15210 ac_ext=c
15211 ac_cpp='$CPP $CPPFLAGS'
15212 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15213 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15214 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15215
15216
15217
15218 # In the Cygwin environment, we need some additional flags.
15219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15220 $as_echo_n "checking for cygwin... " >&6; }
15221 if test "${gdb_cv_os_cygwin+set}" = set; then :
15222   $as_echo_n "(cached) " >&6
15223 else
15224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15225 /* end confdefs.h.  */
15226
15227 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
15228 lose
15229 #endif
15230 _ACEOF
15231 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15232   $EGREP "^lose$" >/dev/null 2>&1; then :
15233   gdb_cv_os_cygwin=yes
15234 else
15235   gdb_cv_os_cygwin=no
15236 fi
15237 rm -f conftest*
15238
15239 fi
15240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15241 $as_echo "$gdb_cv_os_cygwin" >&6; }
15242
15243
15244 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
15245 case ${host} in
15246   *go32* ) SER_HARDWIRE=ser-go32.o ;;
15247   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
15248   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
15249 esac
15250
15251
15252 # libreadline needs libuser32.a in a cygwin environment
15253 WIN32LIBS=
15254 if test x$gdb_cv_os_cygwin = xyes; then
15255     WIN32LIBS="-luser32"
15256     case "${target}" in
15257         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15258         ;;
15259     esac
15260 fi
15261
15262 # The ser-tcp.c module requires sockets.
15263 case ${host} in
15264   *mingw32*)
15265
15266 $as_echo "#define USE_WIN32API 1" >>confdefs.h
15267
15268     WIN32LIBS="$WIN32LIBS -lws2_32"
15269     ;;
15270 esac
15271
15272
15273 # Add ELF support to GDB, but only if BFD includes ELF support.
15274
15275   OLD_CFLAGS=$CFLAGS
15276   OLD_LDFLAGS=$LDFLAGS
15277   OLD_LIBS=$LIBS
15278   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15279   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15280   # always want our bfd.
15281   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15282   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15283   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15284   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15285   LIBS="-lbfd -liberty -lz $intl $LIBS"
15286   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15287 $as_echo_n "checking for ELF support in BFD... " >&6; }
15288 if test "${gdb_cv_var_elf+set}" = set; then :
15289   $as_echo_n "(cached) " >&6
15290 else
15291   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15292 /* end confdefs.h.  */
15293 #include <stdlib.h>
15294   #include "bfd.h"
15295   #include "elf-bfd.h"
15296
15297 int
15298 main ()
15299 {
15300 return bfd_get_elf_phdr_upper_bound (NULL);
15301   ;
15302   return 0;
15303 }
15304 _ACEOF
15305 if ac_fn_c_try_link "$LINENO"; then :
15306   gdb_cv_var_elf=yes
15307 else
15308   gdb_cv_var_elf=no
15309 fi
15310 rm -f core conftest.err conftest.$ac_objext \
15311     conftest$ac_exeext conftest.$ac_ext
15312 fi
15313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15314 $as_echo "$gdb_cv_var_elf" >&6; }
15315   CFLAGS=$OLD_CFLAGS
15316   LDFLAGS=$OLD_LDFLAGS
15317   LIBS=$OLD_LIBS
15318 if test $gdb_cv_var_elf = yes; then
15319   CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
15320
15321 $as_echo "#define HAVE_ELF 1" >>confdefs.h
15322
15323   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15324   if test "$plugins" = "yes"; then
15325     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15326 $as_echo_n "checking for library containing dlopen... " >&6; }
15327 if test "${ac_cv_search_dlopen+set}" = set; then :
15328   $as_echo_n "(cached) " >&6
15329 else
15330   ac_func_search_save_LIBS=$LIBS
15331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15332 /* end confdefs.h.  */
15333
15334 /* Override any GCC internal prototype to avoid an error.
15335    Use char because int might match the return type of a GCC
15336    builtin and then its argument prototype would still apply.  */
15337 #ifdef __cplusplus
15338 extern "C"
15339 #endif
15340 char dlopen ();
15341 int
15342 main ()
15343 {
15344 return dlopen ();
15345   ;
15346   return 0;
15347 }
15348 _ACEOF
15349 for ac_lib in '' dl; do
15350   if test -z "$ac_lib"; then
15351     ac_res="none required"
15352   else
15353     ac_res=-l$ac_lib
15354     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15355   fi
15356   if ac_fn_c_try_link "$LINENO"; then :
15357   ac_cv_search_dlopen=$ac_res
15358 fi
15359 rm -f core conftest.err conftest.$ac_objext \
15360     conftest$ac_exeext
15361   if test "${ac_cv_search_dlopen+set}" = set; then :
15362   break
15363 fi
15364 done
15365 if test "${ac_cv_search_dlopen+set}" = set; then :
15366
15367 else
15368   ac_cv_search_dlopen=no
15369 fi
15370 rm conftest.$ac_ext
15371 LIBS=$ac_func_search_save_LIBS
15372 fi
15373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15374 $as_echo "$ac_cv_search_dlopen" >&6; }
15375 ac_res=$ac_cv_search_dlopen
15376 if test "$ac_res" != no; then :
15377   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15378
15379 fi
15380
15381   fi
15382 fi
15383
15384 # Add macho support to GDB, but only if BFD includes it.
15385
15386   OLD_CFLAGS=$CFLAGS
15387   OLD_LDFLAGS=$LDFLAGS
15388   OLD_LIBS=$LIBS
15389   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15390   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15391   # always want our bfd.
15392   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15393   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15394   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15395   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15396   LIBS="-lbfd -liberty -lz $intl $LIBS"
15397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15398 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
15399 if test "${gdb_cv_var_macho+set}" = set; then :
15400   $as_echo_n "(cached) " >&6
15401 else
15402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15403 /* end confdefs.h.  */
15404 #include <stdlib.h>
15405   #include "bfd.h"
15406   #include "mach-o.h"
15407
15408 int
15409 main ()
15410 {
15411 return bfd_mach_o_lookup_command (NULL, 0, NULL);
15412   ;
15413   return 0;
15414 }
15415 _ACEOF
15416 if ac_fn_c_try_link "$LINENO"; then :
15417   gdb_cv_var_macho=yes
15418 else
15419   gdb_cv_var_macho=no
15420 fi
15421 rm -f core conftest.err conftest.$ac_objext \
15422     conftest$ac_exeext conftest.$ac_ext
15423 fi
15424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15425 $as_echo "$gdb_cv_var_macho" >&6; }
15426   CFLAGS=$OLD_CFLAGS
15427   LDFLAGS=$OLD_LDFLAGS
15428   LIBS=$OLD_LIBS
15429 if test $gdb_cv_var_macho = yes; then
15430   CONFIG_OBS="$CONFIG_OBS machoread.o"
15431 fi
15432
15433 # Add any host-specific objects to GDB.
15434 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15435
15436 # If building on ELF, look for lzma support for embedded compressed debug info.
15437 if test $gdb_cv_var_elf = yes; then
15438
15439 # Check whether --with-lzma was given.
15440 if test "${with_lzma+set}" = set; then :
15441   withval=$with_lzma;
15442 else
15443   with_lzma=auto
15444 fi
15445
15446   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15447 $as_echo_n "checking whether to use lzma... " >&6; }
15448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15449 $as_echo "$with_lzma" >&6; }
15450
15451   if test "${with_lzma}" != no; then
15452
15453
15454
15455
15456
15457
15458
15459
15460     use_additional=yes
15461
15462   acl_save_prefix="$prefix"
15463   prefix="$acl_final_prefix"
15464   acl_save_exec_prefix="$exec_prefix"
15465   exec_prefix="$acl_final_exec_prefix"
15466
15467     eval additional_includedir=\"$includedir\"
15468     eval additional_libdir=\"$libdir\"
15469
15470   exec_prefix="$acl_save_exec_prefix"
15471   prefix="$acl_save_prefix"
15472
15473
15474 # Check whether --with-liblzma-prefix was given.
15475 if test "${with_liblzma_prefix+set}" = set; then :
15476   withval=$with_liblzma_prefix;
15477     if test "X$withval" = "Xno"; then
15478       use_additional=no
15479     else
15480       if test "X$withval" = "X"; then
15481
15482   acl_save_prefix="$prefix"
15483   prefix="$acl_final_prefix"
15484   acl_save_exec_prefix="$exec_prefix"
15485   exec_prefix="$acl_final_exec_prefix"
15486
15487           eval additional_includedir=\"$includedir\"
15488           eval additional_libdir=\"$libdir\"
15489
15490   exec_prefix="$acl_save_exec_prefix"
15491   prefix="$acl_save_prefix"
15492
15493       else
15494         additional_includedir="$withval/include"
15495         additional_libdir="$withval/lib"
15496       fi
15497     fi
15498
15499 fi
15500
15501       LIBLZMA=
15502   LTLIBLZMA=
15503   INCLZMA=
15504   rpathdirs=
15505   ltrpathdirs=
15506   names_already_handled=
15507   names_next_round='lzma '
15508   while test -n "$names_next_round"; do
15509     names_this_round="$names_next_round"
15510     names_next_round=
15511     for name in $names_this_round; do
15512       already_handled=
15513       for n in $names_already_handled; do
15514         if test "$n" = "$name"; then
15515           already_handled=yes
15516           break
15517         fi
15518       done
15519       if test -z "$already_handled"; then
15520         names_already_handled="$names_already_handled $name"
15521                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15522         eval value=\"\$HAVE_LIB$uppername\"
15523         if test -n "$value"; then
15524           if test "$value" = yes; then
15525             eval value=\"\$LIB$uppername\"
15526             test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15527             eval value=\"\$LTLIB$uppername\"
15528             test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15529           else
15530                                     :
15531           fi
15532         else
15533                               found_dir=
15534           found_la=
15535           found_so=
15536           found_a=
15537           if test $use_additional = yes; then
15538             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15539               found_dir="$additional_libdir"
15540               found_so="$additional_libdir/lib$name.$shlibext"
15541               if test -f "$additional_libdir/lib$name.la"; then
15542                 found_la="$additional_libdir/lib$name.la"
15543               fi
15544             else
15545               if test -f "$additional_libdir/lib$name.$libext"; then
15546                 found_dir="$additional_libdir"
15547                 found_a="$additional_libdir/lib$name.$libext"
15548                 if test -f "$additional_libdir/lib$name.la"; then
15549                   found_la="$additional_libdir/lib$name.la"
15550                 fi
15551               fi
15552             fi
15553           fi
15554           if test "X$found_dir" = "X"; then
15555             for x in $LDFLAGS $LTLIBLZMA; do
15556
15557   acl_save_prefix="$prefix"
15558   prefix="$acl_final_prefix"
15559   acl_save_exec_prefix="$exec_prefix"
15560   exec_prefix="$acl_final_exec_prefix"
15561   eval x=\"$x\"
15562   exec_prefix="$acl_save_exec_prefix"
15563   prefix="$acl_save_prefix"
15564
15565               case "$x" in
15566                 -L*)
15567                   dir=`echo "X$x" | sed -e 's/^X-L//'`
15568                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15569                     found_dir="$dir"
15570                     found_so="$dir/lib$name.$shlibext"
15571                     if test -f "$dir/lib$name.la"; then
15572                       found_la="$dir/lib$name.la"
15573                     fi
15574                   else
15575                     if test -f "$dir/lib$name.$libext"; then
15576                       found_dir="$dir"
15577                       found_a="$dir/lib$name.$libext"
15578                       if test -f "$dir/lib$name.la"; then
15579                         found_la="$dir/lib$name.la"
15580                       fi
15581                     fi
15582                   fi
15583                   ;;
15584               esac
15585               if test "X$found_dir" != "X"; then
15586                 break
15587               fi
15588             done
15589           fi
15590           if test "X$found_dir" != "X"; then
15591                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15592             if test "X$found_so" != "X"; then
15593                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15594                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15595               else
15596                                                                                 haveit=
15597                 for x in $ltrpathdirs; do
15598                   if test "X$x" = "X$found_dir"; then
15599                     haveit=yes
15600                     break
15601                   fi
15602                 done
15603                 if test -z "$haveit"; then
15604                   ltrpathdirs="$ltrpathdirs $found_dir"
15605                 fi
15606                                 if test "$hardcode_direct" = yes; then
15607                                                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15608                 else
15609                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15610                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15611                                                             haveit=
15612                     for x in $rpathdirs; do
15613                       if test "X$x" = "X$found_dir"; then
15614                         haveit=yes
15615                         break
15616                       fi
15617                     done
15618                     if test -z "$haveit"; then
15619                       rpathdirs="$rpathdirs $found_dir"
15620                     fi
15621                   else
15622                                                                                 haveit=
15623                     for x in $LDFLAGS $LIBLZMA; do
15624
15625   acl_save_prefix="$prefix"
15626   prefix="$acl_final_prefix"
15627   acl_save_exec_prefix="$exec_prefix"
15628   exec_prefix="$acl_final_exec_prefix"
15629   eval x=\"$x\"
15630   exec_prefix="$acl_save_exec_prefix"
15631   prefix="$acl_save_prefix"
15632
15633                       if test "X$x" = "X-L$found_dir"; then
15634                         haveit=yes
15635                         break
15636                       fi
15637                     done
15638                     if test -z "$haveit"; then
15639                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15640                     fi
15641                     if test "$hardcode_minus_L" != no; then
15642                                                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15643                     else
15644                                                                                                                                                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15645                     fi
15646                   fi
15647                 fi
15648               fi
15649             else
15650               if test "X$found_a" != "X"; then
15651                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15652               else
15653                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15654               fi
15655             fi
15656                         additional_includedir=
15657             case "$found_dir" in
15658               */lib | */lib/)
15659                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15660                 additional_includedir="$basedir/include"
15661                 ;;
15662             esac
15663             if test "X$additional_includedir" != "X"; then
15664                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
15665                 haveit=
15666                 if test "X$additional_includedir" = "X/usr/local/include"; then
15667                   if test -n "$GCC"; then
15668                     case $host_os in
15669                       linux*) haveit=yes;;
15670                     esac
15671                   fi
15672                 fi
15673                 if test -z "$haveit"; then
15674                   for x in $CPPFLAGS $INCLZMA; do
15675
15676   acl_save_prefix="$prefix"
15677   prefix="$acl_final_prefix"
15678   acl_save_exec_prefix="$exec_prefix"
15679   exec_prefix="$acl_final_exec_prefix"
15680   eval x=\"$x\"
15681   exec_prefix="$acl_save_exec_prefix"
15682   prefix="$acl_save_prefix"
15683
15684                     if test "X$x" = "X-I$additional_includedir"; then
15685                       haveit=yes
15686                       break
15687                     fi
15688                   done
15689                   if test -z "$haveit"; then
15690                     if test -d "$additional_includedir"; then
15691                                             INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15692                     fi
15693                   fi
15694                 fi
15695               fi
15696             fi
15697                         if test -n "$found_la"; then
15698                                                         save_libdir="$libdir"
15699               case "$found_la" in
15700                 */* | *\\*) . "$found_la" ;;
15701                 *) . "./$found_la" ;;
15702               esac
15703               libdir="$save_libdir"
15704                             for dep in $dependency_libs; do
15705                 case "$dep" in
15706                   -L*)
15707                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15708                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
15709                       haveit=
15710                       if test "X$additional_libdir" = "X/usr/local/lib"; then
15711                         if test -n "$GCC"; then
15712                           case $host_os in
15713                             linux*) haveit=yes;;
15714                           esac
15715                         fi
15716                       fi
15717                       if test -z "$haveit"; then
15718                         haveit=
15719                         for x in $LDFLAGS $LIBLZMA; do
15720
15721   acl_save_prefix="$prefix"
15722   prefix="$acl_final_prefix"
15723   acl_save_exec_prefix="$exec_prefix"
15724   exec_prefix="$acl_final_exec_prefix"
15725   eval x=\"$x\"
15726   exec_prefix="$acl_save_exec_prefix"
15727   prefix="$acl_save_prefix"
15728
15729                           if test "X$x" = "X-L$additional_libdir"; then
15730                             haveit=yes
15731                             break
15732                           fi
15733                         done
15734                         if test -z "$haveit"; then
15735                           if test -d "$additional_libdir"; then
15736                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
15737                           fi
15738                         fi
15739                         haveit=
15740                         for x in $LDFLAGS $LTLIBLZMA; do
15741
15742   acl_save_prefix="$prefix"
15743   prefix="$acl_final_prefix"
15744   acl_save_exec_prefix="$exec_prefix"
15745   exec_prefix="$acl_final_exec_prefix"
15746   eval x=\"$x\"
15747   exec_prefix="$acl_save_exec_prefix"
15748   prefix="$acl_save_prefix"
15749
15750                           if test "X$x" = "X-L$additional_libdir"; then
15751                             haveit=yes
15752                             break
15753                           fi
15754                         done
15755                         if test -z "$haveit"; then
15756                           if test -d "$additional_libdir"; then
15757                                                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
15758                           fi
15759                         fi
15760                       fi
15761                     fi
15762                     ;;
15763                   -R*)
15764                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
15765                     if test "$enable_rpath" != no; then
15766                                                                   haveit=
15767                       for x in $rpathdirs; do
15768                         if test "X$x" = "X$dir"; then
15769                           haveit=yes
15770                           break
15771                         fi
15772                       done
15773                       if test -z "$haveit"; then
15774                         rpathdirs="$rpathdirs $dir"
15775                       fi
15776                                                                   haveit=
15777                       for x in $ltrpathdirs; do
15778                         if test "X$x" = "X$dir"; then
15779                           haveit=yes
15780                           break
15781                         fi
15782                       done
15783                       if test -z "$haveit"; then
15784                         ltrpathdirs="$ltrpathdirs $dir"
15785                       fi
15786                     fi
15787                     ;;
15788                   -l*)
15789                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15790                     ;;
15791                   *.la)
15792                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15793                     ;;
15794                   *)
15795                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
15796                     LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
15797                     ;;
15798                 esac
15799               done
15800             fi
15801           else
15802                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15803             LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
15804           fi
15805         fi
15806       fi
15807     done
15808   done
15809   if test "X$rpathdirs" != "X"; then
15810     if test -n "$hardcode_libdir_separator"; then
15811                         alldirs=
15812       for found_dir in $rpathdirs; do
15813         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15814       done
15815             acl_save_libdir="$libdir"
15816       libdir="$alldirs"
15817       eval flag=\"$hardcode_libdir_flag_spec\"
15818       libdir="$acl_save_libdir"
15819       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15820     else
15821             for found_dir in $rpathdirs; do
15822         acl_save_libdir="$libdir"
15823         libdir="$found_dir"
15824         eval flag=\"$hardcode_libdir_flag_spec\"
15825         libdir="$acl_save_libdir"
15826         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15827       done
15828     fi
15829   fi
15830   if test "X$ltrpathdirs" != "X"; then
15831             for found_dir in $ltrpathdirs; do
15832       LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15833     done
15834   fi
15835
15836
15837         ac_save_CPPFLAGS="$CPPFLAGS"
15838
15839   for element in $INCLZMA; do
15840     haveit=
15841     for x in $CPPFLAGS; do
15842
15843   acl_save_prefix="$prefix"
15844   prefix="$acl_final_prefix"
15845   acl_save_exec_prefix="$exec_prefix"
15846   exec_prefix="$acl_final_exec_prefix"
15847   eval x=\"$x\"
15848   exec_prefix="$acl_save_exec_prefix"
15849   prefix="$acl_save_prefix"
15850
15851       if test "X$x" = "X$element"; then
15852         haveit=yes
15853         break
15854       fi
15855     done
15856     if test -z "$haveit"; then
15857       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15858     fi
15859   done
15860
15861
15862   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15863 $as_echo_n "checking for liblzma... " >&6; }
15864 if test "${ac_cv_liblzma+set}" = set; then :
15865   $as_echo_n "(cached) " >&6
15866 else
15867
15868     ac_save_LIBS="$LIBS"
15869     LIBS="$LIBS $LIBLZMA"
15870     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15871 /* end confdefs.h.  */
15872 #include "lzma.h"
15873 int
15874 main ()
15875 {
15876 lzma_index_iter iter;
15877                            lzma_index_iter_init (&iter, 0);
15878                            lzma_mf_is_supported (LZMA_MF_HC3);
15879   ;
15880   return 0;
15881 }
15882 _ACEOF
15883 if ac_fn_c_try_link "$LINENO"; then :
15884   ac_cv_liblzma=yes
15885 else
15886   ac_cv_liblzma=no
15887 fi
15888 rm -f core conftest.err conftest.$ac_objext \
15889     conftest$ac_exeext conftest.$ac_ext
15890     LIBS="$ac_save_LIBS"
15891
15892 fi
15893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15894 $as_echo "$ac_cv_liblzma" >&6; }
15895   if test "$ac_cv_liblzma" = yes; then
15896     HAVE_LIBLZMA=yes
15897
15898 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15899
15900     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15901 $as_echo_n "checking how to link with liblzma... " >&6; }
15902     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15903 $as_echo "$LIBLZMA" >&6; }
15904   else
15905     HAVE_LIBLZMA=no
15906             CPPFLAGS="$ac_save_CPPFLAGS"
15907     LIBLZMA=
15908     LTLIBLZMA=
15909   fi
15910
15911
15912
15913
15914
15915
15916     if test "$HAVE_LIBLZMA" != yes; then
15917       if test "$with_lzma" = yes; then
15918         as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15919       fi
15920     fi
15921   fi
15922 fi
15923
15924 LIBGUI="../libgui/src/libgui.a"
15925 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15926
15927
15928
15929 WIN32LDAPP=
15930
15931
15932
15933 case "${host}" in
15934 *-*-cygwin* | *-*-mingw* )
15935     configdir="win"
15936     ;;
15937 *)
15938     configdir="unix"
15939     ;;
15940 esac
15941
15942 GDBTKLIBS=
15943 if test "${enable_gdbtk}" = "yes"; then
15944
15945     # Gdbtk must have an absolute path to srcdir in order to run
15946     # properly when not installed.
15947     here=`pwd`
15948     cd ${srcdir}
15949     GDBTK_SRC_DIR=`pwd`
15950     cd $here
15951
15952
15953     #
15954     # Ok, lets find the tcl configuration
15955     # First, look for one uninstalled.
15956     # the alternative search directory is invoked by --with-tcl
15957     #
15958
15959     if test x"${no_tcl}" = x ; then
15960         # we reset no_tcl in case something fails here
15961         no_tcl=true
15962
15963 # Check whether --with-tcl was given.
15964 if test "${with_tcl+set}" = set; then :
15965   withval=$with_tcl; with_tclconfig=${withval}
15966 fi
15967
15968         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15969 $as_echo_n "checking for Tcl configuration... " >&6; }
15970         if test "${ac_cv_c_tclconfig+set}" = set; then :
15971   $as_echo_n "(cached) " >&6
15972 else
15973
15974
15975             # First check to see if --with-tcl was specified.
15976             case "${host}" in
15977                 *-*-cygwin*) platDir="win" ;;
15978                 *) platDir="unix" ;;
15979             esac
15980             if test x"${with_tclconfig}" != x ; then
15981                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15982                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15983                 else
15984                     as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
15985                 fi
15986             fi
15987
15988             # then check for a private Tcl installation
15989             if test x"${ac_cv_c_tclconfig}" = x ; then
15990                 for i in \
15991                         ../tcl \
15992                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15993                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15994                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15995                         ../../tcl \
15996                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15997                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15998                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15999                         ../../../tcl \
16000                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16001                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16002                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16003                     if test -f "$i/$platDir/tclConfig.sh" ; then
16004                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16005                         break
16006                     fi
16007                 done
16008             fi
16009
16010             # on Darwin, check in Framework installation locations
16011             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16012                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16013                         `ls -d /Library/Frameworks 2>/dev/null` \
16014                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16015                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16016                         ; do
16017                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16018                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16019                         break
16020                     fi
16021                 done
16022             fi
16023
16024             # check in a few common install locations
16025             if test x"${ac_cv_c_tclconfig}" = x ; then
16026                 for i in `ls -d ${libdir} 2>/dev/null` \
16027                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16028                         `ls -d ${prefix}/lib 2>/dev/null` \
16029                         `ls -d /usr/local/lib 2>/dev/null` \
16030                         `ls -d /usr/contrib/lib 2>/dev/null` \
16031                         `ls -d /usr/lib 2>/dev/null` \
16032                         ; do
16033                     if test -f "$i/tclConfig.sh" ; then
16034                         ac_cv_c_tclconfig=`(cd $i; pwd)`
16035                         break
16036                     fi
16037                 done
16038             fi
16039
16040             # check in a few other private locations
16041             if test x"${ac_cv_c_tclconfig}" = x ; then
16042                 for i in \
16043                         ${srcdir}/../tcl \
16044                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16045                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16046                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16047                     if test -f "$i/$platDir/tclConfig.sh" ; then
16048                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16049                     break
16050                 fi
16051                 done
16052             fi
16053
16054 fi
16055
16056
16057         if test x"${ac_cv_c_tclconfig}" = x ; then
16058             TCL_BIN_DIR="# no Tcl configs found"
16059             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16060 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
16061         else
16062             no_tcl=
16063             TCL_BIN_DIR=${ac_cv_c_tclconfig}
16064             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16065 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16066         fi
16067     fi
16068
16069
16070     # If $no_tk is nonempty, then we can't do Tk, and there is no
16071     # point to doing Tcl.
16072
16073     #
16074     # Ok, lets find the tk configuration
16075     # First, look for one uninstalled.
16076     # the alternative search directory is invoked by --with-tk
16077     #
16078
16079     if test x"${no_tk}" = x ; then
16080         # we reset no_tk in case something fails here
16081         no_tk=true
16082
16083 # Check whether --with-tk was given.
16084 if test "${with_tk+set}" = set; then :
16085   withval=$with_tk; with_tkconfig=${withval}
16086 fi
16087
16088         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16089 $as_echo_n "checking for Tk configuration... " >&6; }
16090         if test "${ac_cv_c_tkconfig+set}" = set; then :
16091   $as_echo_n "(cached) " >&6
16092 else
16093
16094
16095             # First check to see if --with-tkconfig was specified.
16096             if test x"${with_tkconfig}" != x ; then
16097                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16098                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16099                 else
16100                     as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
16101                 fi
16102             fi
16103
16104             # then check for a private Tk library
16105             case "${host}" in
16106                 *-*-cygwin*) platDir="win" ;;
16107                 *) platDir="unix" ;;
16108             esac
16109             if test x"${ac_cv_c_tkconfig}" = x ; then
16110                 for i in \
16111                         ../tk \
16112                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16113                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16114                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16115                         ../../tk \
16116                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16117                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16118                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16119                         ../../../tk \
16120                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16121                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16122                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16123                     if test -f "$i/$platDir/tkConfig.sh" ; then
16124                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16125                         break
16126                     fi
16127                 done
16128             fi
16129
16130             # on Darwin, check in Framework installation locations
16131             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16132                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16133                         `ls -d /Library/Frameworks 2>/dev/null` \
16134                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16135                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16136                         ; do
16137                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
16138                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16139                         break
16140                     fi
16141                 done
16142             fi
16143
16144             # check in a few common install locations
16145             if test x"${ac_cv_c_tkconfig}" = x ; then
16146                 for i in `ls -d ${libdir} 2>/dev/null` \
16147                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16148                         `ls -d ${prefix}/lib 2>/dev/null` \
16149                         `ls -d /usr/local/lib 2>/dev/null` \
16150                         `ls -d /usr/contrib/lib 2>/dev/null` \
16151                         `ls -d /usr/lib 2>/dev/null` \
16152                         ; do
16153                     if test -f "$i/tkConfig.sh" ; then
16154                         ac_cv_c_tkconfig=`(cd $i; pwd)`
16155                         break
16156                     fi
16157                 done
16158             fi
16159             # check in a few other private locations
16160             if test x"${ac_cv_c_tkconfig}" = x ; then
16161                 for i in \
16162                         ${srcdir}/../tk \
16163                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16164                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16165                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16166                     if test -f "$i/$platDir/tkConfig.sh" ; then
16167                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16168                         break
16169                     fi
16170                 done
16171             fi
16172
16173 fi
16174
16175
16176         if test x"${ac_cv_c_tkconfig}" = x ; then
16177             TK_BIN_DIR="# no Tk configs found"
16178             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16179 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
16180         else
16181             no_tk=
16182             TK_BIN_DIR=${ac_cv_c_tkconfig}
16183             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16184 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16185         fi
16186     fi
16187
16188
16189     if test -z "${no_tcl}" -a -z "${no_tk}"; then
16190
16191     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16192 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
16193
16194     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
16195         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16196 $as_echo "loading" >&6; }
16197         . ${TCL_BIN_DIR}/tclConfig.sh
16198     else
16199         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16200 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16201     fi
16202
16203     # eval is required to do the TCL_DBGX substitution
16204     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16205     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16206
16207     # If the TCL_BIN_DIR is the build directory (not the install directory),
16208     # then set the common variable name to the value of the build variables.
16209     # For example, the variable TCL_LIB_SPEC will be set to the value
16210     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16211     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16212     # installed and uninstalled version of Tcl.
16213     if test -f "${TCL_BIN_DIR}/Makefile" ; then
16214         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16215         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16216         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16217     elif test "`uname -s`" = "Darwin"; then
16218         # If Tcl was built as a framework, attempt to use the libraries
16219         # from the framework at the given location so that linking works
16220         # against Tcl.framework installed in an arbitrary location.
16221         case ${TCL_DEFS} in
16222             *TCL_FRAMEWORK*)
16223                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16224                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16225                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16226                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16227                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16228                             break
16229                         fi
16230                     done
16231                 fi
16232                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16233                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16234                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16235                 fi
16236                 ;;
16237         esac
16238     fi
16239
16240     # eval is required to do the TCL_DBGX substitution
16241     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16242     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16243     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16244     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260         # Check for in-tree tcl
16261         here=`pwd`
16262         cd ${srcdir}/..
16263         topdir=`pwd`
16264         cd ${here}
16265
16266         intree="no"
16267         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16268           intree="yes"
16269         fi
16270
16271         # Find Tcl private headers
16272         if test x"${intree}" = xno; then
16273
16274   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16275 $as_echo_n "checking for Tcl private headers... " >&6; }
16276   private_dir=""
16277   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16278   if test -f ${dir}/tclInt.h ; then
16279     private_dir=${dir}
16280   fi
16281
16282   if test x"${private_dir}" = x; then
16283     as_fn_error "could not find private Tcl headers" "$LINENO" 5
16284   else
16285     TCL_PRIVATE_INCLUDE="-I${private_dir}"
16286     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16287 $as_echo "${private_dir}" >&6; }
16288   fi
16289
16290           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16291           TCL_LIBRARY="${TCL_LIB_SPEC}"
16292           TCL_DEPS=""
16293         else
16294           # If building tcl in the same src tree, private headers
16295           # are not needed, but we need to be sure to use the right
16296           # headers library
16297           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16298           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16299           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16300         fi
16301
16302
16303
16304
16305
16306     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16307 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
16308
16309     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
16310         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16311 $as_echo "loading" >&6; }
16312         . ${TK_BIN_DIR}/tkConfig.sh
16313     else
16314         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16315 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16316     fi
16317
16318     # eval is required to do the TK_DBGX substitution
16319     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16320     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16321
16322     # If the TK_BIN_DIR is the build directory (not the install directory),
16323     # then set the common variable name to the value of the build variables.
16324     # For example, the variable TK_LIB_SPEC will be set to the value
16325     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16326     # instead of TK_BUILD_LIB_SPEC since it will work with both an
16327     # installed and uninstalled version of Tcl.
16328     if test -f "${TK_BIN_DIR}/Makefile" ; then
16329         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16330         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16331         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16332     elif test "`uname -s`" = "Darwin"; then
16333         # If Tk was built as a framework, attempt to use the libraries
16334         # from the framework at the given location so that linking works
16335         # against Tk.framework installed in an arbitrary location.
16336         case ${TK_DEFS} in
16337             *TK_FRAMEWORK*)
16338                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
16339                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
16340                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16341                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16342                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16343                             break
16344                         fi
16345                     done
16346                 fi
16347                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
16348                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16349                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16350                 fi
16351                 ;;
16352         esac
16353     fi
16354
16355     # eval is required to do the TK_DBGX substitution
16356     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16357     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16358     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16359     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374         # Check for in-tree Tk
16375         intree="no"
16376         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16377           intree="yes"
16378         fi
16379
16380         # Find Tk private headers
16381         if test x"${intree}" = xno; then
16382
16383   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16384 $as_echo_n "checking for Tk private headers... " >&6; }
16385   private_dir=""
16386   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16387   if test -f ${dir}/tkInt.h; then
16388     private_dir=${dir}
16389   fi
16390
16391   if test x"${private_dir}" = x; then
16392     as_fn_error "could not find Tk private headers" "$LINENO" 5
16393   else
16394     TK_PRIVATE_INCLUDE="-I${private_dir}"
16395     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16396 $as_echo "${private_dir}" >&6; }
16397   fi
16398
16399           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16400           TK_LIBRARY=${TK_LIB_SPEC}
16401           TK_DEPS=""
16402         else
16403           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16404           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16405           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16406         fi
16407
16408
16409
16410
16411
16412         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
16413
16414         # Include some libraries that Tcl and Tk want.
16415         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16416         # Yes, the ordering seems wrong here.  But it isn't.
16417         # TK_LIBS is the list of libraries that need to be linked
16418         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
16419         # were in LIBS then any link tests after this point would
16420         # try to include things like `$(LIBGUI)', which wouldn't work.
16421         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
16422
16423         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16424         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16425         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16426         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16427         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16428         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16429         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
16430
16431         if test x$gdb_cv_os_cygwin = xyes; then
16432           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16433           WIN32LDAPP="-Wl,--subsystem,console"
16434           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
16435         fi
16436
16437         subdirs="$subdirs gdbtk"
16438
16439     fi
16440 fi
16441
16442
16443
16444
16445
16446
16447
16448
16449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16450 $as_echo_n "checking for X... " >&6; }
16451
16452
16453 # Check whether --with-x was given.
16454 if test "${with_x+set}" = set; then :
16455   withval=$with_x;
16456 fi
16457
16458 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16459 if test "x$with_x" = xno; then
16460   # The user explicitly disabled X.
16461   have_x=disabled
16462 else
16463   case $x_includes,$x_libraries in #(
16464     *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
16465     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
16466   $as_echo_n "(cached) " >&6
16467 else
16468   # One or both of the vars are not set, and there is no cached value.
16469 ac_x_includes=no ac_x_libraries=no
16470 rm -f -r conftest.dir
16471 if mkdir conftest.dir; then
16472   cd conftest.dir
16473   cat >Imakefile <<'_ACEOF'
16474 incroot:
16475         @echo incroot='${INCROOT}'
16476 usrlibdir:
16477         @echo usrlibdir='${USRLIBDIR}'
16478 libdir:
16479         @echo libdir='${LIBDIR}'
16480 _ACEOF
16481   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
16482     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
16483     for ac_var in incroot usrlibdir libdir; do
16484       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16485     done
16486     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
16487     for ac_extension in a so sl dylib la dll; do
16488       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16489          test -f "$ac_im_libdir/libX11.$ac_extension"; then
16490         ac_im_usrlibdir=$ac_im_libdir; break
16491       fi
16492     done
16493     # Screen out bogus values from the imake configuration.  They are
16494     # bogus both because they are the default anyway, and because
16495     # using them would break gcc on systems where it needs fixed includes.
16496     case $ac_im_incroot in
16497         /usr/include) ac_x_includes= ;;
16498         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
16499     esac
16500     case $ac_im_usrlibdir in
16501         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
16502         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
16503     esac
16504   fi
16505   cd ..
16506   rm -f -r conftest.dir
16507 fi
16508
16509 # Standard set of common directories for X headers.
16510 # Check X11 before X11Rn because it is often a symlink to the current release.
16511 ac_x_header_dirs='
16512 /usr/X11/include
16513 /usr/X11R7/include
16514 /usr/X11R6/include
16515 /usr/X11R5/include
16516 /usr/X11R4/include
16517
16518 /usr/include/X11
16519 /usr/include/X11R7
16520 /usr/include/X11R6
16521 /usr/include/X11R5
16522 /usr/include/X11R4
16523
16524 /usr/local/X11/include
16525 /usr/local/X11R7/include
16526 /usr/local/X11R6/include
16527 /usr/local/X11R5/include
16528 /usr/local/X11R4/include
16529
16530 /usr/local/include/X11
16531 /usr/local/include/X11R7
16532 /usr/local/include/X11R6
16533 /usr/local/include/X11R5
16534 /usr/local/include/X11R4
16535
16536 /usr/X386/include
16537 /usr/x386/include
16538 /usr/XFree86/include/X11
16539
16540 /usr/include
16541 /usr/local/include
16542 /usr/unsupported/include
16543 /usr/athena/include
16544 /usr/local/x11r5/include
16545 /usr/lpp/Xamples/include
16546
16547 /usr/openwin/include
16548 /usr/openwin/share/include'
16549
16550 if test "$ac_x_includes" = no; then
16551   # Guess where to find include files, by looking for Xlib.h.
16552   # First, try using that file with no special directory specified.
16553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16554 /* end confdefs.h.  */
16555 #include <X11/Xlib.h>
16556 _ACEOF
16557 if ac_fn_c_try_cpp "$LINENO"; then :
16558   # We can compile using X headers with no special include directory.
16559 ac_x_includes=
16560 else
16561   for ac_dir in $ac_x_header_dirs; do
16562   if test -r "$ac_dir/X11/Xlib.h"; then
16563     ac_x_includes=$ac_dir
16564     break
16565   fi
16566 done
16567 fi
16568 rm -f conftest.err conftest.$ac_ext
16569 fi # $ac_x_includes = no
16570
16571 if test "$ac_x_libraries" = no; then
16572   # Check for the libraries.
16573   # See if we find them without any special options.
16574   # Don't add to $LIBS permanently.
16575   ac_save_LIBS=$LIBS
16576   LIBS="-lX11 $LIBS"
16577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16578 /* end confdefs.h.  */
16579 #include <X11/Xlib.h>
16580 int
16581 main ()
16582 {
16583 XrmInitialize ()
16584   ;
16585   return 0;
16586 }
16587 _ACEOF
16588 if ac_fn_c_try_link "$LINENO"; then :
16589   LIBS=$ac_save_LIBS
16590 # We can link X programs with no special library path.
16591 ac_x_libraries=
16592 else
16593   LIBS=$ac_save_LIBS
16594 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
16595 do
16596   # Don't even attempt the hair of trying to link an X program!
16597   for ac_extension in a so sl dylib la dll; do
16598     if test -r "$ac_dir/libX11.$ac_extension"; then
16599       ac_x_libraries=$ac_dir
16600       break 2
16601     fi
16602   done
16603 done
16604 fi
16605 rm -f core conftest.err conftest.$ac_objext \
16606     conftest$ac_exeext conftest.$ac_ext
16607 fi # $ac_x_libraries = no
16608
16609 case $ac_x_includes,$ac_x_libraries in #(
16610   no,* | *,no | *\'*)
16611     # Didn't find X, or a directory has "'" in its name.
16612     ac_cv_have_x="have_x=no";; #(
16613   *)
16614     # Record where we found X for the cache.
16615     ac_cv_have_x="have_x=yes\
16616         ac_x_includes='$ac_x_includes'\
16617         ac_x_libraries='$ac_x_libraries'"
16618 esac
16619 fi
16620 ;; #(
16621     *) have_x=yes;;
16622   esac
16623   eval "$ac_cv_have_x"
16624 fi # $with_x != no
16625
16626 if test "$have_x" != yes; then
16627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16628 $as_echo "$have_x" >&6; }
16629   no_x=yes
16630 else
16631   # If each of the values was on the command line, it overrides each guess.
16632   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16633   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16634   # Update the cache value to reflect the command line values.
16635   ac_cv_have_x="have_x=yes\
16636         ac_x_includes='$x_includes'\
16637         ac_x_libraries='$x_libraries'"
16638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16639 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
16640 fi
16641
16642
16643 # Unlike the sim directory, whether a simulator is linked is controlled by
16644 # presence of a gdb_sim definition in the target configure.tgt entry.
16645 # This code just checks for a few cases where we'd like to ignore those
16646 # definitions, even when they're present in the '.mt' file.  These cases
16647 # are when --disable-sim is specified, or if the simulator directory is
16648 # not part of the source tree.
16649 #
16650 # Check whether --enable-sim was given.
16651 if test "${enable_sim+set}" = set; then :
16652   enableval=$enable_sim; echo "enable_sim = $enable_sim";
16653  echo "enableval = ${enableval}";
16654  case "${enableval}" in
16655   yes) ignore_sim=false ;;
16656   no)  ignore_sim=true ;;
16657   *)   ignore_sim=false ;;
16658  esac
16659 else
16660   ignore_sim=false
16661 fi
16662
16663
16664 if test ! -d "${srcdir}/../sim"; then
16665   ignore_sim=true
16666 fi
16667
16668 SIM=
16669 SIM_OBS=
16670 if test "${ignore_sim}" = "false"; then
16671   if test x"${gdb_sim}" != x ; then
16672     SIM="${gdb_sim}"
16673     SIM_OBS="remote-sim.o"
16674
16675 $as_echo "#define WITH_SIM 1" >>confdefs.h
16676
16677
16678     # Some tdep code should only be compiled in when the ppc sim is
16679     # built.  PR sim/13418.
16680     case $target in
16681       powerpc*-*-*)
16682
16683 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16684
16685         ;;
16686     esac
16687   fi
16688 fi
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703 # List of host floatformats.
16704
16705 cat >>confdefs.h <<_ACEOF
16706 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
16707 _ACEOF
16708
16709
16710 cat >>confdefs.h <<_ACEOF
16711 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
16712 _ACEOF
16713
16714
16715 cat >>confdefs.h <<_ACEOF
16716 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
16717 _ACEOF
16718
16719
16720 # target_subdir is used by the testsuite to find the target libraries.
16721 target_subdir=
16722 if test "${host}" != "${target}"; then
16723     target_subdir="${target_alias}/"
16724 fi
16725
16726
16727 frags=
16728 if test "${gdb_native}" = "yes"; then
16729   host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
16730   if test ! -f ${host_makefile_frag}; then
16731     as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
16732   fi
16733   frags="$frags $host_makefile_frag"
16734 else
16735   host_makefile_frag=/dev/null
16736 fi
16737
16738
16739
16740
16741 if test "${gdb_native}" = "yes"; then
16742 # We pick this up from the host configuration file (.mh) because we
16743 # do not have a native configuration Makefile fragment.
16744 nativefile=`sed -n '
16745 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
16746 ' ${host_makefile_frag}`
16747 fi
16748
16749
16750 if test x"${gdb_osabi}" != x ; then
16751
16752 cat >>confdefs.h <<_ACEOF
16753 #define GDB_OSABI_DEFAULT $gdb_osabi
16754 _ACEOF
16755
16756 fi
16757
16758 # Enable multi-ice-gdb-server.
16759 # Check whether --enable-multi-ice was given.
16760 if test "${enable_multi_ice+set}" = set; then :
16761   enableval=$enable_multi_ice; case $enableval in
16762     yes | no)
16763       ;;
16764     *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
16765   esac
16766 fi
16767
16768 if test "x$enable_multi_ice" = xyes; then
16769    subdirs="$subdirs multi-ice"
16770
16771 fi
16772
16773 # Check whether --enable-gdbserver was given.
16774 if test "${enable_gdbserver+set}" = set; then :
16775   enableval=$enable_gdbserver; case "${enableval}" in
16776   yes| no|auto) ;;
16777   *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16778 esac
16779 else
16780   enable_gdbserver=auto
16781 fi
16782
16783
16784 # We only build gdbserver automatically in a native configuration, and
16785 # only if the user did not explicitly disable its build.
16786 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
16787   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16788 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
16789   if test "x$build_gdbserver" = xyes; then
16790     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16791 $as_echo "yes" >&6; }
16792     subdirs="$subdirs gdbserver"
16793
16794     gdbserver_build_enabled=yes
16795   else
16796     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16797 $as_echo "no" >&6; }
16798   fi
16799 fi
16800
16801 # If the user explicitly request the gdbserver to be built, verify that
16802 # we were in fact able to enable it.
16803 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16804   as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16805 fi
16806
16807 # Check for babeltrace and babeltrace-ctf
16808
16809 # Check whether --with-babeltrace was given.
16810 if test "${with_babeltrace+set}" = set; then :
16811   withval=$with_babeltrace;
16812 else
16813   with_babeltrace=auto
16814 fi
16815
16816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
16817 $as_echo_n "checking whether to use babeltrace... " >&6; }
16818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
16819 $as_echo "$with_babeltrace" >&6; }
16820
16821 if test "x$with_babeltrace" = "xno"; then
16822   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
16823 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
16824 else
16825   # Append -Werror to CFLAGS so that configure can catch the warning
16826   # "assignment from incompatible pointer type", which is related to
16827   # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
16828   # in GDB, while babeltrace 1.0.3 is broken.
16829   # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16830   # safe to save and restore CFLAGS here.
16831   saved_CFLAGS=$CFLAGS
16832   CFLAGS="$CFLAGS -Werror"
16833
16834
16835
16836
16837
16838
16839
16840
16841     use_additional=yes
16842
16843   acl_save_prefix="$prefix"
16844   prefix="$acl_final_prefix"
16845   acl_save_exec_prefix="$exec_prefix"
16846   exec_prefix="$acl_final_exec_prefix"
16847
16848     eval additional_includedir=\"$includedir\"
16849     eval additional_libdir=\"$libdir\"
16850
16851   exec_prefix="$acl_save_exec_prefix"
16852   prefix="$acl_save_prefix"
16853
16854
16855 # Check whether --with-libbabeltrace-prefix was given.
16856 if test "${with_libbabeltrace_prefix+set}" = set; then :
16857   withval=$with_libbabeltrace_prefix;
16858     if test "X$withval" = "Xno"; then
16859       use_additional=no
16860     else
16861       if test "X$withval" = "X"; then
16862
16863   acl_save_prefix="$prefix"
16864   prefix="$acl_final_prefix"
16865   acl_save_exec_prefix="$exec_prefix"
16866   exec_prefix="$acl_final_exec_prefix"
16867
16868           eval additional_includedir=\"$includedir\"
16869           eval additional_libdir=\"$libdir\"
16870
16871   exec_prefix="$acl_save_exec_prefix"
16872   prefix="$acl_save_prefix"
16873
16874       else
16875         additional_includedir="$withval/include"
16876         additional_libdir="$withval/lib"
16877       fi
16878     fi
16879
16880 fi
16881
16882       LIBBABELTRACE=
16883   LTLIBBABELTRACE=
16884   INCBABELTRACE=
16885   rpathdirs=
16886   ltrpathdirs=
16887   names_already_handled=
16888   names_next_round='babeltrace babeltrace-ctf'
16889   while test -n "$names_next_round"; do
16890     names_this_round="$names_next_round"
16891     names_next_round=
16892     for name in $names_this_round; do
16893       already_handled=
16894       for n in $names_already_handled; do
16895         if test "$n" = "$name"; then
16896           already_handled=yes
16897           break
16898         fi
16899       done
16900       if test -z "$already_handled"; then
16901         names_already_handled="$names_already_handled $name"
16902                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16903         eval value=\"\$HAVE_LIB$uppername\"
16904         if test -n "$value"; then
16905           if test "$value" = yes; then
16906             eval value=\"\$LIB$uppername\"
16907             test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16908             eval value=\"\$LTLIB$uppername\"
16909             test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16910           else
16911                                     :
16912           fi
16913         else
16914                               found_dir=
16915           found_la=
16916           found_so=
16917           found_a=
16918           if test $use_additional = yes; then
16919             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16920               found_dir="$additional_libdir"
16921               found_so="$additional_libdir/lib$name.$shlibext"
16922               if test -f "$additional_libdir/lib$name.la"; then
16923                 found_la="$additional_libdir/lib$name.la"
16924               fi
16925             else
16926               if test -f "$additional_libdir/lib$name.$libext"; then
16927                 found_dir="$additional_libdir"
16928                 found_a="$additional_libdir/lib$name.$libext"
16929                 if test -f "$additional_libdir/lib$name.la"; then
16930                   found_la="$additional_libdir/lib$name.la"
16931                 fi
16932               fi
16933             fi
16934           fi
16935           if test "X$found_dir" = "X"; then
16936             for x in $LDFLAGS $LTLIBBABELTRACE; do
16937
16938   acl_save_prefix="$prefix"
16939   prefix="$acl_final_prefix"
16940   acl_save_exec_prefix="$exec_prefix"
16941   exec_prefix="$acl_final_exec_prefix"
16942   eval x=\"$x\"
16943   exec_prefix="$acl_save_exec_prefix"
16944   prefix="$acl_save_prefix"
16945
16946               case "$x" in
16947                 -L*)
16948                   dir=`echo "X$x" | sed -e 's/^X-L//'`
16949                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16950                     found_dir="$dir"
16951                     found_so="$dir/lib$name.$shlibext"
16952                     if test -f "$dir/lib$name.la"; then
16953                       found_la="$dir/lib$name.la"
16954                     fi
16955                   else
16956                     if test -f "$dir/lib$name.$libext"; then
16957                       found_dir="$dir"
16958                       found_a="$dir/lib$name.$libext"
16959                       if test -f "$dir/lib$name.la"; then
16960                         found_la="$dir/lib$name.la"
16961                       fi
16962                     fi
16963                   fi
16964                   ;;
16965               esac
16966               if test "X$found_dir" != "X"; then
16967                 break
16968               fi
16969             done
16970           fi
16971           if test "X$found_dir" != "X"; then
16972                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16973             if test "X$found_so" != "X"; then
16974                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16975                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16976               else
16977                                                                                 haveit=
16978                 for x in $ltrpathdirs; do
16979                   if test "X$x" = "X$found_dir"; then
16980                     haveit=yes
16981                     break
16982                   fi
16983                 done
16984                 if test -z "$haveit"; then
16985                   ltrpathdirs="$ltrpathdirs $found_dir"
16986                 fi
16987                                 if test "$hardcode_direct" = yes; then
16988                                                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16989                 else
16990                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16991                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16992                                                             haveit=
16993                     for x in $rpathdirs; do
16994                       if test "X$x" = "X$found_dir"; then
16995                         haveit=yes
16996                         break
16997                       fi
16998                     done
16999                     if test -z "$haveit"; then
17000                       rpathdirs="$rpathdirs $found_dir"
17001                     fi
17002                   else
17003                                                                                 haveit=
17004                     for x in $LDFLAGS $LIBBABELTRACE; do
17005
17006   acl_save_prefix="$prefix"
17007   prefix="$acl_final_prefix"
17008   acl_save_exec_prefix="$exec_prefix"
17009   exec_prefix="$acl_final_exec_prefix"
17010   eval x=\"$x\"
17011   exec_prefix="$acl_save_exec_prefix"
17012   prefix="$acl_save_prefix"
17013
17014                       if test "X$x" = "X-L$found_dir"; then
17015                         haveit=yes
17016                         break
17017                       fi
17018                     done
17019                     if test -z "$haveit"; then
17020                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17021                     fi
17022                     if test "$hardcode_minus_L" != no; then
17023                                                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17024                     else
17025                                                                                                                                                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17026                     fi
17027                   fi
17028                 fi
17029               fi
17030             else
17031               if test "X$found_a" != "X"; then
17032                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17033               else
17034                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17035               fi
17036             fi
17037                         additional_includedir=
17038             case "$found_dir" in
17039               */lib | */lib/)
17040                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17041                 additional_includedir="$basedir/include"
17042                 ;;
17043             esac
17044             if test "X$additional_includedir" != "X"; then
17045                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
17046                 haveit=
17047                 if test "X$additional_includedir" = "X/usr/local/include"; then
17048                   if test -n "$GCC"; then
17049                     case $host_os in
17050                       linux*) haveit=yes;;
17051                     esac
17052                   fi
17053                 fi
17054                 if test -z "$haveit"; then
17055                   for x in $CPPFLAGS $INCBABELTRACE; do
17056
17057   acl_save_prefix="$prefix"
17058   prefix="$acl_final_prefix"
17059   acl_save_exec_prefix="$exec_prefix"
17060   exec_prefix="$acl_final_exec_prefix"
17061   eval x=\"$x\"
17062   exec_prefix="$acl_save_exec_prefix"
17063   prefix="$acl_save_prefix"
17064
17065                     if test "X$x" = "X-I$additional_includedir"; then
17066                       haveit=yes
17067                       break
17068                     fi
17069                   done
17070                   if test -z "$haveit"; then
17071                     if test -d "$additional_includedir"; then
17072                                             INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17073                     fi
17074                   fi
17075                 fi
17076               fi
17077             fi
17078                         if test -n "$found_la"; then
17079                                                         save_libdir="$libdir"
17080               case "$found_la" in
17081                 */* | *\\*) . "$found_la" ;;
17082                 *) . "./$found_la" ;;
17083               esac
17084               libdir="$save_libdir"
17085                             for dep in $dependency_libs; do
17086                 case "$dep" in
17087                   -L*)
17088                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17089                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
17090                       haveit=
17091                       if test "X$additional_libdir" = "X/usr/local/lib"; then
17092                         if test -n "$GCC"; then
17093                           case $host_os in
17094                             linux*) haveit=yes;;
17095                           esac
17096                         fi
17097                       fi
17098                       if test -z "$haveit"; then
17099                         haveit=
17100                         for x in $LDFLAGS $LIBBABELTRACE; do
17101
17102   acl_save_prefix="$prefix"
17103   prefix="$acl_final_prefix"
17104   acl_save_exec_prefix="$exec_prefix"
17105   exec_prefix="$acl_final_exec_prefix"
17106   eval x=\"$x\"
17107   exec_prefix="$acl_save_exec_prefix"
17108   prefix="$acl_save_prefix"
17109
17110                           if test "X$x" = "X-L$additional_libdir"; then
17111                             haveit=yes
17112                             break
17113                           fi
17114                         done
17115                         if test -z "$haveit"; then
17116                           if test -d "$additional_libdir"; then
17117                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17118                           fi
17119                         fi
17120                         haveit=
17121                         for x in $LDFLAGS $LTLIBBABELTRACE; do
17122
17123   acl_save_prefix="$prefix"
17124   prefix="$acl_final_prefix"
17125   acl_save_exec_prefix="$exec_prefix"
17126   exec_prefix="$acl_final_exec_prefix"
17127   eval x=\"$x\"
17128   exec_prefix="$acl_save_exec_prefix"
17129   prefix="$acl_save_prefix"
17130
17131                           if test "X$x" = "X-L$additional_libdir"; then
17132                             haveit=yes
17133                             break
17134                           fi
17135                         done
17136                         if test -z "$haveit"; then
17137                           if test -d "$additional_libdir"; then
17138                                                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17139                           fi
17140                         fi
17141                       fi
17142                     fi
17143                     ;;
17144                   -R*)
17145                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
17146                     if test "$enable_rpath" != no; then
17147                                                                   haveit=
17148                       for x in $rpathdirs; do
17149                         if test "X$x" = "X$dir"; then
17150                           haveit=yes
17151                           break
17152                         fi
17153                       done
17154                       if test -z "$haveit"; then
17155                         rpathdirs="$rpathdirs $dir"
17156                       fi
17157                                                                   haveit=
17158                       for x in $ltrpathdirs; do
17159                         if test "X$x" = "X$dir"; then
17160                           haveit=yes
17161                           break
17162                         fi
17163                       done
17164                       if test -z "$haveit"; then
17165                         ltrpathdirs="$ltrpathdirs $dir"
17166                       fi
17167                     fi
17168                     ;;
17169                   -l*)
17170                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17171                     ;;
17172                   *.la)
17173                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17174                     ;;
17175                   *)
17176                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17177                     LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17178                     ;;
17179                 esac
17180               done
17181             fi
17182           else
17183                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17184             LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17185           fi
17186         fi
17187       fi
17188     done
17189   done
17190   if test "X$rpathdirs" != "X"; then
17191     if test -n "$hardcode_libdir_separator"; then
17192                         alldirs=
17193       for found_dir in $rpathdirs; do
17194         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17195       done
17196             acl_save_libdir="$libdir"
17197       libdir="$alldirs"
17198       eval flag=\"$hardcode_libdir_flag_spec\"
17199       libdir="$acl_save_libdir"
17200       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17201     else
17202             for found_dir in $rpathdirs; do
17203         acl_save_libdir="$libdir"
17204         libdir="$found_dir"
17205         eval flag=\"$hardcode_libdir_flag_spec\"
17206         libdir="$acl_save_libdir"
17207         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17208       done
17209     fi
17210   fi
17211   if test "X$ltrpathdirs" != "X"; then
17212             for found_dir in $ltrpathdirs; do
17213       LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17214     done
17215   fi
17216
17217
17218         ac_save_CPPFLAGS="$CPPFLAGS"
17219
17220   for element in $INCBABELTRACE; do
17221     haveit=
17222     for x in $CPPFLAGS; do
17223
17224   acl_save_prefix="$prefix"
17225   prefix="$acl_final_prefix"
17226   acl_save_exec_prefix="$exec_prefix"
17227   exec_prefix="$acl_final_exec_prefix"
17228   eval x=\"$x\"
17229   exec_prefix="$acl_save_exec_prefix"
17230   prefix="$acl_save_prefix"
17231
17232       if test "X$x" = "X$element"; then
17233         haveit=yes
17234         break
17235       fi
17236     done
17237     if test -z "$haveit"; then
17238       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17239     fi
17240   done
17241
17242
17243   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17244 $as_echo_n "checking for libbabeltrace... " >&6; }
17245 if test "${ac_cv_libbabeltrace+set}" = set; then :
17246   $as_echo_n "(cached) " >&6
17247 else
17248
17249     ac_save_LIBS="$LIBS"
17250     LIBS="$LIBS $LIBBABELTRACE"
17251     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17252 /* end confdefs.h.  */
17253 #include <babeltrace/babeltrace.h>
17254                          #include <babeltrace/ctf/events.h>
17255                          #include <babeltrace/ctf/iterator.h>
17256 int
17257 main ()
17258 {
17259 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17260                         struct bt_ctf_event *event = NULL;
17261                         const struct bt_definition *scope;
17262
17263                         pos->type = BT_SEEK_BEGIN;
17264                         bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
17265                         scope = bt_ctf_get_top_level_scope (event,
17266                                                            BT_STREAM_EVENT_HEADER);
17267                         bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17268
17269   ;
17270   return 0;
17271 }
17272 _ACEOF
17273 if ac_fn_c_try_link "$LINENO"; then :
17274   ac_cv_libbabeltrace=yes
17275 else
17276   ac_cv_libbabeltrace=no
17277 fi
17278 rm -f core conftest.err conftest.$ac_objext \
17279     conftest$ac_exeext conftest.$ac_ext
17280     LIBS="$ac_save_LIBS"
17281
17282 fi
17283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17284 $as_echo "$ac_cv_libbabeltrace" >&6; }
17285   if test "$ac_cv_libbabeltrace" = yes; then
17286     HAVE_LIBBABELTRACE=yes
17287
17288 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17289
17290     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17291 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
17292     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17293 $as_echo "$LIBBABELTRACE" >&6; }
17294   else
17295     HAVE_LIBBABELTRACE=no
17296             CPPFLAGS="$ac_save_CPPFLAGS"
17297     LIBBABELTRACE=
17298     LTLIBBABELTRACE=
17299   fi
17300
17301
17302
17303
17304
17305
17306   CFLAGS=$saved_CFLAGS
17307
17308   if test "$HAVE_LIBBABELTRACE" != yes; then
17309      if test "$with_babeltrace" = yes; then
17310        as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
17311      else
17312        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17313 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17314      fi
17315   fi
17316 fi
17317
17318 # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
17319 # to an empty version.
17320
17321 files=
17322 links=
17323
17324 rm -f nm.h
17325 if test "${nativefile}" != ""; then
17326     case "${nativefile}" in
17327       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17328       * ) GDB_NM_FILE="${nativefile}"
17329     esac
17330     files="${files} ${GDB_NM_FILE}"
17331     links="${links} nm.h"
17332
17333 cat >>confdefs.h <<_ACEOF
17334 #define GDB_NM_FILE "${GDB_NM_FILE}"
17335 _ACEOF
17336
17337 fi
17338
17339
17340 for ac_prog in xsltproc
17341 do
17342   # Extract the first word of "$ac_prog", so it can be a program name with args.
17343 set dummy $ac_prog; ac_word=$2
17344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17345 $as_echo_n "checking for $ac_word... " >&6; }
17346 if test "${ac_cv_path_XSLTPROC+set}" = set; then :
17347   $as_echo_n "(cached) " >&6
17348 else
17349   case $XSLTPROC in
17350   [\\/]* | ?:[\\/]*)
17351   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17352   ;;
17353   *)
17354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17355 for as_dir in $PATH
17356 do
17357   IFS=$as_save_IFS
17358   test -z "$as_dir" && as_dir=.
17359     for ac_exec_ext in '' $ac_executable_extensions; do
17360   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17361     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17363     break 2
17364   fi
17365 done
17366   done
17367 IFS=$as_save_IFS
17368
17369   ;;
17370 esac
17371 fi
17372 XSLTPROC=$ac_cv_path_XSLTPROC
17373 if test -n "$XSLTPROC"; then
17374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17375 $as_echo "$XSLTPROC" >&6; }
17376 else
17377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17378 $as_echo "no" >&6; }
17379 fi
17380
17381
17382   test -n "$XSLTPROC" && break
17383 done
17384 test -n "$XSLTPROC" || XSLTPROC="missing"
17385
17386 if test "x$USE_MAINTAINER_MODE" = xyes; then
17387   if test "${XSLTPROC}" = missing; then
17388     as_fn_error "unable to find xsltproc.  maintainer-mode requires xsltproc." "$LINENO" 5
17389   fi
17390 fi
17391
17392
17393 ac_sources="$files"
17394 ac_dests="$links"
17395 while test -n "$ac_sources"; do
17396   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17397   set $ac_sources; ac_source=$1; shift; ac_sources=$*
17398   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17399 done
17400 ac_config_links="$ac_config_links $ac_config_links_1"
17401
17402
17403
17404
17405
17406 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
17407
17408
17409 if $development; then
17410
17411 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17412
17413   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS)"
17414   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS)"
17415 fi
17416
17417
17418   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17419   GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17420   if test "x$GDB_TRANSFORM_NAME" = x; then
17421      GDB_TRANSFORM_NAME=gdb
17422   fi
17423
17424
17425
17426   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17427   GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17428   if test "x$GCORE_TRANSFORM_NAME" = x; then
17429      GCORE_TRANSFORM_NAME=gcore
17430   fi
17431
17432
17433 ac_config_files="$ac_config_files gcore"
17434
17435 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
17436
17437
17438 cat >confcache <<\_ACEOF
17439 # This file is a shell script that caches the results of configure
17440 # tests run on this system so they can be shared between configure
17441 # scripts and configure runs, see configure's option --config-cache.
17442 # It is not useful on other systems.  If it contains results you don't
17443 # want to keep, you may remove or edit it.
17444 #
17445 # config.status only pays attention to the cache file if you give it
17446 # the --recheck option to rerun configure.
17447 #
17448 # `ac_cv_env_foo' variables (set or unset) will be overridden when
17449 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17450 # following values.
17451
17452 _ACEOF
17453
17454 # The following way of writing the cache mishandles newlines in values,
17455 # but we know of no workaround that is simple, portable, and efficient.
17456 # So, we kill variables containing newlines.
17457 # Ultrix sh set writes to stderr and can't be redirected directly,
17458 # and sets the high bit in the cache file unless we assign to the vars.
17459 (
17460   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17461     eval ac_val=\$$ac_var
17462     case $ac_val in #(
17463     *${as_nl}*)
17464       case $ac_var in #(
17465       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17466 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17467       esac
17468       case $ac_var in #(
17469       _ | IFS | as_nl) ;; #(
17470       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17471       *) { eval $ac_var=; unset $ac_var;} ;;
17472       esac ;;
17473     esac
17474   done
17475
17476   (set) 2>&1 |
17477     case $as_nl`(ac_space=' '; set) 2>&1` in #(
17478     *${as_nl}ac_space=\ *)
17479       # `set' does not quote correctly, so add quotes: double-quote
17480       # substitution turns \\\\ into \\, and sed turns \\ into \.
17481       sed -n \
17482         "s/'/'\\\\''/g;
17483           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17484       ;; #(
17485     *)
17486       # `set' quotes correctly as required by POSIX, so do not add quotes.
17487       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
17488       ;;
17489     esac |
17490     sort
17491 ) |
17492   sed '
17493      /^ac_cv_env_/b end
17494      t clear
17495      :clear
17496      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17497      t end
17498      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17499      :end' >>confcache
17500 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17501   if test -w "$cache_file"; then
17502     test "x$cache_file" != "x/dev/null" &&
17503       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17504 $as_echo "$as_me: updating cache $cache_file" >&6;}
17505     cat confcache >$cache_file
17506   else
17507     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17508 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
17509   fi
17510 fi
17511 rm -f confcache
17512
17513 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17514 # Let make expand exec_prefix.
17515 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17516
17517 DEFS=-DHAVE_CONFIG_H
17518
17519 ac_libobjs=
17520 ac_ltlibobjs=
17521 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17522   # 1. Remove the extension, and $U if already installed.
17523   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17524   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17525   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
17526   #    will be set to the directory where LIBOBJS objects are built.
17527   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17528   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
17529 done
17530 LIBOBJS=$ac_libobjs
17531
17532 LTLIBOBJS=$ac_ltlibobjs
17533
17534
17535 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
17536   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
17537 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17538 fi
17539 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17540   as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
17541 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17542 fi
17543 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17544   as_fn_error "conditional \"HAVE_GUILE\" was never defined.
17545 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17546 fi
17547
17548
17549 : ${CONFIG_STATUS=./config.status}
17550 ac_write_fail=0
17551 ac_clean_files_save=$ac_clean_files
17552 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17553 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17554 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17555 as_write_fail=0
17556 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
17557 #! $SHELL
17558 # Generated by $as_me.
17559 # Run this file to recreate the current configuration.
17560 # Compiler output produced by configure, useful for debugging
17561 # configure, is in config.log if it exists.
17562
17563 debug=false
17564 ac_cs_recheck=false
17565 ac_cs_silent=false
17566
17567 SHELL=\${CONFIG_SHELL-$SHELL}
17568 export SHELL
17569 _ASEOF
17570 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17571 ## -------------------- ##
17572 ## M4sh Initialization. ##
17573 ## -------------------- ##
17574
17575 # Be more Bourne compatible
17576 DUALCASE=1; export DUALCASE # for MKS sh
17577 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17578   emulate sh
17579   NULLCMD=:
17580   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
17581   # is contrary to our usage.  Disable this feature.
17582   alias -g '${1+"$@"}'='"$@"'
17583   setopt NO_GLOB_SUBST
17584 else
17585   case `(set -o) 2>/dev/null` in #(
17586   *posix*) :
17587     set -o posix ;; #(
17588   *) :
17589      ;;
17590 esac
17591 fi
17592
17593
17594 as_nl='
17595 '
17596 export as_nl
17597 # Printing a long string crashes Solaris 7 /usr/bin/printf.
17598 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17599 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17600 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17601 # Prefer a ksh shell builtin over an external printf program on Solaris,
17602 # but without wasting forks for bash or zsh.
17603 if test -z "$BASH_VERSION$ZSH_VERSION" \
17604     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17605   as_echo='print -r --'
17606   as_echo_n='print -rn --'
17607 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17608   as_echo='printf %s\n'
17609   as_echo_n='printf %s'
17610 else
17611   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17612     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17613     as_echo_n='/usr/ucb/echo -n'
17614   else
17615     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17616     as_echo_n_body='eval
17617       arg=$1;
17618       case $arg in #(
17619       *"$as_nl"*)
17620         expr "X$arg" : "X\\(.*\\)$as_nl";
17621         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17622       esac;
17623       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17624     '
17625     export as_echo_n_body
17626     as_echo_n='sh -c $as_echo_n_body as_echo'
17627   fi
17628   export as_echo_body
17629   as_echo='sh -c $as_echo_body as_echo'
17630 fi
17631
17632 # The user is always right.
17633 if test "${PATH_SEPARATOR+set}" != set; then
17634   PATH_SEPARATOR=:
17635   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17636     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17637       PATH_SEPARATOR=';'
17638   }
17639 fi
17640
17641
17642 # IFS
17643 # We need space, tab and new line, in precisely that order.  Quoting is
17644 # there to prevent editors from complaining about space-tab.
17645 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
17646 # splitting by setting IFS to empty value.)
17647 IFS=" ""        $as_nl"
17648
17649 # Find who we are.  Look in the path if we contain no directory separator.
17650 case $0 in #((
17651   *[\\/]* ) as_myself=$0 ;;
17652   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17653 for as_dir in $PATH
17654 do
17655   IFS=$as_save_IFS
17656   test -z "$as_dir" && as_dir=.
17657     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17658   done
17659 IFS=$as_save_IFS
17660
17661      ;;
17662 esac
17663 # We did not find ourselves, most probably we were run as `sh COMMAND'
17664 # in which case we are not to be found in the path.
17665 if test "x$as_myself" = x; then
17666   as_myself=$0
17667 fi
17668 if test ! -f "$as_myself"; then
17669   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17670   exit 1
17671 fi
17672
17673 # Unset variables that we do not need and which cause bugs (e.g. in
17674 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
17675 # suppresses any "Segmentation fault" message there.  '((' could
17676 # trigger a bug in pdksh 5.2.14.
17677 for as_var in BASH_ENV ENV MAIL MAILPATH
17678 do eval test x\${$as_var+set} = xset \
17679   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17680 done
17681 PS1='$ '
17682 PS2='> '
17683 PS4='+ '
17684
17685 # NLS nuisances.
17686 LC_ALL=C
17687 export LC_ALL
17688 LANGUAGE=C
17689 export LANGUAGE
17690
17691 # CDPATH.
17692 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17693
17694
17695 # as_fn_error ERROR [LINENO LOG_FD]
17696 # ---------------------------------
17697 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17698 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17699 # script with status $?, using 1 if that was 0.
17700 as_fn_error ()
17701 {
17702   as_status=$?; test $as_status -eq 0 && as_status=1
17703   if test "$3"; then
17704     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17705     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
17706   fi
17707   $as_echo "$as_me: error: $1" >&2
17708   as_fn_exit $as_status
17709 } # as_fn_error
17710
17711
17712 # as_fn_set_status STATUS
17713 # -----------------------
17714 # Set $? to STATUS, without forking.
17715 as_fn_set_status ()
17716 {
17717   return $1
17718 } # as_fn_set_status
17719
17720 # as_fn_exit STATUS
17721 # -----------------
17722 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17723 as_fn_exit ()
17724 {
17725   set +e
17726   as_fn_set_status $1
17727   exit $1
17728 } # as_fn_exit
17729
17730 # as_fn_unset VAR
17731 # ---------------
17732 # Portably unset VAR.
17733 as_fn_unset ()
17734 {
17735   { eval $1=; unset $1;}
17736 }
17737 as_unset=as_fn_unset
17738 # as_fn_append VAR VALUE
17739 # ----------------------
17740 # Append the text in VALUE to the end of the definition contained in VAR. Take
17741 # advantage of any shell optimizations that allow amortized linear growth over
17742 # repeated appends, instead of the typical quadratic growth present in naive
17743 # implementations.
17744 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17745   eval 'as_fn_append ()
17746   {
17747     eval $1+=\$2
17748   }'
17749 else
17750   as_fn_append ()
17751   {
17752     eval $1=\$$1\$2
17753   }
17754 fi # as_fn_append
17755
17756 # as_fn_arith ARG...
17757 # ------------------
17758 # Perform arithmetic evaluation on the ARGs, and store the result in the
17759 # global $as_val. Take advantage of shells that can avoid forks. The arguments
17760 # must be portable across $(()) and expr.
17761 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17762   eval 'as_fn_arith ()
17763   {
17764     as_val=$(( $* ))
17765   }'
17766 else
17767   as_fn_arith ()
17768   {
17769     as_val=`expr "$@" || test $? -eq 1`
17770   }
17771 fi # as_fn_arith
17772
17773
17774 if expr a : '\(a\)' >/dev/null 2>&1 &&
17775    test "X`expr 00001 : '.*\(...\)'`" = X001; then
17776   as_expr=expr
17777 else
17778   as_expr=false
17779 fi
17780
17781 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17782   as_basename=basename
17783 else
17784   as_basename=false
17785 fi
17786
17787 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17788   as_dirname=dirname
17789 else
17790   as_dirname=false
17791 fi
17792
17793 as_me=`$as_basename -- "$0" ||
17794 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17795          X"$0" : 'X\(//\)$' \| \
17796          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17797 $as_echo X/"$0" |
17798     sed '/^.*\/\([^/][^/]*\)\/*$/{
17799             s//\1/
17800             q
17801           }
17802           /^X\/\(\/\/\)$/{
17803             s//\1/
17804             q
17805           }
17806           /^X\/\(\/\).*/{
17807             s//\1/
17808             q
17809           }
17810           s/.*/./; q'`
17811
17812 # Avoid depending upon Character Ranges.
17813 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17814 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17815 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17816 as_cr_digits='0123456789'
17817 as_cr_alnum=$as_cr_Letters$as_cr_digits
17818
17819 ECHO_C= ECHO_N= ECHO_T=
17820 case `echo -n x` in #(((((
17821 -n*)
17822   case `echo 'xy\c'` in
17823   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
17824   xy)  ECHO_C='\c';;
17825   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
17826        ECHO_T=' ';;
17827   esac;;
17828 *)
17829   ECHO_N='-n';;
17830 esac
17831
17832 rm -f conf$$ conf$$.exe conf$$.file
17833 if test -d conf$$.dir; then
17834   rm -f conf$$.dir/conf$$.file
17835 else
17836   rm -f conf$$.dir
17837   mkdir conf$$.dir 2>/dev/null
17838 fi
17839 if (echo >conf$$.file) 2>/dev/null; then
17840   if ln -s conf$$.file conf$$ 2>/dev/null; then
17841     as_ln_s='ln -s'
17842     # ... but there are two gotchas:
17843     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17844     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17845     # In both cases, we have to default to `cp -p'.
17846     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17847       as_ln_s='cp -p'
17848   elif ln conf$$.file conf$$ 2>/dev/null; then
17849     as_ln_s=ln
17850   else
17851     as_ln_s='cp -p'
17852   fi
17853 else
17854   as_ln_s='cp -p'
17855 fi
17856 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17857 rmdir conf$$.dir 2>/dev/null
17858
17859
17860 # as_fn_mkdir_p
17861 # -------------
17862 # Create "$as_dir" as a directory, including parents if necessary.
17863 as_fn_mkdir_p ()
17864 {
17865
17866   case $as_dir in #(
17867   -*) as_dir=./$as_dir;;
17868   esac
17869   test -d "$as_dir" || eval $as_mkdir_p || {
17870     as_dirs=
17871     while :; do
17872       case $as_dir in #(
17873       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17874       *) as_qdir=$as_dir;;
17875       esac
17876       as_dirs="'$as_qdir' $as_dirs"
17877       as_dir=`$as_dirname -- "$as_dir" ||
17878 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17879          X"$as_dir" : 'X\(//\)[^/]' \| \
17880          X"$as_dir" : 'X\(//\)$' \| \
17881          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17882 $as_echo X"$as_dir" |
17883     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17884             s//\1/
17885             q
17886           }
17887           /^X\(\/\/\)[^/].*/{
17888             s//\1/
17889             q
17890           }
17891           /^X\(\/\/\)$/{
17892             s//\1/
17893             q
17894           }
17895           /^X\(\/\).*/{
17896             s//\1/
17897             q
17898           }
17899           s/.*/./; q'`
17900       test -d "$as_dir" && break
17901     done
17902     test -z "$as_dirs" || eval "mkdir $as_dirs"
17903   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17904
17905
17906 } # as_fn_mkdir_p
17907 if mkdir -p . 2>/dev/null; then
17908   as_mkdir_p='mkdir -p "$as_dir"'
17909 else
17910   test -d ./-p && rmdir ./-p
17911   as_mkdir_p=false
17912 fi
17913
17914 if test -x / >/dev/null 2>&1; then
17915   as_test_x='test -x'
17916 else
17917   if ls -dL / >/dev/null 2>&1; then
17918     as_ls_L_option=L
17919   else
17920     as_ls_L_option=
17921   fi
17922   as_test_x='
17923     eval sh -c '\''
17924       if test -d "$1"; then
17925         test -d "$1/.";
17926       else
17927         case $1 in #(
17928         -*)set "./$1";;
17929         esac;
17930         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17931         ???[sx]*):;;*)false;;esac;fi
17932     '\'' sh
17933   '
17934 fi
17935 as_executable_p=$as_test_x
17936
17937 # Sed expression to map a string onto a valid CPP name.
17938 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17939
17940 # Sed expression to map a string onto a valid variable name.
17941 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17942
17943
17944 exec 6>&1
17945 ## ----------------------------------- ##
17946 ## Main body of $CONFIG_STATUS script. ##
17947 ## ----------------------------------- ##
17948 _ASEOF
17949 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17950
17951 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17952 # Save the log message, to keep $0 and so on meaningful, and to
17953 # report actual input values of CONFIG_FILES etc. instead of their
17954 # values after options handling.
17955 ac_log="
17956 This file was extended by $as_me, which was
17957 generated by GNU Autoconf 2.64.  Invocation command line was
17958
17959   CONFIG_FILES    = $CONFIG_FILES
17960   CONFIG_HEADERS  = $CONFIG_HEADERS
17961   CONFIG_LINKS    = $CONFIG_LINKS
17962   CONFIG_COMMANDS = $CONFIG_COMMANDS
17963   $ $0 $@
17964
17965 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17966 "
17967
17968 _ACEOF
17969
17970 case $ac_config_files in *"
17971 "*) set x $ac_config_files; shift; ac_config_files=$*;;
17972 esac
17973
17974 case $ac_config_headers in *"
17975 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17976 esac
17977
17978
17979 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17980 # Files that config.status was made for.
17981 config_files="$ac_config_files"
17982 config_headers="$ac_config_headers"
17983 config_links="$ac_config_links"
17984 config_commands="$ac_config_commands"
17985
17986 _ACEOF
17987
17988 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17989 ac_cs_usage="\
17990 \`$as_me' instantiates files and other configuration actions
17991 from templates according to the current configuration.  Unless the files
17992 and actions are specified as TAGs, all are instantiated by default.
17993
17994 Usage: $0 [OPTION]... [TAG]...
17995
17996   -h, --help       print this help, then exit
17997   -V, --version    print version number and configuration settings, then exit
17998   -q, --quiet, --silent
17999                    do not print progress messages
18000   -d, --debug      don't remove temporary files
18001       --recheck    update $as_me by reconfiguring in the same conditions
18002       --file=FILE[:TEMPLATE]
18003                    instantiate the configuration file FILE
18004       --header=FILE[:TEMPLATE]
18005                    instantiate the configuration header FILE
18006
18007 Configuration files:
18008 $config_files
18009
18010 Configuration headers:
18011 $config_headers
18012
18013 Configuration links:
18014 $config_links
18015
18016 Configuration commands:
18017 $config_commands
18018
18019 Report bugs to the package provider."
18020
18021 _ACEOF
18022 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18023 ac_cs_version="\\
18024 config.status
18025 configured by $0, generated by GNU Autoconf 2.64,
18026   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
18027
18028 Copyright (C) 2009 Free Software Foundation, Inc.
18029 This config.status script is free software; the Free Software Foundation
18030 gives unlimited permission to copy, distribute and modify it."
18031
18032 ac_pwd='$ac_pwd'
18033 srcdir='$srcdir'
18034 INSTALL='$INSTALL'
18035 AWK='$AWK'
18036 test -n "\$AWK" || AWK=awk
18037 _ACEOF
18038
18039 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18040 # The default lists apply if the user does not specify any file.
18041 ac_need_defaults=:
18042 while test $# != 0
18043 do
18044   case $1 in
18045   --*=*)
18046     ac_option=`expr "X$1" : 'X\([^=]*\)='`
18047     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18048     ac_shift=:
18049     ;;
18050   *)
18051     ac_option=$1
18052     ac_optarg=$2
18053     ac_shift=shift
18054     ;;
18055   esac
18056
18057   case $ac_option in
18058   # Handling of the options.
18059   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18060     ac_cs_recheck=: ;;
18061   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18062     $as_echo "$ac_cs_version"; exit ;;
18063   --debug | --debu | --deb | --de | --d | -d )
18064     debug=: ;;
18065   --file | --fil | --fi | --f )
18066     $ac_shift
18067     case $ac_optarg in
18068     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18069     esac
18070     as_fn_append CONFIG_FILES " '$ac_optarg'"
18071     ac_need_defaults=false;;
18072   --header | --heade | --head | --hea )
18073     $ac_shift
18074     case $ac_optarg in
18075     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18076     esac
18077     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
18078     ac_need_defaults=false;;
18079   --he | --h)
18080     # Conflict between --help and --header
18081     as_fn_error "ambiguous option: \`$1'
18082 Try \`$0 --help' for more information.";;
18083   --help | --hel | -h )
18084     $as_echo "$ac_cs_usage"; exit ;;
18085   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18086   | -silent | --silent | --silen | --sile | --sil | --si | --s)
18087     ac_cs_silent=: ;;
18088
18089   # This is an error.
18090   -*) as_fn_error "unrecognized option: \`$1'
18091 Try \`$0 --help' for more information." ;;
18092
18093   *) as_fn_append ac_config_targets " $1"
18094      ac_need_defaults=false ;;
18095
18096   esac
18097   shift
18098 done
18099
18100 ac_configure_extra_args=
18101
18102 if $ac_cs_silent; then
18103   exec 6>/dev/null
18104   ac_configure_extra_args="$ac_configure_extra_args --silent"
18105 fi
18106
18107 _ACEOF
18108 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18109 if \$ac_cs_recheck; then
18110   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18111   shift
18112   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18113   CONFIG_SHELL='$SHELL'
18114   export CONFIG_SHELL
18115   exec "\$@"
18116 fi
18117
18118 _ACEOF
18119 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18120 exec 5>>config.log
18121 {
18122   echo
18123   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18124 ## Running $as_me. ##
18125 _ASBOX
18126   $as_echo "$ac_log"
18127 } >&5
18128
18129 _ACEOF
18130 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18131 #
18132 # INIT-COMMANDS
18133 #
18134 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
18135
18136 _ACEOF
18137
18138 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18139
18140 # Handling of arguments.
18141 for ac_config_target in $ac_config_targets
18142 do
18143   case $ac_config_target in
18144     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18145     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
18146     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
18147     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
18148     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
18149     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18150     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
18151     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
18152     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
18153
18154   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
18155   esac
18156 done
18157
18158
18159 # If the user did not use the arguments to specify the items to instantiate,
18160 # then the envvar interface is used.  Set only those that are not.
18161 # We use the long form for the default assignment because of an extremely
18162 # bizarre bug on SunOS 4.1.3.
18163 if $ac_need_defaults; then
18164   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18165   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18166   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18167   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18168 fi
18169
18170 # Have a temporary directory for convenience.  Make it in the build tree
18171 # simply because there is no reason against having it here, and in addition,
18172 # creating and moving files from /tmp can sometimes cause problems.
18173 # Hook for its removal unless debugging.
18174 # Note that there is a small window in which the directory will not be cleaned:
18175 # after its creation but before its name has been assigned to `$tmp'.
18176 $debug ||
18177 {
18178   tmp=
18179   trap 'exit_status=$?
18180   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
18181 ' 0
18182   trap 'as_fn_exit 1' 1 2 13 15
18183 }
18184 # Create a (secure) tmp directory for tmp files.
18185
18186 {
18187   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18188   test -n "$tmp" && test -d "$tmp"
18189 }  ||
18190 {
18191   tmp=./conf$$-$RANDOM
18192   (umask 077 && mkdir "$tmp")
18193 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
18194
18195 # Set up the scripts for CONFIG_FILES section.
18196 # No need to generate them if there are no CONFIG_FILES.
18197 # This happens for instance with `./config.status config.h'.
18198 if test -n "$CONFIG_FILES"; then
18199
18200 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18201   ac_cs_awk_getline=:
18202   ac_cs_awk_pipe_init=
18203   ac_cs_awk_read_file='
18204       while ((getline aline < (F[key])) > 0)
18205         print(aline)
18206       close(F[key])'
18207   ac_cs_awk_pipe_fini=
18208 else
18209   ac_cs_awk_getline=false
18210   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18211   ac_cs_awk_read_file='
18212       print "|#_!!_#|"
18213       print "cat " F[key] " &&"
18214       '$ac_cs_awk_pipe_init
18215   # The final `:' finishes the AND list.
18216   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18217 fi
18218 ac_cr=`echo X | tr X '\015'`
18219 # On cygwin, bash can eat \r inside `` if the user requested igncr.
18220 # But we know of no other shell where ac_cr would be empty at this
18221 # point, so we can use a bashism as a fallback.
18222 if test "x$ac_cr" = x; then
18223   eval ac_cr=\$\'\\r\'
18224 fi
18225 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18226 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18227   ac_cs_awk_cr='\r'
18228 else
18229   ac_cs_awk_cr=$ac_cr
18230 fi
18231
18232 echo 'BEGIN {' >"$tmp/subs1.awk" &&
18233 _ACEOF
18234
18235 # Create commands to substitute file output variables.
18236 {
18237   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18238   echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
18239   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18240   echo "_ACAWK" &&
18241   echo "_ACEOF"
18242 } >conf$$files.sh &&
18243 . ./conf$$files.sh ||
18244   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18245 rm -f conf$$files.sh
18246
18247 {
18248   echo "cat >conf$$subs.awk <<_ACEOF" &&
18249   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18250   echo "_ACEOF"
18251 } >conf$$subs.sh ||
18252   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18253 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
18254 ac_delim='%!_!# '
18255 for ac_last_try in false false false false false :; do
18256   . ./conf$$subs.sh ||
18257     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18258
18259   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18260   if test $ac_delim_n = $ac_delim_num; then
18261     break
18262   elif $ac_last_try; then
18263     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18264   else
18265     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18266   fi
18267 done
18268 rm -f conf$$subs.sh
18269
18270 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18271 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
18272 _ACEOF
18273 sed -n '
18274 h
18275 s/^/S["/; s/!.*/"]=/
18276 p
18277 g
18278 s/^[^!]*!//
18279 :repl
18280 t repl
18281 s/'"$ac_delim"'$//
18282 t delim
18283 :nl
18284 h
18285 s/\(.\{148\}\).*/\1/
18286 t more1
18287 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18288 p
18289 n
18290 b repl
18291 :more1
18292 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18293 p
18294 g
18295 s/.\{148\}//
18296 t nl
18297 :delim
18298 h
18299 s/\(.\{148\}\).*/\1/
18300 t more2
18301 s/["\\]/\\&/g; s/^/"/; s/$/"/
18302 p
18303 b
18304 :more2
18305 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18306 p
18307 g
18308 s/.\{148\}//
18309 t delim
18310 ' <conf$$subs.awk | sed '
18311 /^[^""]/{
18312   N
18313   s/\n//
18314 }
18315 ' >>$CONFIG_STATUS || ac_write_fail=1
18316 rm -f conf$$subs.awk
18317 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18318 _ACAWK
18319 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
18320   for (key in S) S_is_set[key] = 1
18321   FS = "\a"
18322   \$ac_cs_awk_pipe_init
18323 }
18324 {
18325   line = $ 0
18326   nfields = split(line, field, "@")
18327   substed = 0
18328   len = length(field[1])
18329   for (i = 2; i < nfields; i++) {
18330     key = field[i]
18331     keylen = length(key)
18332     if (S_is_set[key]) {
18333       value = S[key]
18334       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18335       len += length(value) + length(field[++i])
18336       substed = 1
18337     } else
18338       len += 1 + keylen
18339   }
18340   if (nfields == 3 && !substed) {
18341     key = field[2]
18342     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
18343       \$ac_cs_awk_read_file
18344       next
18345     }
18346   }
18347   print line
18348 }
18349 \$ac_cs_awk_pipe_fini
18350 _ACAWK
18351 _ACEOF
18352 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18353 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18354   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18355 else
18356   cat
18357 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
18358   || as_fn_error "could not setup config files machinery" "$LINENO" 5
18359 _ACEOF
18360
18361 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18362 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18363 # trailing colons and then remove the whole line if VPATH becomes empty
18364 # (actually we leave an empty line to preserve line numbers).
18365 if test "x$srcdir" = x.; then
18366   ac_vpsub='/^[  ]*VPATH[        ]*=/{
18367 s/:*\$(srcdir):*/:/
18368 s/:*\${srcdir}:*/:/
18369 s/:*@srcdir@:*/:/
18370 s/^\([^=]*=[     ]*\):*/\1/
18371 s/:*$//
18372 s/^[^=]*=[       ]*$//
18373 }'
18374 fi
18375
18376 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18377 fi # test -n "$CONFIG_FILES"
18378
18379 # Set up the scripts for CONFIG_HEADERS section.
18380 # No need to generate them if there are no CONFIG_HEADERS.
18381 # This happens for instance with `./config.status Makefile'.
18382 if test -n "$CONFIG_HEADERS"; then
18383 cat >"$tmp/defines.awk" <<\_ACAWK ||
18384 BEGIN {
18385 _ACEOF
18386
18387 # Transform confdefs.h into an awk script `defines.awk', embedded as
18388 # here-document in config.status, that substitutes the proper values into
18389 # config.h.in to produce config.h.
18390
18391 # Create a delimiter string that does not exist in confdefs.h, to ease
18392 # handling of long lines.
18393 ac_delim='%!_!# '
18394 for ac_last_try in false false :; do
18395   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
18396   if test -z "$ac_t"; then
18397     break
18398   elif $ac_last_try; then
18399     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
18400   else
18401     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18402   fi
18403 done
18404
18405 # For the awk script, D is an array of macro values keyed by name,
18406 # likewise P contains macro parameters if any.  Preserve backslash
18407 # newline sequences.
18408
18409 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18410 sed -n '
18411 s/.\{148\}/&'"$ac_delim"'/g
18412 t rset
18413 :rset
18414 s/^[     ]*#[    ]*define[       ][      ]*/ /
18415 t def
18416 d
18417 :def
18418 s/\\$//
18419 t bsnl
18420 s/["\\]/\\&/g
18421 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18422 D["\1"]=" \3"/p
18423 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
18424 d
18425 :bsnl
18426 s/["\\]/\\&/g
18427 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18428 D["\1"]=" \3\\\\\\n"\\/p
18429 t cont
18430 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18431 t cont
18432 d
18433 :cont
18434 n
18435 s/.\{148\}/&'"$ac_delim"'/g
18436 t clear
18437 :clear
18438 s/\\$//
18439 t bsnlc
18440 s/["\\]/\\&/g; s/^/"/; s/$/"/p
18441 d
18442 :bsnlc
18443 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18444 b cont
18445 ' <confdefs.h | sed '
18446 s/'"$ac_delim"'/"\\\
18447 "/g' >>$CONFIG_STATUS || ac_write_fail=1
18448
18449 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18450   for (key in D) D_is_set[key] = 1
18451   FS = "\a"
18452 }
18453 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18454   line = \$ 0
18455   split(line, arg, " ")
18456   if (arg[1] == "#") {
18457     defundef = arg[2]
18458     mac1 = arg[3]
18459   } else {
18460     defundef = substr(arg[1], 2)
18461     mac1 = arg[2]
18462   }
18463   split(mac1, mac2, "(") #)
18464   macro = mac2[1]
18465   prefix = substr(line, 1, index(line, defundef) - 1)
18466   if (D_is_set[macro]) {
18467     # Preserve the white space surrounding the "#".
18468     print prefix "define", macro P[macro] D[macro]
18469     next
18470   } else {
18471     # Replace #undef with comments.  This is necessary, for example,
18472     # in the case of _POSIX_SOURCE, which is predefined and required
18473     # on some systems where configure will not decide to define it.
18474     if (defundef == "undef") {
18475       print "/*", prefix defundef, macro, "*/"
18476       next
18477     }
18478   }
18479 }
18480 { print }
18481 _ACAWK
18482 _ACEOF
18483 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18484   as_fn_error "could not setup config headers machinery" "$LINENO" 5
18485 fi # test -n "$CONFIG_HEADERS"
18486
18487
18488 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
18489 shift
18490 for ac_tag
18491 do
18492   case $ac_tag in
18493   :[FHLC]) ac_mode=$ac_tag; continue;;
18494   esac
18495   case $ac_mode$ac_tag in
18496   :[FHL]*:*);;
18497   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
18498   :[FH]-) ac_tag=-:-;;
18499   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18500   esac
18501   ac_save_IFS=$IFS
18502   IFS=:
18503   set x $ac_tag
18504   IFS=$ac_save_IFS
18505   shift
18506   ac_file=$1
18507   shift
18508
18509   case $ac_mode in
18510   :L) ac_source=$1;;
18511   :[FH])
18512     ac_file_inputs=
18513     for ac_f
18514     do
18515       case $ac_f in
18516       -) ac_f="$tmp/stdin";;
18517       *) # Look for the file first in the build tree, then in the source tree
18518          # (if the path is not absolute).  The absolute path cannot be DOS-style,
18519          # because $ac_f cannot contain `:'.
18520          test -f "$ac_f" ||
18521            case $ac_f in
18522            [\\/$]*) false;;
18523            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18524            esac ||
18525            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18526       esac
18527       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18528       as_fn_append ac_file_inputs " '$ac_f'"
18529     done
18530
18531     # Let's still pretend it is `configure' which instantiates (i.e., don't
18532     # use $as_me), people would be surprised to read:
18533     #    /* config.h.  Generated by config.status.  */
18534     configure_input='Generated from '`
18535           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18536         `' by configure.'
18537     if test x"$ac_file" != x-; then
18538       configure_input="$ac_file.  $configure_input"
18539       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18540 $as_echo "$as_me: creating $ac_file" >&6;}
18541     fi
18542     # Neutralize special characters interpreted by sed in replacement strings.
18543     case $configure_input in #(
18544     *\&* | *\|* | *\\* )
18545        ac_sed_conf_input=`$as_echo "$configure_input" |
18546        sed 's/[\\\\&|]/\\\\&/g'`;; #(
18547     *) ac_sed_conf_input=$configure_input;;
18548     esac
18549
18550     case $ac_tag in
18551     *:-:* | *:-) cat >"$tmp/stdin" \
18552       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
18553     esac
18554     ;;
18555   esac
18556
18557   ac_dir=`$as_dirname -- "$ac_file" ||
18558 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18559          X"$ac_file" : 'X\(//\)[^/]' \| \
18560          X"$ac_file" : 'X\(//\)$' \| \
18561          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18562 $as_echo X"$ac_file" |
18563     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18564             s//\1/
18565             q
18566           }
18567           /^X\(\/\/\)[^/].*/{
18568             s//\1/
18569             q
18570           }
18571           /^X\(\/\/\)$/{
18572             s//\1/
18573             q
18574           }
18575           /^X\(\/\).*/{
18576             s//\1/
18577             q
18578           }
18579           s/.*/./; q'`
18580   as_dir="$ac_dir"; as_fn_mkdir_p
18581   ac_builddir=.
18582
18583 case "$ac_dir" in
18584 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18585 *)
18586   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18587   # A ".." for each directory in $ac_dir_suffix.
18588   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18589   case $ac_top_builddir_sub in
18590   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18591   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18592   esac ;;
18593 esac
18594 ac_abs_top_builddir=$ac_pwd
18595 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18596 # for backward compatibility:
18597 ac_top_builddir=$ac_top_build_prefix
18598
18599 case $srcdir in
18600   .)  # We are building in place.
18601     ac_srcdir=.
18602     ac_top_srcdir=$ac_top_builddir_sub
18603     ac_abs_top_srcdir=$ac_pwd ;;
18604   [\\/]* | ?:[\\/]* )  # Absolute name.
18605     ac_srcdir=$srcdir$ac_dir_suffix;
18606     ac_top_srcdir=$srcdir
18607     ac_abs_top_srcdir=$srcdir ;;
18608   *) # Relative name.
18609     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18610     ac_top_srcdir=$ac_top_build_prefix$srcdir
18611     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18612 esac
18613 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18614
18615
18616   case $ac_mode in
18617   :F)
18618   #
18619   # CONFIG_FILE
18620   #
18621
18622   case $INSTALL in
18623   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18624   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
18625   esac
18626 _ACEOF
18627
18628 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18629 # If the template does not know about datarootdir, expand it.
18630 # FIXME: This hack should be removed a few years after 2.60.
18631 ac_datarootdir_hack=; ac_datarootdir_seen=
18632 ac_sed_dataroot='
18633 /datarootdir/ {
18634   p
18635   q
18636 }
18637 /@datadir@/p
18638 /@docdir@/p
18639 /@infodir@/p
18640 /@localedir@/p
18641 /@mandir@/p'
18642 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18643 *datarootdir*) ac_datarootdir_seen=yes;;
18644 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18645   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18646 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18647 _ACEOF
18648 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18649   ac_datarootdir_hack='
18650   s&@datadir@&$datadir&g
18651   s&@docdir@&$docdir&g
18652   s&@infodir@&$infodir&g
18653   s&@localedir@&$localedir&g
18654   s&@mandir@&$mandir&g
18655   s&\\\${datarootdir}&$datarootdir&g' ;;
18656 esac
18657 _ACEOF
18658
18659 # Neutralize VPATH when `$srcdir' = `.'.
18660 # Shell code in configure.ac might set extrasub.
18661 # FIXME: do we really want to maintain this feature?
18662 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18663 ac_sed_extra="$ac_vpsub
18664 $extrasub
18665 _ACEOF
18666 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18667 :t
18668 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18669 s|@configure_input@|$ac_sed_conf_input|;t t
18670 s&@top_builddir@&$ac_top_builddir_sub&;t t
18671 s&@top_build_prefix@&$ac_top_build_prefix&;t t
18672 s&@srcdir@&$ac_srcdir&;t t
18673 s&@abs_srcdir@&$ac_abs_srcdir&;t t
18674 s&@top_srcdir@&$ac_top_srcdir&;t t
18675 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18676 s&@builddir@&$ac_builddir&;t t
18677 s&@abs_builddir@&$ac_abs_builddir&;t t
18678 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18679 s&@INSTALL@&$ac_INSTALL&;t t
18680 $ac_datarootdir_hack
18681 "
18682 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18683 if $ac_cs_awk_getline; then
18684   $AWK -f "$tmp/subs.awk"
18685 else
18686   $AWK -f "$tmp/subs.awk" | $SHELL
18687 fi >$tmp/out \
18688   || as_fn_error "could not create $ac_file" "$LINENO" 5
18689
18690 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18691   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18692   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18693   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18694 which seems to be undefined.  Please make sure it is defined." >&5
18695 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18696 which seems to be undefined.  Please make sure it is defined." >&2;}
18697
18698   rm -f "$tmp/stdin"
18699   case $ac_file in
18700   -) cat "$tmp/out" && rm -f "$tmp/out";;
18701   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
18702   esac \
18703   || as_fn_error "could not create $ac_file" "$LINENO" 5
18704  ;;
18705   :H)
18706   #
18707   # CONFIG_HEADER
18708   #
18709   if test x"$ac_file" != x-; then
18710     {
18711       $as_echo "/* $configure_input  */" \
18712       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
18713     } >"$tmp/config.h" \
18714       || as_fn_error "could not create $ac_file" "$LINENO" 5
18715     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
18716       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18717 $as_echo "$as_me: $ac_file is unchanged" >&6;}
18718     else
18719       rm -f "$ac_file"
18720       mv "$tmp/config.h" "$ac_file" \
18721         || as_fn_error "could not create $ac_file" "$LINENO" 5
18722     fi
18723   else
18724     $as_echo "/* $configure_input  */" \
18725       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
18726       || as_fn_error "could not create -" "$LINENO" 5
18727   fi
18728  ;;
18729   :L)
18730   #
18731   # CONFIG_LINK
18732   #
18733
18734   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18735     :
18736   else
18737     # Prefer the file from the source tree if names are identical.
18738     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18739       ac_source=$srcdir/$ac_source
18740     fi
18741
18742     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18743 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
18744
18745     if test ! -r "$ac_source"; then
18746       as_fn_error "$ac_source: file not found" "$LINENO" 5
18747     fi
18748     rm -f "$ac_file"
18749
18750     # Try a relative symlink, then a hard link, then a copy.
18751     case $srcdir in
18752     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18753         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18754     esac
18755     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18756       ln "$ac_source" "$ac_file" 2>/dev/null ||
18757       cp -p "$ac_source" "$ac_file" ||
18758       as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18759   fi
18760  ;;
18761   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18762 $as_echo "$as_me: executing $ac_file commands" >&6;}
18763  ;;
18764   esac
18765
18766
18767   case $ac_file$ac_mode in
18768     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
18769     "gcore":F) chmod +x gcore ;;
18770     "Makefile":F)
18771 case x$CONFIG_HEADERS in
18772 xconfig.h:config.in)
18773 echo > stamp-h ;;
18774 esac
18775  ;;
18776     "gdb-gdb.gdb":F)
18777 case x$CONFIG_HEADERS in
18778 xconfig.h:config.in)
18779 echo > stamp-h ;;
18780 esac
18781  ;;
18782     "doc/Makefile":F)
18783 case x$CONFIG_HEADERS in
18784 xconfig.h:config.in)
18785 echo > stamp-h ;;
18786 esac
18787  ;;
18788     "data-directory/Makefile":F)
18789 case x$CONFIG_HEADERS in
18790 xconfig.h:config.in)
18791 echo > stamp-h ;;
18792 esac
18793  ;;
18794
18795   esac
18796 done # for ac_tag
18797
18798
18799 as_fn_exit 0
18800 _ACEOF
18801 ac_clean_files=$ac_clean_files_save
18802
18803 test $ac_write_fail = 0 ||
18804   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
18805
18806
18807 # configure is writing to config.log, and then calls config.status.
18808 # config.status does its own redirection, appending to config.log.
18809 # Unfortunately, on DOS this fails, as config.log is still kept open
18810 # by configure, so config.status won't be able to write to it; its
18811 # output is simply discarded.  So we exec the FD to /dev/null,
18812 # effectively closing config.log, so it can be properly (re)opened and
18813 # appended to by config.status.  When coming back to configure, we
18814 # need to make the FD available again.
18815 if test "$no_create" != yes; then
18816   ac_cs_success=:
18817   ac_config_status_args=
18818   test "$silent" = yes &&
18819     ac_config_status_args="$ac_config_status_args --quiet"
18820   exec 5>/dev/null
18821   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18822   exec 5>>config.log
18823   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18824   # would make configure fail if this is the last instruction.
18825   $ac_cs_success || as_fn_exit $?
18826 fi
18827
18828 #
18829 # CONFIG_SUBDIRS section.
18830 #
18831 if test "$no_recursion" != yes; then
18832
18833   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
18834   # so they do not pile up.
18835   ac_sub_configure_args=
18836   ac_prev=
18837   eval "set x $ac_configure_args"
18838   shift
18839   for ac_arg
18840   do
18841     if test -n "$ac_prev"; then
18842       ac_prev=
18843       continue
18844     fi
18845     case $ac_arg in
18846     -cache-file | --cache-file | --cache-fil | --cache-fi \
18847     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
18848       ac_prev=cache_file ;;
18849     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
18850     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
18851     | --c=*)
18852       ;;
18853     --config-cache | -C)
18854       ;;
18855     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
18856       ac_prev=srcdir ;;
18857     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
18858       ;;
18859     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
18860       ac_prev=prefix ;;
18861     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
18862       ;;
18863     --disable-option-checking)
18864       ;;
18865     *)
18866       case $ac_arg in
18867       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
18868       esac
18869       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
18870     esac
18871   done
18872
18873   # Always prepend --prefix to ensure using the same prefix
18874   # in subdir configurations.
18875   ac_arg="--prefix=$prefix"
18876   case $ac_arg in
18877   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
18878   esac
18879   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18880
18881   # Pass --silent
18882   if test "$silent" = yes; then
18883     ac_sub_configure_args="--silent $ac_sub_configure_args"
18884   fi
18885
18886   # Always prepend --disable-option-checking to silence warnings, since
18887   # different subdirs can have different --enable and --with options.
18888   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
18889
18890   ac_popdir=`pwd`
18891   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
18892
18893     # Do not complain, so a configure script can configure whichever
18894     # parts of a large source tree are present.
18895     test -d "$srcdir/$ac_dir" || continue
18896
18897     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18898     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18899     $as_echo "$ac_msg" >&6
18900     as_dir="$ac_dir"; as_fn_mkdir_p
18901     ac_builddir=.
18902
18903 case "$ac_dir" in
18904 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18905 *)
18906   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18907   # A ".." for each directory in $ac_dir_suffix.
18908   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18909   case $ac_top_builddir_sub in
18910   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18911   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18912   esac ;;
18913 esac
18914 ac_abs_top_builddir=$ac_pwd
18915 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18916 # for backward compatibility:
18917 ac_top_builddir=$ac_top_build_prefix
18918
18919 case $srcdir in
18920   .)  # We are building in place.
18921     ac_srcdir=.
18922     ac_top_srcdir=$ac_top_builddir_sub
18923     ac_abs_top_srcdir=$ac_pwd ;;
18924   [\\/]* | ?:[\\/]* )  # Absolute name.
18925     ac_srcdir=$srcdir$ac_dir_suffix;
18926     ac_top_srcdir=$srcdir
18927     ac_abs_top_srcdir=$srcdir ;;
18928   *) # Relative name.
18929     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18930     ac_top_srcdir=$ac_top_build_prefix$srcdir
18931     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18932 esac
18933 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18934
18935
18936     cd "$ac_dir"
18937
18938     # Check for guested configure; otherwise get Cygnus style configure.
18939     if test -f "$ac_srcdir/configure.gnu"; then
18940       ac_sub_configure=$ac_srcdir/configure.gnu
18941     elif test -f "$ac_srcdir/configure"; then
18942       ac_sub_configure=$ac_srcdir/configure
18943     elif test -f "$ac_srcdir/configure.in"; then
18944       # This should be Cygnus configure.
18945       ac_sub_configure=$ac_aux_dir/configure
18946     else
18947       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18948 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
18949       ac_sub_configure=
18950     fi
18951
18952     # The recursion is here.
18953     if test -n "$ac_sub_configure"; then
18954       # Make the cache file name correct relative to the subdirectory.
18955       case $cache_file in
18956       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
18957       *) # Relative name.
18958         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
18959       esac
18960
18961       { $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
18962 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
18963       # The eval makes quoting arguments work.
18964       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18965            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
18966         as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
18967     fi
18968
18969     cd "$ac_popdir"
18970   done
18971 fi
18972 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18973   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18974 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18975 fi
18976