Fix octeon3 tests for targets with default abi != n32
[external/binutils.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.64.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7 # Foundation, Inc.
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18   emulate sh
19   NULLCMD=:
20   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23   setopt NO_GLOB_SUBST
24 else
25   case `(set -o) 2>/dev/null` in #(
26   *posix*) :
27     set -o posix ;; #(
28   *) :
29      ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45   as_echo='print -r --'
46   as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48   as_echo='printf %s\n'
49   as_echo_n='printf %s'
50 else
51   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53     as_echo_n='/usr/ucb/echo -n'
54   else
55     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56     as_echo_n_body='eval
57       arg=$1;
58       case $arg in #(
59       *"$as_nl"*)
60         expr "X$arg" : "X\\(.*\\)$as_nl";
61         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62       esac;
63       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64     '
65     export as_echo_n_body
66     as_echo_n='sh -c $as_echo_n_body as_echo'
67   fi
68   export as_echo_body
69   as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74   PATH_SEPARATOR=:
75   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77       PATH_SEPARATOR=';'
78   }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order.  Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" ""        $as_nl"
88
89 # Find who we are.  Look in the path if we contain no directory separator.
90 case $0 in #((
91   *[\\/]* ) as_myself=$0 ;;
92   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93 for as_dir in $PATH
94 do
95   IFS=$as_save_IFS
96   test -z "$as_dir" && as_dir=.
97     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98   done
99 IFS=$as_save_IFS
100
101      ;;
102 esac
103 # We did not find ourselves, most probably we were run as `sh COMMAND'
104 # in which case we are not to be found in the path.
105 if test "x$as_myself" = x; then
106   as_myself=$0
107 fi
108 if test ! -f "$as_myself"; then
109   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110   exit 1
111 fi
112
113 # Unset variables that we do not need and which cause bugs (e.g. in
114 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
115 # suppresses any "Segmentation fault" message there.  '((' could
116 # trigger a bug in pdksh 5.2.14.
117 for as_var in BASH_ENV ENV MAIL MAILPATH
118 do eval test x\${$as_var+set} = xset \
119   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120 done
121 PS1='$ '
122 PS2='> '
123 PS4='+ '
124
125 # NLS nuisances.
126 LC_ALL=C
127 export LC_ALL
128 LANGUAGE=C
129 export LANGUAGE
130
131 # CDPATH.
132 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134 if test "x$CONFIG_SHELL" = x; then
135   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136   emulate sh
137   NULLCMD=:
138   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139   # is contrary to our usage.  Disable this feature.
140   alias -g '\${1+\"\$@\"}'='\"\$@\"'
141   setopt NO_GLOB_SUBST
142 else
143   case \`(set -o) 2>/dev/null\` in #(
144   *posix*) :
145     set -o posix ;; #(
146   *) :
147      ;;
148 esac
149 fi
150 "
151   as_required="as_fn_return () { (exit \$1); }
152 as_fn_success () { as_fn_return 0; }
153 as_fn_failure () { as_fn_return 1; }
154 as_fn_ret_success () { return 0; }
155 as_fn_ret_failure () { return 1; }
156
157 exitcode=0
158 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164 else
165   exitcode=1; echo positional parameters were not saved.
166 fi
167 test x\$exitcode = x0 || exit 1"
168   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172 test \$(( 1 + 1 )) = 2 || exit 1"
173   if (eval "$as_required") 2>/dev/null; then :
174   as_have_required=yes
175 else
176   as_have_required=no
177 fi
178   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180 else
181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182 as_found=false
183 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
184 do
185   IFS=$as_save_IFS
186   test -z "$as_dir" && as_dir=.
187   as_found=:
188   case $as_dir in #(
189          /*)
190            for as_base in sh bash ksh sh5; do
191              # Try only shells that exist, to save several forks.
192              as_shell=$as_dir/$as_base
193              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195   CONFIG_SHELL=$as_shell as_have_required=yes
196                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197   break 2
198 fi
199 fi
200            done;;
201        esac
202   as_found=false
203 done
204 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206   CONFIG_SHELL=$SHELL as_have_required=yes
207 fi; }
208 IFS=$as_save_IFS
209
210
211       if test "x$CONFIG_SHELL" != x; then :
212   # We cannot yet assume a decent shell, so we have to provide a
213         # neutralization value for shells without unset; and this also
214         # works around shells that cannot unset nonexistent variables.
215         BASH_ENV=/dev/null
216         ENV=/dev/null
217         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218         export CONFIG_SHELL
219         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220 fi
221
222     if test x$as_have_required = xno; then :
223   $as_echo "$0: This script requires a shell more modern than all"
224   $as_echo "$0: the shells that I found on your system."
225   if test x${ZSH_VERSION+set} = xset ; then
226     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
228   else
229     $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230 $0: including any error possibly output before this
231 $0: message. Then install a modern shell, or manually run
232 $0: the script under such a shell if you do have one."
233   fi
234   exit 1
235 fi
236 fi
237 fi
238 SHELL=${CONFIG_SHELL-/bin/sh}
239 export SHELL
240 # Unset more variables known to interfere with behavior of common tools.
241 CLICOLOR_FORCE= GREP_OPTIONS=
242 unset CLICOLOR_FORCE GREP_OPTIONS
243
244 ## --------------------- ##
245 ## M4sh Shell Functions. ##
246 ## --------------------- ##
247 # as_fn_unset VAR
248 # ---------------
249 # Portably unset VAR.
250 as_fn_unset ()
251 {
252   { eval $1=; unset $1;}
253 }
254 as_unset=as_fn_unset
255
256 # as_fn_set_status STATUS
257 # -----------------------
258 # Set $? to STATUS, without forking.
259 as_fn_set_status ()
260 {
261   return $1
262 } # as_fn_set_status
263
264 # as_fn_exit STATUS
265 # -----------------
266 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267 as_fn_exit ()
268 {
269   set +e
270   as_fn_set_status $1
271   exit $1
272 } # as_fn_exit
273
274 # as_fn_mkdir_p
275 # -------------
276 # Create "$as_dir" as a directory, including parents if necessary.
277 as_fn_mkdir_p ()
278 {
279
280   case $as_dir in #(
281   -*) as_dir=./$as_dir;;
282   esac
283   test -d "$as_dir" || eval $as_mkdir_p || {
284     as_dirs=
285     while :; do
286       case $as_dir in #(
287       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288       *) as_qdir=$as_dir;;
289       esac
290       as_dirs="'$as_qdir' $as_dirs"
291       as_dir=`$as_dirname -- "$as_dir" ||
292 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293          X"$as_dir" : 'X\(//\)[^/]' \| \
294          X"$as_dir" : 'X\(//\)$' \| \
295          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296 $as_echo X"$as_dir" |
297     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298             s//\1/
299             q
300           }
301           /^X\(\/\/\)[^/].*/{
302             s//\1/
303             q
304           }
305           /^X\(\/\/\)$/{
306             s//\1/
307             q
308           }
309           /^X\(\/\).*/{
310             s//\1/
311             q
312           }
313           s/.*/./; q'`
314       test -d "$as_dir" && break
315     done
316     test -z "$as_dirs" || eval "mkdir $as_dirs"
317   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320 } # as_fn_mkdir_p
321 # as_fn_append VAR VALUE
322 # ----------------------
323 # Append the text in VALUE to the end of the definition contained in VAR. Take
324 # advantage of any shell optimizations that allow amortized linear growth over
325 # repeated appends, instead of the typical quadratic growth present in naive
326 # implementations.
327 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328   eval 'as_fn_append ()
329   {
330     eval $1+=\$2
331   }'
332 else
333   as_fn_append ()
334   {
335     eval $1=\$$1\$2
336   }
337 fi # as_fn_append
338
339 # as_fn_arith ARG...
340 # ------------------
341 # Perform arithmetic evaluation on the ARGs, and store the result in the
342 # global $as_val. Take advantage of shells that can avoid forks. The arguments
343 # must be portable across $(()) and expr.
344 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345   eval 'as_fn_arith ()
346   {
347     as_val=$(( $* ))
348   }'
349 else
350   as_fn_arith ()
351   {
352     as_val=`expr "$@" || test $? -eq 1`
353   }
354 fi # as_fn_arith
355
356
357 # as_fn_error ERROR [LINENO LOG_FD]
358 # ---------------------------------
359 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361 # script with status $?, using 1 if that was 0.
362 as_fn_error ()
363 {
364   as_status=$?; test $as_status -eq 0 && as_status=1
365   if test "$3"; then
366     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368   fi
369   $as_echo "$as_me: error: $1" >&2
370   as_fn_exit $as_status
371 } # as_fn_error
372
373 if expr a : '\(a\)' >/dev/null 2>&1 &&
374    test "X`expr 00001 : '.*\(...\)'`" = X001; then
375   as_expr=expr
376 else
377   as_expr=false
378 fi
379
380 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
381   as_basename=basename
382 else
383   as_basename=false
384 fi
385
386 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387   as_dirname=dirname
388 else
389   as_dirname=false
390 fi
391
392 as_me=`$as_basename -- "$0" ||
393 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394          X"$0" : 'X\(//\)$' \| \
395          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396 $as_echo X/"$0" |
397     sed '/^.*\/\([^/][^/]*\)\/*$/{
398             s//\1/
399             q
400           }
401           /^X\/\(\/\/\)$/{
402             s//\1/
403             q
404           }
405           /^X\/\(\/\).*/{
406             s//\1/
407             q
408           }
409           s/.*/./; q'`
410
411 # Avoid depending upon Character Ranges.
412 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415 as_cr_digits='0123456789'
416 as_cr_alnum=$as_cr_Letters$as_cr_digits
417
418
419   as_lineno_1=$LINENO as_lineno_1a=$LINENO
420   as_lineno_2=$LINENO as_lineno_2a=$LINENO
421   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
424   sed -n '
425     p
426     /[$]LINENO/=
427   ' <$as_myself |
428     sed '
429       s/[$]LINENO.*/&-/
430       t lineno
431       b
432       :lineno
433       N
434       :loop
435       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
436       t loop
437       s/-\n.*//
438     ' >$as_me.lineno &&
439   chmod +x "$as_me.lineno" ||
440     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
441
442   # Don't try to exec as it changes $[0], causing all sort of problems
443   # (the dirname of $[0] is not the place where we might find the
444   # original and so on.  Autoconf is especially sensitive to this).
445   . "./$as_me.lineno"
446   # Exit status is that of the last command.
447   exit
448 }
449
450 ECHO_C= ECHO_N= ECHO_T=
451 case `echo -n x` in #(((((
452 -n*)
453   case `echo 'xy\c'` in
454   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
455   xy)  ECHO_C='\c';;
456   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
457        ECHO_T=' ';;
458   esac;;
459 *)
460   ECHO_N='-n';;
461 esac
462
463 rm -f conf$$ conf$$.exe conf$$.file
464 if test -d conf$$.dir; then
465   rm -f conf$$.dir/conf$$.file
466 else
467   rm -f conf$$.dir
468   mkdir conf$$.dir 2>/dev/null
469 fi
470 if (echo >conf$$.file) 2>/dev/null; then
471   if ln -s conf$$.file conf$$ 2>/dev/null; then
472     as_ln_s='ln -s'
473     # ... but there are two gotchas:
474     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476     # In both cases, we have to default to `cp -p'.
477     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478       as_ln_s='cp -p'
479   elif ln conf$$.file conf$$ 2>/dev/null; then
480     as_ln_s=ln
481   else
482     as_ln_s='cp -p'
483   fi
484 else
485   as_ln_s='cp -p'
486 fi
487 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488 rmdir conf$$.dir 2>/dev/null
489
490 if mkdir -p . 2>/dev/null; then
491   as_mkdir_p='mkdir -p "$as_dir"'
492 else
493   test -d ./-p && rmdir ./-p
494   as_mkdir_p=false
495 fi
496
497 if test -x / >/dev/null 2>&1; then
498   as_test_x='test -x'
499 else
500   if ls -dL / >/dev/null 2>&1; then
501     as_ls_L_option=L
502   else
503     as_ls_L_option=
504   fi
505   as_test_x='
506     eval sh -c '\''
507       if test -d "$1"; then
508         test -d "$1/.";
509       else
510         case $1 in #(
511         -*)set "./$1";;
512         esac;
513         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514         ???[sx]*):;;*)false;;esac;fi
515     '\'' sh
516   '
517 fi
518 as_executable_p=$as_test_x
519
520 # Sed expression to map a string onto a valid CPP name.
521 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523 # Sed expression to map a string onto a valid variable name.
524 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
527 exec 7<&0 </dev/null 6>&1
528
529 # Name of the host.
530 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531 # so uname gets run too.
532 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
534 #
535 # Initializations.
536 #
537 ac_default_prefix=/usr/local
538 ac_clean_files=
539 ac_config_libobj_dir=.
540 LIBOBJS=
541 cross_compiling=no
542 subdirs=
543 MFLAGS=
544 MAKEFLAGS=
545
546 # Identity of this package.
547 PACKAGE_NAME=
548 PACKAGE_TARNAME=
549 PACKAGE_VERSION=
550 PACKAGE_STRING=
551 PACKAGE_BUGREPORT=
552 PACKAGE_URL=
553
554 ac_unique_file="main.c"
555 # Factoring default headers for most tests.
556 ac_includes_default="\
557 #include <stdio.h>
558 #ifdef HAVE_SYS_TYPES_H
559 # include <sys/types.h>
560 #endif
561 #ifdef HAVE_SYS_STAT_H
562 # include <sys/stat.h>
563 #endif
564 #ifdef STDC_HEADERS
565 # include <stdlib.h>
566 # include <stddef.h>
567 #else
568 # ifdef HAVE_STDLIB_H
569 #  include <stdlib.h>
570 # endif
571 #endif
572 #ifdef HAVE_STRING_H
573 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
574 #  include <memory.h>
575 # endif
576 # include <string.h>
577 #endif
578 #ifdef HAVE_STRINGS_H
579 # include <strings.h>
580 #endif
581 #ifdef HAVE_INTTYPES_H
582 # include <inttypes.h>
583 #endif
584 #ifdef HAVE_STDINT_H
585 # include <stdint.h>
586 #endif
587 #ifdef HAVE_UNISTD_H
588 # include <unistd.h>
589 #endif"
590
591 enable_option_checking=no
592 ac_subst_vars='LTLIBOBJS
593 LIBOBJS
594 GCORE_TRANSFORM_NAME
595 GDB_TRANSFORM_NAME
596 GDB_NM_FILE
597 LTLIBBABELTRACE
598 LIBBABELTRACE
599 HAVE_LIBBABELTRACE
600 frags
601 target_subdir
602 CONFIG_UNINSTALL
603 CONFIG_INSTALL
604 CONFIG_CLEAN
605 CONFIG_ALL
606 CONFIG_SRCS
607 CONFIG_DEPS
608 CONFIG_OBS
609 PROFILE_CFLAGS
610 ENABLE_CFLAGS
611 SIM_OBS
612 SIM
613 XMKMF
614 GDBTK_SRC_DIR
615 GDBTK_CFLAGS
616 GDBTKLIBS
617 X_LIBS
618 X_LDFLAGS
619 X_CFLAGS
620 TK_XINCLUDES
621 TK_DEPS
622 TK_LIBRARY
623 TK_INCLUDE
624 TK_STUB_LIB_SPEC
625 TK_STUB_LIB_FLAG
626 TK_STUB_LIB_FILE
627 TK_LIB_SPEC
628 TK_LIB_FLAG
629 TK_LIB_FILE
630 TK_SRC_DIR
631 TK_BIN_DIR
632 TK_VERSION
633 TCL_DEPS
634 TCL_LIBRARY
635 TCL_INCLUDE
636 TCL_STUB_LIB_SPEC
637 TCL_STUB_LIB_FLAG
638 TCL_STUB_LIB_FILE
639 TCL_LIB_SPEC
640 TCL_LIB_FLAG
641 TCL_LIB_FILE
642 TCL_SRC_DIR
643 TCL_BIN_DIR
644 TCL_PATCH_LEVEL
645 TCL_VERSION
646 WIN32LDAPP
647 GUI_CFLAGS_X
648 LIBGUI
649 LTLIBLZMA
650 LIBLZMA
651 HAVE_LIBLZMA
652 WIN32LIBS
653 SER_HARDWIRE
654 WERROR_CFLAGS
655 WARN_CFLAGS
656 SYSTEM_GDBINIT
657 TARGET_SYSTEM_ROOT
658 CONFIG_LDFLAGS
659 RDYNAMIC
660 ALLOCA
661 HAVE_GUILE_FALSE
662 HAVE_GUILE_TRUE
663 GUILE_LIBS
664 GUILE_CPPFLAGS
665 GUILD_TARGET_FLAG
666 GUILD
667 pkg_config_prog_path
668 HAVE_PYTHON_FALSE
669 HAVE_PYTHON_TRUE
670 PYTHON_LIBS
671 PYTHON_CPPFLAGS
672 PYTHON_CFLAGS
673 python_prog_path
674 LTLIBEXPAT
675 LIBEXPAT
676 HAVE_LIBEXPAT
677 JIT_READER_DIR
678 TARGET_PTR
679 READLINE_TEXI_INCFLAG
680 READLINE_CFLAGS
681 READLINE_DEPS
682 READLINE
683 MIG
684 WINDRES
685 DLLTOOL
686 AR
687 YFLAGS
688 YACC
689 RANLIB
690 LN_S
691 INSTALL_DATA
692 INSTALL_SCRIPT
693 INSTALL_PROGRAM
694 AWK
695 REPORT_BUGS_TEXI
696 REPORT_BUGS_TO
697 PKGVERSION
698 HAVE_NATIVE_GCORE_TARGET
699 TARGET_OBS
700 subdirs
701 GDB_DATADIR
702 DEBUGDIR
703 MAKEINFO_EXTRA_FLAGS
704 MAKEINFOFLAGS
705 MAKEINFO
706 PACKAGE
707 GNULIB_STDINT_H
708 CATOBJEXT
709 GENCAT
710 INSTOBJEXT
711 DATADIRNAME
712 CATALOGS
713 POSUB
714 GMSGFMT
715 XGETTEXT
716 INCINTL
717 LIBINTL_DEP
718 LIBINTL
719 USE_NLS
720 SET_MAKE
721 GMAKE_FALSE
722 GMAKE_TRUE
723 MAKE
724 CCDEPMODE
725 DEPDIR
726 am__leading_dot
727 INSTALL_STRIP_PROGRAM
728 STRIP
729 install_sh
730 target_os
731 target_vendor
732 target_cpu
733 target
734 host_os
735 host_vendor
736 host_cpu
737 host
738 build_os
739 build_vendor
740 build_cpu
741 build
742 EGREP
743 GREP
744 CPP
745 OBJEXT
746 EXEEXT
747 ac_ct_CC
748 CPPFLAGS
749 LDFLAGS
750 CFLAGS
751 CC
752 MAINT
753 MAINTAINER_MODE_FALSE
754 MAINTAINER_MODE_TRUE
755 target_alias
756 host_alias
757 build_alias
758 LIBS
759 ECHO_T
760 ECHO_N
761 ECHO_C
762 DEFS
763 mandir
764 localedir
765 libdir
766 psdir
767 pdfdir
768 dvidir
769 htmldir
770 infodir
771 docdir
772 oldincludedir
773 includedir
774 localstatedir
775 sharedstatedir
776 sysconfdir
777 datadir
778 datarootdir
779 libexecdir
780 sbindir
781 bindir
782 program_transform_name
783 prefix
784 exec_prefix
785 PACKAGE_URL
786 PACKAGE_BUGREPORT
787 PACKAGE_STRING
788 PACKAGE_VERSION
789 PACKAGE_TARNAME
790 PACKAGE_NAME
791 PATH_SEPARATOR
792 SHELL'
793 ac_subst_files='host_makefile_frag'
794 ac_user_opts='
795 enable_option_checking
796 enable_maintainer_mode
797 enable_plugins
798 enable_largefile
799 with_separate_debug_dir
800 with_gdb_datadir
801 with_relocated_sources
802 with_auto_load_dir
803 with_auto_load_safe_path
804 enable_targets
805 enable_64_bit_bfd
806 enable_gdbcli
807 enable_gdbmi
808 enable_tui
809 enable_gdbtk
810 with_libunwind_ia64
811 with_curses
812 enable_profiling
813 with_pkgversion
814 with_bugurl
815 with_zlib
816 with_libiconv_prefix
817 with_iconv_bin
818 with_system_readline
819 with_jit_reader_dir
820 with_expat
821 with_gnu_ld
822 enable_rpath
823 with_libexpat_prefix
824 with_python
825 with_guile
826 enable_libmcheck
827 with_included_regex
828 with_sysroot
829 with_system_gdbinit
830 enable_werror
831 enable_build_warnings
832 enable_gdb_build_warnings
833 with_lzma
834 with_liblzma_prefix
835 with_tcl
836 with_tk
837 with_x
838 enable_sim
839 enable_multi_ice
840 enable_gdbserver
841 with_babeltrace
842 with_libbabeltrace_prefix
843 '
844       ac_precious_vars='build_alias
845 host_alias
846 target_alias
847 CC
848 CFLAGS
849 LDFLAGS
850 LIBS
851 CPPFLAGS
852 CPP
853 MAKEINFO
854 MAKEINFOFLAGS
855 YACC
856 YFLAGS
857 XMKMF'
858 ac_subdirs_all='testsuite
859 gdbtk
860 multi-ice
861 gdbserver'
862
863 # Initialize some variables set by options.
864 ac_init_help=
865 ac_init_version=false
866 ac_unrecognized_opts=
867 ac_unrecognized_sep=
868 # The variables have the same names as the options, with
869 # dashes changed to underlines.
870 cache_file=/dev/null
871 exec_prefix=NONE
872 no_create=
873 no_recursion=
874 prefix=NONE
875 program_prefix=NONE
876 program_suffix=NONE
877 program_transform_name=s,x,x,
878 silent=
879 site=
880 srcdir=
881 verbose=
882 x_includes=NONE
883 x_libraries=NONE
884
885 # Installation directory options.
886 # These are left unexpanded so users can "make install exec_prefix=/foo"
887 # and all the variables that are supposed to be based on exec_prefix
888 # by default will actually change.
889 # Use braces instead of parens because sh, perl, etc. also accept them.
890 # (The list follows the same order as the GNU Coding Standards.)
891 bindir='${exec_prefix}/bin'
892 sbindir='${exec_prefix}/sbin'
893 libexecdir='${exec_prefix}/libexec'
894 datarootdir='${prefix}/share'
895 datadir='${datarootdir}'
896 sysconfdir='${prefix}/etc'
897 sharedstatedir='${prefix}/com'
898 localstatedir='${prefix}/var'
899 includedir='${prefix}/include'
900 oldincludedir='/usr/include'
901 docdir='${datarootdir}/doc/${PACKAGE}'
902 infodir='${datarootdir}/info'
903 htmldir='${docdir}'
904 dvidir='${docdir}'
905 pdfdir='${docdir}'
906 psdir='${docdir}'
907 libdir='${exec_prefix}/lib'
908 localedir='${datarootdir}/locale'
909 mandir='${datarootdir}/man'
910
911 ac_prev=
912 ac_dashdash=
913 for ac_option
914 do
915   # If the previous option needs an argument, assign it.
916   if test -n "$ac_prev"; then
917     eval $ac_prev=\$ac_option
918     ac_prev=
919     continue
920   fi
921
922   case $ac_option in
923   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924   *)    ac_optarg=yes ;;
925   esac
926
927   # Accept the important Cygnus configure options, so we can diagnose typos.
928
929   case $ac_dashdash$ac_option in
930   --)
931     ac_dashdash=yes ;;
932
933   -bindir | --bindir | --bindi | --bind | --bin | --bi)
934     ac_prev=bindir ;;
935   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
936     bindir=$ac_optarg ;;
937
938   -build | --build | --buil | --bui | --bu)
939     ac_prev=build_alias ;;
940   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
941     build_alias=$ac_optarg ;;
942
943   -cache-file | --cache-file | --cache-fil | --cache-fi \
944   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945     ac_prev=cache_file ;;
946   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
948     cache_file=$ac_optarg ;;
949
950   --config-cache | -C)
951     cache_file=config.cache ;;
952
953   -datadir | --datadir | --datadi | --datad)
954     ac_prev=datadir ;;
955   -datadir=* | --datadir=* | --datadi=* | --datad=*)
956     datadir=$ac_optarg ;;
957
958   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959   | --dataroo | --dataro | --datar)
960     ac_prev=datarootdir ;;
961   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963     datarootdir=$ac_optarg ;;
964
965   -disable-* | --disable-*)
966     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
967     # Reject names that are not valid shell variable names.
968     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969       as_fn_error "invalid feature name: $ac_useropt"
970     ac_useropt_orig=$ac_useropt
971     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972     case $ac_user_opts in
973       *"
974 "enable_$ac_useropt"
975 "*) ;;
976       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977          ac_unrecognized_sep=', ';;
978     esac
979     eval enable_$ac_useropt=no ;;
980
981   -docdir | --docdir | --docdi | --doc | --do)
982     ac_prev=docdir ;;
983   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984     docdir=$ac_optarg ;;
985
986   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987     ac_prev=dvidir ;;
988   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989     dvidir=$ac_optarg ;;
990
991   -enable-* | --enable-*)
992     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
993     # Reject names that are not valid shell variable names.
994     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
995       as_fn_error "invalid feature name: $ac_useropt"
996     ac_useropt_orig=$ac_useropt
997     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998     case $ac_user_opts in
999       *"
1000 "enable_$ac_useropt"
1001 "*) ;;
1002       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003          ac_unrecognized_sep=', ';;
1004     esac
1005     eval enable_$ac_useropt=\$ac_optarg ;;
1006
1007   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009   | --exec | --exe | --ex)
1010     ac_prev=exec_prefix ;;
1011   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013   | --exec=* | --exe=* | --ex=*)
1014     exec_prefix=$ac_optarg ;;
1015
1016   -gas | --gas | --ga | --g)
1017     # Obsolete; use --with-gas.
1018     with_gas=yes ;;
1019
1020   -help | --help | --hel | --he | -h)
1021     ac_init_help=long ;;
1022   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023     ac_init_help=recursive ;;
1024   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025     ac_init_help=short ;;
1026
1027   -host | --host | --hos | --ho)
1028     ac_prev=host_alias ;;
1029   -host=* | --host=* | --hos=* | --ho=*)
1030     host_alias=$ac_optarg ;;
1031
1032   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033     ac_prev=htmldir ;;
1034   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035   | --ht=*)
1036     htmldir=$ac_optarg ;;
1037
1038   -includedir | --includedir | --includedi | --included | --include \
1039   | --includ | --inclu | --incl | --inc)
1040     ac_prev=includedir ;;
1041   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042   | --includ=* | --inclu=* | --incl=* | --inc=*)
1043     includedir=$ac_optarg ;;
1044
1045   -infodir | --infodir | --infodi | --infod | --info | --inf)
1046     ac_prev=infodir ;;
1047   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1048     infodir=$ac_optarg ;;
1049
1050   -libdir | --libdir | --libdi | --libd)
1051     ac_prev=libdir ;;
1052   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1053     libdir=$ac_optarg ;;
1054
1055   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056   | --libexe | --libex | --libe)
1057     ac_prev=libexecdir ;;
1058   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059   | --libexe=* | --libex=* | --libe=*)
1060     libexecdir=$ac_optarg ;;
1061
1062   -localedir | --localedir | --localedi | --localed | --locale)
1063     ac_prev=localedir ;;
1064   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065     localedir=$ac_optarg ;;
1066
1067   -localstatedir | --localstatedir | --localstatedi | --localstated \
1068   | --localstate | --localstat | --localsta | --localst | --locals)
1069     ac_prev=localstatedir ;;
1070   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1071   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1072     localstatedir=$ac_optarg ;;
1073
1074   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075     ac_prev=mandir ;;
1076   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1077     mandir=$ac_optarg ;;
1078
1079   -nfp | --nfp | --nf)
1080     # Obsolete; use --without-fp.
1081     with_fp=no ;;
1082
1083   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1084   | --no-cr | --no-c | -n)
1085     no_create=yes ;;
1086
1087   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089     no_recursion=yes ;;
1090
1091   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093   | --oldin | --oldi | --old | --ol | --o)
1094     ac_prev=oldincludedir ;;
1095   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1098     oldincludedir=$ac_optarg ;;
1099
1100   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101     ac_prev=prefix ;;
1102   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1103     prefix=$ac_optarg ;;
1104
1105   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106   | --program-pre | --program-pr | --program-p)
1107     ac_prev=program_prefix ;;
1108   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1110     program_prefix=$ac_optarg ;;
1111
1112   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113   | --program-suf | --program-su | --program-s)
1114     ac_prev=program_suffix ;;
1115   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1117     program_suffix=$ac_optarg ;;
1118
1119   -program-transform-name | --program-transform-name \
1120   | --program-transform-nam | --program-transform-na \
1121   | --program-transform-n | --program-transform- \
1122   | --program-transform | --program-transfor \
1123   | --program-transfo | --program-transf \
1124   | --program-trans | --program-tran \
1125   | --progr-tra | --program-tr | --program-t)
1126     ac_prev=program_transform_name ;;
1127   -program-transform-name=* | --program-transform-name=* \
1128   | --program-transform-nam=* | --program-transform-na=* \
1129   | --program-transform-n=* | --program-transform-=* \
1130   | --program-transform=* | --program-transfor=* \
1131   | --program-transfo=* | --program-transf=* \
1132   | --program-trans=* | --program-tran=* \
1133   | --progr-tra=* | --program-tr=* | --program-t=*)
1134     program_transform_name=$ac_optarg ;;
1135
1136   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137     ac_prev=pdfdir ;;
1138   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139     pdfdir=$ac_optarg ;;
1140
1141   -psdir | --psdir | --psdi | --psd | --ps)
1142     ac_prev=psdir ;;
1143   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144     psdir=$ac_optarg ;;
1145
1146   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147   | -silent | --silent | --silen | --sile | --sil)
1148     silent=yes ;;
1149
1150   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151     ac_prev=sbindir ;;
1152   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153   | --sbi=* | --sb=*)
1154     sbindir=$ac_optarg ;;
1155
1156   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158   | --sharedst | --shareds | --shared | --share | --shar \
1159   | --sha | --sh)
1160     ac_prev=sharedstatedir ;;
1161   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164   | --sha=* | --sh=*)
1165     sharedstatedir=$ac_optarg ;;
1166
1167   -site | --site | --sit)
1168     ac_prev=site ;;
1169   -site=* | --site=* | --sit=*)
1170     site=$ac_optarg ;;
1171
1172   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173     ac_prev=srcdir ;;
1174   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1175     srcdir=$ac_optarg ;;
1176
1177   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178   | --syscon | --sysco | --sysc | --sys | --sy)
1179     ac_prev=sysconfdir ;;
1180   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1182     sysconfdir=$ac_optarg ;;
1183
1184   -target | --target | --targe | --targ | --tar | --ta | --t)
1185     ac_prev=target_alias ;;
1186   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1187     target_alias=$ac_optarg ;;
1188
1189   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190     verbose=yes ;;
1191
1192   -version | --version | --versio | --versi | --vers | -V)
1193     ac_init_version=: ;;
1194
1195   -with-* | --with-*)
1196     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1197     # Reject names that are not valid shell variable names.
1198     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199       as_fn_error "invalid package name: $ac_useropt"
1200     ac_useropt_orig=$ac_useropt
1201     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202     case $ac_user_opts in
1203       *"
1204 "with_$ac_useropt"
1205 "*) ;;
1206       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207          ac_unrecognized_sep=', ';;
1208     esac
1209     eval with_$ac_useropt=\$ac_optarg ;;
1210
1211   -without-* | --without-*)
1212     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1213     # Reject names that are not valid shell variable names.
1214     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1215       as_fn_error "invalid package name: $ac_useropt"
1216     ac_useropt_orig=$ac_useropt
1217     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218     case $ac_user_opts in
1219       *"
1220 "with_$ac_useropt"
1221 "*) ;;
1222       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223          ac_unrecognized_sep=', ';;
1224     esac
1225     eval with_$ac_useropt=no ;;
1226
1227   --x)
1228     # Obsolete; use --with-x.
1229     with_x=yes ;;
1230
1231   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232   | --x-incl | --x-inc | --x-in | --x-i)
1233     ac_prev=x_includes ;;
1234   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1236     x_includes=$ac_optarg ;;
1237
1238   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240     ac_prev=x_libraries ;;
1241   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1243     x_libraries=$ac_optarg ;;
1244
1245   -*) as_fn_error "unrecognized option: \`$ac_option'
1246 Try \`$0 --help' for more information."
1247     ;;
1248
1249   *=*)
1250     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251     # Reject names that are not valid shell variable names.
1252     case $ac_envvar in #(
1253       '' | [0-9]* | *[!_$as_cr_alnum]* )
1254       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1255     esac
1256     eval $ac_envvar=\$ac_optarg
1257     export $ac_envvar ;;
1258
1259   *)
1260     # FIXME: should be removed in autoconf 3.0.
1261     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1262     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1263       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1264     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1265     ;;
1266
1267   esac
1268 done
1269
1270 if test -n "$ac_prev"; then
1271   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1272   as_fn_error "missing argument to $ac_option"
1273 fi
1274
1275 if test -n "$ac_unrecognized_opts"; then
1276   case $enable_option_checking in
1277     no) ;;
1278     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1279     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280   esac
1281 fi
1282
1283 # Check all directory arguments for consistency.
1284 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285                 datadir sysconfdir sharedstatedir localstatedir includedir \
1286                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1287                 libdir localedir mandir
1288 do
1289   eval ac_val=\$$ac_var
1290   # Remove trailing slashes.
1291   case $ac_val in
1292     */ )
1293       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294       eval $ac_var=\$ac_val;;
1295   esac
1296   # Be sure to have absolute directory names.
1297   case $ac_val in
1298     [\\/$]* | ?:[\\/]* )  continue;;
1299     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1300   esac
1301   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1302 done
1303
1304 # There might be people who depend on the old broken behavior: `$host'
1305 # used to hold the argument of --host etc.
1306 # FIXME: To remove some day.
1307 build=$build_alias
1308 host=$host_alias
1309 target=$target_alias
1310
1311 # FIXME: To remove some day.
1312 if test "x$host_alias" != x; then
1313   if test "x$build_alias" = x; then
1314     cross_compiling=maybe
1315     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1316     If a cross compiler is detected then cross compile mode will be used." >&2
1317   elif test "x$build_alias" != "x$host_alias"; then
1318     cross_compiling=yes
1319   fi
1320 fi
1321
1322 ac_tool_prefix=
1323 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1324
1325 test "$silent" = yes && exec 6>/dev/null
1326
1327
1328 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1329 ac_ls_di=`ls -di .` &&
1330 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1331   as_fn_error "working directory cannot be determined"
1332 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1333   as_fn_error "pwd does not report name of working directory"
1334
1335
1336 # Find the source files, if location was not specified.
1337 if test -z "$srcdir"; then
1338   ac_srcdir_defaulted=yes
1339   # Try the directory containing this script, then the parent directory.
1340   ac_confdir=`$as_dirname -- "$as_myself" ||
1341 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1342          X"$as_myself" : 'X\(//\)[^/]' \| \
1343          X"$as_myself" : 'X\(//\)$' \| \
1344          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1345 $as_echo X"$as_myself" |
1346     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1347             s//\1/
1348             q
1349           }
1350           /^X\(\/\/\)[^/].*/{
1351             s//\1/
1352             q
1353           }
1354           /^X\(\/\/\)$/{
1355             s//\1/
1356             q
1357           }
1358           /^X\(\/\).*/{
1359             s//\1/
1360             q
1361           }
1362           s/.*/./; q'`
1363   srcdir=$ac_confdir
1364   if test ! -r "$srcdir/$ac_unique_file"; then
1365     srcdir=..
1366   fi
1367 else
1368   ac_srcdir_defaulted=no
1369 fi
1370 if test ! -r "$srcdir/$ac_unique_file"; then
1371   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1372   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1373 fi
1374 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1375 ac_abs_confdir=`(
1376         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1377         pwd)`
1378 # When building in place, set srcdir=.
1379 if test "$ac_abs_confdir" = "$ac_pwd"; then
1380   srcdir=.
1381 fi
1382 # Remove unnecessary trailing slashes from srcdir.
1383 # Double slashes in file names in object file debugging info
1384 # mess up M-x gdb in Emacs.
1385 case $srcdir in
1386 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1387 esac
1388 for ac_var in $ac_precious_vars; do
1389   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1390   eval ac_env_${ac_var}_value=\$${ac_var}
1391   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1392   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1393 done
1394
1395 #
1396 # Report the --help message.
1397 #
1398 if test "$ac_init_help" = "long"; then
1399   # Omit some internal or obsolete options to make the list less imposing.
1400   # This message is too long to be a string in the A/UX 3.1 sh.
1401   cat <<_ACEOF
1402 \`configure' configures this package to adapt to many kinds of systems.
1403
1404 Usage: $0 [OPTION]... [VAR=VALUE]...
1405
1406 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1407 VAR=VALUE.  See below for descriptions of some of the useful variables.
1408
1409 Defaults for the options are specified in brackets.
1410
1411 Configuration:
1412   -h, --help              display this help and exit
1413       --help=short        display options specific to this package
1414       --help=recursive    display the short help of all the included packages
1415   -V, --version           display version information and exit
1416   -q, --quiet, --silent   do not print \`checking...' messages
1417       --cache-file=FILE   cache test results in FILE [disabled]
1418   -C, --config-cache      alias for \`--cache-file=config.cache'
1419   -n, --no-create         do not create output files
1420       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1421
1422 Installation directories:
1423   --prefix=PREFIX         install architecture-independent files in PREFIX
1424                           [$ac_default_prefix]
1425   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1426                           [PREFIX]
1427
1428 By default, \`make install' will install all the files in
1429 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1430 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1431 for instance \`--prefix=\$HOME'.
1432
1433 For better control, use the options below.
1434
1435 Fine tuning of the installation directories:
1436   --bindir=DIR            user executables [EPREFIX/bin]
1437   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1438   --libexecdir=DIR        program executables [EPREFIX/libexec]
1439   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1440   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1441   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1442   --libdir=DIR            object code libraries [EPREFIX/lib]
1443   --includedir=DIR        C header files [PREFIX/include]
1444   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1445   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1446   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1447   --infodir=DIR           info documentation [DATAROOTDIR/info]
1448   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1449   --mandir=DIR            man documentation [DATAROOTDIR/man]
1450   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1451   --htmldir=DIR           html documentation [DOCDIR]
1452   --dvidir=DIR            dvi documentation [DOCDIR]
1453   --pdfdir=DIR            pdf documentation [DOCDIR]
1454   --psdir=DIR             ps documentation [DOCDIR]
1455 _ACEOF
1456
1457   cat <<\_ACEOF
1458
1459 Program names:
1460   --program-prefix=PREFIX            prepend PREFIX to installed program names
1461   --program-suffix=SUFFIX            append SUFFIX to installed program names
1462   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1463
1464 X features:
1465   --x-includes=DIR    X include files are in DIR
1466   --x-libraries=DIR   X library files are in DIR
1467
1468 System types:
1469   --build=BUILD     configure for building on BUILD [guessed]
1470   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1471   --target=TARGET   configure for building compilers for TARGET [HOST]
1472 _ACEOF
1473 fi
1474
1475 if test -n "$ac_init_help"; then
1476
1477   cat <<\_ACEOF
1478
1479 Optional Features:
1480   --disable-option-checking  ignore unrecognized --enable/--with options
1481   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1482   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1483   --enable-maintainer-mode  enable make rules and dependencies not useful
1484                           (and sometimes confusing) to the casual installer
1485   --enable-plugins        Enable support for plugins
1486   --disable-largefile     omit support for large files
1487   --enable-targets=TARGETS
1488                           alternative target configurations
1489   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
1490   --disable-gdbcli        disable command-line interface (CLI)
1491   --disable-gdbmi         disable machine-interface (MI)
1492   --enable-tui            enable full-screen terminal user interface (TUI)
1493   --enable-gdbtk          enable gdbtk graphical user interface (GUI)
1494   --enable-profiling      enable profiling of GDB
1495   --disable-rpath         do not hardcode runtime library paths
1496   --enable-libmcheck      Try linking with -lmcheck if available
1497   --enable-werror         treat compile warnings as errors
1498   --enable-build-warnings enable build-time compiler warnings if gcc is used
1499   --enable-gdb-build-warnings
1500                           enable GDB specific build-time compiler warnings if
1501                           gcc is used
1502   --enable-sim            link gdb with simulator
1503   --enable-multi-ice      build the multi-ice-gdb-server
1504   --enable-gdbserver      automatically build gdbserver (yes/no/auto, default
1505                           is auto)
1506
1507 Optional Packages:
1508   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1509   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1510   --with-separate-debug-dir=PATH
1511                           look for global separate debug info in this path
1512                           [LIBDIR/debug]
1513   --with-gdb-datadir=PATH look for global separate data files in this path
1514                           [DATADIR/gdb]
1515   --with-relocated-sources=PATH
1516                           automatically relocate this path for source files
1517   --with-auto-load-dir=PATH
1518                           directories from which to load auto-loaded scripts
1519                           [$debugdir:$datadir/auto-load]
1520   --with-auto-load-safe-path=PATH
1521                           directories safe to hold auto-loaded files
1522                           [--with-auto-load-dir]
1523   --without-auto-load-safe-path
1524                           do not restrict auto-loaded files locations
1525   --with-libunwind-ia64   use libunwind frame unwinding for ia64 targets
1526   --with-curses           use the curses library instead of the termcap
1527                           library
1528   --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
1529   --with-bugurl=URL       Direct users to URL to report a bug
1530   --with-zlib             include zlib support (auto/yes/no) default=auto
1531   --with-libiconv-prefix=DIR
1532                           search for libiconv in DIR/include and DIR/lib
1533   --with-iconv-bin=PATH   specify where to find the iconv program
1534   --with-system-readline  use installed readline library
1535   --with-jit-reader-dir=PATH
1536                           directory to load the JIT readers from
1537   --with-expat            include expat support (auto/yes/no)
1538   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1539   --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
1540   --without-libexpat-prefix     don't search for libexpat in includedir and libdir
1541   --with-python[=PYTHON]  include python support
1542                           (auto/yes/no/<python-program>)
1543   --with-guile[=GUILE]    include guile support
1544                           (auto/yes/no/<guile-version>/<pkg-config-program>)
1545   --without-included-regex
1546                           don't use included regex; this is the default on
1547                           systems with version 2 of the GNU C library (use
1548                           with caution on other system)
1549   --with-sysroot[=DIR]    search for usr/lib et al within DIR
1550   --with-system-gdbinit=PATH
1551                           automatically load a system-wide gdbinit file
1552   --with-lzma             support lzma compression (auto/yes/no)
1553   --with-liblzma-prefix[=DIR]  search for liblzma in DIR/include and DIR/lib
1554   --without-liblzma-prefix     don't search for liblzma in includedir and libdir
1555   --with-tcl              directory containing tcl configuration (tclConfig.sh)
1556   --with-tk               directory containing tk configuration (tkConfig.sh)
1557   --with-x                use the X Window System
1558   --with-babeltrace       include babeltrace support (auto/yes/no)
1559   --with-libbabeltrace-prefix[=DIR]  search for libbabeltrace in DIR/include and DIR/lib
1560   --without-libbabeltrace-prefix     don't search for libbabeltrace in includedir and libdir
1561
1562 Some influential environment variables:
1563   CC          C compiler command
1564   CFLAGS      C compiler flags
1565   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1566               nonstandard directory <lib dir>
1567   LIBS        libraries to pass to the linker, e.g. -l<library>
1568   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1569               you have headers in a nonstandard directory <include dir>
1570   CPP         C preprocessor
1571   MAKEINFO    Parent configure detects if it is of sufficient version.
1572   MAKEINFOFLAGS
1573               Parameters for MAKEINFO.
1574   YACC        The `Yet Another C Compiler' implementation to use. Defaults to
1575               the first program found out of: `bison -y', `byacc', `yacc'.
1576   YFLAGS      The list of arguments that will be passed by default to $YACC.
1577               This script will default YFLAGS to the empty string to avoid a
1578               default value of `-d' given by some make applications.
1579   XMKMF       Path to xmkmf, Makefile generator for X Window System
1580
1581 Use these variables to override the choices made by `configure' or to help
1582 it to find libraries and programs with nonstandard names/locations.
1583
1584 Report bugs to the package provider.
1585 _ACEOF
1586 ac_status=$?
1587 fi
1588
1589 if test "$ac_init_help" = "recursive"; then
1590   # If there are subdirs, report their specific --help.
1591   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1592     test -d "$ac_dir" ||
1593       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1594       continue
1595     ac_builddir=.
1596
1597 case "$ac_dir" in
1598 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1599 *)
1600   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1601   # A ".." for each directory in $ac_dir_suffix.
1602   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1603   case $ac_top_builddir_sub in
1604   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1605   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1606   esac ;;
1607 esac
1608 ac_abs_top_builddir=$ac_pwd
1609 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1610 # for backward compatibility:
1611 ac_top_builddir=$ac_top_build_prefix
1612
1613 case $srcdir in
1614   .)  # We are building in place.
1615     ac_srcdir=.
1616     ac_top_srcdir=$ac_top_builddir_sub
1617     ac_abs_top_srcdir=$ac_pwd ;;
1618   [\\/]* | ?:[\\/]* )  # Absolute name.
1619     ac_srcdir=$srcdir$ac_dir_suffix;
1620     ac_top_srcdir=$srcdir
1621     ac_abs_top_srcdir=$srcdir ;;
1622   *) # Relative name.
1623     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1624     ac_top_srcdir=$ac_top_build_prefix$srcdir
1625     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1626 esac
1627 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1628
1629     cd "$ac_dir" || { ac_status=$?; continue; }
1630     # Check for guested configure.
1631     if test -f "$ac_srcdir/configure.gnu"; then
1632       echo &&
1633       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1634     elif test -f "$ac_srcdir/configure"; then
1635       echo &&
1636       $SHELL "$ac_srcdir/configure" --help=recursive
1637     else
1638       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1639     fi || ac_status=$?
1640     cd "$ac_pwd" || { ac_status=$?; break; }
1641   done
1642 fi
1643
1644 test -n "$ac_init_help" && exit $ac_status
1645 if $ac_init_version; then
1646   cat <<\_ACEOF
1647 configure
1648 generated by GNU Autoconf 2.64
1649
1650 Copyright (C) 2009 Free Software Foundation, Inc.
1651 This configure script is free software; the Free Software Foundation
1652 gives unlimited permission to copy, distribute and modify it.
1653 _ACEOF
1654   exit
1655 fi
1656
1657 ## ------------------------ ##
1658 ## Autoconf initialization. ##
1659 ## ------------------------ ##
1660
1661 # ac_fn_c_try_compile LINENO
1662 # --------------------------
1663 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1664 ac_fn_c_try_compile ()
1665 {
1666   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1667   rm -f conftest.$ac_objext
1668   if { { ac_try="$ac_compile"
1669 case "(($ac_try" in
1670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1671   *) ac_try_echo=$ac_try;;
1672 esac
1673 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1674 $as_echo "$ac_try_echo"; } >&5
1675   (eval "$ac_compile") 2>conftest.err
1676   ac_status=$?
1677   if test -s conftest.err; then
1678     grep -v '^ *+' conftest.err >conftest.er1
1679     cat conftest.er1 >&5
1680     mv -f conftest.er1 conftest.err
1681   fi
1682   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1683   test $ac_status = 0; } && {
1684          test -z "$ac_c_werror_flag" ||
1685          test ! -s conftest.err
1686        } && test -s conftest.$ac_objext; then :
1687   ac_retval=0
1688 else
1689   $as_echo "$as_me: failed program was:" >&5
1690 sed 's/^/| /' conftest.$ac_ext >&5
1691
1692         ac_retval=1
1693 fi
1694   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1695   return $ac_retval
1696
1697 } # ac_fn_c_try_compile
1698
1699 # ac_fn_c_try_cpp LINENO
1700 # ----------------------
1701 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1702 ac_fn_c_try_cpp ()
1703 {
1704   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1705   if { { ac_try="$ac_cpp conftest.$ac_ext"
1706 case "(($ac_try" in
1707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708   *) ac_try_echo=$ac_try;;
1709 esac
1710 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711 $as_echo "$ac_try_echo"; } >&5
1712   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1713   ac_status=$?
1714   if test -s conftest.err; then
1715     grep -v '^ *+' conftest.err >conftest.er1
1716     cat conftest.er1 >&5
1717     mv -f conftest.er1 conftest.err
1718   fi
1719   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720   test $ac_status = 0; } >/dev/null && {
1721          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1722          test ! -s conftest.err
1723        }; then :
1724   ac_retval=0
1725 else
1726   $as_echo "$as_me: failed program was:" >&5
1727 sed 's/^/| /' conftest.$ac_ext >&5
1728
1729     ac_retval=1
1730 fi
1731   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1732   return $ac_retval
1733
1734 } # ac_fn_c_try_cpp
1735
1736 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1737 # -------------------------------------------------------
1738 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1739 # the include files in INCLUDES and setting the cache variable VAR
1740 # accordingly.
1741 ac_fn_c_check_header_mongrel ()
1742 {
1743   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1744   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1745   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1746 $as_echo_n "checking for $2... " >&6; }
1747 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1748   $as_echo_n "(cached) " >&6
1749 fi
1750 eval ac_res=\$$3
1751                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1752 $as_echo "$ac_res" >&6; }
1753 else
1754   # Is the header compilable?
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1756 $as_echo_n "checking $2 usability... " >&6; }
1757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758 /* end confdefs.h.  */
1759 $4
1760 #include <$2>
1761 _ACEOF
1762 if ac_fn_c_try_compile "$LINENO"; then :
1763   ac_header_compiler=yes
1764 else
1765   ac_header_compiler=no
1766 fi
1767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1769 $as_echo "$ac_header_compiler" >&6; }
1770
1771 # Is the header present?
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1773 $as_echo_n "checking $2 presence... " >&6; }
1774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1775 /* end confdefs.h.  */
1776 #include <$2>
1777 _ACEOF
1778 if ac_fn_c_try_cpp "$LINENO"; then :
1779   ac_header_preproc=yes
1780 else
1781   ac_header_preproc=no
1782 fi
1783 rm -f conftest.err conftest.$ac_ext
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1785 $as_echo "$ac_header_preproc" >&6; }
1786
1787 # So?  What about this header?
1788 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1789   yes:no: )
1790     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1791 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1792     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1793 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1794     ;;
1795   no:yes:* )
1796     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1797 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1798     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1799 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1800     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1801 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1802     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1803 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1804     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1805 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1806     ;;
1807 esac
1808   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1809 $as_echo_n "checking for $2... " >&6; }
1810 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1811   $as_echo_n "(cached) " >&6
1812 else
1813   eval "$3=\$ac_header_compiler"
1814 fi
1815 eval ac_res=\$$3
1816                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1817 $as_echo "$ac_res" >&6; }
1818 fi
1819   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1820
1821 } # ac_fn_c_check_header_mongrel
1822
1823 # ac_fn_c_try_run LINENO
1824 # ----------------------
1825 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1826 # that executables *can* be run.
1827 ac_fn_c_try_run ()
1828 {
1829   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830   if { { ac_try="$ac_link"
1831 case "(($ac_try" in
1832   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833   *) ac_try_echo=$ac_try;;
1834 esac
1835 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836 $as_echo "$ac_try_echo"; } >&5
1837   (eval "$ac_link") 2>&5
1838   ac_status=$?
1839   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1840   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1841   { { case "(($ac_try" in
1842   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1843   *) ac_try_echo=$ac_try;;
1844 esac
1845 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1846 $as_echo "$ac_try_echo"; } >&5
1847   (eval "$ac_try") 2>&5
1848   ac_status=$?
1849   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1850   test $ac_status = 0; }; }; then :
1851   ac_retval=0
1852 else
1853   $as_echo "$as_me: program exited with status $ac_status" >&5
1854        $as_echo "$as_me: failed program was:" >&5
1855 sed 's/^/| /' conftest.$ac_ext >&5
1856
1857        ac_retval=$ac_status
1858 fi
1859   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1860   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1861   return $ac_retval
1862
1863 } # ac_fn_c_try_run
1864
1865 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1866 # -------------------------------------------------------
1867 # Tests whether HEADER exists and can be compiled using the include files in
1868 # INCLUDES, setting the cache variable VAR accordingly.
1869 ac_fn_c_check_header_compile ()
1870 {
1871   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873 $as_echo_n "checking for $2... " >&6; }
1874 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1875   $as_echo_n "(cached) " >&6
1876 else
1877   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878 /* end confdefs.h.  */
1879 $4
1880 #include <$2>
1881 _ACEOF
1882 if ac_fn_c_try_compile "$LINENO"; then :
1883   eval "$3=yes"
1884 else
1885   eval "$3=no"
1886 fi
1887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1888 fi
1889 eval ac_res=\$$3
1890                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891 $as_echo "$ac_res" >&6; }
1892   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1893
1894 } # ac_fn_c_check_header_compile
1895
1896 # ac_fn_c_try_link LINENO
1897 # -----------------------
1898 # Try to link conftest.$ac_ext, and return whether this succeeded.
1899 ac_fn_c_try_link ()
1900 {
1901   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902   rm -f conftest.$ac_objext conftest$ac_exeext
1903   if { { ac_try="$ac_link"
1904 case "(($ac_try" in
1905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1906   *) ac_try_echo=$ac_try;;
1907 esac
1908 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1909 $as_echo "$ac_try_echo"; } >&5
1910   (eval "$ac_link") 2>conftest.err
1911   ac_status=$?
1912   if test -s conftest.err; then
1913     grep -v '^ *+' conftest.err >conftest.er1
1914     cat conftest.er1 >&5
1915     mv -f conftest.er1 conftest.err
1916   fi
1917   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1918   test $ac_status = 0; } && {
1919          test -z "$ac_c_werror_flag" ||
1920          test ! -s conftest.err
1921        } && test -s conftest$ac_exeext && {
1922          test "$cross_compiling" = yes ||
1923          $as_test_x conftest$ac_exeext
1924        }; then :
1925   ac_retval=0
1926 else
1927   $as_echo "$as_me: failed program was:" >&5
1928 sed 's/^/| /' conftest.$ac_ext >&5
1929
1930         ac_retval=1
1931 fi
1932   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1933   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1934   # interfere with the next link command; also delete a directory that is
1935   # left behind by Apple's compiler.  We do this before executing the actions.
1936   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1937   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1938   return $ac_retval
1939
1940 } # ac_fn_c_try_link
1941
1942 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1943 # --------------------------------------------
1944 # Tries to find the compile-time value of EXPR in a program that includes
1945 # INCLUDES, setting VAR accordingly. Returns whether the value could be
1946 # computed
1947 ac_fn_c_compute_int ()
1948 {
1949   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950   if test "$cross_compiling" = yes; then
1951     # Depending upon the size, compute the lo and hi bounds.
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953 /* end confdefs.h.  */
1954 $4
1955 int
1956 main ()
1957 {
1958 static int test_array [1 - 2 * !(($2) >= 0)];
1959 test_array [0] = 0
1960
1961   ;
1962   return 0;
1963 }
1964 _ACEOF
1965 if ac_fn_c_try_compile "$LINENO"; then :
1966   ac_lo=0 ac_mid=0
1967   while :; do
1968     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969 /* end confdefs.h.  */
1970 $4
1971 int
1972 main ()
1973 {
1974 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1975 test_array [0] = 0
1976
1977   ;
1978   return 0;
1979 }
1980 _ACEOF
1981 if ac_fn_c_try_compile "$LINENO"; then :
1982   ac_hi=$ac_mid; break
1983 else
1984   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1985                         if test $ac_lo -le $ac_mid; then
1986                           ac_lo= ac_hi=
1987                           break
1988                         fi
1989                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1990 fi
1991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1992   done
1993 else
1994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995 /* end confdefs.h.  */
1996 $4
1997 int
1998 main ()
1999 {
2000 static int test_array [1 - 2 * !(($2) < 0)];
2001 test_array [0] = 0
2002
2003   ;
2004   return 0;
2005 }
2006 _ACEOF
2007 if ac_fn_c_try_compile "$LINENO"; then :
2008   ac_hi=-1 ac_mid=-1
2009   while :; do
2010     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011 /* end confdefs.h.  */
2012 $4
2013 int
2014 main ()
2015 {
2016 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2017 test_array [0] = 0
2018
2019   ;
2020   return 0;
2021 }
2022 _ACEOF
2023 if ac_fn_c_try_compile "$LINENO"; then :
2024   ac_lo=$ac_mid; break
2025 else
2026   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2027                         if test $ac_mid -le $ac_hi; then
2028                           ac_lo= ac_hi=
2029                           break
2030                         fi
2031                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2032 fi
2033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034   done
2035 else
2036   ac_lo= ac_hi=
2037 fi
2038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 fi
2040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2041 # Binary search between lo and hi bounds.
2042 while test "x$ac_lo" != "x$ac_hi"; do
2043   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045 /* end confdefs.h.  */
2046 $4
2047 int
2048 main ()
2049 {
2050 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2051 test_array [0] = 0
2052
2053   ;
2054   return 0;
2055 }
2056 _ACEOF
2057 if ac_fn_c_try_compile "$LINENO"; then :
2058   ac_hi=$ac_mid
2059 else
2060   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2061 fi
2062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2063 done
2064 case $ac_lo in #((
2065 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2066 '') ac_retval=1 ;;
2067 esac
2068   else
2069     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070 /* end confdefs.h.  */
2071 $4
2072 static long int longval () { return $2; }
2073 static unsigned long int ulongval () { return $2; }
2074 #include <stdio.h>
2075 #include <stdlib.h>
2076 int
2077 main ()
2078 {
2079
2080   FILE *f = fopen ("conftest.val", "w");
2081   if (! f)
2082     return 1;
2083   if (($2) < 0)
2084     {
2085       long int i = longval ();
2086       if (i != ($2))
2087         return 1;
2088       fprintf (f, "%ld", i);
2089     }
2090   else
2091     {
2092       unsigned long int i = ulongval ();
2093       if (i != ($2))
2094         return 1;
2095       fprintf (f, "%lu", i);
2096     }
2097   /* Do not output a trailing newline, as this causes \r\n confusion
2098      on some platforms.  */
2099   return ferror (f) || fclose (f) != 0;
2100
2101   ;
2102   return 0;
2103 }
2104 _ACEOF
2105 if ac_fn_c_try_run "$LINENO"; then :
2106   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2107 else
2108   ac_retval=1
2109 fi
2110 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2111   conftest.$ac_objext conftest.beam conftest.$ac_ext
2112 rm -f conftest.val
2113
2114   fi
2115   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2116   return $ac_retval
2117
2118 } # ac_fn_c_compute_int
2119
2120 # ac_fn_c_check_func LINENO FUNC VAR
2121 # ----------------------------------
2122 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2123 ac_fn_c_check_func ()
2124 {
2125   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2126   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2127 $as_echo_n "checking for $2... " >&6; }
2128 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2129   $as_echo_n "(cached) " >&6
2130 else
2131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132 /* end confdefs.h.  */
2133 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2134    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2135 #define $2 innocuous_$2
2136
2137 /* System header to define __stub macros and hopefully few prototypes,
2138     which can conflict with char $2 (); below.
2139     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2140     <limits.h> exists even on freestanding compilers.  */
2141
2142 #ifdef __STDC__
2143 # include <limits.h>
2144 #else
2145 # include <assert.h>
2146 #endif
2147
2148 #undef $2
2149
2150 /* Override any GCC internal prototype to avoid an error.
2151    Use char because int might match the return type of a GCC
2152    builtin and then its argument prototype would still apply.  */
2153 #ifdef __cplusplus
2154 extern "C"
2155 #endif
2156 char $2 ();
2157 /* The GNU C library defines this for functions which it implements
2158     to always fail with ENOSYS.  Some functions are actually named
2159     something starting with __ and the normal name is an alias.  */
2160 #if defined __stub_$2 || defined __stub___$2
2161 choke me
2162 #endif
2163
2164 int
2165 main ()
2166 {
2167 return $2 ();
2168   ;
2169   return 0;
2170 }
2171 _ACEOF
2172 if ac_fn_c_try_link "$LINENO"; then :
2173   eval "$3=yes"
2174 else
2175   eval "$3=no"
2176 fi
2177 rm -f core conftest.err conftest.$ac_objext \
2178     conftest$ac_exeext conftest.$ac_ext
2179 fi
2180 eval ac_res=\$$3
2181                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2182 $as_echo "$ac_res" >&6; }
2183   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2184
2185 } # ac_fn_c_check_func
2186
2187 # ac_fn_c_check_decl LINENO SYMBOL VAR
2188 # ------------------------------------
2189 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2190 ac_fn_c_check_decl ()
2191 {
2192   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2193   as_decl_name=`echo $2|sed 's/ *(.*//'`
2194   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2196 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2197 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2198   $as_echo_n "(cached) " >&6
2199 else
2200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2201 /* end confdefs.h.  */
2202 $4
2203 int
2204 main ()
2205 {
2206 #ifndef $as_decl_name
2207 #ifdef __cplusplus
2208   (void) $as_decl_use;
2209 #else
2210   (void) $as_decl_name;
2211 #endif
2212 #endif
2213
2214   ;
2215   return 0;
2216 }
2217 _ACEOF
2218 if ac_fn_c_try_compile "$LINENO"; then :
2219   eval "$3=yes"
2220 else
2221   eval "$3=no"
2222 fi
2223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2224 fi
2225 eval ac_res=\$$3
2226                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227 $as_echo "$ac_res" >&6; }
2228   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229
2230 } # ac_fn_c_check_decl
2231
2232 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2233 # ----------------------------------------------------
2234 # Tries to find if the field MEMBER exists in type AGGR, after including
2235 # INCLUDES, setting cache variable VAR accordingly.
2236 ac_fn_c_check_member ()
2237 {
2238   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2240 $as_echo_n "checking for $2.$3... " >&6; }
2241 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2242   $as_echo_n "(cached) " >&6
2243 else
2244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h.  */
2246 $5
2247 int
2248 main ()
2249 {
2250 static $2 ac_aggr;
2251 if (ac_aggr.$3)
2252 return 0;
2253   ;
2254   return 0;
2255 }
2256 _ACEOF
2257 if ac_fn_c_try_compile "$LINENO"; then :
2258   eval "$4=yes"
2259 else
2260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261 /* end confdefs.h.  */
2262 $5
2263 int
2264 main ()
2265 {
2266 static $2 ac_aggr;
2267 if (sizeof ac_aggr.$3)
2268 return 0;
2269   ;
2270   return 0;
2271 }
2272 _ACEOF
2273 if ac_fn_c_try_compile "$LINENO"; then :
2274   eval "$4=yes"
2275 else
2276   eval "$4=no"
2277 fi
2278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279 fi
2280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281 fi
2282 eval ac_res=\$$4
2283                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2284 $as_echo "$ac_res" >&6; }
2285   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2286
2287 } # ac_fn_c_check_member
2288
2289 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2290 # -------------------------------------------
2291 # Tests whether TYPE exists after having included INCLUDES, setting cache
2292 # variable VAR accordingly.
2293 ac_fn_c_check_type ()
2294 {
2295   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2296   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2297 $as_echo_n "checking for $2... " >&6; }
2298 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2299   $as_echo_n "(cached) " >&6
2300 else
2301   eval "$3=no"
2302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303 /* end confdefs.h.  */
2304 $4
2305 int
2306 main ()
2307 {
2308 if (sizeof ($2))
2309          return 0;
2310   ;
2311   return 0;
2312 }
2313 _ACEOF
2314 if ac_fn_c_try_compile "$LINENO"; then :
2315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h.  */
2317 $4
2318 int
2319 main ()
2320 {
2321 if (sizeof (($2)))
2322             return 0;
2323   ;
2324   return 0;
2325 }
2326 _ACEOF
2327 if ac_fn_c_try_compile "$LINENO"; then :
2328
2329 else
2330   eval "$3=yes"
2331 fi
2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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_type
2342 cat >config.log <<_ACEOF
2343 This file contains any messages produced by compilers while
2344 running configure, to aid debugging if configure makes a mistake.
2345
2346 It was created by $as_me, which was
2347 generated by GNU Autoconf 2.64.  Invocation command line was
2348
2349   $ $0 $@
2350
2351 _ACEOF
2352 exec 5>>config.log
2353 {
2354 cat <<_ASUNAME
2355 ## --------- ##
2356 ## Platform. ##
2357 ## --------- ##
2358
2359 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2360 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2361 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2362 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2363 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2364
2365 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2366 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2367
2368 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2369 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2370 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2371 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2372 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2373 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2374 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2375
2376 _ASUNAME
2377
2378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2379 for as_dir in $PATH
2380 do
2381   IFS=$as_save_IFS
2382   test -z "$as_dir" && as_dir=.
2383     $as_echo "PATH: $as_dir"
2384   done
2385 IFS=$as_save_IFS
2386
2387 } >&5
2388
2389 cat >&5 <<_ACEOF
2390
2391
2392 ## ----------- ##
2393 ## Core tests. ##
2394 ## ----------- ##
2395
2396 _ACEOF
2397
2398
2399 # Keep a trace of the command line.
2400 # Strip out --no-create and --no-recursion so they do not pile up.
2401 # Strip out --silent because we don't want to record it for future runs.
2402 # Also quote any args containing shell meta-characters.
2403 # Make two passes to allow for proper duplicate-argument suppression.
2404 ac_configure_args=
2405 ac_configure_args0=
2406 ac_configure_args1=
2407 ac_must_keep_next=false
2408 for ac_pass in 1 2
2409 do
2410   for ac_arg
2411   do
2412     case $ac_arg in
2413     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2414     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2415     | -silent | --silent | --silen | --sile | --sil)
2416       continue ;;
2417     *\'*)
2418       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2419     esac
2420     case $ac_pass in
2421     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2422     2)
2423       as_fn_append ac_configure_args1 " '$ac_arg'"
2424       if test $ac_must_keep_next = true; then
2425         ac_must_keep_next=false # Got value, back to normal.
2426       else
2427         case $ac_arg in
2428           *=* | --config-cache | -C | -disable-* | --disable-* \
2429           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2430           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2431           | -with-* | --with-* | -without-* | --without-* | --x)
2432             case "$ac_configure_args0 " in
2433               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2434             esac
2435             ;;
2436           -* ) ac_must_keep_next=true ;;
2437         esac
2438       fi
2439       as_fn_append ac_configure_args " '$ac_arg'"
2440       ;;
2441     esac
2442   done
2443 done
2444 { ac_configure_args0=; unset ac_configure_args0;}
2445 { ac_configure_args1=; unset ac_configure_args1;}
2446
2447 # When interrupted or exit'd, cleanup temporary files, and complete
2448 # config.log.  We remove comments because anyway the quotes in there
2449 # would cause problems or look ugly.
2450 # WARNING: Use '\'' to represent an apostrophe within the trap.
2451 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2452 trap 'exit_status=$?
2453   # Save into config.log some information that might help in debugging.
2454   {
2455     echo
2456
2457     cat <<\_ASBOX
2458 ## ---------------- ##
2459 ## Cache variables. ##
2460 ## ---------------- ##
2461 _ASBOX
2462     echo
2463     # The following way of writing the cache mishandles newlines in values,
2464 (
2465   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2466     eval ac_val=\$$ac_var
2467     case $ac_val in #(
2468     *${as_nl}*)
2469       case $ac_var in #(
2470       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2471 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2472       esac
2473       case $ac_var in #(
2474       _ | IFS | as_nl) ;; #(
2475       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2476       *) { eval $ac_var=; unset $ac_var;} ;;
2477       esac ;;
2478     esac
2479   done
2480   (set) 2>&1 |
2481     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2482     *${as_nl}ac_space=\ *)
2483       sed -n \
2484         "s/'\''/'\''\\\\'\'''\''/g;
2485           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2486       ;; #(
2487     *)
2488       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2489       ;;
2490     esac |
2491     sort
2492 )
2493     echo
2494
2495     cat <<\_ASBOX
2496 ## ----------------- ##
2497 ## Output variables. ##
2498 ## ----------------- ##
2499 _ASBOX
2500     echo
2501     for ac_var in $ac_subst_vars
2502     do
2503       eval ac_val=\$$ac_var
2504       case $ac_val in
2505       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2506       esac
2507       $as_echo "$ac_var='\''$ac_val'\''"
2508     done | sort
2509     echo
2510
2511     if test -n "$ac_subst_files"; then
2512       cat <<\_ASBOX
2513 ## ------------------- ##
2514 ## File substitutions. ##
2515 ## ------------------- ##
2516 _ASBOX
2517       echo
2518       for ac_var in $ac_subst_files
2519       do
2520         eval ac_val=\$$ac_var
2521         case $ac_val in
2522         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2523         esac
2524         $as_echo "$ac_var='\''$ac_val'\''"
2525       done | sort
2526       echo
2527     fi
2528
2529     if test -s confdefs.h; then
2530       cat <<\_ASBOX
2531 ## ----------- ##
2532 ## confdefs.h. ##
2533 ## ----------- ##
2534 _ASBOX
2535       echo
2536       cat confdefs.h
2537       echo
2538     fi
2539     test "$ac_signal" != 0 &&
2540       $as_echo "$as_me: caught signal $ac_signal"
2541     $as_echo "$as_me: exit $exit_status"
2542   } >&5
2543   rm -f core *.core core.conftest.* &&
2544     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2545     exit $exit_status
2546 ' 0
2547 for ac_signal in 1 2 13 15; do
2548   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2549 done
2550 ac_signal=0
2551
2552 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2553 rm -f -r conftest* confdefs.h
2554
2555 $as_echo "/* confdefs.h */" > confdefs.h
2556
2557 # Predefined preprocessor variables.
2558
2559 cat >>confdefs.h <<_ACEOF
2560 #define PACKAGE_NAME "$PACKAGE_NAME"
2561 _ACEOF
2562
2563 cat >>confdefs.h <<_ACEOF
2564 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2565 _ACEOF
2566
2567 cat >>confdefs.h <<_ACEOF
2568 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2569 _ACEOF
2570
2571 cat >>confdefs.h <<_ACEOF
2572 #define PACKAGE_STRING "$PACKAGE_STRING"
2573 _ACEOF
2574
2575 cat >>confdefs.h <<_ACEOF
2576 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2577 _ACEOF
2578
2579 cat >>confdefs.h <<_ACEOF
2580 #define PACKAGE_URL "$PACKAGE_URL"
2581 _ACEOF
2582
2583
2584 # Let the site file select an alternate cache file if it wants to.
2585 # Prefer an explicitly selected file to automatically selected ones.
2586 ac_site_file1=NONE
2587 ac_site_file2=NONE
2588 if test -n "$CONFIG_SITE"; then
2589   ac_site_file1=$CONFIG_SITE
2590 elif test "x$prefix" != xNONE; then
2591   ac_site_file1=$prefix/share/config.site
2592   ac_site_file2=$prefix/etc/config.site
2593 else
2594   ac_site_file1=$ac_default_prefix/share/config.site
2595   ac_site_file2=$ac_default_prefix/etc/config.site
2596 fi
2597 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2598 do
2599   test "x$ac_site_file" = xNONE && continue
2600   if test -r "$ac_site_file"; then
2601     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2602 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2603     sed 's/^/| /' "$ac_site_file" >&5
2604     . "$ac_site_file"
2605   fi
2606 done
2607
2608 if test -r "$cache_file"; then
2609   # Some versions of bash will fail to source /dev/null (special
2610   # files actually), so we avoid doing that.
2611   if test -f "$cache_file"; then
2612     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2613 $as_echo "$as_me: loading cache $cache_file" >&6;}
2614     case $cache_file in
2615       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2616       *)                      . "./$cache_file";;
2617     esac
2618   fi
2619 else
2620   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2621 $as_echo "$as_me: creating cache $cache_file" >&6;}
2622   >$cache_file
2623 fi
2624
2625 # Check that the precious variables saved in the cache have kept the same
2626 # value.
2627 ac_cache_corrupted=false
2628 for ac_var in $ac_precious_vars; do
2629   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2630   eval ac_new_set=\$ac_env_${ac_var}_set
2631   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2632   eval ac_new_val=\$ac_env_${ac_var}_value
2633   case $ac_old_set,$ac_new_set in
2634     set,)
2635       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2636 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2637       ac_cache_corrupted=: ;;
2638     ,set)
2639       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2640 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2641       ac_cache_corrupted=: ;;
2642     ,);;
2643     *)
2644       if test "x$ac_old_val" != "x$ac_new_val"; then
2645         # differences in whitespace do not lead to failure.
2646         ac_old_val_w=`echo x $ac_old_val`
2647         ac_new_val_w=`echo x $ac_new_val`
2648         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2649           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2650 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2651           ac_cache_corrupted=:
2652         else
2653           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2654 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2655           eval $ac_var=\$ac_old_val
2656         fi
2657         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2658 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2659         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2660 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2661       fi;;
2662   esac
2663   # Pass precious variables to config.status.
2664   if test "$ac_new_set" = set; then
2665     case $ac_new_val in
2666     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2667     *) ac_arg=$ac_var=$ac_new_val ;;
2668     esac
2669     case " $ac_configure_args " in
2670       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2671       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2672     esac
2673   fi
2674 done
2675 if $ac_cache_corrupted; then
2676   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2677 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2678   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2679 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2680   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2681 fi
2682 ## -------------------- ##
2683 ## Main body of script. ##
2684 ## -------------------- ##
2685
2686 ac_ext=c
2687 ac_cpp='$CPP $CPPFLAGS'
2688 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2689 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2690 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2691
2692
2693
2694
2695
2696 ac_config_headers="$ac_config_headers config.h:config.in"
2697
2698
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2700 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2701     # Check whether --enable-maintainer-mode was given.
2702 if test "${enable_maintainer_mode+set}" = set; then :
2703   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2704 else
2705   USE_MAINTAINER_MODE=no
2706 fi
2707
2708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2709 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2710    if test $USE_MAINTAINER_MODE = yes; then
2711   MAINTAINER_MODE_TRUE=
2712   MAINTAINER_MODE_FALSE='#'
2713 else
2714   MAINTAINER_MODE_TRUE='#'
2715   MAINTAINER_MODE_FALSE=
2716 fi
2717
2718   MAINT=$MAINTAINER_MODE_TRUE
2719
2720
2721
2722 # Set the 'development' global.
2723 . $srcdir/../bfd/development.sh
2724
2725 ac_ext=c
2726 ac_cpp='$CPP $CPPFLAGS'
2727 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2730 if test -n "$ac_tool_prefix"; then
2731   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2732 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2734 $as_echo_n "checking for $ac_word... " >&6; }
2735 if test "${ac_cv_prog_CC+set}" = set; then :
2736   $as_echo_n "(cached) " >&6
2737 else
2738   if test -n "$CC"; then
2739   ac_cv_prog_CC="$CC" # Let the user override the test.
2740 else
2741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2742 for as_dir in $PATH
2743 do
2744   IFS=$as_save_IFS
2745   test -z "$as_dir" && as_dir=.
2746     for ac_exec_ext in '' $ac_executable_extensions; do
2747   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2748     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2750     break 2
2751   fi
2752 done
2753   done
2754 IFS=$as_save_IFS
2755
2756 fi
2757 fi
2758 CC=$ac_cv_prog_CC
2759 if test -n "$CC"; then
2760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2761 $as_echo "$CC" >&6; }
2762 else
2763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2764 $as_echo "no" >&6; }
2765 fi
2766
2767
2768 fi
2769 if test -z "$ac_cv_prog_CC"; then
2770   ac_ct_CC=$CC
2771   # Extract the first word of "gcc", so it can be a program name with args.
2772 set dummy gcc; ac_word=$2
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2774 $as_echo_n "checking for $ac_word... " >&6; }
2775 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2776   $as_echo_n "(cached) " >&6
2777 else
2778   if test -n "$ac_ct_CC"; then
2779   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2780 else
2781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782 for as_dir in $PATH
2783 do
2784   IFS=$as_save_IFS
2785   test -z "$as_dir" && as_dir=.
2786     for ac_exec_ext in '' $ac_executable_extensions; do
2787   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2788     ac_cv_prog_ac_ct_CC="gcc"
2789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2790     break 2
2791   fi
2792 done
2793   done
2794 IFS=$as_save_IFS
2795
2796 fi
2797 fi
2798 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2799 if test -n "$ac_ct_CC"; then
2800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2801 $as_echo "$ac_ct_CC" >&6; }
2802 else
2803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2804 $as_echo "no" >&6; }
2805 fi
2806
2807   if test "x$ac_ct_CC" = x; then
2808     CC=""
2809   else
2810     case $cross_compiling:$ac_tool_warned in
2811 yes:)
2812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2813 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2814 ac_tool_warned=yes ;;
2815 esac
2816     CC=$ac_ct_CC
2817   fi
2818 else
2819   CC="$ac_cv_prog_CC"
2820 fi
2821
2822 if test -z "$CC"; then
2823           if test -n "$ac_tool_prefix"; then
2824     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2825 set dummy ${ac_tool_prefix}cc; ac_word=$2
2826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2827 $as_echo_n "checking for $ac_word... " >&6; }
2828 if test "${ac_cv_prog_CC+set}" = set; then :
2829   $as_echo_n "(cached) " >&6
2830 else
2831   if test -n "$CC"; then
2832   ac_cv_prog_CC="$CC" # Let the user override the test.
2833 else
2834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2835 for as_dir in $PATH
2836 do
2837   IFS=$as_save_IFS
2838   test -z "$as_dir" && as_dir=.
2839     for ac_exec_ext in '' $ac_executable_extensions; do
2840   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2841     ac_cv_prog_CC="${ac_tool_prefix}cc"
2842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2843     break 2
2844   fi
2845 done
2846   done
2847 IFS=$as_save_IFS
2848
2849 fi
2850 fi
2851 CC=$ac_cv_prog_CC
2852 if test -n "$CC"; then
2853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2854 $as_echo "$CC" >&6; }
2855 else
2856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2857 $as_echo "no" >&6; }
2858 fi
2859
2860
2861   fi
2862 fi
2863 if test -z "$CC"; then
2864   # Extract the first word of "cc", so it can be a program name with args.
2865 set dummy cc; ac_word=$2
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2867 $as_echo_n "checking for $ac_word... " >&6; }
2868 if test "${ac_cv_prog_CC+set}" = set; then :
2869   $as_echo_n "(cached) " >&6
2870 else
2871   if test -n "$CC"; then
2872   ac_cv_prog_CC="$CC" # Let the user override the test.
2873 else
2874   ac_prog_rejected=no
2875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2876 for as_dir in $PATH
2877 do
2878   IFS=$as_save_IFS
2879   test -z "$as_dir" && as_dir=.
2880     for ac_exec_ext in '' $ac_executable_extensions; do
2881   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2882     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2883        ac_prog_rejected=yes
2884        continue
2885      fi
2886     ac_cv_prog_CC="cc"
2887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2888     break 2
2889   fi
2890 done
2891   done
2892 IFS=$as_save_IFS
2893
2894 if test $ac_prog_rejected = yes; then
2895   # We found a bogon in the path, so make sure we never use it.
2896   set dummy $ac_cv_prog_CC
2897   shift
2898   if test $# != 0; then
2899     # We chose a different compiler from the bogus one.
2900     # However, it has the same basename, so the bogon will be chosen
2901     # first if we set CC to just the basename; use the full file name.
2902     shift
2903     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2904   fi
2905 fi
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 if test -z "$CC"; then
2920   if test -n "$ac_tool_prefix"; then
2921   for ac_prog in cl.exe
2922   do
2923     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2924 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2926 $as_echo_n "checking for $ac_word... " >&6; }
2927 if test "${ac_cv_prog_CC+set}" = set; then :
2928   $as_echo_n "(cached) " >&6
2929 else
2930   if test -n "$CC"; then
2931   ac_cv_prog_CC="$CC" # Let the user override the test.
2932 else
2933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2934 for as_dir in $PATH
2935 do
2936   IFS=$as_save_IFS
2937   test -z "$as_dir" && as_dir=.
2938     for ac_exec_ext in '' $ac_executable_extensions; do
2939   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2940     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2942     break 2
2943   fi
2944 done
2945   done
2946 IFS=$as_save_IFS
2947
2948 fi
2949 fi
2950 CC=$ac_cv_prog_CC
2951 if test -n "$CC"; then
2952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2953 $as_echo "$CC" >&6; }
2954 else
2955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2956 $as_echo "no" >&6; }
2957 fi
2958
2959
2960     test -n "$CC" && break
2961   done
2962 fi
2963 if test -z "$CC"; then
2964   ac_ct_CC=$CC
2965   for ac_prog in cl.exe
2966 do
2967   # Extract the first word of "$ac_prog", so it can be a program name with args.
2968 set dummy $ac_prog; ac_word=$2
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2970 $as_echo_n "checking for $ac_word... " >&6; }
2971 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2972   $as_echo_n "(cached) " >&6
2973 else
2974   if test -n "$ac_ct_CC"; then
2975   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2976 else
2977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2978 for as_dir in $PATH
2979 do
2980   IFS=$as_save_IFS
2981   test -z "$as_dir" && as_dir=.
2982     for ac_exec_ext in '' $ac_executable_extensions; do
2983   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2984     ac_cv_prog_ac_ct_CC="$ac_prog"
2985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2986     break 2
2987   fi
2988 done
2989   done
2990 IFS=$as_save_IFS
2991
2992 fi
2993 fi
2994 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2995 if test -n "$ac_ct_CC"; then
2996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2997 $as_echo "$ac_ct_CC" >&6; }
2998 else
2999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3000 $as_echo "no" >&6; }
3001 fi
3002
3003
3004   test -n "$ac_ct_CC" && break
3005 done
3006
3007   if test "x$ac_ct_CC" = x; then
3008     CC=""
3009   else
3010     case $cross_compiling:$ac_tool_warned in
3011 yes:)
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3013 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3014 ac_tool_warned=yes ;;
3015 esac
3016     CC=$ac_ct_CC
3017   fi
3018 fi
3019
3020 fi
3021
3022
3023 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3024 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3025 as_fn_error "no acceptable C compiler found in \$PATH
3026 See \`config.log' for more details." "$LINENO" 5; }
3027
3028 # Provide some information about the compiler.
3029 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3030 set X $ac_compile
3031 ac_compiler=$2
3032 for ac_option in --version -v -V -qversion; do
3033   { { ac_try="$ac_compiler $ac_option >&5"
3034 case "(($ac_try" in
3035   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3036   *) ac_try_echo=$ac_try;;
3037 esac
3038 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3039 $as_echo "$ac_try_echo"; } >&5
3040   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3041   ac_status=$?
3042   if test -s conftest.err; then
3043     sed '10a\
3044 ... rest of stderr output deleted ...
3045          10q' conftest.err >conftest.er1
3046     cat conftest.er1 >&5
3047     rm -f conftest.er1 conftest.err
3048   fi
3049   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3050   test $ac_status = 0; }
3051 done
3052
3053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3054 /* end confdefs.h.  */
3055
3056 int
3057 main ()
3058 {
3059
3060   ;
3061   return 0;
3062 }
3063 _ACEOF
3064 ac_clean_files_save=$ac_clean_files
3065 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3066 # Try to create an executable without -o first, disregard a.out.
3067 # It will help us diagnose broken compilers, and finding out an intuition
3068 # of exeext.
3069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3070 $as_echo_n "checking for C compiler default output file name... " >&6; }
3071 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3072
3073 # The possible output files:
3074 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3075
3076 ac_rmfiles=
3077 for ac_file in $ac_files
3078 do
3079   case $ac_file in
3080     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3081     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3082   esac
3083 done
3084 rm -f $ac_rmfiles
3085
3086 if { { ac_try="$ac_link_default"
3087 case "(($ac_try" in
3088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3089   *) ac_try_echo=$ac_try;;
3090 esac
3091 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3092 $as_echo "$ac_try_echo"; } >&5
3093   (eval "$ac_link_default") 2>&5
3094   ac_status=$?
3095   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3096   test $ac_status = 0; }; then :
3097   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3098 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3099 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3100 # so that the user can short-circuit this test for compilers unknown to
3101 # Autoconf.
3102 for ac_file in $ac_files ''
3103 do
3104   test -f "$ac_file" || continue
3105   case $ac_file in
3106     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3107         ;;
3108     [ab].out )
3109         # We found the default executable, but exeext='' is most
3110         # certainly right.
3111         break;;
3112     *.* )
3113         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3114         then :; else
3115            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3116         fi
3117         # We set ac_cv_exeext here because the later test for it is not
3118         # safe: cross compilers may not add the suffix if given an `-o'
3119         # argument, so we may need to know it at that point already.
3120         # Even if this section looks crufty: it has the advantage of
3121         # actually working.
3122         break;;
3123     * )
3124         break;;
3125   esac
3126 done
3127 test "$ac_cv_exeext" = no && ac_cv_exeext=
3128
3129 else
3130   ac_file=''
3131 fi
3132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3133 $as_echo "$ac_file" >&6; }
3134 if test -z "$ac_file"; then :
3135   $as_echo "$as_me: failed program was:" >&5
3136 sed 's/^/| /' conftest.$ac_ext >&5
3137
3138 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3139 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3140 { as_fn_set_status 77
3141 as_fn_error "C compiler cannot create executables
3142 See \`config.log' for more details." "$LINENO" 5; }; }
3143 fi
3144 ac_exeext=$ac_cv_exeext
3145
3146 # Check that the compiler produces executables we can run.  If not, either
3147 # the compiler is broken, or we cross compile.
3148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3149 $as_echo_n "checking whether the C compiler works... " >&6; }
3150 # If not cross compiling, check that we can run a simple program.
3151 if test "$cross_compiling" != yes; then
3152   if { ac_try='./$ac_file'
3153   { { case "(($ac_try" in
3154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3155   *) ac_try_echo=$ac_try;;
3156 esac
3157 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3158 $as_echo "$ac_try_echo"; } >&5
3159   (eval "$ac_try") 2>&5
3160   ac_status=$?
3161   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3162   test $ac_status = 0; }; }; then
3163     cross_compiling=no
3164   else
3165     if test "$cross_compiling" = maybe; then
3166         cross_compiling=yes
3167     else
3168         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3169 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3170 as_fn_error "cannot run C compiled programs.
3171 If you meant to cross compile, use \`--host'.
3172 See \`config.log' for more details." "$LINENO" 5; }
3173     fi
3174   fi
3175 fi
3176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3177 $as_echo "yes" >&6; }
3178
3179 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3180 ac_clean_files=$ac_clean_files_save
3181 # Check that the compiler produces executables we can run.  If not, either
3182 # the compiler is broken, or we cross compile.
3183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3184 $as_echo_n "checking whether we are cross compiling... " >&6; }
3185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3186 $as_echo "$cross_compiling" >&6; }
3187
3188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3189 $as_echo_n "checking for suffix of executables... " >&6; }
3190 if { { ac_try="$ac_link"
3191 case "(($ac_try" in
3192   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3193   *) ac_try_echo=$ac_try;;
3194 esac
3195 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3196 $as_echo "$ac_try_echo"; } >&5
3197   (eval "$ac_link") 2>&5
3198   ac_status=$?
3199   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3200   test $ac_status = 0; }; then :
3201   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3202 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3203 # work properly (i.e., refer to `conftest.exe'), while it won't with
3204 # `rm'.
3205 for ac_file in conftest.exe conftest conftest.*; do
3206   test -f "$ac_file" || continue
3207   case $ac_file in
3208     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3209     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3210           break;;
3211     * ) break;;
3212   esac
3213 done
3214 else
3215   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3216 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3217 as_fn_error "cannot compute suffix of executables: cannot compile and link
3218 See \`config.log' for more details." "$LINENO" 5; }
3219 fi
3220 rm -f conftest$ac_cv_exeext
3221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3222 $as_echo "$ac_cv_exeext" >&6; }
3223
3224 rm -f conftest.$ac_ext
3225 EXEEXT=$ac_cv_exeext
3226 ac_exeext=$EXEEXT
3227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3228 $as_echo_n "checking for suffix of object files... " >&6; }
3229 if test "${ac_cv_objext+set}" = set; then :
3230   $as_echo_n "(cached) " >&6
3231 else
3232   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3233 /* end confdefs.h.  */
3234
3235 int
3236 main ()
3237 {
3238
3239   ;
3240   return 0;
3241 }
3242 _ACEOF
3243 rm -f conftest.o conftest.obj
3244 if { { ac_try="$ac_compile"
3245 case "(($ac_try" in
3246   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3247   *) ac_try_echo=$ac_try;;
3248 esac
3249 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3250 $as_echo "$ac_try_echo"; } >&5
3251   (eval "$ac_compile") 2>&5
3252   ac_status=$?
3253   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3254   test $ac_status = 0; }; then :
3255   for ac_file in conftest.o conftest.obj conftest.*; do
3256   test -f "$ac_file" || continue;
3257   case $ac_file in
3258     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3259     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3260        break;;
3261   esac
3262 done
3263 else
3264   $as_echo "$as_me: failed program was:" >&5
3265 sed 's/^/| /' conftest.$ac_ext >&5
3266
3267 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3268 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3269 as_fn_error "cannot compute suffix of object files: cannot compile
3270 See \`config.log' for more details." "$LINENO" 5; }
3271 fi
3272 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3273 fi
3274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3275 $as_echo "$ac_cv_objext" >&6; }
3276 OBJEXT=$ac_cv_objext
3277 ac_objext=$OBJEXT
3278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3279 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3280 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3281   $as_echo_n "(cached) " >&6
3282 else
3283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3284 /* end confdefs.h.  */
3285
3286 int
3287 main ()
3288 {
3289 #ifndef __GNUC__
3290        choke me
3291 #endif
3292
3293   ;
3294   return 0;
3295 }
3296 _ACEOF
3297 if ac_fn_c_try_compile "$LINENO"; then :
3298   ac_compiler_gnu=yes
3299 else
3300   ac_compiler_gnu=no
3301 fi
3302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3303 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3304
3305 fi
3306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3307 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3308 if test $ac_compiler_gnu = yes; then
3309   GCC=yes
3310 else
3311   GCC=
3312 fi
3313 ac_test_CFLAGS=${CFLAGS+set}
3314 ac_save_CFLAGS=$CFLAGS
3315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3316 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3317 if test "${ac_cv_prog_cc_g+set}" = set; then :
3318   $as_echo_n "(cached) " >&6
3319 else
3320   ac_save_c_werror_flag=$ac_c_werror_flag
3321    ac_c_werror_flag=yes
3322    ac_cv_prog_cc_g=no
3323    CFLAGS="-g"
3324    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3325 /* end confdefs.h.  */
3326
3327 int
3328 main ()
3329 {
3330
3331   ;
3332   return 0;
3333 }
3334 _ACEOF
3335 if ac_fn_c_try_compile "$LINENO"; then :
3336   ac_cv_prog_cc_g=yes
3337 else
3338   CFLAGS=""
3339       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3340 /* end confdefs.h.  */
3341
3342 int
3343 main ()
3344 {
3345
3346   ;
3347   return 0;
3348 }
3349 _ACEOF
3350 if ac_fn_c_try_compile "$LINENO"; then :
3351
3352 else
3353   ac_c_werror_flag=$ac_save_c_werror_flag
3354          CFLAGS="-g"
3355          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3356 /* end confdefs.h.  */
3357
3358 int
3359 main ()
3360 {
3361
3362   ;
3363   return 0;
3364 }
3365 _ACEOF
3366 if ac_fn_c_try_compile "$LINENO"; then :
3367   ac_cv_prog_cc_g=yes
3368 fi
3369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3370 fi
3371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3372 fi
3373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3374    ac_c_werror_flag=$ac_save_c_werror_flag
3375 fi
3376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3377 $as_echo "$ac_cv_prog_cc_g" >&6; }
3378 if test "$ac_test_CFLAGS" = set; then
3379   CFLAGS=$ac_save_CFLAGS
3380 elif test $ac_cv_prog_cc_g = yes; then
3381   if test "$GCC" = yes; then
3382     CFLAGS="-g -O2"
3383   else
3384     CFLAGS="-g"
3385   fi
3386 else
3387   if test "$GCC" = yes; then
3388     CFLAGS="-O2"
3389   else
3390     CFLAGS=
3391   fi
3392 fi
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3394 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3395 if test "${ac_cv_prog_cc_c89+set}" = set; then :
3396   $as_echo_n "(cached) " >&6
3397 else
3398   ac_cv_prog_cc_c89=no
3399 ac_save_CC=$CC
3400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3401 /* end confdefs.h.  */
3402 #include <stdarg.h>
3403 #include <stdio.h>
3404 #include <sys/types.h>
3405 #include <sys/stat.h>
3406 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3407 struct buf { int x; };
3408 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3409 static char *e (p, i)
3410      char **p;
3411      int i;
3412 {
3413   return p[i];
3414 }
3415 static char *f (char * (*g) (char **, int), char **p, ...)
3416 {
3417   char *s;
3418   va_list v;
3419   va_start (v,p);
3420   s = g (p, va_arg (v,int));
3421   va_end (v);
3422   return s;
3423 }
3424
3425 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3426    function prototypes and stuff, but not '\xHH' hex character constants.
3427    These don't provoke an error unfortunately, instead are silently treated
3428    as 'x'.  The following induces an error, until -std is added to get
3429    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3430    array size at least.  It's necessary to write '\x00'==0 to get something
3431    that's true only with -std.  */
3432 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3433
3434 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3435    inside strings and character constants.  */
3436 #define FOO(x) 'x'
3437 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3438
3439 int test (int i, double x);
3440 struct s1 {int (*f) (int a);};
3441 struct s2 {int (*f) (double a);};
3442 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3443 int argc;
3444 char **argv;
3445 int
3446 main ()
3447 {
3448 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3449   ;
3450   return 0;
3451 }
3452 _ACEOF
3453 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3454         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3455 do
3456   CC="$ac_save_CC $ac_arg"
3457   if ac_fn_c_try_compile "$LINENO"; then :
3458   ac_cv_prog_cc_c89=$ac_arg
3459 fi
3460 rm -f core conftest.err conftest.$ac_objext
3461   test "x$ac_cv_prog_cc_c89" != "xno" && break
3462 done
3463 rm -f conftest.$ac_ext
3464 CC=$ac_save_CC
3465
3466 fi
3467 # AC_CACHE_VAL
3468 case "x$ac_cv_prog_cc_c89" in
3469   x)
3470     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3471 $as_echo "none needed" >&6; } ;;
3472   xno)
3473     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3474 $as_echo "unsupported" >&6; } ;;
3475   *)
3476     CC="$CC $ac_cv_prog_cc_c89"
3477     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3478 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3479 esac
3480 if test "x$ac_cv_prog_cc_c89" != xno; then :
3481
3482 fi
3483
3484 ac_ext=c
3485 ac_cpp='$CPP $CPPFLAGS'
3486 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3487 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3488 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3489
3490
3491 ac_ext=c
3492 ac_cpp='$CPP $CPPFLAGS'
3493 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3494 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3495 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3497 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3498 # On Suns, sometimes $CPP names a directory.
3499 if test -n "$CPP" && test -d "$CPP"; then
3500   CPP=
3501 fi
3502 if test -z "$CPP"; then
3503   if test "${ac_cv_prog_CPP+set}" = set; then :
3504   $as_echo_n "(cached) " >&6
3505 else
3506       # Double quotes because CPP needs to be expanded
3507     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3508     do
3509       ac_preproc_ok=false
3510 for ac_c_preproc_warn_flag in '' yes
3511 do
3512   # Use a header file that comes with gcc, so configuring glibc
3513   # with a fresh cross-compiler works.
3514   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3515   # <limits.h> exists even on freestanding compilers.
3516   # On the NeXT, cc -E runs the code through the compiler's parser,
3517   # not just through cpp. "Syntax error" is here to catch this case.
3518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3519 /* end confdefs.h.  */
3520 #ifdef __STDC__
3521 # include <limits.h>
3522 #else
3523 # include <assert.h>
3524 #endif
3525                      Syntax error
3526 _ACEOF
3527 if ac_fn_c_try_cpp "$LINENO"; then :
3528
3529 else
3530   # Broken: fails on valid input.
3531 continue
3532 fi
3533 rm -f conftest.err conftest.$ac_ext
3534
3535   # OK, works on sane cases.  Now check whether nonexistent headers
3536   # can be detected and how.
3537   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3538 /* end confdefs.h.  */
3539 #include <ac_nonexistent.h>
3540 _ACEOF
3541 if ac_fn_c_try_cpp "$LINENO"; then :
3542   # Broken: success on invalid input.
3543 continue
3544 else
3545   # Passes both tests.
3546 ac_preproc_ok=:
3547 break
3548 fi
3549 rm -f conftest.err conftest.$ac_ext
3550
3551 done
3552 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553 rm -f conftest.err conftest.$ac_ext
3554 if $ac_preproc_ok; then :
3555   break
3556 fi
3557
3558     done
3559     ac_cv_prog_CPP=$CPP
3560
3561 fi
3562   CPP=$ac_cv_prog_CPP
3563 else
3564   ac_cv_prog_CPP=$CPP
3565 fi
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3567 $as_echo "$CPP" >&6; }
3568 ac_preproc_ok=false
3569 for ac_c_preproc_warn_flag in '' yes
3570 do
3571   # Use a header file that comes with gcc, so configuring glibc
3572   # with a fresh cross-compiler works.
3573   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3574   # <limits.h> exists even on freestanding compilers.
3575   # On the NeXT, cc -E runs the code through the compiler's parser,
3576   # not just through cpp. "Syntax error" is here to catch this case.
3577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3578 /* end confdefs.h.  */
3579 #ifdef __STDC__
3580 # include <limits.h>
3581 #else
3582 # include <assert.h>
3583 #endif
3584                      Syntax error
3585 _ACEOF
3586 if ac_fn_c_try_cpp "$LINENO"; then :
3587
3588 else
3589   # Broken: fails on valid input.
3590 continue
3591 fi
3592 rm -f conftest.err conftest.$ac_ext
3593
3594   # OK, works on sane cases.  Now check whether nonexistent headers
3595   # can be detected and how.
3596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3597 /* end confdefs.h.  */
3598 #include <ac_nonexistent.h>
3599 _ACEOF
3600 if ac_fn_c_try_cpp "$LINENO"; then :
3601   # Broken: success on invalid input.
3602 continue
3603 else
3604   # Passes both tests.
3605 ac_preproc_ok=:
3606 break
3607 fi
3608 rm -f conftest.err conftest.$ac_ext
3609
3610 done
3611 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3612 rm -f conftest.err conftest.$ac_ext
3613 if $ac_preproc_ok; then :
3614
3615 else
3616   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3617 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3618 as_fn_error "C preprocessor \"$CPP\" fails sanity check
3619 See \`config.log' for more details." "$LINENO" 5; }
3620 fi
3621
3622 ac_ext=c
3623 ac_cpp='$CPP $CPPFLAGS'
3624 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3625 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3626 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3627
3628
3629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3630 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3631 if test "${ac_cv_path_GREP+set}" = set; then :
3632   $as_echo_n "(cached) " >&6
3633 else
3634   if test -z "$GREP"; then
3635   ac_path_GREP_found=false
3636   # Loop through the user's path and test for each of PROGNAME-LIST
3637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3639 do
3640   IFS=$as_save_IFS
3641   test -z "$as_dir" && as_dir=.
3642     for ac_prog in grep ggrep; do
3643     for ac_exec_ext in '' $ac_executable_extensions; do
3644       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3645       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3646 # Check for GNU ac_path_GREP and select it if it is found.
3647   # Check for GNU $ac_path_GREP
3648 case `"$ac_path_GREP" --version 2>&1` in
3649 *GNU*)
3650   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3651 *)
3652   ac_count=0
3653   $as_echo_n 0123456789 >"conftest.in"
3654   while :
3655   do
3656     cat "conftest.in" "conftest.in" >"conftest.tmp"
3657     mv "conftest.tmp" "conftest.in"
3658     cp "conftest.in" "conftest.nl"
3659     $as_echo 'GREP' >> "conftest.nl"
3660     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3661     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3662     as_fn_arith $ac_count + 1 && ac_count=$as_val
3663     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3664       # Best one so far, save it but keep looking for a better one
3665       ac_cv_path_GREP="$ac_path_GREP"
3666       ac_path_GREP_max=$ac_count
3667     fi
3668     # 10*(2^10) chars as input seems more than enough
3669     test $ac_count -gt 10 && break
3670   done
3671   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3672 esac
3673
3674       $ac_path_GREP_found && break 3
3675     done
3676   done
3677   done
3678 IFS=$as_save_IFS
3679   if test -z "$ac_cv_path_GREP"; then
3680     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3681   fi
3682 else
3683   ac_cv_path_GREP=$GREP
3684 fi
3685
3686 fi
3687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3688 $as_echo "$ac_cv_path_GREP" >&6; }
3689  GREP="$ac_cv_path_GREP"
3690
3691
3692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3693 $as_echo_n "checking for egrep... " >&6; }
3694 if test "${ac_cv_path_EGREP+set}" = set; then :
3695   $as_echo_n "(cached) " >&6
3696 else
3697   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3698    then ac_cv_path_EGREP="$GREP -E"
3699    else
3700      if test -z "$EGREP"; then
3701   ac_path_EGREP_found=false
3702   # Loop through the user's path and test for each of PROGNAME-LIST
3703   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3704 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3705 do
3706   IFS=$as_save_IFS
3707   test -z "$as_dir" && as_dir=.
3708     for ac_prog in egrep; do
3709     for ac_exec_ext in '' $ac_executable_extensions; do
3710       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3711       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3712 # Check for GNU ac_path_EGREP and select it if it is found.
3713   # Check for GNU $ac_path_EGREP
3714 case `"$ac_path_EGREP" --version 2>&1` in
3715 *GNU*)
3716   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3717 *)
3718   ac_count=0
3719   $as_echo_n 0123456789 >"conftest.in"
3720   while :
3721   do
3722     cat "conftest.in" "conftest.in" >"conftest.tmp"
3723     mv "conftest.tmp" "conftest.in"
3724     cp "conftest.in" "conftest.nl"
3725     $as_echo 'EGREP' >> "conftest.nl"
3726     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3727     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3728     as_fn_arith $ac_count + 1 && ac_count=$as_val
3729     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3730       # Best one so far, save it but keep looking for a better one
3731       ac_cv_path_EGREP="$ac_path_EGREP"
3732       ac_path_EGREP_max=$ac_count
3733     fi
3734     # 10*(2^10) chars as input seems more than enough
3735     test $ac_count -gt 10 && break
3736   done
3737   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3738 esac
3739
3740       $ac_path_EGREP_found && break 3
3741     done
3742   done
3743   done
3744 IFS=$as_save_IFS
3745   if test -z "$ac_cv_path_EGREP"; then
3746     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3747   fi
3748 else
3749   ac_cv_path_EGREP=$EGREP
3750 fi
3751
3752    fi
3753 fi
3754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3755 $as_echo "$ac_cv_path_EGREP" >&6; }
3756  EGREP="$ac_cv_path_EGREP"
3757
3758
3759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3760 $as_echo_n "checking for ANSI C header files... " >&6; }
3761 if test "${ac_cv_header_stdc+set}" = set; then :
3762   $as_echo_n "(cached) " >&6
3763 else
3764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3765 /* end confdefs.h.  */
3766 #include <stdlib.h>
3767 #include <stdarg.h>
3768 #include <string.h>
3769 #include <float.h>
3770
3771 int
3772 main ()
3773 {
3774
3775   ;
3776   return 0;
3777 }
3778 _ACEOF
3779 if ac_fn_c_try_compile "$LINENO"; then :
3780   ac_cv_header_stdc=yes
3781 else
3782   ac_cv_header_stdc=no
3783 fi
3784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3785
3786 if test $ac_cv_header_stdc = yes; then
3787   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3789 /* end confdefs.h.  */
3790 #include <string.h>
3791
3792 _ACEOF
3793 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3794   $EGREP "memchr" >/dev/null 2>&1; then :
3795
3796 else
3797   ac_cv_header_stdc=no
3798 fi
3799 rm -f conftest*
3800
3801 fi
3802
3803 if test $ac_cv_header_stdc = yes; then
3804   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3806 /* end confdefs.h.  */
3807 #include <stdlib.h>
3808
3809 _ACEOF
3810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3811   $EGREP "free" >/dev/null 2>&1; then :
3812
3813 else
3814   ac_cv_header_stdc=no
3815 fi
3816 rm -f conftest*
3817
3818 fi
3819
3820 if test $ac_cv_header_stdc = yes; then
3821   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3822   if test "$cross_compiling" = yes; then :
3823   :
3824 else
3825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3826 /* end confdefs.h.  */
3827 #include <ctype.h>
3828 #include <stdlib.h>
3829 #if ((' ' & 0x0FF) == 0x020)
3830 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3831 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3832 #else
3833 # define ISLOWER(c) \
3834                    (('a' <= (c) && (c) <= 'i') \
3835                      || ('j' <= (c) && (c) <= 'r') \
3836                      || ('s' <= (c) && (c) <= 'z'))
3837 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3838 #endif
3839
3840 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3841 int
3842 main ()
3843 {
3844   int i;
3845   for (i = 0; i < 256; i++)
3846     if (XOR (islower (i), ISLOWER (i))
3847         || toupper (i) != TOUPPER (i))
3848       return 2;
3849   return 0;
3850 }
3851 _ACEOF
3852 if ac_fn_c_try_run "$LINENO"; then :
3853
3854 else
3855   ac_cv_header_stdc=no
3856 fi
3857 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3858   conftest.$ac_objext conftest.beam conftest.$ac_ext
3859 fi
3860
3861 fi
3862 fi
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3864 $as_echo "$ac_cv_header_stdc" >&6; }
3865 if test $ac_cv_header_stdc = yes; then
3866
3867 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
3868
3869 fi
3870
3871 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3872 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3873                   inttypes.h stdint.h unistd.h
3874 do :
3875   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3876 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3877 "
3878 eval as_val=\$$as_ac_Header
3879    if test "x$as_val" = x""yes; then :
3880   cat >>confdefs.h <<_ACEOF
3881 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3882 _ACEOF
3883
3884 fi
3885
3886 done
3887
3888
3889
3890   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3891 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
3892   MINIX=yes
3893 else
3894   MINIX=
3895 fi
3896
3897
3898   if test "$MINIX" = yes; then
3899
3900 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
3901
3902
3903 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
3904
3905
3906 $as_echo "#define _MINIX 1" >>confdefs.h
3907
3908   fi
3909
3910
3911   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3912 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3913 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3914   $as_echo_n "(cached) " >&6
3915 else
3916   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3917 /* end confdefs.h.  */
3918
3919 #         define __EXTENSIONS__ 1
3920           $ac_includes_default
3921 int
3922 main ()
3923 {
3924
3925   ;
3926   return 0;
3927 }
3928 _ACEOF
3929 if ac_fn_c_try_compile "$LINENO"; then :
3930   ac_cv_safe_to_define___extensions__=yes
3931 else
3932   ac_cv_safe_to_define___extensions__=no
3933 fi
3934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3935 fi
3936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3937 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
3938   test $ac_cv_safe_to_define___extensions__ = yes &&
3939     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
3940
3941   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
3942
3943   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
3944
3945   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
3946
3947   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
3948
3949
3950 ac_aux_dir=
3951 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3952   for ac_t in install-sh install.sh shtool; do
3953     if test -f "$ac_dir/$ac_t"; then
3954       ac_aux_dir=$ac_dir
3955       ac_install_sh="$ac_aux_dir/$ac_t -c"
3956       break 2
3957     fi
3958   done
3959 done
3960 if test -z "$ac_aux_dir"; then
3961   as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3962 fi
3963
3964 # These three variables are undocumented and unsupported,
3965 # and are intended to be withdrawn in a future Autoconf release.
3966 # They can cause serious problems if a builder's source tree is in a directory
3967 # whose full name contains unusual characters.
3968 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3969 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3970 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3971
3972
3973 # Make sure we can run config.sub.
3974 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3975   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3976
3977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3978 $as_echo_n "checking build system type... " >&6; }
3979 if test "${ac_cv_build+set}" = set; then :
3980   $as_echo_n "(cached) " >&6
3981 else
3982   ac_build_alias=$build_alias
3983 test "x$ac_build_alias" = x &&
3984   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3985 test "x$ac_build_alias" = x &&
3986   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3987 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3988   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3989
3990 fi
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3992 $as_echo "$ac_cv_build" >&6; }
3993 case $ac_cv_build in
3994 *-*-*) ;;
3995 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3996 esac
3997 build=$ac_cv_build
3998 ac_save_IFS=$IFS; IFS='-'
3999 set x $ac_cv_build
4000 shift
4001 build_cpu=$1
4002 build_vendor=$2
4003 shift; shift
4004 # Remember, the first character of IFS is used to create $*,
4005 # except with old shells:
4006 build_os=$*
4007 IFS=$ac_save_IFS
4008 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4009
4010
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4012 $as_echo_n "checking host system type... " >&6; }
4013 if test "${ac_cv_host+set}" = set; then :
4014   $as_echo_n "(cached) " >&6
4015 else
4016   if test "x$host_alias" = x; then
4017   ac_cv_host=$ac_cv_build
4018 else
4019   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4020     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4021 fi
4022
4023 fi
4024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4025 $as_echo "$ac_cv_host" >&6; }
4026 case $ac_cv_host in
4027 *-*-*) ;;
4028 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4029 esac
4030 host=$ac_cv_host
4031 ac_save_IFS=$IFS; IFS='-'
4032 set x $ac_cv_host
4033 shift
4034 host_cpu=$1
4035 host_vendor=$2
4036 shift; shift
4037 # Remember, the first character of IFS is used to create $*,
4038 # except with old shells:
4039 host_os=$*
4040 IFS=$ac_save_IFS
4041 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4042
4043
4044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4045 $as_echo_n "checking target system type... " >&6; }
4046 if test "${ac_cv_target+set}" = set; then :
4047   $as_echo_n "(cached) " >&6
4048 else
4049   if test "x$target_alias" = x; then
4050   ac_cv_target=$ac_cv_host
4051 else
4052   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4053     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4054 fi
4055
4056 fi
4057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4058 $as_echo "$ac_cv_target" >&6; }
4059 case $ac_cv_target in
4060 *-*-*) ;;
4061 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4062 esac
4063 target=$ac_cv_target
4064 ac_save_IFS=$IFS; IFS='-'
4065 set x $ac_cv_target
4066 shift
4067 target_cpu=$1
4068 target_vendor=$2
4069 shift; shift
4070 # Remember, the first character of IFS is used to create $*,
4071 # except with old shells:
4072 target_os=$*
4073 IFS=$ac_save_IFS
4074 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4075
4076
4077 # The aliases save the names the user supplied, while $host etc.
4078 # will get canonicalized.
4079 test -n "$target_alias" &&
4080   test "$program_prefix$program_suffix$program_transform_name" = \
4081     NONENONEs,x,x, &&
4082   program_prefix=${target_alias}-
4083
4084 # The tests for host and target for $enable_largefile require
4085 # canonical names.
4086
4087
4088
4089 # As the $enable_largefile decision depends on --enable-plugins we must set it
4090 # even in directories otherwise not depending on the $plugins option.
4091
4092
4093   maybe_plugins=no
4094   for ac_header in dlfcn.h
4095 do :
4096   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4097 "
4098 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4099   cat >>confdefs.h <<_ACEOF
4100 #define HAVE_DLFCN_H 1
4101 _ACEOF
4102  maybe_plugins=yes
4103 fi
4104
4105 done
4106
4107   for ac_header in windows.h
4108 do :
4109   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4110 "
4111 if test "x$ac_cv_header_windows_h" = x""yes; then :
4112   cat >>confdefs.h <<_ACEOF
4113 #define HAVE_WINDOWS_H 1
4114 _ACEOF
4115  maybe_plugins=yes
4116 fi
4117
4118 done
4119
4120
4121   # Check whether --enable-plugins was given.
4122 if test "${enable_plugins+set}" = set; then :
4123   enableval=$enable_plugins; case "${enableval}" in
4124       no) plugins=no ;;
4125       *) plugins=yes
4126          if test "$maybe_plugins" != "yes" ; then
4127            as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4128          fi ;;
4129      esac
4130 else
4131   plugins=$maybe_plugins
4132
4133 fi
4134
4135   if test "$plugins" = "yes"; then
4136     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4137 $as_echo_n "checking for library containing dlopen... " >&6; }
4138 if test "${ac_cv_search_dlopen+set}" = set; then :
4139   $as_echo_n "(cached) " >&6
4140 else
4141   ac_func_search_save_LIBS=$LIBS
4142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4143 /* end confdefs.h.  */
4144
4145 /* Override any GCC internal prototype to avoid an error.
4146    Use char because int might match the return type of a GCC
4147    builtin and then its argument prototype would still apply.  */
4148 #ifdef __cplusplus
4149 extern "C"
4150 #endif
4151 char dlopen ();
4152 int
4153 main ()
4154 {
4155 return dlopen ();
4156   ;
4157   return 0;
4158 }
4159 _ACEOF
4160 for ac_lib in '' dl; do
4161   if test -z "$ac_lib"; then
4162     ac_res="none required"
4163   else
4164     ac_res=-l$ac_lib
4165     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4166   fi
4167   if ac_fn_c_try_link "$LINENO"; then :
4168   ac_cv_search_dlopen=$ac_res
4169 fi
4170 rm -f core conftest.err conftest.$ac_objext \
4171     conftest$ac_exeext
4172   if test "${ac_cv_search_dlopen+set}" = set; then :
4173   break
4174 fi
4175 done
4176 if test "${ac_cv_search_dlopen+set}" = set; then :
4177
4178 else
4179   ac_cv_search_dlopen=no
4180 fi
4181 rm conftest.$ac_ext
4182 LIBS=$ac_func_search_save_LIBS
4183 fi
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4185 $as_echo "$ac_cv_search_dlopen" >&6; }
4186 ac_res=$ac_cv_search_dlopen
4187 if test "$ac_res" != no; then :
4188   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4189
4190 fi
4191
4192   fi
4193
4194
4195 case "${host}" in
4196   sparc-*-solaris*|i[3-7]86-*-solaris*)
4197     # On native 32bit sparc and ia32 solaris, large-file and procfs support
4198     # are mutually exclusive; and without procfs support, the bfd/ elf module
4199     # cannot provide certain routines such as elfcore_write_prpsinfo
4200     # or elfcore_write_prstatus.  So unless the user explicitly requested
4201     # large-file support through the --enable-largefile switch, disable
4202     # large-file support in favor of procfs support.
4203     test "${target}" = "${host}" -a "x$plugins" = xno \
4204       && : ${enable_largefile="no"}
4205     ;;
4206 esac
4207
4208 # Check whether --enable-largefile was given.
4209 if test "${enable_largefile+set}" = set; then :
4210   enableval=$enable_largefile;
4211 fi
4212
4213 if test "$enable_largefile" != no; then
4214
4215   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4216 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4217 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4218   $as_echo_n "(cached) " >&6
4219 else
4220   ac_cv_sys_largefile_CC=no
4221      if test "$GCC" != yes; then
4222        ac_save_CC=$CC
4223        while :; do
4224          # IRIX 6.2 and later do not support large files by default,
4225          # so use the C compiler's -n32 option if that helps.
4226          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227 /* end confdefs.h.  */
4228 #include <sys/types.h>
4229  /* Check that off_t can represent 2**63 - 1 correctly.
4230     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4231     since some C++ compilers masquerading as C compilers
4232     incorrectly reject 9223372036854775807.  */
4233 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4234   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4235                        && LARGE_OFF_T % 2147483647 == 1)
4236                       ? 1 : -1];
4237 int
4238 main ()
4239 {
4240
4241   ;
4242   return 0;
4243 }
4244 _ACEOF
4245          if ac_fn_c_try_compile "$LINENO"; then :
4246   break
4247 fi
4248 rm -f core conftest.err conftest.$ac_objext
4249          CC="$CC -n32"
4250          if ac_fn_c_try_compile "$LINENO"; then :
4251   ac_cv_sys_largefile_CC=' -n32'; break
4252 fi
4253 rm -f core conftest.err conftest.$ac_objext
4254          break
4255        done
4256        CC=$ac_save_CC
4257        rm -f conftest.$ac_ext
4258     fi
4259 fi
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4261 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4262   if test "$ac_cv_sys_largefile_CC" != no; then
4263     CC=$CC$ac_cv_sys_largefile_CC
4264   fi
4265
4266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4267 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4268 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4269   $as_echo_n "(cached) " >&6
4270 else
4271   while :; do
4272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4273 /* end confdefs.h.  */
4274 #include <sys/types.h>
4275  /* Check that off_t can represent 2**63 - 1 correctly.
4276     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4277     since some C++ compilers masquerading as C compilers
4278     incorrectly reject 9223372036854775807.  */
4279 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4280   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4281                        && LARGE_OFF_T % 2147483647 == 1)
4282                       ? 1 : -1];
4283 int
4284 main ()
4285 {
4286
4287   ;
4288   return 0;
4289 }
4290 _ACEOF
4291 if ac_fn_c_try_compile "$LINENO"; then :
4292   ac_cv_sys_file_offset_bits=no; break
4293 fi
4294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4296 /* end confdefs.h.  */
4297 #define _FILE_OFFSET_BITS 64
4298 #include <sys/types.h>
4299  /* Check that off_t can represent 2**63 - 1 correctly.
4300     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4301     since some C++ compilers masquerading as C compilers
4302     incorrectly reject 9223372036854775807.  */
4303 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4304   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4305                        && LARGE_OFF_T % 2147483647 == 1)
4306                       ? 1 : -1];
4307 int
4308 main ()
4309 {
4310
4311   ;
4312   return 0;
4313 }
4314 _ACEOF
4315 if ac_fn_c_try_compile "$LINENO"; then :
4316   ac_cv_sys_file_offset_bits=64; break
4317 fi
4318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4319   ac_cv_sys_file_offset_bits=unknown
4320   break
4321 done
4322 fi
4323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4324 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4325 case $ac_cv_sys_file_offset_bits in #(
4326   no | unknown) ;;
4327   *)
4328 cat >>confdefs.h <<_ACEOF
4329 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4330 _ACEOF
4331 ;;
4332 esac
4333 rm -rf conftest*
4334   if test $ac_cv_sys_file_offset_bits = unknown; then
4335     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4336 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4337 if test "${ac_cv_sys_large_files+set}" = set; then :
4338   $as_echo_n "(cached) " >&6
4339 else
4340   while :; do
4341   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342 /* end confdefs.h.  */
4343 #include <sys/types.h>
4344  /* Check that off_t can represent 2**63 - 1 correctly.
4345     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4346     since some C++ compilers masquerading as C compilers
4347     incorrectly reject 9223372036854775807.  */
4348 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4349   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4350                        && LARGE_OFF_T % 2147483647 == 1)
4351                       ? 1 : -1];
4352 int
4353 main ()
4354 {
4355
4356   ;
4357   return 0;
4358 }
4359 _ACEOF
4360 if ac_fn_c_try_compile "$LINENO"; then :
4361   ac_cv_sys_large_files=no; break
4362 fi
4363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365 /* end confdefs.h.  */
4366 #define _LARGE_FILES 1
4367 #include <sys/types.h>
4368  /* Check that off_t can represent 2**63 - 1 correctly.
4369     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4370     since some C++ compilers masquerading as C compilers
4371     incorrectly reject 9223372036854775807.  */
4372 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4373   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4374                        && LARGE_OFF_T % 2147483647 == 1)
4375                       ? 1 : -1];
4376 int
4377 main ()
4378 {
4379
4380   ;
4381   return 0;
4382 }
4383 _ACEOF
4384 if ac_fn_c_try_compile "$LINENO"; then :
4385   ac_cv_sys_large_files=1; break
4386 fi
4387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4388   ac_cv_sys_large_files=unknown
4389   break
4390 done
4391 fi
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4393 $as_echo "$ac_cv_sys_large_files" >&6; }
4394 case $ac_cv_sys_large_files in #(
4395   no | unknown) ;;
4396   *)
4397 cat >>confdefs.h <<_ACEOF
4398 #define _LARGE_FILES $ac_cv_sys_large_files
4399 _ACEOF
4400 ;;
4401 esac
4402 rm -rf conftest*
4403   fi
4404 fi
4405
4406
4407
4408
4409
4410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4411 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4412 if test "${am_cv_prog_cc_stdc+set}" = set; then :
4413   $as_echo_n "(cached) " >&6
4414 else
4415   am_cv_prog_cc_stdc=no
4416 ac_save_CC="$CC"
4417 # Don't try gcc -ansi; that turns off useful extensions and
4418 # breaks some systems' header files.
4419 # AIX                   -qlanglvl=ansi
4420 # Ultrix and OSF/1      -std1
4421 # HP-UX 10.20 and later -Ae
4422 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4423 # SVR4                  -Xc -D__EXTENSIONS__
4424 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4425 do
4426   CC="$ac_save_CC $ac_arg"
4427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428 /* end confdefs.h.  */
4429 #include <stdarg.h>
4430 #include <stdio.h>
4431 #include <sys/types.h>
4432 #include <sys/stat.h>
4433 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4434 struct buf { int x; };
4435 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4436 static char *e (p, i)
4437      char **p;
4438      int i;
4439 {
4440   return p[i];
4441 }
4442 static char *f (char * (*g) (char **, int), char **p, ...)
4443 {
4444   char *s;
4445   va_list v;
4446   va_start (v,p);
4447   s = g (p, va_arg (v,int));
4448   va_end (v);
4449   return s;
4450 }
4451 int test (int i, double x);
4452 struct s1 {int (*f) (int a);};
4453 struct s2 {int (*f) (double a);};
4454 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4455 int argc;
4456 char **argv;
4457
4458 int
4459 main ()
4460 {
4461
4462 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4463
4464   ;
4465   return 0;
4466 }
4467 _ACEOF
4468 if ac_fn_c_try_compile "$LINENO"; then :
4469   am_cv_prog_cc_stdc="$ac_arg"; break
4470 fi
4471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4472 done
4473 CC="$ac_save_CC"
4474
4475 fi
4476
4477 if test -z "$am_cv_prog_cc_stdc"; then
4478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4479 $as_echo "none needed" >&6; }
4480 else
4481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4482 $as_echo "$am_cv_prog_cc_stdc" >&6; }
4483 fi
4484 case "x$am_cv_prog_cc_stdc" in
4485   x|xno) ;;
4486   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4487 esac
4488
4489 # expand $ac_aux_dir to an absolute path
4490 am_aux_dir=`cd $ac_aux_dir && pwd`
4491
4492 if test x"${install_sh}" != xset; then
4493   case $am_aux_dir in
4494   *\ * | *\     *)
4495     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4496   *)
4497     install_sh="\${SHELL} $am_aux_dir/install-sh"
4498   esac
4499 fi
4500
4501 # Installed binaries are usually stripped using `strip' when the user
4502 # run `make install-strip'.  However `strip' might not be the right
4503 # tool to use in cross-compilation environments, therefore Automake
4504 # will honor the `STRIP' environment variable to overrule this program.
4505 if test "$cross_compiling" != no; then
4506   if test -n "$ac_tool_prefix"; then
4507   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4508 set dummy ${ac_tool_prefix}strip; ac_word=$2
4509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4510 $as_echo_n "checking for $ac_word... " >&6; }
4511 if test "${ac_cv_prog_STRIP+set}" = set; then :
4512   $as_echo_n "(cached) " >&6
4513 else
4514   if test -n "$STRIP"; then
4515   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4516 else
4517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518 for as_dir in $PATH
4519 do
4520   IFS=$as_save_IFS
4521   test -z "$as_dir" && as_dir=.
4522     for ac_exec_ext in '' $ac_executable_extensions; do
4523   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4524     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4526     break 2
4527   fi
4528 done
4529   done
4530 IFS=$as_save_IFS
4531
4532 fi
4533 fi
4534 STRIP=$ac_cv_prog_STRIP
4535 if test -n "$STRIP"; then
4536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4537 $as_echo "$STRIP" >&6; }
4538 else
4539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540 $as_echo "no" >&6; }
4541 fi
4542
4543
4544 fi
4545 if test -z "$ac_cv_prog_STRIP"; then
4546   ac_ct_STRIP=$STRIP
4547   # Extract the first word of "strip", so it can be a program name with args.
4548 set dummy strip; ac_word=$2
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4550 $as_echo_n "checking for $ac_word... " >&6; }
4551 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4552   $as_echo_n "(cached) " >&6
4553 else
4554   if test -n "$ac_ct_STRIP"; then
4555   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4556 else
4557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558 for as_dir in $PATH
4559 do
4560   IFS=$as_save_IFS
4561   test -z "$as_dir" && as_dir=.
4562     for ac_exec_ext in '' $ac_executable_extensions; do
4563   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4564     ac_cv_prog_ac_ct_STRIP="strip"
4565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4566     break 2
4567   fi
4568 done
4569   done
4570 IFS=$as_save_IFS
4571
4572 fi
4573 fi
4574 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4575 if test -n "$ac_ct_STRIP"; then
4576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4577 $as_echo "$ac_ct_STRIP" >&6; }
4578 else
4579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4580 $as_echo "no" >&6; }
4581 fi
4582
4583   if test "x$ac_ct_STRIP" = x; then
4584     STRIP=":"
4585   else
4586     case $cross_compiling:$ac_tool_warned in
4587 yes:)
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4589 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4590 ac_tool_warned=yes ;;
4591 esac
4592     STRIP=$ac_ct_STRIP
4593   fi
4594 else
4595   STRIP="$ac_cv_prog_STRIP"
4596 fi
4597
4598 fi
4599 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4600
4601
4602 ac_aux_dir=
4603 for ac_dir in .. "$srcdir"/..; do
4604   for ac_t in install-sh install.sh shtool; do
4605     if test -f "$ac_dir/$ac_t"; then
4606       ac_aux_dir=$ac_dir
4607       ac_install_sh="$ac_aux_dir/$ac_t -c"
4608       break 2
4609     fi
4610   done
4611 done
4612 if test -z "$ac_aux_dir"; then
4613   as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
4614 fi
4615
4616 # These three variables are undocumented and unsupported,
4617 # and are intended to be withdrawn in a future Autoconf release.
4618 # They can cause serious problems if a builder's source tree is in a directory
4619 # whose full name contains unusual characters.
4620 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4621 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4622 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4623
4624
4625
4626 test "$program_prefix" != NONE &&
4627   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4628 # Use a double $ so make ignores it.
4629 test "$program_suffix" != NONE &&
4630   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4631 # Double any \ or $.
4632 # By default was `s,x,x', remove it if useless.
4633 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4634 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4635
4636
4637 # Dependency checking.
4638 rm -rf .tst 2>/dev/null
4639 mkdir .tst 2>/dev/null
4640 if test -d .tst; then
4641   am__leading_dot=.
4642 else
4643   am__leading_dot=_
4644 fi
4645 rmdir .tst 2>/dev/null
4646
4647 DEPDIR="${am__leading_dot}deps"
4648
4649 ac_config_commands="$ac_config_commands depdir"
4650
4651
4652 depcc="$CC"   am_compiler_list=
4653
4654 am_depcomp=$ac_aux_dir/depcomp
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4656 $as_echo_n "checking dependency style of $depcc... " >&6; }
4657 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4658   $as_echo_n "(cached) " >&6
4659 else
4660   if test -f "$am_depcomp"; then
4661   # We make a subdir and do the tests there.  Otherwise we can end up
4662   # making bogus files that we don't know about and never remove.  For
4663   # instance it was reported that on HP-UX the gcc test will end up
4664   # making a dummy file named `D' -- because `-MD' means `put the output
4665   # in D'.
4666   mkdir conftest.dir
4667   # Copy depcomp to subdir because otherwise we won't find it if we're
4668   # using a relative directory.
4669   cp "$am_depcomp" conftest.dir
4670   cd conftest.dir
4671   # We will build objects and dependencies in a subdirectory because
4672   # it helps to detect inapplicable dependency modes.  For instance
4673   # both Tru64's cc and ICC support -MD to output dependencies as a
4674   # side effect of compilation, but ICC will put the dependencies in
4675   # the current directory while Tru64 will put them in the object
4676   # directory.
4677   mkdir sub
4678
4679   am_cv_CC_dependencies_compiler_type=none
4680   if test "$am_compiler_list" = ""; then
4681      am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4682   fi
4683   for depmode in $am_compiler_list; do
4684     if test $depmode = none; then break; fi
4685
4686     $as_echo "$as_me:$LINENO: trying $depmode" >&5
4687     # Setup a source with many dependencies, because some compilers
4688     # like to wrap large dependency lists on column 80 (with \), and
4689     # we should not choose a depcomp mode which is confused by this.
4690     #
4691     # We need to recreate these files for each test, as the compiler may
4692     # overwrite some of them when testing with obscure command lines.
4693     # This happens at least with the AIX C compiler.
4694     : > sub/conftest.c
4695     for i in 1 2 3 4 5 6; do
4696       echo '#include "conftst'$i'.h"' >> sub/conftest.c
4697       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4698       # Solaris 8's {/usr,}/bin/sh.
4699       touch sub/conftst$i.h
4700     done
4701     echo "include sub/conftest.Po" > confmf
4702
4703     # We check with `-c' and `-o' for the sake of the "dashmstdout"
4704     # mode.  It turns out that the SunPro C++ compiler does not properly
4705     # handle `-M -o', and we need to detect this.
4706     depcmd="depmode=$depmode \
4707        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4708        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4709        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4710     echo "| $depcmd" | sed -e 's/  */ /g' >&5
4711     if env $depcmd > conftest.err 2>&1 &&
4712        grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4713        grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4714        ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4715       # icc doesn't choke on unknown options, it will just issue warnings
4716       # or remarks (even with -Werror).  So we grep stderr for any message
4717       # that says an option was ignored or not supported.
4718       # When given -MP, icc 7.0 and 7.1 complain thusly:
4719       #   icc: Command line warning: ignoring option '-M'; no argument required
4720       # The diagnosis changed in icc 8.0:
4721       #   icc: Command line remark: option '-MP' not supported
4722       if (grep 'ignoring option' conftest.err ||
4723           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4724         am_cv_CC_dependencies_compiler_type=$depmode
4725         $as_echo "$as_me:$LINENO: success" >&5
4726         break
4727       fi
4728     fi
4729     $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
4730     sed -e 's/^/| /' < conftest.err >&5
4731   done
4732
4733   cd ..
4734   rm -rf conftest.dir
4735 else
4736   am_cv_CC_dependencies_compiler_type=none
4737 fi
4738
4739 fi
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4741 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4742 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
4743 then as_fn_error "no usable dependency style found" "$LINENO" 5
4744 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4745
4746 fi
4747
4748
4749 # Check for the 'make' the user wants to use.
4750 for ac_prog in make
4751 do
4752   # Extract the first word of "$ac_prog", so it can be a program name with args.
4753 set dummy $ac_prog; ac_word=$2
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4755 $as_echo_n "checking for $ac_word... " >&6; }
4756 if test "${ac_cv_prog_MAKE+set}" = set; then :
4757   $as_echo_n "(cached) " >&6
4758 else
4759   if test -n "$MAKE"; then
4760   ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4761 else
4762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4763 for as_dir in $PATH
4764 do
4765   IFS=$as_save_IFS
4766   test -z "$as_dir" && as_dir=.
4767     for ac_exec_ext in '' $ac_executable_extensions; do
4768   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4769     ac_cv_prog_MAKE="$ac_prog"
4770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4771     break 2
4772   fi
4773 done
4774   done
4775 IFS=$as_save_IFS
4776
4777 fi
4778 fi
4779 MAKE=$ac_cv_prog_MAKE
4780 if test -n "$MAKE"; then
4781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4782 $as_echo "$MAKE" >&6; }
4783 else
4784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4785 $as_echo "no" >&6; }
4786 fi
4787
4788
4789   test -n "$MAKE" && break
4790 done
4791
4792 MAKE_IS_GNU=
4793 case "`$MAKE --version 2>&1 | sed 1q`" in
4794   *GNU*)
4795     MAKE_IS_GNU=yes
4796     ;;
4797 esac
4798  if test "$MAKE_IS_GNU" = yes; then
4799   GMAKE_TRUE=
4800   GMAKE_FALSE='#'
4801 else
4802   GMAKE_TRUE='#'
4803   GMAKE_FALSE=
4804 fi
4805
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4807 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4808 set x ${MAKE-make}
4809 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4810 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4811   $as_echo_n "(cached) " >&6
4812 else
4813   cat >conftest.make <<\_ACEOF
4814 SHELL = /bin/sh
4815 all:
4816         @echo '@@@%%%=$(MAKE)=@@@%%%'
4817 _ACEOF
4818 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4819 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4820   *@@@%%%=?*=@@@%%%*)
4821     eval ac_cv_prog_make_${ac_make}_set=yes;;
4822   *)
4823     eval ac_cv_prog_make_${ac_make}_set=no;;
4824 esac
4825 rm -f conftest.make
4826 fi
4827 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4829 $as_echo "yes" >&6; }
4830   SET_MAKE=
4831 else
4832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833 $as_echo "no" >&6; }
4834   SET_MAKE="MAKE=${MAKE-make}"
4835 fi
4836
4837
4838 gnulib_extra_configure_args=
4839 # If large-file support is disabled, make sure gnulib does the same.
4840 if test "$enable_largefile" = no; then
4841 gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
4842 fi
4843
4844 # Configure gnulib.  We need to build gnulib under some other
4845 # directory not "gnulib", to avoid the problem of both GDB and
4846 # GDBserver wanting to build it in the same directory, when building
4847 # in the source dir.
4848
4849   in_src="gnulib"
4850   in_build="build-gnulib"
4851   in_extra_args="$gnulib_extra_configure_args"
4852
4853   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4854   # so they do not pile up.
4855   ac_sub_configure_args=
4856   ac_prev=
4857   eval "set x $ac_configure_args"
4858   shift
4859   for ac_arg
4860   do
4861     if test -n "$ac_prev"; then
4862       ac_prev=
4863       continue
4864     fi
4865     case $ac_arg in
4866     -cache-file | --cache-file | --cache-fil | --cache-fi \
4867     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4868       ac_prev=cache_file ;;
4869     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4870     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4871     | --c=*)
4872       ;;
4873     --config-cache | -C)
4874       ;;
4875     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4876       ac_prev=srcdir ;;
4877     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4878       ;;
4879     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4880       ac_prev=prefix ;;
4881     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4882       ;;
4883     --disable-option-checking)
4884       ;;
4885     *)
4886       case $ac_arg in
4887       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4888       esac
4889       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4890     esac
4891   done
4892
4893   # Always prepend --prefix to ensure using the same prefix
4894   # in subdir configurations.
4895   ac_arg="--prefix=$prefix"
4896   case $ac_arg in
4897   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4898   esac
4899   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4900
4901   # Pass --silent
4902   if test "$silent" = yes; then
4903     ac_sub_configure_args="--silent $ac_sub_configure_args"
4904   fi
4905
4906   # Always prepend --disable-option-checking to silence warnings, since
4907   # different subdirs can have different --enable and --with options.
4908   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4909
4910   ac_popdir=`pwd`
4911   ac_dir=$in_build
4912
4913   ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4914   $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4915   $as_echo "$ac_msg" >&6
4916   as_dir="$ac_dir"; as_fn_mkdir_p
4917
4918   case $srcdir in
4919   [\\/]* | ?:[\\/]* )
4920     ac_srcdir=$srcdir/$in_src ;;
4921   *) # Relative name.
4922     ac_srcdir=../$srcdir/$in_src ;;
4923   esac
4924
4925   cd "$ac_dir"
4926
4927   ac_sub_configure=$ac_srcdir/configure
4928
4929   # Make the cache file name correct relative to the subdirectory.
4930   case $cache_file in
4931   [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4932   *) # Relative name.
4933     ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4934   esac
4935
4936   if test -n "$in_extra_args"; then
4937     # Add the extra args at the end.
4938     ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
4939   fi
4940
4941   { $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
4942 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4943   # The eval makes quoting arguments work.
4944   eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4945        --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4946     as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4947
4948   cd "$ac_popdir"
4949
4950
4951
4952 CONFIG_OBS=
4953 CONFIG_DEPS=
4954 CONFIG_SRCS=
4955 ENABLE_CFLAGS=
4956
4957 CONFIG_ALL=
4958 CONFIG_CLEAN=
4959 CONFIG_INSTALL=
4960 CONFIG_UNINSTALL=
4961
4962 # If we haven't got the data from the intl directory,
4963 # assume NLS is disabled.
4964 USE_NLS=no
4965 LIBINTL=
4966 LIBINTL_DEP=
4967 INCINTL=
4968 XGETTEXT=
4969 GMSGFMT=
4970 POSUB=
4971
4972 if test -f  ../intl/config.intl; then
4973   .  ../intl/config.intl
4974 fi
4975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4976 $as_echo_n "checking whether NLS is requested... " >&6; }
4977 if test x"$USE_NLS" != xyes; then
4978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4979 $as_echo "no" >&6; }
4980 else
4981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4982 $as_echo "yes" >&6; }
4983
4984 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
4985
4986
4987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4988 $as_echo_n "checking for catalogs to be installed... " >&6; }
4989   # Look for .po and .gmo files in the source directory.
4990   CATALOGS=
4991   XLINGUAS=
4992   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4993     # If there aren't any .gmo files the shell will give us the
4994     # literal string "../path/to/srcdir/po/*.gmo" which has to be
4995     # weeded out.
4996     case "$cat" in *\**)
4997       continue;;
4998     esac
4999     # The quadruple backslash is collapsed to a double backslash
5000     # by the backticks, then collapsed again by the double quotes,
5001     # leaving us with one backslash in the sed expression (right
5002     # before the dot that mustn't act as a wildcard).
5003     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5004     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5005     # The user is allowed to set LINGUAS to a list of languages to
5006     # install catalogs for.  If it's empty that means "all of them."
5007     if test "x$LINGUAS" = x; then
5008       CATALOGS="$CATALOGS $cat"
5009       XLINGUAS="$XLINGUAS $lang"
5010     else
5011       case "$LINGUAS" in *$lang*)
5012         CATALOGS="$CATALOGS $cat"
5013         XLINGUAS="$XLINGUAS $lang"
5014         ;;
5015       esac
5016     fi
5017   done
5018   LINGUAS="$XLINGUAS"
5019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5020 $as_echo "$LINGUAS" >&6; }
5021
5022
5023     DATADIRNAME=share
5024
5025   INSTOBJEXT=.mo
5026
5027   GENCAT=gencat
5028
5029   CATOBJEXT=.gmo
5030
5031 fi
5032
5033 localedir='${datadir}/locale'
5034
5035
5036 if test x"$USE_NLS" = xyes; then
5037    CONFIG_ALL="$CONFIG_ALL all-po"
5038    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5039    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5040    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
5041 fi
5042
5043 GNULIB=build-gnulib/import
5044
5045 # For Makefile dependencies.
5046 GNULIB_STDINT_H=
5047 if test x"$STDINT_H" != x; then
5048   GNULIB_STDINT_H=$GNULIB/$STDINT_H
5049 fi
5050
5051
5052 PACKAGE=gdb
5053
5054 cat >>confdefs.h <<_ACEOF
5055 #define PACKAGE "$PACKAGE"
5056 _ACEOF
5057
5058
5059
5060 # We never need to detect it in this sub-configure.
5061 # But preserve it for config.status --recheck.
5062
5063
5064
5065 MAKEINFO_EXTRA_FLAGS=""
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5067 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5068 if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5069   $as_echo_n "(cached) " >&6
5070 else
5071   echo '@clicksequence{a @click{} b}' >conftest.texinfo
5072   if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5073     gdb_cv_have_makeinfo_click=yes
5074   else
5075     gdb_cv_have_makeinfo_click=no
5076   fi
5077 fi
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5079 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5080 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5081   MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5082 fi
5083
5084
5085
5086
5087 # Check whether --with-separate-debug-dir was given.
5088 if test "${with_separate_debug_dir+set}" = set; then :
5089   withval=$with_separate_debug_dir;
5090     DEBUGDIR=$withval
5091 else
5092   DEBUGDIR=${libdir}/debug
5093 fi
5094
5095
5096   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5097   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5098   ac_define_dir=`eval echo $DEBUGDIR`
5099   ac_define_dir=`eval echo $ac_define_dir`
5100
5101 cat >>confdefs.h <<_ACEOF
5102 #define DEBUGDIR "$ac_define_dir"
5103 _ACEOF
5104
5105
5106
5107
5108   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5109      if test "x$prefix" = xNONE; then
5110         test_prefix=/usr/local
5111      else
5112         test_prefix=$prefix
5113      fi
5114   else
5115      test_prefix=$exec_prefix
5116   fi
5117   value=0
5118   case ${ac_define_dir} in
5119      "${test_prefix}"|"${test_prefix}/"*|\
5120         '${exec_prefix}'|'${exec_prefix}/'*)
5121      value=1
5122      ;;
5123   esac
5124
5125 cat >>confdefs.h <<_ACEOF
5126 #define DEBUGDIR_RELOCATABLE $value
5127 _ACEOF
5128
5129
5130
5131
5132 # We can't pass paths as command line arguments.
5133 # Mingw32 tries to be clever and will convert the paths for us.
5134 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
5135 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5136 # This breaks GDB's relocatable path conversions since paths passed in
5137 # config.h would not get so translated, the path prefixes no longer match.
5138
5139   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5140   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5141   ac_define_dir=`eval echo $bindir`
5142   ac_define_dir=`eval echo $ac_define_dir`
5143
5144 cat >>confdefs.h <<_ACEOF
5145 #define BINDIR "$ac_define_dir"
5146 _ACEOF
5147
5148
5149
5150 # GDB's datadir relocation
5151
5152
5153
5154 # Check whether --with-gdb-datadir was given.
5155 if test "${with_gdb_datadir+set}" = set; then :
5156   withval=$with_gdb_datadir;
5157     GDB_DATADIR=$withval
5158 else
5159   GDB_DATADIR=${datadir}/gdb
5160 fi
5161
5162
5163   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5164   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5165   ac_define_dir=`eval echo $GDB_DATADIR`
5166   ac_define_dir=`eval echo $ac_define_dir`
5167
5168 cat >>confdefs.h <<_ACEOF
5169 #define GDB_DATADIR "$ac_define_dir"
5170 _ACEOF
5171
5172
5173
5174
5175   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5176      if test "x$prefix" = xNONE; then
5177         test_prefix=/usr/local
5178      else
5179         test_prefix=$prefix
5180      fi
5181   else
5182      test_prefix=$exec_prefix
5183   fi
5184   value=0
5185   case ${ac_define_dir} in
5186      "${test_prefix}"|"${test_prefix}/"*|\
5187         '${exec_prefix}'|'${exec_prefix}/'*)
5188      value=1
5189      ;;
5190   esac
5191
5192 cat >>confdefs.h <<_ACEOF
5193 #define GDB_DATADIR_RELOCATABLE $value
5194 _ACEOF
5195
5196
5197
5198
5199
5200 # Check whether --with-relocated-sources was given.
5201 if test "${with_relocated_sources+set}" = set; then :
5202   withval=$with_relocated_sources; reloc_srcdir="${withval}"
5203
5204   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5205   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5206   ac_define_dir=`eval echo $reloc_srcdir`
5207   ac_define_dir=`eval echo $ac_define_dir`
5208
5209 cat >>confdefs.h <<_ACEOF
5210 #define RELOC_SRCDIR "$ac_define_dir"
5211 _ACEOF
5212
5213
5214
5215 fi
5216
5217
5218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5219 $as_echo_n "checking for default auto-load directory... " >&6; }
5220
5221 # Check whether --with-auto-load-dir was given.
5222 if test "${with_auto_load_dir+set}" = set; then :
5223   withval=$with_auto_load_dir;
5224 else
5225   with_auto_load_dir='$debugdir:$datadir/auto-load'
5226 fi
5227
5228 escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
5229
5230   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5231   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5232   ac_define_dir=`eval echo $escape_dir`
5233   ac_define_dir=`eval echo $ac_define_dir`
5234
5235 cat >>confdefs.h <<_ACEOF
5236 #define AUTO_LOAD_DIR "$ac_define_dir"
5237 _ACEOF
5238
5239
5240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5241 $as_echo "$with_auto_load_dir" >&6; }
5242
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5244 $as_echo_n "checking for default auto-load safe-path... " >&6; }
5245
5246 # Check whether --with-auto-load-safe-path was given.
5247 if test "${with_auto_load_safe_path+set}" = set; then :
5248   withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
5249      with_auto_load_safe_path="/"
5250      fi
5251 else
5252   with_auto_load_safe_path="$with_auto_load_dir"
5253 fi
5254
5255 escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
5256
5257   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5258   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5259   ac_define_dir=`eval echo $escape_dir`
5260   ac_define_dir=`eval echo $ac_define_dir`
5261
5262 cat >>confdefs.h <<_ACEOF
5263 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
5264 _ACEOF
5265
5266
5267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5268 $as_echo "$with_auto_load_safe_path" >&6; }
5269
5270
5271
5272 subdirs="$subdirs testsuite"
5273
5274
5275 # Check whether to support alternative target configurations
5276 # Check whether --enable-targets was given.
5277 if test "${enable_targets+set}" = set; then :
5278   enableval=$enable_targets; case "${enableval}" in
5279   yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
5280             ;;
5281   no)       enable_targets= ;;
5282   *)        enable_targets=$enableval ;;
5283 esac
5284 fi
5285
5286
5287 # Check whether to enable 64-bit support on 32-bit hosts
5288 # Check whether --enable-64-bit-bfd was given.
5289 if test "${enable_64_bit_bfd+set}" = set; then :
5290   enableval=$enable_64_bit_bfd; case "${enableval}" in
5291   yes)  want64=true  ;;
5292   no)   want64=false ;;
5293   *)    as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
5294 esac
5295 else
5296   want64=false
5297 fi
5298
5299 # Provide defaults for some variables set by the per-host and per-target
5300 # configuration.
5301 gdb_host_obs=posix-hdep.o
5302
5303 if test "${target}" = "${host}"; then
5304   gdb_native=yes
5305 else
5306   gdb_native=no
5307 fi
5308
5309 . $srcdir/configure.host
5310
5311 # Accumulate some settings from configure.tgt over all enabled targets
5312
5313 TARGET_OBS=
5314 all_targets=
5315 HAVE_NATIVE_GCORE_TARGET=
5316
5317 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
5318 do
5319   if test "$targ_alias" = "all"; then
5320     all_targets=true
5321   else
5322     # Canonicalize the secondary target names.
5323     result=`$ac_config_sub $targ_alias 2>/dev/null`
5324     if test -n "$result"; then
5325         targ=$result
5326     else
5327         targ=$targ_alias
5328     fi
5329
5330     . ${srcdir}/configure.tgt
5331
5332     if test -z "${gdb_target_obs}"; then :
5333   as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5334 fi
5335
5336     # Target-specific object files
5337     for i in ${gdb_target_obs}; do
5338         case " $TARGET_OBS " in
5339         *" ${i} "*) ;;
5340         *)
5341           TARGET_OBS="$TARGET_OBS ${i}"
5342           ;;
5343         esac
5344     done
5345
5346     # Check whether this target needs 64-bit CORE_ADDR
5347     if test x${want64} = xfalse; then
5348       . ${srcdir}/../bfd/config.bfd
5349     fi
5350
5351     # Check whether this target is native and supports gcore.
5352     if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5353        && $gdb_have_gcore; then
5354       HAVE_NATIVE_GCORE_TARGET=1
5355     fi
5356   fi
5357 done
5358
5359 if test x${all_targets} = xtrue; then
5360
5361   # We want all 64-bit targets if we either:
5362   #  - run on a 64-bit host  or
5363   #  - already require 64-bit support for some other target  or
5364   #  - the --enable-64-bit-bfd option was supplied
5365   # Otherwise we only support all 32-bit targets.
5366   #
5367   # NOTE: This test must be in sync with the corresponding
5368   #       tests in BFD!
5369
5370   if test x${want64} = xfalse; then
5371     # The cast to long int works around a bug in the HP C Compiler
5372 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5373 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5374 # This bug is HP SR number 8606223364.
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5376 $as_echo_n "checking size of long... " >&6; }
5377 if test "${ac_cv_sizeof_long+set}" = set; then :
5378   $as_echo_n "(cached) " >&6
5379 else
5380   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
5381
5382 else
5383   if test "$ac_cv_type_long" = yes; then
5384      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5385 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5386 { as_fn_set_status 77
5387 as_fn_error "cannot compute sizeof (long)
5388 See \`config.log' for more details." "$LINENO" 5; }; }
5389    else
5390      ac_cv_sizeof_long=0
5391    fi
5392 fi
5393
5394 fi
5395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5396 $as_echo "$ac_cv_sizeof_long" >&6; }
5397
5398
5399
5400 cat >>confdefs.h <<_ACEOF
5401 #define SIZEOF_LONG $ac_cv_sizeof_long
5402 _ACEOF
5403
5404
5405     if test "x${ac_cv_sizeof_long}" = "x8"; then
5406       want64=true
5407     fi
5408   fi
5409   if test x${want64} = xtrue; then
5410     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5411   else
5412     TARGET_OBS='$(ALL_TARGET_OBS)'
5413   fi
5414 fi
5415
5416
5417
5418
5419 # For other settings, only the main target counts.
5420 gdb_sim=
5421 gdb_osabi=
5422 build_gdbserver=
5423 targ=$target; . ${srcdir}/configure.tgt
5424
5425 # Fetch the default architecture and default target vector from BFD.
5426 targ=$target; . $srcdir/../bfd/config.bfd
5427
5428 # We only want the first architecture, so strip off the others if
5429 # there is more than one.
5430 targ_archs=`echo $targ_archs | sed 's/ .*//'`
5431
5432 if test "x$targ_archs" != x; then
5433
5434 cat >>confdefs.h <<_ACEOF
5435 #define DEFAULT_BFD_ARCH $targ_archs
5436 _ACEOF
5437
5438 fi
5439 if test "x$targ_defvec" != x; then
5440
5441 cat >>confdefs.h <<_ACEOF
5442 #define DEFAULT_BFD_VEC $targ_defvec
5443 _ACEOF
5444
5445 fi
5446
5447 # The CLI cannot be disabled yet, but may be in the future.
5448
5449 # Enable CLI.
5450 # Check whether --enable-gdbcli was given.
5451 if test "${enable_gdbcli+set}" = set; then :
5452   enableval=$enable_gdbcli; case $enableval in
5453     yes)
5454       ;;
5455     no)
5456       as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
5457     *)
5458       as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
5459   esac
5460 else
5461   enable_gdbcli=yes
5462 fi
5463
5464 if test x"$enable_gdbcli" = xyes; then
5465   if test -d $srcdir/cli; then
5466     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5467     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5468     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5469     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5470   fi
5471 fi
5472
5473 # Enable MI.
5474 # Check whether --enable-gdbmi was given.
5475 if test "${enable_gdbmi+set}" = set; then :
5476   enableval=$enable_gdbmi; case $enableval in
5477     yes | no)
5478       ;;
5479     *)
5480       as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
5481   esac
5482 else
5483   enable_gdbmi=yes
5484 fi
5485
5486 if test x"$enable_gdbmi" = xyes; then
5487   if test -d $srcdir/mi; then
5488     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5489     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5490     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5491     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5492   fi
5493 fi
5494
5495 # Enable TUI.
5496 # Check whether --enable-tui was given.
5497 if test "${enable_tui+set}" = set; then :
5498   enableval=$enable_tui; case $enableval in
5499     yes | no | auto)
5500       ;;
5501     *)
5502       as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
5503   esac
5504 else
5505   enable_tui=auto
5506 fi
5507
5508
5509 # Enable gdbtk.
5510 # Check whether --enable-gdbtk was given.
5511 if test "${enable_gdbtk+set}" = set; then :
5512   enableval=$enable_gdbtk; case $enableval in
5513     yes | no)
5514       ;;
5515     *)
5516       as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
5517   esac
5518 else
5519   if test -d $srcdir/gdbtk; then
5520     enable_gdbtk=yes
5521   else
5522     enable_gdbtk=no
5523   fi
5524 fi
5525
5526 # We unconditionally disable gdbtk tests on selected platforms.
5527 case $host_os in
5528   go32* | windows*)
5529     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5530 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
5531     enable_gdbtk=no ;;
5532 esac
5533
5534 # Libunwind support for ia64.
5535
5536
5537 # Check whether --with-libunwind-ia64 was given.
5538 if test "${with_libunwind_ia64+set}" = set; then :
5539   withval=$with_libunwind_ia64;
5540 else
5541   with_libunwind_ia64=auto
5542 fi
5543
5544
5545 # Backward compatibility option.
5546 if test "${with_libunwind+set}" = set; then
5547   if test x"$with_libunwind_ia64" != xauto; then
5548     as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5549   fi
5550   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5551 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5552   with_libunwind_ia64="$with_libunwind"
5553 fi
5554
5555 case "$with_libunwind_ia64" in
5556   yes | no)
5557     ;;
5558   auto)
5559     for ac_header in libunwind-ia64.h
5560 do :
5561   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5562 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
5563   cat >>confdefs.h <<_ACEOF
5564 #define HAVE_LIBUNWIND_IA64_H 1
5565 _ACEOF
5566
5567 fi
5568
5569 done
5570
5571     with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5572     ;;
5573   *)
5574     as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5575     ;;
5576 esac
5577
5578 if test x"$with_libunwind_ia64" = xyes; then
5579   for ac_header in libunwind-ia64.h
5580 do :
5581   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5582 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
5583   cat >>confdefs.h <<_ACEOF
5584 #define HAVE_LIBUNWIND_IA64_H 1
5585 _ACEOF
5586
5587 fi
5588
5589 done
5590
5591   if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5592     as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5593   fi
5594   CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5595   CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5596   CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
5597 fi
5598
5599 opt_curses=no
5600
5601 # Check whether --with-curses was given.
5602 if test "${with_curses+set}" = set; then :
5603   withval=$with_curses; opt_curses=$withval
5604 fi
5605
5606
5607 prefer_curses=no
5608 if test "$opt_curses" = "yes"; then
5609   prefer_curses=yes
5610 fi
5611
5612 # Profiling support.
5613 # Check whether --enable-profiling was given.
5614 if test "${enable_profiling+set}" = set; then :
5615   enableval=$enable_profiling; case $enableval in
5616     yes | no)
5617       ;;
5618     *)
5619       as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
5620   esac
5621 else
5622   enable_profiling=no
5623 fi
5624
5625
5626 for ac_func in monstartup _mcleanup
5627 do :
5628   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5629 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5630 eval as_val=\$$as_ac_var
5631    if test "x$as_val" = x""yes; then :
5632   cat >>confdefs.h <<_ACEOF
5633 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5634 _ACEOF
5635
5636 fi
5637 done
5638
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5640 $as_echo_n "checking for _etext... " >&6; }
5641 if test "${ac_cv_var__etext+set}" = set; then :
5642   $as_echo_n "(cached) " >&6
5643 else
5644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5645 /* end confdefs.h.  */
5646 #include <stdlib.h>
5647 extern char _etext;
5648
5649 int
5650 main ()
5651 {
5652 free (&_etext);
5653   ;
5654   return 0;
5655 }
5656 _ACEOF
5657 if ac_fn_c_try_link "$LINENO"; then :
5658   ac_cv_var__etext=yes
5659 else
5660   ac_cv_var__etext=no
5661 fi
5662 rm -f core conftest.err conftest.$ac_objext \
5663     conftest$ac_exeext conftest.$ac_ext
5664 fi
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5666 $as_echo "$ac_cv_var__etext" >&6; }
5667 if test $ac_cv_var__etext = yes; then
5668
5669 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
5670
5671 fi
5672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5673 $as_echo_n "checking for etext... " >&6; }
5674 if test "${ac_cv_var_etext+set}" = set; then :
5675   $as_echo_n "(cached) " >&6
5676 else
5677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5678 /* end confdefs.h.  */
5679 #include <stdlib.h>
5680 extern char etext;
5681
5682 int
5683 main ()
5684 {
5685 free (&etext);
5686   ;
5687   return 0;
5688 }
5689 _ACEOF
5690 if ac_fn_c_try_link "$LINENO"; then :
5691   ac_cv_var_etext=yes
5692 else
5693   ac_cv_var_etext=no
5694 fi
5695 rm -f core conftest.err conftest.$ac_objext \
5696     conftest$ac_exeext conftest.$ac_ext
5697 fi
5698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5699 $as_echo "$ac_cv_var_etext" >&6; }
5700 if test $ac_cv_var_etext = yes; then
5701
5702 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
5703
5704 fi
5705 if test "$enable_profiling" = yes ; then
5706   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
5707     as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
5708   fi
5709   PROFILE_CFLAGS=-pg
5710   OLD_CFLAGS="$CFLAGS"
5711   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
5712
5713   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5714 $as_echo_n "checking whether $CC supports -pg... " >&6; }
5715 if test "${ac_cv_cc_supports_pg+set}" = set; then :
5716   $as_echo_n "(cached) " >&6
5717 else
5718   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5719 /* end confdefs.h.  */
5720
5721 int
5722 main ()
5723 {
5724 int x;
5725   ;
5726   return 0;
5727 }
5728 _ACEOF
5729 if ac_fn_c_try_compile "$LINENO"; then :
5730   ac_cv_cc_supports_pg=yes
5731 else
5732   ac_cv_cc_supports_pg=no
5733 fi
5734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5735 fi
5736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5737 $as_echo "$ac_cv_cc_supports_pg" >&6; }
5738
5739   if test $ac_cv_cc_supports_pg = no; then
5740     as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
5741   fi
5742
5743   CFLAGS="$OLD_CFLAGS"
5744 fi
5745
5746
5747
5748 # Check whether --with-pkgversion was given.
5749 if test "${with_pkgversion+set}" = set; then :
5750   withval=$with_pkgversion; case "$withval" in
5751       yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
5752       no)  PKGVERSION= ;;
5753       *)   PKGVERSION="($withval) " ;;
5754      esac
5755 else
5756   PKGVERSION="(GDB) "
5757
5758 fi
5759
5760
5761
5762
5763
5764 # Check whether --with-bugurl was given.
5765 if test "${with_bugurl+set}" = set; then :
5766   withval=$with_bugurl; case "$withval" in
5767       yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
5768       no)  BUGURL=
5769            ;;
5770       *)   BUGURL="$withval"
5771            ;;
5772      esac
5773 else
5774   BUGURL="http://www.gnu.org/software/gdb/bugs/"
5775
5776 fi
5777
5778   case ${BUGURL} in
5779   "")
5780     REPORT_BUGS_TO=
5781     REPORT_BUGS_TEXI=
5782     ;;
5783   *)
5784     REPORT_BUGS_TO="<$BUGURL>"
5785     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5786     ;;
5787   esac;
5788
5789
5790
5791
5792 cat >>confdefs.h <<_ACEOF
5793 #define PKGVERSION "$PKGVERSION"
5794 _ACEOF
5795
5796
5797 cat >>confdefs.h <<_ACEOF
5798 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5799 _ACEOF
5800
5801
5802 # --------------------- #
5803 # Checks for programs.  #
5804 # --------------------- #
5805
5806 for ac_prog in gawk mawk nawk awk
5807 do
5808   # Extract the first word of "$ac_prog", so it can be a program name with args.
5809 set dummy $ac_prog; ac_word=$2
5810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5811 $as_echo_n "checking for $ac_word... " >&6; }
5812 if test "${ac_cv_prog_AWK+set}" = set; then :
5813   $as_echo_n "(cached) " >&6
5814 else
5815   if test -n "$AWK"; then
5816   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5817 else
5818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5819 for as_dir in $PATH
5820 do
5821   IFS=$as_save_IFS
5822   test -z "$as_dir" && as_dir=.
5823     for ac_exec_ext in '' $ac_executable_extensions; do
5824   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5825     ac_cv_prog_AWK="$ac_prog"
5826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5827     break 2
5828   fi
5829 done
5830   done
5831 IFS=$as_save_IFS
5832
5833 fi
5834 fi
5835 AWK=$ac_cv_prog_AWK
5836 if test -n "$AWK"; then
5837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5838 $as_echo "$AWK" >&6; }
5839 else
5840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5841 $as_echo "no" >&6; }
5842 fi
5843
5844
5845   test -n "$AWK" && break
5846 done
5847
5848 # Find a good install program.  We prefer a C program (faster),
5849 # so one script is as good as another.  But avoid the broken or
5850 # incompatible versions:
5851 # SysV /etc/install, /usr/sbin/install
5852 # SunOS /usr/etc/install
5853 # IRIX /sbin/install
5854 # AIX /bin/install
5855 # AmigaOS /C/install, which installs bootblocks on floppy discs
5856 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5857 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
5858 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5859 # OS/2's system install, which has a completely different semantic
5860 # ./install, which can be erroneously created by make from ./install.sh.
5861 # Reject install programs that cannot install multiple files.
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5863 $as_echo_n "checking for a BSD-compatible install... " >&6; }
5864 if test -z "$INSTALL"; then
5865 if test "${ac_cv_path_install+set}" = set; then :
5866   $as_echo_n "(cached) " >&6
5867 else
5868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5869 for as_dir in $PATH
5870 do
5871   IFS=$as_save_IFS
5872   test -z "$as_dir" && as_dir=.
5873     # Account for people who put trailing slashes in PATH elements.
5874 case $as_dir/ in #((
5875   ./ | .// | /[cC]/* | \
5876   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5877   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5878   /usr/ucb/* ) ;;
5879   *)
5880     # OSF1 and SCO ODT 3.0 have their own names for install.
5881     # Don't use installbsd from OSF since it installs stuff as root
5882     # by default.
5883     for ac_prog in ginstall scoinst install; do
5884       for ac_exec_ext in '' $ac_executable_extensions; do
5885         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5886           if test $ac_prog = install &&
5887             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5888             # AIX install.  It has an incompatible calling convention.
5889             :
5890           elif test $ac_prog = install &&
5891             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5892             # program-specific install script used by HP pwplus--don't use.
5893             :
5894           else
5895             rm -rf conftest.one conftest.two conftest.dir
5896             echo one > conftest.one
5897             echo two > conftest.two
5898             mkdir conftest.dir
5899             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5900               test -s conftest.one && test -s conftest.two &&
5901               test -s conftest.dir/conftest.one &&
5902               test -s conftest.dir/conftest.two
5903             then
5904               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5905               break 3
5906             fi
5907           fi
5908         fi
5909       done
5910     done
5911     ;;
5912 esac
5913
5914   done
5915 IFS=$as_save_IFS
5916
5917 rm -rf conftest.one conftest.two conftest.dir
5918
5919 fi
5920   if test "${ac_cv_path_install+set}" = set; then
5921     INSTALL=$ac_cv_path_install
5922   else
5923     # As a last resort, use the slow shell script.  Don't cache a
5924     # value for INSTALL within a source directory, because that will
5925     # break other packages using the cache if that directory is
5926     # removed, or if the value is a relative name.
5927     INSTALL=$ac_install_sh
5928   fi
5929 fi
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5931 $as_echo "$INSTALL" >&6; }
5932
5933 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5934 # It thinks the first close brace ends the variable substitution.
5935 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5936
5937 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5938
5939 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5940
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5942 $as_echo_n "checking whether ln -s works... " >&6; }
5943 LN_S=$as_ln_s
5944 if test "$LN_S" = "ln -s"; then
5945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5946 $as_echo "yes" >&6; }
5947 else
5948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5949 $as_echo "no, using $LN_S" >&6; }
5950 fi
5951
5952 if test -n "$ac_tool_prefix"; then
5953   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5954 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5956 $as_echo_n "checking for $ac_word... " >&6; }
5957 if test "${ac_cv_prog_RANLIB+set}" = set; then :
5958   $as_echo_n "(cached) " >&6
5959 else
5960   if test -n "$RANLIB"; then
5961   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5962 else
5963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5964 for as_dir in $PATH
5965 do
5966   IFS=$as_save_IFS
5967   test -z "$as_dir" && as_dir=.
5968     for ac_exec_ext in '' $ac_executable_extensions; do
5969   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5970     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5972     break 2
5973   fi
5974 done
5975   done
5976 IFS=$as_save_IFS
5977
5978 fi
5979 fi
5980 RANLIB=$ac_cv_prog_RANLIB
5981 if test -n "$RANLIB"; then
5982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5983 $as_echo "$RANLIB" >&6; }
5984 else
5985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986 $as_echo "no" >&6; }
5987 fi
5988
5989
5990 fi
5991 if test -z "$ac_cv_prog_RANLIB"; then
5992   ac_ct_RANLIB=$RANLIB
5993   # Extract the first word of "ranlib", so it can be a program name with args.
5994 set dummy ranlib; ac_word=$2
5995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5996 $as_echo_n "checking for $ac_word... " >&6; }
5997 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5998   $as_echo_n "(cached) " >&6
5999 else
6000   if test -n "$ac_ct_RANLIB"; then
6001   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6002 else
6003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004 for as_dir in $PATH
6005 do
6006   IFS=$as_save_IFS
6007   test -z "$as_dir" && as_dir=.
6008     for ac_exec_ext in '' $ac_executable_extensions; do
6009   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6010     ac_cv_prog_ac_ct_RANLIB="ranlib"
6011     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6012     break 2
6013   fi
6014 done
6015   done
6016 IFS=$as_save_IFS
6017
6018 fi
6019 fi
6020 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6021 if test -n "$ac_ct_RANLIB"; then
6022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6023 $as_echo "$ac_ct_RANLIB" >&6; }
6024 else
6025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6026 $as_echo "no" >&6; }
6027 fi
6028
6029   if test "x$ac_ct_RANLIB" = x; then
6030     RANLIB=":"
6031   else
6032     case $cross_compiling:$ac_tool_warned in
6033 yes:)
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6035 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6036 ac_tool_warned=yes ;;
6037 esac
6038     RANLIB=$ac_ct_RANLIB
6039   fi
6040 else
6041   RANLIB="$ac_cv_prog_RANLIB"
6042 fi
6043
6044 for ac_prog in 'bison -y' byacc
6045 do
6046   # Extract the first word of "$ac_prog", so it can be a program name with args.
6047 set dummy $ac_prog; ac_word=$2
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6049 $as_echo_n "checking for $ac_word... " >&6; }
6050 if test "${ac_cv_prog_YACC+set}" = set; then :
6051   $as_echo_n "(cached) " >&6
6052 else
6053   if test -n "$YACC"; then
6054   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6055 else
6056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6057 for as_dir in $PATH
6058 do
6059   IFS=$as_save_IFS
6060   test -z "$as_dir" && as_dir=.
6061     for ac_exec_ext in '' $ac_executable_extensions; do
6062   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6063     ac_cv_prog_YACC="$ac_prog"
6064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6065     break 2
6066   fi
6067 done
6068   done
6069 IFS=$as_save_IFS
6070
6071 fi
6072 fi
6073 YACC=$ac_cv_prog_YACC
6074 if test -n "$YACC"; then
6075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6076 $as_echo "$YACC" >&6; }
6077 else
6078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6079 $as_echo "no" >&6; }
6080 fi
6081
6082
6083   test -n "$YACC" && break
6084 done
6085 test -n "$YACC" || YACC="yacc"
6086
6087
6088 if test -n "$ac_tool_prefix"; then
6089   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6090 set dummy ${ac_tool_prefix}ar; ac_word=$2
6091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6092 $as_echo_n "checking for $ac_word... " >&6; }
6093 if test "${ac_cv_prog_AR+set}" = set; then :
6094   $as_echo_n "(cached) " >&6
6095 else
6096   if test -n "$AR"; then
6097   ac_cv_prog_AR="$AR" # Let the user override the test.
6098 else
6099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100 for as_dir in $PATH
6101 do
6102   IFS=$as_save_IFS
6103   test -z "$as_dir" && as_dir=.
6104     for ac_exec_ext in '' $ac_executable_extensions; do
6105   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6106     ac_cv_prog_AR="${ac_tool_prefix}ar"
6107     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6108     break 2
6109   fi
6110 done
6111   done
6112 IFS=$as_save_IFS
6113
6114 fi
6115 fi
6116 AR=$ac_cv_prog_AR
6117 if test -n "$AR"; then
6118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6119 $as_echo "$AR" >&6; }
6120 else
6121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6122 $as_echo "no" >&6; }
6123 fi
6124
6125
6126 fi
6127 if test -z "$ac_cv_prog_AR"; then
6128   ac_ct_AR=$AR
6129   # Extract the first word of "ar", so it can be a program name with args.
6130 set dummy ar; ac_word=$2
6131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6132 $as_echo_n "checking for $ac_word... " >&6; }
6133 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6134   $as_echo_n "(cached) " >&6
6135 else
6136   if test -n "$ac_ct_AR"; then
6137   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6138 else
6139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140 for as_dir in $PATH
6141 do
6142   IFS=$as_save_IFS
6143   test -z "$as_dir" && as_dir=.
6144     for ac_exec_ext in '' $ac_executable_extensions; do
6145   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6146     ac_cv_prog_ac_ct_AR="ar"
6147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6148     break 2
6149   fi
6150 done
6151   done
6152 IFS=$as_save_IFS
6153
6154 fi
6155 fi
6156 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6157 if test -n "$ac_ct_AR"; then
6158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6159 $as_echo "$ac_ct_AR" >&6; }
6160 else
6161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6162 $as_echo "no" >&6; }
6163 fi
6164
6165   if test "x$ac_ct_AR" = x; then
6166     AR=""
6167   else
6168     case $cross_compiling:$ac_tool_warned in
6169 yes:)
6170 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6171 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6172 ac_tool_warned=yes ;;
6173 esac
6174     AR=$ac_ct_AR
6175   fi
6176 else
6177   AR="$ac_cv_prog_AR"
6178 fi
6179
6180 if test -n "$ac_tool_prefix"; then
6181   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6182 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6184 $as_echo_n "checking for $ac_word... " >&6; }
6185 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6186   $as_echo_n "(cached) " >&6
6187 else
6188   if test -n "$DLLTOOL"; then
6189   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6190 else
6191 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6192 for as_dir in $PATH
6193 do
6194   IFS=$as_save_IFS
6195   test -z "$as_dir" && as_dir=.
6196     for ac_exec_ext in '' $ac_executable_extensions; do
6197   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6198     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6200     break 2
6201   fi
6202 done
6203   done
6204 IFS=$as_save_IFS
6205
6206 fi
6207 fi
6208 DLLTOOL=$ac_cv_prog_DLLTOOL
6209 if test -n "$DLLTOOL"; then
6210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6211 $as_echo "$DLLTOOL" >&6; }
6212 else
6213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6214 $as_echo "no" >&6; }
6215 fi
6216
6217
6218 fi
6219 if test -z "$ac_cv_prog_DLLTOOL"; then
6220   ac_ct_DLLTOOL=$DLLTOOL
6221   # Extract the first word of "dlltool", so it can be a program name with args.
6222 set dummy dlltool; ac_word=$2
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6224 $as_echo_n "checking for $ac_word... " >&6; }
6225 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6226   $as_echo_n "(cached) " >&6
6227 else
6228   if test -n "$ac_ct_DLLTOOL"; then
6229   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6230 else
6231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6232 for as_dir in $PATH
6233 do
6234   IFS=$as_save_IFS
6235   test -z "$as_dir" && as_dir=.
6236     for ac_exec_ext in '' $ac_executable_extensions; do
6237   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6238     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6240     break 2
6241   fi
6242 done
6243   done
6244 IFS=$as_save_IFS
6245
6246 fi
6247 fi
6248 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6249 if test -n "$ac_ct_DLLTOOL"; then
6250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6251 $as_echo "$ac_ct_DLLTOOL" >&6; }
6252 else
6253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6254 $as_echo "no" >&6; }
6255 fi
6256
6257   if test "x$ac_ct_DLLTOOL" = x; then
6258     DLLTOOL=""
6259   else
6260     case $cross_compiling:$ac_tool_warned in
6261 yes:)
6262 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6263 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6264 ac_tool_warned=yes ;;
6265 esac
6266     DLLTOOL=$ac_ct_DLLTOOL
6267   fi
6268 else
6269   DLLTOOL="$ac_cv_prog_DLLTOOL"
6270 fi
6271
6272 if test -n "$ac_tool_prefix"; then
6273   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6274 set dummy ${ac_tool_prefix}windres; ac_word=$2
6275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6276 $as_echo_n "checking for $ac_word... " >&6; }
6277 if test "${ac_cv_prog_WINDRES+set}" = set; then :
6278   $as_echo_n "(cached) " >&6
6279 else
6280   if test -n "$WINDRES"; then
6281   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6282 else
6283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6284 for as_dir in $PATH
6285 do
6286   IFS=$as_save_IFS
6287   test -z "$as_dir" && as_dir=.
6288     for ac_exec_ext in '' $ac_executable_extensions; do
6289   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6290     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6292     break 2
6293   fi
6294 done
6295   done
6296 IFS=$as_save_IFS
6297
6298 fi
6299 fi
6300 WINDRES=$ac_cv_prog_WINDRES
6301 if test -n "$WINDRES"; then
6302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6303 $as_echo "$WINDRES" >&6; }
6304 else
6305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6306 $as_echo "no" >&6; }
6307 fi
6308
6309
6310 fi
6311 if test -z "$ac_cv_prog_WINDRES"; then
6312   ac_ct_WINDRES=$WINDRES
6313   # Extract the first word of "windres", so it can be a program name with args.
6314 set dummy windres; ac_word=$2
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6316 $as_echo_n "checking for $ac_word... " >&6; }
6317 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6318   $as_echo_n "(cached) " >&6
6319 else
6320   if test -n "$ac_ct_WINDRES"; then
6321   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6322 else
6323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6324 for as_dir in $PATH
6325 do
6326   IFS=$as_save_IFS
6327   test -z "$as_dir" && as_dir=.
6328     for ac_exec_ext in '' $ac_executable_extensions; do
6329   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6330     ac_cv_prog_ac_ct_WINDRES="windres"
6331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6332     break 2
6333   fi
6334 done
6335   done
6336 IFS=$as_save_IFS
6337
6338 fi
6339 fi
6340 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6341 if test -n "$ac_ct_WINDRES"; then
6342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6343 $as_echo "$ac_ct_WINDRES" >&6; }
6344 else
6345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346 $as_echo "no" >&6; }
6347 fi
6348
6349   if test "x$ac_ct_WINDRES" = x; then
6350     WINDRES=""
6351   else
6352     case $cross_compiling:$ac_tool_warned in
6353 yes:)
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6355 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6356 ac_tool_warned=yes ;;
6357 esac
6358     WINDRES=$ac_ct_WINDRES
6359   fi
6360 else
6361   WINDRES="$ac_cv_prog_WINDRES"
6362 fi
6363
6364
6365 case $host_os in
6366   gnu*)
6367     # Needed for GNU Hurd hosts.
6368     if test -n "$ac_tool_prefix"; then
6369   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6370 set dummy ${ac_tool_prefix}mig; ac_word=$2
6371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6372 $as_echo_n "checking for $ac_word... " >&6; }
6373 if test "${ac_cv_prog_MIG+set}" = set; then :
6374   $as_echo_n "(cached) " >&6
6375 else
6376   if test -n "$MIG"; then
6377   ac_cv_prog_MIG="$MIG" # Let the user override the test.
6378 else
6379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6380 for as_dir in $PATH
6381 do
6382   IFS=$as_save_IFS
6383   test -z "$as_dir" && as_dir=.
6384     for ac_exec_ext in '' $ac_executable_extensions; do
6385   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6386     ac_cv_prog_MIG="${ac_tool_prefix}mig"
6387     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6388     break 2
6389   fi
6390 done
6391   done
6392 IFS=$as_save_IFS
6393
6394 fi
6395 fi
6396 MIG=$ac_cv_prog_MIG
6397 if test -n "$MIG"; then
6398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6399 $as_echo "$MIG" >&6; }
6400 else
6401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6402 $as_echo "no" >&6; }
6403 fi
6404
6405
6406 fi
6407 if test -z "$ac_cv_prog_MIG"; then
6408   ac_ct_MIG=$MIG
6409   # Extract the first word of "mig", so it can be a program name with args.
6410 set dummy mig; ac_word=$2
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6412 $as_echo_n "checking for $ac_word... " >&6; }
6413 if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6414   $as_echo_n "(cached) " >&6
6415 else
6416   if test -n "$ac_ct_MIG"; then
6417   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6418 else
6419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6420 for as_dir in $PATH
6421 do
6422   IFS=$as_save_IFS
6423   test -z "$as_dir" && as_dir=.
6424     for ac_exec_ext in '' $ac_executable_extensions; do
6425   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6426     ac_cv_prog_ac_ct_MIG="mig"
6427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6428     break 2
6429   fi
6430 done
6431   done
6432 IFS=$as_save_IFS
6433
6434 fi
6435 fi
6436 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6437 if test -n "$ac_ct_MIG"; then
6438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6439 $as_echo "$ac_ct_MIG" >&6; }
6440 else
6441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6442 $as_echo "no" >&6; }
6443 fi
6444
6445   if test "x$ac_ct_MIG" = x; then
6446     MIG=""
6447   else
6448     case $cross_compiling:$ac_tool_warned in
6449 yes:)
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6451 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6452 ac_tool_warned=yes ;;
6453 esac
6454     MIG=$ac_ct_MIG
6455   fi
6456 else
6457   MIG="$ac_cv_prog_MIG"
6458 fi
6459
6460     if test x"$MIG" = x; then
6461       as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6462     fi
6463     ;;
6464 esac
6465
6466 # ---------------------- #
6467 # Checks for libraries.  #
6468 # ---------------------- #
6469
6470 # We might need to link with -lm; most simulators need it.
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6472 $as_echo_n "checking for main in -lm... " >&6; }
6473 if test "${ac_cv_lib_m_main+set}" = set; then :
6474   $as_echo_n "(cached) " >&6
6475 else
6476   ac_check_lib_save_LIBS=$LIBS
6477 LIBS="-lm  $LIBS"
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479 /* end confdefs.h.  */
6480
6481
6482 int
6483 main ()
6484 {
6485 return main ();
6486   ;
6487   return 0;
6488 }
6489 _ACEOF
6490 if ac_fn_c_try_link "$LINENO"; then :
6491   ac_cv_lib_m_main=yes
6492 else
6493   ac_cv_lib_m_main=no
6494 fi
6495 rm -f core conftest.err conftest.$ac_objext \
6496     conftest$ac_exeext conftest.$ac_ext
6497 LIBS=$ac_check_lib_save_LIBS
6498 fi
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6500 $as_echo "$ac_cv_lib_m_main" >&6; }
6501 if test "x$ac_cv_lib_m_main" = x""yes; then :
6502   cat >>confdefs.h <<_ACEOF
6503 #define HAVE_LIBM 1
6504 _ACEOF
6505
6506   LIBS="-lm $LIBS"
6507
6508 fi
6509
6510
6511 # We need to link with -lw to get `wctype' on Solaris before Solaris
6512 # 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
6513 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6514 # is known to have this problem).  Therefore we avoid libw if we can.
6515 ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6516 if test "x$ac_cv_func_wctype" = x""yes; then :
6517
6518 else
6519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6520 $as_echo_n "checking for wctype in -lw... " >&6; }
6521 if test "${ac_cv_lib_w_wctype+set}" = set; then :
6522   $as_echo_n "(cached) " >&6
6523 else
6524   ac_check_lib_save_LIBS=$LIBS
6525 LIBS="-lw  $LIBS"
6526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6527 /* end confdefs.h.  */
6528
6529 /* Override any GCC internal prototype to avoid an error.
6530    Use char because int might match the return type of a GCC
6531    builtin and then its argument prototype would still apply.  */
6532 #ifdef __cplusplus
6533 extern "C"
6534 #endif
6535 char wctype ();
6536 int
6537 main ()
6538 {
6539 return wctype ();
6540   ;
6541   return 0;
6542 }
6543 _ACEOF
6544 if ac_fn_c_try_link "$LINENO"; then :
6545   ac_cv_lib_w_wctype=yes
6546 else
6547   ac_cv_lib_w_wctype=no
6548 fi
6549 rm -f core conftest.err conftest.$ac_objext \
6550     conftest$ac_exeext conftest.$ac_ext
6551 LIBS=$ac_check_lib_save_LIBS
6552 fi
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6554 $as_echo "$ac_cv_lib_w_wctype" >&6; }
6555 if test "x$ac_cv_lib_w_wctype" = x""yes; then :
6556   cat >>confdefs.h <<_ACEOF
6557 #define HAVE_LIBW 1
6558 _ACEOF
6559
6560   LIBS="-lw $LIBS"
6561
6562 fi
6563
6564 fi
6565
6566
6567 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
6568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6569 $as_echo_n "checking for library containing gethostbyname... " >&6; }
6570 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6571   $as_echo_n "(cached) " >&6
6572 else
6573   ac_func_search_save_LIBS=$LIBS
6574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6575 /* end confdefs.h.  */
6576
6577 /* Override any GCC internal prototype to avoid an error.
6578    Use char because int might match the return type of a GCC
6579    builtin and then its argument prototype would still apply.  */
6580 #ifdef __cplusplus
6581 extern "C"
6582 #endif
6583 char gethostbyname ();
6584 int
6585 main ()
6586 {
6587 return gethostbyname ();
6588   ;
6589   return 0;
6590 }
6591 _ACEOF
6592 for ac_lib in '' nsl; do
6593   if test -z "$ac_lib"; then
6594     ac_res="none required"
6595   else
6596     ac_res=-l$ac_lib
6597     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6598   fi
6599   if ac_fn_c_try_link "$LINENO"; then :
6600   ac_cv_search_gethostbyname=$ac_res
6601 fi
6602 rm -f core conftest.err conftest.$ac_objext \
6603     conftest$ac_exeext
6604   if test "${ac_cv_search_gethostbyname+set}" = set; then :
6605   break
6606 fi
6607 done
6608 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6609
6610 else
6611   ac_cv_search_gethostbyname=no
6612 fi
6613 rm conftest.$ac_ext
6614 LIBS=$ac_func_search_save_LIBS
6615 fi
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6617 $as_echo "$ac_cv_search_gethostbyname" >&6; }
6618 ac_res=$ac_cv_search_gethostbyname
6619 if test "$ac_res" != no; then :
6620   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6621
6622 fi
6623
6624
6625 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6627 $as_echo_n "checking for library containing socketpair... " >&6; }
6628 if test "${ac_cv_search_socketpair+set}" = set; then :
6629   $as_echo_n "(cached) " >&6
6630 else
6631   ac_func_search_save_LIBS=$LIBS
6632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6633 /* end confdefs.h.  */
6634
6635 /* Override any GCC internal prototype to avoid an error.
6636    Use char because int might match the return type of a GCC
6637    builtin and then its argument prototype would still apply.  */
6638 #ifdef __cplusplus
6639 extern "C"
6640 #endif
6641 char socketpair ();
6642 int
6643 main ()
6644 {
6645 return socketpair ();
6646   ;
6647   return 0;
6648 }
6649 _ACEOF
6650 for ac_lib in '' socket; do
6651   if test -z "$ac_lib"; then
6652     ac_res="none required"
6653   else
6654     ac_res=-l$ac_lib
6655     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6656   fi
6657   if ac_fn_c_try_link "$LINENO"; then :
6658   ac_cv_search_socketpair=$ac_res
6659 fi
6660 rm -f core conftest.err conftest.$ac_objext \
6661     conftest$ac_exeext
6662   if test "${ac_cv_search_socketpair+set}" = set; then :
6663   break
6664 fi
6665 done
6666 if test "${ac_cv_search_socketpair+set}" = set; then :
6667
6668 else
6669   ac_cv_search_socketpair=no
6670 fi
6671 rm conftest.$ac_ext
6672 LIBS=$ac_func_search_save_LIBS
6673 fi
6674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6675 $as_echo "$ac_cv_search_socketpair" >&6; }
6676 ac_res=$ac_cv_search_socketpair
6677 if test "$ac_res" != no; then :
6678   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6679
6680 fi
6681
6682
6683 # Link in zlib if we can.  This allows us to read compressed debug sections.
6684
6685   # See if the user specified whether he wants zlib support or not.
6686
6687 # Check whether --with-zlib was given.
6688 if test "${with_zlib+set}" = set; then :
6689   withval=$with_zlib;
6690 else
6691   with_zlib=auto
6692 fi
6693
6694
6695   if test "$with_zlib" != "no"; then
6696     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
6697 $as_echo_n "checking for library containing zlibVersion... " >&6; }
6698 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6699   $as_echo_n "(cached) " >&6
6700 else
6701   ac_func_search_save_LIBS=$LIBS
6702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6703 /* end confdefs.h.  */
6704
6705 /* Override any GCC internal prototype to avoid an error.
6706    Use char because int might match the return type of a GCC
6707    builtin and then its argument prototype would still apply.  */
6708 #ifdef __cplusplus
6709 extern "C"
6710 #endif
6711 char zlibVersion ();
6712 int
6713 main ()
6714 {
6715 return zlibVersion ();
6716   ;
6717   return 0;
6718 }
6719 _ACEOF
6720 for ac_lib in '' z; do
6721   if test -z "$ac_lib"; then
6722     ac_res="none required"
6723   else
6724     ac_res=-l$ac_lib
6725     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6726   fi
6727   if ac_fn_c_try_link "$LINENO"; then :
6728   ac_cv_search_zlibVersion=$ac_res
6729 fi
6730 rm -f core conftest.err conftest.$ac_objext \
6731     conftest$ac_exeext
6732   if test "${ac_cv_search_zlibVersion+set}" = set; then :
6733   break
6734 fi
6735 done
6736 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6737
6738 else
6739   ac_cv_search_zlibVersion=no
6740 fi
6741 rm conftest.$ac_ext
6742 LIBS=$ac_func_search_save_LIBS
6743 fi
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6745 $as_echo "$ac_cv_search_zlibVersion" >&6; }
6746 ac_res=$ac_cv_search_zlibVersion
6747 if test "$ac_res" != no; then :
6748   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6749   for ac_header in zlib.h
6750 do :
6751   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6752 if test "x$ac_cv_header_zlib_h" = x""yes; then :
6753   cat >>confdefs.h <<_ACEOF
6754 #define HAVE_ZLIB_H 1
6755 _ACEOF
6756
6757 fi
6758
6759 done
6760
6761 fi
6762
6763     if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6764       as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6765     fi
6766   fi
6767
6768
6769 # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6771 $as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6772 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6773   $as_echo_n "(cached) " >&6
6774 else
6775   ac_func_search_save_LIBS=$LIBS
6776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6777 /* end confdefs.h.  */
6778
6779 /* Override any GCC internal prototype to avoid an error.
6780    Use char because int might match the return type of a GCC
6781    builtin and then its argument prototype would still apply.  */
6782 #ifdef __cplusplus
6783 extern "C"
6784 #endif
6785 char dlgetmodinfo ();
6786 int
6787 main ()
6788 {
6789 return dlgetmodinfo ();
6790   ;
6791   return 0;
6792 }
6793 _ACEOF
6794 for ac_lib in '' dl xpdl; do
6795   if test -z "$ac_lib"; then
6796     ac_res="none required"
6797   else
6798     ac_res=-l$ac_lib
6799     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6800   fi
6801   if ac_fn_c_try_link "$LINENO"; then :
6802   ac_cv_search_dlgetmodinfo=$ac_res
6803 fi
6804 rm -f core conftest.err conftest.$ac_objext \
6805     conftest$ac_exeext
6806   if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6807   break
6808 fi
6809 done
6810 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6811
6812 else
6813   ac_cv_search_dlgetmodinfo=no
6814 fi
6815 rm conftest.$ac_ext
6816 LIBS=$ac_func_search_save_LIBS
6817 fi
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6819 $as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6820 ac_res=$ac_cv_search_dlgetmodinfo
6821 if test "$ac_res" != no; then :
6822   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6823
6824 fi
6825
6826
6827
6828
6829
6830 # Check whether --with-libiconv-prefix was given.
6831 if test "${with_libiconv_prefix+set}" = set; then :
6832   withval=$with_libiconv_prefix;
6833     for dir in `echo "$withval" | tr : ' '`; do
6834       if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6835       if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6836     done
6837
6838 fi
6839
6840
6841   BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6842   BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6843
6844   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6845 $as_echo_n "checking for iconv... " >&6; }
6846 if test "${am_cv_func_iconv+set}" = set; then :
6847   $as_echo_n "(cached) " >&6
6848 else
6849
6850     am_cv_func_iconv="no, consider installing GNU libiconv"
6851     am_cv_lib_iconv=no
6852     am_cv_use_build_libiconv=no
6853     am_cv_build_libiconv_path=
6854
6855     # If libiconv is part of the build tree, then try using it over
6856     # any system iconv.
6857     if test -d ../libiconv; then
6858       for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6859         am_save_LIBS="$LIBS"
6860         am_save_CPPFLAGS="$CPPFLAGS"
6861         LIBS="$LIBS $lib_dir/libiconv.a"
6862         CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6863         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6864 /* end confdefs.h.  */
6865 #include <stdlib.h>
6866 #include <iconv.h>
6867 int
6868 main ()
6869 {
6870 iconv_t cd = iconv_open("","");
6871            iconv(cd,NULL,NULL,NULL,NULL);
6872            iconv_close(cd);
6873   ;
6874   return 0;
6875 }
6876 _ACEOF
6877 if ac_fn_c_try_link "$LINENO"; then :
6878   am_cv_use_build_libiconv=yes
6879           am_cv_build_libiconv_path=$lib_dir/libiconv.a
6880           am_cv_lib_iconv=yes
6881           am_cv_func_iconv=yes
6882 fi
6883 rm -f core conftest.err conftest.$ac_objext \
6884     conftest$ac_exeext conftest.$ac_ext
6885         LIBS="$am_save_LIBS"
6886         CPPFLAGS="$am_save_CPPFLAGS"
6887         if test "$am_cv_use_build_libiconv" = "yes"; then
6888           break
6889         fi
6890       done
6891     fi
6892
6893     # Next, try to find iconv in libc.
6894     if test "$am_cv_func_iconv" != yes; then
6895       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6896 /* end confdefs.h.  */
6897 #include <stdlib.h>
6898 #include <iconv.h>
6899 int
6900 main ()
6901 {
6902 iconv_t cd = iconv_open("","");
6903          iconv(cd,NULL,NULL,NULL,NULL);
6904          iconv_close(cd);
6905   ;
6906   return 0;
6907 }
6908 _ACEOF
6909 if ac_fn_c_try_link "$LINENO"; then :
6910   am_cv_func_iconv=yes
6911 fi
6912 rm -f core conftest.err conftest.$ac_objext \
6913     conftest$ac_exeext conftest.$ac_ext
6914     fi
6915
6916     # If iconv was not in libc, try -liconv.  In this case, arrange to
6917     # look in the libiconv prefix, if it was specified by the user.
6918     if test "$am_cv_func_iconv" != yes; then
6919       am_save_CPPFLAGS="$CPPFLAGS"
6920       am_save_LIBS="$LIBS"
6921       if test -n "$LIBICONV_INCLUDE"; then
6922         CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6923         LIBS="$LIBS $LIBICONV_LIBDIR"
6924       fi
6925       LIBS="$LIBS -liconv"
6926       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6927 /* end confdefs.h.  */
6928 #include <stdlib.h>
6929 #include <iconv.h>
6930 int
6931 main ()
6932 {
6933 iconv_t cd = iconv_open("","");
6934          iconv(cd,NULL,NULL,NULL,NULL);
6935          iconv_close(cd);
6936   ;
6937   return 0;
6938 }
6939 _ACEOF
6940 if ac_fn_c_try_link "$LINENO"; then :
6941   am_cv_lib_iconv=yes
6942         am_cv_func_iconv=yes
6943 fi
6944 rm -f core conftest.err conftest.$ac_objext \
6945     conftest$ac_exeext conftest.$ac_ext
6946       LIBS="$am_save_LIBS"
6947       CPPFLAGS="$am_save_CPPFLAGS"
6948     fi
6949
6950 fi
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6952 $as_echo "$am_cv_func_iconv" >&6; }
6953
6954   # Set the various flags based on the cache variables.  We can't rely
6955   # on the flags to remain set from the above code, due to caching.
6956   LIBICONV=
6957   if test "$am_cv_lib_iconv" = yes; then
6958     LIBICONV="-liconv"
6959   else
6960     LIBICONV_LIBDIR=
6961     LIBICONV_INCLUDE=
6962   fi
6963   if test "$am_cv_use_build_libiconv" = yes; then
6964     LIBICONV="$am_cv_build_libiconv_path"
6965     LIBICONV_LIBDIR=""
6966     LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6967   fi
6968   CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6969   LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
6970
6971   if test "$am_cv_func_iconv" = yes; then
6972
6973 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
6974
6975     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6976 $as_echo_n "checking for iconv declaration... " >&6; }
6977     if test "${am_cv_proto_iconv+set}" = set; then :
6978   $as_echo_n "(cached) " >&6
6979 else
6980
6981       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6982 /* end confdefs.h.  */
6983
6984 #include <stdlib.h>
6985 #include <iconv.h>
6986 extern
6987 #ifdef __cplusplus
6988 "C"
6989 #endif
6990 #if defined(__STDC__) || defined(__cplusplus)
6991 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6992 #else
6993 size_t iconv();
6994 #endif
6995
6996 int
6997 main ()
6998 {
6999
7000   ;
7001   return 0;
7002 }
7003 _ACEOF
7004 if ac_fn_c_try_compile "$LINENO"; then :
7005   am_cv_proto_iconv_arg1=""
7006 else
7007   am_cv_proto_iconv_arg1="const"
7008 fi
7009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7010       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);"
7011 fi
7012
7013     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
7014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
7015          }$am_cv_proto_iconv" >&5
7016 $as_echo "${ac_t:-
7017          }$am_cv_proto_iconv" >&6; }
7018
7019 cat >>confdefs.h <<_ACEOF
7020 #define ICONV_CONST $am_cv_proto_iconv_arg1
7021 _ACEOF
7022
7023   fi
7024
7025
7026 # GDB may fork/exec the iconv program to get the list of supported character
7027 # sets.  Allow the user to specify where to find it.
7028 # There are several factors affecting the choice of option name:
7029 # - There is already --with-libiconv-prefix but we can't use it, it specifies
7030 #   the build-time location of libiconv files.
7031 # - The program we need to find is iconv, which comes with glibc.  The user
7032 #   doesn't necessarily have libiconv installed.  Therefore naming this
7033 #   --with-libiconv-foo feels wrong.
7034 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7035 #   defined to work on directories not files (though it really doesn't know
7036 #   the difference).
7037 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
7038 #   with --with-libiconv-prefix.
7039 # Putting these together is why the option name is --with-iconv-bin.
7040
7041
7042 # Check whether --with-iconv-bin was given.
7043 if test "${with_iconv_bin+set}" = set; then :
7044   withval=$with_iconv_bin; iconv_bin="${withval}"
7045
7046 cat >>confdefs.h <<_ACEOF
7047 #define ICONV_BIN "${iconv_bin}"
7048 _ACEOF
7049
7050
7051   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7052      if test "x$prefix" = xNONE; then
7053         test_prefix=/usr/local
7054      else
7055         test_prefix=$prefix
7056      fi
7057   else
7058      test_prefix=$exec_prefix
7059   fi
7060   value=0
7061   case ${iconv_bin} in
7062      "${test_prefix}"|"${test_prefix}/"*|\
7063         '${exec_prefix}'|'${exec_prefix}/'*)
7064      value=1
7065      ;;
7066   esac
7067
7068 cat >>confdefs.h <<_ACEOF
7069 #define ICONV_BIN_RELOCATABLE $value
7070 _ACEOF
7071
7072
7073
7074 fi
7075
7076
7077 # For the TUI, we need enhanced curses functionality.
7078 if test x"$enable_tui" != xno; then
7079   prefer_curses=yes
7080 fi
7081
7082 curses_found=no
7083 if test x"$prefer_curses" = xyes; then
7084   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7085   # curses library because the latter might not provide all the
7086   # functionality we need.  However, this leads to problems on systems
7087   # where the linker searches /usr/local/lib, but the compiler doesn't
7088   # search /usr/local/include, if ncurses is installed in /usr/local.  A
7089   # default installation of ncurses on alpha*-dec-osf* will lead to such
7090   # a situation.
7091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7092 $as_echo_n "checking for library containing waddstr... " >&6; }
7093 if test "${ac_cv_search_waddstr+set}" = set; then :
7094   $as_echo_n "(cached) " >&6
7095 else
7096   ac_func_search_save_LIBS=$LIBS
7097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7098 /* end confdefs.h.  */
7099
7100 /* Override any GCC internal prototype to avoid an error.
7101    Use char because int might match the return type of a GCC
7102    builtin and then its argument prototype would still apply.  */
7103 #ifdef __cplusplus
7104 extern "C"
7105 #endif
7106 char waddstr ();
7107 int
7108 main ()
7109 {
7110 return waddstr ();
7111   ;
7112   return 0;
7113 }
7114 _ACEOF
7115 for ac_lib in '' ncurses cursesX curses; do
7116   if test -z "$ac_lib"; then
7117     ac_res="none required"
7118   else
7119     ac_res=-l$ac_lib
7120     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7121   fi
7122   if ac_fn_c_try_link "$LINENO"; then :
7123   ac_cv_search_waddstr=$ac_res
7124 fi
7125 rm -f core conftest.err conftest.$ac_objext \
7126     conftest$ac_exeext
7127   if test "${ac_cv_search_waddstr+set}" = set; then :
7128   break
7129 fi
7130 done
7131 if test "${ac_cv_search_waddstr+set}" = set; then :
7132
7133 else
7134   ac_cv_search_waddstr=no
7135 fi
7136 rm conftest.$ac_ext
7137 LIBS=$ac_func_search_save_LIBS
7138 fi
7139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7140 $as_echo "$ac_cv_search_waddstr" >&6; }
7141 ac_res=$ac_cv_search_waddstr
7142 if test "$ac_res" != no; then :
7143   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7144
7145 fi
7146
7147
7148   if test "$ac_cv_search_waddstr" != no; then
7149     curses_found=yes
7150   fi
7151 fi
7152
7153 # Check whether we should enable the TUI, but only do so if we really
7154 # can.
7155 if test x"$enable_tui" != xno; then
7156   if test -d $srcdir/tui; then
7157     if test "$curses_found" != no; then
7158       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7159       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7160       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7161       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
7162     else
7163       if test x"$enable_tui" = xyes; then
7164         as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
7165       else
7166         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7167 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
7168       fi
7169     fi
7170   fi
7171 fi
7172
7173 # Since GDB uses Readline, we need termcap functionality.  In many
7174 # cases this will be provided by the curses library, but some systems
7175 # have a seperate termcap library, or no curses library at all.
7176
7177 case $host_os in
7178   cygwin*)
7179     if test -d $srcdir/libtermcap; then
7180       LIBS="../libtermcap/libtermcap.a $LIBS"
7181       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7182     fi ;;
7183   go32* | *djgpp*)
7184     ac_cv_search_tgetent="none required"
7185     ;;
7186   *mingw32*)
7187     ac_cv_search_tgetent="none required"
7188     CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
7189     ;;
7190 esac
7191
7192 # These are the libraries checked by Readline.
7193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7194 $as_echo_n "checking for library containing tgetent... " >&6; }
7195 if test "${ac_cv_search_tgetent+set}" = set; then :
7196   $as_echo_n "(cached) " >&6
7197 else
7198   ac_func_search_save_LIBS=$LIBS
7199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200 /* end confdefs.h.  */
7201
7202 /* Override any GCC internal prototype to avoid an error.
7203    Use char because int might match the return type of a GCC
7204    builtin and then its argument prototype would still apply.  */
7205 #ifdef __cplusplus
7206 extern "C"
7207 #endif
7208 char tgetent ();
7209 int
7210 main ()
7211 {
7212 return tgetent ();
7213   ;
7214   return 0;
7215 }
7216 _ACEOF
7217 for ac_lib in '' termcap tinfo curses ncurses; do
7218   if test -z "$ac_lib"; then
7219     ac_res="none required"
7220   else
7221     ac_res=-l$ac_lib
7222     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7223   fi
7224   if ac_fn_c_try_link "$LINENO"; then :
7225   ac_cv_search_tgetent=$ac_res
7226 fi
7227 rm -f core conftest.err conftest.$ac_objext \
7228     conftest$ac_exeext
7229   if test "${ac_cv_search_tgetent+set}" = set; then :
7230   break
7231 fi
7232 done
7233 if test "${ac_cv_search_tgetent+set}" = set; then :
7234
7235 else
7236   ac_cv_search_tgetent=no
7237 fi
7238 rm conftest.$ac_ext
7239 LIBS=$ac_func_search_save_LIBS
7240 fi
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7242 $as_echo "$ac_cv_search_tgetent" >&6; }
7243 ac_res=$ac_cv_search_tgetent
7244 if test "$ac_res" != no; then :
7245   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7246
7247 fi
7248
7249
7250 if test "$ac_cv_search_tgetent" = no; then
7251   as_fn_error "no termcap library found" "$LINENO" 5
7252 fi
7253
7254
7255 # Check whether --with-system-readline was given.
7256 if test "${with_system_readline+set}" = set; then :
7257   withval=$with_system_readline;
7258 fi
7259
7260
7261 if test "$with_system_readline" = yes; then
7262   READLINE=-lreadline
7263   READLINE_DEPS=
7264   READLINE_CFLAGS=
7265   READLINE_TEXI_INCFLAG=
7266 else
7267   READLINE='$(READLINE_DIR)/libreadline.a'
7268   READLINE_DEPS='$(READLINE)'
7269   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
7270   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
7271 fi
7272
7273
7274
7275
7276
7277 # Generate jit-reader.h
7278
7279 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7280 TARGET_PTR=
7281
7282 # The cast to long int works around a bug in the HP C Compiler
7283 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7284 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7285 # This bug is HP SR number 8606223364.
7286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7287 $as_echo_n "checking size of unsigned long long... " >&6; }
7288 if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7289   $as_echo_n "(cached) " >&6
7290 else
7291   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
7292
7293 else
7294   if test "$ac_cv_type_unsigned_long_long" = yes; then
7295      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7296 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7297 { as_fn_set_status 77
7298 as_fn_error "cannot compute sizeof (unsigned long long)
7299 See \`config.log' for more details." "$LINENO" 5; }; }
7300    else
7301      ac_cv_sizeof_unsigned_long_long=0
7302    fi
7303 fi
7304
7305 fi
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7307 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7308
7309
7310
7311 cat >>confdefs.h <<_ACEOF
7312 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7313 _ACEOF
7314
7315
7316 # The cast to long int works around a bug in the HP C Compiler
7317 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7318 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7319 # This bug is HP SR number 8606223364.
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7321 $as_echo_n "checking size of unsigned long... " >&6; }
7322 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7323   $as_echo_n "(cached) " >&6
7324 else
7325   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
7326
7327 else
7328   if test "$ac_cv_type_unsigned_long" = yes; then
7329      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7330 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7331 { as_fn_set_status 77
7332 as_fn_error "cannot compute sizeof (unsigned long)
7333 See \`config.log' for more details." "$LINENO" 5; }; }
7334    else
7335      ac_cv_sizeof_unsigned_long=0
7336    fi
7337 fi
7338
7339 fi
7340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7341 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7342
7343
7344
7345 cat >>confdefs.h <<_ACEOF
7346 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7347 _ACEOF
7348
7349
7350 # The cast to long int works around a bug in the HP C Compiler
7351 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7352 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7353 # This bug is HP SR number 8606223364.
7354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7355 $as_echo_n "checking size of unsigned __int128... " >&6; }
7356 if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7357   $as_echo_n "(cached) " >&6
7358 else
7359   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
7360
7361 else
7362   if test "$ac_cv_type_unsigned___int128" = yes; then
7363      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7364 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7365 { as_fn_set_status 77
7366 as_fn_error "cannot compute sizeof (unsigned __int128)
7367 See \`config.log' for more details." "$LINENO" 5; }; }
7368    else
7369      ac_cv_sizeof_unsigned___int128=0
7370    fi
7371 fi
7372
7373 fi
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7375 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7376
7377
7378
7379 cat >>confdefs.h <<_ACEOF
7380 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7381 _ACEOF
7382
7383
7384
7385 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7386   TARGET_PTR="unsigned long"
7387 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7388   TARGET_PTR="unsigned long long"
7389 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7390   TARGET_PTR="unsigned __int128"
7391 else
7392   TARGET_PTR="unsigned long"
7393 fi
7394
7395
7396 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7397
7398
7399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7400 $as_echo_n "checking for library containing dlopen... " >&6; }
7401 if test "${ac_cv_search_dlopen+set}" = set; then :
7402   $as_echo_n "(cached) " >&6
7403 else
7404   ac_func_search_save_LIBS=$LIBS
7405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7406 /* end confdefs.h.  */
7407
7408 /* Override any GCC internal prototype to avoid an error.
7409    Use char because int might match the return type of a GCC
7410    builtin and then its argument prototype would still apply.  */
7411 #ifdef __cplusplus
7412 extern "C"
7413 #endif
7414 char dlopen ();
7415 int
7416 main ()
7417 {
7418 return dlopen ();
7419   ;
7420   return 0;
7421 }
7422 _ACEOF
7423 for ac_lib in '' dl; do
7424   if test -z "$ac_lib"; then
7425     ac_res="none required"
7426   else
7427     ac_res=-l$ac_lib
7428     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7429   fi
7430   if ac_fn_c_try_link "$LINENO"; then :
7431   ac_cv_search_dlopen=$ac_res
7432 fi
7433 rm -f core conftest.err conftest.$ac_objext \
7434     conftest$ac_exeext
7435   if test "${ac_cv_search_dlopen+set}" = set; then :
7436   break
7437 fi
7438 done
7439 if test "${ac_cv_search_dlopen+set}" = set; then :
7440
7441 else
7442   ac_cv_search_dlopen=no
7443 fi
7444 rm conftest.$ac_ext
7445 LIBS=$ac_func_search_save_LIBS
7446 fi
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7448 $as_echo "$ac_cv_search_dlopen" >&6; }
7449 ac_res=$ac_cv_search_dlopen
7450 if test "$ac_res" != no; then :
7451   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7452
7453 fi
7454
7455
7456
7457
7458 # Check whether --with-jit-reader-dir was given.
7459 if test "${with_jit_reader_dir+set}" = set; then :
7460   withval=$with_jit_reader_dir;
7461     JIT_READER_DIR=$withval
7462 else
7463   JIT_READER_DIR=${libdir}/gdb
7464 fi
7465
7466
7467   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7468   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7469   ac_define_dir=`eval echo $JIT_READER_DIR`
7470   ac_define_dir=`eval echo $ac_define_dir`
7471
7472 cat >>confdefs.h <<_ACEOF
7473 #define JIT_READER_DIR "$ac_define_dir"
7474 _ACEOF
7475
7476
7477
7478
7479   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7480      if test "x$prefix" = xNONE; then
7481         test_prefix=/usr/local
7482      else
7483         test_prefix=$prefix
7484      fi
7485   else
7486      test_prefix=$exec_prefix
7487   fi
7488   value=0
7489   case ${ac_define_dir} in
7490      "${test_prefix}"|"${test_prefix}/"*|\
7491         '${exec_prefix}'|'${exec_prefix}/'*)
7492      value=1
7493      ;;
7494   esac
7495
7496 cat >>confdefs.h <<_ACEOF
7497 #define JIT_READER_DIR_RELOCATABLE $value
7498 _ACEOF
7499
7500
7501
7502
7503
7504 # Check whether --with-expat was given.
7505 if test "${with_expat+set}" = set; then :
7506   withval=$with_expat;
7507 else
7508   with_expat=auto
7509 fi
7510
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7512 $as_echo_n "checking whether to use expat... " >&6; }
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7514 $as_echo "$with_expat" >&6; }
7515
7516 if test "${with_expat}" = no; then
7517   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7518 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
7519   HAVE_LIBEXPAT=no
7520 else
7521
7522       if test "X$prefix" = "XNONE"; then
7523     acl_final_prefix="$ac_default_prefix"
7524   else
7525     acl_final_prefix="$prefix"
7526   fi
7527   if test "X$exec_prefix" = "XNONE"; then
7528     acl_final_exec_prefix='${prefix}'
7529   else
7530     acl_final_exec_prefix="$exec_prefix"
7531   fi
7532   acl_save_prefix="$prefix"
7533   prefix="$acl_final_prefix"
7534   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7535   prefix="$acl_save_prefix"
7536
7537
7538 # Check whether --with-gnu-ld was given.
7539 if test "${with_gnu_ld+set}" = set; then :
7540   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7541 else
7542   with_gnu_ld=no
7543 fi
7544
7545 # Prepare PATH_SEPARATOR.
7546 # The user is always right.
7547 if test "${PATH_SEPARATOR+set}" != set; then
7548   echo "#! /bin/sh" >conf$$.sh
7549   echo  "exit 0"   >>conf$$.sh
7550   chmod +x conf$$.sh
7551   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7552     PATH_SEPARATOR=';'
7553   else
7554     PATH_SEPARATOR=:
7555   fi
7556   rm -f conf$$.sh
7557 fi
7558 ac_prog=ld
7559 if test "$GCC" = yes; then
7560   # Check if gcc -print-prog-name=ld gives a path.
7561   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7562 $as_echo_n "checking for ld used by GCC... " >&6; }
7563   case $host in
7564   *-*-mingw*)
7565     # gcc leaves a trailing carriage return which upsets mingw
7566     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7567   *)
7568     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7569   esac
7570   case $ac_prog in
7571     # Accept absolute paths.
7572     [\\/]* | [A-Za-z]:[\\/]*)
7573       re_direlt='/[^/][^/]*/\.\./'
7574       # Canonicalize the path of ld
7575       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7576       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7577         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7578       done
7579       test -z "$LD" && LD="$ac_prog"
7580       ;;
7581   "")
7582     # If it fails, then pretend we aren't using GCC.
7583     ac_prog=ld
7584     ;;
7585   *)
7586     # If it is relative, then search for the first ld in PATH.
7587     with_gnu_ld=unknown
7588     ;;
7589   esac
7590 elif test "$with_gnu_ld" = yes; then
7591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7592 $as_echo_n "checking for GNU ld... " >&6; }
7593 else
7594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7595 $as_echo_n "checking for non-GNU ld... " >&6; }
7596 fi
7597 if test "${acl_cv_path_LD+set}" = set; then :
7598   $as_echo_n "(cached) " >&6
7599 else
7600   if test -z "$LD"; then
7601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7602   for ac_dir in $PATH; do
7603     test -z "$ac_dir" && ac_dir=.
7604     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7605       acl_cv_path_LD="$ac_dir/$ac_prog"
7606       # Check to see if the program is GNU ld.  I'd rather use --version,
7607       # but apparently some GNU ld's only accept -v.
7608       # Break only if it was the GNU/non-GNU ld that we prefer.
7609       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7610         test "$with_gnu_ld" != no && break
7611       else
7612         test "$with_gnu_ld" != yes && break
7613       fi
7614     fi
7615   done
7616   IFS="$ac_save_ifs"
7617 else
7618   acl_cv_path_LD="$LD" # Let the user override the test with a path.
7619 fi
7620 fi
7621
7622 LD="$acl_cv_path_LD"
7623 if test -n "$LD"; then
7624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7625 $as_echo "$LD" >&6; }
7626 else
7627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7628 $as_echo "no" >&6; }
7629 fi
7630 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7632 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7633 if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7634   $as_echo_n "(cached) " >&6
7635 else
7636   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7637 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7638   acl_cv_prog_gnu_ld=yes
7639 else
7640   acl_cv_prog_gnu_ld=no
7641 fi
7642 fi
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7644 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
7645 with_gnu_ld=$acl_cv_prog_gnu_ld
7646
7647
7648
7649                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7650 $as_echo_n "checking for shared library run path origin... " >&6; }
7651 if test "${acl_cv_rpath+set}" = set; then :
7652   $as_echo_n "(cached) " >&6
7653 else
7654
7655     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7656     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7657     . ./conftest.sh
7658     rm -f ./conftest.sh
7659     acl_cv_rpath=done
7660
7661 fi
7662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7663 $as_echo "$acl_cv_rpath" >&6; }
7664   wl="$acl_cv_wl"
7665   libext="$acl_cv_libext"
7666   shlibext="$acl_cv_shlibext"
7667   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7668   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7669   hardcode_direct="$acl_cv_hardcode_direct"
7670   hardcode_minus_L="$acl_cv_hardcode_minus_L"
7671     # Check whether --enable-rpath was given.
7672 if test "${enable_rpath+set}" = set; then :
7673   enableval=$enable_rpath; :
7674 else
7675   enable_rpath=yes
7676 fi
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687     use_additional=yes
7688
7689   acl_save_prefix="$prefix"
7690   prefix="$acl_final_prefix"
7691   acl_save_exec_prefix="$exec_prefix"
7692   exec_prefix="$acl_final_exec_prefix"
7693
7694     eval additional_includedir=\"$includedir\"
7695     eval additional_libdir=\"$libdir\"
7696
7697   exec_prefix="$acl_save_exec_prefix"
7698   prefix="$acl_save_prefix"
7699
7700
7701 # Check whether --with-libexpat-prefix was given.
7702 if test "${with_libexpat_prefix+set}" = set; then :
7703   withval=$with_libexpat_prefix;
7704     if test "X$withval" = "Xno"; then
7705       use_additional=no
7706     else
7707       if test "X$withval" = "X"; then
7708
7709   acl_save_prefix="$prefix"
7710   prefix="$acl_final_prefix"
7711   acl_save_exec_prefix="$exec_prefix"
7712   exec_prefix="$acl_final_exec_prefix"
7713
7714           eval additional_includedir=\"$includedir\"
7715           eval additional_libdir=\"$libdir\"
7716
7717   exec_prefix="$acl_save_exec_prefix"
7718   prefix="$acl_save_prefix"
7719
7720       else
7721         additional_includedir="$withval/include"
7722         additional_libdir="$withval/lib"
7723       fi
7724     fi
7725
7726 fi
7727
7728       LIBEXPAT=
7729   LTLIBEXPAT=
7730   INCEXPAT=
7731   rpathdirs=
7732   ltrpathdirs=
7733   names_already_handled=
7734   names_next_round='expat '
7735   while test -n "$names_next_round"; do
7736     names_this_round="$names_next_round"
7737     names_next_round=
7738     for name in $names_this_round; do
7739       already_handled=
7740       for n in $names_already_handled; do
7741         if test "$n" = "$name"; then
7742           already_handled=yes
7743           break
7744         fi
7745       done
7746       if test -z "$already_handled"; then
7747         names_already_handled="$names_already_handled $name"
7748                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7749         eval value=\"\$HAVE_LIB$uppername\"
7750         if test -n "$value"; then
7751           if test "$value" = yes; then
7752             eval value=\"\$LIB$uppername\"
7753             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7754             eval value=\"\$LTLIB$uppername\"
7755             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7756           else
7757                                     :
7758           fi
7759         else
7760                               found_dir=
7761           found_la=
7762           found_so=
7763           found_a=
7764           if test $use_additional = yes; then
7765             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7766               found_dir="$additional_libdir"
7767               found_so="$additional_libdir/lib$name.$shlibext"
7768               if test -f "$additional_libdir/lib$name.la"; then
7769                 found_la="$additional_libdir/lib$name.la"
7770               fi
7771             else
7772               if test -f "$additional_libdir/lib$name.$libext"; then
7773                 found_dir="$additional_libdir"
7774                 found_a="$additional_libdir/lib$name.$libext"
7775                 if test -f "$additional_libdir/lib$name.la"; then
7776                   found_la="$additional_libdir/lib$name.la"
7777                 fi
7778               fi
7779             fi
7780           fi
7781           if test "X$found_dir" = "X"; then
7782             for x in $LDFLAGS $LTLIBEXPAT; do
7783
7784   acl_save_prefix="$prefix"
7785   prefix="$acl_final_prefix"
7786   acl_save_exec_prefix="$exec_prefix"
7787   exec_prefix="$acl_final_exec_prefix"
7788   eval x=\"$x\"
7789   exec_prefix="$acl_save_exec_prefix"
7790   prefix="$acl_save_prefix"
7791
7792               case "$x" in
7793                 -L*)
7794                   dir=`echo "X$x" | sed -e 's/^X-L//'`
7795                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7796                     found_dir="$dir"
7797                     found_so="$dir/lib$name.$shlibext"
7798                     if test -f "$dir/lib$name.la"; then
7799                       found_la="$dir/lib$name.la"
7800                     fi
7801                   else
7802                     if test -f "$dir/lib$name.$libext"; then
7803                       found_dir="$dir"
7804                       found_a="$dir/lib$name.$libext"
7805                       if test -f "$dir/lib$name.la"; then
7806                         found_la="$dir/lib$name.la"
7807                       fi
7808                     fi
7809                   fi
7810                   ;;
7811               esac
7812               if test "X$found_dir" != "X"; then
7813                 break
7814               fi
7815             done
7816           fi
7817           if test "X$found_dir" != "X"; then
7818                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7819             if test "X$found_so" != "X"; then
7820                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7821                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7822               else
7823                                                                                 haveit=
7824                 for x in $ltrpathdirs; do
7825                   if test "X$x" = "X$found_dir"; then
7826                     haveit=yes
7827                     break
7828                   fi
7829                 done
7830                 if test -z "$haveit"; then
7831                   ltrpathdirs="$ltrpathdirs $found_dir"
7832                 fi
7833                                 if test "$hardcode_direct" = yes; then
7834                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7835                 else
7836                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7837                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7838                                                             haveit=
7839                     for x in $rpathdirs; do
7840                       if test "X$x" = "X$found_dir"; then
7841                         haveit=yes
7842                         break
7843                       fi
7844                     done
7845                     if test -z "$haveit"; then
7846                       rpathdirs="$rpathdirs $found_dir"
7847                     fi
7848                   else
7849                                                                                 haveit=
7850                     for x in $LDFLAGS $LIBEXPAT; do
7851
7852   acl_save_prefix="$prefix"
7853   prefix="$acl_final_prefix"
7854   acl_save_exec_prefix="$exec_prefix"
7855   exec_prefix="$acl_final_exec_prefix"
7856   eval x=\"$x\"
7857   exec_prefix="$acl_save_exec_prefix"
7858   prefix="$acl_save_prefix"
7859
7860                       if test "X$x" = "X-L$found_dir"; then
7861                         haveit=yes
7862                         break
7863                       fi
7864                     done
7865                     if test -z "$haveit"; then
7866                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7867                     fi
7868                     if test "$hardcode_minus_L" != no; then
7869                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7870                     else
7871                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7872                     fi
7873                   fi
7874                 fi
7875               fi
7876             else
7877               if test "X$found_a" != "X"; then
7878                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7879               else
7880                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7881               fi
7882             fi
7883                         additional_includedir=
7884             case "$found_dir" in
7885               */lib | */lib/)
7886                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7887                 additional_includedir="$basedir/include"
7888                 ;;
7889             esac
7890             if test "X$additional_includedir" != "X"; then
7891                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
7892                 haveit=
7893                 if test "X$additional_includedir" = "X/usr/local/include"; then
7894                   if test -n "$GCC"; then
7895                     case $host_os in
7896                       linux*) haveit=yes;;
7897                     esac
7898                   fi
7899                 fi
7900                 if test -z "$haveit"; then
7901                   for x in $CPPFLAGS $INCEXPAT; do
7902
7903   acl_save_prefix="$prefix"
7904   prefix="$acl_final_prefix"
7905   acl_save_exec_prefix="$exec_prefix"
7906   exec_prefix="$acl_final_exec_prefix"
7907   eval x=\"$x\"
7908   exec_prefix="$acl_save_exec_prefix"
7909   prefix="$acl_save_prefix"
7910
7911                     if test "X$x" = "X-I$additional_includedir"; then
7912                       haveit=yes
7913                       break
7914                     fi
7915                   done
7916                   if test -z "$haveit"; then
7917                     if test -d "$additional_includedir"; then
7918                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7919                     fi
7920                   fi
7921                 fi
7922               fi
7923             fi
7924                         if test -n "$found_la"; then
7925                                                         save_libdir="$libdir"
7926               case "$found_la" in
7927                 */* | *\\*) . "$found_la" ;;
7928                 *) . "./$found_la" ;;
7929               esac
7930               libdir="$save_libdir"
7931                             for dep in $dependency_libs; do
7932                 case "$dep" in
7933                   -L*)
7934                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7935                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
7936                       haveit=
7937                       if test "X$additional_libdir" = "X/usr/local/lib"; then
7938                         if test -n "$GCC"; then
7939                           case $host_os in
7940                             linux*) haveit=yes;;
7941                           esac
7942                         fi
7943                       fi
7944                       if test -z "$haveit"; then
7945                         haveit=
7946                         for x in $LDFLAGS $LIBEXPAT; do
7947
7948   acl_save_prefix="$prefix"
7949   prefix="$acl_final_prefix"
7950   acl_save_exec_prefix="$exec_prefix"
7951   exec_prefix="$acl_final_exec_prefix"
7952   eval x=\"$x\"
7953   exec_prefix="$acl_save_exec_prefix"
7954   prefix="$acl_save_prefix"
7955
7956                           if test "X$x" = "X-L$additional_libdir"; then
7957                             haveit=yes
7958                             break
7959                           fi
7960                         done
7961                         if test -z "$haveit"; then
7962                           if test -d "$additional_libdir"; then
7963                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7964                           fi
7965                         fi
7966                         haveit=
7967                         for x in $LDFLAGS $LTLIBEXPAT; do
7968
7969   acl_save_prefix="$prefix"
7970   prefix="$acl_final_prefix"
7971   acl_save_exec_prefix="$exec_prefix"
7972   exec_prefix="$acl_final_exec_prefix"
7973   eval x=\"$x\"
7974   exec_prefix="$acl_save_exec_prefix"
7975   prefix="$acl_save_prefix"
7976
7977                           if test "X$x" = "X-L$additional_libdir"; then
7978                             haveit=yes
7979                             break
7980                           fi
7981                         done
7982                         if test -z "$haveit"; then
7983                           if test -d "$additional_libdir"; then
7984                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7985                           fi
7986                         fi
7987                       fi
7988                     fi
7989                     ;;
7990                   -R*)
7991                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
7992                     if test "$enable_rpath" != no; then
7993                                                                   haveit=
7994                       for x in $rpathdirs; do
7995                         if test "X$x" = "X$dir"; then
7996                           haveit=yes
7997                           break
7998                         fi
7999                       done
8000                       if test -z "$haveit"; then
8001                         rpathdirs="$rpathdirs $dir"
8002                       fi
8003                                                                   haveit=
8004                       for x in $ltrpathdirs; do
8005                         if test "X$x" = "X$dir"; then
8006                           haveit=yes
8007                           break
8008                         fi
8009                       done
8010                       if test -z "$haveit"; then
8011                         ltrpathdirs="$ltrpathdirs $dir"
8012                       fi
8013                     fi
8014                     ;;
8015                   -l*)
8016                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8017                     ;;
8018                   *.la)
8019                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8020                     ;;
8021                   *)
8022                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8023                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8024                     ;;
8025                 esac
8026               done
8027             fi
8028           else
8029                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8030             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8031           fi
8032         fi
8033       fi
8034     done
8035   done
8036   if test "X$rpathdirs" != "X"; then
8037     if test -n "$hardcode_libdir_separator"; then
8038                         alldirs=
8039       for found_dir in $rpathdirs; do
8040         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8041       done
8042             acl_save_libdir="$libdir"
8043       libdir="$alldirs"
8044       eval flag=\"$hardcode_libdir_flag_spec\"
8045       libdir="$acl_save_libdir"
8046       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8047     else
8048             for found_dir in $rpathdirs; do
8049         acl_save_libdir="$libdir"
8050         libdir="$found_dir"
8051         eval flag=\"$hardcode_libdir_flag_spec\"
8052         libdir="$acl_save_libdir"
8053         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8054       done
8055     fi
8056   fi
8057   if test "X$ltrpathdirs" != "X"; then
8058             for found_dir in $ltrpathdirs; do
8059       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8060     done
8061   fi
8062
8063
8064         ac_save_CPPFLAGS="$CPPFLAGS"
8065
8066   for element in $INCEXPAT; do
8067     haveit=
8068     for x in $CPPFLAGS; do
8069
8070   acl_save_prefix="$prefix"
8071   prefix="$acl_final_prefix"
8072   acl_save_exec_prefix="$exec_prefix"
8073   exec_prefix="$acl_final_exec_prefix"
8074   eval x=\"$x\"
8075   exec_prefix="$acl_save_exec_prefix"
8076   prefix="$acl_save_prefix"
8077
8078       if test "X$x" = "X$element"; then
8079         haveit=yes
8080         break
8081       fi
8082     done
8083     if test -z "$haveit"; then
8084       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8085     fi
8086   done
8087
8088
8089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8090 $as_echo_n "checking for libexpat... " >&6; }
8091 if test "${ac_cv_libexpat+set}" = set; then :
8092   $as_echo_n "(cached) " >&6
8093 else
8094
8095     ac_save_LIBS="$LIBS"
8096     LIBS="$LIBS $LIBEXPAT"
8097     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8098 /* end confdefs.h.  */
8099 #include "expat.h"
8100 int
8101 main ()
8102 {
8103 XML_Parser p = XML_ParserCreate (0);
8104   ;
8105   return 0;
8106 }
8107 _ACEOF
8108 if ac_fn_c_try_link "$LINENO"; then :
8109   ac_cv_libexpat=yes
8110 else
8111   ac_cv_libexpat=no
8112 fi
8113 rm -f core conftest.err conftest.$ac_objext \
8114     conftest$ac_exeext conftest.$ac_ext
8115     LIBS="$ac_save_LIBS"
8116
8117 fi
8118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8119 $as_echo "$ac_cv_libexpat" >&6; }
8120   if test "$ac_cv_libexpat" = yes; then
8121     HAVE_LIBEXPAT=yes
8122
8123 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
8124
8125     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8126 $as_echo_n "checking how to link with libexpat... " >&6; }
8127     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8128 $as_echo "$LIBEXPAT" >&6; }
8129   else
8130     HAVE_LIBEXPAT=no
8131             CPPFLAGS="$ac_save_CPPFLAGS"
8132     LIBEXPAT=
8133     LTLIBEXPAT=
8134   fi
8135
8136
8137
8138
8139
8140
8141   if test "$HAVE_LIBEXPAT" != yes; then
8142     if test "$with_expat" = yes; then
8143       as_fn_error "expat is missing or unusable" "$LINENO" 5
8144     else
8145       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8146 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8147     fi
8148   else
8149     save_LIBS=$LIBS
8150     LIBS="$LIBS $LIBEXPAT"
8151     for ac_func in XML_StopParser
8152 do :
8153   ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8154 if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
8155   cat >>confdefs.h <<_ACEOF
8156 #define HAVE_XML_STOPPARSER 1
8157 _ACEOF
8158
8159 fi
8160 done
8161
8162     LIBS=$save_LIBS
8163   fi
8164 fi
8165
8166 # --------------------- #
8167 # Check for libpython.  #
8168 # --------------------- #
8169
8170
8171
8172
8173
8174
8175 # Check whether --with-python was given.
8176 if test "${with_python+set}" = set; then :
8177   withval=$with_python;
8178 else
8179   with_python=auto
8180 fi
8181
8182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8183 $as_echo_n "checking whether to use python... " >&6; }
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8185 $as_echo "$with_python" >&6; }
8186
8187 if test "${with_python}" = no; then
8188   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8189 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8190   have_libpython=no
8191 else
8192   case "${with_python}" in
8193   [\\/]* | ?:[\\/]*)
8194     if test -d ${with_python}; then
8195       # Assume the python binary is ${with_python}/bin/python.
8196       python_prog="${with_python}/bin/python"
8197       python_prefix=
8198       # If python does not exit ${with_python}/bin, then try in
8199       # ${with_python}.  On Windows/MinGW, this is where the Python
8200       # executable is.
8201       if test ! -x "${python_prog}"; then
8202         python_prog="${with_python}/python"
8203         python_prefix=
8204       fi
8205       if test ! -x "${python_prog}"; then
8206         # Fall back to gdb 7.0/7.1 behaviour.
8207         python_prog=missing
8208         python_prefix=${with_python}
8209       fi
8210     elif test -x "${with_python}"; then
8211       # While we can't run python compiled for $host (unless host == build),
8212       # the user could write a script that provides the needed information,
8213       # so we support that.
8214       python_prog=${with_python}
8215       python_prefix=
8216     else
8217       as_fn_error "invalid value for --with-python" "$LINENO" 5
8218     fi
8219     ;;
8220   */*)
8221     # Disallow --with-python=foo/bar.
8222     as_fn_error "invalid value for --with-python" "$LINENO" 5
8223     ;;
8224   *)
8225     # The user has either specified auto, yes, or the name of the python
8226     # program assumed to be in $PATH.
8227     python_prefix=
8228     case "${with_python}" in
8229     yes | auto)
8230       if test ${build} = ${host}; then
8231         # Extract the first word of "python", so it can be a program name with args.
8232 set dummy python; ac_word=$2
8233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8234 $as_echo_n "checking for $ac_word... " >&6; }
8235 if test "${ac_cv_path_python_prog_path+set}" = set; then :
8236   $as_echo_n "(cached) " >&6
8237 else
8238   case $python_prog_path in
8239   [\\/]* | ?:[\\/]*)
8240   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8241   ;;
8242   *)
8243   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8244 for as_dir in $PATH
8245 do
8246   IFS=$as_save_IFS
8247   test -z "$as_dir" && as_dir=.
8248     for ac_exec_ext in '' $ac_executable_extensions; do
8249   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8250     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8252     break 2
8253   fi
8254 done
8255   done
8256 IFS=$as_save_IFS
8257
8258   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8259   ;;
8260 esac
8261 fi
8262 python_prog_path=$ac_cv_path_python_prog_path
8263 if test -n "$python_prog_path"; then
8264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8265 $as_echo "$python_prog_path" >&6; }
8266 else
8267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8268 $as_echo "no" >&6; }
8269 fi
8270
8271
8272         if test "${python_prog_path}" = missing; then
8273           python_prog=missing
8274         else
8275           python_prog=${python_prog_path}
8276         fi
8277       else
8278         # Not much we can do except assume the cross-compiler will find the
8279         # right files.
8280         python_prog=missing
8281       fi
8282       ;;
8283     *)
8284       # While we can't run python compiled for $host (unless host == build),
8285       # the user could write a script that provides the needed information,
8286       # so we support that.
8287       python_prog="${with_python}"
8288       # Extract the first word of "${python_prog}", so it can be a program name with args.
8289 set dummy ${python_prog}; ac_word=$2
8290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8291 $as_echo_n "checking for $ac_word... " >&6; }
8292 if test "${ac_cv_path_python_prog_path+set}" = set; then :
8293   $as_echo_n "(cached) " >&6
8294 else
8295   case $python_prog_path in
8296   [\\/]* | ?:[\\/]*)
8297   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8298   ;;
8299   *)
8300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8301 for as_dir in $PATH
8302 do
8303   IFS=$as_save_IFS
8304   test -z "$as_dir" && as_dir=.
8305     for ac_exec_ext in '' $ac_executable_extensions; do
8306   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8307     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8309     break 2
8310   fi
8311 done
8312   done
8313 IFS=$as_save_IFS
8314
8315   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8316   ;;
8317 esac
8318 fi
8319 python_prog_path=$ac_cv_path_python_prog_path
8320 if test -n "$python_prog_path"; then
8321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8322 $as_echo "$python_prog_path" >&6; }
8323 else
8324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8325 $as_echo "no" >&6; }
8326 fi
8327
8328
8329       if test "${python_prog_path}" = missing; then
8330         as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8331       fi
8332       ;;
8333     esac
8334   esac
8335
8336   if test "${python_prog}" != missing; then
8337     # We have a python program to use, but it may be too old.
8338     # Don't flag an error for --with-python=auto (the default).
8339     have_python_config=yes
8340     python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8341     if test $? != 0; then
8342       have_python_config=failed
8343       if test "${with_python}" != auto; then
8344         as_fn_error "failure running python-config --includes" "$LINENO" 5
8345       fi
8346     fi
8347     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8348     if test $? != 0; then
8349       have_python_config=failed
8350       if test "${with_python}" != auto; then
8351         as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8352       fi
8353     fi
8354     python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8355     if test $? != 0; then
8356       have_python_config=failed
8357       if test "${with_python}" != auto; then
8358         as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8359       fi
8360     fi
8361   else
8362     # We do not have a python executable we can use to determine where
8363     # to find the Python headers and libs.  We cannot guess the include
8364     # path from the python_prefix either, because that include path
8365     # depends on the Python version.  So, there is nothing much we can
8366     # do except assume that the compiler will be able to find those files.
8367     python_includes=
8368     python_libs=
8369     have_python_config=no
8370   fi
8371
8372   # If we have python-config, only try the configuration it provides.
8373   # Otherwise fallback on the old way of trying different versions of
8374   # python in turn.
8375
8376   have_libpython=no
8377   if test "${have_python_config}" = yes; then
8378     # Determine the Python version by extracting "-lpython<version>"
8379     # part of the python_libs. <version> is usually X.Y with X and Y
8380     # being decimal numbers, but can also be XY (seen on Windows).
8381     #
8382     # The extraction is performed using sed with a regular expression.
8383     # Initially, the regexp used was using the '?' quantifier to make
8384     # the dot in the version number optional.  Unfortunately, this
8385     # does not work with non-GNU versions of sed because, because of
8386     # what looks like a limitation (the '?' quantifier does not work
8387     # with back-references).  We work around this limitation by using
8388     # the '*' quantifier instead.  It means that, in theory, we might
8389     # match unexpected version strings such as "-lpython2..7", but
8390     # this seems unlikely in practice.  And even if that happens,
8391     # an error will be triggered later on, when checking that version
8392     # number.
8393     python_version=`echo " ${python_libs} " \
8394                          | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
8395     case "${python_version}" in
8396     python*)
8397
8398   version=${python_version}
8399
8400   new_CPPFLAGS=${python_includes}
8401   new_LIBS=${python_libs}
8402   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8403 $as_echo_n "checking for ${version}... " >&6; }
8404   save_CPPFLAGS=$CPPFLAGS
8405   save_LIBS=$LIBS
8406   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8407   LIBS="$LIBS $new_LIBS"
8408   found_usable_python=no
8409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8410 /* end confdefs.h.  */
8411 #include "Python.h"
8412 int
8413 main ()
8414 {
8415 Py_Initialize ();
8416   ;
8417   return 0;
8418 }
8419 _ACEOF
8420 if ac_fn_c_try_link "$LINENO"; then :
8421   have_libpython=${version}
8422                   found_usable_python=yes
8423                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8424                   PYTHON_LIBS=$new_LIBS
8425 fi
8426 rm -f core conftest.err conftest.$ac_objext \
8427     conftest$ac_exeext conftest.$ac_ext
8428   CPPFLAGS=$save_CPPFLAGS
8429   LIBS=$save_LIBS
8430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8431 $as_echo "${found_usable_python}" >&6; }
8432
8433       ;;
8434     *)
8435       as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
8436       ;;
8437     esac
8438   elif test "${have_python_config}" != failed; then
8439     if test "${have_libpython}" = no; then
8440
8441   version=python2.7
8442
8443   new_CPPFLAGS=${python_includes}
8444   new_LIBS="${python_libs} -lpython2.7"
8445   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8446 $as_echo_n "checking for ${version}... " >&6; }
8447   save_CPPFLAGS=$CPPFLAGS
8448   save_LIBS=$LIBS
8449   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8450   LIBS="$LIBS $new_LIBS"
8451   found_usable_python=no
8452   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8453 /* end confdefs.h.  */
8454 #include "Python.h"
8455 int
8456 main ()
8457 {
8458 Py_Initialize ();
8459   ;
8460   return 0;
8461 }
8462 _ACEOF
8463 if ac_fn_c_try_link "$LINENO"; then :
8464   have_libpython=${version}
8465                   found_usable_python=yes
8466                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8467                   PYTHON_LIBS=$new_LIBS
8468 fi
8469 rm -f core conftest.err conftest.$ac_objext \
8470     conftest$ac_exeext conftest.$ac_ext
8471   CPPFLAGS=$save_CPPFLAGS
8472   LIBS=$save_LIBS
8473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8474 $as_echo "${found_usable_python}" >&6; }
8475
8476     fi
8477     if test "${have_libpython}" = no; then
8478
8479   version=python2.6
8480
8481   new_CPPFLAGS=${python_includes}
8482   new_LIBS="${python_libs} -lpython2.6"
8483   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8484 $as_echo_n "checking for ${version}... " >&6; }
8485   save_CPPFLAGS=$CPPFLAGS
8486   save_LIBS=$LIBS
8487   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8488   LIBS="$LIBS $new_LIBS"
8489   found_usable_python=no
8490   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8491 /* end confdefs.h.  */
8492 #include "Python.h"
8493 int
8494 main ()
8495 {
8496 Py_Initialize ();
8497   ;
8498   return 0;
8499 }
8500 _ACEOF
8501 if ac_fn_c_try_link "$LINENO"; then :
8502   have_libpython=${version}
8503                   found_usable_python=yes
8504                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8505                   PYTHON_LIBS=$new_LIBS
8506 fi
8507 rm -f core conftest.err conftest.$ac_objext \
8508     conftest$ac_exeext conftest.$ac_ext
8509   CPPFLAGS=$save_CPPFLAGS
8510   LIBS=$save_LIBS
8511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8512 $as_echo "${found_usable_python}" >&6; }
8513
8514     fi
8515     if test ${have_libpython} = no; then
8516
8517   version=python2.5
8518
8519   new_CPPFLAGS=${python_includes}
8520   new_LIBS="${python_libs} -lpython2.5"
8521   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8522 $as_echo_n "checking for ${version}... " >&6; }
8523   save_CPPFLAGS=$CPPFLAGS
8524   save_LIBS=$LIBS
8525   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8526   LIBS="$LIBS $new_LIBS"
8527   found_usable_python=no
8528   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8529 /* end confdefs.h.  */
8530 #include "Python.h"
8531 int
8532 main ()
8533 {
8534 Py_Initialize ();
8535   ;
8536   return 0;
8537 }
8538 _ACEOF
8539 if ac_fn_c_try_link "$LINENO"; then :
8540   have_libpython=${version}
8541                   found_usable_python=yes
8542                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8543                   PYTHON_LIBS=$new_LIBS
8544 fi
8545 rm -f core conftest.err conftest.$ac_objext \
8546     conftest$ac_exeext conftest.$ac_ext
8547   CPPFLAGS=$save_CPPFLAGS
8548   LIBS=$save_LIBS
8549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8550 $as_echo "${found_usable_python}" >&6; }
8551
8552     fi
8553     if test ${have_libpython} = no; then
8554
8555   version=python2.4
8556
8557   new_CPPFLAGS=${python_includes}
8558   new_LIBS="${python_libs} -lpython2.4"
8559   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8560 $as_echo_n "checking for ${version}... " >&6; }
8561   save_CPPFLAGS=$CPPFLAGS
8562   save_LIBS=$LIBS
8563   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8564   LIBS="$LIBS $new_LIBS"
8565   found_usable_python=no
8566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8567 /* end confdefs.h.  */
8568 #include "Python.h"
8569 int
8570 main ()
8571 {
8572 Py_Initialize ();
8573   ;
8574   return 0;
8575 }
8576 _ACEOF
8577 if ac_fn_c_try_link "$LINENO"; then :
8578   have_libpython=${version}
8579                   found_usable_python=yes
8580                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8581                   PYTHON_LIBS=$new_LIBS
8582 fi
8583 rm -f core conftest.err conftest.$ac_objext \
8584     conftest$ac_exeext conftest.$ac_ext
8585   CPPFLAGS=$save_CPPFLAGS
8586   LIBS=$save_LIBS
8587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8588 $as_echo "${found_usable_python}" >&6; }
8589
8590     fi
8591   fi
8592   if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
8593
8594 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8595
8596   elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
8597
8598 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8599
8600   elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
8601
8602 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8603
8604   elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
8605
8606 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8607
8608   fi
8609
8610   if test "${have_libpython}" = no; then
8611     case "${with_python}" in
8612     yes)
8613       as_fn_error "python is missing or unusable" "$LINENO" 5
8614       ;;
8615     auto)
8616       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8617 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8618       ;;
8619     *)
8620       as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8621       ;;
8622     esac
8623   else
8624     if test -n "${python_prefix}"; then
8625
8626 cat >>confdefs.h <<_ACEOF
8627 #define WITH_PYTHON_PATH "${python_prefix}"
8628 _ACEOF
8629
8630
8631   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8632      if test "x$prefix" = xNONE; then
8633         test_prefix=/usr/local
8634      else
8635         test_prefix=$prefix
8636      fi
8637   else
8638      test_prefix=$exec_prefix
8639   fi
8640   value=0
8641   case ${python_prefix} in
8642      "${test_prefix}"|"${test_prefix}/"*|\
8643         '${exec_prefix}'|'${exec_prefix}/'*)
8644      value=1
8645      ;;
8646   esac
8647
8648 cat >>confdefs.h <<_ACEOF
8649 #define PYTHON_PATH_RELOCATABLE $value
8650 _ACEOF
8651
8652
8653     fi
8654   fi
8655 fi
8656
8657 if test "${have_libpython}" != no; then
8658
8659 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
8660
8661   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8662   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8663   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
8664   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
8665   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
8666
8667   # Flags needed to compile Python code (taken from python-config --cflags).
8668   # We cannot call python-config directly because it will output whatever was
8669   # used when compiling the Python interpreter itself, including flags which
8670   # would make the python-related objects be compiled differently from the
8671   # rest of GDB (e.g., -O2 and -fPIC).
8672   if test "${GCC}" = yes; then
8673     tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8674   fi
8675
8676   if test "x${tentative_python_cflags}" != x; then
8677     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8678 $as_echo_n "checking compiler flags for python code... " >&6; }
8679     for flag in ${tentative_python_cflags}; do
8680       # Check that the compiler accepts it
8681       saved_CFLAGS="$CFLAGS"
8682       CFLAGS="$CFLAGS $flag"
8683       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8684 /* end confdefs.h.  */
8685
8686 int
8687 main ()
8688 {
8689
8690   ;
8691   return 0;
8692 }
8693 _ACEOF
8694 if ac_fn_c_try_compile "$LINENO"; then :
8695   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
8696 fi
8697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8698       CFLAGS="$saved_CFLAGS"
8699     done
8700     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8701 $as_echo "${PYTHON_CFLAGS}" >&6; }
8702   fi
8703
8704   # On x64 Windows, Python's include headers, and pyconfig.h in
8705   # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8706   # version of Windows.  Unfortunately, MS_WIN64 is only defined if
8707   # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
8708   # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8709   # The issue was reported to the Python community, but still isn't
8710   # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8711
8712   case "$gdb_host" in
8713     mingw64)
8714            if test "${GCC}" = yes; then
8715              CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8716            fi
8717            ;;
8718   esac
8719
8720   # Note that "python -m threading" cannot be used to check for
8721   # threading support due to a bug in Python 2.7.3
8722   # (http://bugs.python.org/issue15567).
8723   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8724 $as_echo_n "checking whether python supports threads... " >&6; }
8725   saved_CPPFLAGS="${CPPFLAGS}"
8726   CPPFLAGS="${PYTHON_CPPFLAGS}"
8727   # Note that the test is reversed so that python_has_threads=yes on
8728   # unexpected failures.
8729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8730 /* end confdefs.h.  */
8731
8732 #include <Python.h>
8733 #ifdef WITH_THREAD
8734 # error
8735 #endif
8736
8737 _ACEOF
8738 if ac_fn_c_try_cpp "$LINENO"; then :
8739   python_has_threads=no
8740 else
8741   python_has_threads=yes
8742 fi
8743 rm -f conftest.err conftest.$ac_ext
8744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8745 $as_echo "${python_has_threads}" >&6; }
8746   CPPFLAGS="${saved_CPPFLAGS}"
8747 else
8748   # Even if Python support is not compiled in, we need to have this file
8749   # included so that the "python" command, et.al., still exists.
8750   CONFIG_OBS="$CONFIG_OBS python.o"
8751   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
8752 fi
8753
8754
8755
8756  if test "${have_libpython}" != no; then
8757   HAVE_PYTHON_TRUE=
8758   HAVE_PYTHON_FALSE='#'
8759 else
8760   HAVE_PYTHON_TRUE='#'
8761   HAVE_PYTHON_FALSE=
8762 fi
8763
8764
8765 # -------------------- #
8766 # Check for libguile.  #
8767 # -------------------- #
8768
8769
8770
8771
8772
8773
8774 # Check whether --with-guile was given.
8775 if test "${with_guile+set}" = set; then :
8776   withval=$with_guile;
8777 else
8778   with_guile=auto
8779 fi
8780
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
8782 $as_echo_n "checking whether to use guile... " >&6; }
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
8784 $as_echo "$with_guile" >&6; }
8785
8786 # Extract the first word of "pkg-config", so it can be a program name with args.
8787 set dummy pkg-config; ac_word=$2
8788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8789 $as_echo_n "checking for $ac_word... " >&6; }
8790 if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
8791   $as_echo_n "(cached) " >&6
8792 else
8793   case $pkg_config_prog_path in
8794   [\\/]* | ?:[\\/]*)
8795   ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
8796   ;;
8797   *)
8798   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8799 for as_dir in $PATH
8800 do
8801   IFS=$as_save_IFS
8802   test -z "$as_dir" && as_dir=.
8803     for ac_exec_ext in '' $ac_executable_extensions; do
8804   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8805     ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
8806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8807     break 2
8808   fi
8809 done
8810   done
8811 IFS=$as_save_IFS
8812
8813   test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
8814   ;;
8815 esac
8816 fi
8817 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
8818 if test -n "$pkg_config_prog_path"; then
8819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
8820 $as_echo "$pkg_config_prog_path" >&6; }
8821 else
8822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8823 $as_echo "no" >&6; }
8824 fi
8825
8826
8827
8828 try_guile_versions="guile-2.2 guile-2.0"
8829 have_libguile=no
8830 case "${with_guile}" in
8831 no)
8832   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
8833 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
8834   ;;
8835 auto)
8836   if test "${pkg_config_prog_path}" = "missing"; then
8837     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
8838 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
8839   else
8840
8841   pkg_config=${pkg_config_prog_path}
8842   guile_version_list=${try_guile_versions}
8843   flag_errors=no
8844
8845   found_usable_guile=checking
8846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8847 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8848   for guile_version in ${guile_version_list}; do
8849     ${pkg_config} --exists ${guile_version} 2>/dev/null
8850     if test $? != 0; then
8851       continue
8852     fi
8853             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8854     if test $? != 0; then
8855       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8856     fi
8857     new_LIBS=`${pkg_config} --libs ${guile_version}`
8858     if test $? != 0; then
8859       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8860     fi
8861         found_usable_guile=${guile_version}
8862     break
8863   done
8864   if test "${found_usable_guile}" = "checking"; then
8865     if test "${flag_errors}" = "yes"; then
8866       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8867     else
8868       found_usable_guile=no
8869     fi
8870   fi
8871       if test "${found_usable_guile}" != no; then
8872     save_CPPFLAGS=$CPPFLAGS
8873     save_LIBS=$LIBS
8874     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8875     LIBS="$LIBS $new_LIBS"
8876     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8877 /* end confdefs.h.  */
8878 #include "libguile.h"
8879 int
8880 main ()
8881 {
8882 scm_init_guile ();
8883   ;
8884   return 0;
8885 }
8886 _ACEOF
8887 if ac_fn_c_try_link "$LINENO"; then :
8888   have_libguile=yes
8889                     GUILE_CPPFLAGS=$new_CPPFLAGS
8890                     GUILE_LIBS=$new_LIBS
8891 else
8892   found_usable_guile=no
8893 fi
8894 rm -f core conftest.err conftest.$ac_objext \
8895     conftest$ac_exeext conftest.$ac_ext
8896     CPPFLAGS=$save_CPPFLAGS
8897     LIBS=$save_LIBS
8898     if test "${found_usable_guile}" = no; then
8899       if test "${flag_errors}" = yes; then
8900         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8901 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8902 as_fn_error "linking guile version ${guile_version} test program failed
8903 See \`config.log' for more details." "$LINENO" 5; }
8904       fi
8905     fi
8906   fi
8907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8908 $as_echo "${found_usable_guile}" >&6; }
8909
8910   fi
8911   ;;
8912 yes)
8913   if test "${pkg_config_prog_path}" = "missing"; then
8914     as_fn_error "pkg-config not found" "$LINENO" 5
8915   fi
8916
8917   pkg_config=${pkg_config_prog_path}
8918   guile_version_list=${try_guile_versions}
8919   flag_errors=yes
8920
8921   found_usable_guile=checking
8922   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8923 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8924   for guile_version in ${guile_version_list}; do
8925     ${pkg_config} --exists ${guile_version} 2>/dev/null
8926     if test $? != 0; then
8927       continue
8928     fi
8929             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8930     if test $? != 0; then
8931       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8932     fi
8933     new_LIBS=`${pkg_config} --libs ${guile_version}`
8934     if test $? != 0; then
8935       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8936     fi
8937         found_usable_guile=${guile_version}
8938     break
8939   done
8940   if test "${found_usable_guile}" = "checking"; then
8941     if test "${flag_errors}" = "yes"; then
8942       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8943     else
8944       found_usable_guile=no
8945     fi
8946   fi
8947       if test "${found_usable_guile}" != no; then
8948     save_CPPFLAGS=$CPPFLAGS
8949     save_LIBS=$LIBS
8950     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8951     LIBS="$LIBS $new_LIBS"
8952     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8953 /* end confdefs.h.  */
8954 #include "libguile.h"
8955 int
8956 main ()
8957 {
8958 scm_init_guile ();
8959   ;
8960   return 0;
8961 }
8962 _ACEOF
8963 if ac_fn_c_try_link "$LINENO"; then :
8964   have_libguile=yes
8965                     GUILE_CPPFLAGS=$new_CPPFLAGS
8966                     GUILE_LIBS=$new_LIBS
8967 else
8968   found_usable_guile=no
8969 fi
8970 rm -f core conftest.err conftest.$ac_objext \
8971     conftest$ac_exeext conftest.$ac_ext
8972     CPPFLAGS=$save_CPPFLAGS
8973     LIBS=$save_LIBS
8974     if test "${found_usable_guile}" = no; then
8975       if test "${flag_errors}" = yes; then
8976         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8977 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8978 as_fn_error "linking guile version ${guile_version} test program failed
8979 See \`config.log' for more details." "$LINENO" 5; }
8980       fi
8981     fi
8982   fi
8983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8984 $as_echo "${found_usable_guile}" >&6; }
8985
8986   ;;
8987 [\\/]* | ?:[\\/]*)
8988   if test -x "${with_guile}"; then
8989
8990   pkg_config=${with_guile}
8991   guile_version_list=${try_guile_versions}
8992   flag_errors=yes
8993
8994   found_usable_guile=checking
8995   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8996 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8997   for guile_version in ${guile_version_list}; do
8998     ${pkg_config} --exists ${guile_version} 2>/dev/null
8999     if test $? != 0; then
9000       continue
9001     fi
9002             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9003     if test $? != 0; then
9004       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9005     fi
9006     new_LIBS=`${pkg_config} --libs ${guile_version}`
9007     if test $? != 0; then
9008       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9009     fi
9010         found_usable_guile=${guile_version}
9011     break
9012   done
9013   if test "${found_usable_guile}" = "checking"; then
9014     if test "${flag_errors}" = "yes"; then
9015       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9016     else
9017       found_usable_guile=no
9018     fi
9019   fi
9020       if test "${found_usable_guile}" != no; then
9021     save_CPPFLAGS=$CPPFLAGS
9022     save_LIBS=$LIBS
9023     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9024     LIBS="$LIBS $new_LIBS"
9025     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9026 /* end confdefs.h.  */
9027 #include "libguile.h"
9028 int
9029 main ()
9030 {
9031 scm_init_guile ();
9032   ;
9033   return 0;
9034 }
9035 _ACEOF
9036 if ac_fn_c_try_link "$LINENO"; then :
9037   have_libguile=yes
9038                     GUILE_CPPFLAGS=$new_CPPFLAGS
9039                     GUILE_LIBS=$new_LIBS
9040 else
9041   found_usable_guile=no
9042 fi
9043 rm -f core conftest.err conftest.$ac_objext \
9044     conftest$ac_exeext conftest.$ac_ext
9045     CPPFLAGS=$save_CPPFLAGS
9046     LIBS=$save_LIBS
9047     if test "${found_usable_guile}" = no; then
9048       if test "${flag_errors}" = yes; then
9049         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9050 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9051 as_fn_error "linking guile version ${guile_version} test program failed
9052 See \`config.log' for more details." "$LINENO" 5; }
9053       fi
9054     fi
9055   fi
9056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9057 $as_echo "${found_usable_guile}" >&6; }
9058
9059   else
9060     as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9061   fi
9062   ;;
9063 "" | */*)
9064   # Disallow --with=guile="" and --with-guile=foo/bar.
9065   as_fn_error "invalid value for --with-guile" "$LINENO" 5
9066   ;;
9067 *)
9068   # A space separate list of guile versions to try, in order.
9069   if test "${pkg_config_prog_path}" = "missing"; then
9070     as_fn_error "pkg-config not found" "$LINENO" 5
9071   fi
9072
9073   pkg_config=${pkg_config_prog_path}
9074   guile_version_list=${with_guile}
9075   flag_errors=yes
9076
9077   found_usable_guile=checking
9078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9079 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9080   for guile_version in ${guile_version_list}; do
9081     ${pkg_config} --exists ${guile_version} 2>/dev/null
9082     if test $? != 0; then
9083       continue
9084     fi
9085             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9086     if test $? != 0; then
9087       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9088     fi
9089     new_LIBS=`${pkg_config} --libs ${guile_version}`
9090     if test $? != 0; then
9091       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9092     fi
9093         found_usable_guile=${guile_version}
9094     break
9095   done
9096   if test "${found_usable_guile}" = "checking"; then
9097     if test "${flag_errors}" = "yes"; then
9098       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9099     else
9100       found_usable_guile=no
9101     fi
9102   fi
9103       if test "${found_usable_guile}" != no; then
9104     save_CPPFLAGS=$CPPFLAGS
9105     save_LIBS=$LIBS
9106     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9107     LIBS="$LIBS $new_LIBS"
9108     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9109 /* end confdefs.h.  */
9110 #include "libguile.h"
9111 int
9112 main ()
9113 {
9114 scm_init_guile ();
9115   ;
9116   return 0;
9117 }
9118 _ACEOF
9119 if ac_fn_c_try_link "$LINENO"; then :
9120   have_libguile=yes
9121                     GUILE_CPPFLAGS=$new_CPPFLAGS
9122                     GUILE_LIBS=$new_LIBS
9123 else
9124   found_usable_guile=no
9125 fi
9126 rm -f core conftest.err conftest.$ac_objext \
9127     conftest$ac_exeext conftest.$ac_ext
9128     CPPFLAGS=$save_CPPFLAGS
9129     LIBS=$save_LIBS
9130     if test "${found_usable_guile}" = no; then
9131       if test "${flag_errors}" = yes; then
9132         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9133 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9134 as_fn_error "linking guile version ${guile_version} test program failed
9135 See \`config.log' for more details." "$LINENO" 5; }
9136       fi
9137     fi
9138   fi
9139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9140 $as_echo "${found_usable_guile}" >&6; }
9141
9142   ;;
9143 esac
9144
9145 if test "${have_libguile}" != no; then
9146     case "${with_guile}" in
9147   [\\/]* | ?:[\\/]*)
9148
9149   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9150 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9151 if test "${ac_cv_guild_program_name+set}" = set; then :
9152   $as_echo_n "(cached) " >&6
9153 else
9154   ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
9155
9156      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9157      # the 'guild' and 'bindir' variables.  In that case, try to guess
9158      # what the program name is, at the risk of getting it wrong if
9159      # Guile was configured with '--program-suffix' or similar.
9160      if test "x$ac_cv_guild_program_name" = "x"; then
9161        guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
9162        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9163      fi
9164
9165 fi
9166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9167 $as_echo "$ac_cv_guild_program_name" >&6; }
9168
9169   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9170     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9171   fi
9172
9173   GUILD="$ac_cv_guild_program_name"
9174
9175
9176     ;;
9177   *)
9178
9179   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9180 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9181 if test "${ac_cv_guild_program_name+set}" = set; then :
9182   $as_echo_n "(cached) " >&6
9183 else
9184   ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9185
9186      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9187      # the 'guild' and 'bindir' variables.  In that case, try to guess
9188      # what the program name is, at the risk of getting it wrong if
9189      # Guile was configured with '--program-suffix' or similar.
9190      if test "x$ac_cv_guild_program_name" = "x"; then
9191        guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9192        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9193      fi
9194
9195 fi
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9197 $as_echo "$ac_cv_guild_program_name" >&6; }
9198
9199   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9200     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9201   fi
9202
9203   GUILD="$ac_cv_guild_program_name"
9204
9205
9206     ;;
9207   esac
9208
9209
9210   if test "$cross_compiling" = no; then
9211     GUILD_TARGET_FLAG=
9212   else
9213     GUILD_TARGET_FLAG="--target=$host"
9214   fi
9215
9216
9217
9218
9219   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9220 $as_echo_n "checking whether guild supports this host... " >&6; }
9221 if test "${ac_cv_guild_ok+set}" = set; then :
9222   $as_echo_n "(cached) " >&6
9223 else
9224   echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9225      if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9226        ac_cv_guild_ok=yes
9227      else
9228        ac_cv_guild_ok=no
9229      fi
9230 fi
9231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9232 $as_echo "$ac_cv_guild_ok" >&6; }
9233
9234     if test "$ac_cv_guild_ok" = no; then
9235     have_libguile=no
9236     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9237 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
9238   fi
9239 fi
9240
9241 if test "${have_libguile}" != no; then
9242
9243 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
9244
9245   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9246   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9247   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9248   CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9249   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
9250
9251     save_LIBS="$LIBS"
9252   save_CPPFLAGS="$CPPFLAGS"
9253   LIBS="$GUILE_LIBS"
9254   CPPFLAGS="$GUILE_CPPFLAGS"
9255   for ac_func in scm_new_smob
9256 do :
9257   ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9258 if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9259   cat >>confdefs.h <<_ACEOF
9260 #define HAVE_SCM_NEW_SMOB 1
9261 _ACEOF
9262
9263 fi
9264 done
9265
9266   LIBS="$save_LIBS"
9267   CPPFLAGS="$save_CPPFLAGS"
9268 else
9269   # Even if Guile support is not compiled in, we need to have these files
9270   # included.
9271   CONFIG_OBS="$CONFIG_OBS guile.o"
9272   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9273 fi
9274
9275
9276  if test "${have_libguile}" != no; then
9277   HAVE_GUILE_TRUE=
9278   HAVE_GUILE_FALSE='#'
9279 else
9280   HAVE_GUILE_TRUE='#'
9281   HAVE_GUILE_FALSE=
9282 fi
9283
9284
9285 # --------------------- #
9286 # Check for libmcheck.  #
9287 # --------------------- #
9288
9289 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
9290 # but turn it off if Python is enabled with threads, since -lmcheck is
9291 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9292 # and for releases.
9293 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9294    && $development; then
9295   libmcheck_default=yes
9296 else
9297   libmcheck_default=no
9298 fi
9299
9300   # Check whether --enable-libmcheck was given.
9301 if test "${enable_libmcheck+set}" = set; then :
9302   enableval=$enable_libmcheck; case "${enableval}" in
9303       yes | y) ENABLE_LIBMCHECK="yes" ;;
9304       no | n)  ENABLE_LIBMCHECK="no" ;;
9305       *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
9306     esac
9307 fi
9308
9309
9310   if test -z "${ENABLE_LIBMCHECK}"; then
9311     ENABLE_LIBMCHECK=${libmcheck_default}
9312   fi
9313
9314   if test "$ENABLE_LIBMCHECK" = "yes" ; then
9315     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
9316 $as_echo_n "checking for main in -lmcheck... " >&6; }
9317 if test "${ac_cv_lib_mcheck_main+set}" = set; then :
9318   $as_echo_n "(cached) " >&6
9319 else
9320   ac_check_lib_save_LIBS=$LIBS
9321 LIBS="-lmcheck  $LIBS"
9322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9323 /* end confdefs.h.  */
9324
9325
9326 int
9327 main ()
9328 {
9329 return main ();
9330   ;
9331   return 0;
9332 }
9333 _ACEOF
9334 if ac_fn_c_try_link "$LINENO"; then :
9335   ac_cv_lib_mcheck_main=yes
9336 else
9337   ac_cv_lib_mcheck_main=no
9338 fi
9339 rm -f core conftest.err conftest.$ac_objext \
9340     conftest$ac_exeext conftest.$ac_ext
9341 LIBS=$ac_check_lib_save_LIBS
9342 fi
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
9344 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
9345 if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
9346   cat >>confdefs.h <<_ACEOF
9347 #define HAVE_LIBMCHECK 1
9348 _ACEOF
9349
9350   LIBS="-lmcheck $LIBS"
9351
9352 fi
9353
9354   fi
9355
9356
9357 if test "$ENABLE_LIBMCHECK" = "yes" \
9358         -a "${have_libpython}" != "no" \
9359         -a "${python_has_threads}" = "yes" ; then
9360   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
9361 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
9362 fi
9363
9364 # ------------------------- #
9365 # Checks for header files.  #
9366 # ------------------------- #
9367
9368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9369 $as_echo_n "checking for ANSI C header files... " >&6; }
9370 if test "${ac_cv_header_stdc+set}" = set; then :
9371   $as_echo_n "(cached) " >&6
9372 else
9373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9374 /* end confdefs.h.  */
9375 #include <stdlib.h>
9376 #include <stdarg.h>
9377 #include <string.h>
9378 #include <float.h>
9379
9380 int
9381 main ()
9382 {
9383
9384   ;
9385   return 0;
9386 }
9387 _ACEOF
9388 if ac_fn_c_try_compile "$LINENO"; then :
9389   ac_cv_header_stdc=yes
9390 else
9391   ac_cv_header_stdc=no
9392 fi
9393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9394
9395 if test $ac_cv_header_stdc = yes; then
9396   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9397   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9398 /* end confdefs.h.  */
9399 #include <string.h>
9400
9401 _ACEOF
9402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9403   $EGREP "memchr" >/dev/null 2>&1; then :
9404
9405 else
9406   ac_cv_header_stdc=no
9407 fi
9408 rm -f conftest*
9409
9410 fi
9411
9412 if test $ac_cv_header_stdc = yes; then
9413   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9415 /* end confdefs.h.  */
9416 #include <stdlib.h>
9417
9418 _ACEOF
9419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9420   $EGREP "free" >/dev/null 2>&1; then :
9421
9422 else
9423   ac_cv_header_stdc=no
9424 fi
9425 rm -f conftest*
9426
9427 fi
9428
9429 if test $ac_cv_header_stdc = yes; then
9430   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9431   if test "$cross_compiling" = yes; then :
9432   :
9433 else
9434   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9435 /* end confdefs.h.  */
9436 #include <ctype.h>
9437 #include <stdlib.h>
9438 #if ((' ' & 0x0FF) == 0x020)
9439 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9440 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9441 #else
9442 # define ISLOWER(c) \
9443                    (('a' <= (c) && (c) <= 'i') \
9444                      || ('j' <= (c) && (c) <= 'r') \
9445                      || ('s' <= (c) && (c) <= 'z'))
9446 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9447 #endif
9448
9449 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9450 int
9451 main ()
9452 {
9453   int i;
9454   for (i = 0; i < 256; i++)
9455     if (XOR (islower (i), ISLOWER (i))
9456         || toupper (i) != TOUPPER (i))
9457       return 2;
9458   return 0;
9459 }
9460 _ACEOF
9461 if ac_fn_c_try_run "$LINENO"; then :
9462
9463 else
9464   ac_cv_header_stdc=no
9465 fi
9466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9467   conftest.$ac_objext conftest.beam conftest.$ac_ext
9468 fi
9469
9470 fi
9471 fi
9472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9473 $as_echo "$ac_cv_header_stdc" >&6; }
9474 if test $ac_cv_header_stdc = yes; then
9475
9476 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9477
9478 fi
9479
9480 # elf_hp.h is for HP/UX 64-bit shared library support.
9481 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
9482                   thread_db.h \
9483                   sys/fault.h \
9484                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9485                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9486                   sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9487                   termios.h termio.h \
9488                   sgtty.h elf_hp.h \
9489                   dlfcn.h
9490 do :
9491   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9492 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9493 eval as_val=\$$as_ac_Header
9494    if test "x$as_val" = x""yes; then :
9495   cat >>confdefs.h <<_ACEOF
9496 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9497 _ACEOF
9498
9499 fi
9500
9501 done
9502
9503 for ac_header in sys/proc.h
9504 do :
9505   ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9506 # include <sys/param.h>
9507 #endif
9508
9509 "
9510 if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
9511   cat >>confdefs.h <<_ACEOF
9512 #define HAVE_SYS_PROC_H 1
9513 _ACEOF
9514
9515 fi
9516
9517 done
9518
9519 for ac_header in sys/user.h
9520 do :
9521   ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9522 # include <sys/param.h>
9523 #endif
9524
9525 "
9526 if test "x$ac_cv_header_sys_user_h" = x""yes; then :
9527   cat >>confdefs.h <<_ACEOF
9528 #define HAVE_SYS_USER_H 1
9529 _ACEOF
9530
9531 fi
9532
9533 done
9534
9535
9536 # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
9537 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9538 # think that we don't have <curses.h> if we're using GCC.
9539 case $host_os in
9540   solaris2.[789])
9541     if test "$GCC" = yes; then
9542
9543 $as_echo "#define _MSE_INT_H 1" >>confdefs.h
9544
9545     fi ;;
9546 esac
9547 for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
9548 do :
9549   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9550 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9551 eval as_val=\$$as_ac_Header
9552    if test "x$as_val" = x""yes; then :
9553   cat >>confdefs.h <<_ACEOF
9554 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9555 _ACEOF
9556
9557 fi
9558
9559 done
9560
9561 for ac_header in term.h
9562 do :
9563   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9564 # include <curses.h>
9565 #endif
9566
9567 "
9568 if test "x$ac_cv_header_term_h" = x""yes; then :
9569   cat >>confdefs.h <<_ACEOF
9570 #define HAVE_TERM_H 1
9571 _ACEOF
9572
9573 fi
9574
9575 done
9576
9577
9578 # ------------------------- #
9579 # Checks for declarations.  #
9580 # ------------------------- #
9581
9582 ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9583 if test "x$ac_cv_have_decl_free" = x""yes; then :
9584   ac_have_decl=1
9585 else
9586   ac_have_decl=0
9587 fi
9588
9589 cat >>confdefs.h <<_ACEOF
9590 #define HAVE_DECL_FREE $ac_have_decl
9591 _ACEOF
9592 ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9593 if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9594   ac_have_decl=1
9595 else
9596   ac_have_decl=0
9597 fi
9598
9599 cat >>confdefs.h <<_ACEOF
9600 #define HAVE_DECL_MALLOC $ac_have_decl
9601 _ACEOF
9602 ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9603 if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9604   ac_have_decl=1
9605 else
9606   ac_have_decl=0
9607 fi
9608
9609 cat >>confdefs.h <<_ACEOF
9610 #define HAVE_DECL_REALLOC $ac_have_decl
9611 _ACEOF
9612 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9613 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9614   ac_have_decl=1
9615 else
9616   ac_have_decl=0
9617 fi
9618
9619 cat >>confdefs.h <<_ACEOF
9620 #define HAVE_DECL_SNPRINTF $ac_have_decl
9621 _ACEOF
9622
9623
9624   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9625 $as_echo_n "checking for LC_MESSAGES... " >&6; }
9626 if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9627   $as_echo_n "(cached) " >&6
9628 else
9629   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9630 /* end confdefs.h.  */
9631 #include <locale.h>
9632 int
9633 main ()
9634 {
9635 return LC_MESSAGES
9636   ;
9637   return 0;
9638 }
9639 _ACEOF
9640 if ac_fn_c_try_link "$LINENO"; then :
9641   am_cv_val_LC_MESSAGES=yes
9642 else
9643   am_cv_val_LC_MESSAGES=no
9644 fi
9645 rm -f core conftest.err conftest.$ac_objext \
9646     conftest$ac_exeext conftest.$ac_ext
9647 fi
9648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9649 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9650   if test $am_cv_val_LC_MESSAGES = yes; then
9651
9652 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9653
9654   fi
9655
9656
9657 # ----------------------- #
9658 # Checks for structures.  #
9659 # ----------------------- #
9660
9661 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9662 if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9663
9664 cat >>confdefs.h <<_ACEOF
9665 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
9666 _ACEOF
9667
9668
9669 fi
9670 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9671 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
9672
9673 cat >>confdefs.h <<_ACEOF
9674 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
9675 _ACEOF
9676
9677
9678 fi
9679
9680
9681 # ------------------ #
9682 # Checks for types.  #
9683 # ------------------ #
9684
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9686 $as_echo_n "checking return type of signal handlers... " >&6; }
9687 if test "${ac_cv_type_signal+set}" = set; then :
9688   $as_echo_n "(cached) " >&6
9689 else
9690   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9691 /* end confdefs.h.  */
9692 #include <sys/types.h>
9693 #include <signal.h>
9694
9695 int
9696 main ()
9697 {
9698 return *(signal (0, 0)) (0) == 1;
9699   ;
9700   return 0;
9701 }
9702 _ACEOF
9703 if ac_fn_c_try_compile "$LINENO"; then :
9704   ac_cv_type_signal=int
9705 else
9706   ac_cv_type_signal=void
9707 fi
9708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9709 fi
9710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9711 $as_echo "$ac_cv_type_signal" >&6; }
9712
9713 cat >>confdefs.h <<_ACEOF
9714 #define RETSIGTYPE $ac_cv_type_signal
9715 _ACEOF
9716
9717
9718 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
9719 #include <sys/socket.h>
9720
9721 "
9722 if test "x$ac_cv_type_socklen_t" = x""yes; then :
9723
9724 cat >>confdefs.h <<_ACEOF
9725 #define HAVE_SOCKLEN_T 1
9726 _ACEOF
9727
9728
9729 fi
9730
9731
9732 # ------------------------------------- #
9733 # Checks for compiler characteristics.  #
9734 # ------------------------------------- #
9735
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9737 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9738 if test "${ac_cv_c_const+set}" = set; then :
9739   $as_echo_n "(cached) " >&6
9740 else
9741   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9742 /* end confdefs.h.  */
9743
9744 int
9745 main ()
9746 {
9747 /* FIXME: Include the comments suggested by Paul. */
9748 #ifndef __cplusplus
9749   /* Ultrix mips cc rejects this.  */
9750   typedef int charset[2];
9751   const charset cs;
9752   /* SunOS 4.1.1 cc rejects this.  */
9753   char const *const *pcpcc;
9754   char **ppc;
9755   /* NEC SVR4.0.2 mips cc rejects this.  */
9756   struct point {int x, y;};
9757   static struct point const zero = {0,0};
9758   /* AIX XL C 1.02.0.0 rejects this.
9759      It does not let you subtract one const X* pointer from another in
9760      an arm of an if-expression whose if-part is not a constant
9761      expression */
9762   const char *g = "string";
9763   pcpcc = &g + (g ? g-g : 0);
9764   /* HPUX 7.0 cc rejects these. */
9765   ++pcpcc;
9766   ppc = (char**) pcpcc;
9767   pcpcc = (char const *const *) ppc;
9768   { /* SCO 3.2v4 cc rejects this.  */
9769     char *t;
9770     char const *s = 0 ? (char *) 0 : (char const *) 0;
9771
9772     *t++ = 0;
9773     if (s) return 0;
9774   }
9775   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9776     int x[] = {25, 17};
9777     const int *foo = &x[0];
9778     ++foo;
9779   }
9780   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9781     typedef const int *iptr;
9782     iptr p = 0;
9783     ++p;
9784   }
9785   { /* AIX XL C 1.02.0.0 rejects this saying
9786        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9787     struct s { int j; const int *ap[3]; };
9788     struct s *b; b->j = 5;
9789   }
9790   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9791     const int foo = 10;
9792     if (!foo) return 0;
9793   }
9794   return !cs[0] && !zero.x;
9795 #endif
9796
9797   ;
9798   return 0;
9799 }
9800 _ACEOF
9801 if ac_fn_c_try_compile "$LINENO"; then :
9802   ac_cv_c_const=yes
9803 else
9804   ac_cv_c_const=no
9805 fi
9806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9807 fi
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9809 $as_echo "$ac_cv_c_const" >&6; }
9810 if test $ac_cv_c_const = no; then
9811
9812 $as_echo "#define const /**/" >>confdefs.h
9813
9814 fi
9815
9816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9817 $as_echo_n "checking for inline... " >&6; }
9818 if test "${ac_cv_c_inline+set}" = set; then :
9819   $as_echo_n "(cached) " >&6
9820 else
9821   ac_cv_c_inline=no
9822 for ac_kw in inline __inline__ __inline; do
9823   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9824 /* end confdefs.h.  */
9825 #ifndef __cplusplus
9826 typedef int foo_t;
9827 static $ac_kw foo_t static_foo () {return 0; }
9828 $ac_kw foo_t foo () {return 0; }
9829 #endif
9830
9831 _ACEOF
9832 if ac_fn_c_try_compile "$LINENO"; then :
9833   ac_cv_c_inline=$ac_kw
9834 fi
9835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9836   test "$ac_cv_c_inline" != no && break
9837 done
9838
9839 fi
9840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9841 $as_echo "$ac_cv_c_inline" >&6; }
9842
9843 case $ac_cv_c_inline in
9844   inline | yes) ;;
9845   *)
9846     case $ac_cv_c_inline in
9847       no) ac_val=;;
9848       *) ac_val=$ac_cv_c_inline;;
9849     esac
9850     cat >>confdefs.h <<_ACEOF
9851 #ifndef __cplusplus
9852 #define inline $ac_val
9853 #endif
9854 _ACEOF
9855     ;;
9856 esac
9857
9858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9859 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9860 if test "${ac_cv_c_bigendian+set}" = set; then :
9861   $as_echo_n "(cached) " >&6
9862 else
9863   ac_cv_c_bigendian=unknown
9864     # See if we're dealing with a universal compiler.
9865     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9866 /* end confdefs.h.  */
9867 #ifndef __APPLE_CC__
9868                not a universal capable compiler
9869              #endif
9870              typedef int dummy;
9871
9872 _ACEOF
9873 if ac_fn_c_try_compile "$LINENO"; then :
9874
9875         # Check for potential -arch flags.  It is not universal unless
9876         # there are at least two -arch flags with different values.
9877         ac_arch=
9878         ac_prev=
9879         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9880          if test -n "$ac_prev"; then
9881            case $ac_word in
9882              i?86 | x86_64 | ppc | ppc64)
9883                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9884                  ac_arch=$ac_word
9885                else
9886                  ac_cv_c_bigendian=universal
9887                  break
9888                fi
9889                ;;
9890            esac
9891            ac_prev=
9892          elif test "x$ac_word" = "x-arch"; then
9893            ac_prev=arch
9894          fi
9895        done
9896 fi
9897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9898     if test $ac_cv_c_bigendian = unknown; then
9899       # See if sys/param.h defines the BYTE_ORDER macro.
9900       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9901 /* end confdefs.h.  */
9902 #include <sys/types.h>
9903              #include <sys/param.h>
9904
9905 int
9906 main ()
9907 {
9908 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9909                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9910                      && LITTLE_ENDIAN)
9911               bogus endian macros
9912              #endif
9913
9914   ;
9915   return 0;
9916 }
9917 _ACEOF
9918 if ac_fn_c_try_compile "$LINENO"; then :
9919   # It does; now see whether it defined to BIG_ENDIAN or not.
9920          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9921 /* end confdefs.h.  */
9922 #include <sys/types.h>
9923                 #include <sys/param.h>
9924
9925 int
9926 main ()
9927 {
9928 #if BYTE_ORDER != BIG_ENDIAN
9929                  not big endian
9930                 #endif
9931
9932   ;
9933   return 0;
9934 }
9935 _ACEOF
9936 if ac_fn_c_try_compile "$LINENO"; then :
9937   ac_cv_c_bigendian=yes
9938 else
9939   ac_cv_c_bigendian=no
9940 fi
9941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9942 fi
9943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9944     fi
9945     if test $ac_cv_c_bigendian = unknown; then
9946       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9947       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9948 /* end confdefs.h.  */
9949 #include <limits.h>
9950
9951 int
9952 main ()
9953 {
9954 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9955               bogus endian macros
9956              #endif
9957
9958   ;
9959   return 0;
9960 }
9961 _ACEOF
9962 if ac_fn_c_try_compile "$LINENO"; then :
9963   # It does; now see whether it defined to _BIG_ENDIAN or not.
9964          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9965 /* end confdefs.h.  */
9966 #include <limits.h>
9967
9968 int
9969 main ()
9970 {
9971 #ifndef _BIG_ENDIAN
9972                  not big endian
9973                 #endif
9974
9975   ;
9976   return 0;
9977 }
9978 _ACEOF
9979 if ac_fn_c_try_compile "$LINENO"; then :
9980   ac_cv_c_bigendian=yes
9981 else
9982   ac_cv_c_bigendian=no
9983 fi
9984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9985 fi
9986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9987     fi
9988     if test $ac_cv_c_bigendian = unknown; then
9989       # Compile a test program.
9990       if test "$cross_compiling" = yes; then :
9991   # Try to guess by grepping values from an object file.
9992          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9993 /* end confdefs.h.  */
9994 short int ascii_mm[] =
9995                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9996                 short int ascii_ii[] =
9997                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9998                 int use_ascii (int i) {
9999                   return ascii_mm[i] + ascii_ii[i];
10000                 }
10001                 short int ebcdic_ii[] =
10002                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10003                 short int ebcdic_mm[] =
10004                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10005                 int use_ebcdic (int i) {
10006                   return ebcdic_mm[i] + ebcdic_ii[i];
10007                 }
10008                 extern int foo;
10009
10010 int
10011 main ()
10012 {
10013 return use_ascii (foo) == use_ebcdic (foo);
10014   ;
10015   return 0;
10016 }
10017 _ACEOF
10018 if ac_fn_c_try_compile "$LINENO"; then :
10019   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10020               ac_cv_c_bigendian=yes
10021             fi
10022             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10023               if test "$ac_cv_c_bigendian" = unknown; then
10024                 ac_cv_c_bigendian=no
10025               else
10026                 # finding both strings is unlikely to happen, but who knows?
10027                 ac_cv_c_bigendian=unknown
10028               fi
10029             fi
10030 fi
10031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10032 else
10033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10034 /* end confdefs.h.  */
10035 $ac_includes_default
10036 int
10037 main ()
10038 {
10039
10040              /* Are we little or big endian?  From Harbison&Steele.  */
10041              union
10042              {
10043                long int l;
10044                char c[sizeof (long int)];
10045              } u;
10046              u.l = 1;
10047              return u.c[sizeof (long int) - 1] == 1;
10048
10049   ;
10050   return 0;
10051 }
10052 _ACEOF
10053 if ac_fn_c_try_run "$LINENO"; then :
10054   ac_cv_c_bigendian=no
10055 else
10056   ac_cv_c_bigendian=yes
10057 fi
10058 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10059   conftest.$ac_objext conftest.beam conftest.$ac_ext
10060 fi
10061
10062     fi
10063 fi
10064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10065 $as_echo "$ac_cv_c_bigendian" >&6; }
10066  case $ac_cv_c_bigendian in #(
10067    yes)
10068      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10069 ;; #(
10070    no)
10071       ;; #(
10072    universal)
10073
10074 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10075
10076      ;; #(
10077    *)
10078      as_fn_error "unknown endianness
10079  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10080  esac
10081
10082
10083 # ------------------------------ #
10084 # Checks for library functions.  #
10085 # ------------------------------ #
10086
10087 for ac_header in stdlib.h unistd.h
10088 do :
10089   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10090 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10091 eval as_val=\$$as_ac_Header
10092    if test "x$as_val" = x""yes; then :
10093   cat >>confdefs.h <<_ACEOF
10094 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10095 _ACEOF
10096
10097 fi
10098
10099 done
10100
10101 for ac_func in getpagesize
10102 do :
10103   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10104 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10105   cat >>confdefs.h <<_ACEOF
10106 #define HAVE_GETPAGESIZE 1
10107 _ACEOF
10108
10109 fi
10110 done
10111
10112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10113 $as_echo_n "checking for working mmap... " >&6; }
10114 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10115   $as_echo_n "(cached) " >&6
10116 else
10117   if test "$cross_compiling" = yes; then :
10118   ac_cv_func_mmap_fixed_mapped=no
10119 else
10120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10121 /* end confdefs.h.  */
10122 $ac_includes_default
10123 /* malloc might have been renamed as rpl_malloc. */
10124 #undef malloc
10125
10126 /* Thanks to Mike Haertel and Jim Avera for this test.
10127    Here is a matrix of mmap possibilities:
10128         mmap private not fixed
10129         mmap private fixed at somewhere currently unmapped
10130         mmap private fixed at somewhere already mapped
10131         mmap shared not fixed
10132         mmap shared fixed at somewhere currently unmapped
10133         mmap shared fixed at somewhere already mapped
10134    For private mappings, we should verify that changes cannot be read()
10135    back from the file, nor mmap's back from the file at a different
10136    address.  (There have been systems where private was not correctly
10137    implemented like the infamous i386 svr4.0, and systems where the
10138    VM page cache was not coherent with the file system buffer cache
10139    like early versions of FreeBSD and possibly contemporary NetBSD.)
10140    For shared mappings, we should conversely verify that changes get
10141    propagated back to all the places they're supposed to be.
10142
10143    Grep wants private fixed already mapped.
10144    The main things grep needs to know about mmap are:
10145    * does it exist and is it safe to write into the mmap'd area
10146    * how to use it (BSD variants)  */
10147
10148 #include <fcntl.h>
10149 #include <sys/mman.h>
10150
10151 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10152 char *malloc ();
10153 #endif
10154
10155 /* This mess was copied from the GNU getpagesize.h.  */
10156 #ifndef HAVE_GETPAGESIZE
10157 /* Assume that all systems that can run configure have sys/param.h.  */
10158 # ifndef HAVE_SYS_PARAM_H
10159 #  define HAVE_SYS_PARAM_H 1
10160 # endif
10161
10162 # ifdef _SC_PAGESIZE
10163 #  define getpagesize() sysconf(_SC_PAGESIZE)
10164 # else /* no _SC_PAGESIZE */
10165 #  ifdef HAVE_SYS_PARAM_H
10166 #   include <sys/param.h>
10167 #   ifdef EXEC_PAGESIZE
10168 #    define getpagesize() EXEC_PAGESIZE
10169 #   else /* no EXEC_PAGESIZE */
10170 #    ifdef NBPG
10171 #     define getpagesize() NBPG * CLSIZE
10172 #     ifndef CLSIZE
10173 #      define CLSIZE 1
10174 #     endif /* no CLSIZE */
10175 #    else /* no NBPG */
10176 #     ifdef NBPC
10177 #      define getpagesize() NBPC
10178 #     else /* no NBPC */
10179 #      ifdef PAGESIZE
10180 #       define getpagesize() PAGESIZE
10181 #      endif /* PAGESIZE */
10182 #     endif /* no NBPC */
10183 #    endif /* no NBPG */
10184 #   endif /* no EXEC_PAGESIZE */
10185 #  else /* no HAVE_SYS_PARAM_H */
10186 #   define getpagesize() 8192   /* punt totally */
10187 #  endif /* no HAVE_SYS_PARAM_H */
10188 # endif /* no _SC_PAGESIZE */
10189
10190 #endif /* no HAVE_GETPAGESIZE */
10191
10192 int
10193 main ()
10194 {
10195   char *data, *data2, *data3;
10196   int i, pagesize;
10197   int fd;
10198
10199   pagesize = getpagesize ();
10200
10201   /* First, make a file with some known garbage in it. */
10202   data = (char *) malloc (pagesize);
10203   if (!data)
10204     return 1;
10205   for (i = 0; i < pagesize; ++i)
10206     *(data + i) = rand ();
10207   umask (0);
10208   fd = creat ("conftest.mmap", 0600);
10209   if (fd < 0)
10210     return 1;
10211   if (write (fd, data, pagesize) != pagesize)
10212     return 1;
10213   close (fd);
10214
10215   /* Next, try to mmap the file at a fixed address which already has
10216      something else allocated at it.  If we can, also make sure that
10217      we see the same garbage.  */
10218   fd = open ("conftest.mmap", O_RDWR);
10219   if (fd < 0)
10220     return 1;
10221   data2 = (char *) malloc (2 * pagesize);
10222   if (!data2)
10223     return 1;
10224   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
10225   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10226                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
10227     return 1;
10228   for (i = 0; i < pagesize; ++i)
10229     if (*(data + i) != *(data2 + i))
10230       return 1;
10231
10232   /* Finally, make sure that changes to the mapped area do not
10233      percolate back to the file as seen by read().  (This is a bug on
10234      some variants of i386 svr4.0.)  */
10235   for (i = 0; i < pagesize; ++i)
10236     *(data2 + i) = *(data2 + i) + 1;
10237   data3 = (char *) malloc (pagesize);
10238   if (!data3)
10239     return 1;
10240   if (read (fd, data3, pagesize) != pagesize)
10241     return 1;
10242   for (i = 0; i < pagesize; ++i)
10243     if (*(data + i) != *(data3 + i))
10244       return 1;
10245   close (fd);
10246   return 0;
10247 }
10248 _ACEOF
10249 if ac_fn_c_try_run "$LINENO"; then :
10250   ac_cv_func_mmap_fixed_mapped=yes
10251 else
10252   ac_cv_func_mmap_fixed_mapped=no
10253 fi
10254 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10255   conftest.$ac_objext conftest.beam conftest.$ac_ext
10256 fi
10257
10258 fi
10259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10260 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10261 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10262
10263 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10264
10265 fi
10266 rm -f conftest.mmap
10267
10268 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10269 if test "x$ac_cv_type_pid_t" = x""yes; then :
10270
10271 else
10272
10273 cat >>confdefs.h <<_ACEOF
10274 #define pid_t int
10275 _ACEOF
10276
10277 fi
10278
10279 for ac_header in vfork.h
10280 do :
10281   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10282 if test "x$ac_cv_header_vfork_h" = x""yes; then :
10283   cat >>confdefs.h <<_ACEOF
10284 #define HAVE_VFORK_H 1
10285 _ACEOF
10286
10287 fi
10288
10289 done
10290
10291 for ac_func in fork vfork
10292 do :
10293   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10294 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10295 eval as_val=\$$as_ac_var
10296    if test "x$as_val" = x""yes; then :
10297   cat >>confdefs.h <<_ACEOF
10298 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10299 _ACEOF
10300
10301 fi
10302 done
10303
10304 if test "x$ac_cv_func_fork" = xyes; then
10305   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
10306 $as_echo_n "checking for working fork... " >&6; }
10307 if test "${ac_cv_func_fork_works+set}" = set; then :
10308   $as_echo_n "(cached) " >&6
10309 else
10310   if test "$cross_compiling" = yes; then :
10311   ac_cv_func_fork_works=cross
10312 else
10313   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10314 /* end confdefs.h.  */
10315 $ac_includes_default
10316 int
10317 main ()
10318 {
10319
10320           /* By Ruediger Kuhlmann. */
10321           return fork () < 0;
10322
10323   ;
10324   return 0;
10325 }
10326 _ACEOF
10327 if ac_fn_c_try_run "$LINENO"; then :
10328   ac_cv_func_fork_works=yes
10329 else
10330   ac_cv_func_fork_works=no
10331 fi
10332 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10333   conftest.$ac_objext conftest.beam conftest.$ac_ext
10334 fi
10335
10336 fi
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10338 $as_echo "$ac_cv_func_fork_works" >&6; }
10339
10340 else
10341   ac_cv_func_fork_works=$ac_cv_func_fork
10342 fi
10343 if test "x$ac_cv_func_fork_works" = xcross; then
10344   case $host in
10345     *-*-amigaos* | *-*-msdosdjgpp*)
10346       # Override, as these systems have only a dummy fork() stub
10347       ac_cv_func_fork_works=no
10348       ;;
10349     *)
10350       ac_cv_func_fork_works=yes
10351       ;;
10352   esac
10353   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10354 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
10355 fi
10356 ac_cv_func_vfork_works=$ac_cv_func_vfork
10357 if test "x$ac_cv_func_vfork" = xyes; then
10358   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10359 $as_echo_n "checking for working vfork... " >&6; }
10360 if test "${ac_cv_func_vfork_works+set}" = set; then :
10361   $as_echo_n "(cached) " >&6
10362 else
10363   if test "$cross_compiling" = yes; then :
10364   ac_cv_func_vfork_works=cross
10365 else
10366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10367 /* end confdefs.h.  */
10368 /* Thanks to Paul Eggert for this test.  */
10369 $ac_includes_default
10370 #include <sys/wait.h>
10371 #ifdef HAVE_VFORK_H
10372 # include <vfork.h>
10373 #endif
10374 /* On some sparc systems, changes by the child to local and incoming
10375    argument registers are propagated back to the parent.  The compiler
10376    is told about this with #include <vfork.h>, but some compilers
10377    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
10378    static variable whose address is put into a register that is
10379    clobbered by the vfork.  */
10380 static void
10381 #ifdef __cplusplus
10382 sparc_address_test (int arg)
10383 # else
10384 sparc_address_test (arg) int arg;
10385 #endif
10386 {
10387   static pid_t child;
10388   if (!child) {
10389     child = vfork ();
10390     if (child < 0) {
10391       perror ("vfork");
10392       _exit(2);
10393     }
10394     if (!child) {
10395       arg = getpid();
10396       write(-1, "", 0);
10397       _exit (arg);
10398     }
10399   }
10400 }
10401
10402 int
10403 main ()
10404 {
10405   pid_t parent = getpid ();
10406   pid_t child;
10407
10408   sparc_address_test (0);
10409
10410   child = vfork ();
10411
10412   if (child == 0) {
10413     /* Here is another test for sparc vfork register problems.  This
10414        test uses lots of local variables, at least as many local
10415        variables as main has allocated so far including compiler
10416        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
10417        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
10418        reuse the register of parent for one of the local variables,
10419        since it will think that parent can't possibly be used any more
10420        in this routine.  Assigning to the local variable will thus
10421        munge parent in the parent process.  */
10422     pid_t
10423       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10424       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10425     /* Convince the compiler that p..p7 are live; otherwise, it might
10426        use the same hardware register for all 8 local variables.  */
10427     if (p != p1 || p != p2 || p != p3 || p != p4
10428         || p != p5 || p != p6 || p != p7)
10429       _exit(1);
10430
10431     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10432        from child file descriptors.  If the child closes a descriptor
10433        before it execs or exits, this munges the parent's descriptor
10434        as well.  Test for this by closing stdout in the child.  */
10435     _exit(close(fileno(stdout)) != 0);
10436   } else {
10437     int status;
10438     struct stat st;
10439
10440     while (wait(&status) != child)
10441       ;
10442     return (
10443          /* Was there some problem with vforking?  */
10444          child < 0
10445
10446          /* Did the child fail?  (This shouldn't happen.)  */
10447          || status
10448
10449          /* Did the vfork/compiler bug occur?  */
10450          || parent != getpid()
10451
10452          /* Did the file descriptor bug occur?  */
10453          || fstat(fileno(stdout), &st) != 0
10454          );
10455   }
10456 }
10457 _ACEOF
10458 if ac_fn_c_try_run "$LINENO"; then :
10459   ac_cv_func_vfork_works=yes
10460 else
10461   ac_cv_func_vfork_works=no
10462 fi
10463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10464   conftest.$ac_objext conftest.beam conftest.$ac_ext
10465 fi
10466
10467 fi
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10469 $as_echo "$ac_cv_func_vfork_works" >&6; }
10470
10471 fi;
10472 if test "x$ac_cv_func_fork_works" = xcross; then
10473   ac_cv_func_vfork_works=$ac_cv_func_vfork
10474   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10475 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
10476 fi
10477
10478 if test "x$ac_cv_func_vfork_works" = xyes; then
10479
10480 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
10481
10482 else
10483
10484 $as_echo "#define vfork fork" >>confdefs.h
10485
10486 fi
10487 if test "x$ac_cv_func_fork_works" = xyes; then
10488
10489 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
10490
10491 fi
10492
10493 for ac_func in getrusage getuid getgid \
10494                 pipe poll pread pread64 pwrite resize_term \
10495                 sbrk setpgid setpgrp setsid \
10496                 sigaction sigprocmask sigsetmask socketpair \
10497                 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
10498                 setrlimit getrlimit posix_madvise waitpid \
10499                 ptrace64 sigaltstack mkdtemp
10500 do :
10501   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10502 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10503 eval as_val=\$$as_ac_var
10504    if test "x$as_val" = x""yes; then :
10505   cat >>confdefs.h <<_ACEOF
10506 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10507 _ACEOF
10508
10509 fi
10510 done
10511
10512
10513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10514 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10515 if test "${am_cv_langinfo_codeset+set}" = set; then :
10516   $as_echo_n "(cached) " >&6
10517 else
10518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10519 /* end confdefs.h.  */
10520 #include <langinfo.h>
10521 int
10522 main ()
10523 {
10524 char* cs = nl_langinfo(CODESET);
10525   ;
10526   return 0;
10527 }
10528 _ACEOF
10529 if ac_fn_c_try_link "$LINENO"; then :
10530   am_cv_langinfo_codeset=yes
10531 else
10532   am_cv_langinfo_codeset=no
10533 fi
10534 rm -f core conftest.err conftest.$ac_objext \
10535     conftest$ac_exeext conftest.$ac_ext
10536
10537 fi
10538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10539 $as_echo "$am_cv_langinfo_codeset" >&6; }
10540   if test $am_cv_langinfo_codeset = yes; then
10541
10542 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10543
10544   fi
10545
10546
10547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10548 $as_echo_n "checking for ANSI C header files... " >&6; }
10549 if test "${ac_cv_header_stdc+set}" = set; then :
10550   $as_echo_n "(cached) " >&6
10551 else
10552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10553 /* end confdefs.h.  */
10554 #include <stdlib.h>
10555 #include <stdarg.h>
10556 #include <string.h>
10557 #include <float.h>
10558
10559 int
10560 main ()
10561 {
10562
10563   ;
10564   return 0;
10565 }
10566 _ACEOF
10567 if ac_fn_c_try_compile "$LINENO"; then :
10568   ac_cv_header_stdc=yes
10569 else
10570   ac_cv_header_stdc=no
10571 fi
10572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10573
10574 if test $ac_cv_header_stdc = yes; then
10575   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10576   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10577 /* end confdefs.h.  */
10578 #include <string.h>
10579
10580 _ACEOF
10581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10582   $EGREP "memchr" >/dev/null 2>&1; then :
10583
10584 else
10585   ac_cv_header_stdc=no
10586 fi
10587 rm -f conftest*
10588
10589 fi
10590
10591 if test $ac_cv_header_stdc = yes; then
10592   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10594 /* end confdefs.h.  */
10595 #include <stdlib.h>
10596
10597 _ACEOF
10598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10599   $EGREP "free" >/dev/null 2>&1; then :
10600
10601 else
10602   ac_cv_header_stdc=no
10603 fi
10604 rm -f conftest*
10605
10606 fi
10607
10608 if test $ac_cv_header_stdc = yes; then
10609   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10610   if test "$cross_compiling" = yes; then :
10611   :
10612 else
10613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10614 /* end confdefs.h.  */
10615 #include <ctype.h>
10616 #include <stdlib.h>
10617 #if ((' ' & 0x0FF) == 0x020)
10618 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10619 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10620 #else
10621 # define ISLOWER(c) \
10622                    (('a' <= (c) && (c) <= 'i') \
10623                      || ('j' <= (c) && (c) <= 'r') \
10624                      || ('s' <= (c) && (c) <= 'z'))
10625 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10626 #endif
10627
10628 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10629 int
10630 main ()
10631 {
10632   int i;
10633   for (i = 0; i < 256; i++)
10634     if (XOR (islower (i), ISLOWER (i))
10635         || toupper (i) != TOUPPER (i))
10636       return 2;
10637   return 0;
10638 }
10639 _ACEOF
10640 if ac_fn_c_try_run "$LINENO"; then :
10641
10642 else
10643   ac_cv_header_stdc=no
10644 fi
10645 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10646   conftest.$ac_objext conftest.beam conftest.$ac_ext
10647 fi
10648
10649 fi
10650 fi
10651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10652 $as_echo "$ac_cv_header_stdc" >&6; }
10653 if test $ac_cv_header_stdc = yes; then
10654
10655 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10656
10657 fi
10658
10659   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10660 # for constant arguments.  Useless!
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10662 $as_echo_n "checking for working alloca.h... " >&6; }
10663 if test "${ac_cv_working_alloca_h+set}" = set; then :
10664   $as_echo_n "(cached) " >&6
10665 else
10666   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10667 /* end confdefs.h.  */
10668 #include <alloca.h>
10669 int
10670 main ()
10671 {
10672 char *p = (char *) alloca (2 * sizeof (int));
10673                           if (p) return 0;
10674   ;
10675   return 0;
10676 }
10677 _ACEOF
10678 if ac_fn_c_try_link "$LINENO"; then :
10679   ac_cv_working_alloca_h=yes
10680 else
10681   ac_cv_working_alloca_h=no
10682 fi
10683 rm -f core conftest.err conftest.$ac_objext \
10684     conftest$ac_exeext conftest.$ac_ext
10685 fi
10686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10687 $as_echo "$ac_cv_working_alloca_h" >&6; }
10688 if test $ac_cv_working_alloca_h = yes; then
10689
10690 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10691
10692 fi
10693
10694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10695 $as_echo_n "checking for alloca... " >&6; }
10696 if test "${ac_cv_func_alloca_works+set}" = set; then :
10697   $as_echo_n "(cached) " >&6
10698 else
10699   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10700 /* end confdefs.h.  */
10701 #ifdef __GNUC__
10702 # define alloca __builtin_alloca
10703 #else
10704 # ifdef _MSC_VER
10705 #  include <malloc.h>
10706 #  define alloca _alloca
10707 # else
10708 #  ifdef HAVE_ALLOCA_H
10709 #   include <alloca.h>
10710 #  else
10711 #   ifdef _AIX
10712  #pragma alloca
10713 #   else
10714 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10715 char *alloca ();
10716 #    endif
10717 #   endif
10718 #  endif
10719 # endif
10720 #endif
10721
10722 int
10723 main ()
10724 {
10725 char *p = (char *) alloca (1);
10726                                     if (p) return 0;
10727   ;
10728   return 0;
10729 }
10730 _ACEOF
10731 if ac_fn_c_try_link "$LINENO"; then :
10732   ac_cv_func_alloca_works=yes
10733 else
10734   ac_cv_func_alloca_works=no
10735 fi
10736 rm -f core conftest.err conftest.$ac_objext \
10737     conftest$ac_exeext conftest.$ac_ext
10738 fi
10739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10740 $as_echo "$ac_cv_func_alloca_works" >&6; }
10741
10742 if test $ac_cv_func_alloca_works = yes; then
10743
10744 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10745
10746 else
10747   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10748 # that cause trouble.  Some versions do not even contain alloca or
10749 # contain a buggy version.  If you still want to use their alloca,
10750 # use ar to extract alloca.o from them instead of compiling alloca.c.
10751
10752 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10753
10754 $as_echo "#define C_ALLOCA 1" >>confdefs.h
10755
10756
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10758 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10759 if test "${ac_cv_os_cray+set}" = set; then :
10760   $as_echo_n "(cached) " >&6
10761 else
10762   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10763 /* end confdefs.h.  */
10764 #if defined CRAY && ! defined CRAY2
10765 webecray
10766 #else
10767 wenotbecray
10768 #endif
10769
10770 _ACEOF
10771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10772   $EGREP "webecray" >/dev/null 2>&1; then :
10773   ac_cv_os_cray=yes
10774 else
10775   ac_cv_os_cray=no
10776 fi
10777 rm -f conftest*
10778
10779 fi
10780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10781 $as_echo "$ac_cv_os_cray" >&6; }
10782 if test $ac_cv_os_cray = yes; then
10783   for ac_func in _getb67 GETB67 getb67; do
10784     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10785 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10786 eval as_val=\$$as_ac_var
10787    if test "x$as_val" = x""yes; then :
10788
10789 cat >>confdefs.h <<_ACEOF
10790 #define CRAY_STACKSEG_END $ac_func
10791 _ACEOF
10792
10793     break
10794 fi
10795
10796   done
10797 fi
10798
10799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10800 $as_echo_n "checking stack direction for C alloca... " >&6; }
10801 if test "${ac_cv_c_stack_direction+set}" = set; then :
10802   $as_echo_n "(cached) " >&6
10803 else
10804   if test "$cross_compiling" = yes; then :
10805   ac_cv_c_stack_direction=0
10806 else
10807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10808 /* end confdefs.h.  */
10809 $ac_includes_default
10810 int
10811 find_stack_direction ()
10812 {
10813   static char *addr = 0;
10814   auto char dummy;
10815   if (addr == 0)
10816     {
10817       addr = &dummy;
10818       return find_stack_direction ();
10819     }
10820   else
10821     return (&dummy > addr) ? 1 : -1;
10822 }
10823
10824 int
10825 main ()
10826 {
10827   return find_stack_direction () < 0;
10828 }
10829 _ACEOF
10830 if ac_fn_c_try_run "$LINENO"; then :
10831   ac_cv_c_stack_direction=1
10832 else
10833   ac_cv_c_stack_direction=-1
10834 fi
10835 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10836   conftest.$ac_objext conftest.beam conftest.$ac_ext
10837 fi
10838
10839 fi
10840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10841 $as_echo "$ac_cv_c_stack_direction" >&6; }
10842 cat >>confdefs.h <<_ACEOF
10843 #define STACK_DIRECTION $ac_cv_c_stack_direction
10844 _ACEOF
10845
10846
10847 fi
10848
10849
10850
10851   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10852 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10853 if test "${am_cv_langinfo_codeset+set}" = set; then :
10854   $as_echo_n "(cached) " >&6
10855 else
10856   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10857 /* end confdefs.h.  */
10858 #include <langinfo.h>
10859 int
10860 main ()
10861 {
10862 char* cs = nl_langinfo(CODESET);
10863   ;
10864   return 0;
10865 }
10866 _ACEOF
10867 if ac_fn_c_try_link "$LINENO"; then :
10868   am_cv_langinfo_codeset=yes
10869 else
10870   am_cv_langinfo_codeset=no
10871 fi
10872 rm -f core conftest.err conftest.$ac_objext \
10873     conftest$ac_exeext conftest.$ac_ext
10874
10875 fi
10876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10877 $as_echo "$am_cv_langinfo_codeset" >&6; }
10878   if test $am_cv_langinfo_codeset = yes; then
10879
10880 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10881
10882   fi
10883
10884
10885   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
10886 do :
10887   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10888 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10889 eval as_val=\$$as_ac_Header
10890    if test "x$as_val" = x""yes; then :
10891   cat >>confdefs.h <<_ACEOF
10892 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10893 _ACEOF
10894
10895 fi
10896
10897 done
10898
10899
10900   for ac_func in fdwalk getrlimit pipe pipe2 socketpair
10901 do :
10902   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10903 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10904 eval as_val=\$$as_ac_var
10905    if test "x$as_val" = x""yes; then :
10906   cat >>confdefs.h <<_ACEOF
10907 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10908 _ACEOF
10909
10910 fi
10911 done
10912
10913
10914   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
10915 if test "x$ac_cv_have_decl_strerror" = x""yes; then :
10916   ac_have_decl=1
10917 else
10918   ac_have_decl=0
10919 fi
10920
10921 cat >>confdefs.h <<_ACEOF
10922 #define HAVE_DECL_STRERROR $ac_have_decl
10923 _ACEOF
10924 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
10925 if test "x$ac_cv_have_decl_strstr" = x""yes; then :
10926   ac_have_decl=1
10927 else
10928   ac_have_decl=0
10929 fi
10930
10931 cat >>confdefs.h <<_ACEOF
10932 #define HAVE_DECL_STRSTR $ac_have_decl
10933 _ACEOF
10934
10935
10936     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10937 $as_echo_n "checking for sigsetjmp... " >&6; }
10938 if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10939   $as_echo_n "(cached) " >&6
10940 else
10941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10942 /* end confdefs.h.  */
10943
10944 #include <setjmp.h>
10945
10946 int
10947 main ()
10948 {
10949 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
10950   ;
10951   return 0;
10952 }
10953 _ACEOF
10954 if ac_fn_c_try_compile "$LINENO"; then :
10955   gdb_cv_func_sigsetjmp=yes
10956 else
10957   gdb_cv_func_sigsetjmp=no
10958 fi
10959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10960 fi
10961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10962 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
10963 if test $gdb_cv_func_sigsetjmp = yes; then
10964
10965 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
10966
10967 fi
10968
10969
10970 # Check the return and argument types of ptrace.  No canned test for
10971 # this, so roll our own.
10972 gdb_ptrace_headers='
10973 #include <sys/types.h>
10974 #if HAVE_SYS_PTRACE_H
10975 # include <sys/ptrace.h>
10976 #endif
10977 #if HAVE_UNISTD_H
10978 # include <unistd.h>
10979 #endif
10980 '
10981 # There is no point in checking if we don't have a prototype.
10982 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10983 "
10984 if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10985   ac_have_decl=1
10986 else
10987   ac_have_decl=0
10988 fi
10989
10990 cat >>confdefs.h <<_ACEOF
10991 #define HAVE_DECL_PTRACE $ac_have_decl
10992 _ACEOF
10993 if test $ac_have_decl = 1; then :
10994
10995 else
10996
10997   : ${gdb_cv_func_ptrace_ret='int'}
10998   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10999
11000 fi
11001
11002 # Check return type.  Varargs (used on GNU/Linux) conflict with the
11003 # empty argument list, so check for that explicitly.
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11005 $as_echo_n "checking return type of ptrace... " >&6; }
11006 if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11007   $as_echo_n "(cached) " >&6
11008 else
11009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11010 /* end confdefs.h.  */
11011 $gdb_ptrace_headers
11012 int
11013 main ()
11014 {
11015 extern long ptrace (enum __ptrace_request, ...);
11016   ;
11017   return 0;
11018 }
11019 _ACEOF
11020 if ac_fn_c_try_compile "$LINENO"; then :
11021   gdb_cv_func_ptrace_ret='long'
11022 else
11023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11024 /* end confdefs.h.  */
11025 $gdb_ptrace_headers
11026 int
11027 main ()
11028 {
11029 extern int ptrace ();
11030   ;
11031   return 0;
11032 }
11033 _ACEOF
11034 if ac_fn_c_try_compile "$LINENO"; then :
11035   gdb_cv_func_ptrace_ret='int'
11036 else
11037   gdb_cv_func_ptrace_ret='long'
11038 fi
11039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11040 fi
11041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11042 fi
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11044 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
11045
11046 cat >>confdefs.h <<_ACEOF
11047 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
11048 _ACEOF
11049
11050 # Check argument types.
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11052 $as_echo_n "checking types of arguments for ptrace... " >&6; }
11053 if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11054   $as_echo_n "(cached) " >&6
11055 else
11056
11057   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11058 /* end confdefs.h.  */
11059 $gdb_ptrace_headers
11060 int
11061 main ()
11062 {
11063 extern long ptrace (enum __ptrace_request, ...);
11064   ;
11065   return 0;
11066 }
11067 _ACEOF
11068 if ac_fn_c_try_compile "$LINENO"; then :
11069   gdb_cv_func_ptrace_args='int,int,long,long'
11070 else
11071
11072 for gdb_arg1 in 'int' 'long'; do
11073  for gdb_arg2 in 'pid_t' 'int' 'long'; do
11074   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
11075    for gdb_arg4 in 'int' 'long' 'void *'; do
11076      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11077 /* end confdefs.h.  */
11078 $gdb_ptrace_headers
11079 int
11080 main ()
11081 {
11082
11083 extern $gdb_cv_func_ptrace_ret
11084   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11085
11086   ;
11087   return 0;
11088 }
11089 _ACEOF
11090 if ac_fn_c_try_compile "$LINENO"; then :
11091   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11092     break 4;
11093 fi
11094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11095     for gdb_arg5 in 'int *' 'int' 'long'; do
11096      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11097 /* end confdefs.h.  */
11098 $gdb_ptrace_headers
11099 int
11100 main ()
11101 {
11102
11103 extern $gdb_cv_func_ptrace_ret
11104   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11105
11106   ;
11107   return 0;
11108 }
11109 _ACEOF
11110 if ac_fn_c_try_compile "$LINENO"; then :
11111
11112 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11113     break 5;
11114 fi
11115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11116     done
11117    done
11118   done
11119  done
11120 done
11121 # Provide a safe default value.
11122 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11123
11124 fi
11125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11126 fi
11127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11128 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
11129 ac_save_IFS=$IFS; IFS=','
11130 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11131 IFS=$ac_save_IFS
11132 shift
11133
11134 cat >>confdefs.h <<_ACEOF
11135 #define PTRACE_TYPE_ARG3 $3
11136 _ACEOF
11137
11138
11139 cat >>confdefs.h <<_ACEOF
11140 #define PTRACE_TYPE_ARG4 $4
11141 _ACEOF
11142
11143 if test -n "$5"; then
11144
11145 cat >>confdefs.h <<_ACEOF
11146 #define PTRACE_TYPE_ARG5 $5
11147 _ACEOF
11148
11149 fi
11150
11151 if test "$cross_compiling" = no; then
11152   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11153 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11154 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11155   $as_echo_n "(cached) " >&6
11156 else
11157   if test "$cross_compiling" = yes; then :
11158   as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
11159 else
11160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11161 /* end confdefs.h.  */
11162 $ac_includes_default
11163 int
11164 main ()
11165 {
11166 /* If this system has a BSD-style setpgrp which takes arguments,
11167   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11168   exit successfully. */
11169   return setpgrp (1,1) != -1;
11170   ;
11171   return 0;
11172 }
11173 _ACEOF
11174 if ac_fn_c_try_run "$LINENO"; then :
11175   ac_cv_func_setpgrp_void=no
11176 else
11177   ac_cv_func_setpgrp_void=yes
11178 fi
11179 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11180   conftest.$ac_objext conftest.beam conftest.$ac_ext
11181 fi
11182
11183 fi
11184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11185 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
11186 if test $ac_cv_func_setpgrp_void = yes; then
11187
11188 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
11189
11190 fi
11191
11192 else
11193   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11194 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11195 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11196   $as_echo_n "(cached) " >&6
11197 else
11198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11199 /* end confdefs.h.  */
11200
11201 #include <unistd.h>
11202
11203 int
11204 main ()
11205 {
11206
11207   if (setpgrp(1,1) == -1)
11208     exit (0);
11209   else
11210     exit (1);
11211
11212   ;
11213   return 0;
11214 }
11215 _ACEOF
11216 if ac_fn_c_try_compile "$LINENO"; then :
11217   ac_cv_func_setpgrp_void=no
11218 else
11219   ac_cv_func_setpgrp_void=yes
11220 fi
11221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11222 fi
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11224 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
11225 if test $ac_cv_func_setpgrp_void = yes; then
11226   $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
11227
11228 fi
11229 fi
11230
11231 # Assume we'll default to using the included libiberty regex.
11232 gdb_use_included_regex=yes
11233
11234 # However, if the system regex is GNU regex, then default to *not*
11235 # using the included regex.
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11237 $as_echo_n "checking for GNU regex... " >&6; }
11238 if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11239   $as_echo_n "(cached) " >&6
11240 else
11241   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11242 /* end confdefs.h.  */
11243 #include <gnu-versions.h>
11244 int
11245 main ()
11246 {
11247 #define REGEX_INTERFACE_VERSION 1
11248 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11249 # error "Version mismatch"
11250 #endif
11251   ;
11252   return 0;
11253 }
11254 _ACEOF
11255 if ac_fn_c_try_compile "$LINENO"; then :
11256   gdb_cv_have_gnu_regex=yes
11257 else
11258   gdb_cv_have_gnu_regex=no
11259 fi
11260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11261 fi
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11263 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
11264 if test $gdb_cv_have_gnu_regex = yes; then
11265   gdb_use_included_regex=no
11266 fi
11267
11268
11269 # Check whether --with-included-regex was given.
11270 if test "${with_included_regex+set}" = set; then :
11271   withval=$with_included_regex; gdb_with_regex=$withval
11272 else
11273   gdb_with_regex=$gdb_use_included_regex
11274 fi
11275
11276 if test "$gdb_with_regex" = yes; then
11277
11278 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11279
11280 fi
11281
11282 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11283 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11284 #include <sys/proc.h>
11285
11286 "
11287 if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
11288
11289 cat >>confdefs.h <<_ACEOF
11290 #define HAVE_STRUCT_THREAD_TD_PCB 1
11291 _ACEOF
11292
11293
11294 fi
11295
11296
11297 # See if <sys/lwp.h> defines `struct lwp`.
11298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11299 $as_echo_n "checking for struct lwp... " >&6; }
11300 if test "${gdb_cv_struct_lwp+set}" = set; then :
11301   $as_echo_n "(cached) " >&6
11302 else
11303   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11304 /* end confdefs.h.  */
11305 #include <sys/param.h>
11306 #include <sys/lwp.h>
11307 int
11308 main ()
11309 {
11310 struct lwp l;
11311   ;
11312   return 0;
11313 }
11314 _ACEOF
11315 if ac_fn_c_try_compile "$LINENO"; then :
11316   gdb_cv_struct_lwp=yes
11317 else
11318   gdb_cv_struct_lwp=no
11319 fi
11320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11321 fi
11322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11323 $as_echo "$gdb_cv_struct_lwp" >&6; }
11324 if test $gdb_cv_struct_lwp = yes; then
11325
11326 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
11327
11328 fi
11329
11330 # See if <machine/reg.h> degines `struct reg'.
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11332 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11333 if test "${gdb_cv_struct_reg+set}" = set; then :
11334   $as_echo_n "(cached) " >&6
11335 else
11336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11337 /* end confdefs.h.  */
11338 #include <sys/types.h>
11339 #include <machine/reg.h>
11340 int
11341 main ()
11342 {
11343 struct reg r;
11344   ;
11345   return 0;
11346 }
11347 _ACEOF
11348 if ac_fn_c_try_compile "$LINENO"; then :
11349   gdb_cv_struct_reg=yes
11350 else
11351   gdb_cv_struct_reg=no
11352 fi
11353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11354 fi
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11356 $as_echo "$gdb_cv_struct_reg" >&6; }
11357 if test $gdb_cv_struct_reg = yes; then
11358
11359 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
11360
11361 fi
11362
11363 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11364 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
11365 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11366 "
11367 if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
11368
11369 cat >>confdefs.h <<_ACEOF
11370 #define HAVE_STRUCT_REG_R_FS 1
11371 _ACEOF
11372
11373
11374 fi
11375 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11376 "
11377 if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
11378
11379 cat >>confdefs.h <<_ACEOF
11380 #define HAVE_STRUCT_REG_R_GS 1
11381 _ACEOF
11382
11383
11384 fi
11385
11386
11387 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
11388 # Older amd64 Linux's don't have the fs_base and gs_base members of
11389 # `struct user_regs_struct'.
11390 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>
11391 "
11392 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
11393
11394 cat >>confdefs.h <<_ACEOF
11395 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
11396 _ACEOF
11397
11398
11399 fi
11400 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>
11401 "
11402 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
11403
11404 cat >>confdefs.h <<_ACEOF
11405 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
11406 _ACEOF
11407
11408
11409 fi
11410
11411
11412 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11414 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11415 if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11416   $as_echo_n "(cached) " >&6
11417 else
11418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11419 /* end confdefs.h.  */
11420 #include <sys/ptrace.h>
11421 int
11422 main ()
11423 {
11424 PTRACE_GETREGS;
11425   ;
11426   return 0;
11427 }
11428 _ACEOF
11429 if ac_fn_c_try_compile "$LINENO"; then :
11430   gdb_cv_have_ptrace_getregs=yes
11431 else
11432   gdb_cv_have_ptrace_getregs=no
11433 fi
11434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11435 fi
11436
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11438 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
11439 if test $gdb_cv_have_ptrace_getregs = yes; then
11440
11441 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
11442
11443 fi
11444
11445 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
11446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11447 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11448 if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11449   $as_echo_n "(cached) " >&6
11450 else
11451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11452 /* end confdefs.h.  */
11453 #include <sys/ptrace.h>
11454 int
11455 main ()
11456 {
11457 PTRACE_GETFPXREGS;
11458   ;
11459   return 0;
11460 }
11461 _ACEOF
11462 if ac_fn_c_try_compile "$LINENO"; then :
11463   gdb_cv_have_ptrace_getfpxregs=yes
11464 else
11465   gdb_cv_have_ptrace_getfpxregs=no
11466 fi
11467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11468 fi
11469
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11471 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
11472 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
11473
11474 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
11475
11476 fi
11477
11478 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
11479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11480 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
11481 if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11482   $as_echo_n "(cached) " >&6
11483 else
11484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11485 /* end confdefs.h.  */
11486 #include <sys/types.h>
11487 #include <sys/ptrace.h>
11488 int
11489 main ()
11490 {
11491 PT_GETDBREGS;
11492   ;
11493   return 0;
11494 }
11495 _ACEOF
11496 if ac_fn_c_try_compile "$LINENO"; then :
11497   gdb_cv_have_pt_getdbregs=yes
11498 else
11499   gdb_cv_have_pt_getdbregs=no
11500 fi
11501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11502 fi
11503
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11505 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
11506 if test $gdb_cv_have_pt_getdbregs = yes; then
11507
11508 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
11509
11510 fi
11511
11512 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11514 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11515 if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11516   $as_echo_n "(cached) " >&6
11517 else
11518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11519 /* end confdefs.h.  */
11520 #include <sys/types.h>
11521 #include <sys/ptrace.h>
11522 int
11523 main ()
11524 {
11525 PT_GETXMMREGS;
11526   ;
11527   return 0;
11528 }
11529 _ACEOF
11530 if ac_fn_c_try_compile "$LINENO"; then :
11531   gdb_cv_have_pt_getxmmregs=yes
11532 else
11533   gdb_cv_have_pt_getxmmregs=no
11534 fi
11535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11536 fi
11537
11538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11539 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
11540 if test $gdb_cv_have_pt_getxmmregs = yes; then
11541
11542 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
11543
11544 fi
11545
11546 # Detect which type of /proc is in use, such as for Solaris.
11547
11548 if test "${target}" = "${host}"; then
11549   case "${host}" in
11550   *-*-sysv4.2* | *-*-sysv5* )
11551
11552 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
11553
11554       ;;
11555   *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
11556
11557 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
11558
11559       ;;
11560   mips-sgi-irix5*)
11561       # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
11562
11563 $as_echo "#define _KMEMUSER 1" >>confdefs.h
11564
11565       ;;
11566   esac
11567 fi
11568
11569 if test "$ac_cv_header_sys_procfs_h" = yes; then
11570   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11571 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11572  if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11573   $as_echo_n "(cached) " >&6
11574 else
11575   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11576 /* end confdefs.h.  */
11577
11578 #define _SYSCALL32
11579 /* Needed for new procfs interface on sparc-solaris.  */
11580 #define _STRUCTURED_PROC 1
11581 #include <sys/procfs.h>
11582 int
11583 main ()
11584 {
11585 gregset_t avar
11586   ;
11587   return 0;
11588 }
11589 _ACEOF
11590 if ac_fn_c_try_compile "$LINENO"; then :
11591   bfd_cv_have_sys_procfs_type_gregset_t=yes
11592 else
11593   bfd_cv_have_sys_procfs_type_gregset_t=no
11594
11595 fi
11596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11597 fi
11598
11599  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
11600
11601 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
11602
11603  fi
11604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11605 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
11606
11607   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11608 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11609  if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11610   $as_echo_n "(cached) " >&6
11611 else
11612   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11613 /* end confdefs.h.  */
11614
11615 #define _SYSCALL32
11616 /* Needed for new procfs interface on sparc-solaris.  */
11617 #define _STRUCTURED_PROC 1
11618 #include <sys/procfs.h>
11619 int
11620 main ()
11621 {
11622 fpregset_t avar
11623   ;
11624   return 0;
11625 }
11626 _ACEOF
11627 if ac_fn_c_try_compile "$LINENO"; then :
11628   bfd_cv_have_sys_procfs_type_fpregset_t=yes
11629 else
11630   bfd_cv_have_sys_procfs_type_fpregset_t=no
11631
11632 fi
11633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11634 fi
11635
11636  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
11637
11638 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
11639
11640  fi
11641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11642 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
11643
11644   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11645 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11646  if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11647   $as_echo_n "(cached) " >&6
11648 else
11649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11650 /* end confdefs.h.  */
11651
11652 #define _SYSCALL32
11653 /* Needed for new procfs interface on sparc-solaris.  */
11654 #define _STRUCTURED_PROC 1
11655 #include <sys/procfs.h>
11656 int
11657 main ()
11658 {
11659 prgregset_t avar
11660   ;
11661   return 0;
11662 }
11663 _ACEOF
11664 if ac_fn_c_try_compile "$LINENO"; then :
11665   bfd_cv_have_sys_procfs_type_prgregset_t=yes
11666 else
11667   bfd_cv_have_sys_procfs_type_prgregset_t=no
11668
11669 fi
11670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11671 fi
11672
11673  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
11674
11675 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
11676
11677  fi
11678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11679 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
11680
11681   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11682 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11683  if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11684   $as_echo_n "(cached) " >&6
11685 else
11686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11687 /* end confdefs.h.  */
11688
11689 #define _SYSCALL32
11690 /* Needed for new procfs interface on sparc-solaris.  */
11691 #define _STRUCTURED_PROC 1
11692 #include <sys/procfs.h>
11693 int
11694 main ()
11695 {
11696 prfpregset_t avar
11697   ;
11698   return 0;
11699 }
11700 _ACEOF
11701 if ac_fn_c_try_compile "$LINENO"; then :
11702   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
11703 else
11704   bfd_cv_have_sys_procfs_type_prfpregset_t=no
11705
11706 fi
11707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11708 fi
11709
11710  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
11711
11712 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
11713
11714  fi
11715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11716 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
11717
11718   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11719 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11720  if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11721   $as_echo_n "(cached) " >&6
11722 else
11723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11724 /* end confdefs.h.  */
11725
11726 #define _SYSCALL32
11727 /* Needed for new procfs interface on sparc-solaris.  */
11728 #define _STRUCTURED_PROC 1
11729 #include <sys/procfs.h>
11730 int
11731 main ()
11732 {
11733 prgregset32_t avar
11734   ;
11735   return 0;
11736 }
11737 _ACEOF
11738 if ac_fn_c_try_compile "$LINENO"; then :
11739   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
11740 else
11741   bfd_cv_have_sys_procfs_type_prgregset32_t=no
11742
11743 fi
11744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11745 fi
11746
11747  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
11748
11749 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
11750
11751  fi
11752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11753 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
11754
11755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11756 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11757  if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11758   $as_echo_n "(cached) " >&6
11759 else
11760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11761 /* end confdefs.h.  */
11762
11763 #define _SYSCALL32
11764 /* Needed for new procfs interface on sparc-solaris.  */
11765 #define _STRUCTURED_PROC 1
11766 #include <sys/procfs.h>
11767 int
11768 main ()
11769 {
11770 lwpid_t avar
11771   ;
11772   return 0;
11773 }
11774 _ACEOF
11775 if ac_fn_c_try_compile "$LINENO"; then :
11776   bfd_cv_have_sys_procfs_type_lwpid_t=yes
11777 else
11778   bfd_cv_have_sys_procfs_type_lwpid_t=no
11779
11780 fi
11781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11782 fi
11783
11784  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
11785
11786 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
11787
11788  fi
11789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11790 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
11791
11792   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11793 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11794  if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11795   $as_echo_n "(cached) " >&6
11796 else
11797   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11798 /* end confdefs.h.  */
11799
11800 #define _SYSCALL32
11801 /* Needed for new procfs interface on sparc-solaris.  */
11802 #define _STRUCTURED_PROC 1
11803 #include <sys/procfs.h>
11804 int
11805 main ()
11806 {
11807 psaddr_t avar
11808   ;
11809   return 0;
11810 }
11811 _ACEOF
11812 if ac_fn_c_try_compile "$LINENO"; then :
11813   bfd_cv_have_sys_procfs_type_psaddr_t=yes
11814 else
11815   bfd_cv_have_sys_procfs_type_psaddr_t=no
11816
11817 fi
11818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11819 fi
11820
11821  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
11822
11823 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
11824
11825  fi
11826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11827 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
11828
11829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11830 $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11831  if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11832   $as_echo_n "(cached) " >&6
11833 else
11834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11835 /* end confdefs.h.  */
11836
11837 #define _SYSCALL32
11838 /* Needed for new procfs interface on sparc-solaris.  */
11839 #define _STRUCTURED_PROC 1
11840 #include <sys/procfs.h>
11841 int
11842 main ()
11843 {
11844 prsysent_t avar
11845   ;
11846   return 0;
11847 }
11848 _ACEOF
11849 if ac_fn_c_try_compile "$LINENO"; then :
11850   bfd_cv_have_sys_procfs_type_prsysent_t=yes
11851 else
11852   bfd_cv_have_sys_procfs_type_prsysent_t=no
11853
11854 fi
11855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11856 fi
11857
11858  if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
11859
11860 $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
11861
11862  fi
11863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11864 $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
11865
11866   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11867 $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11868  if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11869   $as_echo_n "(cached) " >&6
11870 else
11871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11872 /* end confdefs.h.  */
11873
11874 #define _SYSCALL32
11875 /* Needed for new procfs interface on sparc-solaris.  */
11876 #define _STRUCTURED_PROC 1
11877 #include <sys/procfs.h>
11878 int
11879 main ()
11880 {
11881 pr_sigset_t avar
11882   ;
11883   return 0;
11884 }
11885 _ACEOF
11886 if ac_fn_c_try_compile "$LINENO"; then :
11887   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
11888 else
11889   bfd_cv_have_sys_procfs_type_pr_sigset_t=no
11890
11891 fi
11892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11893 fi
11894
11895  if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
11896
11897 $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
11898
11899  fi
11900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11901 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
11902
11903   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11904 $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11905  if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11906   $as_echo_n "(cached) " >&6
11907 else
11908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11909 /* end confdefs.h.  */
11910
11911 #define _SYSCALL32
11912 /* Needed for new procfs interface on sparc-solaris.  */
11913 #define _STRUCTURED_PROC 1
11914 #include <sys/procfs.h>
11915 int
11916 main ()
11917 {
11918 pr_sigaction64_t avar
11919   ;
11920   return 0;
11921 }
11922 _ACEOF
11923 if ac_fn_c_try_compile "$LINENO"; then :
11924   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
11925 else
11926   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
11927
11928 fi
11929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11930 fi
11931
11932  if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
11933
11934 $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
11935
11936  fi
11937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11938 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
11939
11940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11941 $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11942  if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11943   $as_echo_n "(cached) " >&6
11944 else
11945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11946 /* end confdefs.h.  */
11947
11948 #define _SYSCALL32
11949 /* Needed for new procfs interface on sparc-solaris.  */
11950 #define _STRUCTURED_PROC 1
11951 #include <sys/procfs.h>
11952 int
11953 main ()
11954 {
11955 pr_siginfo64_t avar
11956   ;
11957   return 0;
11958 }
11959 _ACEOF
11960 if ac_fn_c_try_compile "$LINENO"; then :
11961   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11962 else
11963   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
11964
11965 fi
11966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11967 fi
11968
11969  if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
11970
11971 $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
11972
11973  fi
11974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11975 $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
11976
11977
11978
11979
11980
11981   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
11982     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11983 $as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11984     if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11985   $as_echo_n "(cached) " >&6
11986 else
11987   if test "$cross_compiling" = yes; then :
11988   gdb_cv_prfpregset_t_broken=yes
11989 else
11990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11991 /* end confdefs.h.  */
11992 #include <sys/procfs.h>
11993        int main ()
11994        {
11995          if (sizeof (prfpregset_t) == sizeof (void *))
11996            return 1;
11997          return 0;
11998        }
11999 _ACEOF
12000 if ac_fn_c_try_run "$LINENO"; then :
12001   gdb_cv_prfpregset_t_broken=no
12002 else
12003   gdb_cv_prfpregset_t_broken=yes
12004 fi
12005 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12006   conftest.$ac_objext conftest.beam conftest.$ac_ext
12007 fi
12008
12009 fi
12010
12011     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12012 $as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
12013     if test $gdb_cv_prfpregset_t_broken = yes; then
12014
12015 $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
12016
12017     fi
12018   fi
12019 fi
12020
12021 # Check if the compiler supports the `long long' type.
12022
12023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12024 $as_echo_n "checking for long long support in compiler... " >&6; }
12025 if test "${gdb_cv_c_long_long+set}" = set; then :
12026   $as_echo_n "(cached) " >&6
12027 else
12028   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12029 /* end confdefs.h.  */
12030 extern long long foo;
12031 int
12032 main ()
12033 {
12034 switch (foo & 2) { case 0: return 1; }
12035   ;
12036   return 0;
12037 }
12038 _ACEOF
12039 if ac_fn_c_try_compile "$LINENO"; then :
12040   gdb_cv_c_long_long=yes
12041 else
12042   gdb_cv_c_long_long=no
12043 fi
12044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12045 fi
12046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12047 $as_echo "$gdb_cv_c_long_long" >&6; }
12048 if test $gdb_cv_c_long_long != yes; then
12049   # libdecnumber requires long long.
12050   as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
12051 fi
12052
12053 # Check if the compiler and runtime support printing long longs.
12054
12055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12056 $as_echo_n "checking for long long support in printf... " >&6; }
12057 if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12058   $as_echo_n "(cached) " >&6
12059 else
12060   if test "$cross_compiling" = yes; then :
12061   gdb_cv_printf_has_long_long=no
12062 else
12063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12064 /* end confdefs.h.  */
12065 $ac_includes_default
12066 int
12067 main ()
12068 {
12069 char buf[32];
12070   long long l = 0;
12071   l = (l << 16) + 0x0123;
12072   l = (l << 16) + 0x4567;
12073   l = (l << 16) + 0x89ab;
12074   l = (l << 16) + 0xcdef;
12075   sprintf (buf, "0x%016llx", l);
12076   return (strcmp ("0x0123456789abcdef", buf));
12077   ;
12078   return 0;
12079 }
12080 _ACEOF
12081 if ac_fn_c_try_run "$LINENO"; then :
12082   gdb_cv_printf_has_long_long=yes
12083 else
12084   gdb_cv_printf_has_long_long=no
12085 fi
12086 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12087   conftest.$ac_objext conftest.beam conftest.$ac_ext
12088 fi
12089
12090 fi
12091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12092 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
12093 if test $gdb_cv_printf_has_long_long = yes; then
12094
12095 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
12096
12097 fi
12098
12099 # Check if the compiler and runtime support printing decfloats.
12100
12101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12102 $as_echo_n "checking for decfloat support in printf... " >&6; }
12103 if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12104   $as_echo_n "(cached) " >&6
12105 else
12106   if test "$cross_compiling" = yes; then :
12107   gdb_cv_printf_has_decfloat=no
12108 else
12109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12110 /* end confdefs.h.  */
12111 $ac_includes_default
12112 int
12113 main ()
12114 {
12115 char buf[64];
12116   _Decimal32 d32 = 1.2345df;
12117   _Decimal64 d64 = 1.2345dd;
12118   _Decimal128 d128 = 1.2345dl;
12119   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12120   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12121   ;
12122   return 0;
12123 }
12124 _ACEOF
12125 if ac_fn_c_try_run "$LINENO"; then :
12126   gdb_cv_printf_has_decfloat=yes
12127 else
12128   gdb_cv_printf_has_decfloat=no
12129 fi
12130 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12131   conftest.$ac_objext conftest.beam conftest.$ac_ext
12132 fi
12133
12134 fi
12135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12136 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
12137 if test $gdb_cv_printf_has_decfloat = yes; then
12138
12139 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
12140
12141 fi
12142
12143 # Check if the compiler supports the `long double' type.  We can't use
12144 # AC_C_LONG_DOUBLE because that one does additional checks on the
12145 # constants defined in <float.h> that fail on some systems,
12146 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
12147
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12149 $as_echo_n "checking for long double support in compiler... " >&6; }
12150 if test "${gdb_cv_c_long_double+set}" = set; then :
12151   $as_echo_n "(cached) " >&6
12152 else
12153   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12154 /* end confdefs.h.  */
12155 long double foo;
12156 _ACEOF
12157 if ac_fn_c_try_compile "$LINENO"; then :
12158   gdb_cv_c_long_double=yes
12159 else
12160   gdb_cv_c_long_double=no
12161 fi
12162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12163 fi
12164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12165 $as_echo "$gdb_cv_c_long_double" >&6; }
12166 if test $gdb_cv_c_long_double = yes; then
12167
12168 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
12169
12170 fi
12171
12172 # Check if the compiler and runtime support printing long doubles.
12173
12174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12175 $as_echo_n "checking for long double support in printf... " >&6; }
12176 if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12177   $as_echo_n "(cached) " >&6
12178 else
12179   if test "$cross_compiling" = yes; then :
12180   gdb_cv_printf_has_long_double=no
12181 else
12182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12183 /* end confdefs.h.  */
12184 $ac_includes_default
12185 int
12186 main ()
12187 {
12188 char buf[16];
12189   long double f = 3.141592653;
12190   sprintf (buf, "%Lg", f);
12191   return (strncmp ("3.14159", buf, 7));
12192   ;
12193   return 0;
12194 }
12195 _ACEOF
12196 if ac_fn_c_try_run "$LINENO"; then :
12197   gdb_cv_printf_has_long_double=yes
12198 else
12199   gdb_cv_printf_has_long_double=no
12200 fi
12201 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12202   conftest.$ac_objext conftest.beam conftest.$ac_ext
12203 fi
12204
12205 fi
12206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12207 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
12208 if test $gdb_cv_printf_has_long_double = yes; then
12209
12210 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
12211
12212 fi
12213
12214 # Check if the compiler and runtime support scanning long doubles.
12215
12216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12217 $as_echo_n "checking for long double support in scanf... " >&6; }
12218 if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12219   $as_echo_n "(cached) " >&6
12220 else
12221   if test "$cross_compiling" = yes; then :
12222   gdb_cv_scanf_has_long_double=no
12223 else
12224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12225 /* end confdefs.h.  */
12226 #include <stdio.h>
12227 int
12228 main ()
12229 {
12230 char *buf = "3.141592653";
12231   long double f = 0;
12232   sscanf (buf, "%Lg", &f);
12233   return !(f > 3.14159 && f < 3.14160);
12234   ;
12235   return 0;
12236 }
12237 _ACEOF
12238 if ac_fn_c_try_run "$LINENO"; then :
12239   gdb_cv_scanf_has_long_double=yes
12240 else
12241   gdb_cv_scanf_has_long_double=no
12242 fi
12243 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12244   conftest.$ac_objext conftest.beam conftest.$ac_ext
12245 fi
12246
12247 fi
12248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12249 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
12250 if test $gdb_cv_scanf_has_long_double = yes; then
12251
12252 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
12253
12254 fi
12255
12256 case ${host_os} in
12257 aix*)
12258   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12259 $as_echo_n "checking for -bbigtoc option... " >&6; }
12260 if test "${gdb_cv_bigtoc+set}" = set; then :
12261   $as_echo_n "(cached) " >&6
12262 else
12263
12264     SAVE_LDFLAGS=$LDFLAGS
12265
12266     case $GCC in
12267     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12268     *) gdb_cv_bigtoc=-bbigtoc ;;
12269     esac
12270
12271     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
12272     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12273 /* end confdefs.h.  */
12274
12275 int
12276 main ()
12277 {
12278 int i;
12279   ;
12280   return 0;
12281 }
12282 _ACEOF
12283 if ac_fn_c_try_link "$LINENO"; then :
12284
12285 else
12286   gdb_cv_bigtoc=
12287 fi
12288 rm -f core conftest.err conftest.$ac_objext \
12289     conftest$ac_exeext conftest.$ac_ext
12290     LDFLAGS="${SAVE_LDFLAGS}"
12291
12292 fi
12293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12294 $as_echo "$gdb_cv_bigtoc" >&6; }
12295   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12296   ;;
12297 esac
12298
12299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
12300 $as_echo_n "checking for the dynamic export flag... " >&6; }
12301 dynamic_list=false
12302 if test "${gdb_native}" = yes; then
12303    # The dynamically loaded libthread_db needs access to symbols in the gdb
12304    # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
12305    # may not be supported there.
12306    old_LDFLAGS="$LDFLAGS"
12307    # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
12308    RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
12309    LDFLAGS="$LDFLAGS $RDYNAMIC"
12310    if test "${have_libpython}" = no; then
12311      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12312 /* end confdefs.h.  */
12313
12314 int
12315 main ()
12316 {
12317
12318   ;
12319   return 0;
12320 }
12321 _ACEOF
12322 if ac_fn_c_try_link "$LINENO"; then :
12323   dynamic_list=true
12324 fi
12325 rm -f core conftest.err conftest.$ac_objext \
12326     conftest$ac_exeext conftest.$ac_ext
12327    else
12328      # Workaround http://bugs.python.org/issue4434 where static
12329      # libpythonX.Y.a would get its symbols required for
12330      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
12331      # Problem does not happen for the recommended libpythonX.Y.so linkage.
12332      old_CFLAGS="$CFLAGS"
12333      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
12334      old_LIBS="$LIBS"
12335      LIBS="$LIBS $PYTHON_LIBS"
12336      if test "$cross_compiling" = yes; then :
12337   true
12338 else
12339   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12340 /* end confdefs.h.  */
12341 #include "${have_libpython}/Python.h"
12342 int
12343 main ()
12344 {
12345 int err;
12346           Py_Initialize ();
12347           err = PyRun_SimpleString ("import itertools\n");
12348           Py_Finalize ();
12349           return err == 0 ? 0 : 1;
12350   ;
12351   return 0;
12352 }
12353 _ACEOF
12354 if ac_fn_c_try_run "$LINENO"; then :
12355   dynamic_list=true
12356 fi
12357 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12358   conftest.$ac_objext conftest.beam conftest.$ac_ext
12359 fi
12360
12361      LIBS="$old_LIBS"
12362      CFLAGS="$old_CFLAGS"
12363    fi
12364    LDFLAGS="$old_LDFLAGS"
12365 fi
12366 if $dynamic_list; then
12367   found="-Wl,--dynamic-list"
12368   RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
12369 else
12370   found="-rdynamic"
12371   RDYNAMIC="-rdynamic"
12372 fi
12373
12374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
12375 $as_echo "$found" >&6; }
12376
12377
12378 if test ${build} = ${host} -a ${host} = ${target} ; then
12379    case ${host_os} in
12380    solaris*)
12381       # See if thread_db library is around for Solaris thread debugging.
12382       # Note that we must explicitly test for version 1 of the library
12383       # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12384       # the same API.
12385       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12386 $as_echo_n "checking for Solaris thread debugging library... " >&6; }
12387       if test -f /usr/lib/libthread_db.so.1 ; then
12388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12389 $as_echo "yes" >&6; }
12390
12391 $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
12392
12393          CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
12394          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
12395          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12396 $as_echo_n "checking for dlopen in -ldl... " >&6; }
12397 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12398   $as_echo_n "(cached) " >&6
12399 else
12400   ac_check_lib_save_LIBS=$LIBS
12401 LIBS="-ldl  $LIBS"
12402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12403 /* end confdefs.h.  */
12404
12405 /* Override any GCC internal prototype to avoid an error.
12406    Use char because int might match the return type of a GCC
12407    builtin and then its argument prototype would still apply.  */
12408 #ifdef __cplusplus
12409 extern "C"
12410 #endif
12411 char dlopen ();
12412 int
12413 main ()
12414 {
12415 return dlopen ();
12416   ;
12417   return 0;
12418 }
12419 _ACEOF
12420 if ac_fn_c_try_link "$LINENO"; then :
12421   ac_cv_lib_dl_dlopen=yes
12422 else
12423   ac_cv_lib_dl_dlopen=no
12424 fi
12425 rm -f core conftest.err conftest.$ac_objext \
12426     conftest$ac_exeext conftest.$ac_ext
12427 LIBS=$ac_check_lib_save_LIBS
12428 fi
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12430 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12431 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
12432   cat >>confdefs.h <<_ACEOF
12433 #define HAVE_LIBDL 1
12434 _ACEOF
12435
12436   LIBS="-ldl $LIBS"
12437
12438 fi
12439
12440          CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
12441          # Sun randomly tweaked the prototypes in <proc_service.h>
12442          # at one point.
12443          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12444 $as_echo_n "checking if <proc_service.h> is old... " >&6; }
12445          if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12446   $as_echo_n "(cached) " >&6
12447 else
12448
12449             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12450 /* end confdefs.h.  */
12451
12452                 #include <proc_service.h>
12453                 ps_err_e ps_pdwrite
12454                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
12455
12456 int
12457 main ()
12458 {
12459
12460   ;
12461   return 0;
12462 }
12463 _ACEOF
12464 if ac_fn_c_try_compile "$LINENO"; then :
12465   gdb_cv_proc_service_is_old=no
12466 else
12467   gdb_cv_proc_service_is_old=yes
12468 fi
12469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12470
12471 fi
12472
12473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12474 $as_echo "$gdb_cv_proc_service_is_old" >&6; }
12475          if test $gdb_cv_proc_service_is_old = yes; then
12476
12477 $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
12478
12479          fi
12480       else
12481          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12482 $as_echo "no" >&6; }
12483       fi
12484       ;;
12485    aix*)
12486       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12487 $as_echo_n "checking for AiX thread debugging library... " >&6; }
12488       if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12489   $as_echo_n "(cached) " >&6
12490 else
12491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12492 /* end confdefs.h.  */
12493 #include <sys/pthdebug.h>
12494 int
12495 main ()
12496 {
12497 #ifndef PTHDB_VERSION_3
12498                                     #error
12499                                     #endif
12500   ;
12501   return 0;
12502 }
12503 _ACEOF
12504 if ac_fn_c_try_compile "$LINENO"; then :
12505   gdb_cv_have_aix_thread_debug=yes
12506 else
12507   gdb_cv_have_aix_thread_debug=no
12508 fi
12509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12510 fi
12511
12512       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12513 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
12514       if test $gdb_cv_have_aix_thread_debug = yes; then
12515          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
12516          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
12517          LIBS="$LIBS -lpthdebug"
12518
12519          # Older versions of AIX do not provide the declaration for
12520          # the getthrds function (it appears that it was introduced
12521          # with AIX 6.x).
12522          ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12523 "
12524 if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12525   ac_have_decl=1
12526 else
12527   ac_have_decl=0
12528 fi
12529
12530 cat >>confdefs.h <<_ACEOF
12531 #define HAVE_DECL_GETTHRDS $ac_have_decl
12532 _ACEOF
12533
12534       fi
12535       ;;
12536    esac
12537
12538 fi
12539
12540 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
12541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12542 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12543 if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12544   $as_echo_n "(cached) " >&6
12545 else
12546   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12547 /* end confdefs.h.  */
12548 #include <thread_db.h>
12549 int
12550 main ()
12551 {
12552 int i = TD_NOTALLOC;
12553   ;
12554   return 0;
12555 }
12556 _ACEOF
12557 if ac_fn_c_try_compile "$LINENO"; then :
12558   gdb_cv_thread_db_h_has_td_notalloc=yes
12559 else
12560   gdb_cv_thread_db_h_has_td_notalloc=no
12561
12562 fi
12563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12564
12565 fi
12566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12567 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12569 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12570 if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12571   $as_echo_n "(cached) " >&6
12572 else
12573   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12574 /* end confdefs.h.  */
12575 #include <thread_db.h>
12576 int
12577 main ()
12578 {
12579 int i = TD_VERSION;
12580   ;
12581   return 0;
12582 }
12583 _ACEOF
12584 if ac_fn_c_try_compile "$LINENO"; then :
12585   gdb_cv_thread_db_h_has_td_version=yes
12586 else
12587   gdb_cv_thread_db_h_has_td_version=no
12588
12589 fi
12590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12591
12592 fi
12593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12594 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12595    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12596 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12597 if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12598   $as_echo_n "(cached) " >&6
12599 else
12600   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12601 /* end confdefs.h.  */
12602 #include <thread_db.h>
12603 int
12604 main ()
12605 {
12606 int i = TD_NOTLS;
12607   ;
12608   return 0;
12609 }
12610 _ACEOF
12611 if ac_fn_c_try_compile "$LINENO"; then :
12612   gdb_cv_thread_db_h_has_td_notls=yes
12613 else
12614   gdb_cv_thread_db_h_has_td_notls=no
12615
12616 fi
12617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12618
12619 fi
12620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12621 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
12622 fi
12623 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
12624
12625 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
12626
12627 fi
12628 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12629
12630 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
12631
12632 fi
12633 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12634
12635 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
12636
12637 fi
12638
12639 if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
12640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12641 $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12642 if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12643   $as_echo_n "(cached) " >&6
12644 else
12645   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12646 /* end confdefs.h.  */
12647 #include <sys/syscall.h>
12648 int
12649 main ()
12650 {
12651 int i = __NR_tkill;
12652   ;
12653   return 0;
12654 }
12655 _ACEOF
12656 if ac_fn_c_try_compile "$LINENO"; then :
12657   gdb_cv_sys_syscall_h_has_tkill=yes
12658 else
12659   gdb_cv_sys_syscall_h_has_tkill=no
12660
12661 fi
12662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12663
12664 fi
12665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12666 $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
12667 fi
12668 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
12669   ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
12670 if test "x$ac_cv_func_syscall" = x""yes; then :
12671
12672 $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
12673
12674
12675 fi
12676
12677 fi
12678
12679 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12680 "
12681 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12682   ac_have_decl=1
12683 else
12684   ac_have_decl=0
12685 fi
12686
12687 cat >>confdefs.h <<_ACEOF
12688 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
12689 _ACEOF
12690
12691
12692 if test "$cross_compiling" = yes; then :
12693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12694 /* end confdefs.h.  */
12695 #include <sys/personality.h>
12696 int
12697 main ()
12698 {
12699
12700 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
12701 #       define ADDR_NO_RANDOMIZE 0x0040000
12702 #      endif
12703        /* Test the flag could be set and stays set.  */
12704        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12705        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12706            return 1
12707   ;
12708   return 0;
12709 }
12710 _ACEOF
12711 if ac_fn_c_try_link "$LINENO"; then :
12712   have_personality=true
12713 else
12714   have_personality=false
12715 fi
12716 rm -f core conftest.err conftest.$ac_objext \
12717     conftest$ac_exeext conftest.$ac_ext
12718 else
12719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12720 /* end confdefs.h.  */
12721 #include <sys/personality.h>
12722 int
12723 main ()
12724 {
12725
12726 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
12727 #       define ADDR_NO_RANDOMIZE 0x0040000
12728 #      endif
12729        /* Test the flag could be set and stays set.  */
12730        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12731        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12732            return 1
12733   ;
12734   return 0;
12735 }
12736 _ACEOF
12737 if ac_fn_c_try_run "$LINENO"; then :
12738   have_personality=true
12739 else
12740   have_personality=false
12741 fi
12742 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12743   conftest.$ac_objext conftest.beam conftest.$ac_ext
12744 fi
12745
12746 if $have_personality
12747 then
12748
12749 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
12750
12751 fi
12752
12753 case $host_os in
12754   go32* | *djgpp*)
12755     gdbinit=gdb.ini
12756     ;;
12757   *)
12758     gdbinit=.gdbinit
12759     ;;
12760 esac
12761
12762 cat >>confdefs.h <<_ACEOF
12763 #define GDBINIT "$gdbinit"
12764 _ACEOF
12765
12766
12767
12768 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12769 # except that the argument to --with-sysroot is optional.
12770 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12771 if test "x$with_sysroot" = xyes; then
12772   with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12773 fi
12774
12775 # Check whether --with-sysroot was given.
12776 if test "${with_sysroot+set}" = set; then :
12777   withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12778 else
12779   TARGET_SYSTEM_ROOT=
12780 fi
12781
12782
12783   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12784   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12785   ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12786   ac_define_dir=`eval echo $ac_define_dir`
12787
12788 cat >>confdefs.h <<_ACEOF
12789 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
12790 _ACEOF
12791
12792
12793
12794
12795   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12796      if test "x$prefix" = xNONE; then
12797         test_prefix=/usr/local
12798      else
12799         test_prefix=$prefix
12800      fi
12801   else
12802      test_prefix=$exec_prefix
12803   fi
12804   value=0
12805   case ${ac_define_dir} in
12806      "${test_prefix}"|"${test_prefix}/"*|\
12807         '${exec_prefix}'|'${exec_prefix}/'*)
12808      value=1
12809      ;;
12810   esac
12811
12812 cat >>confdefs.h <<_ACEOF
12813 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12814 _ACEOF
12815
12816
12817
12818
12819
12820 # Check whether --with-system-gdbinit was given.
12821 if test "${with_system_gdbinit+set}" = set; then :
12822   withval=$with_system_gdbinit;
12823     SYSTEM_GDBINIT=$withval
12824 else
12825   SYSTEM_GDBINIT=
12826 fi
12827
12828
12829   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12830   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12831   ac_define_dir=`eval echo $SYSTEM_GDBINIT`
12832   ac_define_dir=`eval echo $ac_define_dir`
12833
12834 cat >>confdefs.h <<_ACEOF
12835 #define SYSTEM_GDBINIT "$ac_define_dir"
12836 _ACEOF
12837
12838
12839
12840
12841   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12842      if test "x$prefix" = xNONE; then
12843         test_prefix=/usr/local
12844      else
12845         test_prefix=$prefix
12846      fi
12847   else
12848      test_prefix=$exec_prefix
12849   fi
12850   value=0
12851   case ${ac_define_dir} in
12852      "${test_prefix}"|"${test_prefix}/"*|\
12853         '${exec_prefix}'|'${exec_prefix}/'*)
12854      value=1
12855      ;;
12856   esac
12857
12858 cat >>confdefs.h <<_ACEOF
12859 #define SYSTEM_GDBINIT_RELOCATABLE $value
12860 _ACEOF
12861
12862
12863
12864
12865 # Check whether --enable-werror was given.
12866 if test "${enable_werror+set}" = set; then :
12867   enableval=$enable_werror; case "${enableval}" in
12868      yes | y) ERROR_ON_WARNING="yes" ;;
12869      no | n)  ERROR_ON_WARNING="no" ;;
12870      *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
12871    esac
12872 fi
12873
12874
12875 # Enable -Werror by default when using gcc.  Turn it off for releases.
12876 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
12877     ERROR_ON_WARNING=yes
12878 fi
12879
12880 WERROR_CFLAGS=""
12881 if test "${ERROR_ON_WARNING}" = yes ; then
12882     WERROR_CFLAGS="-Werror"
12883 fi
12884
12885 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
12886 -Wpointer-sign \
12887 -Wno-unused -Wunused-value -Wunused-function \
12888 -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
12889 -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
12890 -Wold-style-declaration -Wold-style-definition"
12891
12892 # Enable -Wno-format by default when using gcc on mingw since many
12893 # GCC versions complain about %I64.
12894 case "${host}" in
12895   *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
12896   *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
12897 esac
12898
12899 # Check whether --enable-build-warnings was given.
12900 if test "${enable_build_warnings+set}" = set; then :
12901   enableval=$enable_build_warnings; case "${enableval}" in
12902   yes)  ;;
12903   no)   build_warnings="-w";;
12904   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
12905         build_warnings="${build_warnings} ${t}";;
12906   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
12907         build_warnings="${t} ${build_warnings}";;
12908   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12909 esac
12910 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12911   echo "Setting compiler warning flags = $build_warnings" 6>&1
12912 fi
12913 fi
12914 # Check whether --enable-gdb-build-warnings was given.
12915 if test "${enable_gdb_build_warnings+set}" = set; then :
12916   enableval=$enable_gdb_build_warnings; case "${enableval}" in
12917   yes)  ;;
12918   no)   build_warnings="-w";;
12919   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
12920         build_warnings="${build_warnings} ${t}";;
12921   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
12922         build_warnings="${t} ${build_warnings}";;
12923   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12924 esac
12925 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12926   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12927 fi
12928 fi
12929 WARN_CFLAGS=""
12930 if test "x${build_warnings}" != x -a "x$GCC" = xyes
12931 then
12932     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12933 $as_echo_n "checking compiler warning flags... " >&6; }
12934     # Separate out the -Werror flag as some files just cannot be
12935     # compiled with it enabled.
12936     for w in ${build_warnings}; do
12937         case $w in
12938         -Werr*) WERROR_CFLAGS=-Werror ;;
12939         *) # Check that GCC accepts it
12940             saved_CFLAGS="$CFLAGS"
12941             CFLAGS="$CFLAGS $w"
12942             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12943 /* end confdefs.h.  */
12944
12945 int
12946 main ()
12947 {
12948
12949   ;
12950   return 0;
12951 }
12952 _ACEOF
12953 if ac_fn_c_try_compile "$LINENO"; then :
12954   WARN_CFLAGS="${WARN_CFLAGS} $w"
12955 fi
12956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12957             CFLAGS="$saved_CFLAGS"
12958         esac
12959     done
12960     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12961 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
12962 fi
12963
12964
12965
12966 # In the Cygwin environment, we need some additional flags.
12967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12968 $as_echo_n "checking for cygwin... " >&6; }
12969 if test "${gdb_cv_os_cygwin+set}" = set; then :
12970   $as_echo_n "(cached) " >&6
12971 else
12972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12973 /* end confdefs.h.  */
12974
12975 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
12976 lose
12977 #endif
12978 _ACEOF
12979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12980   $EGREP "^lose$" >/dev/null 2>&1; then :
12981   gdb_cv_os_cygwin=yes
12982 else
12983   gdb_cv_os_cygwin=no
12984 fi
12985 rm -f conftest*
12986
12987 fi
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12989 $as_echo "$gdb_cv_os_cygwin" >&6; }
12990
12991
12992 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
12993 case ${host} in
12994   *go32* ) SER_HARDWIRE=ser-go32.o ;;
12995   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
12996   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
12997 esac
12998
12999
13000 # libreadline needs libuser32.a in a cygwin environment
13001 WIN32LIBS=
13002 if test x$gdb_cv_os_cygwin = xyes; then
13003     WIN32LIBS="-luser32"
13004     case "${target}" in
13005         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13006         ;;
13007     esac
13008 fi
13009
13010 # The ser-tcp.c module requires sockets.
13011 case ${host} in
13012   *mingw32*)
13013
13014 $as_echo "#define USE_WIN32API 1" >>confdefs.h
13015
13016     WIN32LIBS="$WIN32LIBS -lws2_32"
13017     ;;
13018 esac
13019
13020
13021 # Add ELF support to GDB, but only if BFD includes ELF support.
13022
13023   OLD_CFLAGS=$CFLAGS
13024   OLD_LDFLAGS=$LDFLAGS
13025   OLD_LIBS=$LIBS
13026   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13027   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13028   # always want our bfd.
13029   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13030   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13031   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13032   LIBS="-lbfd -liberty $intl $LIBS"
13033   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
13034 $as_echo_n "checking for ELF support in BFD... " >&6; }
13035 if test "${gdb_cv_var_elf+set}" = set; then :
13036   $as_echo_n "(cached) " >&6
13037 else
13038   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13039 /* end confdefs.h.  */
13040 #include <stdlib.h>
13041   #include "bfd.h"
13042   #include "elf-bfd.h"
13043
13044 int
13045 main ()
13046 {
13047 return bfd_get_elf_phdr_upper_bound (NULL);
13048   ;
13049   return 0;
13050 }
13051 _ACEOF
13052 if ac_fn_c_try_link "$LINENO"; then :
13053   gdb_cv_var_elf=yes
13054 else
13055   gdb_cv_var_elf=no
13056 fi
13057 rm -f core conftest.err conftest.$ac_objext \
13058     conftest$ac_exeext conftest.$ac_ext
13059 fi
13060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13061 $as_echo "$gdb_cv_var_elf" >&6; }
13062   CFLAGS=$OLD_CFLAGS
13063   LDFLAGS=$OLD_LDFLAGS
13064   LIBS=$OLD_LIBS
13065 if test $gdb_cv_var_elf = yes; then
13066   CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
13067
13068 $as_echo "#define HAVE_ELF 1" >>confdefs.h
13069
13070   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13071   if test "$plugins" = "yes"; then
13072     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13073 $as_echo_n "checking for library containing dlopen... " >&6; }
13074 if test "${ac_cv_search_dlopen+set}" = set; then :
13075   $as_echo_n "(cached) " >&6
13076 else
13077   ac_func_search_save_LIBS=$LIBS
13078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13079 /* end confdefs.h.  */
13080
13081 /* Override any GCC internal prototype to avoid an error.
13082    Use char because int might match the return type of a GCC
13083    builtin and then its argument prototype would still apply.  */
13084 #ifdef __cplusplus
13085 extern "C"
13086 #endif
13087 char dlopen ();
13088 int
13089 main ()
13090 {
13091 return dlopen ();
13092   ;
13093   return 0;
13094 }
13095 _ACEOF
13096 for ac_lib in '' dl; do
13097   if test -z "$ac_lib"; then
13098     ac_res="none required"
13099   else
13100     ac_res=-l$ac_lib
13101     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13102   fi
13103   if ac_fn_c_try_link "$LINENO"; then :
13104   ac_cv_search_dlopen=$ac_res
13105 fi
13106 rm -f core conftest.err conftest.$ac_objext \
13107     conftest$ac_exeext
13108   if test "${ac_cv_search_dlopen+set}" = set; then :
13109   break
13110 fi
13111 done
13112 if test "${ac_cv_search_dlopen+set}" = set; then :
13113
13114 else
13115   ac_cv_search_dlopen=no
13116 fi
13117 rm conftest.$ac_ext
13118 LIBS=$ac_func_search_save_LIBS
13119 fi
13120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13121 $as_echo "$ac_cv_search_dlopen" >&6; }
13122 ac_res=$ac_cv_search_dlopen
13123 if test "$ac_res" != no; then :
13124   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13125
13126 fi
13127
13128   fi
13129 fi
13130
13131 # Add macho support to GDB, but only if BFD includes it.
13132
13133   OLD_CFLAGS=$CFLAGS
13134   OLD_LDFLAGS=$LDFLAGS
13135   OLD_LIBS=$LIBS
13136   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13137   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13138   # always want our bfd.
13139   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13140   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13141   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13142   LIBS="-lbfd -liberty $intl $LIBS"
13143   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
13144 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
13145 if test "${gdb_cv_var_macho+set}" = set; then :
13146   $as_echo_n "(cached) " >&6
13147 else
13148   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13149 /* end confdefs.h.  */
13150 #include <stdlib.h>
13151   #include "bfd.h"
13152   #include "mach-o.h"
13153
13154 int
13155 main ()
13156 {
13157 return bfd_mach_o_lookup_command (NULL, 0, NULL);
13158   ;
13159   return 0;
13160 }
13161 _ACEOF
13162 if ac_fn_c_try_link "$LINENO"; then :
13163   gdb_cv_var_macho=yes
13164 else
13165   gdb_cv_var_macho=no
13166 fi
13167 rm -f core conftest.err conftest.$ac_objext \
13168     conftest$ac_exeext conftest.$ac_ext
13169 fi
13170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
13171 $as_echo "$gdb_cv_var_macho" >&6; }
13172   CFLAGS=$OLD_CFLAGS
13173   LDFLAGS=$OLD_LDFLAGS
13174   LIBS=$OLD_LIBS
13175 if test $gdb_cv_var_macho = yes; then
13176   CONFIG_OBS="$CONFIG_OBS machoread.o"
13177 fi
13178
13179 # Add SOM support to GDB, but only if BFD includes it.
13180
13181   OLD_CFLAGS=$CFLAGS
13182   OLD_LDFLAGS=$LDFLAGS
13183   OLD_LIBS=$LIBS
13184   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13185   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13186   # always want our bfd.
13187   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13188   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13189   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13190   LIBS="-lbfd -liberty $intl $LIBS"
13191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
13192 $as_echo_n "checking for SOM support in BFD... " >&6; }
13193 if test "${gdb_cv_var_som+set}" = set; then :
13194   $as_echo_n "(cached) " >&6
13195 else
13196   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13197 /* end confdefs.h.  */
13198 #include <stdlib.h>
13199   #include "bfd.h"
13200   #include "som.h"
13201
13202 int
13203 main ()
13204 {
13205 return bfd_som_attach_aux_hdr (NULL, 0, NULL);
13206   ;
13207   return 0;
13208 }
13209 _ACEOF
13210 if ac_fn_c_try_link "$LINENO"; then :
13211   gdb_cv_var_som=yes
13212 else
13213   gdb_cv_var_som=no
13214 fi
13215 rm -f core conftest.err conftest.$ac_objext \
13216     conftest$ac_exeext conftest.$ac_ext
13217 fi
13218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
13219 $as_echo "$gdb_cv_var_som" >&6; }
13220   CFLAGS=$OLD_CFLAGS
13221   LDFLAGS=$OLD_LDFLAGS
13222   LIBS=$OLD_LIBS
13223 if test $gdb_cv_var_som = yes; then
13224   CONFIG_OBS="$CONFIG_OBS somread.o"
13225 fi
13226
13227 # Add any host-specific objects to GDB.
13228 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13229
13230 # If building on ELF, look for lzma support for embedded compressed debug info.
13231 if test $gdb_cv_var_elf = yes; then
13232
13233 # Check whether --with-lzma was given.
13234 if test "${with_lzma+set}" = set; then :
13235   withval=$with_lzma;
13236 else
13237   with_lzma=auto
13238 fi
13239
13240   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13241 $as_echo_n "checking whether to use lzma... " >&6; }
13242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13243 $as_echo "$with_lzma" >&6; }
13244
13245   if test "${with_lzma}" != no; then
13246
13247
13248
13249
13250
13251
13252
13253
13254     use_additional=yes
13255
13256   acl_save_prefix="$prefix"
13257   prefix="$acl_final_prefix"
13258   acl_save_exec_prefix="$exec_prefix"
13259   exec_prefix="$acl_final_exec_prefix"
13260
13261     eval additional_includedir=\"$includedir\"
13262     eval additional_libdir=\"$libdir\"
13263
13264   exec_prefix="$acl_save_exec_prefix"
13265   prefix="$acl_save_prefix"
13266
13267
13268 # Check whether --with-liblzma-prefix was given.
13269 if test "${with_liblzma_prefix+set}" = set; then :
13270   withval=$with_liblzma_prefix;
13271     if test "X$withval" = "Xno"; then
13272       use_additional=no
13273     else
13274       if test "X$withval" = "X"; then
13275
13276   acl_save_prefix="$prefix"
13277   prefix="$acl_final_prefix"
13278   acl_save_exec_prefix="$exec_prefix"
13279   exec_prefix="$acl_final_exec_prefix"
13280
13281           eval additional_includedir=\"$includedir\"
13282           eval additional_libdir=\"$libdir\"
13283
13284   exec_prefix="$acl_save_exec_prefix"
13285   prefix="$acl_save_prefix"
13286
13287       else
13288         additional_includedir="$withval/include"
13289         additional_libdir="$withval/lib"
13290       fi
13291     fi
13292
13293 fi
13294
13295       LIBLZMA=
13296   LTLIBLZMA=
13297   INCLZMA=
13298   rpathdirs=
13299   ltrpathdirs=
13300   names_already_handled=
13301   names_next_round='lzma '
13302   while test -n "$names_next_round"; do
13303     names_this_round="$names_next_round"
13304     names_next_round=
13305     for name in $names_this_round; do
13306       already_handled=
13307       for n in $names_already_handled; do
13308         if test "$n" = "$name"; then
13309           already_handled=yes
13310           break
13311         fi
13312       done
13313       if test -z "$already_handled"; then
13314         names_already_handled="$names_already_handled $name"
13315                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13316         eval value=\"\$HAVE_LIB$uppername\"
13317         if test -n "$value"; then
13318           if test "$value" = yes; then
13319             eval value=\"\$LIB$uppername\"
13320             test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13321             eval value=\"\$LTLIB$uppername\"
13322             test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13323           else
13324                                     :
13325           fi
13326         else
13327                               found_dir=
13328           found_la=
13329           found_so=
13330           found_a=
13331           if test $use_additional = yes; then
13332             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13333               found_dir="$additional_libdir"
13334               found_so="$additional_libdir/lib$name.$shlibext"
13335               if test -f "$additional_libdir/lib$name.la"; then
13336                 found_la="$additional_libdir/lib$name.la"
13337               fi
13338             else
13339               if test -f "$additional_libdir/lib$name.$libext"; then
13340                 found_dir="$additional_libdir"
13341                 found_a="$additional_libdir/lib$name.$libext"
13342                 if test -f "$additional_libdir/lib$name.la"; then
13343                   found_la="$additional_libdir/lib$name.la"
13344                 fi
13345               fi
13346             fi
13347           fi
13348           if test "X$found_dir" = "X"; then
13349             for x in $LDFLAGS $LTLIBLZMA; do
13350
13351   acl_save_prefix="$prefix"
13352   prefix="$acl_final_prefix"
13353   acl_save_exec_prefix="$exec_prefix"
13354   exec_prefix="$acl_final_exec_prefix"
13355   eval x=\"$x\"
13356   exec_prefix="$acl_save_exec_prefix"
13357   prefix="$acl_save_prefix"
13358
13359               case "$x" in
13360                 -L*)
13361                   dir=`echo "X$x" | sed -e 's/^X-L//'`
13362                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13363                     found_dir="$dir"
13364                     found_so="$dir/lib$name.$shlibext"
13365                     if test -f "$dir/lib$name.la"; then
13366                       found_la="$dir/lib$name.la"
13367                     fi
13368                   else
13369                     if test -f "$dir/lib$name.$libext"; then
13370                       found_dir="$dir"
13371                       found_a="$dir/lib$name.$libext"
13372                       if test -f "$dir/lib$name.la"; then
13373                         found_la="$dir/lib$name.la"
13374                       fi
13375                     fi
13376                   fi
13377                   ;;
13378               esac
13379               if test "X$found_dir" != "X"; then
13380                 break
13381               fi
13382             done
13383           fi
13384           if test "X$found_dir" != "X"; then
13385                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13386             if test "X$found_so" != "X"; then
13387                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13388                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13389               else
13390                                                                                 haveit=
13391                 for x in $ltrpathdirs; do
13392                   if test "X$x" = "X$found_dir"; then
13393                     haveit=yes
13394                     break
13395                   fi
13396                 done
13397                 if test -z "$haveit"; then
13398                   ltrpathdirs="$ltrpathdirs $found_dir"
13399                 fi
13400                                 if test "$hardcode_direct" = yes; then
13401                                                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13402                 else
13403                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13404                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13405                                                             haveit=
13406                     for x in $rpathdirs; do
13407                       if test "X$x" = "X$found_dir"; then
13408                         haveit=yes
13409                         break
13410                       fi
13411                     done
13412                     if test -z "$haveit"; then
13413                       rpathdirs="$rpathdirs $found_dir"
13414                     fi
13415                   else
13416                                                                                 haveit=
13417                     for x in $LDFLAGS $LIBLZMA; do
13418
13419   acl_save_prefix="$prefix"
13420   prefix="$acl_final_prefix"
13421   acl_save_exec_prefix="$exec_prefix"
13422   exec_prefix="$acl_final_exec_prefix"
13423   eval x=\"$x\"
13424   exec_prefix="$acl_save_exec_prefix"
13425   prefix="$acl_save_prefix"
13426
13427                       if test "X$x" = "X-L$found_dir"; then
13428                         haveit=yes
13429                         break
13430                       fi
13431                     done
13432                     if test -z "$haveit"; then
13433                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13434                     fi
13435                     if test "$hardcode_minus_L" != no; then
13436                                                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13437                     else
13438                                                                                                                                                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13439                     fi
13440                   fi
13441                 fi
13442               fi
13443             else
13444               if test "X$found_a" != "X"; then
13445                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13446               else
13447                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13448               fi
13449             fi
13450                         additional_includedir=
13451             case "$found_dir" in
13452               */lib | */lib/)
13453                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13454                 additional_includedir="$basedir/include"
13455                 ;;
13456             esac
13457             if test "X$additional_includedir" != "X"; then
13458                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
13459                 haveit=
13460                 if test "X$additional_includedir" = "X/usr/local/include"; then
13461                   if test -n "$GCC"; then
13462                     case $host_os in
13463                       linux*) haveit=yes;;
13464                     esac
13465                   fi
13466                 fi
13467                 if test -z "$haveit"; then
13468                   for x in $CPPFLAGS $INCLZMA; do
13469
13470   acl_save_prefix="$prefix"
13471   prefix="$acl_final_prefix"
13472   acl_save_exec_prefix="$exec_prefix"
13473   exec_prefix="$acl_final_exec_prefix"
13474   eval x=\"$x\"
13475   exec_prefix="$acl_save_exec_prefix"
13476   prefix="$acl_save_prefix"
13477
13478                     if test "X$x" = "X-I$additional_includedir"; then
13479                       haveit=yes
13480                       break
13481                     fi
13482                   done
13483                   if test -z "$haveit"; then
13484                     if test -d "$additional_includedir"; then
13485                                             INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13486                     fi
13487                   fi
13488                 fi
13489               fi
13490             fi
13491                         if test -n "$found_la"; then
13492                                                         save_libdir="$libdir"
13493               case "$found_la" in
13494                 */* | *\\*) . "$found_la" ;;
13495                 *) . "./$found_la" ;;
13496               esac
13497               libdir="$save_libdir"
13498                             for dep in $dependency_libs; do
13499                 case "$dep" in
13500                   -L*)
13501                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13502                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
13503                       haveit=
13504                       if test "X$additional_libdir" = "X/usr/local/lib"; then
13505                         if test -n "$GCC"; then
13506                           case $host_os in
13507                             linux*) haveit=yes;;
13508                           esac
13509                         fi
13510                       fi
13511                       if test -z "$haveit"; then
13512                         haveit=
13513                         for x in $LDFLAGS $LIBLZMA; do
13514
13515   acl_save_prefix="$prefix"
13516   prefix="$acl_final_prefix"
13517   acl_save_exec_prefix="$exec_prefix"
13518   exec_prefix="$acl_final_exec_prefix"
13519   eval x=\"$x\"
13520   exec_prefix="$acl_save_exec_prefix"
13521   prefix="$acl_save_prefix"
13522
13523                           if test "X$x" = "X-L$additional_libdir"; then
13524                             haveit=yes
13525                             break
13526                           fi
13527                         done
13528                         if test -z "$haveit"; then
13529                           if test -d "$additional_libdir"; then
13530                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13531                           fi
13532                         fi
13533                         haveit=
13534                         for x in $LDFLAGS $LTLIBLZMA; do
13535
13536   acl_save_prefix="$prefix"
13537   prefix="$acl_final_prefix"
13538   acl_save_exec_prefix="$exec_prefix"
13539   exec_prefix="$acl_final_exec_prefix"
13540   eval x=\"$x\"
13541   exec_prefix="$acl_save_exec_prefix"
13542   prefix="$acl_save_prefix"
13543
13544                           if test "X$x" = "X-L$additional_libdir"; then
13545                             haveit=yes
13546                             break
13547                           fi
13548                         done
13549                         if test -z "$haveit"; then
13550                           if test -d "$additional_libdir"; then
13551                                                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13552                           fi
13553                         fi
13554                       fi
13555                     fi
13556                     ;;
13557                   -R*)
13558                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
13559                     if test "$enable_rpath" != no; then
13560                                                                   haveit=
13561                       for x in $rpathdirs; do
13562                         if test "X$x" = "X$dir"; then
13563                           haveit=yes
13564                           break
13565                         fi
13566                       done
13567                       if test -z "$haveit"; then
13568                         rpathdirs="$rpathdirs $dir"
13569                       fi
13570                                                                   haveit=
13571                       for x in $ltrpathdirs; do
13572                         if test "X$x" = "X$dir"; then
13573                           haveit=yes
13574                           break
13575                         fi
13576                       done
13577                       if test -z "$haveit"; then
13578                         ltrpathdirs="$ltrpathdirs $dir"
13579                       fi
13580                     fi
13581                     ;;
13582                   -l*)
13583                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13584                     ;;
13585                   *.la)
13586                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13587                     ;;
13588                   *)
13589                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13590                     LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13591                     ;;
13592                 esac
13593               done
13594             fi
13595           else
13596                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13597             LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13598           fi
13599         fi
13600       fi
13601     done
13602   done
13603   if test "X$rpathdirs" != "X"; then
13604     if test -n "$hardcode_libdir_separator"; then
13605                         alldirs=
13606       for found_dir in $rpathdirs; do
13607         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13608       done
13609             acl_save_libdir="$libdir"
13610       libdir="$alldirs"
13611       eval flag=\"$hardcode_libdir_flag_spec\"
13612       libdir="$acl_save_libdir"
13613       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13614     else
13615             for found_dir in $rpathdirs; do
13616         acl_save_libdir="$libdir"
13617         libdir="$found_dir"
13618         eval flag=\"$hardcode_libdir_flag_spec\"
13619         libdir="$acl_save_libdir"
13620         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13621       done
13622     fi
13623   fi
13624   if test "X$ltrpathdirs" != "X"; then
13625             for found_dir in $ltrpathdirs; do
13626       LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13627     done
13628   fi
13629
13630
13631         ac_save_CPPFLAGS="$CPPFLAGS"
13632
13633   for element in $INCLZMA; do
13634     haveit=
13635     for x in $CPPFLAGS; do
13636
13637   acl_save_prefix="$prefix"
13638   prefix="$acl_final_prefix"
13639   acl_save_exec_prefix="$exec_prefix"
13640   exec_prefix="$acl_final_exec_prefix"
13641   eval x=\"$x\"
13642   exec_prefix="$acl_save_exec_prefix"
13643   prefix="$acl_save_prefix"
13644
13645       if test "X$x" = "X$element"; then
13646         haveit=yes
13647         break
13648       fi
13649     done
13650     if test -z "$haveit"; then
13651       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13652     fi
13653   done
13654
13655
13656   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13657 $as_echo_n "checking for liblzma... " >&6; }
13658 if test "${ac_cv_liblzma+set}" = set; then :
13659   $as_echo_n "(cached) " >&6
13660 else
13661
13662     ac_save_LIBS="$LIBS"
13663     LIBS="$LIBS $LIBLZMA"
13664     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13665 /* end confdefs.h.  */
13666 #include "lzma.h"
13667 int
13668 main ()
13669 {
13670 lzma_index_iter iter;
13671                            lzma_index_iter_init (&iter, 0);
13672                            lzma_mf_is_supported (LZMA_MF_HC3);
13673   ;
13674   return 0;
13675 }
13676 _ACEOF
13677 if ac_fn_c_try_link "$LINENO"; then :
13678   ac_cv_liblzma=yes
13679 else
13680   ac_cv_liblzma=no
13681 fi
13682 rm -f core conftest.err conftest.$ac_objext \
13683     conftest$ac_exeext conftest.$ac_ext
13684     LIBS="$ac_save_LIBS"
13685
13686 fi
13687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13688 $as_echo "$ac_cv_liblzma" >&6; }
13689   if test "$ac_cv_liblzma" = yes; then
13690     HAVE_LIBLZMA=yes
13691
13692 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13693
13694     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13695 $as_echo_n "checking how to link with liblzma... " >&6; }
13696     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13697 $as_echo "$LIBLZMA" >&6; }
13698   else
13699     HAVE_LIBLZMA=no
13700             CPPFLAGS="$ac_save_CPPFLAGS"
13701     LIBLZMA=
13702     LTLIBLZMA=
13703   fi
13704
13705
13706
13707
13708
13709
13710     if test "$HAVE_LIBLZMA" != yes; then
13711       if test "$with_lzma" = yes; then
13712         as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
13713       fi
13714     fi
13715   fi
13716 fi
13717
13718 LIBGUI="../libgui/src/libgui.a"
13719 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13720
13721
13722
13723 WIN32LDAPP=
13724
13725
13726
13727 case "${host}" in
13728 *-*-cygwin* | *-*-mingw* )
13729     configdir="win"
13730     ;;
13731 *)
13732     configdir="unix"
13733     ;;
13734 esac
13735
13736 GDBTKLIBS=
13737 if test "${enable_gdbtk}" = "yes"; then
13738
13739     # Gdbtk must have an absolute path to srcdir in order to run
13740     # properly when not installed.
13741     here=`pwd`
13742     cd ${srcdir}
13743     GDBTK_SRC_DIR=`pwd`
13744     cd $here
13745
13746
13747     #
13748     # Ok, lets find the tcl configuration
13749     # First, look for one uninstalled.
13750     # the alternative search directory is invoked by --with-tcl
13751     #
13752
13753     if test x"${no_tcl}" = x ; then
13754         # we reset no_tcl in case something fails here
13755         no_tcl=true
13756
13757 # Check whether --with-tcl was given.
13758 if test "${with_tcl+set}" = set; then :
13759   withval=$with_tcl; with_tclconfig=${withval}
13760 fi
13761
13762         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13763 $as_echo_n "checking for Tcl configuration... " >&6; }
13764         if test "${ac_cv_c_tclconfig+set}" = set; then :
13765   $as_echo_n "(cached) " >&6
13766 else
13767
13768
13769             # First check to see if --with-tcl was specified.
13770             case "${host}" in
13771                 *-*-cygwin*) platDir="win" ;;
13772                 *) platDir="unix" ;;
13773             esac
13774             if test x"${with_tclconfig}" != x ; then
13775                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13776                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13777                 else
13778                     as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
13779                 fi
13780             fi
13781
13782             # then check for a private Tcl installation
13783             if test x"${ac_cv_c_tclconfig}" = x ; then
13784                 for i in \
13785                         ../tcl \
13786                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13787                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13788                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13789                         ../../tcl \
13790                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13791                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13792                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13793                         ../../../tcl \
13794                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13795                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13796                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13797                     if test -f "$i/$platDir/tclConfig.sh" ; then
13798                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13799                         break
13800                     fi
13801                 done
13802             fi
13803
13804             # on Darwin, check in Framework installation locations
13805             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13806                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13807                         `ls -d /Library/Frameworks 2>/dev/null` \
13808                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
13809                         `ls -d /System/Library/Frameworks 2>/dev/null` \
13810                         ; do
13811                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13812                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13813                         break
13814                     fi
13815                 done
13816             fi
13817
13818             # check in a few common install locations
13819             if test x"${ac_cv_c_tclconfig}" = x ; then
13820                 for i in `ls -d ${libdir} 2>/dev/null` \
13821                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
13822                         `ls -d ${prefix}/lib 2>/dev/null` \
13823                         `ls -d /usr/local/lib 2>/dev/null` \
13824                         `ls -d /usr/contrib/lib 2>/dev/null` \
13825                         `ls -d /usr/lib 2>/dev/null` \
13826                         ; do
13827                     if test -f "$i/tclConfig.sh" ; then
13828                         ac_cv_c_tclconfig=`(cd $i; pwd)`
13829                         break
13830                     fi
13831                 done
13832             fi
13833
13834             # check in a few other private locations
13835             if test x"${ac_cv_c_tclconfig}" = x ; then
13836                 for i in \
13837                         ${srcdir}/../tcl \
13838                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13839                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
13840                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
13841                     if test -f "$i/$platDir/tclConfig.sh" ; then
13842                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13843                     break
13844                 fi
13845                 done
13846             fi
13847
13848 fi
13849
13850
13851         if test x"${ac_cv_c_tclconfig}" = x ; then
13852             TCL_BIN_DIR="# no Tcl configs found"
13853             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
13854 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
13855         else
13856             no_tcl=
13857             TCL_BIN_DIR=${ac_cv_c_tclconfig}
13858             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
13859 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
13860         fi
13861     fi
13862
13863
13864     # If $no_tk is nonempty, then we can't do Tk, and there is no
13865     # point to doing Tcl.
13866
13867     #
13868     # Ok, lets find the tk configuration
13869     # First, look for one uninstalled.
13870     # the alternative search directory is invoked by --with-tk
13871     #
13872
13873     if test x"${no_tk}" = x ; then
13874         # we reset no_tk in case something fails here
13875         no_tk=true
13876
13877 # Check whether --with-tk was given.
13878 if test "${with_tk+set}" = set; then :
13879   withval=$with_tk; with_tkconfig=${withval}
13880 fi
13881
13882         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
13883 $as_echo_n "checking for Tk configuration... " >&6; }
13884         if test "${ac_cv_c_tkconfig+set}" = set; then :
13885   $as_echo_n "(cached) " >&6
13886 else
13887
13888
13889             # First check to see if --with-tkconfig was specified.
13890             if test x"${with_tkconfig}" != x ; then
13891                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
13892                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
13893                 else
13894                     as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
13895                 fi
13896             fi
13897
13898             # then check for a private Tk library
13899             case "${host}" in
13900                 *-*-cygwin*) platDir="win" ;;
13901                 *) platDir="unix" ;;
13902             esac
13903             if test x"${ac_cv_c_tkconfig}" = x ; then
13904                 for i in \
13905                         ../tk \
13906                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13907                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
13908                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
13909                         ../../tk \
13910                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13911                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
13912                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
13913                         ../../../tk \
13914                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13915                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
13916                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
13917                     if test -f "$i/$platDir/tkConfig.sh" ; then
13918                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13919                         break
13920                     fi
13921                 done
13922             fi
13923
13924             # on Darwin, check in Framework installation locations
13925             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
13926                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13927                         `ls -d /Library/Frameworks 2>/dev/null` \
13928                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
13929                         `ls -d /System/Library/Frameworks 2>/dev/null` \
13930                         ; do
13931                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
13932                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
13933                         break
13934                     fi
13935                 done
13936             fi
13937
13938             # check in a few common install locations
13939             if test x"${ac_cv_c_tkconfig}" = x ; then
13940                 for i in `ls -d ${libdir} 2>/dev/null` \
13941                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
13942                         `ls -d ${prefix}/lib 2>/dev/null` \
13943                         `ls -d /usr/local/lib 2>/dev/null` \
13944                         `ls -d /usr/contrib/lib 2>/dev/null` \
13945                         `ls -d /usr/lib 2>/dev/null` \
13946                         ; do
13947                     if test -f "$i/tkConfig.sh" ; then
13948                         ac_cv_c_tkconfig=`(cd $i; pwd)`
13949                         break
13950                     fi
13951                 done
13952             fi
13953             # check in a few other private locations
13954             if test x"${ac_cv_c_tkconfig}" = x ; then
13955                 for i in \
13956                         ${srcdir}/../tk \
13957                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13958                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
13959                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
13960                     if test -f "$i/$platDir/tkConfig.sh" ; then
13961                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13962                         break
13963                     fi
13964                 done
13965             fi
13966
13967 fi
13968
13969
13970         if test x"${ac_cv_c_tkconfig}" = x ; then
13971             TK_BIN_DIR="# no Tk configs found"
13972             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
13973 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
13974         else
13975             no_tk=
13976             TK_BIN_DIR=${ac_cv_c_tkconfig}
13977             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
13978 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
13979         fi
13980     fi
13981
13982
13983     if test -z "${no_tcl}" -a -z "${no_tk}"; then
13984
13985     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
13986 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
13987
13988     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
13989         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13990 $as_echo "loading" >&6; }
13991         . ${TCL_BIN_DIR}/tclConfig.sh
13992     else
13993         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
13994 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
13995     fi
13996
13997     # eval is required to do the TCL_DBGX substitution
13998     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
13999     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
14000
14001     # If the TCL_BIN_DIR is the build directory (not the install directory),
14002     # then set the common variable name to the value of the build variables.
14003     # For example, the variable TCL_LIB_SPEC will be set to the value
14004     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
14005     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
14006     # installed and uninstalled version of Tcl.
14007     if test -f "${TCL_BIN_DIR}/Makefile" ; then
14008         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
14009         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
14010         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
14011     elif test "`uname -s`" = "Darwin"; then
14012         # If Tcl was built as a framework, attempt to use the libraries
14013         # from the framework at the given location so that linking works
14014         # against Tcl.framework installed in an arbitrary location.
14015         case ${TCL_DEFS} in
14016             *TCL_FRAMEWORK*)
14017                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
14018                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
14019                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
14020                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
14021                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
14022                             break
14023                         fi
14024                     done
14025                 fi
14026                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
14027                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
14028                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
14029                 fi
14030                 ;;
14031         esac
14032     fi
14033
14034     # eval is required to do the TCL_DBGX substitution
14035     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
14036     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
14037     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
14038     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054         # Check for in-tree tcl
14055         here=`pwd`
14056         cd ${srcdir}/..
14057         topdir=`pwd`
14058         cd ${here}
14059
14060         intree="no"
14061         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
14062           intree="yes"
14063         fi
14064
14065         # Find Tcl private headers
14066         if test x"${intree}" = xno; then
14067
14068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
14069 $as_echo_n "checking for Tcl private headers... " >&6; }
14070   private_dir=""
14071   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
14072   if test -f ${dir}/tclInt.h ; then
14073     private_dir=${dir}
14074   fi
14075
14076   if test x"${private_dir}" = x; then
14077     as_fn_error "could not find private Tcl headers" "$LINENO" 5
14078   else
14079     TCL_PRIVATE_INCLUDE="-I${private_dir}"
14080     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14081 $as_echo "${private_dir}" >&6; }
14082   fi
14083
14084           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
14085           TCL_LIBRARY="${TCL_LIB_SPEC}"
14086           TCL_DEPS=""
14087         else
14088           # If building tcl in the same src tree, private headers
14089           # are not needed, but we need to be sure to use the right
14090           # headers library
14091           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
14092           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
14093           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
14094         fi
14095
14096
14097
14098
14099
14100     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
14101 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
14102
14103     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
14104         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14105 $as_echo "loading" >&6; }
14106         . ${TK_BIN_DIR}/tkConfig.sh
14107     else
14108         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
14109 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
14110     fi
14111
14112     # eval is required to do the TK_DBGX substitution
14113     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
14114     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
14115
14116     # If the TK_BIN_DIR is the build directory (not the install directory),
14117     # then set the common variable name to the value of the build variables.
14118     # For example, the variable TK_LIB_SPEC will be set to the value
14119     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
14120     # instead of TK_BUILD_LIB_SPEC since it will work with both an
14121     # installed and uninstalled version of Tcl.
14122     if test -f "${TK_BIN_DIR}/Makefile" ; then
14123         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
14124         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
14125         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
14126     elif test "`uname -s`" = "Darwin"; then
14127         # If Tk was built as a framework, attempt to use the libraries
14128         # from the framework at the given location so that linking works
14129         # against Tk.framework installed in an arbitrary location.
14130         case ${TK_DEFS} in
14131             *TK_FRAMEWORK*)
14132                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
14133                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
14134                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
14135                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
14136                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
14137                             break
14138                         fi
14139                     done
14140                 fi
14141                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
14142                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
14143                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
14144                 fi
14145                 ;;
14146         esac
14147     fi
14148
14149     # eval is required to do the TK_DBGX substitution
14150     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
14151     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
14152     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
14153     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168         # Check for in-tree Tk
14169         intree="no"
14170         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14171           intree="yes"
14172         fi
14173
14174         # Find Tk private headers
14175         if test x"${intree}" = xno; then
14176
14177   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14178 $as_echo_n "checking for Tk private headers... " >&6; }
14179   private_dir=""
14180   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14181   if test -f ${dir}/tkInt.h; then
14182     private_dir=${dir}
14183   fi
14184
14185   if test x"${private_dir}" = x; then
14186     as_fn_error "could not find Tk private headers" "$LINENO" 5
14187   else
14188     TK_PRIVATE_INCLUDE="-I${private_dir}"
14189     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14190 $as_echo "${private_dir}" >&6; }
14191   fi
14192
14193           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14194           TK_LIBRARY=${TK_LIB_SPEC}
14195           TK_DEPS=""
14196         else
14197           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14198           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14199           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14200         fi
14201
14202
14203
14204
14205
14206         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
14207
14208         # Include some libraries that Tcl and Tk want.
14209         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14210         # Yes, the ordering seems wrong here.  But it isn't.
14211         # TK_LIBS is the list of libraries that need to be linked
14212         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
14213         # were in LIBS then any link tests after this point would
14214         # try to include things like `$(LIBGUI)', which wouldn't work.
14215         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
14216
14217         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14218         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14219         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14220         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14221         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14222         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14223         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
14224
14225         if test x$gdb_cv_os_cygwin = xyes; then
14226           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14227           WIN32LDAPP="-Wl,--subsystem,console"
14228           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
14229         fi
14230
14231         subdirs="$subdirs gdbtk"
14232
14233     fi
14234 fi
14235
14236
14237
14238
14239
14240
14241
14242
14243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14244 $as_echo_n "checking for X... " >&6; }
14245
14246
14247 # Check whether --with-x was given.
14248 if test "${with_x+set}" = set; then :
14249   withval=$with_x;
14250 fi
14251
14252 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14253 if test "x$with_x" = xno; then
14254   # The user explicitly disabled X.
14255   have_x=disabled
14256 else
14257   case $x_includes,$x_libraries in #(
14258     *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14259     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14260   $as_echo_n "(cached) " >&6
14261 else
14262   # One or both of the vars are not set, and there is no cached value.
14263 ac_x_includes=no ac_x_libraries=no
14264 rm -f -r conftest.dir
14265 if mkdir conftest.dir; then
14266   cd conftest.dir
14267   cat >Imakefile <<'_ACEOF'
14268 incroot:
14269         @echo incroot='${INCROOT}'
14270 usrlibdir:
14271         @echo usrlibdir='${USRLIBDIR}'
14272 libdir:
14273         @echo libdir='${LIBDIR}'
14274 _ACEOF
14275   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
14276     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
14277     for ac_var in incroot usrlibdir libdir; do
14278       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14279     done
14280     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
14281     for ac_extension in a so sl dylib la dll; do
14282       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14283          test -f "$ac_im_libdir/libX11.$ac_extension"; then
14284         ac_im_usrlibdir=$ac_im_libdir; break
14285       fi
14286     done
14287     # Screen out bogus values from the imake configuration.  They are
14288     # bogus both because they are the default anyway, and because
14289     # using them would break gcc on systems where it needs fixed includes.
14290     case $ac_im_incroot in
14291         /usr/include) ac_x_includes= ;;
14292         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
14293     esac
14294     case $ac_im_usrlibdir in
14295         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
14296         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
14297     esac
14298   fi
14299   cd ..
14300   rm -f -r conftest.dir
14301 fi
14302
14303 # Standard set of common directories for X headers.
14304 # Check X11 before X11Rn because it is often a symlink to the current release.
14305 ac_x_header_dirs='
14306 /usr/X11/include
14307 /usr/X11R7/include
14308 /usr/X11R6/include
14309 /usr/X11R5/include
14310 /usr/X11R4/include
14311
14312 /usr/include/X11
14313 /usr/include/X11R7
14314 /usr/include/X11R6
14315 /usr/include/X11R5
14316 /usr/include/X11R4
14317
14318 /usr/local/X11/include
14319 /usr/local/X11R7/include
14320 /usr/local/X11R6/include
14321 /usr/local/X11R5/include
14322 /usr/local/X11R4/include
14323
14324 /usr/local/include/X11
14325 /usr/local/include/X11R7
14326 /usr/local/include/X11R6
14327 /usr/local/include/X11R5
14328 /usr/local/include/X11R4
14329
14330 /usr/X386/include
14331 /usr/x386/include
14332 /usr/XFree86/include/X11
14333
14334 /usr/include
14335 /usr/local/include
14336 /usr/unsupported/include
14337 /usr/athena/include
14338 /usr/local/x11r5/include
14339 /usr/lpp/Xamples/include
14340
14341 /usr/openwin/include
14342 /usr/openwin/share/include'
14343
14344 if test "$ac_x_includes" = no; then
14345   # Guess where to find include files, by looking for Xlib.h.
14346   # First, try using that file with no special directory specified.
14347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14348 /* end confdefs.h.  */
14349 #include <X11/Xlib.h>
14350 _ACEOF
14351 if ac_fn_c_try_cpp "$LINENO"; then :
14352   # We can compile using X headers with no special include directory.
14353 ac_x_includes=
14354 else
14355   for ac_dir in $ac_x_header_dirs; do
14356   if test -r "$ac_dir/X11/Xlib.h"; then
14357     ac_x_includes=$ac_dir
14358     break
14359   fi
14360 done
14361 fi
14362 rm -f conftest.err conftest.$ac_ext
14363 fi # $ac_x_includes = no
14364
14365 if test "$ac_x_libraries" = no; then
14366   # Check for the libraries.
14367   # See if we find them without any special options.
14368   # Don't add to $LIBS permanently.
14369   ac_save_LIBS=$LIBS
14370   LIBS="-lX11 $LIBS"
14371   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14372 /* end confdefs.h.  */
14373 #include <X11/Xlib.h>
14374 int
14375 main ()
14376 {
14377 XrmInitialize ()
14378   ;
14379   return 0;
14380 }
14381 _ACEOF
14382 if ac_fn_c_try_link "$LINENO"; then :
14383   LIBS=$ac_save_LIBS
14384 # We can link X programs with no special library path.
14385 ac_x_libraries=
14386 else
14387   LIBS=$ac_save_LIBS
14388 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
14389 do
14390   # Don't even attempt the hair of trying to link an X program!
14391   for ac_extension in a so sl dylib la dll; do
14392     if test -r "$ac_dir/libX11.$ac_extension"; then
14393       ac_x_libraries=$ac_dir
14394       break 2
14395     fi
14396   done
14397 done
14398 fi
14399 rm -f core conftest.err conftest.$ac_objext \
14400     conftest$ac_exeext conftest.$ac_ext
14401 fi # $ac_x_libraries = no
14402
14403 case $ac_x_includes,$ac_x_libraries in #(
14404   no,* | *,no | *\'*)
14405     # Didn't find X, or a directory has "'" in its name.
14406     ac_cv_have_x="have_x=no";; #(
14407   *)
14408     # Record where we found X for the cache.
14409     ac_cv_have_x="have_x=yes\
14410         ac_x_includes='$ac_x_includes'\
14411         ac_x_libraries='$ac_x_libraries'"
14412 esac
14413 fi
14414 ;; #(
14415     *) have_x=yes;;
14416   esac
14417   eval "$ac_cv_have_x"
14418 fi # $with_x != no
14419
14420 if test "$have_x" != yes; then
14421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14422 $as_echo "$have_x" >&6; }
14423   no_x=yes
14424 else
14425   # If each of the values was on the command line, it overrides each guess.
14426   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14427   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14428   # Update the cache value to reflect the command line values.
14429   ac_cv_have_x="have_x=yes\
14430         ac_x_includes='$x_includes'\
14431         ac_x_libraries='$x_libraries'"
14432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14433 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
14434 fi
14435
14436
14437 # Unlike the sim directory, whether a simulator is linked is controlled by
14438 # presence of a gdb_sim definition in the target configure.tgt entry.
14439 # This code just checks for a few cases where we'd like to ignore those
14440 # definitions, even when they're present in the '.mt' file.  These cases
14441 # are when --disable-sim is specified, or if the simulator directory is
14442 # not part of the source tree.
14443 #
14444 # Check whether --enable-sim was given.
14445 if test "${enable_sim+set}" = set; then :
14446   enableval=$enable_sim; echo "enable_sim = $enable_sim";
14447  echo "enableval = ${enableval}";
14448  case "${enableval}" in
14449   yes) ignore_sim=false ;;
14450   no)  ignore_sim=true ;;
14451   *)   ignore_sim=false ;;
14452  esac
14453 else
14454   ignore_sim=false
14455 fi
14456
14457
14458 if test ! -d "${srcdir}/../sim"; then
14459   ignore_sim=true
14460 fi
14461
14462 SIM=
14463 SIM_OBS=
14464 if test "${ignore_sim}" = "false"; then
14465   if test x"${gdb_sim}" != x ; then
14466     SIM="${gdb_sim}"
14467     SIM_OBS="remote-sim.o"
14468
14469 $as_echo "#define WITH_SIM 1" >>confdefs.h
14470
14471   fi
14472 fi
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487 # List of host floatformats.
14488
14489 cat >>confdefs.h <<_ACEOF
14490 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
14491 _ACEOF
14492
14493
14494 cat >>confdefs.h <<_ACEOF
14495 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
14496 _ACEOF
14497
14498
14499 cat >>confdefs.h <<_ACEOF
14500 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
14501 _ACEOF
14502
14503
14504 # target_subdir is used by the testsuite to find the target libraries.
14505 target_subdir=
14506 if test "${host}" != "${target}"; then
14507     target_subdir="${target_alias}/"
14508 fi
14509
14510
14511 frags=
14512 if test "${gdb_native}" = "yes"; then
14513   host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14514   if test ! -f ${host_makefile_frag}; then
14515     as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
14516   fi
14517   frags="$frags $host_makefile_frag"
14518 else
14519   host_makefile_frag=/dev/null
14520 fi
14521
14522
14523
14524
14525 if test "${gdb_native}" = "yes"; then
14526 # We pick this up from the host configuration file (.mh) because we
14527 # do not have a native configuration Makefile fragment.
14528 nativefile=`sed -n '
14529 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
14530 ' ${host_makefile_frag}`
14531 fi
14532
14533
14534 if test x"${gdb_osabi}" != x ; then
14535
14536 cat >>confdefs.h <<_ACEOF
14537 #define GDB_OSABI_DEFAULT $gdb_osabi
14538 _ACEOF
14539
14540 fi
14541
14542 # Enable multi-ice-gdb-server.
14543 # Check whether --enable-multi-ice was given.
14544 if test "${enable_multi_ice+set}" = set; then :
14545   enableval=$enable_multi_ice; case $enableval in
14546     yes | no)
14547       ;;
14548     *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
14549   esac
14550 fi
14551
14552 if test "x$enable_multi_ice" = xyes; then
14553    subdirs="$subdirs multi-ice"
14554
14555 fi
14556
14557 # Check whether --enable-gdbserver was given.
14558 if test "${enable_gdbserver+set}" = set; then :
14559   enableval=$enable_gdbserver; case "${enableval}" in
14560   yes| no|auto) ;;
14561   *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14562 esac
14563 else
14564   enable_gdbserver=auto
14565 fi
14566
14567
14568 # We only build gdbserver automatically in a native configuration, and
14569 # only if the user did not explicitly disable its build.
14570 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
14571   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14572 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
14573   if test "x$build_gdbserver" = xyes; then
14574     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14575 $as_echo "yes" >&6; }
14576     subdirs="$subdirs gdbserver"
14577
14578     gdbserver_build_enabled=yes
14579   else
14580     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14581 $as_echo "no" >&6; }
14582   fi
14583 fi
14584
14585 # If the user explicitly request the gdbserver to be built, verify that
14586 # we were in fact able to enable it.
14587 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14588   as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14589 fi
14590
14591 # Check for babeltrace and babeltrace-ctf
14592
14593 # Check whether --with-babeltrace was given.
14594 if test "${with_babeltrace+set}" = set; then :
14595   withval=$with_babeltrace;
14596 else
14597   with_babeltrace=auto
14598 fi
14599
14600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14601 $as_echo_n "checking whether to use babeltrace... " >&6; }
14602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14603 $as_echo "$with_babeltrace" >&6; }
14604
14605 if test "x$with_babeltrace" = "xno"; then
14606   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14607 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14608 else
14609   # Append -Werror to CFLAGS so that configure can catch the warning
14610   # "assignment from incompatible pointer type", which is related to
14611   # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
14612   # in GDB, while babeltrace 1.0.3 is broken.
14613   # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14614   # safe to save and restore CFLAGS here.
14615   saved_CFLAGS=$CFLAGS
14616   CFLAGS="$CFLAGS -Werror"
14617
14618
14619
14620
14621
14622
14623
14624
14625     use_additional=yes
14626
14627   acl_save_prefix="$prefix"
14628   prefix="$acl_final_prefix"
14629   acl_save_exec_prefix="$exec_prefix"
14630   exec_prefix="$acl_final_exec_prefix"
14631
14632     eval additional_includedir=\"$includedir\"
14633     eval additional_libdir=\"$libdir\"
14634
14635   exec_prefix="$acl_save_exec_prefix"
14636   prefix="$acl_save_prefix"
14637
14638
14639 # Check whether --with-libbabeltrace-prefix was given.
14640 if test "${with_libbabeltrace_prefix+set}" = set; then :
14641   withval=$with_libbabeltrace_prefix;
14642     if test "X$withval" = "Xno"; then
14643       use_additional=no
14644     else
14645       if test "X$withval" = "X"; then
14646
14647   acl_save_prefix="$prefix"
14648   prefix="$acl_final_prefix"
14649   acl_save_exec_prefix="$exec_prefix"
14650   exec_prefix="$acl_final_exec_prefix"
14651
14652           eval additional_includedir=\"$includedir\"
14653           eval additional_libdir=\"$libdir\"
14654
14655   exec_prefix="$acl_save_exec_prefix"
14656   prefix="$acl_save_prefix"
14657
14658       else
14659         additional_includedir="$withval/include"
14660         additional_libdir="$withval/lib"
14661       fi
14662     fi
14663
14664 fi
14665
14666       LIBBABELTRACE=
14667   LTLIBBABELTRACE=
14668   INCBABELTRACE=
14669   rpathdirs=
14670   ltrpathdirs=
14671   names_already_handled=
14672   names_next_round='babeltrace babeltrace-ctf'
14673   while test -n "$names_next_round"; do
14674     names_this_round="$names_next_round"
14675     names_next_round=
14676     for name in $names_this_round; do
14677       already_handled=
14678       for n in $names_already_handled; do
14679         if test "$n" = "$name"; then
14680           already_handled=yes
14681           break
14682         fi
14683       done
14684       if test -z "$already_handled"; then
14685         names_already_handled="$names_already_handled $name"
14686                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14687         eval value=\"\$HAVE_LIB$uppername\"
14688         if test -n "$value"; then
14689           if test "$value" = yes; then
14690             eval value=\"\$LIB$uppername\"
14691             test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
14692             eval value=\"\$LTLIB$uppername\"
14693             test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
14694           else
14695                                     :
14696           fi
14697         else
14698                               found_dir=
14699           found_la=
14700           found_so=
14701           found_a=
14702           if test $use_additional = yes; then
14703             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14704               found_dir="$additional_libdir"
14705               found_so="$additional_libdir/lib$name.$shlibext"
14706               if test -f "$additional_libdir/lib$name.la"; then
14707                 found_la="$additional_libdir/lib$name.la"
14708               fi
14709             else
14710               if test -f "$additional_libdir/lib$name.$libext"; then
14711                 found_dir="$additional_libdir"
14712                 found_a="$additional_libdir/lib$name.$libext"
14713                 if test -f "$additional_libdir/lib$name.la"; then
14714                   found_la="$additional_libdir/lib$name.la"
14715                 fi
14716               fi
14717             fi
14718           fi
14719           if test "X$found_dir" = "X"; then
14720             for x in $LDFLAGS $LTLIBBABELTRACE; do
14721
14722   acl_save_prefix="$prefix"
14723   prefix="$acl_final_prefix"
14724   acl_save_exec_prefix="$exec_prefix"
14725   exec_prefix="$acl_final_exec_prefix"
14726   eval x=\"$x\"
14727   exec_prefix="$acl_save_exec_prefix"
14728   prefix="$acl_save_prefix"
14729
14730               case "$x" in
14731                 -L*)
14732                   dir=`echo "X$x" | sed -e 's/^X-L//'`
14733                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14734                     found_dir="$dir"
14735                     found_so="$dir/lib$name.$shlibext"
14736                     if test -f "$dir/lib$name.la"; then
14737                       found_la="$dir/lib$name.la"
14738                     fi
14739                   else
14740                     if test -f "$dir/lib$name.$libext"; then
14741                       found_dir="$dir"
14742                       found_a="$dir/lib$name.$libext"
14743                       if test -f "$dir/lib$name.la"; then
14744                         found_la="$dir/lib$name.la"
14745                       fi
14746                     fi
14747                   fi
14748                   ;;
14749               esac
14750               if test "X$found_dir" != "X"; then
14751                 break
14752               fi
14753             done
14754           fi
14755           if test "X$found_dir" != "X"; then
14756                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
14757             if test "X$found_so" != "X"; then
14758                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14759                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14760               else
14761                                                                                 haveit=
14762                 for x in $ltrpathdirs; do
14763                   if test "X$x" = "X$found_dir"; then
14764                     haveit=yes
14765                     break
14766                   fi
14767                 done
14768                 if test -z "$haveit"; then
14769                   ltrpathdirs="$ltrpathdirs $found_dir"
14770                 fi
14771                                 if test "$hardcode_direct" = yes; then
14772                                                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14773                 else
14774                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14775                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14776                                                             haveit=
14777                     for x in $rpathdirs; do
14778                       if test "X$x" = "X$found_dir"; then
14779                         haveit=yes
14780                         break
14781                       fi
14782                     done
14783                     if test -z "$haveit"; then
14784                       rpathdirs="$rpathdirs $found_dir"
14785                     fi
14786                   else
14787                                                                                 haveit=
14788                     for x in $LDFLAGS $LIBBABELTRACE; do
14789
14790   acl_save_prefix="$prefix"
14791   prefix="$acl_final_prefix"
14792   acl_save_exec_prefix="$exec_prefix"
14793   exec_prefix="$acl_final_exec_prefix"
14794   eval x=\"$x\"
14795   exec_prefix="$acl_save_exec_prefix"
14796   prefix="$acl_save_prefix"
14797
14798                       if test "X$x" = "X-L$found_dir"; then
14799                         haveit=yes
14800                         break
14801                       fi
14802                     done
14803                     if test -z "$haveit"; then
14804                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
14805                     fi
14806                     if test "$hardcode_minus_L" != no; then
14807                                                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14808                     else
14809                                                                                                                                                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14810                     fi
14811                   fi
14812                 fi
14813               fi
14814             else
14815               if test "X$found_a" != "X"; then
14816                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
14817               else
14818                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
14819               fi
14820             fi
14821                         additional_includedir=
14822             case "$found_dir" in
14823               */lib | */lib/)
14824                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14825                 additional_includedir="$basedir/include"
14826                 ;;
14827             esac
14828             if test "X$additional_includedir" != "X"; then
14829                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
14830                 haveit=
14831                 if test "X$additional_includedir" = "X/usr/local/include"; then
14832                   if test -n "$GCC"; then
14833                     case $host_os in
14834                       linux*) haveit=yes;;
14835                     esac
14836                   fi
14837                 fi
14838                 if test -z "$haveit"; then
14839                   for x in $CPPFLAGS $INCBABELTRACE; do
14840
14841   acl_save_prefix="$prefix"
14842   prefix="$acl_final_prefix"
14843   acl_save_exec_prefix="$exec_prefix"
14844   exec_prefix="$acl_final_exec_prefix"
14845   eval x=\"$x\"
14846   exec_prefix="$acl_save_exec_prefix"
14847   prefix="$acl_save_prefix"
14848
14849                     if test "X$x" = "X-I$additional_includedir"; then
14850                       haveit=yes
14851                       break
14852                     fi
14853                   done
14854                   if test -z "$haveit"; then
14855                     if test -d "$additional_includedir"; then
14856                                             INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
14857                     fi
14858                   fi
14859                 fi
14860               fi
14861             fi
14862                         if test -n "$found_la"; then
14863                                                         save_libdir="$libdir"
14864               case "$found_la" in
14865                 */* | *\\*) . "$found_la" ;;
14866                 *) . "./$found_la" ;;
14867               esac
14868               libdir="$save_libdir"
14869                             for dep in $dependency_libs; do
14870                 case "$dep" in
14871                   -L*)
14872                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14873                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
14874                       haveit=
14875                       if test "X$additional_libdir" = "X/usr/local/lib"; then
14876                         if test -n "$GCC"; then
14877                           case $host_os in
14878                             linux*) haveit=yes;;
14879                           esac
14880                         fi
14881                       fi
14882                       if test -z "$haveit"; then
14883                         haveit=
14884                         for x in $LDFLAGS $LIBBABELTRACE; do
14885
14886   acl_save_prefix="$prefix"
14887   prefix="$acl_final_prefix"
14888   acl_save_exec_prefix="$exec_prefix"
14889   exec_prefix="$acl_final_exec_prefix"
14890   eval x=\"$x\"
14891   exec_prefix="$acl_save_exec_prefix"
14892   prefix="$acl_save_prefix"
14893
14894                           if test "X$x" = "X-L$additional_libdir"; then
14895                             haveit=yes
14896                             break
14897                           fi
14898                         done
14899                         if test -z "$haveit"; then
14900                           if test -d "$additional_libdir"; then
14901                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
14902                           fi
14903                         fi
14904                         haveit=
14905                         for x in $LDFLAGS $LTLIBBABELTRACE; do
14906
14907   acl_save_prefix="$prefix"
14908   prefix="$acl_final_prefix"
14909   acl_save_exec_prefix="$exec_prefix"
14910   exec_prefix="$acl_final_exec_prefix"
14911   eval x=\"$x\"
14912   exec_prefix="$acl_save_exec_prefix"
14913   prefix="$acl_save_prefix"
14914
14915                           if test "X$x" = "X-L$additional_libdir"; then
14916                             haveit=yes
14917                             break
14918                           fi
14919                         done
14920                         if test -z "$haveit"; then
14921                           if test -d "$additional_libdir"; then
14922                                                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
14923                           fi
14924                         fi
14925                       fi
14926                     fi
14927                     ;;
14928                   -R*)
14929                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
14930                     if test "$enable_rpath" != no; then
14931                                                                   haveit=
14932                       for x in $rpathdirs; do
14933                         if test "X$x" = "X$dir"; then
14934                           haveit=yes
14935                           break
14936                         fi
14937                       done
14938                       if test -z "$haveit"; then
14939                         rpathdirs="$rpathdirs $dir"
14940                       fi
14941                                                                   haveit=
14942                       for x in $ltrpathdirs; do
14943                         if test "X$x" = "X$dir"; then
14944                           haveit=yes
14945                           break
14946                         fi
14947                       done
14948                       if test -z "$haveit"; then
14949                         ltrpathdirs="$ltrpathdirs $dir"
14950                       fi
14951                     fi
14952                     ;;
14953                   -l*)
14954                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14955                     ;;
14956                   *.la)
14957                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14958                     ;;
14959                   *)
14960                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
14961                     LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
14962                     ;;
14963                 esac
14964               done
14965             fi
14966           else
14967                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14968             LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
14969           fi
14970         fi
14971       fi
14972     done
14973   done
14974   if test "X$rpathdirs" != "X"; then
14975     if test -n "$hardcode_libdir_separator"; then
14976                         alldirs=
14977       for found_dir in $rpathdirs; do
14978         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14979       done
14980             acl_save_libdir="$libdir"
14981       libdir="$alldirs"
14982       eval flag=\"$hardcode_libdir_flag_spec\"
14983       libdir="$acl_save_libdir"
14984       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14985     else
14986             for found_dir in $rpathdirs; do
14987         acl_save_libdir="$libdir"
14988         libdir="$found_dir"
14989         eval flag=\"$hardcode_libdir_flag_spec\"
14990         libdir="$acl_save_libdir"
14991         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14992       done
14993     fi
14994   fi
14995   if test "X$ltrpathdirs" != "X"; then
14996             for found_dir in $ltrpathdirs; do
14997       LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
14998     done
14999   fi
15000
15001
15002         ac_save_CPPFLAGS="$CPPFLAGS"
15003
15004   for element in $INCBABELTRACE; do
15005     haveit=
15006     for x in $CPPFLAGS; do
15007
15008   acl_save_prefix="$prefix"
15009   prefix="$acl_final_prefix"
15010   acl_save_exec_prefix="$exec_prefix"
15011   exec_prefix="$acl_final_exec_prefix"
15012   eval x=\"$x\"
15013   exec_prefix="$acl_save_exec_prefix"
15014   prefix="$acl_save_prefix"
15015
15016       if test "X$x" = "X$element"; then
15017         haveit=yes
15018         break
15019       fi
15020     done
15021     if test -z "$haveit"; then
15022       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15023     fi
15024   done
15025
15026
15027   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
15028 $as_echo_n "checking for libbabeltrace... " >&6; }
15029 if test "${ac_cv_libbabeltrace+set}" = set; then :
15030   $as_echo_n "(cached) " >&6
15031 else
15032
15033     ac_save_LIBS="$LIBS"
15034     LIBS="$LIBS $LIBBABELTRACE"
15035     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15036 /* end confdefs.h.  */
15037 #include <babeltrace/babeltrace.h>
15038                          #include <babeltrace/ctf/events.h>
15039                          #include <babeltrace/ctf/iterator.h>
15040 int
15041 main ()
15042 {
15043 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
15044                         struct bt_ctf_event *event = NULL;
15045                         const struct bt_definition *scope;
15046
15047                         bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
15048                         scope = bt_ctf_get_top_level_scope (event,
15049                                                            BT_STREAM_EVENT_HEADER);
15050                         bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
15051
15052   ;
15053   return 0;
15054 }
15055 _ACEOF
15056 if ac_fn_c_try_link "$LINENO"; then :
15057   ac_cv_libbabeltrace=yes
15058 else
15059   ac_cv_libbabeltrace=no
15060 fi
15061 rm -f core conftest.err conftest.$ac_objext \
15062     conftest$ac_exeext conftest.$ac_ext
15063     LIBS="$ac_save_LIBS"
15064
15065 fi
15066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
15067 $as_echo "$ac_cv_libbabeltrace" >&6; }
15068   if test "$ac_cv_libbabeltrace" = yes; then
15069     HAVE_LIBBABELTRACE=yes
15070
15071 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
15072
15073     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
15074 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
15075     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
15076 $as_echo "$LIBBABELTRACE" >&6; }
15077   else
15078     HAVE_LIBBABELTRACE=no
15079             CPPFLAGS="$ac_save_CPPFLAGS"
15080     LIBBABELTRACE=
15081     LTLIBBABELTRACE=
15082   fi
15083
15084
15085
15086
15087
15088
15089   CFLAGS=$saved_CFLAGS
15090
15091   if test "$HAVE_LIBBABELTRACE" != yes; then
15092      if test "$with_babeltrace" = yes; then
15093        as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
15094      else
15095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
15096 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
15097      fi
15098   fi
15099 fi
15100
15101 # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
15102 # to an empty version.
15103
15104 files=
15105 links=
15106
15107 rm -f nm.h
15108 if test "${nativefile}" != ""; then
15109     case "${nativefile}" in
15110       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15111       * ) GDB_NM_FILE="${nativefile}"
15112     esac
15113     files="${files} ${GDB_NM_FILE}"
15114     links="${links} nm.h"
15115
15116 cat >>confdefs.h <<_ACEOF
15117 #define GDB_NM_FILE "${GDB_NM_FILE}"
15118 _ACEOF
15119
15120 fi
15121
15122
15123 ac_sources="$files"
15124 ac_dests="$links"
15125 while test -n "$ac_sources"; do
15126   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15127   set $ac_sources; ac_source=$1; shift; ac_sources=$*
15128   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15129 done
15130 ac_config_links="$ac_config_links $ac_config_links_1"
15131
15132
15133
15134
15135
15136 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
15137
15138
15139 # Undo the $ec_script escaping suitable for Makefile.
15140 transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15141 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
15142 if test "x$GDB_TRANSFORM_NAME" = x; then
15143   GDB_TRANSFORM_NAME=gdb
15144 fi
15145
15146 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
15147 if test "x$GCORE_TRANSFORM_NAME" = x; then
15148   GCORE_TRANSFORM_NAME=gcore
15149 fi
15150
15151 ac_config_files="$ac_config_files gcore"
15152
15153
15154 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
15155
15156 ac_config_commands="$ac_config_commands default"
15157
15158 cat >confcache <<\_ACEOF
15159 # This file is a shell script that caches the results of configure
15160 # tests run on this system so they can be shared between configure
15161 # scripts and configure runs, see configure's option --config-cache.
15162 # It is not useful on other systems.  If it contains results you don't
15163 # want to keep, you may remove or edit it.
15164 #
15165 # config.status only pays attention to the cache file if you give it
15166 # the --recheck option to rerun configure.
15167 #
15168 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15169 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15170 # following values.
15171
15172 _ACEOF
15173
15174 # The following way of writing the cache mishandles newlines in values,
15175 # but we know of no workaround that is simple, portable, and efficient.
15176 # So, we kill variables containing newlines.
15177 # Ultrix sh set writes to stderr and can't be redirected directly,
15178 # and sets the high bit in the cache file unless we assign to the vars.
15179 (
15180   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15181     eval ac_val=\$$ac_var
15182     case $ac_val in #(
15183     *${as_nl}*)
15184       case $ac_var in #(
15185       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15186 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15187       esac
15188       case $ac_var in #(
15189       _ | IFS | as_nl) ;; #(
15190       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15191       *) { eval $ac_var=; unset $ac_var;} ;;
15192       esac ;;
15193     esac
15194   done
15195
15196   (set) 2>&1 |
15197     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15198     *${as_nl}ac_space=\ *)
15199       # `set' does not quote correctly, so add quotes: double-quote
15200       # substitution turns \\\\ into \\, and sed turns \\ into \.
15201       sed -n \
15202         "s/'/'\\\\''/g;
15203           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15204       ;; #(
15205     *)
15206       # `set' quotes correctly as required by POSIX, so do not add quotes.
15207       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15208       ;;
15209     esac |
15210     sort
15211 ) |
15212   sed '
15213      /^ac_cv_env_/b end
15214      t clear
15215      :clear
15216      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15217      t end
15218      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15219      :end' >>confcache
15220 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15221   if test -w "$cache_file"; then
15222     test "x$cache_file" != "x/dev/null" &&
15223       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15224 $as_echo "$as_me: updating cache $cache_file" >&6;}
15225     cat confcache >$cache_file
15226   else
15227     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15228 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15229   fi
15230 fi
15231 rm -f confcache
15232
15233 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15234 # Let make expand exec_prefix.
15235 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15236
15237 DEFS=-DHAVE_CONFIG_H
15238
15239 ac_libobjs=
15240 ac_ltlibobjs=
15241 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15242   # 1. Remove the extension, and $U if already installed.
15243   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15244   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15245   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15246   #    will be set to the directory where LIBOBJS objects are built.
15247   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15248   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15249 done
15250 LIBOBJS=$ac_libobjs
15251
15252 LTLIBOBJS=$ac_ltlibobjs
15253
15254
15255 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
15256   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15257 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15258 fi
15259 if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
15260   as_fn_error "conditional \"GMAKE\" was never defined.
15261 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15262 fi
15263 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
15264   as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
15265 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15266 fi
15267 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
15268   as_fn_error "conditional \"HAVE_GUILE\" was never defined.
15269 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15270 fi
15271
15272
15273 : ${CONFIG_STATUS=./config.status}
15274 ac_write_fail=0
15275 ac_clean_files_save=$ac_clean_files
15276 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15277 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15278 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15279 as_write_fail=0
15280 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15281 #! $SHELL
15282 # Generated by $as_me.
15283 # Run this file to recreate the current configuration.
15284 # Compiler output produced by configure, useful for debugging
15285 # configure, is in config.log if it exists.
15286
15287 debug=false
15288 ac_cs_recheck=false
15289 ac_cs_silent=false
15290
15291 SHELL=\${CONFIG_SHELL-$SHELL}
15292 export SHELL
15293 _ASEOF
15294 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15295 ## -------------------- ##
15296 ## M4sh Initialization. ##
15297 ## -------------------- ##
15298
15299 # Be more Bourne compatible
15300 DUALCASE=1; export DUALCASE # for MKS sh
15301 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15302   emulate sh
15303   NULLCMD=:
15304   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15305   # is contrary to our usage.  Disable this feature.
15306   alias -g '${1+"$@"}'='"$@"'
15307   setopt NO_GLOB_SUBST
15308 else
15309   case `(set -o) 2>/dev/null` in #(
15310   *posix*) :
15311     set -o posix ;; #(
15312   *) :
15313      ;;
15314 esac
15315 fi
15316
15317
15318 as_nl='
15319 '
15320 export as_nl
15321 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15322 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15323 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15324 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15325 # Prefer a ksh shell builtin over an external printf program on Solaris,
15326 # but without wasting forks for bash or zsh.
15327 if test -z "$BASH_VERSION$ZSH_VERSION" \
15328     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15329   as_echo='print -r --'
15330   as_echo_n='print -rn --'
15331 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15332   as_echo='printf %s\n'
15333   as_echo_n='printf %s'
15334 else
15335   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15336     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15337     as_echo_n='/usr/ucb/echo -n'
15338   else
15339     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15340     as_echo_n_body='eval
15341       arg=$1;
15342       case $arg in #(
15343       *"$as_nl"*)
15344         expr "X$arg" : "X\\(.*\\)$as_nl";
15345         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15346       esac;
15347       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15348     '
15349     export as_echo_n_body
15350     as_echo_n='sh -c $as_echo_n_body as_echo'
15351   fi
15352   export as_echo_body
15353   as_echo='sh -c $as_echo_body as_echo'
15354 fi
15355
15356 # The user is always right.
15357 if test "${PATH_SEPARATOR+set}" != set; then
15358   PATH_SEPARATOR=:
15359   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15360     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15361       PATH_SEPARATOR=';'
15362   }
15363 fi
15364
15365
15366 # IFS
15367 # We need space, tab and new line, in precisely that order.  Quoting is
15368 # there to prevent editors from complaining about space-tab.
15369 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15370 # splitting by setting IFS to empty value.)
15371 IFS=" ""        $as_nl"
15372
15373 # Find who we are.  Look in the path if we contain no directory separator.
15374 case $0 in #((
15375   *[\\/]* ) as_myself=$0 ;;
15376   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15377 for as_dir in $PATH
15378 do
15379   IFS=$as_save_IFS
15380   test -z "$as_dir" && as_dir=.
15381     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15382   done
15383 IFS=$as_save_IFS
15384
15385      ;;
15386 esac
15387 # We did not find ourselves, most probably we were run as `sh COMMAND'
15388 # in which case we are not to be found in the path.
15389 if test "x$as_myself" = x; then
15390   as_myself=$0
15391 fi
15392 if test ! -f "$as_myself"; then
15393   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15394   exit 1
15395 fi
15396
15397 # Unset variables that we do not need and which cause bugs (e.g. in
15398 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15399 # suppresses any "Segmentation fault" message there.  '((' could
15400 # trigger a bug in pdksh 5.2.14.
15401 for as_var in BASH_ENV ENV MAIL MAILPATH
15402 do eval test x\${$as_var+set} = xset \
15403   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15404 done
15405 PS1='$ '
15406 PS2='> '
15407 PS4='+ '
15408
15409 # NLS nuisances.
15410 LC_ALL=C
15411 export LC_ALL
15412 LANGUAGE=C
15413 export LANGUAGE
15414
15415 # CDPATH.
15416 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15417
15418
15419 # as_fn_error ERROR [LINENO LOG_FD]
15420 # ---------------------------------
15421 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15422 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15423 # script with status $?, using 1 if that was 0.
15424 as_fn_error ()
15425 {
15426   as_status=$?; test $as_status -eq 0 && as_status=1
15427   if test "$3"; then
15428     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15429     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15430   fi
15431   $as_echo "$as_me: error: $1" >&2
15432   as_fn_exit $as_status
15433 } # as_fn_error
15434
15435
15436 # as_fn_set_status STATUS
15437 # -----------------------
15438 # Set $? to STATUS, without forking.
15439 as_fn_set_status ()
15440 {
15441   return $1
15442 } # as_fn_set_status
15443
15444 # as_fn_exit STATUS
15445 # -----------------
15446 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15447 as_fn_exit ()
15448 {
15449   set +e
15450   as_fn_set_status $1
15451   exit $1
15452 } # as_fn_exit
15453
15454 # as_fn_unset VAR
15455 # ---------------
15456 # Portably unset VAR.
15457 as_fn_unset ()
15458 {
15459   { eval $1=; unset $1;}
15460 }
15461 as_unset=as_fn_unset
15462 # as_fn_append VAR VALUE
15463 # ----------------------
15464 # Append the text in VALUE to the end of the definition contained in VAR. Take
15465 # advantage of any shell optimizations that allow amortized linear growth over
15466 # repeated appends, instead of the typical quadratic growth present in naive
15467 # implementations.
15468 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15469   eval 'as_fn_append ()
15470   {
15471     eval $1+=\$2
15472   }'
15473 else
15474   as_fn_append ()
15475   {
15476     eval $1=\$$1\$2
15477   }
15478 fi # as_fn_append
15479
15480 # as_fn_arith ARG...
15481 # ------------------
15482 # Perform arithmetic evaluation on the ARGs, and store the result in the
15483 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15484 # must be portable across $(()) and expr.
15485 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15486   eval 'as_fn_arith ()
15487   {
15488     as_val=$(( $* ))
15489   }'
15490 else
15491   as_fn_arith ()
15492   {
15493     as_val=`expr "$@" || test $? -eq 1`
15494   }
15495 fi # as_fn_arith
15496
15497
15498 if expr a : '\(a\)' >/dev/null 2>&1 &&
15499    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15500   as_expr=expr
15501 else
15502   as_expr=false
15503 fi
15504
15505 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15506   as_basename=basename
15507 else
15508   as_basename=false
15509 fi
15510
15511 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15512   as_dirname=dirname
15513 else
15514   as_dirname=false
15515 fi
15516
15517 as_me=`$as_basename -- "$0" ||
15518 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15519          X"$0" : 'X\(//\)$' \| \
15520          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15521 $as_echo X/"$0" |
15522     sed '/^.*\/\([^/][^/]*\)\/*$/{
15523             s//\1/
15524             q
15525           }
15526           /^X\/\(\/\/\)$/{
15527             s//\1/
15528             q
15529           }
15530           /^X\/\(\/\).*/{
15531             s//\1/
15532             q
15533           }
15534           s/.*/./; q'`
15535
15536 # Avoid depending upon Character Ranges.
15537 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15538 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15539 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15540 as_cr_digits='0123456789'
15541 as_cr_alnum=$as_cr_Letters$as_cr_digits
15542
15543 ECHO_C= ECHO_N= ECHO_T=
15544 case `echo -n x` in #(((((
15545 -n*)
15546   case `echo 'xy\c'` in
15547   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15548   xy)  ECHO_C='\c';;
15549   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15550        ECHO_T=' ';;
15551   esac;;
15552 *)
15553   ECHO_N='-n';;
15554 esac
15555
15556 rm -f conf$$ conf$$.exe conf$$.file
15557 if test -d conf$$.dir; then
15558   rm -f conf$$.dir/conf$$.file
15559 else
15560   rm -f conf$$.dir
15561   mkdir conf$$.dir 2>/dev/null
15562 fi
15563 if (echo >conf$$.file) 2>/dev/null; then
15564   if ln -s conf$$.file conf$$ 2>/dev/null; then
15565     as_ln_s='ln -s'
15566     # ... but there are two gotchas:
15567     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15568     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15569     # In both cases, we have to default to `cp -p'.
15570     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15571       as_ln_s='cp -p'
15572   elif ln conf$$.file conf$$ 2>/dev/null; then
15573     as_ln_s=ln
15574   else
15575     as_ln_s='cp -p'
15576   fi
15577 else
15578   as_ln_s='cp -p'
15579 fi
15580 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15581 rmdir conf$$.dir 2>/dev/null
15582
15583
15584 # as_fn_mkdir_p
15585 # -------------
15586 # Create "$as_dir" as a directory, including parents if necessary.
15587 as_fn_mkdir_p ()
15588 {
15589
15590   case $as_dir in #(
15591   -*) as_dir=./$as_dir;;
15592   esac
15593   test -d "$as_dir" || eval $as_mkdir_p || {
15594     as_dirs=
15595     while :; do
15596       case $as_dir in #(
15597       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15598       *) as_qdir=$as_dir;;
15599       esac
15600       as_dirs="'$as_qdir' $as_dirs"
15601       as_dir=`$as_dirname -- "$as_dir" ||
15602 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15603          X"$as_dir" : 'X\(//\)[^/]' \| \
15604          X"$as_dir" : 'X\(//\)$' \| \
15605          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15606 $as_echo X"$as_dir" |
15607     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15608             s//\1/
15609             q
15610           }
15611           /^X\(\/\/\)[^/].*/{
15612             s//\1/
15613             q
15614           }
15615           /^X\(\/\/\)$/{
15616             s//\1/
15617             q
15618           }
15619           /^X\(\/\).*/{
15620             s//\1/
15621             q
15622           }
15623           s/.*/./; q'`
15624       test -d "$as_dir" && break
15625     done
15626     test -z "$as_dirs" || eval "mkdir $as_dirs"
15627   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15628
15629
15630 } # as_fn_mkdir_p
15631 if mkdir -p . 2>/dev/null; then
15632   as_mkdir_p='mkdir -p "$as_dir"'
15633 else
15634   test -d ./-p && rmdir ./-p
15635   as_mkdir_p=false
15636 fi
15637
15638 if test -x / >/dev/null 2>&1; then
15639   as_test_x='test -x'
15640 else
15641   if ls -dL / >/dev/null 2>&1; then
15642     as_ls_L_option=L
15643   else
15644     as_ls_L_option=
15645   fi
15646   as_test_x='
15647     eval sh -c '\''
15648       if test -d "$1"; then
15649         test -d "$1/.";
15650       else
15651         case $1 in #(
15652         -*)set "./$1";;
15653         esac;
15654         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15655         ???[sx]*):;;*)false;;esac;fi
15656     '\'' sh
15657   '
15658 fi
15659 as_executable_p=$as_test_x
15660
15661 # Sed expression to map a string onto a valid CPP name.
15662 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15663
15664 # Sed expression to map a string onto a valid variable name.
15665 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15666
15667
15668 exec 6>&1
15669 ## ----------------------------------- ##
15670 ## Main body of $CONFIG_STATUS script. ##
15671 ## ----------------------------------- ##
15672 _ASEOF
15673 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15674
15675 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15676 # Save the log message, to keep $0 and so on meaningful, and to
15677 # report actual input values of CONFIG_FILES etc. instead of their
15678 # values after options handling.
15679 ac_log="
15680 This file was extended by $as_me, which was
15681 generated by GNU Autoconf 2.64.  Invocation command line was
15682
15683   CONFIG_FILES    = $CONFIG_FILES
15684   CONFIG_HEADERS  = $CONFIG_HEADERS
15685   CONFIG_LINKS    = $CONFIG_LINKS
15686   CONFIG_COMMANDS = $CONFIG_COMMANDS
15687   $ $0 $@
15688
15689 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15690 "
15691
15692 _ACEOF
15693
15694 case $ac_config_files in *"
15695 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15696 esac
15697
15698 case $ac_config_headers in *"
15699 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15700 esac
15701
15702
15703 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15704 # Files that config.status was made for.
15705 config_files="$ac_config_files"
15706 config_headers="$ac_config_headers"
15707 config_links="$ac_config_links"
15708 config_commands="$ac_config_commands"
15709
15710 _ACEOF
15711
15712 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15713 ac_cs_usage="\
15714 \`$as_me' instantiates files and other configuration actions
15715 from templates according to the current configuration.  Unless the files
15716 and actions are specified as TAGs, all are instantiated by default.
15717
15718 Usage: $0 [OPTION]... [TAG]...
15719
15720   -h, --help       print this help, then exit
15721   -V, --version    print version number and configuration settings, then exit
15722   -q, --quiet, --silent
15723                    do not print progress messages
15724   -d, --debug      don't remove temporary files
15725       --recheck    update $as_me by reconfiguring in the same conditions
15726       --file=FILE[:TEMPLATE]
15727                    instantiate the configuration file FILE
15728       --header=FILE[:TEMPLATE]
15729                    instantiate the configuration header FILE
15730
15731 Configuration files:
15732 $config_files
15733
15734 Configuration headers:
15735 $config_headers
15736
15737 Configuration links:
15738 $config_links
15739
15740 Configuration commands:
15741 $config_commands
15742
15743 Report bugs to the package provider."
15744
15745 _ACEOF
15746 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15747 ac_cs_version="\\
15748 config.status
15749 configured by $0, generated by GNU Autoconf 2.64,
15750   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
15751
15752 Copyright (C) 2009 Free Software Foundation, Inc.
15753 This config.status script is free software; the Free Software Foundation
15754 gives unlimited permission to copy, distribute and modify it."
15755
15756 ac_pwd='$ac_pwd'
15757 srcdir='$srcdir'
15758 INSTALL='$INSTALL'
15759 AWK='$AWK'
15760 test -n "\$AWK" || AWK=awk
15761 _ACEOF
15762
15763 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15764 # The default lists apply if the user does not specify any file.
15765 ac_need_defaults=:
15766 while test $# != 0
15767 do
15768   case $1 in
15769   --*=*)
15770     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15771     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15772     ac_shift=:
15773     ;;
15774   *)
15775     ac_option=$1
15776     ac_optarg=$2
15777     ac_shift=shift
15778     ;;
15779   esac
15780
15781   case $ac_option in
15782   # Handling of the options.
15783   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15784     ac_cs_recheck=: ;;
15785   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15786     $as_echo "$ac_cs_version"; exit ;;
15787   --debug | --debu | --deb | --de | --d | -d )
15788     debug=: ;;
15789   --file | --fil | --fi | --f )
15790     $ac_shift
15791     case $ac_optarg in
15792     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15793     esac
15794     as_fn_append CONFIG_FILES " '$ac_optarg'"
15795     ac_need_defaults=false;;
15796   --header | --heade | --head | --hea )
15797     $ac_shift
15798     case $ac_optarg in
15799     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15800     esac
15801     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15802     ac_need_defaults=false;;
15803   --he | --h)
15804     # Conflict between --help and --header
15805     as_fn_error "ambiguous option: \`$1'
15806 Try \`$0 --help' for more information.";;
15807   --help | --hel | -h )
15808     $as_echo "$ac_cs_usage"; exit ;;
15809   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15810   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15811     ac_cs_silent=: ;;
15812
15813   # This is an error.
15814   -*) as_fn_error "unrecognized option: \`$1'
15815 Try \`$0 --help' for more information." ;;
15816
15817   *) as_fn_append ac_config_targets " $1"
15818      ac_need_defaults=false ;;
15819
15820   esac
15821   shift
15822 done
15823
15824 ac_configure_extra_args=
15825
15826 if $ac_cs_silent; then
15827   exec 6>/dev/null
15828   ac_configure_extra_args="$ac_configure_extra_args --silent"
15829 fi
15830
15831 _ACEOF
15832 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15833 if \$ac_cs_recheck; then
15834   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15835   shift
15836   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15837   CONFIG_SHELL='$SHELL'
15838   export CONFIG_SHELL
15839   exec "\$@"
15840 fi
15841
15842 _ACEOF
15843 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15844 exec 5>>config.log
15845 {
15846   echo
15847   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15848 ## Running $as_me. ##
15849 _ASBOX
15850   $as_echo "$ac_log"
15851 } >&5
15852
15853 _ACEOF
15854 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15855 #
15856 # INIT-COMMANDS
15857 #
15858 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
15859
15860 _ACEOF
15861
15862 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15863
15864 # Handling of arguments.
15865 for ac_config_target in $ac_config_targets
15866 do
15867   case $ac_config_target in
15868     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15869     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
15870     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
15871     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
15872     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
15873     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15874     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
15875     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
15876     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
15877     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15878
15879   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15880   esac
15881 done
15882
15883
15884 # If the user did not use the arguments to specify the items to instantiate,
15885 # then the envvar interface is used.  Set only those that are not.
15886 # We use the long form for the default assignment because of an extremely
15887 # bizarre bug on SunOS 4.1.3.
15888 if $ac_need_defaults; then
15889   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15890   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15891   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15892   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15893 fi
15894
15895 # Have a temporary directory for convenience.  Make it in the build tree
15896 # simply because there is no reason against having it here, and in addition,
15897 # creating and moving files from /tmp can sometimes cause problems.
15898 # Hook for its removal unless debugging.
15899 # Note that there is a small window in which the directory will not be cleaned:
15900 # after its creation but before its name has been assigned to `$tmp'.
15901 $debug ||
15902 {
15903   tmp=
15904   trap 'exit_status=$?
15905   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15906 ' 0
15907   trap 'as_fn_exit 1' 1 2 13 15
15908 }
15909 # Create a (secure) tmp directory for tmp files.
15910
15911 {
15912   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15913   test -n "$tmp" && test -d "$tmp"
15914 }  ||
15915 {
15916   tmp=./conf$$-$RANDOM
15917   (umask 077 && mkdir "$tmp")
15918 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
15919
15920 # Set up the scripts for CONFIG_FILES section.
15921 # No need to generate them if there are no CONFIG_FILES.
15922 # This happens for instance with `./config.status config.h'.
15923 if test -n "$CONFIG_FILES"; then
15924
15925 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15926   ac_cs_awk_getline=:
15927   ac_cs_awk_pipe_init=
15928   ac_cs_awk_read_file='
15929       while ((getline aline < (F[key])) > 0)
15930         print(aline)
15931       close(F[key])'
15932   ac_cs_awk_pipe_fini=
15933 else
15934   ac_cs_awk_getline=false
15935   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15936   ac_cs_awk_read_file='
15937       print "|#_!!_#|"
15938       print "cat " F[key] " &&"
15939       '$ac_cs_awk_pipe_init
15940   # The final `:' finishes the AND list.
15941   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15942 fi
15943 ac_cr=`echo X | tr X '\015'`
15944 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15945 # But we know of no other shell where ac_cr would be empty at this
15946 # point, so we can use a bashism as a fallback.
15947 if test "x$ac_cr" = x; then
15948   eval ac_cr=\$\'\\r\'
15949 fi
15950 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15951 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15952   ac_cs_awk_cr='\r'
15953 else
15954   ac_cs_awk_cr=$ac_cr
15955 fi
15956
15957 echo 'BEGIN {' >"$tmp/subs1.awk" &&
15958 _ACEOF
15959
15960 # Create commands to substitute file output variables.
15961 {
15962   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15963   echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15964   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15965   echo "_ACAWK" &&
15966   echo "_ACEOF"
15967 } >conf$$files.sh &&
15968 . ./conf$$files.sh ||
15969   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15970 rm -f conf$$files.sh
15971
15972 {
15973   echo "cat >conf$$subs.awk <<_ACEOF" &&
15974   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15975   echo "_ACEOF"
15976 } >conf$$subs.sh ||
15977   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15978 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
15979 ac_delim='%!_!# '
15980 for ac_last_try in false false false false false :; do
15981   . ./conf$$subs.sh ||
15982     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15983
15984   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15985   if test $ac_delim_n = $ac_delim_num; then
15986     break
15987   elif $ac_last_try; then
15988     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15989   else
15990     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15991   fi
15992 done
15993 rm -f conf$$subs.sh
15994
15995 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15996 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15997 _ACEOF
15998 sed -n '
15999 h
16000 s/^/S["/; s/!.*/"]=/
16001 p
16002 g
16003 s/^[^!]*!//
16004 :repl
16005 t repl
16006 s/'"$ac_delim"'$//
16007 t delim
16008 :nl
16009 h
16010 s/\(.\{148\}\).*/\1/
16011 t more1
16012 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16013 p
16014 n
16015 b repl
16016 :more1
16017 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16018 p
16019 g
16020 s/.\{148\}//
16021 t nl
16022 :delim
16023 h
16024 s/\(.\{148\}\).*/\1/
16025 t more2
16026 s/["\\]/\\&/g; s/^/"/; s/$/"/
16027 p
16028 b
16029 :more2
16030 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16031 p
16032 g
16033 s/.\{148\}//
16034 t delim
16035 ' <conf$$subs.awk | sed '
16036 /^[^""]/{
16037   N
16038   s/\n//
16039 }
16040 ' >>$CONFIG_STATUS || ac_write_fail=1
16041 rm -f conf$$subs.awk
16042 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16043 _ACAWK
16044 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16045   for (key in S) S_is_set[key] = 1
16046   FS = "\a"
16047   \$ac_cs_awk_pipe_init
16048 }
16049 {
16050   line = $ 0
16051   nfields = split(line, field, "@")
16052   substed = 0
16053   len = length(field[1])
16054   for (i = 2; i < nfields; i++) {
16055     key = field[i]
16056     keylen = length(key)
16057     if (S_is_set[key]) {
16058       value = S[key]
16059       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16060       len += length(value) + length(field[++i])
16061       substed = 1
16062     } else
16063       len += 1 + keylen
16064   }
16065   if (nfields == 3 && !substed) {
16066     key = field[2]
16067     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
16068       \$ac_cs_awk_read_file
16069       next
16070     }
16071   }
16072   print line
16073 }
16074 \$ac_cs_awk_pipe_fini
16075 _ACAWK
16076 _ACEOF
16077 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16078 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16079   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16080 else
16081   cat
16082 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16083   || as_fn_error "could not setup config files machinery" "$LINENO" 5
16084 _ACEOF
16085
16086 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16087 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16088 # trailing colons and then remove the whole line if VPATH becomes empty
16089 # (actually we leave an empty line to preserve line numbers).
16090 if test "x$srcdir" = x.; then
16091   ac_vpsub='/^[  ]*VPATH[        ]*=/{
16092 s/:*\$(srcdir):*/:/
16093 s/:*\${srcdir}:*/:/
16094 s/:*@srcdir@:*/:/
16095 s/^\([^=]*=[     ]*\):*/\1/
16096 s/:*$//
16097 s/^[^=]*=[       ]*$//
16098 }'
16099 fi
16100
16101 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16102 fi # test -n "$CONFIG_FILES"
16103
16104 # Set up the scripts for CONFIG_HEADERS section.
16105 # No need to generate them if there are no CONFIG_HEADERS.
16106 # This happens for instance with `./config.status Makefile'.
16107 if test -n "$CONFIG_HEADERS"; then
16108 cat >"$tmp/defines.awk" <<\_ACAWK ||
16109 BEGIN {
16110 _ACEOF
16111
16112 # Transform confdefs.h into an awk script `defines.awk', embedded as
16113 # here-document in config.status, that substitutes the proper values into
16114 # config.h.in to produce config.h.
16115
16116 # Create a delimiter string that does not exist in confdefs.h, to ease
16117 # handling of long lines.
16118 ac_delim='%!_!# '
16119 for ac_last_try in false false :; do
16120   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16121   if test -z "$ac_t"; then
16122     break
16123   elif $ac_last_try; then
16124     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16125   else
16126     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16127   fi
16128 done
16129
16130 # For the awk script, D is an array of macro values keyed by name,
16131 # likewise P contains macro parameters if any.  Preserve backslash
16132 # newline sequences.
16133
16134 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16135 sed -n '
16136 s/.\{148\}/&'"$ac_delim"'/g
16137 t rset
16138 :rset
16139 s/^[     ]*#[    ]*define[       ][      ]*/ /
16140 t def
16141 d
16142 :def
16143 s/\\$//
16144 t bsnl
16145 s/["\\]/\\&/g
16146 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16147 D["\1"]=" \3"/p
16148 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16149 d
16150 :bsnl
16151 s/["\\]/\\&/g
16152 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16153 D["\1"]=" \3\\\\\\n"\\/p
16154 t cont
16155 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16156 t cont
16157 d
16158 :cont
16159 n
16160 s/.\{148\}/&'"$ac_delim"'/g
16161 t clear
16162 :clear
16163 s/\\$//
16164 t bsnlc
16165 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16166 d
16167 :bsnlc
16168 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16169 b cont
16170 ' <confdefs.h | sed '
16171 s/'"$ac_delim"'/"\\\
16172 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16173
16174 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16175   for (key in D) D_is_set[key] = 1
16176   FS = "\a"
16177 }
16178 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16179   line = \$ 0
16180   split(line, arg, " ")
16181   if (arg[1] == "#") {
16182     defundef = arg[2]
16183     mac1 = arg[3]
16184   } else {
16185     defundef = substr(arg[1], 2)
16186     mac1 = arg[2]
16187   }
16188   split(mac1, mac2, "(") #)
16189   macro = mac2[1]
16190   prefix = substr(line, 1, index(line, defundef) - 1)
16191   if (D_is_set[macro]) {
16192     # Preserve the white space surrounding the "#".
16193     print prefix "define", macro P[macro] D[macro]
16194     next
16195   } else {
16196     # Replace #undef with comments.  This is necessary, for example,
16197     # in the case of _POSIX_SOURCE, which is predefined and required
16198     # on some systems where configure will not decide to define it.
16199     if (defundef == "undef") {
16200       print "/*", prefix defundef, macro, "*/"
16201       next
16202     }
16203   }
16204 }
16205 { print }
16206 _ACAWK
16207 _ACEOF
16208 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16209   as_fn_error "could not setup config headers machinery" "$LINENO" 5
16210 fi # test -n "$CONFIG_HEADERS"
16211
16212
16213 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16214 shift
16215 for ac_tag
16216 do
16217   case $ac_tag in
16218   :[FHLC]) ac_mode=$ac_tag; continue;;
16219   esac
16220   case $ac_mode$ac_tag in
16221   :[FHL]*:*);;
16222   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16223   :[FH]-) ac_tag=-:-;;
16224   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16225   esac
16226   ac_save_IFS=$IFS
16227   IFS=:
16228   set x $ac_tag
16229   IFS=$ac_save_IFS
16230   shift
16231   ac_file=$1
16232   shift
16233
16234   case $ac_mode in
16235   :L) ac_source=$1;;
16236   :[FH])
16237     ac_file_inputs=
16238     for ac_f
16239     do
16240       case $ac_f in
16241       -) ac_f="$tmp/stdin";;
16242       *) # Look for the file first in the build tree, then in the source tree
16243          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16244          # because $ac_f cannot contain `:'.
16245          test -f "$ac_f" ||
16246            case $ac_f in
16247            [\\/$]*) false;;
16248            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16249            esac ||
16250            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16251       esac
16252       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16253       as_fn_append ac_file_inputs " '$ac_f'"
16254     done
16255
16256     # Let's still pretend it is `configure' which instantiates (i.e., don't
16257     # use $as_me), people would be surprised to read:
16258     #    /* config.h.  Generated by config.status.  */
16259     configure_input='Generated from '`
16260           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16261         `' by configure.'
16262     if test x"$ac_file" != x-; then
16263       configure_input="$ac_file.  $configure_input"
16264       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16265 $as_echo "$as_me: creating $ac_file" >&6;}
16266     fi
16267     # Neutralize special characters interpreted by sed in replacement strings.
16268     case $configure_input in #(
16269     *\&* | *\|* | *\\* )
16270        ac_sed_conf_input=`$as_echo "$configure_input" |
16271        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16272     *) ac_sed_conf_input=$configure_input;;
16273     esac
16274
16275     case $ac_tag in
16276     *:-:* | *:-) cat >"$tmp/stdin" \
16277       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16278     esac
16279     ;;
16280   esac
16281
16282   ac_dir=`$as_dirname -- "$ac_file" ||
16283 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16284          X"$ac_file" : 'X\(//\)[^/]' \| \
16285          X"$ac_file" : 'X\(//\)$' \| \
16286          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16287 $as_echo X"$ac_file" |
16288     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16289             s//\1/
16290             q
16291           }
16292           /^X\(\/\/\)[^/].*/{
16293             s//\1/
16294             q
16295           }
16296           /^X\(\/\/\)$/{
16297             s//\1/
16298             q
16299           }
16300           /^X\(\/\).*/{
16301             s//\1/
16302             q
16303           }
16304           s/.*/./; q'`
16305   as_dir="$ac_dir"; as_fn_mkdir_p
16306   ac_builddir=.
16307
16308 case "$ac_dir" in
16309 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16310 *)
16311   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16312   # A ".." for each directory in $ac_dir_suffix.
16313   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16314   case $ac_top_builddir_sub in
16315   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16316   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16317   esac ;;
16318 esac
16319 ac_abs_top_builddir=$ac_pwd
16320 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16321 # for backward compatibility:
16322 ac_top_builddir=$ac_top_build_prefix
16323
16324 case $srcdir in
16325   .)  # We are building in place.
16326     ac_srcdir=.
16327     ac_top_srcdir=$ac_top_builddir_sub
16328     ac_abs_top_srcdir=$ac_pwd ;;
16329   [\\/]* | ?:[\\/]* )  # Absolute name.
16330     ac_srcdir=$srcdir$ac_dir_suffix;
16331     ac_top_srcdir=$srcdir
16332     ac_abs_top_srcdir=$srcdir ;;
16333   *) # Relative name.
16334     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16335     ac_top_srcdir=$ac_top_build_prefix$srcdir
16336     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16337 esac
16338 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16339
16340
16341   case $ac_mode in
16342   :F)
16343   #
16344   # CONFIG_FILE
16345   #
16346
16347   case $INSTALL in
16348   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16349   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16350   esac
16351 _ACEOF
16352
16353 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16354 # If the template does not know about datarootdir, expand it.
16355 # FIXME: This hack should be removed a few years after 2.60.
16356 ac_datarootdir_hack=; ac_datarootdir_seen=
16357 ac_sed_dataroot='
16358 /datarootdir/ {
16359   p
16360   q
16361 }
16362 /@datadir@/p
16363 /@docdir@/p
16364 /@infodir@/p
16365 /@localedir@/p
16366 /@mandir@/p'
16367 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16368 *datarootdir*) ac_datarootdir_seen=yes;;
16369 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16370   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16371 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16372 _ACEOF
16373 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16374   ac_datarootdir_hack='
16375   s&@datadir@&$datadir&g
16376   s&@docdir@&$docdir&g
16377   s&@infodir@&$infodir&g
16378   s&@localedir@&$localedir&g
16379   s&@mandir@&$mandir&g
16380   s&\\\${datarootdir}&$datarootdir&g' ;;
16381 esac
16382 _ACEOF
16383
16384 # Neutralize VPATH when `$srcdir' = `.'.
16385 # Shell code in configure.ac might set extrasub.
16386 # FIXME: do we really want to maintain this feature?
16387 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16388 ac_sed_extra="$ac_vpsub
16389 $extrasub
16390 _ACEOF
16391 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16392 :t
16393 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16394 s|@configure_input@|$ac_sed_conf_input|;t t
16395 s&@top_builddir@&$ac_top_builddir_sub&;t t
16396 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16397 s&@srcdir@&$ac_srcdir&;t t
16398 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16399 s&@top_srcdir@&$ac_top_srcdir&;t t
16400 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16401 s&@builddir@&$ac_builddir&;t t
16402 s&@abs_builddir@&$ac_abs_builddir&;t t
16403 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16404 s&@INSTALL@&$ac_INSTALL&;t t
16405 $ac_datarootdir_hack
16406 "
16407 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16408 if $ac_cs_awk_getline; then
16409   $AWK -f "$tmp/subs.awk"
16410 else
16411   $AWK -f "$tmp/subs.awk" | $SHELL
16412 fi >$tmp/out \
16413   || as_fn_error "could not create $ac_file" "$LINENO" 5
16414
16415 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16416   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16417   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16418   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16419 which seems to be undefined.  Please make sure it is defined." >&5
16420 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16421 which seems to be undefined.  Please make sure it is defined." >&2;}
16422
16423   rm -f "$tmp/stdin"
16424   case $ac_file in
16425   -) cat "$tmp/out" && rm -f "$tmp/out";;
16426   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16427   esac \
16428   || as_fn_error "could not create $ac_file" "$LINENO" 5
16429  ;;
16430   :H)
16431   #
16432   # CONFIG_HEADER
16433   #
16434   if test x"$ac_file" != x-; then
16435     {
16436       $as_echo "/* $configure_input  */" \
16437       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16438     } >"$tmp/config.h" \
16439       || as_fn_error "could not create $ac_file" "$LINENO" 5
16440     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16441       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16442 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16443     else
16444       rm -f "$ac_file"
16445       mv "$tmp/config.h" "$ac_file" \
16446         || as_fn_error "could not create $ac_file" "$LINENO" 5
16447     fi
16448   else
16449     $as_echo "/* $configure_input  */" \
16450       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16451       || as_fn_error "could not create -" "$LINENO" 5
16452   fi
16453  ;;
16454   :L)
16455   #
16456   # CONFIG_LINK
16457   #
16458
16459   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16460     :
16461   else
16462     # Prefer the file from the source tree if names are identical.
16463     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16464       ac_source=$srcdir/$ac_source
16465     fi
16466
16467     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16468 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16469
16470     if test ! -r "$ac_source"; then
16471       as_fn_error "$ac_source: file not found" "$LINENO" 5
16472     fi
16473     rm -f "$ac_file"
16474
16475     # Try a relative symlink, then a hard link, then a copy.
16476     case $srcdir in
16477     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16478         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16479     esac
16480     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16481       ln "$ac_source" "$ac_file" 2>/dev/null ||
16482       cp -p "$ac_source" "$ac_file" ||
16483       as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16484   fi
16485  ;;
16486   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16487 $as_echo "$as_me: executing $ac_file commands" >&6;}
16488  ;;
16489   esac
16490
16491
16492   case $ac_file$ac_mode in
16493     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
16494     "gcore":F) chmod +x gcore ;;
16495     "default":C)
16496 case x$CONFIG_HEADERS in
16497 xconfig.h:config.in)
16498 echo > stamp-h ;;
16499 esac
16500  ;;
16501
16502   esac
16503 done # for ac_tag
16504
16505
16506 as_fn_exit 0
16507 _ACEOF
16508 ac_clean_files=$ac_clean_files_save
16509
16510 test $ac_write_fail = 0 ||
16511   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16512
16513
16514 # configure is writing to config.log, and then calls config.status.
16515 # config.status does its own redirection, appending to config.log.
16516 # Unfortunately, on DOS this fails, as config.log is still kept open
16517 # by configure, so config.status won't be able to write to it; its
16518 # output is simply discarded.  So we exec the FD to /dev/null,
16519 # effectively closing config.log, so it can be properly (re)opened and
16520 # appended to by config.status.  When coming back to configure, we
16521 # need to make the FD available again.
16522 if test "$no_create" != yes; then
16523   ac_cs_success=:
16524   ac_config_status_args=
16525   test "$silent" = yes &&
16526     ac_config_status_args="$ac_config_status_args --quiet"
16527   exec 5>/dev/null
16528   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16529   exec 5>>config.log
16530   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16531   # would make configure fail if this is the last instruction.
16532   $ac_cs_success || as_fn_exit $?
16533 fi
16534
16535 #
16536 # CONFIG_SUBDIRS section.
16537 #
16538 if test "$no_recursion" != yes; then
16539
16540   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16541   # so they do not pile up.
16542   ac_sub_configure_args=
16543   ac_prev=
16544   eval "set x $ac_configure_args"
16545   shift
16546   for ac_arg
16547   do
16548     if test -n "$ac_prev"; then
16549       ac_prev=
16550       continue
16551     fi
16552     case $ac_arg in
16553     -cache-file | --cache-file | --cache-fil | --cache-fi \
16554     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16555       ac_prev=cache_file ;;
16556     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
16557     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16558     | --c=*)
16559       ;;
16560     --config-cache | -C)
16561       ;;
16562     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16563       ac_prev=srcdir ;;
16564     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16565       ;;
16566     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16567       ac_prev=prefix ;;
16568     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16569       ;;
16570     --disable-option-checking)
16571       ;;
16572     *)
16573       case $ac_arg in
16574       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
16575       esac
16576       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
16577     esac
16578   done
16579
16580   # Always prepend --prefix to ensure using the same prefix
16581   # in subdir configurations.
16582   ac_arg="--prefix=$prefix"
16583   case $ac_arg in
16584   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
16585   esac
16586   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16587
16588   # Pass --silent
16589   if test "$silent" = yes; then
16590     ac_sub_configure_args="--silent $ac_sub_configure_args"
16591   fi
16592
16593   # Always prepend --disable-option-checking to silence warnings, since
16594   # different subdirs can have different --enable and --with options.
16595   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
16596
16597   ac_popdir=`pwd`
16598   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
16599
16600     # Do not complain, so a configure script can configure whichever
16601     # parts of a large source tree are present.
16602     test -d "$srcdir/$ac_dir" || continue
16603
16604     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16605     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16606     $as_echo "$ac_msg" >&6
16607     as_dir="$ac_dir"; as_fn_mkdir_p
16608     ac_builddir=.
16609
16610 case "$ac_dir" in
16611 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16612 *)
16613   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16614   # A ".." for each directory in $ac_dir_suffix.
16615   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16616   case $ac_top_builddir_sub in
16617   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16618   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16619   esac ;;
16620 esac
16621 ac_abs_top_builddir=$ac_pwd
16622 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16623 # for backward compatibility:
16624 ac_top_builddir=$ac_top_build_prefix
16625
16626 case $srcdir in
16627   .)  # We are building in place.
16628     ac_srcdir=.
16629     ac_top_srcdir=$ac_top_builddir_sub
16630     ac_abs_top_srcdir=$ac_pwd ;;
16631   [\\/]* | ?:[\\/]* )  # Absolute name.
16632     ac_srcdir=$srcdir$ac_dir_suffix;
16633     ac_top_srcdir=$srcdir
16634     ac_abs_top_srcdir=$srcdir ;;
16635   *) # Relative name.
16636     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16637     ac_top_srcdir=$ac_top_build_prefix$srcdir
16638     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16639 esac
16640 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16641
16642
16643     cd "$ac_dir"
16644
16645     # Check for guested configure; otherwise get Cygnus style configure.
16646     if test -f "$ac_srcdir/configure.gnu"; then
16647       ac_sub_configure=$ac_srcdir/configure.gnu
16648     elif test -f "$ac_srcdir/configure"; then
16649       ac_sub_configure=$ac_srcdir/configure
16650     elif test -f "$ac_srcdir/configure.in"; then
16651       # This should be Cygnus configure.
16652       ac_sub_configure=$ac_aux_dir/configure
16653     else
16654       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16655 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
16656       ac_sub_configure=
16657     fi
16658
16659     # The recursion is here.
16660     if test -n "$ac_sub_configure"; then
16661       # Make the cache file name correct relative to the subdirectory.
16662       case $cache_file in
16663       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
16664       *) # Relative name.
16665         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
16666       esac
16667
16668       { $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
16669 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
16670       # The eval makes quoting arguments work.
16671       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16672            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
16673         as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
16674     fi
16675
16676     cd "$ac_popdir"
16677   done
16678 fi
16679 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16680   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16681 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16682 fi
16683
16684
16685 exit 0