Imported Upstream version 7.8.1
[platform/upstream/gdb.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 (defaults no)
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_compute_int LINENO EXPR VAR INCLUDES
1897 # --------------------------------------------
1898 # Tries to find the compile-time value of EXPR in a program that includes
1899 # INCLUDES, setting VAR accordingly. Returns whether the value could be
1900 # computed
1901 ac_fn_c_compute_int ()
1902 {
1903   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904   if test "$cross_compiling" = yes; then
1905     # Depending upon the size, compute the lo and hi bounds.
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907 /* end confdefs.h.  */
1908 $4
1909 int
1910 main ()
1911 {
1912 static int test_array [1 - 2 * !(($2) >= 0)];
1913 test_array [0] = 0
1914
1915   ;
1916   return 0;
1917 }
1918 _ACEOF
1919 if ac_fn_c_try_compile "$LINENO"; then :
1920   ac_lo=0 ac_mid=0
1921   while :; do
1922     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1923 /* end confdefs.h.  */
1924 $4
1925 int
1926 main ()
1927 {
1928 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1929 test_array [0] = 0
1930
1931   ;
1932   return 0;
1933 }
1934 _ACEOF
1935 if ac_fn_c_try_compile "$LINENO"; then :
1936   ac_hi=$ac_mid; break
1937 else
1938   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1939                         if test $ac_lo -le $ac_mid; then
1940                           ac_lo= ac_hi=
1941                           break
1942                         fi
1943                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1944 fi
1945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1946   done
1947 else
1948   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949 /* end confdefs.h.  */
1950 $4
1951 int
1952 main ()
1953 {
1954 static int test_array [1 - 2 * !(($2) < 0)];
1955 test_array [0] = 0
1956
1957   ;
1958   return 0;
1959 }
1960 _ACEOF
1961 if ac_fn_c_try_compile "$LINENO"; then :
1962   ac_hi=-1 ac_mid=-1
1963   while :; do
1964     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965 /* end confdefs.h.  */
1966 $4
1967 int
1968 main ()
1969 {
1970 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1971 test_array [0] = 0
1972
1973   ;
1974   return 0;
1975 }
1976 _ACEOF
1977 if ac_fn_c_try_compile "$LINENO"; then :
1978   ac_lo=$ac_mid; break
1979 else
1980   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1981                         if test $ac_mid -le $ac_hi; then
1982                           ac_lo= ac_hi=
1983                           break
1984                         fi
1985                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1986 fi
1987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988   done
1989 else
1990   ac_lo= ac_hi=
1991 fi
1992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1993 fi
1994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1995 # Binary search between lo and hi bounds.
1996 while test "x$ac_lo" != "x$ac_hi"; do
1997   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1998   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999 /* end confdefs.h.  */
2000 $4
2001 int
2002 main ()
2003 {
2004 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2005 test_array [0] = 0
2006
2007   ;
2008   return 0;
2009 }
2010 _ACEOF
2011 if ac_fn_c_try_compile "$LINENO"; then :
2012   ac_hi=$ac_mid
2013 else
2014   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2015 fi
2016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2017 done
2018 case $ac_lo in #((
2019 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2020 '') ac_retval=1 ;;
2021 esac
2022   else
2023     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024 /* end confdefs.h.  */
2025 $4
2026 static long int longval () { return $2; }
2027 static unsigned long int ulongval () { return $2; }
2028 #include <stdio.h>
2029 #include <stdlib.h>
2030 int
2031 main ()
2032 {
2033
2034   FILE *f = fopen ("conftest.val", "w");
2035   if (! f)
2036     return 1;
2037   if (($2) < 0)
2038     {
2039       long int i = longval ();
2040       if (i != ($2))
2041         return 1;
2042       fprintf (f, "%ld", i);
2043     }
2044   else
2045     {
2046       unsigned long int i = ulongval ();
2047       if (i != ($2))
2048         return 1;
2049       fprintf (f, "%lu", i);
2050     }
2051   /* Do not output a trailing newline, as this causes \r\n confusion
2052      on some platforms.  */
2053   return ferror (f) || fclose (f) != 0;
2054
2055   ;
2056   return 0;
2057 }
2058 _ACEOF
2059 if ac_fn_c_try_run "$LINENO"; then :
2060   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2061 else
2062   ac_retval=1
2063 fi
2064 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2065   conftest.$ac_objext conftest.beam conftest.$ac_ext
2066 rm -f conftest.val
2067
2068   fi
2069   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2070   return $ac_retval
2071
2072 } # ac_fn_c_compute_int
2073
2074 # ac_fn_c_try_link LINENO
2075 # -----------------------
2076 # Try to link conftest.$ac_ext, and return whether this succeeded.
2077 ac_fn_c_try_link ()
2078 {
2079   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2080   rm -f conftest.$ac_objext conftest$ac_exeext
2081   if { { ac_try="$ac_link"
2082 case "(($ac_try" in
2083   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2084   *) ac_try_echo=$ac_try;;
2085 esac
2086 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2087 $as_echo "$ac_try_echo"; } >&5
2088   (eval "$ac_link") 2>conftest.err
2089   ac_status=$?
2090   if test -s conftest.err; then
2091     grep -v '^ *+' conftest.err >conftest.er1
2092     cat conftest.er1 >&5
2093     mv -f conftest.er1 conftest.err
2094   fi
2095   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2096   test $ac_status = 0; } && {
2097          test -z "$ac_c_werror_flag" ||
2098          test ! -s conftest.err
2099        } && test -s conftest$ac_exeext && {
2100          test "$cross_compiling" = yes ||
2101          $as_test_x conftest$ac_exeext
2102        }; then :
2103   ac_retval=0
2104 else
2105   $as_echo "$as_me: failed program was:" >&5
2106 sed 's/^/| /' conftest.$ac_ext >&5
2107
2108         ac_retval=1
2109 fi
2110   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2111   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2112   # interfere with the next link command; also delete a directory that is
2113   # left behind by Apple's compiler.  We do this before executing the actions.
2114   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
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_try_link
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 # Check whether --enable-plugins was given.
4094 if test "${enable_plugins+set}" = set; then :
4095   enableval=$enable_plugins; case "${enableval}" in
4096   yes | "") plugins=yes ;;
4097   no) plugins=no ;;
4098   *) plugins=yes ;;
4099  esac
4100 else
4101   plugins=no
4102 fi
4103
4104
4105
4106 case "${host}" in
4107   sparc-*-solaris*|i[3-7]86-*-solaris*)
4108     # On native 32bit sparc and ia32 solaris, large-file and procfs support
4109     # are mutually exclusive; and without procfs support, the bfd/ elf module
4110     # cannot provide certain routines such as elfcore_write_prpsinfo
4111     # or elfcore_write_prstatus.  So unless the user explicitly requested
4112     # large-file support through the --enable-largefile switch, disable
4113     # large-file support in favor of procfs support.
4114     test "${target}" = "${host}" -a "x$plugins" = xno \
4115       && : ${enable_largefile="no"}
4116     ;;
4117 esac
4118
4119 # Check whether --enable-largefile was given.
4120 if test "${enable_largefile+set}" = set; then :
4121   enableval=$enable_largefile;
4122 fi
4123
4124 if test "$enable_largefile" != no; then
4125
4126   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4127 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4128 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4129   $as_echo_n "(cached) " >&6
4130 else
4131   ac_cv_sys_largefile_CC=no
4132      if test "$GCC" != yes; then
4133        ac_save_CC=$CC
4134        while :; do
4135          # IRIX 6.2 and later do not support large files by default,
4136          # so use the C compiler's -n32 option if that helps.
4137          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4138 /* end confdefs.h.  */
4139 #include <sys/types.h>
4140  /* Check that off_t can represent 2**63 - 1 correctly.
4141     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4142     since some C++ compilers masquerading as C compilers
4143     incorrectly reject 9223372036854775807.  */
4144 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4145   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4146                        && LARGE_OFF_T % 2147483647 == 1)
4147                       ? 1 : -1];
4148 int
4149 main ()
4150 {
4151
4152   ;
4153   return 0;
4154 }
4155 _ACEOF
4156          if ac_fn_c_try_compile "$LINENO"; then :
4157   break
4158 fi
4159 rm -f core conftest.err conftest.$ac_objext
4160          CC="$CC -n32"
4161          if ac_fn_c_try_compile "$LINENO"; then :
4162   ac_cv_sys_largefile_CC=' -n32'; break
4163 fi
4164 rm -f core conftest.err conftest.$ac_objext
4165          break
4166        done
4167        CC=$ac_save_CC
4168        rm -f conftest.$ac_ext
4169     fi
4170 fi
4171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4172 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4173   if test "$ac_cv_sys_largefile_CC" != no; then
4174     CC=$CC$ac_cv_sys_largefile_CC
4175   fi
4176
4177   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4178 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4179 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4180   $as_echo_n "(cached) " >&6
4181 else
4182   while :; do
4183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4184 /* end confdefs.h.  */
4185 #include <sys/types.h>
4186  /* Check that off_t can represent 2**63 - 1 correctly.
4187     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4188     since some C++ compilers masquerading as C compilers
4189     incorrectly reject 9223372036854775807.  */
4190 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4191   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4192                        && LARGE_OFF_T % 2147483647 == 1)
4193                       ? 1 : -1];
4194 int
4195 main ()
4196 {
4197
4198   ;
4199   return 0;
4200 }
4201 _ACEOF
4202 if ac_fn_c_try_compile "$LINENO"; then :
4203   ac_cv_sys_file_offset_bits=no; break
4204 fi
4205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4207 /* end confdefs.h.  */
4208 #define _FILE_OFFSET_BITS 64
4209 #include <sys/types.h>
4210  /* Check that off_t can represent 2**63 - 1 correctly.
4211     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4212     since some C++ compilers masquerading as C compilers
4213     incorrectly reject 9223372036854775807.  */
4214 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4215   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4216                        && LARGE_OFF_T % 2147483647 == 1)
4217                       ? 1 : -1];
4218 int
4219 main ()
4220 {
4221
4222   ;
4223   return 0;
4224 }
4225 _ACEOF
4226 if ac_fn_c_try_compile "$LINENO"; then :
4227   ac_cv_sys_file_offset_bits=64; break
4228 fi
4229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4230   ac_cv_sys_file_offset_bits=unknown
4231   break
4232 done
4233 fi
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4235 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4236 case $ac_cv_sys_file_offset_bits in #(
4237   no | unknown) ;;
4238   *)
4239 cat >>confdefs.h <<_ACEOF
4240 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4241 _ACEOF
4242 ;;
4243 esac
4244 rm -rf conftest*
4245   if test $ac_cv_sys_file_offset_bits = unknown; then
4246     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4247 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4248 if test "${ac_cv_sys_large_files+set}" = set; then :
4249   $as_echo_n "(cached) " >&6
4250 else
4251   while :; do
4252   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4253 /* end confdefs.h.  */
4254 #include <sys/types.h>
4255  /* Check that off_t can represent 2**63 - 1 correctly.
4256     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4257     since some C++ compilers masquerading as C compilers
4258     incorrectly reject 9223372036854775807.  */
4259 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4260   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4261                        && LARGE_OFF_T % 2147483647 == 1)
4262                       ? 1 : -1];
4263 int
4264 main ()
4265 {
4266
4267   ;
4268   return 0;
4269 }
4270 _ACEOF
4271 if ac_fn_c_try_compile "$LINENO"; then :
4272   ac_cv_sys_large_files=no; break
4273 fi
4274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4276 /* end confdefs.h.  */
4277 #define _LARGE_FILES 1
4278 #include <sys/types.h>
4279  /* Check that off_t can represent 2**63 - 1 correctly.
4280     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4281     since some C++ compilers masquerading as C compilers
4282     incorrectly reject 9223372036854775807.  */
4283 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4284   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4285                        && LARGE_OFF_T % 2147483647 == 1)
4286                       ? 1 : -1];
4287 int
4288 main ()
4289 {
4290
4291   ;
4292   return 0;
4293 }
4294 _ACEOF
4295 if ac_fn_c_try_compile "$LINENO"; then :
4296   ac_cv_sys_large_files=1; break
4297 fi
4298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4299   ac_cv_sys_large_files=unknown
4300   break
4301 done
4302 fi
4303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4304 $as_echo "$ac_cv_sys_large_files" >&6; }
4305 case $ac_cv_sys_large_files in #(
4306   no | unknown) ;;
4307   *)
4308 cat >>confdefs.h <<_ACEOF
4309 #define _LARGE_FILES $ac_cv_sys_large_files
4310 _ACEOF
4311 ;;
4312 esac
4313 rm -rf conftest*
4314   fi
4315 fi
4316
4317
4318
4319
4320
4321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4322 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4323 if test "${am_cv_prog_cc_stdc+set}" = set; then :
4324   $as_echo_n "(cached) " >&6
4325 else
4326   am_cv_prog_cc_stdc=no
4327 ac_save_CC="$CC"
4328 # Don't try gcc -ansi; that turns off useful extensions and
4329 # breaks some systems' header files.
4330 # AIX                   -qlanglvl=ansi
4331 # Ultrix and OSF/1      -std1
4332 # HP-UX 10.20 and later -Ae
4333 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4334 # SVR4                  -Xc -D__EXTENSIONS__
4335 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4336 do
4337   CC="$ac_save_CC $ac_arg"
4338   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4339 /* end confdefs.h.  */
4340 #include <stdarg.h>
4341 #include <stdio.h>
4342 #include <sys/types.h>
4343 #include <sys/stat.h>
4344 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4345 struct buf { int x; };
4346 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4347 static char *e (p, i)
4348      char **p;
4349      int i;
4350 {
4351   return p[i];
4352 }
4353 static char *f (char * (*g) (char **, int), char **p, ...)
4354 {
4355   char *s;
4356   va_list v;
4357   va_start (v,p);
4358   s = g (p, va_arg (v,int));
4359   va_end (v);
4360   return s;
4361 }
4362 int test (int i, double x);
4363 struct s1 {int (*f) (int a);};
4364 struct s2 {int (*f) (double a);};
4365 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4366 int argc;
4367 char **argv;
4368
4369 int
4370 main ()
4371 {
4372
4373 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4374
4375   ;
4376   return 0;
4377 }
4378 _ACEOF
4379 if ac_fn_c_try_compile "$LINENO"; then :
4380   am_cv_prog_cc_stdc="$ac_arg"; break
4381 fi
4382 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4383 done
4384 CC="$ac_save_CC"
4385
4386 fi
4387
4388 if test -z "$am_cv_prog_cc_stdc"; then
4389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4390 $as_echo "none needed" >&6; }
4391 else
4392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4393 $as_echo "$am_cv_prog_cc_stdc" >&6; }
4394 fi
4395 case "x$am_cv_prog_cc_stdc" in
4396   x|xno) ;;
4397   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4398 esac
4399
4400 # expand $ac_aux_dir to an absolute path
4401 am_aux_dir=`cd $ac_aux_dir && pwd`
4402
4403 if test x"${install_sh}" != xset; then
4404   case $am_aux_dir in
4405   *\ * | *\     *)
4406     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4407   *)
4408     install_sh="\${SHELL} $am_aux_dir/install-sh"
4409   esac
4410 fi
4411
4412 # Installed binaries are usually stripped using `strip' when the user
4413 # run `make install-strip'.  However `strip' might not be the right
4414 # tool to use in cross-compilation environments, therefore Automake
4415 # will honor the `STRIP' environment variable to overrule this program.
4416 if test "$cross_compiling" != no; then
4417   if test -n "$ac_tool_prefix"; then
4418   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4419 set dummy ${ac_tool_prefix}strip; ac_word=$2
4420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4421 $as_echo_n "checking for $ac_word... " >&6; }
4422 if test "${ac_cv_prog_STRIP+set}" = set; then :
4423   $as_echo_n "(cached) " >&6
4424 else
4425   if test -n "$STRIP"; then
4426   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4427 else
4428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4429 for as_dir in $PATH
4430 do
4431   IFS=$as_save_IFS
4432   test -z "$as_dir" && as_dir=.
4433     for ac_exec_ext in '' $ac_executable_extensions; do
4434   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4435     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4437     break 2
4438   fi
4439 done
4440   done
4441 IFS=$as_save_IFS
4442
4443 fi
4444 fi
4445 STRIP=$ac_cv_prog_STRIP
4446 if test -n "$STRIP"; then
4447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4448 $as_echo "$STRIP" >&6; }
4449 else
4450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4451 $as_echo "no" >&6; }
4452 fi
4453
4454
4455 fi
4456 if test -z "$ac_cv_prog_STRIP"; then
4457   ac_ct_STRIP=$STRIP
4458   # Extract the first word of "strip", so it can be a program name with args.
4459 set dummy strip; ac_word=$2
4460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4461 $as_echo_n "checking for $ac_word... " >&6; }
4462 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4463   $as_echo_n "(cached) " >&6
4464 else
4465   if test -n "$ac_ct_STRIP"; then
4466   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4467 else
4468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4469 for as_dir in $PATH
4470 do
4471   IFS=$as_save_IFS
4472   test -z "$as_dir" && as_dir=.
4473     for ac_exec_ext in '' $ac_executable_extensions; do
4474   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4475     ac_cv_prog_ac_ct_STRIP="strip"
4476     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4477     break 2
4478   fi
4479 done
4480   done
4481 IFS=$as_save_IFS
4482
4483 fi
4484 fi
4485 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4486 if test -n "$ac_ct_STRIP"; then
4487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4488 $as_echo "$ac_ct_STRIP" >&6; }
4489 else
4490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4491 $as_echo "no" >&6; }
4492 fi
4493
4494   if test "x$ac_ct_STRIP" = x; then
4495     STRIP=":"
4496   else
4497     case $cross_compiling:$ac_tool_warned in
4498 yes:)
4499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4500 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4501 ac_tool_warned=yes ;;
4502 esac
4503     STRIP=$ac_ct_STRIP
4504   fi
4505 else
4506   STRIP="$ac_cv_prog_STRIP"
4507 fi
4508
4509 fi
4510 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4511
4512
4513 ac_aux_dir=
4514 for ac_dir in .. "$srcdir"/..; do
4515   for ac_t in install-sh install.sh shtool; do
4516     if test -f "$ac_dir/$ac_t"; then
4517       ac_aux_dir=$ac_dir
4518       ac_install_sh="$ac_aux_dir/$ac_t -c"
4519       break 2
4520     fi
4521   done
4522 done
4523 if test -z "$ac_aux_dir"; then
4524   as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
4525 fi
4526
4527 # These three variables are undocumented and unsupported,
4528 # and are intended to be withdrawn in a future Autoconf release.
4529 # They can cause serious problems if a builder's source tree is in a directory
4530 # whose full name contains unusual characters.
4531 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4532 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4533 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4534
4535
4536
4537 test "$program_prefix" != NONE &&
4538   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4539 # Use a double $ so make ignores it.
4540 test "$program_suffix" != NONE &&
4541   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4542 # Double any \ or $.
4543 # By default was `s,x,x', remove it if useless.
4544 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4545 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4546
4547
4548 # Dependency checking.
4549 rm -rf .tst 2>/dev/null
4550 mkdir .tst 2>/dev/null
4551 if test -d .tst; then
4552   am__leading_dot=.
4553 else
4554   am__leading_dot=_
4555 fi
4556 rmdir .tst 2>/dev/null
4557
4558 DEPDIR="${am__leading_dot}deps"
4559
4560 ac_config_commands="$ac_config_commands depdir"
4561
4562
4563 depcc="$CC"   am_compiler_list=
4564
4565 am_depcomp=$ac_aux_dir/depcomp
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4567 $as_echo_n "checking dependency style of $depcc... " >&6; }
4568 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4569   $as_echo_n "(cached) " >&6
4570 else
4571   if test -f "$am_depcomp"; then
4572   # We make a subdir and do the tests there.  Otherwise we can end up
4573   # making bogus files that we don't know about and never remove.  For
4574   # instance it was reported that on HP-UX the gcc test will end up
4575   # making a dummy file named `D' -- because `-MD' means `put the output
4576   # in D'.
4577   mkdir conftest.dir
4578   # Copy depcomp to subdir because otherwise we won't find it if we're
4579   # using a relative directory.
4580   cp "$am_depcomp" conftest.dir
4581   cd conftest.dir
4582   # We will build objects and dependencies in a subdirectory because
4583   # it helps to detect inapplicable dependency modes.  For instance
4584   # both Tru64's cc and ICC support -MD to output dependencies as a
4585   # side effect of compilation, but ICC will put the dependencies in
4586   # the current directory while Tru64 will put them in the object
4587   # directory.
4588   mkdir sub
4589
4590   am_cv_CC_dependencies_compiler_type=none
4591   if test "$am_compiler_list" = ""; then
4592      am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4593   fi
4594   for depmode in $am_compiler_list; do
4595     if test $depmode = none; then break; fi
4596
4597     $as_echo "$as_me:$LINENO: trying $depmode" >&5
4598     # Setup a source with many dependencies, because some compilers
4599     # like to wrap large dependency lists on column 80 (with \), and
4600     # we should not choose a depcomp mode which is confused by this.
4601     #
4602     # We need to recreate these files for each test, as the compiler may
4603     # overwrite some of them when testing with obscure command lines.
4604     # This happens at least with the AIX C compiler.
4605     : > sub/conftest.c
4606     for i in 1 2 3 4 5 6; do
4607       echo '#include "conftst'$i'.h"' >> sub/conftest.c
4608       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4609       # Solaris 8's {/usr,}/bin/sh.
4610       touch sub/conftst$i.h
4611     done
4612     echo "include sub/conftest.Po" > confmf
4613
4614     # We check with `-c' and `-o' for the sake of the "dashmstdout"
4615     # mode.  It turns out that the SunPro C++ compiler does not properly
4616     # handle `-M -o', and we need to detect this.
4617     depcmd="depmode=$depmode \
4618        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4619        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4620        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4621     echo "| $depcmd" | sed -e 's/  */ /g' >&5
4622     if env $depcmd > conftest.err 2>&1 &&
4623        grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4624        grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4625        ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4626       # icc doesn't choke on unknown options, it will just issue warnings
4627       # or remarks (even with -Werror).  So we grep stderr for any message
4628       # that says an option was ignored or not supported.
4629       # When given -MP, icc 7.0 and 7.1 complain thusly:
4630       #   icc: Command line warning: ignoring option '-M'; no argument required
4631       # The diagnosis changed in icc 8.0:
4632       #   icc: Command line remark: option '-MP' not supported
4633       if (grep 'ignoring option' conftest.err ||
4634           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4635         am_cv_CC_dependencies_compiler_type=$depmode
4636         $as_echo "$as_me:$LINENO: success" >&5
4637         break
4638       fi
4639     fi
4640     $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
4641     sed -e 's/^/| /' < conftest.err >&5
4642   done
4643
4644   cd ..
4645   rm -rf conftest.dir
4646 else
4647   am_cv_CC_dependencies_compiler_type=none
4648 fi
4649
4650 fi
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4652 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4653 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
4654 then as_fn_error "no usable dependency style found" "$LINENO" 5
4655 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4656
4657 fi
4658
4659
4660 # Check for the 'make' the user wants to use.
4661 for ac_prog in make
4662 do
4663   # Extract the first word of "$ac_prog", so it can be a program name with args.
4664 set dummy $ac_prog; ac_word=$2
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4666 $as_echo_n "checking for $ac_word... " >&6; }
4667 if test "${ac_cv_prog_MAKE+set}" = set; then :
4668   $as_echo_n "(cached) " >&6
4669 else
4670   if test -n "$MAKE"; then
4671   ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4672 else
4673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4674 for as_dir in $PATH
4675 do
4676   IFS=$as_save_IFS
4677   test -z "$as_dir" && as_dir=.
4678     for ac_exec_ext in '' $ac_executable_extensions; do
4679   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4680     ac_cv_prog_MAKE="$ac_prog"
4681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4682     break 2
4683   fi
4684 done
4685   done
4686 IFS=$as_save_IFS
4687
4688 fi
4689 fi
4690 MAKE=$ac_cv_prog_MAKE
4691 if test -n "$MAKE"; then
4692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4693 $as_echo "$MAKE" >&6; }
4694 else
4695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696 $as_echo "no" >&6; }
4697 fi
4698
4699
4700   test -n "$MAKE" && break
4701 done
4702
4703 MAKE_IS_GNU=
4704 case "`$MAKE --version 2>&1 | sed 1q`" in
4705   *GNU*)
4706     MAKE_IS_GNU=yes
4707     ;;
4708 esac
4709  if test "$MAKE_IS_GNU" = yes; then
4710   GMAKE_TRUE=
4711   GMAKE_FALSE='#'
4712 else
4713   GMAKE_TRUE='#'
4714   GMAKE_FALSE=
4715 fi
4716
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4718 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4719 set x ${MAKE-make}
4720 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4721 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4722   $as_echo_n "(cached) " >&6
4723 else
4724   cat >conftest.make <<\_ACEOF
4725 SHELL = /bin/sh
4726 all:
4727         @echo '@@@%%%=$(MAKE)=@@@%%%'
4728 _ACEOF
4729 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4730 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4731   *@@@%%%=?*=@@@%%%*)
4732     eval ac_cv_prog_make_${ac_make}_set=yes;;
4733   *)
4734     eval ac_cv_prog_make_${ac_make}_set=no;;
4735 esac
4736 rm -f conftest.make
4737 fi
4738 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4740 $as_echo "yes" >&6; }
4741   SET_MAKE=
4742 else
4743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4744 $as_echo "no" >&6; }
4745   SET_MAKE="MAKE=${MAKE-make}"
4746 fi
4747
4748
4749 # Configure gnulib.  We need to build gnulib under some other
4750 # directory not "gnulib", to avoid the problem of both GDB and
4751 # GDBserver wanting to build it in the same directory, when building
4752 # in the source dir.
4753
4754   in_src="gnulib"
4755   in_build="build-gnulib"
4756
4757   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4758   # so they do not pile up.
4759   ac_sub_configure_args=
4760   ac_prev=
4761   eval "set x $ac_configure_args"
4762   shift
4763   for ac_arg
4764   do
4765     if test -n "$ac_prev"; then
4766       ac_prev=
4767       continue
4768     fi
4769     case $ac_arg in
4770     -cache-file | --cache-file | --cache-fil | --cache-fi \
4771     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4772       ac_prev=cache_file ;;
4773     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4774     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4775     | --c=*)
4776       ;;
4777     --config-cache | -C)
4778       ;;
4779     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4780       ac_prev=srcdir ;;
4781     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4782       ;;
4783     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4784       ac_prev=prefix ;;
4785     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4786       ;;
4787     --disable-option-checking)
4788       ;;
4789     *)
4790       case $ac_arg in
4791       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4792       esac
4793       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4794     esac
4795   done
4796
4797   # Always prepend --prefix to ensure using the same prefix
4798   # in subdir configurations.
4799   ac_arg="--prefix=$prefix"
4800   case $ac_arg in
4801   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4802   esac
4803   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4804
4805   # Pass --silent
4806   if test "$silent" = yes; then
4807     ac_sub_configure_args="--silent $ac_sub_configure_args"
4808   fi
4809
4810   # Always prepend --disable-option-checking to silence warnings, since
4811   # different subdirs can have different --enable and --with options.
4812   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4813
4814   ac_popdir=`pwd`
4815   ac_dir=$in_build
4816
4817   ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4818   $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4819   $as_echo "$ac_msg" >&6
4820   as_dir="$ac_dir"; as_fn_mkdir_p
4821
4822   case $srcdir in
4823   [\\/]* | ?:[\\/]* )
4824     ac_srcdir=$srcdir/$in_src ;;
4825   *) # Relative name.
4826     ac_srcdir=../$srcdir/$in_src ;;
4827   esac
4828
4829   cd "$ac_dir"
4830
4831   ac_sub_configure=$ac_srcdir/configure
4832
4833   # Make the cache file name correct relative to the subdirectory.
4834   case $cache_file in
4835   [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4836   *) # Relative name.
4837     ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4838   esac
4839
4840   { $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
4841 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4842   # The eval makes quoting arguments work.
4843   eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4844        --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4845     as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4846
4847   cd "$ac_popdir"
4848
4849
4850
4851 CONFIG_OBS=
4852 CONFIG_DEPS=
4853 CONFIG_SRCS=
4854 ENABLE_CFLAGS=
4855
4856 CONFIG_ALL=
4857 CONFIG_CLEAN=
4858 CONFIG_INSTALL=
4859 CONFIG_UNINSTALL=
4860
4861 # If we haven't got the data from the intl directory,
4862 # assume NLS is disabled.
4863 USE_NLS=no
4864 LIBINTL=
4865 LIBINTL_DEP=
4866 INCINTL=
4867 XGETTEXT=
4868 GMSGFMT=
4869 POSUB=
4870
4871 if test -f  ../intl/config.intl; then
4872   .  ../intl/config.intl
4873 fi
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4875 $as_echo_n "checking whether NLS is requested... " >&6; }
4876 if test x"$USE_NLS" != xyes; then
4877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4878 $as_echo "no" >&6; }
4879 else
4880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4881 $as_echo "yes" >&6; }
4882
4883 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
4884
4885
4886   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4887 $as_echo_n "checking for catalogs to be installed... " >&6; }
4888   # Look for .po and .gmo files in the source directory.
4889   CATALOGS=
4890   XLINGUAS=
4891   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4892     # If there aren't any .gmo files the shell will give us the
4893     # literal string "../path/to/srcdir/po/*.gmo" which has to be
4894     # weeded out.
4895     case "$cat" in *\**)
4896       continue;;
4897     esac
4898     # The quadruple backslash is collapsed to a double backslash
4899     # by the backticks, then collapsed again by the double quotes,
4900     # leaving us with one backslash in the sed expression (right
4901     # before the dot that mustn't act as a wildcard).
4902     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4903     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4904     # The user is allowed to set LINGUAS to a list of languages to
4905     # install catalogs for.  If it's empty that means "all of them."
4906     if test "x$LINGUAS" = x; then
4907       CATALOGS="$CATALOGS $cat"
4908       XLINGUAS="$XLINGUAS $lang"
4909     else
4910       case "$LINGUAS" in *$lang*)
4911         CATALOGS="$CATALOGS $cat"
4912         XLINGUAS="$XLINGUAS $lang"
4913         ;;
4914       esac
4915     fi
4916   done
4917   LINGUAS="$XLINGUAS"
4918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4919 $as_echo "$LINGUAS" >&6; }
4920
4921
4922     DATADIRNAME=share
4923
4924   INSTOBJEXT=.mo
4925
4926   GENCAT=gencat
4927
4928   CATOBJEXT=.gmo
4929
4930 fi
4931
4932 localedir='${datadir}/locale'
4933
4934
4935 if test x"$USE_NLS" = xyes; then
4936    CONFIG_ALL="$CONFIG_ALL all-po"
4937    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4938    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4939    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
4940 fi
4941
4942 GNULIB=build-gnulib/import
4943
4944 # For Makefile dependencies.
4945 GNULIB_STDINT_H=
4946 if test x"$STDINT_H" != x; then
4947   GNULIB_STDINT_H=$GNULIB/$STDINT_H
4948 fi
4949
4950
4951 PACKAGE=gdb
4952
4953 cat >>confdefs.h <<_ACEOF
4954 #define PACKAGE "$PACKAGE"
4955 _ACEOF
4956
4957
4958
4959 # We never need to detect it in this sub-configure.
4960 # But preserve it for config.status --recheck.
4961
4962
4963
4964 MAKEINFO_EXTRA_FLAGS=""
4965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4966 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4967 if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4968   $as_echo_n "(cached) " >&6
4969 else
4970   echo '@clicksequence{a @click{} b}' >conftest.texinfo
4971   if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4972     gdb_cv_have_makeinfo_click=yes
4973   else
4974     gdb_cv_have_makeinfo_click=no
4975   fi
4976 fi
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4978 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4979 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4980   MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4981 fi
4982
4983
4984
4985
4986 # Check whether --with-separate-debug-dir was given.
4987 if test "${with_separate_debug_dir+set}" = set; then :
4988   withval=$with_separate_debug_dir;
4989     DEBUGDIR=$withval
4990 else
4991   DEBUGDIR=${libdir}/debug
4992 fi
4993
4994
4995   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4996   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4997   ac_define_dir=`eval echo $DEBUGDIR`
4998   ac_define_dir=`eval echo $ac_define_dir`
4999
5000 cat >>confdefs.h <<_ACEOF
5001 #define DEBUGDIR "$ac_define_dir"
5002 _ACEOF
5003
5004
5005
5006
5007   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5008      if test "x$prefix" = xNONE; then
5009         test_prefix=/usr/local
5010      else
5011         test_prefix=$prefix
5012      fi
5013   else
5014      test_prefix=$exec_prefix
5015   fi
5016   value=0
5017   case ${ac_define_dir} in
5018      "${test_prefix}"|"${test_prefix}/"*|\
5019         '${exec_prefix}'|'${exec_prefix}/'*)
5020      value=1
5021      ;;
5022   esac
5023
5024 cat >>confdefs.h <<_ACEOF
5025 #define DEBUGDIR_RELOCATABLE $value
5026 _ACEOF
5027
5028
5029
5030
5031 # We can't pass paths as command line arguments.
5032 # Mingw32 tries to be clever and will convert the paths for us.
5033 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
5034 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5035 # This breaks GDB's relocatable path conversions since paths passed in
5036 # config.h would not get so translated, the path prefixes no longer match.
5037
5038   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5039   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5040   ac_define_dir=`eval echo $bindir`
5041   ac_define_dir=`eval echo $ac_define_dir`
5042
5043 cat >>confdefs.h <<_ACEOF
5044 #define BINDIR "$ac_define_dir"
5045 _ACEOF
5046
5047
5048
5049 # GDB's datadir relocation
5050
5051
5052
5053 # Check whether --with-gdb-datadir was given.
5054 if test "${with_gdb_datadir+set}" = set; then :
5055   withval=$with_gdb_datadir;
5056     GDB_DATADIR=$withval
5057 else
5058   GDB_DATADIR=${datadir}/gdb
5059 fi
5060
5061
5062   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5063   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5064   ac_define_dir=`eval echo $GDB_DATADIR`
5065   ac_define_dir=`eval echo $ac_define_dir`
5066
5067 cat >>confdefs.h <<_ACEOF
5068 #define GDB_DATADIR "$ac_define_dir"
5069 _ACEOF
5070
5071
5072
5073
5074   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5075      if test "x$prefix" = xNONE; then
5076         test_prefix=/usr/local
5077      else
5078         test_prefix=$prefix
5079      fi
5080   else
5081      test_prefix=$exec_prefix
5082   fi
5083   value=0
5084   case ${ac_define_dir} in
5085      "${test_prefix}"|"${test_prefix}/"*|\
5086         '${exec_prefix}'|'${exec_prefix}/'*)
5087      value=1
5088      ;;
5089   esac
5090
5091 cat >>confdefs.h <<_ACEOF
5092 #define GDB_DATADIR_RELOCATABLE $value
5093 _ACEOF
5094
5095
5096
5097
5098
5099 # Check whether --with-relocated-sources was given.
5100 if test "${with_relocated_sources+set}" = set; then :
5101   withval=$with_relocated_sources; reloc_srcdir="${withval}"
5102
5103   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5104   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5105   ac_define_dir=`eval echo $reloc_srcdir`
5106   ac_define_dir=`eval echo $ac_define_dir`
5107
5108 cat >>confdefs.h <<_ACEOF
5109 #define RELOC_SRCDIR "$ac_define_dir"
5110 _ACEOF
5111
5112
5113
5114 fi
5115
5116
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5118 $as_echo_n "checking for default auto-load directory... " >&6; }
5119
5120 # Check whether --with-auto-load-dir was given.
5121 if test "${with_auto_load_dir+set}" = set; then :
5122   withval=$with_auto_load_dir;
5123 else
5124   with_auto_load_dir='$debugdir:$datadir/auto-load'
5125 fi
5126
5127 escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
5128
5129   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5130   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5131   ac_define_dir=`eval echo $escape_dir`
5132   ac_define_dir=`eval echo $ac_define_dir`
5133
5134 cat >>confdefs.h <<_ACEOF
5135 #define AUTO_LOAD_DIR "$ac_define_dir"
5136 _ACEOF
5137
5138
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5140 $as_echo "$with_auto_load_dir" >&6; }
5141
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5143 $as_echo_n "checking for default auto-load safe-path... " >&6; }
5144
5145 # Check whether --with-auto-load-safe-path was given.
5146 if test "${with_auto_load_safe_path+set}" = set; then :
5147   withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
5148      with_auto_load_safe_path="/"
5149      fi
5150 else
5151   with_auto_load_safe_path="$with_auto_load_dir"
5152 fi
5153
5154 escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
5155
5156   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5157   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5158   ac_define_dir=`eval echo $escape_dir`
5159   ac_define_dir=`eval echo $ac_define_dir`
5160
5161 cat >>confdefs.h <<_ACEOF
5162 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
5163 _ACEOF
5164
5165
5166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5167 $as_echo "$with_auto_load_safe_path" >&6; }
5168
5169
5170
5171 subdirs="$subdirs testsuite"
5172
5173
5174 # Check whether to support alternative target configurations
5175 # Check whether --enable-targets was given.
5176 if test "${enable_targets+set}" = set; then :
5177   enableval=$enable_targets; case "${enableval}" in
5178   yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
5179             ;;
5180   no)       enable_targets= ;;
5181   *)        enable_targets=$enableval ;;
5182 esac
5183 fi
5184
5185
5186 # Check whether to enable 64-bit support on 32-bit hosts
5187 # Check whether --enable-64-bit-bfd was given.
5188 if test "${enable_64_bit_bfd+set}" = set; then :
5189   enableval=$enable_64_bit_bfd; case "${enableval}" in
5190   yes)  want64=true  ;;
5191   no)   want64=false ;;
5192   *)    as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
5193 esac
5194 else
5195   want64=false
5196 fi
5197
5198 # Provide defaults for some variables set by the per-host and per-target
5199 # configuration.
5200 gdb_host_obs=posix-hdep.o
5201
5202 if test "${target}" = "${host}"; then
5203   gdb_native=yes
5204 else
5205   gdb_native=no
5206 fi
5207
5208 . $srcdir/configure.host
5209
5210 # Accumulate some settings from configure.tgt over all enabled targets
5211
5212 TARGET_OBS=
5213 all_targets=
5214 HAVE_NATIVE_GCORE_TARGET=
5215
5216 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
5217 do
5218   if test "$targ_alias" = "all"; then
5219     all_targets=true
5220   else
5221     # Canonicalize the secondary target names.
5222     result=`$ac_config_sub $targ_alias 2>/dev/null`
5223     if test -n "$result"; then
5224         targ=$result
5225     else
5226         targ=$targ_alias
5227     fi
5228
5229     . ${srcdir}/configure.tgt
5230
5231     if test -z "${gdb_target_obs}"; then :
5232   as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5233 fi
5234
5235     # Target-specific object files
5236     for i in ${gdb_target_obs}; do
5237         case " $TARGET_OBS " in
5238         *" ${i} "*) ;;
5239         *)
5240           TARGET_OBS="$TARGET_OBS ${i}"
5241           ;;
5242         esac
5243     done
5244
5245     # Check whether this target needs 64-bit CORE_ADDR
5246     if test x${want64} = xfalse; then
5247       . ${srcdir}/../bfd/config.bfd
5248     fi
5249
5250     # Check whether this target is native and supports gcore.
5251     if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5252        && $gdb_have_gcore; then
5253       HAVE_NATIVE_GCORE_TARGET=1
5254     fi
5255   fi
5256 done
5257
5258 if test x${all_targets} = xtrue; then
5259
5260   # We want all 64-bit targets if we either:
5261   #  - run on a 64-bit host  or
5262   #  - already require 64-bit support for some other target  or
5263   #  - the --enable-64-bit-bfd option was supplied
5264   # Otherwise we only support all 32-bit targets.
5265   #
5266   # NOTE: This test must be in sync with the corresponding
5267   #       tests in BFD!
5268
5269   if test x${want64} = xfalse; then
5270     # The cast to long int works around a bug in the HP C Compiler
5271 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5272 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5273 # This bug is HP SR number 8606223364.
5274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5275 $as_echo_n "checking size of long... " >&6; }
5276 if test "${ac_cv_sizeof_long+set}" = set; then :
5277   $as_echo_n "(cached) " >&6
5278 else
5279   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
5280
5281 else
5282   if test "$ac_cv_type_long" = yes; then
5283      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5284 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5285 { as_fn_set_status 77
5286 as_fn_error "cannot compute sizeof (long)
5287 See \`config.log' for more details." "$LINENO" 5; }; }
5288    else
5289      ac_cv_sizeof_long=0
5290    fi
5291 fi
5292
5293 fi
5294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5295 $as_echo "$ac_cv_sizeof_long" >&6; }
5296
5297
5298
5299 cat >>confdefs.h <<_ACEOF
5300 #define SIZEOF_LONG $ac_cv_sizeof_long
5301 _ACEOF
5302
5303
5304     if test "x${ac_cv_sizeof_long}" = "x8"; then
5305       want64=true
5306     fi
5307   fi
5308   if test x${want64} = xtrue; then
5309     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5310   else
5311     TARGET_OBS='$(ALL_TARGET_OBS)'
5312   fi
5313 fi
5314
5315
5316
5317
5318 # For other settings, only the main target counts.
5319 gdb_sim=
5320 gdb_osabi=
5321 build_gdbserver=
5322 targ=$target; . ${srcdir}/configure.tgt
5323
5324 # Fetch the default architecture and default target vector from BFD.
5325 targ=$target; . $srcdir/../bfd/config.bfd
5326
5327 # We only want the first architecture, so strip off the others if
5328 # there is more than one.
5329 targ_archs=`echo $targ_archs | sed 's/ .*//'`
5330
5331 if test "x$targ_archs" != x; then
5332
5333 cat >>confdefs.h <<_ACEOF
5334 #define DEFAULT_BFD_ARCH $targ_archs
5335 _ACEOF
5336
5337 fi
5338 if test "x$targ_defvec" != x; then
5339
5340 cat >>confdefs.h <<_ACEOF
5341 #define DEFAULT_BFD_VEC $targ_defvec
5342 _ACEOF
5343
5344 fi
5345
5346 # The CLI cannot be disabled yet, but may be in the future.
5347
5348 # Enable CLI.
5349 # Check whether --enable-gdbcli was given.
5350 if test "${enable_gdbcli+set}" = set; then :
5351   enableval=$enable_gdbcli; case $enableval in
5352     yes)
5353       ;;
5354     no)
5355       as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
5356     *)
5357       as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
5358   esac
5359 else
5360   enable_gdbcli=yes
5361 fi
5362
5363 if test x"$enable_gdbcli" = xyes; then
5364   if test -d $srcdir/cli; then
5365     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5366     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5367     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5368     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5369   fi
5370 fi
5371
5372 # Enable MI.
5373 # Check whether --enable-gdbmi was given.
5374 if test "${enable_gdbmi+set}" = set; then :
5375   enableval=$enable_gdbmi; case $enableval in
5376     yes | no)
5377       ;;
5378     *)
5379       as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
5380   esac
5381 else
5382   enable_gdbmi=yes
5383 fi
5384
5385 if test x"$enable_gdbmi" = xyes; then
5386   if test -d $srcdir/mi; then
5387     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5388     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5389     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5390     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5391   fi
5392 fi
5393
5394 # Enable TUI.
5395 # Check whether --enable-tui was given.
5396 if test "${enable_tui+set}" = set; then :
5397   enableval=$enable_tui; case $enableval in
5398     yes | no | auto)
5399       ;;
5400     *)
5401       as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
5402   esac
5403 else
5404   enable_tui=auto
5405 fi
5406
5407
5408 # Enable gdbtk.
5409 # Check whether --enable-gdbtk was given.
5410 if test "${enable_gdbtk+set}" = set; then :
5411   enableval=$enable_gdbtk; case $enableval in
5412     yes | no)
5413       ;;
5414     *)
5415       as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
5416   esac
5417 else
5418   if test -d $srcdir/gdbtk; then
5419     enable_gdbtk=yes
5420   else
5421     enable_gdbtk=no
5422   fi
5423 fi
5424
5425 # We unconditionally disable gdbtk tests on selected platforms.
5426 case $host_os in
5427   go32* | windows*)
5428     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5429 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
5430     enable_gdbtk=no ;;
5431 esac
5432
5433 # Libunwind support for ia64.
5434
5435
5436 # Check whether --with-libunwind-ia64 was given.
5437 if test "${with_libunwind_ia64+set}" = set; then :
5438   withval=$with_libunwind_ia64;
5439 else
5440   with_libunwind_ia64=auto
5441 fi
5442
5443
5444 # Backward compatibility option.
5445 if test "${with_libunwind+set}" = set; then
5446   if test x"$with_libunwind_ia64" != xauto; then
5447     as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5448   fi
5449   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5450 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5451   with_libunwind_ia64="$with_libunwind"
5452 fi
5453
5454 case "$with_libunwind_ia64" in
5455   yes | no)
5456     ;;
5457   auto)
5458     for ac_header in libunwind-ia64.h
5459 do :
5460   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5461 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
5462   cat >>confdefs.h <<_ACEOF
5463 #define HAVE_LIBUNWIND_IA64_H 1
5464 _ACEOF
5465
5466 fi
5467
5468 done
5469
5470     with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5471     ;;
5472   *)
5473     as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5474     ;;
5475 esac
5476
5477 if test x"$with_libunwind_ia64" = xyes; then
5478   for ac_header in libunwind-ia64.h
5479 do :
5480   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5481 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
5482   cat >>confdefs.h <<_ACEOF
5483 #define HAVE_LIBUNWIND_IA64_H 1
5484 _ACEOF
5485
5486 fi
5487
5488 done
5489
5490   if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5491     as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5492   fi
5493   CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5494   CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5495   CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
5496 fi
5497
5498 opt_curses=no
5499
5500 # Check whether --with-curses was given.
5501 if test "${with_curses+set}" = set; then :
5502   withval=$with_curses; opt_curses=$withval
5503 fi
5504
5505
5506 prefer_curses=no
5507 if test "$opt_curses" = "yes"; then
5508   prefer_curses=yes
5509 fi
5510
5511 # Profiling support.
5512 # Check whether --enable-profiling was given.
5513 if test "${enable_profiling+set}" = set; then :
5514   enableval=$enable_profiling; case $enableval in
5515     yes | no)
5516       ;;
5517     *)
5518       as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
5519   esac
5520 else
5521   enable_profiling=no
5522 fi
5523
5524
5525 for ac_func in monstartup _mcleanup
5526 do :
5527   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5528 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5529 eval as_val=\$$as_ac_var
5530    if test "x$as_val" = x""yes; then :
5531   cat >>confdefs.h <<_ACEOF
5532 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5533 _ACEOF
5534
5535 fi
5536 done
5537
5538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5539 $as_echo_n "checking for _etext... " >&6; }
5540 if test "${ac_cv_var__etext+set}" = set; then :
5541   $as_echo_n "(cached) " >&6
5542 else
5543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5544 /* end confdefs.h.  */
5545 #include <stdlib.h>
5546 extern char _etext;
5547
5548 int
5549 main ()
5550 {
5551 free (&_etext);
5552   ;
5553   return 0;
5554 }
5555 _ACEOF
5556 if ac_fn_c_try_link "$LINENO"; then :
5557   ac_cv_var__etext=yes
5558 else
5559   ac_cv_var__etext=no
5560 fi
5561 rm -f core conftest.err conftest.$ac_objext \
5562     conftest$ac_exeext conftest.$ac_ext
5563 fi
5564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5565 $as_echo "$ac_cv_var__etext" >&6; }
5566 if test $ac_cv_var__etext = yes; then
5567
5568 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
5569
5570 fi
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5572 $as_echo_n "checking for etext... " >&6; }
5573 if test "${ac_cv_var_etext+set}" = set; then :
5574   $as_echo_n "(cached) " >&6
5575 else
5576   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5577 /* end confdefs.h.  */
5578 #include <stdlib.h>
5579 extern char etext;
5580
5581 int
5582 main ()
5583 {
5584 free (&etext);
5585   ;
5586   return 0;
5587 }
5588 _ACEOF
5589 if ac_fn_c_try_link "$LINENO"; then :
5590   ac_cv_var_etext=yes
5591 else
5592   ac_cv_var_etext=no
5593 fi
5594 rm -f core conftest.err conftest.$ac_objext \
5595     conftest$ac_exeext conftest.$ac_ext
5596 fi
5597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5598 $as_echo "$ac_cv_var_etext" >&6; }
5599 if test $ac_cv_var_etext = yes; then
5600
5601 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
5602
5603 fi
5604 if test "$enable_profiling" = yes ; then
5605   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
5606     as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
5607   fi
5608   PROFILE_CFLAGS=-pg
5609   OLD_CFLAGS="$CFLAGS"
5610   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
5611
5612   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5613 $as_echo_n "checking whether $CC supports -pg... " >&6; }
5614 if test "${ac_cv_cc_supports_pg+set}" = set; then :
5615   $as_echo_n "(cached) " >&6
5616 else
5617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5618 /* end confdefs.h.  */
5619
5620 int
5621 main ()
5622 {
5623 int x;
5624   ;
5625   return 0;
5626 }
5627 _ACEOF
5628 if ac_fn_c_try_compile "$LINENO"; then :
5629   ac_cv_cc_supports_pg=yes
5630 else
5631   ac_cv_cc_supports_pg=no
5632 fi
5633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5634 fi
5635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5636 $as_echo "$ac_cv_cc_supports_pg" >&6; }
5637
5638   if test $ac_cv_cc_supports_pg = no; then
5639     as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
5640   fi
5641
5642   CFLAGS="$OLD_CFLAGS"
5643 fi
5644
5645
5646
5647 # Check whether --with-pkgversion was given.
5648 if test "${with_pkgversion+set}" = set; then :
5649   withval=$with_pkgversion; case "$withval" in
5650       yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
5651       no)  PKGVERSION= ;;
5652       *)   PKGVERSION="($withval) " ;;
5653      esac
5654 else
5655   PKGVERSION="(GDB) "
5656
5657 fi
5658
5659
5660
5661
5662
5663 # Check whether --with-bugurl was given.
5664 if test "${with_bugurl+set}" = set; then :
5665   withval=$with_bugurl; case "$withval" in
5666       yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
5667       no)  BUGURL=
5668            ;;
5669       *)   BUGURL="$withval"
5670            ;;
5671      esac
5672 else
5673   BUGURL="http://www.gnu.org/software/gdb/bugs/"
5674
5675 fi
5676
5677   case ${BUGURL} in
5678   "")
5679     REPORT_BUGS_TO=
5680     REPORT_BUGS_TEXI=
5681     ;;
5682   *)
5683     REPORT_BUGS_TO="<$BUGURL>"
5684     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5685     ;;
5686   esac;
5687
5688
5689
5690
5691 cat >>confdefs.h <<_ACEOF
5692 #define PKGVERSION "$PKGVERSION"
5693 _ACEOF
5694
5695
5696 cat >>confdefs.h <<_ACEOF
5697 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5698 _ACEOF
5699
5700
5701 # --------------------- #
5702 # Checks for programs.  #
5703 # --------------------- #
5704
5705 for ac_prog in gawk mawk nawk awk
5706 do
5707   # Extract the first word of "$ac_prog", so it can be a program name with args.
5708 set dummy $ac_prog; ac_word=$2
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710 $as_echo_n "checking for $ac_word... " >&6; }
5711 if test "${ac_cv_prog_AWK+set}" = set; then :
5712   $as_echo_n "(cached) " >&6
5713 else
5714   if test -n "$AWK"; then
5715   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5716 else
5717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5718 for as_dir in $PATH
5719 do
5720   IFS=$as_save_IFS
5721   test -z "$as_dir" && as_dir=.
5722     for ac_exec_ext in '' $ac_executable_extensions; do
5723   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5724     ac_cv_prog_AWK="$ac_prog"
5725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5726     break 2
5727   fi
5728 done
5729   done
5730 IFS=$as_save_IFS
5731
5732 fi
5733 fi
5734 AWK=$ac_cv_prog_AWK
5735 if test -n "$AWK"; then
5736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5737 $as_echo "$AWK" >&6; }
5738 else
5739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5740 $as_echo "no" >&6; }
5741 fi
5742
5743
5744   test -n "$AWK" && break
5745 done
5746
5747 # Find a good install program.  We prefer a C program (faster),
5748 # so one script is as good as another.  But avoid the broken or
5749 # incompatible versions:
5750 # SysV /etc/install, /usr/sbin/install
5751 # SunOS /usr/etc/install
5752 # IRIX /sbin/install
5753 # AIX /bin/install
5754 # AmigaOS /C/install, which installs bootblocks on floppy discs
5755 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5756 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
5757 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5758 # OS/2's system install, which has a completely different semantic
5759 # ./install, which can be erroneously created by make from ./install.sh.
5760 # Reject install programs that cannot install multiple files.
5761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5762 $as_echo_n "checking for a BSD-compatible install... " >&6; }
5763 if test -z "$INSTALL"; then
5764 if test "${ac_cv_path_install+set}" = set; then :
5765   $as_echo_n "(cached) " >&6
5766 else
5767   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5768 for as_dir in $PATH
5769 do
5770   IFS=$as_save_IFS
5771   test -z "$as_dir" && as_dir=.
5772     # Account for people who put trailing slashes in PATH elements.
5773 case $as_dir/ in #((
5774   ./ | .// | /[cC]/* | \
5775   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5776   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5777   /usr/ucb/* ) ;;
5778   *)
5779     # OSF1 and SCO ODT 3.0 have their own names for install.
5780     # Don't use installbsd from OSF since it installs stuff as root
5781     # by default.
5782     for ac_prog in ginstall scoinst install; do
5783       for ac_exec_ext in '' $ac_executable_extensions; do
5784         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5785           if test $ac_prog = install &&
5786             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5787             # AIX install.  It has an incompatible calling convention.
5788             :
5789           elif test $ac_prog = install &&
5790             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5791             # program-specific install script used by HP pwplus--don't use.
5792             :
5793           else
5794             rm -rf conftest.one conftest.two conftest.dir
5795             echo one > conftest.one
5796             echo two > conftest.two
5797             mkdir conftest.dir
5798             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5799               test -s conftest.one && test -s conftest.two &&
5800               test -s conftest.dir/conftest.one &&
5801               test -s conftest.dir/conftest.two
5802             then
5803               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5804               break 3
5805             fi
5806           fi
5807         fi
5808       done
5809     done
5810     ;;
5811 esac
5812
5813   done
5814 IFS=$as_save_IFS
5815
5816 rm -rf conftest.one conftest.two conftest.dir
5817
5818 fi
5819   if test "${ac_cv_path_install+set}" = set; then
5820     INSTALL=$ac_cv_path_install
5821   else
5822     # As a last resort, use the slow shell script.  Don't cache a
5823     # value for INSTALL within a source directory, because that will
5824     # break other packages using the cache if that directory is
5825     # removed, or if the value is a relative name.
5826     INSTALL=$ac_install_sh
5827   fi
5828 fi
5829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5830 $as_echo "$INSTALL" >&6; }
5831
5832 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5833 # It thinks the first close brace ends the variable substitution.
5834 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5835
5836 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5837
5838 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5839
5840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5841 $as_echo_n "checking whether ln -s works... " >&6; }
5842 LN_S=$as_ln_s
5843 if test "$LN_S" = "ln -s"; then
5844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5845 $as_echo "yes" >&6; }
5846 else
5847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5848 $as_echo "no, using $LN_S" >&6; }
5849 fi
5850
5851 if test -n "$ac_tool_prefix"; then
5852   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5853 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5855 $as_echo_n "checking for $ac_word... " >&6; }
5856 if test "${ac_cv_prog_RANLIB+set}" = set; then :
5857   $as_echo_n "(cached) " >&6
5858 else
5859   if test -n "$RANLIB"; then
5860   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5861 else
5862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5863 for as_dir in $PATH
5864 do
5865   IFS=$as_save_IFS
5866   test -z "$as_dir" && as_dir=.
5867     for ac_exec_ext in '' $ac_executable_extensions; do
5868   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5869     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5871     break 2
5872   fi
5873 done
5874   done
5875 IFS=$as_save_IFS
5876
5877 fi
5878 fi
5879 RANLIB=$ac_cv_prog_RANLIB
5880 if test -n "$RANLIB"; then
5881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5882 $as_echo "$RANLIB" >&6; }
5883 else
5884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885 $as_echo "no" >&6; }
5886 fi
5887
5888
5889 fi
5890 if test -z "$ac_cv_prog_RANLIB"; then
5891   ac_ct_RANLIB=$RANLIB
5892   # Extract the first word of "ranlib", so it can be a program name with args.
5893 set dummy ranlib; ac_word=$2
5894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5895 $as_echo_n "checking for $ac_word... " >&6; }
5896 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5897   $as_echo_n "(cached) " >&6
5898 else
5899   if test -n "$ac_ct_RANLIB"; then
5900   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5901 else
5902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5903 for as_dir in $PATH
5904 do
5905   IFS=$as_save_IFS
5906   test -z "$as_dir" && as_dir=.
5907     for ac_exec_ext in '' $ac_executable_extensions; do
5908   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5909     ac_cv_prog_ac_ct_RANLIB="ranlib"
5910     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5911     break 2
5912   fi
5913 done
5914   done
5915 IFS=$as_save_IFS
5916
5917 fi
5918 fi
5919 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5920 if test -n "$ac_ct_RANLIB"; then
5921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5922 $as_echo "$ac_ct_RANLIB" >&6; }
5923 else
5924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5925 $as_echo "no" >&6; }
5926 fi
5927
5928   if test "x$ac_ct_RANLIB" = x; then
5929     RANLIB=":"
5930   else
5931     case $cross_compiling:$ac_tool_warned in
5932 yes:)
5933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5934 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5935 ac_tool_warned=yes ;;
5936 esac
5937     RANLIB=$ac_ct_RANLIB
5938   fi
5939 else
5940   RANLIB="$ac_cv_prog_RANLIB"
5941 fi
5942
5943 for ac_prog in 'bison -y' byacc
5944 do
5945   # Extract the first word of "$ac_prog", so it can be a program name with args.
5946 set dummy $ac_prog; ac_word=$2
5947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5948 $as_echo_n "checking for $ac_word... " >&6; }
5949 if test "${ac_cv_prog_YACC+set}" = set; then :
5950   $as_echo_n "(cached) " >&6
5951 else
5952   if test -n "$YACC"; then
5953   ac_cv_prog_YACC="$YACC" # Let the user override the test.
5954 else
5955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956 for as_dir in $PATH
5957 do
5958   IFS=$as_save_IFS
5959   test -z "$as_dir" && as_dir=.
5960     for ac_exec_ext in '' $ac_executable_extensions; do
5961   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5962     ac_cv_prog_YACC="$ac_prog"
5963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5964     break 2
5965   fi
5966 done
5967   done
5968 IFS=$as_save_IFS
5969
5970 fi
5971 fi
5972 YACC=$ac_cv_prog_YACC
5973 if test -n "$YACC"; then
5974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5975 $as_echo "$YACC" >&6; }
5976 else
5977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5978 $as_echo "no" >&6; }
5979 fi
5980
5981
5982   test -n "$YACC" && break
5983 done
5984 test -n "$YACC" || YACC="yacc"
5985
5986
5987 if test -n "$ac_tool_prefix"; then
5988   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5989 set dummy ${ac_tool_prefix}ar; ac_word=$2
5990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991 $as_echo_n "checking for $ac_word... " >&6; }
5992 if test "${ac_cv_prog_AR+set}" = set; then :
5993   $as_echo_n "(cached) " >&6
5994 else
5995   if test -n "$AR"; then
5996   ac_cv_prog_AR="$AR" # Let the user override the test.
5997 else
5998 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5999 for as_dir in $PATH
6000 do
6001   IFS=$as_save_IFS
6002   test -z "$as_dir" && as_dir=.
6003     for ac_exec_ext in '' $ac_executable_extensions; do
6004   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6005     ac_cv_prog_AR="${ac_tool_prefix}ar"
6006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6007     break 2
6008   fi
6009 done
6010   done
6011 IFS=$as_save_IFS
6012
6013 fi
6014 fi
6015 AR=$ac_cv_prog_AR
6016 if test -n "$AR"; then
6017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6018 $as_echo "$AR" >&6; }
6019 else
6020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021 $as_echo "no" >&6; }
6022 fi
6023
6024
6025 fi
6026 if test -z "$ac_cv_prog_AR"; then
6027   ac_ct_AR=$AR
6028   # Extract the first word of "ar", so it can be a program name with args.
6029 set dummy ar; ac_word=$2
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031 $as_echo_n "checking for $ac_word... " >&6; }
6032 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6033   $as_echo_n "(cached) " >&6
6034 else
6035   if test -n "$ac_ct_AR"; then
6036   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6037 else
6038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6039 for as_dir in $PATH
6040 do
6041   IFS=$as_save_IFS
6042   test -z "$as_dir" && as_dir=.
6043     for ac_exec_ext in '' $ac_executable_extensions; do
6044   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6045     ac_cv_prog_ac_ct_AR="ar"
6046     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6047     break 2
6048   fi
6049 done
6050   done
6051 IFS=$as_save_IFS
6052
6053 fi
6054 fi
6055 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6056 if test -n "$ac_ct_AR"; then
6057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6058 $as_echo "$ac_ct_AR" >&6; }
6059 else
6060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6061 $as_echo "no" >&6; }
6062 fi
6063
6064   if test "x$ac_ct_AR" = x; then
6065     AR=""
6066   else
6067     case $cross_compiling:$ac_tool_warned in
6068 yes:)
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6070 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6071 ac_tool_warned=yes ;;
6072 esac
6073     AR=$ac_ct_AR
6074   fi
6075 else
6076   AR="$ac_cv_prog_AR"
6077 fi
6078
6079 if test -n "$ac_tool_prefix"; then
6080   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6081 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6083 $as_echo_n "checking for $ac_word... " >&6; }
6084 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6085   $as_echo_n "(cached) " >&6
6086 else
6087   if test -n "$DLLTOOL"; then
6088   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6089 else
6090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6091 for as_dir in $PATH
6092 do
6093   IFS=$as_save_IFS
6094   test -z "$as_dir" && as_dir=.
6095     for ac_exec_ext in '' $ac_executable_extensions; do
6096   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6097     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6099     break 2
6100   fi
6101 done
6102   done
6103 IFS=$as_save_IFS
6104
6105 fi
6106 fi
6107 DLLTOOL=$ac_cv_prog_DLLTOOL
6108 if test -n "$DLLTOOL"; then
6109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6110 $as_echo "$DLLTOOL" >&6; }
6111 else
6112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6113 $as_echo "no" >&6; }
6114 fi
6115
6116
6117 fi
6118 if test -z "$ac_cv_prog_DLLTOOL"; then
6119   ac_ct_DLLTOOL=$DLLTOOL
6120   # Extract the first word of "dlltool", so it can be a program name with args.
6121 set dummy dlltool; ac_word=$2
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6123 $as_echo_n "checking for $ac_word... " >&6; }
6124 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6125   $as_echo_n "(cached) " >&6
6126 else
6127   if test -n "$ac_ct_DLLTOOL"; then
6128   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6129 else
6130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6131 for as_dir in $PATH
6132 do
6133   IFS=$as_save_IFS
6134   test -z "$as_dir" && as_dir=.
6135     for ac_exec_ext in '' $ac_executable_extensions; do
6136   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6137     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6139     break 2
6140   fi
6141 done
6142   done
6143 IFS=$as_save_IFS
6144
6145 fi
6146 fi
6147 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6148 if test -n "$ac_ct_DLLTOOL"; then
6149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6150 $as_echo "$ac_ct_DLLTOOL" >&6; }
6151 else
6152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6153 $as_echo "no" >&6; }
6154 fi
6155
6156   if test "x$ac_ct_DLLTOOL" = x; then
6157     DLLTOOL=""
6158   else
6159     case $cross_compiling:$ac_tool_warned in
6160 yes:)
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6162 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6163 ac_tool_warned=yes ;;
6164 esac
6165     DLLTOOL=$ac_ct_DLLTOOL
6166   fi
6167 else
6168   DLLTOOL="$ac_cv_prog_DLLTOOL"
6169 fi
6170
6171 if test -n "$ac_tool_prefix"; then
6172   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6173 set dummy ${ac_tool_prefix}windres; ac_word=$2
6174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6175 $as_echo_n "checking for $ac_word... " >&6; }
6176 if test "${ac_cv_prog_WINDRES+set}" = set; then :
6177   $as_echo_n "(cached) " >&6
6178 else
6179   if test -n "$WINDRES"; then
6180   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6181 else
6182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183 for as_dir in $PATH
6184 do
6185   IFS=$as_save_IFS
6186   test -z "$as_dir" && as_dir=.
6187     for ac_exec_ext in '' $ac_executable_extensions; do
6188   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6189     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6191     break 2
6192   fi
6193 done
6194   done
6195 IFS=$as_save_IFS
6196
6197 fi
6198 fi
6199 WINDRES=$ac_cv_prog_WINDRES
6200 if test -n "$WINDRES"; then
6201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6202 $as_echo "$WINDRES" >&6; }
6203 else
6204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205 $as_echo "no" >&6; }
6206 fi
6207
6208
6209 fi
6210 if test -z "$ac_cv_prog_WINDRES"; then
6211   ac_ct_WINDRES=$WINDRES
6212   # Extract the first word of "windres", so it can be a program name with args.
6213 set dummy windres; ac_word=$2
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6215 $as_echo_n "checking for $ac_word... " >&6; }
6216 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6217   $as_echo_n "(cached) " >&6
6218 else
6219   if test -n "$ac_ct_WINDRES"; then
6220   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6221 else
6222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6223 for as_dir in $PATH
6224 do
6225   IFS=$as_save_IFS
6226   test -z "$as_dir" && as_dir=.
6227     for ac_exec_ext in '' $ac_executable_extensions; do
6228   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6229     ac_cv_prog_ac_ct_WINDRES="windres"
6230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6231     break 2
6232   fi
6233 done
6234   done
6235 IFS=$as_save_IFS
6236
6237 fi
6238 fi
6239 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6240 if test -n "$ac_ct_WINDRES"; then
6241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6242 $as_echo "$ac_ct_WINDRES" >&6; }
6243 else
6244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6245 $as_echo "no" >&6; }
6246 fi
6247
6248   if test "x$ac_ct_WINDRES" = x; then
6249     WINDRES=""
6250   else
6251     case $cross_compiling:$ac_tool_warned in
6252 yes:)
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6254 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6255 ac_tool_warned=yes ;;
6256 esac
6257     WINDRES=$ac_ct_WINDRES
6258   fi
6259 else
6260   WINDRES="$ac_cv_prog_WINDRES"
6261 fi
6262
6263
6264 case $host_os in
6265   gnu*)
6266     # Needed for GNU Hurd hosts.
6267     if test -n "$ac_tool_prefix"; then
6268   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6269 set dummy ${ac_tool_prefix}mig; ac_word=$2
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6271 $as_echo_n "checking for $ac_word... " >&6; }
6272 if test "${ac_cv_prog_MIG+set}" = set; then :
6273   $as_echo_n "(cached) " >&6
6274 else
6275   if test -n "$MIG"; then
6276   ac_cv_prog_MIG="$MIG" # Let the user override the test.
6277 else
6278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6279 for as_dir in $PATH
6280 do
6281   IFS=$as_save_IFS
6282   test -z "$as_dir" && as_dir=.
6283     for ac_exec_ext in '' $ac_executable_extensions; do
6284   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6285     ac_cv_prog_MIG="${ac_tool_prefix}mig"
6286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6287     break 2
6288   fi
6289 done
6290   done
6291 IFS=$as_save_IFS
6292
6293 fi
6294 fi
6295 MIG=$ac_cv_prog_MIG
6296 if test -n "$MIG"; then
6297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6298 $as_echo "$MIG" >&6; }
6299 else
6300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6301 $as_echo "no" >&6; }
6302 fi
6303
6304
6305 fi
6306 if test -z "$ac_cv_prog_MIG"; then
6307   ac_ct_MIG=$MIG
6308   # Extract the first word of "mig", so it can be a program name with args.
6309 set dummy mig; ac_word=$2
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6311 $as_echo_n "checking for $ac_word... " >&6; }
6312 if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6313   $as_echo_n "(cached) " >&6
6314 else
6315   if test -n "$ac_ct_MIG"; then
6316   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6317 else
6318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6319 for as_dir in $PATH
6320 do
6321   IFS=$as_save_IFS
6322   test -z "$as_dir" && as_dir=.
6323     for ac_exec_ext in '' $ac_executable_extensions; do
6324   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6325     ac_cv_prog_ac_ct_MIG="mig"
6326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6327     break 2
6328   fi
6329 done
6330   done
6331 IFS=$as_save_IFS
6332
6333 fi
6334 fi
6335 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6336 if test -n "$ac_ct_MIG"; then
6337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6338 $as_echo "$ac_ct_MIG" >&6; }
6339 else
6340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6341 $as_echo "no" >&6; }
6342 fi
6343
6344   if test "x$ac_ct_MIG" = x; then
6345     MIG=""
6346   else
6347     case $cross_compiling:$ac_tool_warned in
6348 yes:)
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6350 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6351 ac_tool_warned=yes ;;
6352 esac
6353     MIG=$ac_ct_MIG
6354   fi
6355 else
6356   MIG="$ac_cv_prog_MIG"
6357 fi
6358
6359     if test x"$MIG" = x; then
6360       as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6361     fi
6362     ;;
6363 esac
6364
6365 # ---------------------- #
6366 # Checks for libraries.  #
6367 # ---------------------- #
6368
6369 # We might need to link with -lm; most simulators need it.
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6371 $as_echo_n "checking for main in -lm... " >&6; }
6372 if test "${ac_cv_lib_m_main+set}" = set; then :
6373   $as_echo_n "(cached) " >&6
6374 else
6375   ac_check_lib_save_LIBS=$LIBS
6376 LIBS="-lm  $LIBS"
6377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6378 /* end confdefs.h.  */
6379
6380
6381 int
6382 main ()
6383 {
6384 return main ();
6385   ;
6386   return 0;
6387 }
6388 _ACEOF
6389 if ac_fn_c_try_link "$LINENO"; then :
6390   ac_cv_lib_m_main=yes
6391 else
6392   ac_cv_lib_m_main=no
6393 fi
6394 rm -f core conftest.err conftest.$ac_objext \
6395     conftest$ac_exeext conftest.$ac_ext
6396 LIBS=$ac_check_lib_save_LIBS
6397 fi
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6399 $as_echo "$ac_cv_lib_m_main" >&6; }
6400 if test "x$ac_cv_lib_m_main" = x""yes; then :
6401   cat >>confdefs.h <<_ACEOF
6402 #define HAVE_LIBM 1
6403 _ACEOF
6404
6405   LIBS="-lm $LIBS"
6406
6407 fi
6408
6409
6410 # We need to link with -lw to get `wctype' on Solaris before Solaris
6411 # 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
6412 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6413 # is known to have this problem).  Therefore we avoid libw if we can.
6414 ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6415 if test "x$ac_cv_func_wctype" = x""yes; then :
6416
6417 else
6418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6419 $as_echo_n "checking for wctype in -lw... " >&6; }
6420 if test "${ac_cv_lib_w_wctype+set}" = set; then :
6421   $as_echo_n "(cached) " >&6
6422 else
6423   ac_check_lib_save_LIBS=$LIBS
6424 LIBS="-lw  $LIBS"
6425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6426 /* end confdefs.h.  */
6427
6428 /* Override any GCC internal prototype to avoid an error.
6429    Use char because int might match the return type of a GCC
6430    builtin and then its argument prototype would still apply.  */
6431 #ifdef __cplusplus
6432 extern "C"
6433 #endif
6434 char wctype ();
6435 int
6436 main ()
6437 {
6438 return wctype ();
6439   ;
6440   return 0;
6441 }
6442 _ACEOF
6443 if ac_fn_c_try_link "$LINENO"; then :
6444   ac_cv_lib_w_wctype=yes
6445 else
6446   ac_cv_lib_w_wctype=no
6447 fi
6448 rm -f core conftest.err conftest.$ac_objext \
6449     conftest$ac_exeext conftest.$ac_ext
6450 LIBS=$ac_check_lib_save_LIBS
6451 fi
6452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6453 $as_echo "$ac_cv_lib_w_wctype" >&6; }
6454 if test "x$ac_cv_lib_w_wctype" = x""yes; then :
6455   cat >>confdefs.h <<_ACEOF
6456 #define HAVE_LIBW 1
6457 _ACEOF
6458
6459   LIBS="-lw $LIBS"
6460
6461 fi
6462
6463 fi
6464
6465
6466 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6468 $as_echo_n "checking for library containing gethostbyname... " >&6; }
6469 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6470   $as_echo_n "(cached) " >&6
6471 else
6472   ac_func_search_save_LIBS=$LIBS
6473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6474 /* end confdefs.h.  */
6475
6476 /* Override any GCC internal prototype to avoid an error.
6477    Use char because int might match the return type of a GCC
6478    builtin and then its argument prototype would still apply.  */
6479 #ifdef __cplusplus
6480 extern "C"
6481 #endif
6482 char gethostbyname ();
6483 int
6484 main ()
6485 {
6486 return gethostbyname ();
6487   ;
6488   return 0;
6489 }
6490 _ACEOF
6491 for ac_lib in '' nsl; do
6492   if test -z "$ac_lib"; then
6493     ac_res="none required"
6494   else
6495     ac_res=-l$ac_lib
6496     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6497   fi
6498   if ac_fn_c_try_link "$LINENO"; then :
6499   ac_cv_search_gethostbyname=$ac_res
6500 fi
6501 rm -f core conftest.err conftest.$ac_objext \
6502     conftest$ac_exeext
6503   if test "${ac_cv_search_gethostbyname+set}" = set; then :
6504   break
6505 fi
6506 done
6507 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6508
6509 else
6510   ac_cv_search_gethostbyname=no
6511 fi
6512 rm conftest.$ac_ext
6513 LIBS=$ac_func_search_save_LIBS
6514 fi
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6516 $as_echo "$ac_cv_search_gethostbyname" >&6; }
6517 ac_res=$ac_cv_search_gethostbyname
6518 if test "$ac_res" != no; then :
6519   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6520
6521 fi
6522
6523
6524 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6526 $as_echo_n "checking for library containing socketpair... " >&6; }
6527 if test "${ac_cv_search_socketpair+set}" = set; then :
6528   $as_echo_n "(cached) " >&6
6529 else
6530   ac_func_search_save_LIBS=$LIBS
6531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6532 /* end confdefs.h.  */
6533
6534 /* Override any GCC internal prototype to avoid an error.
6535    Use char because int might match the return type of a GCC
6536    builtin and then its argument prototype would still apply.  */
6537 #ifdef __cplusplus
6538 extern "C"
6539 #endif
6540 char socketpair ();
6541 int
6542 main ()
6543 {
6544 return socketpair ();
6545   ;
6546   return 0;
6547 }
6548 _ACEOF
6549 for ac_lib in '' socket; do
6550   if test -z "$ac_lib"; then
6551     ac_res="none required"
6552   else
6553     ac_res=-l$ac_lib
6554     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6555   fi
6556   if ac_fn_c_try_link "$LINENO"; then :
6557   ac_cv_search_socketpair=$ac_res
6558 fi
6559 rm -f core conftest.err conftest.$ac_objext \
6560     conftest$ac_exeext
6561   if test "${ac_cv_search_socketpair+set}" = set; then :
6562   break
6563 fi
6564 done
6565 if test "${ac_cv_search_socketpair+set}" = set; then :
6566
6567 else
6568   ac_cv_search_socketpair=no
6569 fi
6570 rm conftest.$ac_ext
6571 LIBS=$ac_func_search_save_LIBS
6572 fi
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6574 $as_echo "$ac_cv_search_socketpair" >&6; }
6575 ac_res=$ac_cv_search_socketpair
6576 if test "$ac_res" != no; then :
6577   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6578
6579 fi
6580
6581
6582 # Link in zlib if we can.  This allows us to read compressed debug sections.
6583
6584   # See if the user specified whether he wants zlib support or not.
6585
6586 # Check whether --with-zlib was given.
6587 if test "${with_zlib+set}" = set; then :
6588   withval=$with_zlib;
6589 else
6590   with_zlib=auto
6591 fi
6592
6593
6594   if test "$with_zlib" != "no"; then
6595     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
6596 $as_echo_n "checking for library containing zlibVersion... " >&6; }
6597 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6598   $as_echo_n "(cached) " >&6
6599 else
6600   ac_func_search_save_LIBS=$LIBS
6601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6602 /* end confdefs.h.  */
6603
6604 /* Override any GCC internal prototype to avoid an error.
6605    Use char because int might match the return type of a GCC
6606    builtin and then its argument prototype would still apply.  */
6607 #ifdef __cplusplus
6608 extern "C"
6609 #endif
6610 char zlibVersion ();
6611 int
6612 main ()
6613 {
6614 return zlibVersion ();
6615   ;
6616   return 0;
6617 }
6618 _ACEOF
6619 for ac_lib in '' z; do
6620   if test -z "$ac_lib"; then
6621     ac_res="none required"
6622   else
6623     ac_res=-l$ac_lib
6624     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6625   fi
6626   if ac_fn_c_try_link "$LINENO"; then :
6627   ac_cv_search_zlibVersion=$ac_res
6628 fi
6629 rm -f core conftest.err conftest.$ac_objext \
6630     conftest$ac_exeext
6631   if test "${ac_cv_search_zlibVersion+set}" = set; then :
6632   break
6633 fi
6634 done
6635 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6636
6637 else
6638   ac_cv_search_zlibVersion=no
6639 fi
6640 rm conftest.$ac_ext
6641 LIBS=$ac_func_search_save_LIBS
6642 fi
6643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6644 $as_echo "$ac_cv_search_zlibVersion" >&6; }
6645 ac_res=$ac_cv_search_zlibVersion
6646 if test "$ac_res" != no; then :
6647   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6648   for ac_header in zlib.h
6649 do :
6650   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6651 if test "x$ac_cv_header_zlib_h" = x""yes; then :
6652   cat >>confdefs.h <<_ACEOF
6653 #define HAVE_ZLIB_H 1
6654 _ACEOF
6655
6656 fi
6657
6658 done
6659
6660 fi
6661
6662     if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6663       as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6664     fi
6665   fi
6666
6667
6668 # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6670 $as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6671 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6672   $as_echo_n "(cached) " >&6
6673 else
6674   ac_func_search_save_LIBS=$LIBS
6675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6676 /* end confdefs.h.  */
6677
6678 /* Override any GCC internal prototype to avoid an error.
6679    Use char because int might match the return type of a GCC
6680    builtin and then its argument prototype would still apply.  */
6681 #ifdef __cplusplus
6682 extern "C"
6683 #endif
6684 char dlgetmodinfo ();
6685 int
6686 main ()
6687 {
6688 return dlgetmodinfo ();
6689   ;
6690   return 0;
6691 }
6692 _ACEOF
6693 for ac_lib in '' dl xpdl; do
6694   if test -z "$ac_lib"; then
6695     ac_res="none required"
6696   else
6697     ac_res=-l$ac_lib
6698     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6699   fi
6700   if ac_fn_c_try_link "$LINENO"; then :
6701   ac_cv_search_dlgetmodinfo=$ac_res
6702 fi
6703 rm -f core conftest.err conftest.$ac_objext \
6704     conftest$ac_exeext
6705   if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6706   break
6707 fi
6708 done
6709 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6710
6711 else
6712   ac_cv_search_dlgetmodinfo=no
6713 fi
6714 rm conftest.$ac_ext
6715 LIBS=$ac_func_search_save_LIBS
6716 fi
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6718 $as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6719 ac_res=$ac_cv_search_dlgetmodinfo
6720 if test "$ac_res" != no; then :
6721   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6722
6723 fi
6724
6725
6726
6727
6728
6729 # Check whether --with-libiconv-prefix was given.
6730 if test "${with_libiconv_prefix+set}" = set; then :
6731   withval=$with_libiconv_prefix;
6732     for dir in `echo "$withval" | tr : ' '`; do
6733       if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6734       if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6735     done
6736
6737 fi
6738
6739
6740   BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6741   BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6742
6743   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6744 $as_echo_n "checking for iconv... " >&6; }
6745 if test "${am_cv_func_iconv+set}" = set; then :
6746   $as_echo_n "(cached) " >&6
6747 else
6748
6749     am_cv_func_iconv="no, consider installing GNU libiconv"
6750     am_cv_lib_iconv=no
6751     am_cv_use_build_libiconv=no
6752     am_cv_build_libiconv_path=
6753
6754     # If libiconv is part of the build tree, then try using it over
6755     # any system iconv.
6756     if test -d ../libiconv; then
6757       for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6758         am_save_LIBS="$LIBS"
6759         am_save_CPPFLAGS="$CPPFLAGS"
6760         LIBS="$LIBS $lib_dir/libiconv.a"
6761         CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6762         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6763 /* end confdefs.h.  */
6764 #include <stdlib.h>
6765 #include <iconv.h>
6766 int
6767 main ()
6768 {
6769 iconv_t cd = iconv_open("","");
6770            iconv(cd,NULL,NULL,NULL,NULL);
6771            iconv_close(cd);
6772   ;
6773   return 0;
6774 }
6775 _ACEOF
6776 if ac_fn_c_try_link "$LINENO"; then :
6777   am_cv_use_build_libiconv=yes
6778           am_cv_build_libiconv_path=$lib_dir/libiconv.a
6779           am_cv_lib_iconv=yes
6780           am_cv_func_iconv=yes
6781 fi
6782 rm -f core conftest.err conftest.$ac_objext \
6783     conftest$ac_exeext conftest.$ac_ext
6784         LIBS="$am_save_LIBS"
6785         CPPFLAGS="$am_save_CPPFLAGS"
6786         if test "$am_cv_use_build_libiconv" = "yes"; then
6787           break
6788         fi
6789       done
6790     fi
6791
6792     # Next, try to find iconv in libc.
6793     if test "$am_cv_func_iconv" != yes; then
6794       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6795 /* end confdefs.h.  */
6796 #include <stdlib.h>
6797 #include <iconv.h>
6798 int
6799 main ()
6800 {
6801 iconv_t cd = iconv_open("","");
6802          iconv(cd,NULL,NULL,NULL,NULL);
6803          iconv_close(cd);
6804   ;
6805   return 0;
6806 }
6807 _ACEOF
6808 if ac_fn_c_try_link "$LINENO"; then :
6809   am_cv_func_iconv=yes
6810 fi
6811 rm -f core conftest.err conftest.$ac_objext \
6812     conftest$ac_exeext conftest.$ac_ext
6813     fi
6814
6815     # If iconv was not in libc, try -liconv.  In this case, arrange to
6816     # look in the libiconv prefix, if it was specified by the user.
6817     if test "$am_cv_func_iconv" != yes; then
6818       am_save_CPPFLAGS="$CPPFLAGS"
6819       am_save_LIBS="$LIBS"
6820       if test -n "$LIBICONV_INCLUDE"; then
6821         CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6822         LIBS="$LIBS $LIBICONV_LIBDIR"
6823       fi
6824       LIBS="$LIBS -liconv"
6825       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6826 /* end confdefs.h.  */
6827 #include <stdlib.h>
6828 #include <iconv.h>
6829 int
6830 main ()
6831 {
6832 iconv_t cd = iconv_open("","");
6833          iconv(cd,NULL,NULL,NULL,NULL);
6834          iconv_close(cd);
6835   ;
6836   return 0;
6837 }
6838 _ACEOF
6839 if ac_fn_c_try_link "$LINENO"; then :
6840   am_cv_lib_iconv=yes
6841         am_cv_func_iconv=yes
6842 fi
6843 rm -f core conftest.err conftest.$ac_objext \
6844     conftest$ac_exeext conftest.$ac_ext
6845       LIBS="$am_save_LIBS"
6846       CPPFLAGS="$am_save_CPPFLAGS"
6847     fi
6848
6849 fi
6850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6851 $as_echo "$am_cv_func_iconv" >&6; }
6852
6853   # Set the various flags based on the cache variables.  We can't rely
6854   # on the flags to remain set from the above code, due to caching.
6855   LIBICONV=
6856   if test "$am_cv_lib_iconv" = yes; then
6857     LIBICONV="-liconv"
6858   else
6859     LIBICONV_LIBDIR=
6860     LIBICONV_INCLUDE=
6861   fi
6862   if test "$am_cv_use_build_libiconv" = yes; then
6863     LIBICONV="$am_cv_build_libiconv_path"
6864     LIBICONV_LIBDIR=""
6865     LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6866   fi
6867   CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6868   LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
6869
6870   if test "$am_cv_func_iconv" = yes; then
6871
6872 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
6873
6874     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6875 $as_echo_n "checking for iconv declaration... " >&6; }
6876     if test "${am_cv_proto_iconv+set}" = set; then :
6877   $as_echo_n "(cached) " >&6
6878 else
6879
6880       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6881 /* end confdefs.h.  */
6882
6883 #include <stdlib.h>
6884 #include <iconv.h>
6885 extern
6886 #ifdef __cplusplus
6887 "C"
6888 #endif
6889 #if defined(__STDC__) || defined(__cplusplus)
6890 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6891 #else
6892 size_t iconv();
6893 #endif
6894
6895 int
6896 main ()
6897 {
6898
6899   ;
6900   return 0;
6901 }
6902 _ACEOF
6903 if ac_fn_c_try_compile "$LINENO"; then :
6904   am_cv_proto_iconv_arg1=""
6905 else
6906   am_cv_proto_iconv_arg1="const"
6907 fi
6908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6909       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);"
6910 fi
6911
6912     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6913     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6914          }$am_cv_proto_iconv" >&5
6915 $as_echo "${ac_t:-
6916          }$am_cv_proto_iconv" >&6; }
6917
6918 cat >>confdefs.h <<_ACEOF
6919 #define ICONV_CONST $am_cv_proto_iconv_arg1
6920 _ACEOF
6921
6922   fi
6923
6924
6925 # GDB may fork/exec the iconv program to get the list of supported character
6926 # sets.  Allow the user to specify where to find it.
6927 # There are several factors affecting the choice of option name:
6928 # - There is already --with-libiconv-prefix but we can't use it, it specifies
6929 #   the build-time location of libiconv files.
6930 # - The program we need to find is iconv, which comes with glibc.  The user
6931 #   doesn't necessarily have libiconv installed.  Therefore naming this
6932 #   --with-libiconv-foo feels wrong.
6933 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6934 #   defined to work on directories not files (though it really doesn't know
6935 #   the difference).
6936 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
6937 #   with --with-libiconv-prefix.
6938 # Putting these together is why the option name is --with-iconv-bin.
6939
6940
6941 # Check whether --with-iconv-bin was given.
6942 if test "${with_iconv_bin+set}" = set; then :
6943   withval=$with_iconv_bin; iconv_bin="${withval}"
6944
6945 cat >>confdefs.h <<_ACEOF
6946 #define ICONV_BIN "${iconv_bin}"
6947 _ACEOF
6948
6949
6950   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6951      if test "x$prefix" = xNONE; then
6952         test_prefix=/usr/local
6953      else
6954         test_prefix=$prefix
6955      fi
6956   else
6957      test_prefix=$exec_prefix
6958   fi
6959   value=0
6960   case ${iconv_bin} in
6961      "${test_prefix}"|"${test_prefix}/"*|\
6962         '${exec_prefix}'|'${exec_prefix}/'*)
6963      value=1
6964      ;;
6965   esac
6966
6967 cat >>confdefs.h <<_ACEOF
6968 #define ICONV_BIN_RELOCATABLE $value
6969 _ACEOF
6970
6971
6972
6973 fi
6974
6975
6976 # On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6977 # There is a very specific comment in /usr/include/curses.h explaining that
6978 # termcap routines built into libcurses must not be used.
6979 #
6980 # The symptoms we observed so far is GDB unexpectedly changing
6981 # the terminal settings when tgetent is called - this is particularly
6982 # visible as the output is missing carriage returns, and so rapidly
6983 # becomes very hard to read.
6984 #
6985 # The readline configure script has already decided that libtermcap
6986 # was enough for its purposes, and so decided to build readline using
6987 # libtermcap.  Since the TUI mode requires curses, building GDB with
6988 # TUI enabled results in both libraries to be used at the same time,
6989 # which is not allowed.  This basically means that GDB with TUI is
6990 # broken on alpha-osf.
6991
6992 case $host_os in
6993   osf* )
6994     if test x"$enable_tui" = xyes; then
6995       as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6996     fi
6997     if test x"$enable_tui" = xauto; then
6998       enable_tui=no
6999     fi
7000     ;;
7001 esac
7002
7003 # For the TUI, we need enhanced curses functionality.
7004 if test x"$enable_tui" != xno; then
7005   prefer_curses=yes
7006 fi
7007
7008 curses_found=no
7009 if test x"$prefer_curses" = xyes; then
7010   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7011   # curses library because the latter might not provide all the
7012   # functionality we need.  However, this leads to problems on systems
7013   # where the linker searches /usr/local/lib, but the compiler doesn't
7014   # search /usr/local/include, if ncurses is installed in /usr/local.  A
7015   # default installation of ncurses on alpha*-dec-osf* will lead to such
7016   # a situation.
7017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7018 $as_echo_n "checking for library containing waddstr... " >&6; }
7019 if test "${ac_cv_search_waddstr+set}" = set; then :
7020   $as_echo_n "(cached) " >&6
7021 else
7022   ac_func_search_save_LIBS=$LIBS
7023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7024 /* end confdefs.h.  */
7025
7026 /* Override any GCC internal prototype to avoid an error.
7027    Use char because int might match the return type of a GCC
7028    builtin and then its argument prototype would still apply.  */
7029 #ifdef __cplusplus
7030 extern "C"
7031 #endif
7032 char waddstr ();
7033 int
7034 main ()
7035 {
7036 return waddstr ();
7037   ;
7038   return 0;
7039 }
7040 _ACEOF
7041 for ac_lib in '' ncurses cursesX curses; do
7042   if test -z "$ac_lib"; then
7043     ac_res="none required"
7044   else
7045     ac_res=-l$ac_lib
7046     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7047   fi
7048   if ac_fn_c_try_link "$LINENO"; then :
7049   ac_cv_search_waddstr=$ac_res
7050 fi
7051 rm -f core conftest.err conftest.$ac_objext \
7052     conftest$ac_exeext
7053   if test "${ac_cv_search_waddstr+set}" = set; then :
7054   break
7055 fi
7056 done
7057 if test "${ac_cv_search_waddstr+set}" = set; then :
7058
7059 else
7060   ac_cv_search_waddstr=no
7061 fi
7062 rm conftest.$ac_ext
7063 LIBS=$ac_func_search_save_LIBS
7064 fi
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7066 $as_echo "$ac_cv_search_waddstr" >&6; }
7067 ac_res=$ac_cv_search_waddstr
7068 if test "$ac_res" != no; then :
7069   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7070
7071 fi
7072
7073
7074   if test "$ac_cv_search_waddstr" != no; then
7075     curses_found=yes
7076   fi
7077 fi
7078
7079 # Check whether we should enable the TUI, but only do so if we really
7080 # can.
7081 if test x"$enable_tui" != xno; then
7082   if test -d $srcdir/tui; then
7083     if test "$curses_found" != no; then
7084       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7085       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7086       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7087       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
7088     else
7089       if test x"$enable_tui" = xyes; then
7090         as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
7091       else
7092         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7093 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
7094       fi
7095     fi
7096   fi
7097 fi
7098
7099 # Since GDB uses Readline, we need termcap functionality.  In many
7100 # cases this will be provided by the curses library, but some systems
7101 # have a seperate termcap library, or no curses library at all.
7102
7103 case $host_os in
7104   cygwin*)
7105     if test -d $srcdir/libtermcap; then
7106       LIBS="../libtermcap/libtermcap.a $LIBS"
7107       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7108     fi ;;
7109   go32* | *djgpp*)
7110     ac_cv_search_tgetent="none required"
7111     ;;
7112   *mingw32*)
7113     ac_cv_search_tgetent="none required"
7114     CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
7115     ;;
7116 esac
7117
7118 # These are the libraries checked by Readline.
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7120 $as_echo_n "checking for library containing tgetent... " >&6; }
7121 if test "${ac_cv_search_tgetent+set}" = set; then :
7122   $as_echo_n "(cached) " >&6
7123 else
7124   ac_func_search_save_LIBS=$LIBS
7125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7126 /* end confdefs.h.  */
7127
7128 /* Override any GCC internal prototype to avoid an error.
7129    Use char because int might match the return type of a GCC
7130    builtin and then its argument prototype would still apply.  */
7131 #ifdef __cplusplus
7132 extern "C"
7133 #endif
7134 char tgetent ();
7135 int
7136 main ()
7137 {
7138 return tgetent ();
7139   ;
7140   return 0;
7141 }
7142 _ACEOF
7143 for ac_lib in '' termcap tinfo curses ncurses; do
7144   if test -z "$ac_lib"; then
7145     ac_res="none required"
7146   else
7147     ac_res=-l$ac_lib
7148     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7149   fi
7150   if ac_fn_c_try_link "$LINENO"; then :
7151   ac_cv_search_tgetent=$ac_res
7152 fi
7153 rm -f core conftest.err conftest.$ac_objext \
7154     conftest$ac_exeext
7155   if test "${ac_cv_search_tgetent+set}" = set; then :
7156   break
7157 fi
7158 done
7159 if test "${ac_cv_search_tgetent+set}" = set; then :
7160
7161 else
7162   ac_cv_search_tgetent=no
7163 fi
7164 rm conftest.$ac_ext
7165 LIBS=$ac_func_search_save_LIBS
7166 fi
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7168 $as_echo "$ac_cv_search_tgetent" >&6; }
7169 ac_res=$ac_cv_search_tgetent
7170 if test "$ac_res" != no; then :
7171   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7172
7173 fi
7174
7175
7176 if test "$ac_cv_search_tgetent" = no; then
7177   as_fn_error "no termcap library found" "$LINENO" 5
7178 fi
7179
7180
7181 # Check whether --with-system-readline was given.
7182 if test "${with_system_readline+set}" = set; then :
7183   withval=$with_system_readline;
7184 fi
7185
7186
7187 if test "$with_system_readline" = yes; then
7188   READLINE=-lreadline
7189   READLINE_DEPS=
7190   READLINE_CFLAGS=
7191   READLINE_TEXI_INCFLAG=
7192 else
7193   READLINE='$(READLINE_DIR)/libreadline.a'
7194   READLINE_DEPS='$(READLINE)'
7195   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
7196   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
7197 fi
7198
7199
7200
7201
7202
7203 # Generate jit-reader.h
7204
7205 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7206 TARGET_PTR=
7207
7208 # The cast to long int works around a bug in the HP C Compiler
7209 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7210 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7211 # This bug is HP SR number 8606223364.
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7213 $as_echo_n "checking size of unsigned long long... " >&6; }
7214 if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7215   $as_echo_n "(cached) " >&6
7216 else
7217   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
7218
7219 else
7220   if test "$ac_cv_type_unsigned_long_long" = yes; then
7221      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7222 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7223 { as_fn_set_status 77
7224 as_fn_error "cannot compute sizeof (unsigned long long)
7225 See \`config.log' for more details." "$LINENO" 5; }; }
7226    else
7227      ac_cv_sizeof_unsigned_long_long=0
7228    fi
7229 fi
7230
7231 fi
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7233 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7234
7235
7236
7237 cat >>confdefs.h <<_ACEOF
7238 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7239 _ACEOF
7240
7241
7242 # The cast to long int works around a bug in the HP C Compiler
7243 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7244 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7245 # This bug is HP SR number 8606223364.
7246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7247 $as_echo_n "checking size of unsigned long... " >&6; }
7248 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7249   $as_echo_n "(cached) " >&6
7250 else
7251   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
7252
7253 else
7254   if test "$ac_cv_type_unsigned_long" = yes; then
7255      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7256 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7257 { as_fn_set_status 77
7258 as_fn_error "cannot compute sizeof (unsigned long)
7259 See \`config.log' for more details." "$LINENO" 5; }; }
7260    else
7261      ac_cv_sizeof_unsigned_long=0
7262    fi
7263 fi
7264
7265 fi
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7267 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7268
7269
7270
7271 cat >>confdefs.h <<_ACEOF
7272 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7273 _ACEOF
7274
7275
7276 # The cast to long int works around a bug in the HP C Compiler
7277 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7278 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7279 # This bug is HP SR number 8606223364.
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7281 $as_echo_n "checking size of unsigned __int128... " >&6; }
7282 if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7283   $as_echo_n "(cached) " >&6
7284 else
7285   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
7286
7287 else
7288   if test "$ac_cv_type_unsigned___int128" = yes; then
7289      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7290 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7291 { as_fn_set_status 77
7292 as_fn_error "cannot compute sizeof (unsigned __int128)
7293 See \`config.log' for more details." "$LINENO" 5; }; }
7294    else
7295      ac_cv_sizeof_unsigned___int128=0
7296    fi
7297 fi
7298
7299 fi
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7301 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7302
7303
7304
7305 cat >>confdefs.h <<_ACEOF
7306 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7307 _ACEOF
7308
7309
7310
7311 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7312   TARGET_PTR="unsigned long"
7313 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7314   TARGET_PTR="unsigned long long"
7315 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7316   TARGET_PTR="unsigned __int128"
7317 else
7318   TARGET_PTR="unsigned long"
7319 fi
7320
7321
7322 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7323
7324
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7326 $as_echo_n "checking for library containing dlopen... " >&6; }
7327 if test "${ac_cv_search_dlopen+set}" = set; then :
7328   $as_echo_n "(cached) " >&6
7329 else
7330   ac_func_search_save_LIBS=$LIBS
7331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7332 /* end confdefs.h.  */
7333
7334 /* Override any GCC internal prototype to avoid an error.
7335    Use char because int might match the return type of a GCC
7336    builtin and then its argument prototype would still apply.  */
7337 #ifdef __cplusplus
7338 extern "C"
7339 #endif
7340 char dlopen ();
7341 int
7342 main ()
7343 {
7344 return dlopen ();
7345   ;
7346   return 0;
7347 }
7348 _ACEOF
7349 for ac_lib in '' dl; do
7350   if test -z "$ac_lib"; then
7351     ac_res="none required"
7352   else
7353     ac_res=-l$ac_lib
7354     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7355   fi
7356   if ac_fn_c_try_link "$LINENO"; then :
7357   ac_cv_search_dlopen=$ac_res
7358 fi
7359 rm -f core conftest.err conftest.$ac_objext \
7360     conftest$ac_exeext
7361   if test "${ac_cv_search_dlopen+set}" = set; then :
7362   break
7363 fi
7364 done
7365 if test "${ac_cv_search_dlopen+set}" = set; then :
7366
7367 else
7368   ac_cv_search_dlopen=no
7369 fi
7370 rm conftest.$ac_ext
7371 LIBS=$ac_func_search_save_LIBS
7372 fi
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7374 $as_echo "$ac_cv_search_dlopen" >&6; }
7375 ac_res=$ac_cv_search_dlopen
7376 if test "$ac_res" != no; then :
7377   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7378
7379 fi
7380
7381
7382
7383
7384 # Check whether --with-jit-reader-dir was given.
7385 if test "${with_jit_reader_dir+set}" = set; then :
7386   withval=$with_jit_reader_dir;
7387     JIT_READER_DIR=$withval
7388 else
7389   JIT_READER_DIR=${libdir}/gdb
7390 fi
7391
7392
7393   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7394   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7395   ac_define_dir=`eval echo $JIT_READER_DIR`
7396   ac_define_dir=`eval echo $ac_define_dir`
7397
7398 cat >>confdefs.h <<_ACEOF
7399 #define JIT_READER_DIR "$ac_define_dir"
7400 _ACEOF
7401
7402
7403
7404
7405   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7406      if test "x$prefix" = xNONE; then
7407         test_prefix=/usr/local
7408      else
7409         test_prefix=$prefix
7410      fi
7411   else
7412      test_prefix=$exec_prefix
7413   fi
7414   value=0
7415   case ${ac_define_dir} in
7416      "${test_prefix}"|"${test_prefix}/"*|\
7417         '${exec_prefix}'|'${exec_prefix}/'*)
7418      value=1
7419      ;;
7420   esac
7421
7422 cat >>confdefs.h <<_ACEOF
7423 #define JIT_READER_DIR_RELOCATABLE $value
7424 _ACEOF
7425
7426
7427
7428
7429
7430 # Check whether --with-expat was given.
7431 if test "${with_expat+set}" = set; then :
7432   withval=$with_expat;
7433 else
7434   with_expat=auto
7435 fi
7436
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7438 $as_echo_n "checking whether to use expat... " >&6; }
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7440 $as_echo "$with_expat" >&6; }
7441
7442 if test "${with_expat}" = no; then
7443   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7444 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
7445   HAVE_LIBEXPAT=no
7446 else
7447
7448       if test "X$prefix" = "XNONE"; then
7449     acl_final_prefix="$ac_default_prefix"
7450   else
7451     acl_final_prefix="$prefix"
7452   fi
7453   if test "X$exec_prefix" = "XNONE"; then
7454     acl_final_exec_prefix='${prefix}'
7455   else
7456     acl_final_exec_prefix="$exec_prefix"
7457   fi
7458   acl_save_prefix="$prefix"
7459   prefix="$acl_final_prefix"
7460   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7461   prefix="$acl_save_prefix"
7462
7463
7464 # Check whether --with-gnu-ld was given.
7465 if test "${with_gnu_ld+set}" = set; then :
7466   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7467 else
7468   with_gnu_ld=no
7469 fi
7470
7471 # Prepare PATH_SEPARATOR.
7472 # The user is always right.
7473 if test "${PATH_SEPARATOR+set}" != set; then
7474   echo "#! /bin/sh" >conf$$.sh
7475   echo  "exit 0"   >>conf$$.sh
7476   chmod +x conf$$.sh
7477   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7478     PATH_SEPARATOR=';'
7479   else
7480     PATH_SEPARATOR=:
7481   fi
7482   rm -f conf$$.sh
7483 fi
7484 ac_prog=ld
7485 if test "$GCC" = yes; then
7486   # Check if gcc -print-prog-name=ld gives a path.
7487   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7488 $as_echo_n "checking for ld used by GCC... " >&6; }
7489   case $host in
7490   *-*-mingw*)
7491     # gcc leaves a trailing carriage return which upsets mingw
7492     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7493   *)
7494     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7495   esac
7496   case $ac_prog in
7497     # Accept absolute paths.
7498     [\\/]* | [A-Za-z]:[\\/]*)
7499       re_direlt='/[^/][^/]*/\.\./'
7500       # Canonicalize the path of ld
7501       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7502       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7503         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7504       done
7505       test -z "$LD" && LD="$ac_prog"
7506       ;;
7507   "")
7508     # If it fails, then pretend we aren't using GCC.
7509     ac_prog=ld
7510     ;;
7511   *)
7512     # If it is relative, then search for the first ld in PATH.
7513     with_gnu_ld=unknown
7514     ;;
7515   esac
7516 elif test "$with_gnu_ld" = yes; then
7517   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7518 $as_echo_n "checking for GNU ld... " >&6; }
7519 else
7520   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7521 $as_echo_n "checking for non-GNU ld... " >&6; }
7522 fi
7523 if test "${acl_cv_path_LD+set}" = set; then :
7524   $as_echo_n "(cached) " >&6
7525 else
7526   if test -z "$LD"; then
7527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7528   for ac_dir in $PATH; do
7529     test -z "$ac_dir" && ac_dir=.
7530     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7531       acl_cv_path_LD="$ac_dir/$ac_prog"
7532       # Check to see if the program is GNU ld.  I'd rather use --version,
7533       # but apparently some GNU ld's only accept -v.
7534       # Break only if it was the GNU/non-GNU ld that we prefer.
7535       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7536         test "$with_gnu_ld" != no && break
7537       else
7538         test "$with_gnu_ld" != yes && break
7539       fi
7540     fi
7541   done
7542   IFS="$ac_save_ifs"
7543 else
7544   acl_cv_path_LD="$LD" # Let the user override the test with a path.
7545 fi
7546 fi
7547
7548 LD="$acl_cv_path_LD"
7549 if test -n "$LD"; then
7550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7551 $as_echo "$LD" >&6; }
7552 else
7553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554 $as_echo "no" >&6; }
7555 fi
7556 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7558 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7559 if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7560   $as_echo_n "(cached) " >&6
7561 else
7562   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7563 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7564   acl_cv_prog_gnu_ld=yes
7565 else
7566   acl_cv_prog_gnu_ld=no
7567 fi
7568 fi
7569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7570 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
7571 with_gnu_ld=$acl_cv_prog_gnu_ld
7572
7573
7574
7575                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7576 $as_echo_n "checking for shared library run path origin... " >&6; }
7577 if test "${acl_cv_rpath+set}" = set; then :
7578   $as_echo_n "(cached) " >&6
7579 else
7580
7581     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7582     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7583     . ./conftest.sh
7584     rm -f ./conftest.sh
7585     acl_cv_rpath=done
7586
7587 fi
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7589 $as_echo "$acl_cv_rpath" >&6; }
7590   wl="$acl_cv_wl"
7591   libext="$acl_cv_libext"
7592   shlibext="$acl_cv_shlibext"
7593   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7594   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7595   hardcode_direct="$acl_cv_hardcode_direct"
7596   hardcode_minus_L="$acl_cv_hardcode_minus_L"
7597     # Check whether --enable-rpath was given.
7598 if test "${enable_rpath+set}" = set; then :
7599   enableval=$enable_rpath; :
7600 else
7601   enable_rpath=yes
7602 fi
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613     use_additional=yes
7614
7615   acl_save_prefix="$prefix"
7616   prefix="$acl_final_prefix"
7617   acl_save_exec_prefix="$exec_prefix"
7618   exec_prefix="$acl_final_exec_prefix"
7619
7620     eval additional_includedir=\"$includedir\"
7621     eval additional_libdir=\"$libdir\"
7622
7623   exec_prefix="$acl_save_exec_prefix"
7624   prefix="$acl_save_prefix"
7625
7626
7627 # Check whether --with-libexpat-prefix was given.
7628 if test "${with_libexpat_prefix+set}" = set; then :
7629   withval=$with_libexpat_prefix;
7630     if test "X$withval" = "Xno"; then
7631       use_additional=no
7632     else
7633       if test "X$withval" = "X"; then
7634
7635   acl_save_prefix="$prefix"
7636   prefix="$acl_final_prefix"
7637   acl_save_exec_prefix="$exec_prefix"
7638   exec_prefix="$acl_final_exec_prefix"
7639
7640           eval additional_includedir=\"$includedir\"
7641           eval additional_libdir=\"$libdir\"
7642
7643   exec_prefix="$acl_save_exec_prefix"
7644   prefix="$acl_save_prefix"
7645
7646       else
7647         additional_includedir="$withval/include"
7648         additional_libdir="$withval/lib"
7649       fi
7650     fi
7651
7652 fi
7653
7654       LIBEXPAT=
7655   LTLIBEXPAT=
7656   INCEXPAT=
7657   rpathdirs=
7658   ltrpathdirs=
7659   names_already_handled=
7660   names_next_round='expat '
7661   while test -n "$names_next_round"; do
7662     names_this_round="$names_next_round"
7663     names_next_round=
7664     for name in $names_this_round; do
7665       already_handled=
7666       for n in $names_already_handled; do
7667         if test "$n" = "$name"; then
7668           already_handled=yes
7669           break
7670         fi
7671       done
7672       if test -z "$already_handled"; then
7673         names_already_handled="$names_already_handled $name"
7674                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7675         eval value=\"\$HAVE_LIB$uppername\"
7676         if test -n "$value"; then
7677           if test "$value" = yes; then
7678             eval value=\"\$LIB$uppername\"
7679             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7680             eval value=\"\$LTLIB$uppername\"
7681             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7682           else
7683                                     :
7684           fi
7685         else
7686                               found_dir=
7687           found_la=
7688           found_so=
7689           found_a=
7690           if test $use_additional = yes; then
7691             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7692               found_dir="$additional_libdir"
7693               found_so="$additional_libdir/lib$name.$shlibext"
7694               if test -f "$additional_libdir/lib$name.la"; then
7695                 found_la="$additional_libdir/lib$name.la"
7696               fi
7697             else
7698               if test -f "$additional_libdir/lib$name.$libext"; then
7699                 found_dir="$additional_libdir"
7700                 found_a="$additional_libdir/lib$name.$libext"
7701                 if test -f "$additional_libdir/lib$name.la"; then
7702                   found_la="$additional_libdir/lib$name.la"
7703                 fi
7704               fi
7705             fi
7706           fi
7707           if test "X$found_dir" = "X"; then
7708             for x in $LDFLAGS $LTLIBEXPAT; do
7709
7710   acl_save_prefix="$prefix"
7711   prefix="$acl_final_prefix"
7712   acl_save_exec_prefix="$exec_prefix"
7713   exec_prefix="$acl_final_exec_prefix"
7714   eval x=\"$x\"
7715   exec_prefix="$acl_save_exec_prefix"
7716   prefix="$acl_save_prefix"
7717
7718               case "$x" in
7719                 -L*)
7720                   dir=`echo "X$x" | sed -e 's/^X-L//'`
7721                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7722                     found_dir="$dir"
7723                     found_so="$dir/lib$name.$shlibext"
7724                     if test -f "$dir/lib$name.la"; then
7725                       found_la="$dir/lib$name.la"
7726                     fi
7727                   else
7728                     if test -f "$dir/lib$name.$libext"; then
7729                       found_dir="$dir"
7730                       found_a="$dir/lib$name.$libext"
7731                       if test -f "$dir/lib$name.la"; then
7732                         found_la="$dir/lib$name.la"
7733                       fi
7734                     fi
7735                   fi
7736                   ;;
7737               esac
7738               if test "X$found_dir" != "X"; then
7739                 break
7740               fi
7741             done
7742           fi
7743           if test "X$found_dir" != "X"; then
7744                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7745             if test "X$found_so" != "X"; then
7746                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7747                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7748               else
7749                                                                                 haveit=
7750                 for x in $ltrpathdirs; do
7751                   if test "X$x" = "X$found_dir"; then
7752                     haveit=yes
7753                     break
7754                   fi
7755                 done
7756                 if test -z "$haveit"; then
7757                   ltrpathdirs="$ltrpathdirs $found_dir"
7758                 fi
7759                                 if test "$hardcode_direct" = yes; then
7760                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7761                 else
7762                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7763                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7764                                                             haveit=
7765                     for x in $rpathdirs; do
7766                       if test "X$x" = "X$found_dir"; then
7767                         haveit=yes
7768                         break
7769                       fi
7770                     done
7771                     if test -z "$haveit"; then
7772                       rpathdirs="$rpathdirs $found_dir"
7773                     fi
7774                   else
7775                                                                                 haveit=
7776                     for x in $LDFLAGS $LIBEXPAT; do
7777
7778   acl_save_prefix="$prefix"
7779   prefix="$acl_final_prefix"
7780   acl_save_exec_prefix="$exec_prefix"
7781   exec_prefix="$acl_final_exec_prefix"
7782   eval x=\"$x\"
7783   exec_prefix="$acl_save_exec_prefix"
7784   prefix="$acl_save_prefix"
7785
7786                       if test "X$x" = "X-L$found_dir"; then
7787                         haveit=yes
7788                         break
7789                       fi
7790                     done
7791                     if test -z "$haveit"; then
7792                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7793                     fi
7794                     if test "$hardcode_minus_L" != no; then
7795                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7796                     else
7797                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7798                     fi
7799                   fi
7800                 fi
7801               fi
7802             else
7803               if test "X$found_a" != "X"; then
7804                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7805               else
7806                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7807               fi
7808             fi
7809                         additional_includedir=
7810             case "$found_dir" in
7811               */lib | */lib/)
7812                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7813                 additional_includedir="$basedir/include"
7814                 ;;
7815             esac
7816             if test "X$additional_includedir" != "X"; then
7817                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
7818                 haveit=
7819                 if test "X$additional_includedir" = "X/usr/local/include"; then
7820                   if test -n "$GCC"; then
7821                     case $host_os in
7822                       linux*) haveit=yes;;
7823                     esac
7824                   fi
7825                 fi
7826                 if test -z "$haveit"; then
7827                   for x in $CPPFLAGS $INCEXPAT; do
7828
7829   acl_save_prefix="$prefix"
7830   prefix="$acl_final_prefix"
7831   acl_save_exec_prefix="$exec_prefix"
7832   exec_prefix="$acl_final_exec_prefix"
7833   eval x=\"$x\"
7834   exec_prefix="$acl_save_exec_prefix"
7835   prefix="$acl_save_prefix"
7836
7837                     if test "X$x" = "X-I$additional_includedir"; then
7838                       haveit=yes
7839                       break
7840                     fi
7841                   done
7842                   if test -z "$haveit"; then
7843                     if test -d "$additional_includedir"; then
7844                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7845                     fi
7846                   fi
7847                 fi
7848               fi
7849             fi
7850                         if test -n "$found_la"; then
7851                                                         save_libdir="$libdir"
7852               case "$found_la" in
7853                 */* | *\\*) . "$found_la" ;;
7854                 *) . "./$found_la" ;;
7855               esac
7856               libdir="$save_libdir"
7857                             for dep in $dependency_libs; do
7858                 case "$dep" in
7859                   -L*)
7860                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7861                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
7862                       haveit=
7863                       if test "X$additional_libdir" = "X/usr/local/lib"; then
7864                         if test -n "$GCC"; then
7865                           case $host_os in
7866                             linux*) haveit=yes;;
7867                           esac
7868                         fi
7869                       fi
7870                       if test -z "$haveit"; then
7871                         haveit=
7872                         for x in $LDFLAGS $LIBEXPAT; do
7873
7874   acl_save_prefix="$prefix"
7875   prefix="$acl_final_prefix"
7876   acl_save_exec_prefix="$exec_prefix"
7877   exec_prefix="$acl_final_exec_prefix"
7878   eval x=\"$x\"
7879   exec_prefix="$acl_save_exec_prefix"
7880   prefix="$acl_save_prefix"
7881
7882                           if test "X$x" = "X-L$additional_libdir"; then
7883                             haveit=yes
7884                             break
7885                           fi
7886                         done
7887                         if test -z "$haveit"; then
7888                           if test -d "$additional_libdir"; then
7889                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7890                           fi
7891                         fi
7892                         haveit=
7893                         for x in $LDFLAGS $LTLIBEXPAT; do
7894
7895   acl_save_prefix="$prefix"
7896   prefix="$acl_final_prefix"
7897   acl_save_exec_prefix="$exec_prefix"
7898   exec_prefix="$acl_final_exec_prefix"
7899   eval x=\"$x\"
7900   exec_prefix="$acl_save_exec_prefix"
7901   prefix="$acl_save_prefix"
7902
7903                           if test "X$x" = "X-L$additional_libdir"; then
7904                             haveit=yes
7905                             break
7906                           fi
7907                         done
7908                         if test -z "$haveit"; then
7909                           if test -d "$additional_libdir"; then
7910                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7911                           fi
7912                         fi
7913                       fi
7914                     fi
7915                     ;;
7916                   -R*)
7917                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
7918                     if test "$enable_rpath" != no; then
7919                                                                   haveit=
7920                       for x in $rpathdirs; do
7921                         if test "X$x" = "X$dir"; then
7922                           haveit=yes
7923                           break
7924                         fi
7925                       done
7926                       if test -z "$haveit"; then
7927                         rpathdirs="$rpathdirs $dir"
7928                       fi
7929                                                                   haveit=
7930                       for x in $ltrpathdirs; do
7931                         if test "X$x" = "X$dir"; then
7932                           haveit=yes
7933                           break
7934                         fi
7935                       done
7936                       if test -z "$haveit"; then
7937                         ltrpathdirs="$ltrpathdirs $dir"
7938                       fi
7939                     fi
7940                     ;;
7941                   -l*)
7942                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7943                     ;;
7944                   *.la)
7945                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7946                     ;;
7947                   *)
7948                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7949                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7950                     ;;
7951                 esac
7952               done
7953             fi
7954           else
7955                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7956             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7957           fi
7958         fi
7959       fi
7960     done
7961   done
7962   if test "X$rpathdirs" != "X"; then
7963     if test -n "$hardcode_libdir_separator"; then
7964                         alldirs=
7965       for found_dir in $rpathdirs; do
7966         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7967       done
7968             acl_save_libdir="$libdir"
7969       libdir="$alldirs"
7970       eval flag=\"$hardcode_libdir_flag_spec\"
7971       libdir="$acl_save_libdir"
7972       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7973     else
7974             for found_dir in $rpathdirs; do
7975         acl_save_libdir="$libdir"
7976         libdir="$found_dir"
7977         eval flag=\"$hardcode_libdir_flag_spec\"
7978         libdir="$acl_save_libdir"
7979         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7980       done
7981     fi
7982   fi
7983   if test "X$ltrpathdirs" != "X"; then
7984             for found_dir in $ltrpathdirs; do
7985       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7986     done
7987   fi
7988
7989
7990         ac_save_CPPFLAGS="$CPPFLAGS"
7991
7992   for element in $INCEXPAT; do
7993     haveit=
7994     for x in $CPPFLAGS; do
7995
7996   acl_save_prefix="$prefix"
7997   prefix="$acl_final_prefix"
7998   acl_save_exec_prefix="$exec_prefix"
7999   exec_prefix="$acl_final_exec_prefix"
8000   eval x=\"$x\"
8001   exec_prefix="$acl_save_exec_prefix"
8002   prefix="$acl_save_prefix"
8003
8004       if test "X$x" = "X$element"; then
8005         haveit=yes
8006         break
8007       fi
8008     done
8009     if test -z "$haveit"; then
8010       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8011     fi
8012   done
8013
8014
8015   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8016 $as_echo_n "checking for libexpat... " >&6; }
8017 if test "${ac_cv_libexpat+set}" = set; then :
8018   $as_echo_n "(cached) " >&6
8019 else
8020
8021     ac_save_LIBS="$LIBS"
8022     LIBS="$LIBS $LIBEXPAT"
8023     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8024 /* end confdefs.h.  */
8025 #include "expat.h"
8026 int
8027 main ()
8028 {
8029 XML_Parser p = XML_ParserCreate (0);
8030   ;
8031   return 0;
8032 }
8033 _ACEOF
8034 if ac_fn_c_try_link "$LINENO"; then :
8035   ac_cv_libexpat=yes
8036 else
8037   ac_cv_libexpat=no
8038 fi
8039 rm -f core conftest.err conftest.$ac_objext \
8040     conftest$ac_exeext conftest.$ac_ext
8041     LIBS="$ac_save_LIBS"
8042
8043 fi
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8045 $as_echo "$ac_cv_libexpat" >&6; }
8046   if test "$ac_cv_libexpat" = yes; then
8047     HAVE_LIBEXPAT=yes
8048
8049 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
8050
8051     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8052 $as_echo_n "checking how to link with libexpat... " >&6; }
8053     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8054 $as_echo "$LIBEXPAT" >&6; }
8055   else
8056     HAVE_LIBEXPAT=no
8057             CPPFLAGS="$ac_save_CPPFLAGS"
8058     LIBEXPAT=
8059     LTLIBEXPAT=
8060   fi
8061
8062
8063
8064
8065
8066
8067   if test "$HAVE_LIBEXPAT" != yes; then
8068     if test "$with_expat" = yes; then
8069       as_fn_error "expat is missing or unusable" "$LINENO" 5
8070     else
8071       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8072 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8073     fi
8074   else
8075     save_LIBS=$LIBS
8076     LIBS="$LIBS $LIBEXPAT"
8077     for ac_func in XML_StopParser
8078 do :
8079   ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8080 if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
8081   cat >>confdefs.h <<_ACEOF
8082 #define HAVE_XML_STOPPARSER 1
8083 _ACEOF
8084
8085 fi
8086 done
8087
8088     LIBS=$save_LIBS
8089   fi
8090 fi
8091
8092 # --------------------- #
8093 # Check for libpython.  #
8094 # --------------------- #
8095
8096
8097
8098
8099
8100
8101 # Check whether --with-python was given.
8102 if test "${with_python+set}" = set; then :
8103   withval=$with_python;
8104 else
8105   with_python=auto
8106 fi
8107
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8109 $as_echo_n "checking whether to use python... " >&6; }
8110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8111 $as_echo "$with_python" >&6; }
8112
8113 if test "${with_python}" = no; then
8114   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8115 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8116   have_libpython=no
8117 else
8118   case "${with_python}" in
8119   [\\/]* | ?:[\\/]*)
8120     if test -d ${with_python}; then
8121       # Assume the python binary is ${with_python}/bin/python.
8122       python_prog="${with_python}/bin/python"
8123       python_prefix=
8124       # If python does not exit ${with_python}/bin, then try in
8125       # ${with_python}.  On Windows/MinGW, this is where the Python
8126       # executable is.
8127       if test ! -x "${python_prog}"; then
8128         python_prog="${with_python}/python"
8129         python_prefix=
8130       fi
8131       if test ! -x "${python_prog}"; then
8132         # Fall back to gdb 7.0/7.1 behaviour.
8133         python_prog=missing
8134         python_prefix=${with_python}
8135       fi
8136     elif test -x "${with_python}"; then
8137       # While we can't run python compiled for $host (unless host == build),
8138       # the user could write a script that provides the needed information,
8139       # so we support that.
8140       python_prog=${with_python}
8141       python_prefix=
8142     else
8143       as_fn_error "invalid value for --with-python" "$LINENO" 5
8144     fi
8145     ;;
8146   */*)
8147     # Disallow --with-python=foo/bar.
8148     as_fn_error "invalid value for --with-python" "$LINENO" 5
8149     ;;
8150   *)
8151     # The user has either specified auto, yes, or the name of the python
8152     # program assumed to be in $PATH.
8153     python_prefix=
8154     case "${with_python}" in
8155     yes | auto)
8156       if test ${build} = ${host}; then
8157         # Extract the first word of "python", so it can be a program name with args.
8158 set dummy python; ac_word=$2
8159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8160 $as_echo_n "checking for $ac_word... " >&6; }
8161 if test "${ac_cv_path_python_prog_path+set}" = set; then :
8162   $as_echo_n "(cached) " >&6
8163 else
8164   case $python_prog_path in
8165   [\\/]* | ?:[\\/]*)
8166   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8167   ;;
8168   *)
8169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8170 for as_dir in $PATH
8171 do
8172   IFS=$as_save_IFS
8173   test -z "$as_dir" && as_dir=.
8174     for ac_exec_ext in '' $ac_executable_extensions; do
8175   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8176     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8178     break 2
8179   fi
8180 done
8181   done
8182 IFS=$as_save_IFS
8183
8184   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8185   ;;
8186 esac
8187 fi
8188 python_prog_path=$ac_cv_path_python_prog_path
8189 if test -n "$python_prog_path"; then
8190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8191 $as_echo "$python_prog_path" >&6; }
8192 else
8193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8194 $as_echo "no" >&6; }
8195 fi
8196
8197
8198         if test "${python_prog_path}" = missing; then
8199           python_prog=missing
8200         else
8201           python_prog=${python_prog_path}
8202         fi
8203       else
8204         # Not much we can do except assume the cross-compiler will find the
8205         # right files.
8206         python_prog=missing
8207       fi
8208       ;;
8209     *)
8210       # While we can't run python compiled for $host (unless host == build),
8211       # the user could write a script that provides the needed information,
8212       # so we support that.
8213       python_prog="${with_python}"
8214       # Extract the first word of "${python_prog}", so it can be a program name with args.
8215 set dummy ${python_prog}; ac_word=$2
8216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8217 $as_echo_n "checking for $ac_word... " >&6; }
8218 if test "${ac_cv_path_python_prog_path+set}" = set; then :
8219   $as_echo_n "(cached) " >&6
8220 else
8221   case $python_prog_path in
8222   [\\/]* | ?:[\\/]*)
8223   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8224   ;;
8225   *)
8226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8227 for as_dir in $PATH
8228 do
8229   IFS=$as_save_IFS
8230   test -z "$as_dir" && as_dir=.
8231     for ac_exec_ext in '' $ac_executable_extensions; do
8232   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8233     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8235     break 2
8236   fi
8237 done
8238   done
8239 IFS=$as_save_IFS
8240
8241   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8242   ;;
8243 esac
8244 fi
8245 python_prog_path=$ac_cv_path_python_prog_path
8246 if test -n "$python_prog_path"; then
8247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8248 $as_echo "$python_prog_path" >&6; }
8249 else
8250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8251 $as_echo "no" >&6; }
8252 fi
8253
8254
8255       if test "${python_prog_path}" = missing; then
8256         as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8257       fi
8258       ;;
8259     esac
8260   esac
8261
8262   if test "${python_prog}" != missing; then
8263     # We have a python program to use, but it may be too old.
8264     # Don't flag an error for --with-python=auto (the default).
8265     have_python_config=yes
8266     python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8267     if test $? != 0; then
8268       have_python_config=failed
8269       if test "${with_python}" != auto; then
8270         as_fn_error "failure running python-config --includes" "$LINENO" 5
8271       fi
8272     fi
8273     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8274     if test $? != 0; then
8275       have_python_config=failed
8276       if test "${with_python}" != auto; then
8277         as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8278       fi
8279     fi
8280     python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8281     if test $? != 0; then
8282       have_python_config=failed
8283       if test "${with_python}" != auto; then
8284         as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8285       fi
8286     fi
8287   else
8288     # We do not have a python executable we can use to determine where
8289     # to find the Python headers and libs.  We cannot guess the include
8290     # path from the python_prefix either, because that include path
8291     # depends on the Python version.  So, there is nothing much we can
8292     # do except assume that the compiler will be able to find those files.
8293     python_includes=
8294     python_libs=
8295     have_python_config=no
8296   fi
8297
8298   # If we have python-config, only try the configuration it provides.
8299   # Otherwise fallback on the old way of trying different versions of
8300   # python in turn.
8301
8302   have_libpython=no
8303   if test "${have_python_config}" = yes; then
8304     # Determine the Python version by extracting "-lpython<version>"
8305     # part of the python_libs. <version> is usually X.Y with X and Y
8306     # being decimal numbers, but can also be XY (seen on Windows).
8307     #
8308     # The extraction is performed using sed with a regular expression.
8309     # Initially, the regexp used was using the '?' quantifier to make
8310     # the dot in the version number optional.  Unfortunately, this
8311     # does not work with non-GNU versions of sed because, because of
8312     # what looks like a limitation (the '?' quantifier does not work
8313     # with back-references).  We work around this limitation by using
8314     # the '*' quantifier instead.  It means that, in theory, we might
8315     # match unexpected version strings such as "-lpython2..7", but
8316     # this seems unlikely in practice.  And even if that happens,
8317     # an error will be triggered later on, when checking that version
8318     # number.
8319     python_version=`echo " ${python_libs} " \
8320                          | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
8321     case "${python_version}" in
8322     python*)
8323
8324   version=${python_version}
8325
8326   new_CPPFLAGS=${python_includes}
8327   new_LIBS=${python_libs}
8328   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8329 $as_echo_n "checking for ${version}... " >&6; }
8330   save_CPPFLAGS=$CPPFLAGS
8331   save_LIBS=$LIBS
8332   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8333   LIBS="$LIBS $new_LIBS"
8334   found_usable_python=no
8335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8336 /* end confdefs.h.  */
8337 #include "Python.h"
8338 int
8339 main ()
8340 {
8341 Py_Initialize ();
8342   ;
8343   return 0;
8344 }
8345 _ACEOF
8346 if ac_fn_c_try_link "$LINENO"; then :
8347   have_libpython=${version}
8348                   found_usable_python=yes
8349                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8350                   PYTHON_LIBS=$new_LIBS
8351 fi
8352 rm -f core conftest.err conftest.$ac_objext \
8353     conftest$ac_exeext conftest.$ac_ext
8354   CPPFLAGS=$save_CPPFLAGS
8355   LIBS=$save_LIBS
8356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8357 $as_echo "${found_usable_python}" >&6; }
8358
8359       ;;
8360     *)
8361       as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
8362       ;;
8363     esac
8364   elif test "${have_python_config}" != failed; then
8365     if test "${have_libpython}" = no; then
8366
8367   version=python2.7
8368
8369   new_CPPFLAGS=${python_includes}
8370   new_LIBS="${python_libs} -lpython2.7"
8371   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8372 $as_echo_n "checking for ${version}... " >&6; }
8373   save_CPPFLAGS=$CPPFLAGS
8374   save_LIBS=$LIBS
8375   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8376   LIBS="$LIBS $new_LIBS"
8377   found_usable_python=no
8378   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8379 /* end confdefs.h.  */
8380 #include "Python.h"
8381 int
8382 main ()
8383 {
8384 Py_Initialize ();
8385   ;
8386   return 0;
8387 }
8388 _ACEOF
8389 if ac_fn_c_try_link "$LINENO"; then :
8390   have_libpython=${version}
8391                   found_usable_python=yes
8392                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8393                   PYTHON_LIBS=$new_LIBS
8394 fi
8395 rm -f core conftest.err conftest.$ac_objext \
8396     conftest$ac_exeext conftest.$ac_ext
8397   CPPFLAGS=$save_CPPFLAGS
8398   LIBS=$save_LIBS
8399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8400 $as_echo "${found_usable_python}" >&6; }
8401
8402     fi
8403     if test "${have_libpython}" = no; then
8404
8405   version=python2.6
8406
8407   new_CPPFLAGS=${python_includes}
8408   new_LIBS="${python_libs} -lpython2.6"
8409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8410 $as_echo_n "checking for ${version}... " >&6; }
8411   save_CPPFLAGS=$CPPFLAGS
8412   save_LIBS=$LIBS
8413   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8414   LIBS="$LIBS $new_LIBS"
8415   found_usable_python=no
8416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8417 /* end confdefs.h.  */
8418 #include "Python.h"
8419 int
8420 main ()
8421 {
8422 Py_Initialize ();
8423   ;
8424   return 0;
8425 }
8426 _ACEOF
8427 if ac_fn_c_try_link "$LINENO"; then :
8428   have_libpython=${version}
8429                   found_usable_python=yes
8430                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8431                   PYTHON_LIBS=$new_LIBS
8432 fi
8433 rm -f core conftest.err conftest.$ac_objext \
8434     conftest$ac_exeext conftest.$ac_ext
8435   CPPFLAGS=$save_CPPFLAGS
8436   LIBS=$save_LIBS
8437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8438 $as_echo "${found_usable_python}" >&6; }
8439
8440     fi
8441     if test ${have_libpython} = no; then
8442
8443   version=python2.5
8444
8445   new_CPPFLAGS=${python_includes}
8446   new_LIBS="${python_libs} -lpython2.5"
8447   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8448 $as_echo_n "checking for ${version}... " >&6; }
8449   save_CPPFLAGS=$CPPFLAGS
8450   save_LIBS=$LIBS
8451   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8452   LIBS="$LIBS $new_LIBS"
8453   found_usable_python=no
8454   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8455 /* end confdefs.h.  */
8456 #include "Python.h"
8457 int
8458 main ()
8459 {
8460 Py_Initialize ();
8461   ;
8462   return 0;
8463 }
8464 _ACEOF
8465 if ac_fn_c_try_link "$LINENO"; then :
8466   have_libpython=${version}
8467                   found_usable_python=yes
8468                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8469                   PYTHON_LIBS=$new_LIBS
8470 fi
8471 rm -f core conftest.err conftest.$ac_objext \
8472     conftest$ac_exeext conftest.$ac_ext
8473   CPPFLAGS=$save_CPPFLAGS
8474   LIBS=$save_LIBS
8475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8476 $as_echo "${found_usable_python}" >&6; }
8477
8478     fi
8479     if test ${have_libpython} = no; then
8480
8481   version=python2.4
8482
8483   new_CPPFLAGS=${python_includes}
8484   new_LIBS="${python_libs} -lpython2.4"
8485   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8486 $as_echo_n "checking for ${version}... " >&6; }
8487   save_CPPFLAGS=$CPPFLAGS
8488   save_LIBS=$LIBS
8489   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8490   LIBS="$LIBS $new_LIBS"
8491   found_usable_python=no
8492   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8493 /* end confdefs.h.  */
8494 #include "Python.h"
8495 int
8496 main ()
8497 {
8498 Py_Initialize ();
8499   ;
8500   return 0;
8501 }
8502 _ACEOF
8503 if ac_fn_c_try_link "$LINENO"; then :
8504   have_libpython=${version}
8505                   found_usable_python=yes
8506                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8507                   PYTHON_LIBS=$new_LIBS
8508 fi
8509 rm -f core conftest.err conftest.$ac_objext \
8510     conftest$ac_exeext conftest.$ac_ext
8511   CPPFLAGS=$save_CPPFLAGS
8512   LIBS=$save_LIBS
8513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8514 $as_echo "${found_usable_python}" >&6; }
8515
8516     fi
8517   fi
8518   if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
8519
8520 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8521
8522   elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
8523
8524 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8525
8526   elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
8527
8528 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8529
8530   elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
8531
8532 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8533
8534   fi
8535
8536   if test "${have_libpython}" = no; then
8537     case "${with_python}" in
8538     yes)
8539       as_fn_error "python is missing or unusable" "$LINENO" 5
8540       ;;
8541     auto)
8542       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8543 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8544       ;;
8545     *)
8546       as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8547       ;;
8548     esac
8549   else
8550     if test -n "${python_prefix}"; then
8551
8552 cat >>confdefs.h <<_ACEOF
8553 #define WITH_PYTHON_PATH "${python_prefix}"
8554 _ACEOF
8555
8556
8557   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8558      if test "x$prefix" = xNONE; then
8559         test_prefix=/usr/local
8560      else
8561         test_prefix=$prefix
8562      fi
8563   else
8564      test_prefix=$exec_prefix
8565   fi
8566   value=0
8567   case ${python_prefix} in
8568      "${test_prefix}"|"${test_prefix}/"*|\
8569         '${exec_prefix}'|'${exec_prefix}/'*)
8570      value=1
8571      ;;
8572   esac
8573
8574 cat >>confdefs.h <<_ACEOF
8575 #define PYTHON_PATH_RELOCATABLE $value
8576 _ACEOF
8577
8578
8579     fi
8580   fi
8581 fi
8582
8583 if test "${have_libpython}" != no; then
8584
8585 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
8586
8587   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8588   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8589   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
8590   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
8591   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
8592
8593   # Flags needed to compile Python code (taken from python-config --cflags).
8594   # We cannot call python-config directly because it will output whatever was
8595   # used when compiling the Python interpreter itself, including flags which
8596   # would make the python-related objects be compiled differently from the
8597   # rest of GDB (e.g., -O2 and -fPIC).
8598   if test "${GCC}" = yes; then
8599     tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8600   fi
8601
8602   if test "x${tentative_python_cflags}" != x; then
8603     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8604 $as_echo_n "checking compiler flags for python code... " >&6; }
8605     for flag in ${tentative_python_cflags}; do
8606       # Check that the compiler accepts it
8607       saved_CFLAGS="$CFLAGS"
8608       CFLAGS="$CFLAGS $flag"
8609       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8610 /* end confdefs.h.  */
8611
8612 int
8613 main ()
8614 {
8615
8616   ;
8617   return 0;
8618 }
8619 _ACEOF
8620 if ac_fn_c_try_compile "$LINENO"; then :
8621   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
8622 fi
8623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8624       CFLAGS="$saved_CFLAGS"
8625     done
8626     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8627 $as_echo "${PYTHON_CFLAGS}" >&6; }
8628   fi
8629
8630   # On IRIX, type siginfo is not defined.  Instead, sys/siginfo.h provides:
8631   #    #if _SGIAPI
8632   #    #define siginfo __siginfo
8633   #    #endif
8634   # The problem is that including Python causes some XOPEN macros to be
8635   # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8636   # to false.  So, we work around this issue by defining siginfo ourself
8637   # though the command-line.
8638   #
8639   # On x64 Windows, Python's include headers, and pyconfig.h in
8640   # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8641   # version of Windows.  Unfortunately, MS_WIN64 is only defined if
8642   # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
8643   # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8644   # The issue was reported to the Python community, but still isn't
8645   # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8646
8647   case "$gdb_host" in
8648     irix*) if test "${GCC}" = yes; then
8649              CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8650            fi
8651            ;;
8652     mingw64)
8653            if test "${GCC}" = yes; then
8654              CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8655            fi
8656            ;;
8657   esac
8658
8659   # Note that "python -m threading" cannot be used to check for
8660   # threading support due to a bug in Python 2.7.3
8661   # (http://bugs.python.org/issue15567).
8662   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8663 $as_echo_n "checking whether python supports threads... " >&6; }
8664   saved_CPPFLAGS="${CPPFLAGS}"
8665   CPPFLAGS="${PYTHON_CPPFLAGS}"
8666   # Note that the test is reversed so that python_has_threads=yes on
8667   # unexpected failures.
8668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8669 /* end confdefs.h.  */
8670
8671 #include <Python.h>
8672 #ifdef WITH_THREAD
8673 # error
8674 #endif
8675
8676 _ACEOF
8677 if ac_fn_c_try_cpp "$LINENO"; then :
8678   python_has_threads=no
8679 else
8680   python_has_threads=yes
8681 fi
8682 rm -f conftest.err conftest.$ac_ext
8683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8684 $as_echo "${python_has_threads}" >&6; }
8685   CPPFLAGS="${saved_CPPFLAGS}"
8686 else
8687   # Even if Python support is not compiled in, we need to have this file
8688   # included so that the "python" command, et.al., still exists.
8689   CONFIG_OBS="$CONFIG_OBS python.o"
8690   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
8691 fi
8692
8693
8694
8695  if test "${have_libpython}" != no; then
8696   HAVE_PYTHON_TRUE=
8697   HAVE_PYTHON_FALSE='#'
8698 else
8699   HAVE_PYTHON_TRUE='#'
8700   HAVE_PYTHON_FALSE=
8701 fi
8702
8703
8704 # -------------------- #
8705 # Check for libguile.  #
8706 # -------------------- #
8707
8708
8709
8710
8711
8712
8713 # Check whether --with-guile was given.
8714 if test "${with_guile+set}" = set; then :
8715   withval=$with_guile;
8716 else
8717   with_guile=auto
8718 fi
8719
8720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
8721 $as_echo_n "checking whether to use guile... " >&6; }
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
8723 $as_echo "$with_guile" >&6; }
8724
8725 # Extract the first word of "pkg-config", so it can be a program name with args.
8726 set dummy pkg-config; ac_word=$2
8727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8728 $as_echo_n "checking for $ac_word... " >&6; }
8729 if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
8730   $as_echo_n "(cached) " >&6
8731 else
8732   case $pkg_config_prog_path in
8733   [\\/]* | ?:[\\/]*)
8734   ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
8735   ;;
8736   *)
8737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8738 for as_dir in $PATH
8739 do
8740   IFS=$as_save_IFS
8741   test -z "$as_dir" && as_dir=.
8742     for ac_exec_ext in '' $ac_executable_extensions; do
8743   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8744     ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
8745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8746     break 2
8747   fi
8748 done
8749   done
8750 IFS=$as_save_IFS
8751
8752   test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
8753   ;;
8754 esac
8755 fi
8756 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
8757 if test -n "$pkg_config_prog_path"; then
8758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
8759 $as_echo "$pkg_config_prog_path" >&6; }
8760 else
8761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8762 $as_echo "no" >&6; }
8763 fi
8764
8765
8766
8767 try_guile_versions="guile-2.2 guile-2.0"
8768 have_libguile=no
8769 case "${with_guile}" in
8770 no)
8771   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
8772 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
8773   ;;
8774 auto)
8775   if test "${pkg_config_prog_path}" = "missing"; then
8776     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
8777 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
8778   else
8779
8780   pkg_config=${pkg_config_prog_path}
8781   guile_version_list=${try_guile_versions}
8782   flag_errors=no
8783
8784   found_usable_guile=checking
8785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8786 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8787   for guile_version in ${guile_version_list}; do
8788     ${pkg_config} --exists ${guile_version} 2>/dev/null
8789     if test $? != 0; then
8790       continue
8791     fi
8792             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8793     if test $? != 0; then
8794       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8795     fi
8796     new_LIBS=`${pkg_config} --libs ${guile_version}`
8797     if test $? != 0; then
8798       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8799     fi
8800         found_usable_guile=${guile_version}
8801     break
8802   done
8803   if test "${found_usable_guile}" = "checking"; then
8804     if test "${flag_errors}" = "yes"; then
8805       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8806     else
8807       found_usable_guile=no
8808     fi
8809   fi
8810       if test "${found_usable_guile}" != no; then
8811     save_CPPFLAGS=$CPPFLAGS
8812     save_LIBS=$LIBS
8813     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8814     LIBS="$LIBS $new_LIBS"
8815     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8816 /* end confdefs.h.  */
8817 #include "libguile.h"
8818 int
8819 main ()
8820 {
8821 scm_init_guile ();
8822   ;
8823   return 0;
8824 }
8825 _ACEOF
8826 if ac_fn_c_try_link "$LINENO"; then :
8827   have_libguile=yes
8828                     GUILE_CPPFLAGS=$new_CPPFLAGS
8829                     GUILE_LIBS=$new_LIBS
8830 else
8831   found_usable_guile=no
8832 fi
8833 rm -f core conftest.err conftest.$ac_objext \
8834     conftest$ac_exeext conftest.$ac_ext
8835     CPPFLAGS=$save_CPPFLAGS
8836     LIBS=$save_LIBS
8837     if test "${found_usable_guile}" = no; then
8838       if test "${flag_errors}" = yes; then
8839         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8840 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8841 as_fn_error "linking guile version ${guile_version} test program failed
8842 See \`config.log' for more details." "$LINENO" 5; }
8843       fi
8844     fi
8845   fi
8846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8847 $as_echo "${found_usable_guile}" >&6; }
8848
8849   fi
8850   ;;
8851 yes)
8852   if test "${pkg_config_prog_path}" = "missing"; then
8853     as_fn_error "pkg-config not found" "$LINENO" 5
8854   fi
8855
8856   pkg_config=${pkg_config_prog_path}
8857   guile_version_list=${try_guile_versions}
8858   flag_errors=yes
8859
8860   found_usable_guile=checking
8861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8862 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8863   for guile_version in ${guile_version_list}; do
8864     ${pkg_config} --exists ${guile_version} 2>/dev/null
8865     if test $? != 0; then
8866       continue
8867     fi
8868             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8869     if test $? != 0; then
8870       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8871     fi
8872     new_LIBS=`${pkg_config} --libs ${guile_version}`
8873     if test $? != 0; then
8874       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8875     fi
8876         found_usable_guile=${guile_version}
8877     break
8878   done
8879   if test "${found_usable_guile}" = "checking"; then
8880     if test "${flag_errors}" = "yes"; then
8881       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8882     else
8883       found_usable_guile=no
8884     fi
8885   fi
8886       if test "${found_usable_guile}" != no; then
8887     save_CPPFLAGS=$CPPFLAGS
8888     save_LIBS=$LIBS
8889     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8890     LIBS="$LIBS $new_LIBS"
8891     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8892 /* end confdefs.h.  */
8893 #include "libguile.h"
8894 int
8895 main ()
8896 {
8897 scm_init_guile ();
8898   ;
8899   return 0;
8900 }
8901 _ACEOF
8902 if ac_fn_c_try_link "$LINENO"; then :
8903   have_libguile=yes
8904                     GUILE_CPPFLAGS=$new_CPPFLAGS
8905                     GUILE_LIBS=$new_LIBS
8906 else
8907   found_usable_guile=no
8908 fi
8909 rm -f core conftest.err conftest.$ac_objext \
8910     conftest$ac_exeext conftest.$ac_ext
8911     CPPFLAGS=$save_CPPFLAGS
8912     LIBS=$save_LIBS
8913     if test "${found_usable_guile}" = no; then
8914       if test "${flag_errors}" = yes; then
8915         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8916 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8917 as_fn_error "linking guile version ${guile_version} test program failed
8918 See \`config.log' for more details." "$LINENO" 5; }
8919       fi
8920     fi
8921   fi
8922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8923 $as_echo "${found_usable_guile}" >&6; }
8924
8925   ;;
8926 [\\/]* | ?:[\\/]*)
8927   if test -x "${with_guile}"; then
8928
8929   pkg_config=${with_guile}
8930   guile_version_list=${try_guile_versions}
8931   flag_errors=yes
8932
8933   found_usable_guile=checking
8934   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8935 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8936   for guile_version in ${guile_version_list}; do
8937     ${pkg_config} --exists ${guile_version} 2>/dev/null
8938     if test $? != 0; then
8939       continue
8940     fi
8941             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8942     if test $? != 0; then
8943       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8944     fi
8945     new_LIBS=`${pkg_config} --libs ${guile_version}`
8946     if test $? != 0; then
8947       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8948     fi
8949         found_usable_guile=${guile_version}
8950     break
8951   done
8952   if test "${found_usable_guile}" = "checking"; then
8953     if test "${flag_errors}" = "yes"; then
8954       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8955     else
8956       found_usable_guile=no
8957     fi
8958   fi
8959       if test "${found_usable_guile}" != no; then
8960     save_CPPFLAGS=$CPPFLAGS
8961     save_LIBS=$LIBS
8962     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8963     LIBS="$LIBS $new_LIBS"
8964     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8965 /* end confdefs.h.  */
8966 #include "libguile.h"
8967 int
8968 main ()
8969 {
8970 scm_init_guile ();
8971   ;
8972   return 0;
8973 }
8974 _ACEOF
8975 if ac_fn_c_try_link "$LINENO"; then :
8976   have_libguile=yes
8977                     GUILE_CPPFLAGS=$new_CPPFLAGS
8978                     GUILE_LIBS=$new_LIBS
8979 else
8980   found_usable_guile=no
8981 fi
8982 rm -f core conftest.err conftest.$ac_objext \
8983     conftest$ac_exeext conftest.$ac_ext
8984     CPPFLAGS=$save_CPPFLAGS
8985     LIBS=$save_LIBS
8986     if test "${found_usable_guile}" = no; then
8987       if test "${flag_errors}" = yes; then
8988         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8989 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8990 as_fn_error "linking guile version ${guile_version} test program failed
8991 See \`config.log' for more details." "$LINENO" 5; }
8992       fi
8993     fi
8994   fi
8995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8996 $as_echo "${found_usable_guile}" >&6; }
8997
8998   else
8999     as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9000   fi
9001   ;;
9002 "" | */*)
9003   # Disallow --with=guile="" and --with-guile=foo/bar.
9004   as_fn_error "invalid value for --with-guile" "$LINENO" 5
9005   ;;
9006 *)
9007   # A space separate list of guile versions to try, in order.
9008   if test "${pkg_config_prog_path}" = "missing"; then
9009     as_fn_error "pkg-config not found" "$LINENO" 5
9010   fi
9011
9012   pkg_config=${pkg_config_prog_path}
9013   guile_version_list=${with_guile}
9014   flag_errors=yes
9015
9016   found_usable_guile=checking
9017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9018 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9019   for guile_version in ${guile_version_list}; do
9020     ${pkg_config} --exists ${guile_version} 2>/dev/null
9021     if test $? != 0; then
9022       continue
9023     fi
9024             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9025     if test $? != 0; then
9026       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9027     fi
9028     new_LIBS=`${pkg_config} --libs ${guile_version}`
9029     if test $? != 0; then
9030       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9031     fi
9032         found_usable_guile=${guile_version}
9033     break
9034   done
9035   if test "${found_usable_guile}" = "checking"; then
9036     if test "${flag_errors}" = "yes"; then
9037       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9038     else
9039       found_usable_guile=no
9040     fi
9041   fi
9042       if test "${found_usable_guile}" != no; then
9043     save_CPPFLAGS=$CPPFLAGS
9044     save_LIBS=$LIBS
9045     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9046     LIBS="$LIBS $new_LIBS"
9047     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9048 /* end confdefs.h.  */
9049 #include "libguile.h"
9050 int
9051 main ()
9052 {
9053 scm_init_guile ();
9054   ;
9055   return 0;
9056 }
9057 _ACEOF
9058 if ac_fn_c_try_link "$LINENO"; then :
9059   have_libguile=yes
9060                     GUILE_CPPFLAGS=$new_CPPFLAGS
9061                     GUILE_LIBS=$new_LIBS
9062 else
9063   found_usable_guile=no
9064 fi
9065 rm -f core conftest.err conftest.$ac_objext \
9066     conftest$ac_exeext conftest.$ac_ext
9067     CPPFLAGS=$save_CPPFLAGS
9068     LIBS=$save_LIBS
9069     if test "${found_usable_guile}" = no; then
9070       if test "${flag_errors}" = yes; then
9071         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9072 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9073 as_fn_error "linking guile version ${guile_version} test program failed
9074 See \`config.log' for more details." "$LINENO" 5; }
9075       fi
9076     fi
9077   fi
9078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9079 $as_echo "${found_usable_guile}" >&6; }
9080
9081   ;;
9082 esac
9083
9084 if test "${have_libguile}" != no; then
9085     case "${with_guile}" in
9086   [\\/]* | ?:[\\/]*)
9087
9088   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9089 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9090 if test "${ac_cv_guild_program_name+set}" = set; then :
9091   $as_echo_n "(cached) " >&6
9092 else
9093   ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
9094
9095      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9096      # the 'guild' and 'bindir' variables.  In that case, try to guess
9097      # what the program name is, at the risk of getting it wrong if
9098      # Guile was configured with '--program-suffix' or similar.
9099      if test "x$ac_cv_guild_program_name" = "x"; then
9100        guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
9101        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9102      fi
9103
9104 fi
9105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9106 $as_echo "$ac_cv_guild_program_name" >&6; }
9107
9108   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9109     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9110   fi
9111
9112   GUILD="$ac_cv_guild_program_name"
9113
9114
9115     ;;
9116   *)
9117
9118   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9119 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9120 if test "${ac_cv_guild_program_name+set}" = set; then :
9121   $as_echo_n "(cached) " >&6
9122 else
9123   ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9124
9125      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9126      # the 'guild' and 'bindir' variables.  In that case, try to guess
9127      # what the program name is, at the risk of getting it wrong if
9128      # Guile was configured with '--program-suffix' or similar.
9129      if test "x$ac_cv_guild_program_name" = "x"; then
9130        guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9131        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9132      fi
9133
9134 fi
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9136 $as_echo "$ac_cv_guild_program_name" >&6; }
9137
9138   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9139     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9140   fi
9141
9142   GUILD="$ac_cv_guild_program_name"
9143
9144
9145     ;;
9146   esac
9147
9148
9149   if test "$cross_compiling" = no; then
9150     GUILD_TARGET_FLAG=
9151   else
9152     GUILD_TARGET_FLAG="--target=$host"
9153   fi
9154
9155
9156
9157
9158   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9159 $as_echo_n "checking whether guild supports this host... " >&6; }
9160 if test "${ac_cv_guild_ok+set}" = set; then :
9161   $as_echo_n "(cached) " >&6
9162 else
9163   echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9164      if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9165        ac_cv_guild_ok=yes
9166      else
9167        ac_cv_guild_ok=no
9168      fi
9169 fi
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9171 $as_echo "$ac_cv_guild_ok" >&6; }
9172
9173     if test "$ac_cv_guild_ok" = no; then
9174     have_libguile=no
9175     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9176 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
9177   fi
9178 fi
9179
9180 if test "${have_libguile}" != no; then
9181
9182 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
9183
9184   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9185   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9186   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9187   CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9188   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
9189
9190     save_LIBS="$LIBS"
9191   save_CPPFLAGS="$CPPFLAGS"
9192   LIBS="$GUILE_LIBS"
9193   CPPFLAGS="$GUILE_CPPFLAGS"
9194   for ac_func in scm_new_smob
9195 do :
9196   ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9197 if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9198   cat >>confdefs.h <<_ACEOF
9199 #define HAVE_SCM_NEW_SMOB 1
9200 _ACEOF
9201
9202 fi
9203 done
9204
9205   LIBS="$save_LIBS"
9206   CPPFLAGS="$save_CPPFLAGS"
9207 else
9208   # Even if Guile support is not compiled in, we need to have these files
9209   # included.
9210   CONFIG_OBS="$CONFIG_OBS guile.o"
9211   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9212 fi
9213
9214
9215  if test "${have_libguile}" != no; then
9216   HAVE_GUILE_TRUE=
9217   HAVE_GUILE_FALSE='#'
9218 else
9219   HAVE_GUILE_TRUE='#'
9220   HAVE_GUILE_FALSE=
9221 fi
9222
9223
9224 # --------------------- #
9225 # Check for libmcheck.  #
9226 # --------------------- #
9227
9228 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
9229 # but turn it off if Python is enabled with threads, since -lmcheck is
9230 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9231 # and for releases.
9232 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9233    && $development; then
9234   libmcheck_default=yes
9235 else
9236   libmcheck_default=no
9237 fi
9238
9239   # Check whether --enable-libmcheck was given.
9240 if test "${enable_libmcheck+set}" = set; then :
9241   enableval=$enable_libmcheck; case "${enableval}" in
9242       yes | y) ENABLE_LIBMCHECK="yes" ;;
9243       no | n)  ENABLE_LIBMCHECK="no" ;;
9244       *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
9245     esac
9246 fi
9247
9248
9249   if test -z "${ENABLE_LIBMCHECK}"; then
9250     ENABLE_LIBMCHECK=${libmcheck_default}
9251   fi
9252
9253   if test "$ENABLE_LIBMCHECK" = "yes" ; then
9254     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
9255 $as_echo_n "checking for main in -lmcheck... " >&6; }
9256 if test "${ac_cv_lib_mcheck_main+set}" = set; then :
9257   $as_echo_n "(cached) " >&6
9258 else
9259   ac_check_lib_save_LIBS=$LIBS
9260 LIBS="-lmcheck  $LIBS"
9261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9262 /* end confdefs.h.  */
9263
9264
9265 int
9266 main ()
9267 {
9268 return main ();
9269   ;
9270   return 0;
9271 }
9272 _ACEOF
9273 if ac_fn_c_try_link "$LINENO"; then :
9274   ac_cv_lib_mcheck_main=yes
9275 else
9276   ac_cv_lib_mcheck_main=no
9277 fi
9278 rm -f core conftest.err conftest.$ac_objext \
9279     conftest$ac_exeext conftest.$ac_ext
9280 LIBS=$ac_check_lib_save_LIBS
9281 fi
9282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
9283 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
9284 if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
9285   cat >>confdefs.h <<_ACEOF
9286 #define HAVE_LIBMCHECK 1
9287 _ACEOF
9288
9289   LIBS="-lmcheck $LIBS"
9290
9291 fi
9292
9293   fi
9294
9295
9296 if test "$ENABLE_LIBMCHECK" = "yes" \
9297         -a "${have_libpython}" != "no" \
9298         -a "${python_has_threads}" = "yes" ; then
9299   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
9300 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
9301 fi
9302
9303 # ------------------------- #
9304 # Checks for header files.  #
9305 # ------------------------- #
9306
9307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9308 $as_echo_n "checking for ANSI C header files... " >&6; }
9309 if test "${ac_cv_header_stdc+set}" = set; then :
9310   $as_echo_n "(cached) " >&6
9311 else
9312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9313 /* end confdefs.h.  */
9314 #include <stdlib.h>
9315 #include <stdarg.h>
9316 #include <string.h>
9317 #include <float.h>
9318
9319 int
9320 main ()
9321 {
9322
9323   ;
9324   return 0;
9325 }
9326 _ACEOF
9327 if ac_fn_c_try_compile "$LINENO"; then :
9328   ac_cv_header_stdc=yes
9329 else
9330   ac_cv_header_stdc=no
9331 fi
9332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9333
9334 if test $ac_cv_header_stdc = yes; then
9335   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9337 /* end confdefs.h.  */
9338 #include <string.h>
9339
9340 _ACEOF
9341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9342   $EGREP "memchr" >/dev/null 2>&1; then :
9343
9344 else
9345   ac_cv_header_stdc=no
9346 fi
9347 rm -f conftest*
9348
9349 fi
9350
9351 if test $ac_cv_header_stdc = yes; then
9352   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9354 /* end confdefs.h.  */
9355 #include <stdlib.h>
9356
9357 _ACEOF
9358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9359   $EGREP "free" >/dev/null 2>&1; then :
9360
9361 else
9362   ac_cv_header_stdc=no
9363 fi
9364 rm -f conftest*
9365
9366 fi
9367
9368 if test $ac_cv_header_stdc = yes; then
9369   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9370   if test "$cross_compiling" = yes; then :
9371   :
9372 else
9373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9374 /* end confdefs.h.  */
9375 #include <ctype.h>
9376 #include <stdlib.h>
9377 #if ((' ' & 0x0FF) == 0x020)
9378 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9379 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9380 #else
9381 # define ISLOWER(c) \
9382                    (('a' <= (c) && (c) <= 'i') \
9383                      || ('j' <= (c) && (c) <= 'r') \
9384                      || ('s' <= (c) && (c) <= 'z'))
9385 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9386 #endif
9387
9388 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9389 int
9390 main ()
9391 {
9392   int i;
9393   for (i = 0; i < 256; i++)
9394     if (XOR (islower (i), ISLOWER (i))
9395         || toupper (i) != TOUPPER (i))
9396       return 2;
9397   return 0;
9398 }
9399 _ACEOF
9400 if ac_fn_c_try_run "$LINENO"; then :
9401
9402 else
9403   ac_cv_header_stdc=no
9404 fi
9405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9406   conftest.$ac_objext conftest.beam conftest.$ac_ext
9407 fi
9408
9409 fi
9410 fi
9411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9412 $as_echo "$ac_cv_header_stdc" >&6; }
9413 if test $ac_cv_header_stdc = yes; then
9414
9415 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9416
9417 fi
9418
9419 # elf_hp.h is for HP/UX 64-bit shared library support.
9420 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
9421                   thread_db.h \
9422                   sys/fault.h \
9423                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9424                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9425                   sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9426                   termios.h termio.h \
9427                   sgtty.h elf_hp.h \
9428                   dlfcn.h
9429 do :
9430   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9431 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9432 eval as_val=\$$as_ac_Header
9433    if test "x$as_val" = x""yes; then :
9434   cat >>confdefs.h <<_ACEOF
9435 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9436 _ACEOF
9437
9438 fi
9439
9440 done
9441
9442 for ac_header in sys/proc.h
9443 do :
9444   ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9445 # include <sys/param.h>
9446 #endif
9447
9448 "
9449 if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
9450   cat >>confdefs.h <<_ACEOF
9451 #define HAVE_SYS_PROC_H 1
9452 _ACEOF
9453
9454 fi
9455
9456 done
9457
9458 for ac_header in sys/user.h
9459 do :
9460   ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9461 # include <sys/param.h>
9462 #endif
9463
9464 "
9465 if test "x$ac_cv_header_sys_user_h" = x""yes; then :
9466   cat >>confdefs.h <<_ACEOF
9467 #define HAVE_SYS_USER_H 1
9468 _ACEOF
9469
9470 fi
9471
9472 done
9473
9474
9475 # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
9476 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9477 # think that we don't have <curses.h> if we're using GCC.
9478 case $host_os in
9479   solaris2.[789])
9480     if test "$GCC" = yes; then
9481
9482 $as_echo "#define _MSE_INT_H 1" >>confdefs.h
9483
9484     fi ;;
9485 esac
9486 for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
9487 do :
9488   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9489 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9490 eval as_val=\$$as_ac_Header
9491    if test "x$as_val" = x""yes; then :
9492   cat >>confdefs.h <<_ACEOF
9493 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9494 _ACEOF
9495
9496 fi
9497
9498 done
9499
9500 for ac_header in term.h
9501 do :
9502   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9503 # include <curses.h>
9504 #endif
9505
9506 "
9507 if test "x$ac_cv_header_term_h" = x""yes; then :
9508   cat >>confdefs.h <<_ACEOF
9509 #define HAVE_TERM_H 1
9510 _ACEOF
9511
9512 fi
9513
9514 done
9515
9516
9517 # ------------------------- #
9518 # Checks for declarations.  #
9519 # ------------------------- #
9520
9521 ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9522 if test "x$ac_cv_have_decl_free" = x""yes; then :
9523   ac_have_decl=1
9524 else
9525   ac_have_decl=0
9526 fi
9527
9528 cat >>confdefs.h <<_ACEOF
9529 #define HAVE_DECL_FREE $ac_have_decl
9530 _ACEOF
9531 ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9532 if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9533   ac_have_decl=1
9534 else
9535   ac_have_decl=0
9536 fi
9537
9538 cat >>confdefs.h <<_ACEOF
9539 #define HAVE_DECL_MALLOC $ac_have_decl
9540 _ACEOF
9541 ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9542 if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9543   ac_have_decl=1
9544 else
9545   ac_have_decl=0
9546 fi
9547
9548 cat >>confdefs.h <<_ACEOF
9549 #define HAVE_DECL_REALLOC $ac_have_decl
9550 _ACEOF
9551 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9552 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9553   ac_have_decl=1
9554 else
9555   ac_have_decl=0
9556 fi
9557
9558 cat >>confdefs.h <<_ACEOF
9559 #define HAVE_DECL_SNPRINTF $ac_have_decl
9560 _ACEOF
9561
9562
9563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9564 $as_echo_n "checking for LC_MESSAGES... " >&6; }
9565 if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9566   $as_echo_n "(cached) " >&6
9567 else
9568   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9569 /* end confdefs.h.  */
9570 #include <locale.h>
9571 int
9572 main ()
9573 {
9574 return LC_MESSAGES
9575   ;
9576   return 0;
9577 }
9578 _ACEOF
9579 if ac_fn_c_try_link "$LINENO"; then :
9580   am_cv_val_LC_MESSAGES=yes
9581 else
9582   am_cv_val_LC_MESSAGES=no
9583 fi
9584 rm -f core conftest.err conftest.$ac_objext \
9585     conftest$ac_exeext conftest.$ac_ext
9586 fi
9587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9588 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9589   if test $am_cv_val_LC_MESSAGES = yes; then
9590
9591 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9592
9593   fi
9594
9595
9596 # ----------------------- #
9597 # Checks for structures.  #
9598 # ----------------------- #
9599
9600 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9601 if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9602
9603 cat >>confdefs.h <<_ACEOF
9604 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
9605 _ACEOF
9606
9607
9608 fi
9609 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9610 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
9611
9612 cat >>confdefs.h <<_ACEOF
9613 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
9614 _ACEOF
9615
9616
9617 fi
9618
9619
9620 # ------------------ #
9621 # Checks for types.  #
9622 # ------------------ #
9623
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9625 $as_echo_n "checking return type of signal handlers... " >&6; }
9626 if test "${ac_cv_type_signal+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 <sys/types.h>
9632 #include <signal.h>
9633
9634 int
9635 main ()
9636 {
9637 return *(signal (0, 0)) (0) == 1;
9638   ;
9639   return 0;
9640 }
9641 _ACEOF
9642 if ac_fn_c_try_compile "$LINENO"; then :
9643   ac_cv_type_signal=int
9644 else
9645   ac_cv_type_signal=void
9646 fi
9647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9648 fi
9649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9650 $as_echo "$ac_cv_type_signal" >&6; }
9651
9652 cat >>confdefs.h <<_ACEOF
9653 #define RETSIGTYPE $ac_cv_type_signal
9654 _ACEOF
9655
9656
9657 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
9658 #include <sys/socket.h>
9659
9660 "
9661 if test "x$ac_cv_type_socklen_t" = x""yes; then :
9662
9663 cat >>confdefs.h <<_ACEOF
9664 #define HAVE_SOCKLEN_T 1
9665 _ACEOF
9666
9667
9668 fi
9669
9670
9671 # ------------------------------------- #
9672 # Checks for compiler characteristics.  #
9673 # ------------------------------------- #
9674
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9676 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9677 if test "${ac_cv_c_const+set}" = set; then :
9678   $as_echo_n "(cached) " >&6
9679 else
9680   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9681 /* end confdefs.h.  */
9682
9683 int
9684 main ()
9685 {
9686 /* FIXME: Include the comments suggested by Paul. */
9687 #ifndef __cplusplus
9688   /* Ultrix mips cc rejects this.  */
9689   typedef int charset[2];
9690   const charset cs;
9691   /* SunOS 4.1.1 cc rejects this.  */
9692   char const *const *pcpcc;
9693   char **ppc;
9694   /* NEC SVR4.0.2 mips cc rejects this.  */
9695   struct point {int x, y;};
9696   static struct point const zero = {0,0};
9697   /* AIX XL C 1.02.0.0 rejects this.
9698      It does not let you subtract one const X* pointer from another in
9699      an arm of an if-expression whose if-part is not a constant
9700      expression */
9701   const char *g = "string";
9702   pcpcc = &g + (g ? g-g : 0);
9703   /* HPUX 7.0 cc rejects these. */
9704   ++pcpcc;
9705   ppc = (char**) pcpcc;
9706   pcpcc = (char const *const *) ppc;
9707   { /* SCO 3.2v4 cc rejects this.  */
9708     char *t;
9709     char const *s = 0 ? (char *) 0 : (char const *) 0;
9710
9711     *t++ = 0;
9712     if (s) return 0;
9713   }
9714   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9715     int x[] = {25, 17};
9716     const int *foo = &x[0];
9717     ++foo;
9718   }
9719   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9720     typedef const int *iptr;
9721     iptr p = 0;
9722     ++p;
9723   }
9724   { /* AIX XL C 1.02.0.0 rejects this saying
9725        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9726     struct s { int j; const int *ap[3]; };
9727     struct s *b; b->j = 5;
9728   }
9729   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9730     const int foo = 10;
9731     if (!foo) return 0;
9732   }
9733   return !cs[0] && !zero.x;
9734 #endif
9735
9736   ;
9737   return 0;
9738 }
9739 _ACEOF
9740 if ac_fn_c_try_compile "$LINENO"; then :
9741   ac_cv_c_const=yes
9742 else
9743   ac_cv_c_const=no
9744 fi
9745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9746 fi
9747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9748 $as_echo "$ac_cv_c_const" >&6; }
9749 if test $ac_cv_c_const = no; then
9750
9751 $as_echo "#define const /**/" >>confdefs.h
9752
9753 fi
9754
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9756 $as_echo_n "checking for inline... " >&6; }
9757 if test "${ac_cv_c_inline+set}" = set; then :
9758   $as_echo_n "(cached) " >&6
9759 else
9760   ac_cv_c_inline=no
9761 for ac_kw in inline __inline__ __inline; do
9762   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9763 /* end confdefs.h.  */
9764 #ifndef __cplusplus
9765 typedef int foo_t;
9766 static $ac_kw foo_t static_foo () {return 0; }
9767 $ac_kw foo_t foo () {return 0; }
9768 #endif
9769
9770 _ACEOF
9771 if ac_fn_c_try_compile "$LINENO"; then :
9772   ac_cv_c_inline=$ac_kw
9773 fi
9774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9775   test "$ac_cv_c_inline" != no && break
9776 done
9777
9778 fi
9779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9780 $as_echo "$ac_cv_c_inline" >&6; }
9781
9782 case $ac_cv_c_inline in
9783   inline | yes) ;;
9784   *)
9785     case $ac_cv_c_inline in
9786       no) ac_val=;;
9787       *) ac_val=$ac_cv_c_inline;;
9788     esac
9789     cat >>confdefs.h <<_ACEOF
9790 #ifndef __cplusplus
9791 #define inline $ac_val
9792 #endif
9793 _ACEOF
9794     ;;
9795 esac
9796
9797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9798 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9799 if test "${ac_cv_c_bigendian+set}" = set; then :
9800   $as_echo_n "(cached) " >&6
9801 else
9802   ac_cv_c_bigendian=unknown
9803     # See if we're dealing with a universal compiler.
9804     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9805 /* end confdefs.h.  */
9806 #ifndef __APPLE_CC__
9807                not a universal capable compiler
9808              #endif
9809              typedef int dummy;
9810
9811 _ACEOF
9812 if ac_fn_c_try_compile "$LINENO"; then :
9813
9814         # Check for potential -arch flags.  It is not universal unless
9815         # there are at least two -arch flags with different values.
9816         ac_arch=
9817         ac_prev=
9818         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9819          if test -n "$ac_prev"; then
9820            case $ac_word in
9821              i?86 | x86_64 | ppc | ppc64)
9822                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9823                  ac_arch=$ac_word
9824                else
9825                  ac_cv_c_bigendian=universal
9826                  break
9827                fi
9828                ;;
9829            esac
9830            ac_prev=
9831          elif test "x$ac_word" = "x-arch"; then
9832            ac_prev=arch
9833          fi
9834        done
9835 fi
9836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9837     if test $ac_cv_c_bigendian = unknown; then
9838       # See if sys/param.h defines the BYTE_ORDER macro.
9839       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9840 /* end confdefs.h.  */
9841 #include <sys/types.h>
9842              #include <sys/param.h>
9843
9844 int
9845 main ()
9846 {
9847 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9848                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9849                      && LITTLE_ENDIAN)
9850               bogus endian macros
9851              #endif
9852
9853   ;
9854   return 0;
9855 }
9856 _ACEOF
9857 if ac_fn_c_try_compile "$LINENO"; then :
9858   # It does; now see whether it defined to BIG_ENDIAN or not.
9859          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9860 /* end confdefs.h.  */
9861 #include <sys/types.h>
9862                 #include <sys/param.h>
9863
9864 int
9865 main ()
9866 {
9867 #if BYTE_ORDER != BIG_ENDIAN
9868                  not big endian
9869                 #endif
9870
9871   ;
9872   return 0;
9873 }
9874 _ACEOF
9875 if ac_fn_c_try_compile "$LINENO"; then :
9876   ac_cv_c_bigendian=yes
9877 else
9878   ac_cv_c_bigendian=no
9879 fi
9880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9881 fi
9882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9883     fi
9884     if test $ac_cv_c_bigendian = unknown; then
9885       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9886       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9887 /* end confdefs.h.  */
9888 #include <limits.h>
9889
9890 int
9891 main ()
9892 {
9893 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9894               bogus endian macros
9895              #endif
9896
9897   ;
9898   return 0;
9899 }
9900 _ACEOF
9901 if ac_fn_c_try_compile "$LINENO"; then :
9902   # It does; now see whether it defined to _BIG_ENDIAN or not.
9903          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9904 /* end confdefs.h.  */
9905 #include <limits.h>
9906
9907 int
9908 main ()
9909 {
9910 #ifndef _BIG_ENDIAN
9911                  not big endian
9912                 #endif
9913
9914   ;
9915   return 0;
9916 }
9917 _ACEOF
9918 if ac_fn_c_try_compile "$LINENO"; then :
9919   ac_cv_c_bigendian=yes
9920 else
9921   ac_cv_c_bigendian=no
9922 fi
9923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9924 fi
9925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9926     fi
9927     if test $ac_cv_c_bigendian = unknown; then
9928       # Compile a test program.
9929       if test "$cross_compiling" = yes; then :
9930   # Try to guess by grepping values from an object file.
9931          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9932 /* end confdefs.h.  */
9933 short int ascii_mm[] =
9934                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9935                 short int ascii_ii[] =
9936                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9937                 int use_ascii (int i) {
9938                   return ascii_mm[i] + ascii_ii[i];
9939                 }
9940                 short int ebcdic_ii[] =
9941                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9942                 short int ebcdic_mm[] =
9943                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9944                 int use_ebcdic (int i) {
9945                   return ebcdic_mm[i] + ebcdic_ii[i];
9946                 }
9947                 extern int foo;
9948
9949 int
9950 main ()
9951 {
9952 return use_ascii (foo) == use_ebcdic (foo);
9953   ;
9954   return 0;
9955 }
9956 _ACEOF
9957 if ac_fn_c_try_compile "$LINENO"; then :
9958   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9959               ac_cv_c_bigendian=yes
9960             fi
9961             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9962               if test "$ac_cv_c_bigendian" = unknown; then
9963                 ac_cv_c_bigendian=no
9964               else
9965                 # finding both strings is unlikely to happen, but who knows?
9966                 ac_cv_c_bigendian=unknown
9967               fi
9968             fi
9969 fi
9970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9971 else
9972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9973 /* end confdefs.h.  */
9974 $ac_includes_default
9975 int
9976 main ()
9977 {
9978
9979              /* Are we little or big endian?  From Harbison&Steele.  */
9980              union
9981              {
9982                long int l;
9983                char c[sizeof (long int)];
9984              } u;
9985              u.l = 1;
9986              return u.c[sizeof (long int) - 1] == 1;
9987
9988   ;
9989   return 0;
9990 }
9991 _ACEOF
9992 if ac_fn_c_try_run "$LINENO"; then :
9993   ac_cv_c_bigendian=no
9994 else
9995   ac_cv_c_bigendian=yes
9996 fi
9997 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9998   conftest.$ac_objext conftest.beam conftest.$ac_ext
9999 fi
10000
10001     fi
10002 fi
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10004 $as_echo "$ac_cv_c_bigendian" >&6; }
10005  case $ac_cv_c_bigendian in #(
10006    yes)
10007      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10008 ;; #(
10009    no)
10010       ;; #(
10011    universal)
10012
10013 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10014
10015      ;; #(
10016    *)
10017      as_fn_error "unknown endianness
10018  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10019  esac
10020
10021
10022 # ------------------------------ #
10023 # Checks for library functions.  #
10024 # ------------------------------ #
10025
10026 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10027 # for constant arguments.  Useless!
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10029 $as_echo_n "checking for working alloca.h... " >&6; }
10030 if test "${ac_cv_working_alloca_h+set}" = set; then :
10031   $as_echo_n "(cached) " >&6
10032 else
10033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10034 /* end confdefs.h.  */
10035 #include <alloca.h>
10036 int
10037 main ()
10038 {
10039 char *p = (char *) alloca (2 * sizeof (int));
10040                           if (p) return 0;
10041   ;
10042   return 0;
10043 }
10044 _ACEOF
10045 if ac_fn_c_try_link "$LINENO"; then :
10046   ac_cv_working_alloca_h=yes
10047 else
10048   ac_cv_working_alloca_h=no
10049 fi
10050 rm -f core conftest.err conftest.$ac_objext \
10051     conftest$ac_exeext conftest.$ac_ext
10052 fi
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10054 $as_echo "$ac_cv_working_alloca_h" >&6; }
10055 if test $ac_cv_working_alloca_h = yes; then
10056
10057 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10058
10059 fi
10060
10061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10062 $as_echo_n "checking for alloca... " >&6; }
10063 if test "${ac_cv_func_alloca_works+set}" = set; then :
10064   $as_echo_n "(cached) " >&6
10065 else
10066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10067 /* end confdefs.h.  */
10068 #ifdef __GNUC__
10069 # define alloca __builtin_alloca
10070 #else
10071 # ifdef _MSC_VER
10072 #  include <malloc.h>
10073 #  define alloca _alloca
10074 # else
10075 #  ifdef HAVE_ALLOCA_H
10076 #   include <alloca.h>
10077 #  else
10078 #   ifdef _AIX
10079  #pragma alloca
10080 #   else
10081 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10082 char *alloca ();
10083 #    endif
10084 #   endif
10085 #  endif
10086 # endif
10087 #endif
10088
10089 int
10090 main ()
10091 {
10092 char *p = (char *) alloca (1);
10093                                     if (p) return 0;
10094   ;
10095   return 0;
10096 }
10097 _ACEOF
10098 if ac_fn_c_try_link "$LINENO"; then :
10099   ac_cv_func_alloca_works=yes
10100 else
10101   ac_cv_func_alloca_works=no
10102 fi
10103 rm -f core conftest.err conftest.$ac_objext \
10104     conftest$ac_exeext conftest.$ac_ext
10105 fi
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10107 $as_echo "$ac_cv_func_alloca_works" >&6; }
10108
10109 if test $ac_cv_func_alloca_works = yes; then
10110
10111 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10112
10113 else
10114   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10115 # that cause trouble.  Some versions do not even contain alloca or
10116 # contain a buggy version.  If you still want to use their alloca,
10117 # use ar to extract alloca.o from them instead of compiling alloca.c.
10118
10119 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10120
10121 $as_echo "#define C_ALLOCA 1" >>confdefs.h
10122
10123
10124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10125 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10126 if test "${ac_cv_os_cray+set}" = set; then :
10127   $as_echo_n "(cached) " >&6
10128 else
10129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10130 /* end confdefs.h.  */
10131 #if defined CRAY && ! defined CRAY2
10132 webecray
10133 #else
10134 wenotbecray
10135 #endif
10136
10137 _ACEOF
10138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10139   $EGREP "webecray" >/dev/null 2>&1; then :
10140   ac_cv_os_cray=yes
10141 else
10142   ac_cv_os_cray=no
10143 fi
10144 rm -f conftest*
10145
10146 fi
10147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10148 $as_echo "$ac_cv_os_cray" >&6; }
10149 if test $ac_cv_os_cray = yes; then
10150   for ac_func in _getb67 GETB67 getb67; do
10151     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10152 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10153 eval as_val=\$$as_ac_var
10154    if test "x$as_val" = x""yes; then :
10155
10156 cat >>confdefs.h <<_ACEOF
10157 #define CRAY_STACKSEG_END $ac_func
10158 _ACEOF
10159
10160     break
10161 fi
10162
10163   done
10164 fi
10165
10166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10167 $as_echo_n "checking stack direction for C alloca... " >&6; }
10168 if test "${ac_cv_c_stack_direction+set}" = set; then :
10169   $as_echo_n "(cached) " >&6
10170 else
10171   if test "$cross_compiling" = yes; then :
10172   ac_cv_c_stack_direction=0
10173 else
10174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10175 /* end confdefs.h.  */
10176 $ac_includes_default
10177 int
10178 find_stack_direction ()
10179 {
10180   static char *addr = 0;
10181   auto char dummy;
10182   if (addr == 0)
10183     {
10184       addr = &dummy;
10185       return find_stack_direction ();
10186     }
10187   else
10188     return (&dummy > addr) ? 1 : -1;
10189 }
10190
10191 int
10192 main ()
10193 {
10194   return find_stack_direction () < 0;
10195 }
10196 _ACEOF
10197 if ac_fn_c_try_run "$LINENO"; then :
10198   ac_cv_c_stack_direction=1
10199 else
10200   ac_cv_c_stack_direction=-1
10201 fi
10202 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10203   conftest.$ac_objext conftest.beam conftest.$ac_ext
10204 fi
10205
10206 fi
10207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10208 $as_echo "$ac_cv_c_stack_direction" >&6; }
10209 cat >>confdefs.h <<_ACEOF
10210 #define STACK_DIRECTION $ac_cv_c_stack_direction
10211 _ACEOF
10212
10213
10214 fi
10215
10216 for ac_header in stdlib.h unistd.h
10217 do :
10218   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10219 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10220 eval as_val=\$$as_ac_Header
10221    if test "x$as_val" = x""yes; then :
10222   cat >>confdefs.h <<_ACEOF
10223 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10224 _ACEOF
10225
10226 fi
10227
10228 done
10229
10230 for ac_func in getpagesize
10231 do :
10232   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10233 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10234   cat >>confdefs.h <<_ACEOF
10235 #define HAVE_GETPAGESIZE 1
10236 _ACEOF
10237
10238 fi
10239 done
10240
10241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10242 $as_echo_n "checking for working mmap... " >&6; }
10243 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10244   $as_echo_n "(cached) " >&6
10245 else
10246   if test "$cross_compiling" = yes; then :
10247   ac_cv_func_mmap_fixed_mapped=no
10248 else
10249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10250 /* end confdefs.h.  */
10251 $ac_includes_default
10252 /* malloc might have been renamed as rpl_malloc. */
10253 #undef malloc
10254
10255 /* Thanks to Mike Haertel and Jim Avera for this test.
10256    Here is a matrix of mmap possibilities:
10257         mmap private not fixed
10258         mmap private fixed at somewhere currently unmapped
10259         mmap private fixed at somewhere already mapped
10260         mmap shared not fixed
10261         mmap shared fixed at somewhere currently unmapped
10262         mmap shared fixed at somewhere already mapped
10263    For private mappings, we should verify that changes cannot be read()
10264    back from the file, nor mmap's back from the file at a different
10265    address.  (There have been systems where private was not correctly
10266    implemented like the infamous i386 svr4.0, and systems where the
10267    VM page cache was not coherent with the file system buffer cache
10268    like early versions of FreeBSD and possibly contemporary NetBSD.)
10269    For shared mappings, we should conversely verify that changes get
10270    propagated back to all the places they're supposed to be.
10271
10272    Grep wants private fixed already mapped.
10273    The main things grep needs to know about mmap are:
10274    * does it exist and is it safe to write into the mmap'd area
10275    * how to use it (BSD variants)  */
10276
10277 #include <fcntl.h>
10278 #include <sys/mman.h>
10279
10280 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10281 char *malloc ();
10282 #endif
10283
10284 /* This mess was copied from the GNU getpagesize.h.  */
10285 #ifndef HAVE_GETPAGESIZE
10286 /* Assume that all systems that can run configure have sys/param.h.  */
10287 # ifndef HAVE_SYS_PARAM_H
10288 #  define HAVE_SYS_PARAM_H 1
10289 # endif
10290
10291 # ifdef _SC_PAGESIZE
10292 #  define getpagesize() sysconf(_SC_PAGESIZE)
10293 # else /* no _SC_PAGESIZE */
10294 #  ifdef HAVE_SYS_PARAM_H
10295 #   include <sys/param.h>
10296 #   ifdef EXEC_PAGESIZE
10297 #    define getpagesize() EXEC_PAGESIZE
10298 #   else /* no EXEC_PAGESIZE */
10299 #    ifdef NBPG
10300 #     define getpagesize() NBPG * CLSIZE
10301 #     ifndef CLSIZE
10302 #      define CLSIZE 1
10303 #     endif /* no CLSIZE */
10304 #    else /* no NBPG */
10305 #     ifdef NBPC
10306 #      define getpagesize() NBPC
10307 #     else /* no NBPC */
10308 #      ifdef PAGESIZE
10309 #       define getpagesize() PAGESIZE
10310 #      endif /* PAGESIZE */
10311 #     endif /* no NBPC */
10312 #    endif /* no NBPG */
10313 #   endif /* no EXEC_PAGESIZE */
10314 #  else /* no HAVE_SYS_PARAM_H */
10315 #   define getpagesize() 8192   /* punt totally */
10316 #  endif /* no HAVE_SYS_PARAM_H */
10317 # endif /* no _SC_PAGESIZE */
10318
10319 #endif /* no HAVE_GETPAGESIZE */
10320
10321 int
10322 main ()
10323 {
10324   char *data, *data2, *data3;
10325   int i, pagesize;
10326   int fd;
10327
10328   pagesize = getpagesize ();
10329
10330   /* First, make a file with some known garbage in it. */
10331   data = (char *) malloc (pagesize);
10332   if (!data)
10333     return 1;
10334   for (i = 0; i < pagesize; ++i)
10335     *(data + i) = rand ();
10336   umask (0);
10337   fd = creat ("conftest.mmap", 0600);
10338   if (fd < 0)
10339     return 1;
10340   if (write (fd, data, pagesize) != pagesize)
10341     return 1;
10342   close (fd);
10343
10344   /* Next, try to mmap the file at a fixed address which already has
10345      something else allocated at it.  If we can, also make sure that
10346      we see the same garbage.  */
10347   fd = open ("conftest.mmap", O_RDWR);
10348   if (fd < 0)
10349     return 1;
10350   data2 = (char *) malloc (2 * pagesize);
10351   if (!data2)
10352     return 1;
10353   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
10354   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10355                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
10356     return 1;
10357   for (i = 0; i < pagesize; ++i)
10358     if (*(data + i) != *(data2 + i))
10359       return 1;
10360
10361   /* Finally, make sure that changes to the mapped area do not
10362      percolate back to the file as seen by read().  (This is a bug on
10363      some variants of i386 svr4.0.)  */
10364   for (i = 0; i < pagesize; ++i)
10365     *(data2 + i) = *(data2 + i) + 1;
10366   data3 = (char *) malloc (pagesize);
10367   if (!data3)
10368     return 1;
10369   if (read (fd, data3, pagesize) != pagesize)
10370     return 1;
10371   for (i = 0; i < pagesize; ++i)
10372     if (*(data + i) != *(data3 + i))
10373       return 1;
10374   close (fd);
10375   return 0;
10376 }
10377 _ACEOF
10378 if ac_fn_c_try_run "$LINENO"; then :
10379   ac_cv_func_mmap_fixed_mapped=yes
10380 else
10381   ac_cv_func_mmap_fixed_mapped=no
10382 fi
10383 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10384   conftest.$ac_objext conftest.beam conftest.$ac_ext
10385 fi
10386
10387 fi
10388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10389 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10390 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10391
10392 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10393
10394 fi
10395 rm -f conftest.mmap
10396
10397 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10398 if test "x$ac_cv_type_pid_t" = x""yes; then :
10399
10400 else
10401
10402 cat >>confdefs.h <<_ACEOF
10403 #define pid_t int
10404 _ACEOF
10405
10406 fi
10407
10408 for ac_header in vfork.h
10409 do :
10410   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10411 if test "x$ac_cv_header_vfork_h" = x""yes; then :
10412   cat >>confdefs.h <<_ACEOF
10413 #define HAVE_VFORK_H 1
10414 _ACEOF
10415
10416 fi
10417
10418 done
10419
10420 for ac_func in fork vfork
10421 do :
10422   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10423 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10424 eval as_val=\$$as_ac_var
10425    if test "x$as_val" = x""yes; then :
10426   cat >>confdefs.h <<_ACEOF
10427 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10428 _ACEOF
10429
10430 fi
10431 done
10432
10433 if test "x$ac_cv_func_fork" = xyes; then
10434   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
10435 $as_echo_n "checking for working fork... " >&6; }
10436 if test "${ac_cv_func_fork_works+set}" = set; then :
10437   $as_echo_n "(cached) " >&6
10438 else
10439   if test "$cross_compiling" = yes; then :
10440   ac_cv_func_fork_works=cross
10441 else
10442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10443 /* end confdefs.h.  */
10444 $ac_includes_default
10445 int
10446 main ()
10447 {
10448
10449           /* By Ruediger Kuhlmann. */
10450           return fork () < 0;
10451
10452   ;
10453   return 0;
10454 }
10455 _ACEOF
10456 if ac_fn_c_try_run "$LINENO"; then :
10457   ac_cv_func_fork_works=yes
10458 else
10459   ac_cv_func_fork_works=no
10460 fi
10461 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10462   conftest.$ac_objext conftest.beam conftest.$ac_ext
10463 fi
10464
10465 fi
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10467 $as_echo "$ac_cv_func_fork_works" >&6; }
10468
10469 else
10470   ac_cv_func_fork_works=$ac_cv_func_fork
10471 fi
10472 if test "x$ac_cv_func_fork_works" = xcross; then
10473   case $host in
10474     *-*-amigaos* | *-*-msdosdjgpp*)
10475       # Override, as these systems have only a dummy fork() stub
10476       ac_cv_func_fork_works=no
10477       ;;
10478     *)
10479       ac_cv_func_fork_works=yes
10480       ;;
10481   esac
10482   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10483 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
10484 fi
10485 ac_cv_func_vfork_works=$ac_cv_func_vfork
10486 if test "x$ac_cv_func_vfork" = xyes; then
10487   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10488 $as_echo_n "checking for working vfork... " >&6; }
10489 if test "${ac_cv_func_vfork_works+set}" = set; then :
10490   $as_echo_n "(cached) " >&6
10491 else
10492   if test "$cross_compiling" = yes; then :
10493   ac_cv_func_vfork_works=cross
10494 else
10495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496 /* end confdefs.h.  */
10497 /* Thanks to Paul Eggert for this test.  */
10498 $ac_includes_default
10499 #include <sys/wait.h>
10500 #ifdef HAVE_VFORK_H
10501 # include <vfork.h>
10502 #endif
10503 /* On some sparc systems, changes by the child to local and incoming
10504    argument registers are propagated back to the parent.  The compiler
10505    is told about this with #include <vfork.h>, but some compilers
10506    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
10507    static variable whose address is put into a register that is
10508    clobbered by the vfork.  */
10509 static void
10510 #ifdef __cplusplus
10511 sparc_address_test (int arg)
10512 # else
10513 sparc_address_test (arg) int arg;
10514 #endif
10515 {
10516   static pid_t child;
10517   if (!child) {
10518     child = vfork ();
10519     if (child < 0) {
10520       perror ("vfork");
10521       _exit(2);
10522     }
10523     if (!child) {
10524       arg = getpid();
10525       write(-1, "", 0);
10526       _exit (arg);
10527     }
10528   }
10529 }
10530
10531 int
10532 main ()
10533 {
10534   pid_t parent = getpid ();
10535   pid_t child;
10536
10537   sparc_address_test (0);
10538
10539   child = vfork ();
10540
10541   if (child == 0) {
10542     /* Here is another test for sparc vfork register problems.  This
10543        test uses lots of local variables, at least as many local
10544        variables as main has allocated so far including compiler
10545        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
10546        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
10547        reuse the register of parent for one of the local variables,
10548        since it will think that parent can't possibly be used any more
10549        in this routine.  Assigning to the local variable will thus
10550        munge parent in the parent process.  */
10551     pid_t
10552       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10553       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10554     /* Convince the compiler that p..p7 are live; otherwise, it might
10555        use the same hardware register for all 8 local variables.  */
10556     if (p != p1 || p != p2 || p != p3 || p != p4
10557         || p != p5 || p != p6 || p != p7)
10558       _exit(1);
10559
10560     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10561        from child file descriptors.  If the child closes a descriptor
10562        before it execs or exits, this munges the parent's descriptor
10563        as well.  Test for this by closing stdout in the child.  */
10564     _exit(close(fileno(stdout)) != 0);
10565   } else {
10566     int status;
10567     struct stat st;
10568
10569     while (wait(&status) != child)
10570       ;
10571     return (
10572          /* Was there some problem with vforking?  */
10573          child < 0
10574
10575          /* Did the child fail?  (This shouldn't happen.)  */
10576          || status
10577
10578          /* Did the vfork/compiler bug occur?  */
10579          || parent != getpid()
10580
10581          /* Did the file descriptor bug occur?  */
10582          || fstat(fileno(stdout), &st) != 0
10583          );
10584   }
10585 }
10586 _ACEOF
10587 if ac_fn_c_try_run "$LINENO"; then :
10588   ac_cv_func_vfork_works=yes
10589 else
10590   ac_cv_func_vfork_works=no
10591 fi
10592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10593   conftest.$ac_objext conftest.beam conftest.$ac_ext
10594 fi
10595
10596 fi
10597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10598 $as_echo "$ac_cv_func_vfork_works" >&6; }
10599
10600 fi;
10601 if test "x$ac_cv_func_fork_works" = xcross; then
10602   ac_cv_func_vfork_works=$ac_cv_func_vfork
10603   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10604 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
10605 fi
10606
10607 if test "x$ac_cv_func_vfork_works" = xyes; then
10608
10609 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
10610
10611 else
10612
10613 $as_echo "#define vfork fork" >>confdefs.h
10614
10615 fi
10616 if test "x$ac_cv_func_fork_works" = xyes; then
10617
10618 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
10619
10620 fi
10621
10622 for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
10623                 pipe poll pread pread64 pwrite readlink resize_term \
10624                 sbrk setpgid setpgrp setsid \
10625                 sigaction sigprocmask sigsetmask socketpair \
10626                 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
10627                 setrlimit getrlimit posix_madvise waitpid lstat \
10628                 ptrace64
10629 do :
10630   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10631 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10632 eval as_val=\$$as_ac_var
10633    if test "x$as_val" = x""yes; then :
10634   cat >>confdefs.h <<_ACEOF
10635 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10636 _ACEOF
10637
10638 fi
10639 done
10640
10641
10642   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10643 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10644 if test "${am_cv_langinfo_codeset+set}" = set; then :
10645   $as_echo_n "(cached) " >&6
10646 else
10647   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10648 /* end confdefs.h.  */
10649 #include <langinfo.h>
10650 int
10651 main ()
10652 {
10653 char* cs = nl_langinfo(CODESET);
10654   ;
10655   return 0;
10656 }
10657 _ACEOF
10658 if ac_fn_c_try_link "$LINENO"; then :
10659   am_cv_langinfo_codeset=yes
10660 else
10661   am_cv_langinfo_codeset=no
10662 fi
10663 rm -f core conftest.err conftest.$ac_objext \
10664     conftest$ac_exeext conftest.$ac_ext
10665
10666 fi
10667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10668 $as_echo "$am_cv_langinfo_codeset" >&6; }
10669   if test $am_cv_langinfo_codeset = yes; then
10670
10671 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10672
10673   fi
10674
10675
10676   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10677 $as_echo_n "checking for ANSI C header files... " >&6; }
10678 if test "${ac_cv_header_stdc+set}" = set; then :
10679   $as_echo_n "(cached) " >&6
10680 else
10681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10682 /* end confdefs.h.  */
10683 #include <stdlib.h>
10684 #include <stdarg.h>
10685 #include <string.h>
10686 #include <float.h>
10687
10688 int
10689 main ()
10690 {
10691
10692   ;
10693   return 0;
10694 }
10695 _ACEOF
10696 if ac_fn_c_try_compile "$LINENO"; then :
10697   ac_cv_header_stdc=yes
10698 else
10699   ac_cv_header_stdc=no
10700 fi
10701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10702
10703 if test $ac_cv_header_stdc = yes; then
10704   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10706 /* end confdefs.h.  */
10707 #include <string.h>
10708
10709 _ACEOF
10710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10711   $EGREP "memchr" >/dev/null 2>&1; then :
10712
10713 else
10714   ac_cv_header_stdc=no
10715 fi
10716 rm -f conftest*
10717
10718 fi
10719
10720 if test $ac_cv_header_stdc = yes; then
10721   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10723 /* end confdefs.h.  */
10724 #include <stdlib.h>
10725
10726 _ACEOF
10727 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10728   $EGREP "free" >/dev/null 2>&1; then :
10729
10730 else
10731   ac_cv_header_stdc=no
10732 fi
10733 rm -f conftest*
10734
10735 fi
10736
10737 if test $ac_cv_header_stdc = yes; then
10738   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10739   if test "$cross_compiling" = yes; then :
10740   :
10741 else
10742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10743 /* end confdefs.h.  */
10744 #include <ctype.h>
10745 #include <stdlib.h>
10746 #if ((' ' & 0x0FF) == 0x020)
10747 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10748 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10749 #else
10750 # define ISLOWER(c) \
10751                    (('a' <= (c) && (c) <= 'i') \
10752                      || ('j' <= (c) && (c) <= 'r') \
10753                      || ('s' <= (c) && (c) <= 'z'))
10754 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10755 #endif
10756
10757 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10758 int
10759 main ()
10760 {
10761   int i;
10762   for (i = 0; i < 256; i++)
10763     if (XOR (islower (i), ISLOWER (i))
10764         || toupper (i) != TOUPPER (i))
10765       return 2;
10766   return 0;
10767 }
10768 _ACEOF
10769 if ac_fn_c_try_run "$LINENO"; then :
10770
10771 else
10772   ac_cv_header_stdc=no
10773 fi
10774 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10775   conftest.$ac_objext conftest.beam conftest.$ac_ext
10776 fi
10777
10778 fi
10779 fi
10780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10781 $as_echo "$ac_cv_header_stdc" >&6; }
10782 if test $ac_cv_header_stdc = yes; then
10783
10784 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10785
10786 fi
10787
10788   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10789 # for constant arguments.  Useless!
10790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10791 $as_echo_n "checking for working alloca.h... " >&6; }
10792 if test "${ac_cv_working_alloca_h+set}" = set; then :
10793   $as_echo_n "(cached) " >&6
10794 else
10795   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10796 /* end confdefs.h.  */
10797 #include <alloca.h>
10798 int
10799 main ()
10800 {
10801 char *p = (char *) alloca (2 * sizeof (int));
10802                           if (p) return 0;
10803   ;
10804   return 0;
10805 }
10806 _ACEOF
10807 if ac_fn_c_try_link "$LINENO"; then :
10808   ac_cv_working_alloca_h=yes
10809 else
10810   ac_cv_working_alloca_h=no
10811 fi
10812 rm -f core conftest.err conftest.$ac_objext \
10813     conftest$ac_exeext conftest.$ac_ext
10814 fi
10815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10816 $as_echo "$ac_cv_working_alloca_h" >&6; }
10817 if test $ac_cv_working_alloca_h = yes; then
10818
10819 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10820
10821 fi
10822
10823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10824 $as_echo_n "checking for alloca... " >&6; }
10825 if test "${ac_cv_func_alloca_works+set}" = set; then :
10826   $as_echo_n "(cached) " >&6
10827 else
10828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10829 /* end confdefs.h.  */
10830 #ifdef __GNUC__
10831 # define alloca __builtin_alloca
10832 #else
10833 # ifdef _MSC_VER
10834 #  include <malloc.h>
10835 #  define alloca _alloca
10836 # else
10837 #  ifdef HAVE_ALLOCA_H
10838 #   include <alloca.h>
10839 #  else
10840 #   ifdef _AIX
10841  #pragma alloca
10842 #   else
10843 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10844 char *alloca ();
10845 #    endif
10846 #   endif
10847 #  endif
10848 # endif
10849 #endif
10850
10851 int
10852 main ()
10853 {
10854 char *p = (char *) alloca (1);
10855                                     if (p) return 0;
10856   ;
10857   return 0;
10858 }
10859 _ACEOF
10860 if ac_fn_c_try_link "$LINENO"; then :
10861   ac_cv_func_alloca_works=yes
10862 else
10863   ac_cv_func_alloca_works=no
10864 fi
10865 rm -f core conftest.err conftest.$ac_objext \
10866     conftest$ac_exeext conftest.$ac_ext
10867 fi
10868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10869 $as_echo "$ac_cv_func_alloca_works" >&6; }
10870
10871 if test $ac_cv_func_alloca_works = yes; then
10872
10873 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10874
10875 else
10876   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10877 # that cause trouble.  Some versions do not even contain alloca or
10878 # contain a buggy version.  If you still want to use their alloca,
10879 # use ar to extract alloca.o from them instead of compiling alloca.c.
10880
10881 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10882
10883 $as_echo "#define C_ALLOCA 1" >>confdefs.h
10884
10885
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10887 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10888 if test "${ac_cv_os_cray+set}" = set; then :
10889   $as_echo_n "(cached) " >&6
10890 else
10891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10892 /* end confdefs.h.  */
10893 #if defined CRAY && ! defined CRAY2
10894 webecray
10895 #else
10896 wenotbecray
10897 #endif
10898
10899 _ACEOF
10900 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10901   $EGREP "webecray" >/dev/null 2>&1; then :
10902   ac_cv_os_cray=yes
10903 else
10904   ac_cv_os_cray=no
10905 fi
10906 rm -f conftest*
10907
10908 fi
10909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10910 $as_echo "$ac_cv_os_cray" >&6; }
10911 if test $ac_cv_os_cray = yes; then
10912   for ac_func in _getb67 GETB67 getb67; do
10913     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10914 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10915 eval as_val=\$$as_ac_var
10916    if test "x$as_val" = x""yes; then :
10917
10918 cat >>confdefs.h <<_ACEOF
10919 #define CRAY_STACKSEG_END $ac_func
10920 _ACEOF
10921
10922     break
10923 fi
10924
10925   done
10926 fi
10927
10928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10929 $as_echo_n "checking stack direction for C alloca... " >&6; }
10930 if test "${ac_cv_c_stack_direction+set}" = set; then :
10931   $as_echo_n "(cached) " >&6
10932 else
10933   if test "$cross_compiling" = yes; then :
10934   ac_cv_c_stack_direction=0
10935 else
10936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10937 /* end confdefs.h.  */
10938 $ac_includes_default
10939 int
10940 find_stack_direction ()
10941 {
10942   static char *addr = 0;
10943   auto char dummy;
10944   if (addr == 0)
10945     {
10946       addr = &dummy;
10947       return find_stack_direction ();
10948     }
10949   else
10950     return (&dummy > addr) ? 1 : -1;
10951 }
10952
10953 int
10954 main ()
10955 {
10956   return find_stack_direction () < 0;
10957 }
10958 _ACEOF
10959 if ac_fn_c_try_run "$LINENO"; then :
10960   ac_cv_c_stack_direction=1
10961 else
10962   ac_cv_c_stack_direction=-1
10963 fi
10964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10965   conftest.$ac_objext conftest.beam conftest.$ac_ext
10966 fi
10967
10968 fi
10969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10970 $as_echo "$ac_cv_c_stack_direction" >&6; }
10971 cat >>confdefs.h <<_ACEOF
10972 #define STACK_DIRECTION $ac_cv_c_stack_direction
10973 _ACEOF
10974
10975
10976 fi
10977
10978
10979
10980   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10981 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10982 if test "${am_cv_langinfo_codeset+set}" = set; then :
10983   $as_echo_n "(cached) " >&6
10984 else
10985   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10986 /* end confdefs.h.  */
10987 #include <langinfo.h>
10988 int
10989 main ()
10990 {
10991 char* cs = nl_langinfo(CODESET);
10992   ;
10993   return 0;
10994 }
10995 _ACEOF
10996 if ac_fn_c_try_link "$LINENO"; then :
10997   am_cv_langinfo_codeset=yes
10998 else
10999   am_cv_langinfo_codeset=no
11000 fi
11001 rm -f core conftest.err conftest.$ac_objext \
11002     conftest$ac_exeext conftest.$ac_ext
11003
11004 fi
11005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11006 $as_echo "$am_cv_langinfo_codeset" >&6; }
11007   if test $am_cv_langinfo_codeset = yes; then
11008
11009 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
11010
11011   fi
11012
11013
11014   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
11015 do :
11016   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11017 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11018 eval as_val=\$$as_ac_Header
11019    if test "x$as_val" = x""yes; then :
11020   cat >>confdefs.h <<_ACEOF
11021 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11022 _ACEOF
11023
11024 fi
11025
11026 done
11027
11028
11029   for ac_func in fdwalk getrlimit pipe pipe2 socketpair
11030 do :
11031   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11032 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11033 eval as_val=\$$as_ac_var
11034    if test "x$as_val" = x""yes; then :
11035   cat >>confdefs.h <<_ACEOF
11036 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11037 _ACEOF
11038
11039 fi
11040 done
11041
11042
11043   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11044 if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11045   ac_have_decl=1
11046 else
11047   ac_have_decl=0
11048 fi
11049
11050 cat >>confdefs.h <<_ACEOF
11051 #define HAVE_DECL_STRERROR $ac_have_decl
11052 _ACEOF
11053 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11054 if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11055   ac_have_decl=1
11056 else
11057   ac_have_decl=0
11058 fi
11059
11060 cat >>confdefs.h <<_ACEOF
11061 #define HAVE_DECL_STRSTR $ac_have_decl
11062 _ACEOF
11063
11064
11065
11066 # Check the return and argument types of ptrace.  No canned test for
11067 # this, so roll our own.
11068 gdb_ptrace_headers='
11069 #include <sys/types.h>
11070 #if HAVE_SYS_PTRACE_H
11071 # include <sys/ptrace.h>
11072 #endif
11073 #if HAVE_UNISTD_H
11074 # include <unistd.h>
11075 #endif
11076 '
11077 # There is no point in checking if we don't have a prototype.
11078 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
11079 "
11080 if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
11081   ac_have_decl=1
11082 else
11083   ac_have_decl=0
11084 fi
11085
11086 cat >>confdefs.h <<_ACEOF
11087 #define HAVE_DECL_PTRACE $ac_have_decl
11088 _ACEOF
11089 if test $ac_have_decl = 1; then :
11090
11091 else
11092
11093   : ${gdb_cv_func_ptrace_ret='int'}
11094   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11095
11096 fi
11097
11098 # Check return type.  Varargs (used on GNU/Linux) conflict with the
11099 # empty argument list, so check for that explicitly.
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11101 $as_echo_n "checking return type of ptrace... " >&6; }
11102 if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11103   $as_echo_n "(cached) " >&6
11104 else
11105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11106 /* end confdefs.h.  */
11107 $gdb_ptrace_headers
11108 int
11109 main ()
11110 {
11111 extern long ptrace (enum __ptrace_request, ...);
11112   ;
11113   return 0;
11114 }
11115 _ACEOF
11116 if ac_fn_c_try_compile "$LINENO"; then :
11117   gdb_cv_func_ptrace_ret='long'
11118 else
11119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11120 /* end confdefs.h.  */
11121 $gdb_ptrace_headers
11122 int
11123 main ()
11124 {
11125 extern int ptrace ();
11126   ;
11127   return 0;
11128 }
11129 _ACEOF
11130 if ac_fn_c_try_compile "$LINENO"; then :
11131   gdb_cv_func_ptrace_ret='int'
11132 else
11133   gdb_cv_func_ptrace_ret='long'
11134 fi
11135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11136 fi
11137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11138 fi
11139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11140 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
11141
11142 cat >>confdefs.h <<_ACEOF
11143 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
11144 _ACEOF
11145
11146 # Check argument types.
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11148 $as_echo_n "checking types of arguments for ptrace... " >&6; }
11149 if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11150   $as_echo_n "(cached) " >&6
11151 else
11152
11153   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11154 /* end confdefs.h.  */
11155 $gdb_ptrace_headers
11156 int
11157 main ()
11158 {
11159 extern long ptrace (enum __ptrace_request, ...);
11160   ;
11161   return 0;
11162 }
11163 _ACEOF
11164 if ac_fn_c_try_compile "$LINENO"; then :
11165   gdb_cv_func_ptrace_args='int,int,long,long'
11166 else
11167
11168 for gdb_arg1 in 'int' 'long'; do
11169  for gdb_arg2 in 'pid_t' 'int' 'long'; do
11170   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
11171    for gdb_arg4 in 'int' 'long' 'void *'; do
11172      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11173 /* end confdefs.h.  */
11174 $gdb_ptrace_headers
11175 int
11176 main ()
11177 {
11178
11179 extern $gdb_cv_func_ptrace_ret
11180   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11181
11182   ;
11183   return 0;
11184 }
11185 _ACEOF
11186 if ac_fn_c_try_compile "$LINENO"; then :
11187   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11188     break 4;
11189 fi
11190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11191     for gdb_arg5 in 'int *' 'int' 'long'; do
11192      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11193 /* end confdefs.h.  */
11194 $gdb_ptrace_headers
11195 int
11196 main ()
11197 {
11198
11199 extern $gdb_cv_func_ptrace_ret
11200   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11201
11202   ;
11203   return 0;
11204 }
11205 _ACEOF
11206 if ac_fn_c_try_compile "$LINENO"; then :
11207
11208 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11209     break 5;
11210 fi
11211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11212     done
11213    done
11214   done
11215  done
11216 done
11217 # Provide a safe default value.
11218 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11219
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: $gdb_cv_func_ptrace_args" >&5
11224 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
11225 ac_save_IFS=$IFS; IFS=','
11226 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11227 IFS=$ac_save_IFS
11228 shift
11229
11230 cat >>confdefs.h <<_ACEOF
11231 #define PTRACE_TYPE_ARG3 $3
11232 _ACEOF
11233
11234
11235 cat >>confdefs.h <<_ACEOF
11236 #define PTRACE_TYPE_ARG4 $4
11237 _ACEOF
11238
11239 if test -n "$5"; then
11240
11241 cat >>confdefs.h <<_ACEOF
11242 #define PTRACE_TYPE_ARG5 $5
11243 _ACEOF
11244
11245 fi
11246
11247 if test "$cross_compiling" = no; then
11248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11249 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11250 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11251   $as_echo_n "(cached) " >&6
11252 else
11253   if test "$cross_compiling" = yes; then :
11254   as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
11255 else
11256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11257 /* end confdefs.h.  */
11258 $ac_includes_default
11259 int
11260 main ()
11261 {
11262 /* If this system has a BSD-style setpgrp which takes arguments,
11263   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11264   exit successfully. */
11265   return setpgrp (1,1) != -1;
11266   ;
11267   return 0;
11268 }
11269 _ACEOF
11270 if ac_fn_c_try_run "$LINENO"; then :
11271   ac_cv_func_setpgrp_void=no
11272 else
11273   ac_cv_func_setpgrp_void=yes
11274 fi
11275 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11276   conftest.$ac_objext conftest.beam conftest.$ac_ext
11277 fi
11278
11279 fi
11280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11281 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
11282 if test $ac_cv_func_setpgrp_void = yes; then
11283
11284 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
11285
11286 fi
11287
11288 else
11289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11290 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11291 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11292   $as_echo_n "(cached) " >&6
11293 else
11294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11295 /* end confdefs.h.  */
11296
11297 #include <unistd.h>
11298
11299 int
11300 main ()
11301 {
11302
11303   if (setpgrp(1,1) == -1)
11304     exit (0);
11305   else
11306     exit (1);
11307
11308   ;
11309   return 0;
11310 }
11311 _ACEOF
11312 if ac_fn_c_try_compile "$LINENO"; then :
11313   ac_cv_func_setpgrp_void=no
11314 else
11315   ac_cv_func_setpgrp_void=yes
11316 fi
11317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11318 fi
11319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11320 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
11321 if test $ac_cv_func_setpgrp_void = yes; then
11322   $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
11323
11324 fi
11325 fi
11326
11327 # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
11328 # since sigsetjmp might only be defined as a macro.
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11330 $as_echo_n "checking for sigsetjmp... " >&6; }
11331 if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
11332   $as_echo_n "(cached) " >&6
11333 else
11334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11335 /* end confdefs.h.  */
11336
11337 #include <setjmp.h>
11338
11339 int
11340 main ()
11341 {
11342 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
11343   ;
11344   return 0;
11345 }
11346 _ACEOF
11347 if ac_fn_c_try_compile "$LINENO"; then :
11348   gdb_cv_func_sigsetjmp=yes
11349 else
11350   gdb_cv_func_sigsetjmp=no
11351 fi
11352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11353 fi
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
11355 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
11356 if test $gdb_cv_func_sigsetjmp = yes; then
11357
11358 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
11359
11360 fi
11361
11362 # Assume we'll default to using the included libiberty regex.
11363 gdb_use_included_regex=yes
11364
11365 # However, if the system regex is GNU regex, then default to *not*
11366 # using the included regex.
11367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11368 $as_echo_n "checking for GNU regex... " >&6; }
11369 if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11370   $as_echo_n "(cached) " >&6
11371 else
11372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11373 /* end confdefs.h.  */
11374 #include <gnu-versions.h>
11375 int
11376 main ()
11377 {
11378 #define REGEX_INTERFACE_VERSION 1
11379 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11380 # error "Version mismatch"
11381 #endif
11382   ;
11383   return 0;
11384 }
11385 _ACEOF
11386 if ac_fn_c_try_compile "$LINENO"; then :
11387   gdb_cv_have_gnu_regex=yes
11388 else
11389   gdb_cv_have_gnu_regex=no
11390 fi
11391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11392 fi
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11394 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
11395 if test $gdb_cv_have_gnu_regex = yes; then
11396   gdb_use_included_regex=no
11397 fi
11398
11399
11400 # Check whether --with-included-regex was given.
11401 if test "${with_included_regex+set}" = set; then :
11402   withval=$with_included_regex; gdb_with_regex=$withval
11403 else
11404   gdb_with_regex=$gdb_use_included_regex
11405 fi
11406
11407 if test "$gdb_with_regex" = yes; then
11408
11409 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11410
11411 fi
11412
11413 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11414 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11415 #include <sys/proc.h>
11416
11417 "
11418 if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
11419
11420 cat >>confdefs.h <<_ACEOF
11421 #define HAVE_STRUCT_THREAD_TD_PCB 1
11422 _ACEOF
11423
11424
11425 fi
11426
11427
11428 # See if <sys/lwp.h> defines `struct lwp`.
11429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11430 $as_echo_n "checking for struct lwp... " >&6; }
11431 if test "${gdb_cv_struct_lwp+set}" = set; then :
11432   $as_echo_n "(cached) " >&6
11433 else
11434   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11435 /* end confdefs.h.  */
11436 #include <sys/param.h>
11437 #include <sys/lwp.h>
11438 int
11439 main ()
11440 {
11441 struct lwp l;
11442   ;
11443   return 0;
11444 }
11445 _ACEOF
11446 if ac_fn_c_try_compile "$LINENO"; then :
11447   gdb_cv_struct_lwp=yes
11448 else
11449   gdb_cv_struct_lwp=no
11450 fi
11451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11452 fi
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11454 $as_echo "$gdb_cv_struct_lwp" >&6; }
11455 if test $gdb_cv_struct_lwp = yes; then
11456
11457 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
11458
11459 fi
11460
11461 # See if <machine/reg.h> degines `struct reg'.
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11463 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11464 if test "${gdb_cv_struct_reg+set}" = set; then :
11465   $as_echo_n "(cached) " >&6
11466 else
11467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11468 /* end confdefs.h.  */
11469 #include <sys/types.h>
11470 #include <machine/reg.h>
11471 int
11472 main ()
11473 {
11474 struct reg r;
11475   ;
11476   return 0;
11477 }
11478 _ACEOF
11479 if ac_fn_c_try_compile "$LINENO"; then :
11480   gdb_cv_struct_reg=yes
11481 else
11482   gdb_cv_struct_reg=no
11483 fi
11484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11485 fi
11486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11487 $as_echo "$gdb_cv_struct_reg" >&6; }
11488 if test $gdb_cv_struct_reg = yes; then
11489
11490 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
11491
11492 fi
11493
11494 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11495 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
11496 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11497 "
11498 if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
11499
11500 cat >>confdefs.h <<_ACEOF
11501 #define HAVE_STRUCT_REG_R_FS 1
11502 _ACEOF
11503
11504
11505 fi
11506 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11507 "
11508 if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
11509
11510 cat >>confdefs.h <<_ACEOF
11511 #define HAVE_STRUCT_REG_R_GS 1
11512 _ACEOF
11513
11514
11515 fi
11516
11517
11518 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
11519 # Older amd64 Linux's don't have the fs_base and gs_base members of
11520 # `struct user_regs_struct'.
11521 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>
11522 "
11523 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
11524
11525 cat >>confdefs.h <<_ACEOF
11526 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
11527 _ACEOF
11528
11529
11530 fi
11531 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>
11532 "
11533 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
11534
11535 cat >>confdefs.h <<_ACEOF
11536 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
11537 _ACEOF
11538
11539
11540 fi
11541
11542
11543 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11545 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11546 if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11547   $as_echo_n "(cached) " >&6
11548 else
11549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11550 /* end confdefs.h.  */
11551 #include <sys/ptrace.h>
11552 int
11553 main ()
11554 {
11555 PTRACE_GETREGS;
11556   ;
11557   return 0;
11558 }
11559 _ACEOF
11560 if ac_fn_c_try_compile "$LINENO"; then :
11561   gdb_cv_have_ptrace_getregs=yes
11562 else
11563   gdb_cv_have_ptrace_getregs=no
11564 fi
11565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11566 fi
11567
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11569 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
11570 if test $gdb_cv_have_ptrace_getregs = yes; then
11571
11572 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
11573
11574 fi
11575
11576 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
11577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11578 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11579 if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11580   $as_echo_n "(cached) " >&6
11581 else
11582   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11583 /* end confdefs.h.  */
11584 #include <sys/ptrace.h>
11585 int
11586 main ()
11587 {
11588 PTRACE_GETFPXREGS;
11589   ;
11590   return 0;
11591 }
11592 _ACEOF
11593 if ac_fn_c_try_compile "$LINENO"; then :
11594   gdb_cv_have_ptrace_getfpxregs=yes
11595 else
11596   gdb_cv_have_ptrace_getfpxregs=no
11597 fi
11598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11599 fi
11600
11601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11602 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
11603 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
11604
11605 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
11606
11607 fi
11608
11609 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11611 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
11612 if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11613   $as_echo_n "(cached) " >&6
11614 else
11615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11616 /* end confdefs.h.  */
11617 #include <sys/types.h>
11618 #include <sys/ptrace.h>
11619 int
11620 main ()
11621 {
11622 PT_GETDBREGS;
11623   ;
11624   return 0;
11625 }
11626 _ACEOF
11627 if ac_fn_c_try_compile "$LINENO"; then :
11628   gdb_cv_have_pt_getdbregs=yes
11629 else
11630   gdb_cv_have_pt_getdbregs=no
11631 fi
11632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11633 fi
11634
11635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11636 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
11637 if test $gdb_cv_have_pt_getdbregs = yes; then
11638
11639 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
11640
11641 fi
11642
11643 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
11644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11645 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11646 if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11647   $as_echo_n "(cached) " >&6
11648 else
11649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11650 /* end confdefs.h.  */
11651 #include <sys/types.h>
11652 #include <sys/ptrace.h>
11653 int
11654 main ()
11655 {
11656 PT_GETXMMREGS;
11657   ;
11658   return 0;
11659 }
11660 _ACEOF
11661 if ac_fn_c_try_compile "$LINENO"; then :
11662   gdb_cv_have_pt_getxmmregs=yes
11663 else
11664   gdb_cv_have_pt_getxmmregs=no
11665 fi
11666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11667 fi
11668
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11670 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
11671 if test $gdb_cv_have_pt_getxmmregs = yes; then
11672
11673 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
11674
11675 fi
11676
11677 # Detect which type of /proc is in use, such as for Solaris.
11678
11679 if test "${target}" = "${host}"; then
11680   case "${host}" in
11681   *-*-sysv4.2* | *-*-sysv5* )
11682
11683 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
11684
11685       ;;
11686   *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
11687
11688 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
11689
11690       ;;
11691   mips-sgi-irix5*)
11692       # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
11693
11694 $as_echo "#define _KMEMUSER 1" >>confdefs.h
11695
11696       ;;
11697   esac
11698 fi
11699
11700 if test "$ac_cv_header_sys_procfs_h" = yes; then
11701   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11702 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11703  if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11704   $as_echo_n "(cached) " >&6
11705 else
11706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11707 /* end confdefs.h.  */
11708
11709 #define _SYSCALL32
11710 /* Needed for new procfs interface on sparc-solaris.  */
11711 #define _STRUCTURED_PROC 1
11712 #include <sys/procfs.h>
11713 int
11714 main ()
11715 {
11716 gregset_t avar
11717   ;
11718   return 0;
11719 }
11720 _ACEOF
11721 if ac_fn_c_try_compile "$LINENO"; then :
11722   bfd_cv_have_sys_procfs_type_gregset_t=yes
11723 else
11724   bfd_cv_have_sys_procfs_type_gregset_t=no
11725
11726 fi
11727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11728 fi
11729
11730  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
11731
11732 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
11733
11734  fi
11735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11736 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
11737
11738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11739 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11740  if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11741   $as_echo_n "(cached) " >&6
11742 else
11743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11744 /* end confdefs.h.  */
11745
11746 #define _SYSCALL32
11747 /* Needed for new procfs interface on sparc-solaris.  */
11748 #define _STRUCTURED_PROC 1
11749 #include <sys/procfs.h>
11750 int
11751 main ()
11752 {
11753 fpregset_t avar
11754   ;
11755   return 0;
11756 }
11757 _ACEOF
11758 if ac_fn_c_try_compile "$LINENO"; then :
11759   bfd_cv_have_sys_procfs_type_fpregset_t=yes
11760 else
11761   bfd_cv_have_sys_procfs_type_fpregset_t=no
11762
11763 fi
11764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11765 fi
11766
11767  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
11768
11769 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
11770
11771  fi
11772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11773 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
11774
11775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11776 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11777  if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11778   $as_echo_n "(cached) " >&6
11779 else
11780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781 /* end confdefs.h.  */
11782
11783 #define _SYSCALL32
11784 /* Needed for new procfs interface on sparc-solaris.  */
11785 #define _STRUCTURED_PROC 1
11786 #include <sys/procfs.h>
11787 int
11788 main ()
11789 {
11790 prgregset_t avar
11791   ;
11792   return 0;
11793 }
11794 _ACEOF
11795 if ac_fn_c_try_compile "$LINENO"; then :
11796   bfd_cv_have_sys_procfs_type_prgregset_t=yes
11797 else
11798   bfd_cv_have_sys_procfs_type_prgregset_t=no
11799
11800 fi
11801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11802 fi
11803
11804  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
11805
11806 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
11807
11808  fi
11809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11810 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
11811
11812   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11813 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11814  if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11815   $as_echo_n "(cached) " >&6
11816 else
11817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11818 /* end confdefs.h.  */
11819
11820 #define _SYSCALL32
11821 /* Needed for new procfs interface on sparc-solaris.  */
11822 #define _STRUCTURED_PROC 1
11823 #include <sys/procfs.h>
11824 int
11825 main ()
11826 {
11827 prfpregset_t avar
11828   ;
11829   return 0;
11830 }
11831 _ACEOF
11832 if ac_fn_c_try_compile "$LINENO"; then :
11833   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
11834 else
11835   bfd_cv_have_sys_procfs_type_prfpregset_t=no
11836
11837 fi
11838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11839 fi
11840
11841  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
11842
11843 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
11844
11845  fi
11846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11847 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
11848
11849   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11850 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11851  if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11852   $as_echo_n "(cached) " >&6
11853 else
11854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11855 /* end confdefs.h.  */
11856
11857 #define _SYSCALL32
11858 /* Needed for new procfs interface on sparc-solaris.  */
11859 #define _STRUCTURED_PROC 1
11860 #include <sys/procfs.h>
11861 int
11862 main ()
11863 {
11864 prgregset32_t avar
11865   ;
11866   return 0;
11867 }
11868 _ACEOF
11869 if ac_fn_c_try_compile "$LINENO"; then :
11870   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
11871 else
11872   bfd_cv_have_sys_procfs_type_prgregset32_t=no
11873
11874 fi
11875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11876 fi
11877
11878  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
11879
11880 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
11881
11882  fi
11883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11884 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
11885
11886   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11887 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11888  if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11889   $as_echo_n "(cached) " >&6
11890 else
11891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11892 /* end confdefs.h.  */
11893
11894 #define _SYSCALL32
11895 /* Needed for new procfs interface on sparc-solaris.  */
11896 #define _STRUCTURED_PROC 1
11897 #include <sys/procfs.h>
11898 int
11899 main ()
11900 {
11901 lwpid_t avar
11902   ;
11903   return 0;
11904 }
11905 _ACEOF
11906 if ac_fn_c_try_compile "$LINENO"; then :
11907   bfd_cv_have_sys_procfs_type_lwpid_t=yes
11908 else
11909   bfd_cv_have_sys_procfs_type_lwpid_t=no
11910
11911 fi
11912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11913 fi
11914
11915  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
11916
11917 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
11918
11919  fi
11920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11921 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
11922
11923   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11924 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11925  if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11926   $as_echo_n "(cached) " >&6
11927 else
11928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11929 /* end confdefs.h.  */
11930
11931 #define _SYSCALL32
11932 /* Needed for new procfs interface on sparc-solaris.  */
11933 #define _STRUCTURED_PROC 1
11934 #include <sys/procfs.h>
11935 int
11936 main ()
11937 {
11938 psaddr_t avar
11939   ;
11940   return 0;
11941 }
11942 _ACEOF
11943 if ac_fn_c_try_compile "$LINENO"; then :
11944   bfd_cv_have_sys_procfs_type_psaddr_t=yes
11945 else
11946   bfd_cv_have_sys_procfs_type_psaddr_t=no
11947
11948 fi
11949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11950 fi
11951
11952  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
11953
11954 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
11955
11956  fi
11957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11958 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
11959
11960   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11961 $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11962  if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11963   $as_echo_n "(cached) " >&6
11964 else
11965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11966 /* end confdefs.h.  */
11967
11968 #define _SYSCALL32
11969 /* Needed for new procfs interface on sparc-solaris.  */
11970 #define _STRUCTURED_PROC 1
11971 #include <sys/procfs.h>
11972 int
11973 main ()
11974 {
11975 prsysent_t avar
11976   ;
11977   return 0;
11978 }
11979 _ACEOF
11980 if ac_fn_c_try_compile "$LINENO"; then :
11981   bfd_cv_have_sys_procfs_type_prsysent_t=yes
11982 else
11983   bfd_cv_have_sys_procfs_type_prsysent_t=no
11984
11985 fi
11986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11987 fi
11988
11989  if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
11990
11991 $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
11992
11993  fi
11994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11995 $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
11996
11997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11998 $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11999  if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
12000   $as_echo_n "(cached) " >&6
12001 else
12002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12003 /* end confdefs.h.  */
12004
12005 #define _SYSCALL32
12006 /* Needed for new procfs interface on sparc-solaris.  */
12007 #define _STRUCTURED_PROC 1
12008 #include <sys/procfs.h>
12009 int
12010 main ()
12011 {
12012 pr_sigset_t avar
12013   ;
12014   return 0;
12015 }
12016 _ACEOF
12017 if ac_fn_c_try_compile "$LINENO"; then :
12018   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
12019 else
12020   bfd_cv_have_sys_procfs_type_pr_sigset_t=no
12021
12022 fi
12023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12024 fi
12025
12026  if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
12027
12028 $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
12029
12030  fi
12031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
12032 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
12033
12034   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
12035 $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
12036  if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
12037   $as_echo_n "(cached) " >&6
12038 else
12039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12040 /* end confdefs.h.  */
12041
12042 #define _SYSCALL32
12043 /* Needed for new procfs interface on sparc-solaris.  */
12044 #define _STRUCTURED_PROC 1
12045 #include <sys/procfs.h>
12046 int
12047 main ()
12048 {
12049 pr_sigaction64_t avar
12050   ;
12051   return 0;
12052 }
12053 _ACEOF
12054 if ac_fn_c_try_compile "$LINENO"; then :
12055   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
12056 else
12057   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
12058
12059 fi
12060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12061 fi
12062
12063  if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
12064
12065 $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
12066
12067  fi
12068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
12069 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
12070
12071   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
12072 $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
12073  if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
12074   $as_echo_n "(cached) " >&6
12075 else
12076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12077 /* end confdefs.h.  */
12078
12079 #define _SYSCALL32
12080 /* Needed for new procfs interface on sparc-solaris.  */
12081 #define _STRUCTURED_PROC 1
12082 #include <sys/procfs.h>
12083 int
12084 main ()
12085 {
12086 pr_siginfo64_t avar
12087   ;
12088   return 0;
12089 }
12090 _ACEOF
12091 if ac_fn_c_try_compile "$LINENO"; then :
12092   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
12093 else
12094   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
12095
12096 fi
12097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12098 fi
12099
12100  if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
12101
12102 $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
12103
12104  fi
12105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
12106 $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
12107
12108
12109
12110
12111
12112   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
12113     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
12114 $as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
12115     if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
12116   $as_echo_n "(cached) " >&6
12117 else
12118   if test "$cross_compiling" = yes; then :
12119   gdb_cv_prfpregset_t_broken=yes
12120 else
12121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12122 /* end confdefs.h.  */
12123 #include <sys/procfs.h>
12124        int main ()
12125        {
12126          if (sizeof (prfpregset_t) == sizeof (void *))
12127            return 1;
12128          return 0;
12129        }
12130 _ACEOF
12131 if ac_fn_c_try_run "$LINENO"; then :
12132   gdb_cv_prfpregset_t_broken=no
12133 else
12134   gdb_cv_prfpregset_t_broken=yes
12135 fi
12136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12137   conftest.$ac_objext conftest.beam conftest.$ac_ext
12138 fi
12139
12140 fi
12141
12142     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12143 $as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
12144     if test $gdb_cv_prfpregset_t_broken = yes; then
12145
12146 $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
12147
12148     fi
12149   fi
12150 fi
12151
12152 # Check if the compiler supports the `long long' type.
12153
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12155 $as_echo_n "checking for long long support in compiler... " >&6; }
12156 if test "${gdb_cv_c_long_long+set}" = set; then :
12157   $as_echo_n "(cached) " >&6
12158 else
12159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12160 /* end confdefs.h.  */
12161 extern long long foo;
12162 int
12163 main ()
12164 {
12165 switch (foo & 2) { case 0: return 1; }
12166   ;
12167   return 0;
12168 }
12169 _ACEOF
12170 if ac_fn_c_try_compile "$LINENO"; then :
12171   gdb_cv_c_long_long=yes
12172 else
12173   gdb_cv_c_long_long=no
12174 fi
12175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12176 fi
12177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12178 $as_echo "$gdb_cv_c_long_long" >&6; }
12179 if test $gdb_cv_c_long_long != yes; then
12180   # libdecnumber requires long long.
12181   as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
12182 fi
12183
12184 # Check if the compiler and runtime support printing long longs.
12185
12186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12187 $as_echo_n "checking for long long support in printf... " >&6; }
12188 if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12189   $as_echo_n "(cached) " >&6
12190 else
12191   if test "$cross_compiling" = yes; then :
12192   gdb_cv_printf_has_long_long=no
12193 else
12194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12195 /* end confdefs.h.  */
12196 $ac_includes_default
12197 int
12198 main ()
12199 {
12200 char buf[32];
12201   long long l = 0;
12202   l = (l << 16) + 0x0123;
12203   l = (l << 16) + 0x4567;
12204   l = (l << 16) + 0x89ab;
12205   l = (l << 16) + 0xcdef;
12206   sprintf (buf, "0x%016llx", l);
12207   return (strcmp ("0x0123456789abcdef", buf));
12208   ;
12209   return 0;
12210 }
12211 _ACEOF
12212 if ac_fn_c_try_run "$LINENO"; then :
12213   gdb_cv_printf_has_long_long=yes
12214 else
12215   gdb_cv_printf_has_long_long=no
12216 fi
12217 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12218   conftest.$ac_objext conftest.beam conftest.$ac_ext
12219 fi
12220
12221 fi
12222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12223 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
12224 if test $gdb_cv_printf_has_long_long = yes; then
12225
12226 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
12227
12228 fi
12229
12230 # Check if the compiler and runtime support printing decfloats.
12231
12232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12233 $as_echo_n "checking for decfloat support in printf... " >&6; }
12234 if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12235   $as_echo_n "(cached) " >&6
12236 else
12237   if test "$cross_compiling" = yes; then :
12238   gdb_cv_printf_has_decfloat=no
12239 else
12240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12241 /* end confdefs.h.  */
12242 $ac_includes_default
12243 int
12244 main ()
12245 {
12246 char buf[64];
12247   _Decimal32 d32 = 1.2345df;
12248   _Decimal64 d64 = 1.2345dd;
12249   _Decimal128 d128 = 1.2345dl;
12250   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12251   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12252   ;
12253   return 0;
12254 }
12255 _ACEOF
12256 if ac_fn_c_try_run "$LINENO"; then :
12257   gdb_cv_printf_has_decfloat=yes
12258 else
12259   gdb_cv_printf_has_decfloat=no
12260 fi
12261 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12262   conftest.$ac_objext conftest.beam conftest.$ac_ext
12263 fi
12264
12265 fi
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12267 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
12268 if test $gdb_cv_printf_has_decfloat = yes; then
12269
12270 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
12271
12272 fi
12273
12274 # Check if the compiler supports the `long double' type.  We can't use
12275 # AC_C_LONG_DOUBLE because that one does additional checks on the
12276 # constants defined in <float.h> that fail on some systems,
12277 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
12278
12279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12280 $as_echo_n "checking for long double support in compiler... " >&6; }
12281 if test "${gdb_cv_c_long_double+set}" = set; then :
12282   $as_echo_n "(cached) " >&6
12283 else
12284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12285 /* end confdefs.h.  */
12286 long double foo;
12287 _ACEOF
12288 if ac_fn_c_try_compile "$LINENO"; then :
12289   gdb_cv_c_long_double=yes
12290 else
12291   gdb_cv_c_long_double=no
12292 fi
12293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12294 fi
12295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12296 $as_echo "$gdb_cv_c_long_double" >&6; }
12297 if test $gdb_cv_c_long_double = yes; then
12298
12299 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
12300
12301 fi
12302
12303 # Check if the compiler and runtime support printing long doubles.
12304
12305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12306 $as_echo_n "checking for long double support in printf... " >&6; }
12307 if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12308   $as_echo_n "(cached) " >&6
12309 else
12310   if test "$cross_compiling" = yes; then :
12311   gdb_cv_printf_has_long_double=no
12312 else
12313   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12314 /* end confdefs.h.  */
12315 $ac_includes_default
12316 int
12317 main ()
12318 {
12319 char buf[16];
12320   long double f = 3.141592653;
12321   sprintf (buf, "%Lg", f);
12322   return (strncmp ("3.14159", buf, 7));
12323   ;
12324   return 0;
12325 }
12326 _ACEOF
12327 if ac_fn_c_try_run "$LINENO"; then :
12328   gdb_cv_printf_has_long_double=yes
12329 else
12330   gdb_cv_printf_has_long_double=no
12331 fi
12332 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12333   conftest.$ac_objext conftest.beam conftest.$ac_ext
12334 fi
12335
12336 fi
12337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12338 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
12339 if test $gdb_cv_printf_has_long_double = yes; then
12340
12341 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
12342
12343 fi
12344
12345 # Check if the compiler and runtime support scanning long doubles.
12346
12347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12348 $as_echo_n "checking for long double support in scanf... " >&6; }
12349 if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12350   $as_echo_n "(cached) " >&6
12351 else
12352   if test "$cross_compiling" = yes; then :
12353   gdb_cv_scanf_has_long_double=no
12354 else
12355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12356 /* end confdefs.h.  */
12357 #include <stdio.h>
12358 int
12359 main ()
12360 {
12361 char *buf = "3.141592653";
12362   long double f = 0;
12363   sscanf (buf, "%Lg", &f);
12364   return !(f > 3.14159 && f < 3.14160);
12365   ;
12366   return 0;
12367 }
12368 _ACEOF
12369 if ac_fn_c_try_run "$LINENO"; then :
12370   gdb_cv_scanf_has_long_double=yes
12371 else
12372   gdb_cv_scanf_has_long_double=no
12373 fi
12374 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12375   conftest.$ac_objext conftest.beam conftest.$ac_ext
12376 fi
12377
12378 fi
12379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12380 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
12381 if test $gdb_cv_scanf_has_long_double = yes; then
12382
12383 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
12384
12385 fi
12386
12387 case ${host_os} in
12388 aix*)
12389   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12390 $as_echo_n "checking for -bbigtoc option... " >&6; }
12391 if test "${gdb_cv_bigtoc+set}" = set; then :
12392   $as_echo_n "(cached) " >&6
12393 else
12394
12395     SAVE_LDFLAGS=$LDFLAGS
12396
12397     case $GCC in
12398     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12399     *) gdb_cv_bigtoc=-bbigtoc ;;
12400     esac
12401
12402     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
12403     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12404 /* end confdefs.h.  */
12405
12406 int
12407 main ()
12408 {
12409 int i;
12410   ;
12411   return 0;
12412 }
12413 _ACEOF
12414 if ac_fn_c_try_link "$LINENO"; then :
12415
12416 else
12417   gdb_cv_bigtoc=
12418 fi
12419 rm -f core conftest.err conftest.$ac_objext \
12420     conftest$ac_exeext conftest.$ac_ext
12421     LDFLAGS="${SAVE_LDFLAGS}"
12422
12423 fi
12424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12425 $as_echo "$gdb_cv_bigtoc" >&6; }
12426   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12427   ;;
12428 esac
12429
12430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
12431 $as_echo_n "checking for the dynamic export flag... " >&6; }
12432 dynamic_list=false
12433 if test "${gdb_native}" = yes; then
12434    # The dynamically loaded libthread_db needs access to symbols in the gdb
12435    # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
12436    # may not be supported there.
12437    old_LDFLAGS="$LDFLAGS"
12438    # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
12439    RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
12440    LDFLAGS="$LDFLAGS $RDYNAMIC"
12441    if test "${have_libpython}" = no; then
12442      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12443 /* end confdefs.h.  */
12444
12445 int
12446 main ()
12447 {
12448
12449   ;
12450   return 0;
12451 }
12452 _ACEOF
12453 if ac_fn_c_try_link "$LINENO"; then :
12454   dynamic_list=true
12455 fi
12456 rm -f core conftest.err conftest.$ac_objext \
12457     conftest$ac_exeext conftest.$ac_ext
12458    else
12459      # Workaround http://bugs.python.org/issue4434 where static
12460      # libpythonX.Y.a would get its symbols required for
12461      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
12462      # Problem does not happen for the recommended libpythonX.Y.so linkage.
12463      old_CFLAGS="$CFLAGS"
12464      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
12465      old_LIBS="$LIBS"
12466      LIBS="$LIBS $PYTHON_LIBS"
12467      if test "$cross_compiling" = yes; then :
12468   true
12469 else
12470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12471 /* end confdefs.h.  */
12472 #include "${have_libpython}/Python.h"
12473 int
12474 main ()
12475 {
12476 int err;
12477           Py_Initialize ();
12478           err = PyRun_SimpleString ("import itertools\n");
12479           Py_Finalize ();
12480           return err == 0 ? 0 : 1;
12481   ;
12482   return 0;
12483 }
12484 _ACEOF
12485 if ac_fn_c_try_run "$LINENO"; then :
12486   dynamic_list=true
12487 fi
12488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12489   conftest.$ac_objext conftest.beam conftest.$ac_ext
12490 fi
12491
12492      LIBS="$old_LIBS"
12493      CFLAGS="$old_CFLAGS"
12494    fi
12495    LDFLAGS="$old_LDFLAGS"
12496 fi
12497 if $dynamic_list; then
12498   found="-Wl,--dynamic-list"
12499   RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
12500 else
12501   found="-rdynamic"
12502   RDYNAMIC="-rdynamic"
12503 fi
12504
12505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
12506 $as_echo "$found" >&6; }
12507
12508
12509 if test ${build} = ${host} -a ${host} = ${target} ; then
12510    case ${host_os} in
12511    solaris*)
12512       # See if thread_db library is around for Solaris thread debugging.
12513       # Note that we must explicitly test for version 1 of the library
12514       # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12515       # the same API.
12516       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12517 $as_echo_n "checking for Solaris thread debugging library... " >&6; }
12518       if test -f /usr/lib/libthread_db.so.1 ; then
12519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12520 $as_echo "yes" >&6; }
12521
12522 $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
12523
12524          CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
12525          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
12526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12527 $as_echo_n "checking for dlopen in -ldl... " >&6; }
12528 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12529   $as_echo_n "(cached) " >&6
12530 else
12531   ac_check_lib_save_LIBS=$LIBS
12532 LIBS="-ldl  $LIBS"
12533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12534 /* end confdefs.h.  */
12535
12536 /* Override any GCC internal prototype to avoid an error.
12537    Use char because int might match the return type of a GCC
12538    builtin and then its argument prototype would still apply.  */
12539 #ifdef __cplusplus
12540 extern "C"
12541 #endif
12542 char dlopen ();
12543 int
12544 main ()
12545 {
12546 return dlopen ();
12547   ;
12548   return 0;
12549 }
12550 _ACEOF
12551 if ac_fn_c_try_link "$LINENO"; then :
12552   ac_cv_lib_dl_dlopen=yes
12553 else
12554   ac_cv_lib_dl_dlopen=no
12555 fi
12556 rm -f core conftest.err conftest.$ac_objext \
12557     conftest$ac_exeext conftest.$ac_ext
12558 LIBS=$ac_check_lib_save_LIBS
12559 fi
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12561 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12562 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
12563   cat >>confdefs.h <<_ACEOF
12564 #define HAVE_LIBDL 1
12565 _ACEOF
12566
12567   LIBS="-ldl $LIBS"
12568
12569 fi
12570
12571          CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
12572          # Sun randomly tweaked the prototypes in <proc_service.h>
12573          # at one point.
12574          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12575 $as_echo_n "checking if <proc_service.h> is old... " >&6; }
12576          if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12577   $as_echo_n "(cached) " >&6
12578 else
12579
12580             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12581 /* end confdefs.h.  */
12582
12583                 #include <proc_service.h>
12584                 ps_err_e ps_pdwrite
12585                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
12586
12587 int
12588 main ()
12589 {
12590
12591   ;
12592   return 0;
12593 }
12594 _ACEOF
12595 if ac_fn_c_try_compile "$LINENO"; then :
12596   gdb_cv_proc_service_is_old=no
12597 else
12598   gdb_cv_proc_service_is_old=yes
12599 fi
12600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12601
12602 fi
12603
12604          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12605 $as_echo "$gdb_cv_proc_service_is_old" >&6; }
12606          if test $gdb_cv_proc_service_is_old = yes; then
12607
12608 $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
12609
12610          fi
12611       else
12612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12613 $as_echo "no" >&6; }
12614       fi
12615       ;;
12616    aix*)
12617       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12618 $as_echo_n "checking for AiX thread debugging library... " >&6; }
12619       if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12620   $as_echo_n "(cached) " >&6
12621 else
12622   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12623 /* end confdefs.h.  */
12624 #include <sys/pthdebug.h>
12625 int
12626 main ()
12627 {
12628 #ifndef PTHDB_VERSION_3
12629                                     #error
12630                                     #endif
12631   ;
12632   return 0;
12633 }
12634 _ACEOF
12635 if ac_fn_c_try_compile "$LINENO"; then :
12636   gdb_cv_have_aix_thread_debug=yes
12637 else
12638   gdb_cv_have_aix_thread_debug=no
12639 fi
12640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12641 fi
12642
12643       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12644 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
12645       if test $gdb_cv_have_aix_thread_debug = yes; then
12646          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
12647          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
12648          LIBS="$LIBS -lpthdebug"
12649
12650          # Older versions of AIX do not provide the declaration for
12651          # the getthrds function (it appears that it was introduced
12652          # with AIX 6.x).
12653          ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12654 "
12655 if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12656   ac_have_decl=1
12657 else
12658   ac_have_decl=0
12659 fi
12660
12661 cat >>confdefs.h <<_ACEOF
12662 #define HAVE_DECL_GETTHRDS $ac_have_decl
12663 _ACEOF
12664
12665       fi
12666       ;;
12667    esac
12668
12669 fi
12670
12671 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
12672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12673 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12674 if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12675   $as_echo_n "(cached) " >&6
12676 else
12677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12678 /* end confdefs.h.  */
12679 #include <thread_db.h>
12680 int
12681 main ()
12682 {
12683 int i = TD_NOTALLOC;
12684   ;
12685   return 0;
12686 }
12687 _ACEOF
12688 if ac_fn_c_try_compile "$LINENO"; then :
12689   gdb_cv_thread_db_h_has_td_notalloc=yes
12690 else
12691   gdb_cv_thread_db_h_has_td_notalloc=no
12692
12693 fi
12694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12695
12696 fi
12697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12698 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12699    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12700 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12701 if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12702   $as_echo_n "(cached) " >&6
12703 else
12704   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12705 /* end confdefs.h.  */
12706 #include <thread_db.h>
12707 int
12708 main ()
12709 {
12710 int i = TD_VERSION;
12711   ;
12712   return 0;
12713 }
12714 _ACEOF
12715 if ac_fn_c_try_compile "$LINENO"; then :
12716   gdb_cv_thread_db_h_has_td_version=yes
12717 else
12718   gdb_cv_thread_db_h_has_td_version=no
12719
12720 fi
12721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12722
12723 fi
12724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12725 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12727 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12728 if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12729   $as_echo_n "(cached) " >&6
12730 else
12731   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12732 /* end confdefs.h.  */
12733 #include <thread_db.h>
12734 int
12735 main ()
12736 {
12737 int i = TD_NOTLS;
12738   ;
12739   return 0;
12740 }
12741 _ACEOF
12742 if ac_fn_c_try_compile "$LINENO"; then :
12743   gdb_cv_thread_db_h_has_td_notls=yes
12744 else
12745   gdb_cv_thread_db_h_has_td_notls=no
12746
12747 fi
12748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12749
12750 fi
12751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12752 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
12753 fi
12754 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
12755
12756 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
12757
12758 fi
12759 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12760
12761 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
12762
12763 fi
12764 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12765
12766 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
12767
12768 fi
12769
12770 if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
12771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12772 $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12773 if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12774   $as_echo_n "(cached) " >&6
12775 else
12776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12777 /* end confdefs.h.  */
12778 #include <sys/syscall.h>
12779 int
12780 main ()
12781 {
12782 int i = __NR_tkill;
12783   ;
12784   return 0;
12785 }
12786 _ACEOF
12787 if ac_fn_c_try_compile "$LINENO"; then :
12788   gdb_cv_sys_syscall_h_has_tkill=yes
12789 else
12790   gdb_cv_sys_syscall_h_has_tkill=no
12791
12792 fi
12793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12794
12795 fi
12796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12797 $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
12798 fi
12799 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
12800   ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
12801 if test "x$ac_cv_func_syscall" = x""yes; then :
12802
12803 $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
12804
12805
12806 fi
12807
12808 fi
12809
12810 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12811 "
12812 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12813   ac_have_decl=1
12814 else
12815   ac_have_decl=0
12816 fi
12817
12818 cat >>confdefs.h <<_ACEOF
12819 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
12820 _ACEOF
12821
12822
12823 if test "$cross_compiling" = yes; then :
12824   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12825 /* end confdefs.h.  */
12826 #include <sys/personality.h>
12827 int
12828 main ()
12829 {
12830
12831 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
12832 #       define ADDR_NO_RANDOMIZE 0x0040000
12833 #      endif
12834        /* Test the flag could be set and stays set.  */
12835        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12836        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12837            return 1
12838   ;
12839   return 0;
12840 }
12841 _ACEOF
12842 if ac_fn_c_try_link "$LINENO"; then :
12843   have_personality=true
12844 else
12845   have_personality=false
12846 fi
12847 rm -f core conftest.err conftest.$ac_objext \
12848     conftest$ac_exeext conftest.$ac_ext
12849 else
12850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12851 /* end confdefs.h.  */
12852 #include <sys/personality.h>
12853 int
12854 main ()
12855 {
12856
12857 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
12858 #       define ADDR_NO_RANDOMIZE 0x0040000
12859 #      endif
12860        /* Test the flag could be set and stays set.  */
12861        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12862        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12863            return 1
12864   ;
12865   return 0;
12866 }
12867 _ACEOF
12868 if ac_fn_c_try_run "$LINENO"; then :
12869   have_personality=true
12870 else
12871   have_personality=false
12872 fi
12873 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12874   conftest.$ac_objext conftest.beam conftest.$ac_ext
12875 fi
12876
12877 if $have_personality
12878 then
12879
12880 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
12881
12882 fi
12883
12884 case $host_os in
12885   go32* | *djgpp*)
12886     gdbinit=gdb.ini
12887     ;;
12888   *)
12889     gdbinit=.gdbinit
12890     ;;
12891 esac
12892
12893 cat >>confdefs.h <<_ACEOF
12894 #define GDBINIT "$gdbinit"
12895 _ACEOF
12896
12897
12898
12899 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12900 # except that the argument to --with-sysroot is optional.
12901 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12902 if test "x$with_sysroot" = xyes; then
12903   with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12904 fi
12905
12906 # Check whether --with-sysroot was given.
12907 if test "${with_sysroot+set}" = set; then :
12908   withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12909 else
12910   TARGET_SYSTEM_ROOT=
12911 fi
12912
12913
12914   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12915   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12916   ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12917   ac_define_dir=`eval echo $ac_define_dir`
12918
12919 cat >>confdefs.h <<_ACEOF
12920 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
12921 _ACEOF
12922
12923
12924
12925
12926   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12927      if test "x$prefix" = xNONE; then
12928         test_prefix=/usr/local
12929      else
12930         test_prefix=$prefix
12931      fi
12932   else
12933      test_prefix=$exec_prefix
12934   fi
12935   value=0
12936   case ${ac_define_dir} in
12937      "${test_prefix}"|"${test_prefix}/"*|\
12938         '${exec_prefix}'|'${exec_prefix}/'*)
12939      value=1
12940      ;;
12941   esac
12942
12943 cat >>confdefs.h <<_ACEOF
12944 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12945 _ACEOF
12946
12947
12948
12949
12950
12951 # Check whether --with-system-gdbinit was given.
12952 if test "${with_system_gdbinit+set}" = set; then :
12953   withval=$with_system_gdbinit;
12954     SYSTEM_GDBINIT=$withval
12955 else
12956   SYSTEM_GDBINIT=
12957 fi
12958
12959
12960   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12961   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12962   ac_define_dir=`eval echo $SYSTEM_GDBINIT`
12963   ac_define_dir=`eval echo $ac_define_dir`
12964
12965 cat >>confdefs.h <<_ACEOF
12966 #define SYSTEM_GDBINIT "$ac_define_dir"
12967 _ACEOF
12968
12969
12970
12971
12972   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12973      if test "x$prefix" = xNONE; then
12974         test_prefix=/usr/local
12975      else
12976         test_prefix=$prefix
12977      fi
12978   else
12979      test_prefix=$exec_prefix
12980   fi
12981   value=0
12982   case ${ac_define_dir} in
12983      "${test_prefix}"|"${test_prefix}/"*|\
12984         '${exec_prefix}'|'${exec_prefix}/'*)
12985      value=1
12986      ;;
12987   esac
12988
12989 cat >>confdefs.h <<_ACEOF
12990 #define SYSTEM_GDBINIT_RELOCATABLE $value
12991 _ACEOF
12992
12993
12994
12995
12996 # Check whether --enable-werror was given.
12997 if test "${enable_werror+set}" = set; then :
12998   enableval=$enable_werror; case "${enableval}" in
12999      yes | y) ERROR_ON_WARNING="yes" ;;
13000      no | n)  ERROR_ON_WARNING="no" ;;
13001      *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
13002    esac
13003 fi
13004
13005
13006 # Enable -Werror by default when using gcc.  Turn it off for releases.
13007 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
13008     ERROR_ON_WARNING=yes
13009 fi
13010
13011 WERROR_CFLAGS=""
13012 if test "${ERROR_ON_WARNING}" = yes ; then
13013     WERROR_CFLAGS="-Werror"
13014 fi
13015
13016 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
13017 -Wpointer-sign \
13018 -Wno-unused -Wunused-value -Wunused-function \
13019 -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
13020 -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
13021 -Wold-style-declaration -Wold-style-definition"
13022
13023 # Enable -Wno-format by default when using gcc on mingw since many
13024 # GCC versions complain about %I64.
13025 case "${host}" in
13026   *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
13027   *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
13028 esac
13029
13030 # Check whether --enable-build-warnings was given.
13031 if test "${enable_build_warnings+set}" = set; then :
13032   enableval=$enable_build_warnings; case "${enableval}" in
13033   yes)  ;;
13034   no)   build_warnings="-w";;
13035   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
13036         build_warnings="${build_warnings} ${t}";;
13037   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
13038         build_warnings="${t} ${build_warnings}";;
13039   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13040 esac
13041 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13042   echo "Setting compiler warning flags = $build_warnings" 6>&1
13043 fi
13044 fi
13045 # Check whether --enable-gdb-build-warnings was given.
13046 if test "${enable_gdb_build_warnings+set}" = set; then :
13047   enableval=$enable_gdb_build_warnings; case "${enableval}" in
13048   yes)  ;;
13049   no)   build_warnings="-w";;
13050   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
13051         build_warnings="${build_warnings} ${t}";;
13052   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
13053         build_warnings="${t} ${build_warnings}";;
13054   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13055 esac
13056 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13057   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13058 fi
13059 fi
13060 WARN_CFLAGS=""
13061 if test "x${build_warnings}" != x -a "x$GCC" = xyes
13062 then
13063     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13064 $as_echo_n "checking compiler warning flags... " >&6; }
13065     # Separate out the -Werror flag as some files just cannot be
13066     # compiled with it enabled.
13067     for w in ${build_warnings}; do
13068         case $w in
13069         -Werr*) WERROR_CFLAGS=-Werror ;;
13070         *) # Check that GCC accepts it
13071             saved_CFLAGS="$CFLAGS"
13072             CFLAGS="$CFLAGS $w"
13073             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13074 /* end confdefs.h.  */
13075
13076 int
13077 main ()
13078 {
13079
13080   ;
13081   return 0;
13082 }
13083 _ACEOF
13084 if ac_fn_c_try_compile "$LINENO"; then :
13085   WARN_CFLAGS="${WARN_CFLAGS} $w"
13086 fi
13087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13088             CFLAGS="$saved_CFLAGS"
13089         esac
13090     done
13091     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13092 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
13093 fi
13094
13095
13096
13097 # In the Cygwin environment, we need some additional flags.
13098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
13099 $as_echo_n "checking for cygwin... " >&6; }
13100 if test "${gdb_cv_os_cygwin+set}" = set; then :
13101   $as_echo_n "(cached) " >&6
13102 else
13103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13104 /* end confdefs.h.  */
13105
13106 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
13107 lose
13108 #endif
13109 _ACEOF
13110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13111   $EGREP "^lose$" >/dev/null 2>&1; then :
13112   gdb_cv_os_cygwin=yes
13113 else
13114   gdb_cv_os_cygwin=no
13115 fi
13116 rm -f conftest*
13117
13118 fi
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
13120 $as_echo "$gdb_cv_os_cygwin" >&6; }
13121
13122
13123 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
13124 case ${host} in
13125   *go32* ) SER_HARDWIRE=ser-go32.o ;;
13126   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
13127   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
13128 esac
13129
13130
13131 # libreadline needs libuser32.a in a cygwin environment
13132 WIN32LIBS=
13133 if test x$gdb_cv_os_cygwin = xyes; then
13134     WIN32LIBS="-luser32"
13135     case "${target}" in
13136         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13137         ;;
13138     esac
13139 fi
13140
13141 # The ser-tcp.c module requires sockets.
13142 case ${host} in
13143   *mingw32*)
13144
13145 $as_echo "#define USE_WIN32API 1" >>confdefs.h
13146
13147     WIN32LIBS="$WIN32LIBS -lws2_32"
13148     ;;
13149 esac
13150
13151
13152 # Add ELF support to GDB, but only if BFD includes ELF support.
13153
13154   OLD_CFLAGS=$CFLAGS
13155   OLD_LDFLAGS=$LDFLAGS
13156   OLD_LIBS=$LIBS
13157   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13158   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13159   # always want our bfd.
13160   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13161   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13162   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13163   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13164   if test "$plugins" = "yes"; then
13165     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13166 $as_echo_n "checking for library containing dlopen... " >&6; }
13167 if test "${ac_cv_search_dlopen+set}" = set; then :
13168   $as_echo_n "(cached) " >&6
13169 else
13170   ac_func_search_save_LIBS=$LIBS
13171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13172 /* end confdefs.h.  */
13173
13174 /* Override any GCC internal prototype to avoid an error.
13175    Use char because int might match the return type of a GCC
13176    builtin and then its argument prototype would still apply.  */
13177 #ifdef __cplusplus
13178 extern "C"
13179 #endif
13180 char dlopen ();
13181 int
13182 main ()
13183 {
13184 return dlopen ();
13185   ;
13186   return 0;
13187 }
13188 _ACEOF
13189 for ac_lib in '' dl; do
13190   if test -z "$ac_lib"; then
13191     ac_res="none required"
13192   else
13193     ac_res=-l$ac_lib
13194     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13195   fi
13196   if ac_fn_c_try_link "$LINENO"; then :
13197   ac_cv_search_dlopen=$ac_res
13198 fi
13199 rm -f core conftest.err conftest.$ac_objext \
13200     conftest$ac_exeext
13201   if test "${ac_cv_search_dlopen+set}" = set; then :
13202   break
13203 fi
13204 done
13205 if test "${ac_cv_search_dlopen+set}" = set; then :
13206
13207 else
13208   ac_cv_search_dlopen=no
13209 fi
13210 rm conftest.$ac_ext
13211 LIBS=$ac_func_search_save_LIBS
13212 fi
13213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13214 $as_echo "$ac_cv_search_dlopen" >&6; }
13215 ac_res=$ac_cv_search_dlopen
13216 if test "$ac_res" != no; then :
13217   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13218
13219 fi
13220
13221   fi
13222   LIBS="-lbfd -liberty $intl $LIBS"
13223   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
13224 $as_echo_n "checking for ELF support in BFD... " >&6; }
13225 if test "${gdb_cv_var_elf+set}" = set; then :
13226   $as_echo_n "(cached) " >&6
13227 else
13228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13229 /* end confdefs.h.  */
13230 #include <stdlib.h>
13231   #include "bfd.h"
13232   #include "elf-bfd.h"
13233
13234 int
13235 main ()
13236 {
13237 return bfd_get_elf_phdr_upper_bound (NULL);
13238   ;
13239   return 0;
13240 }
13241 _ACEOF
13242 if ac_fn_c_try_link "$LINENO"; then :
13243   gdb_cv_var_elf=yes
13244 else
13245   gdb_cv_var_elf=no
13246 fi
13247 rm -f core conftest.err conftest.$ac_objext \
13248     conftest$ac_exeext conftest.$ac_ext
13249 fi
13250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13251 $as_echo "$gdb_cv_var_elf" >&6; }
13252   CFLAGS=$OLD_CFLAGS
13253   LDFLAGS=$OLD_LDFLAGS
13254   LIBS=$OLD_LIBS
13255 if test $gdb_cv_var_elf = yes; then
13256   CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
13257
13258 $as_echo "#define HAVE_ELF 1" >>confdefs.h
13259
13260   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13261   if test "$plugins" = "yes"; then
13262     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13263 $as_echo_n "checking for library containing dlopen... " >&6; }
13264 if test "${ac_cv_search_dlopen+set}" = set; then :
13265   $as_echo_n "(cached) " >&6
13266 else
13267   ac_func_search_save_LIBS=$LIBS
13268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13269 /* end confdefs.h.  */
13270
13271 /* Override any GCC internal prototype to avoid an error.
13272    Use char because int might match the return type of a GCC
13273    builtin and then its argument prototype would still apply.  */
13274 #ifdef __cplusplus
13275 extern "C"
13276 #endif
13277 char dlopen ();
13278 int
13279 main ()
13280 {
13281 return dlopen ();
13282   ;
13283   return 0;
13284 }
13285 _ACEOF
13286 for ac_lib in '' dl; do
13287   if test -z "$ac_lib"; then
13288     ac_res="none required"
13289   else
13290     ac_res=-l$ac_lib
13291     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13292   fi
13293   if ac_fn_c_try_link "$LINENO"; then :
13294   ac_cv_search_dlopen=$ac_res
13295 fi
13296 rm -f core conftest.err conftest.$ac_objext \
13297     conftest$ac_exeext
13298   if test "${ac_cv_search_dlopen+set}" = set; then :
13299   break
13300 fi
13301 done
13302 if test "${ac_cv_search_dlopen+set}" = set; then :
13303
13304 else
13305   ac_cv_search_dlopen=no
13306 fi
13307 rm conftest.$ac_ext
13308 LIBS=$ac_func_search_save_LIBS
13309 fi
13310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13311 $as_echo "$ac_cv_search_dlopen" >&6; }
13312 ac_res=$ac_cv_search_dlopen
13313 if test "$ac_res" != no; then :
13314   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13315
13316 fi
13317
13318   fi
13319 fi
13320
13321 # Add macho support to GDB, but only if BFD includes it.
13322
13323   OLD_CFLAGS=$CFLAGS
13324   OLD_LDFLAGS=$LDFLAGS
13325   OLD_LIBS=$LIBS
13326   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13327   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13328   # always want our bfd.
13329   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13330   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13331   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13332   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13333   if test "$plugins" = "yes"; then
13334     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13335 $as_echo_n "checking for library containing dlopen... " >&6; }
13336 if test "${ac_cv_search_dlopen+set}" = set; then :
13337   $as_echo_n "(cached) " >&6
13338 else
13339   ac_func_search_save_LIBS=$LIBS
13340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13341 /* end confdefs.h.  */
13342
13343 /* Override any GCC internal prototype to avoid an error.
13344    Use char because int might match the return type of a GCC
13345    builtin and then its argument prototype would still apply.  */
13346 #ifdef __cplusplus
13347 extern "C"
13348 #endif
13349 char dlopen ();
13350 int
13351 main ()
13352 {
13353 return dlopen ();
13354   ;
13355   return 0;
13356 }
13357 _ACEOF
13358 for ac_lib in '' dl; do
13359   if test -z "$ac_lib"; then
13360     ac_res="none required"
13361   else
13362     ac_res=-l$ac_lib
13363     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13364   fi
13365   if ac_fn_c_try_link "$LINENO"; then :
13366   ac_cv_search_dlopen=$ac_res
13367 fi
13368 rm -f core conftest.err conftest.$ac_objext \
13369     conftest$ac_exeext
13370   if test "${ac_cv_search_dlopen+set}" = set; then :
13371   break
13372 fi
13373 done
13374 if test "${ac_cv_search_dlopen+set}" = set; then :
13375
13376 else
13377   ac_cv_search_dlopen=no
13378 fi
13379 rm conftest.$ac_ext
13380 LIBS=$ac_func_search_save_LIBS
13381 fi
13382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13383 $as_echo "$ac_cv_search_dlopen" >&6; }
13384 ac_res=$ac_cv_search_dlopen
13385 if test "$ac_res" != no; then :
13386   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13387
13388 fi
13389
13390   fi
13391   LIBS="-lbfd -liberty $intl $LIBS"
13392   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
13393 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
13394 if test "${gdb_cv_var_macho+set}" = set; then :
13395   $as_echo_n "(cached) " >&6
13396 else
13397   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13398 /* end confdefs.h.  */
13399 #include <stdlib.h>
13400   #include "bfd.h"
13401   #include "mach-o.h"
13402
13403 int
13404 main ()
13405 {
13406 return bfd_mach_o_lookup_command (NULL, 0, NULL);
13407   ;
13408   return 0;
13409 }
13410 _ACEOF
13411 if ac_fn_c_try_link "$LINENO"; then :
13412   gdb_cv_var_macho=yes
13413 else
13414   gdb_cv_var_macho=no
13415 fi
13416 rm -f core conftest.err conftest.$ac_objext \
13417     conftest$ac_exeext conftest.$ac_ext
13418 fi
13419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
13420 $as_echo "$gdb_cv_var_macho" >&6; }
13421   CFLAGS=$OLD_CFLAGS
13422   LDFLAGS=$OLD_LDFLAGS
13423   LIBS=$OLD_LIBS
13424 if test $gdb_cv_var_macho = yes; then
13425   CONFIG_OBS="$CONFIG_OBS machoread.o"
13426 fi
13427
13428 # Add SOM support to GDB, but only if BFD includes it.
13429
13430   OLD_CFLAGS=$CFLAGS
13431   OLD_LDFLAGS=$LDFLAGS
13432   OLD_LIBS=$LIBS
13433   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13434   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13435   # always want our bfd.
13436   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13437   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13438   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13439   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13440   if test "$plugins" = "yes"; then
13441     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13442 $as_echo_n "checking for library containing dlopen... " >&6; }
13443 if test "${ac_cv_search_dlopen+set}" = set; then :
13444   $as_echo_n "(cached) " >&6
13445 else
13446   ac_func_search_save_LIBS=$LIBS
13447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13448 /* end confdefs.h.  */
13449
13450 /* Override any GCC internal prototype to avoid an error.
13451    Use char because int might match the return type of a GCC
13452    builtin and then its argument prototype would still apply.  */
13453 #ifdef __cplusplus
13454 extern "C"
13455 #endif
13456 char dlopen ();
13457 int
13458 main ()
13459 {
13460 return dlopen ();
13461   ;
13462   return 0;
13463 }
13464 _ACEOF
13465 for ac_lib in '' dl; do
13466   if test -z "$ac_lib"; then
13467     ac_res="none required"
13468   else
13469     ac_res=-l$ac_lib
13470     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13471   fi
13472   if ac_fn_c_try_link "$LINENO"; then :
13473   ac_cv_search_dlopen=$ac_res
13474 fi
13475 rm -f core conftest.err conftest.$ac_objext \
13476     conftest$ac_exeext
13477   if test "${ac_cv_search_dlopen+set}" = set; then :
13478   break
13479 fi
13480 done
13481 if test "${ac_cv_search_dlopen+set}" = set; then :
13482
13483 else
13484   ac_cv_search_dlopen=no
13485 fi
13486 rm conftest.$ac_ext
13487 LIBS=$ac_func_search_save_LIBS
13488 fi
13489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13490 $as_echo "$ac_cv_search_dlopen" >&6; }
13491 ac_res=$ac_cv_search_dlopen
13492 if test "$ac_res" != no; then :
13493   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13494
13495 fi
13496
13497   fi
13498   LIBS="-lbfd -liberty $intl $LIBS"
13499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
13500 $as_echo_n "checking for SOM support in BFD... " >&6; }
13501 if test "${gdb_cv_var_som+set}" = set; then :
13502   $as_echo_n "(cached) " >&6
13503 else
13504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13505 /* end confdefs.h.  */
13506 #include <stdlib.h>
13507   #include "bfd.h"
13508   #include "som.h"
13509
13510 int
13511 main ()
13512 {
13513 return bfd_som_attach_aux_hdr (NULL, 0, NULL);
13514   ;
13515   return 0;
13516 }
13517 _ACEOF
13518 if ac_fn_c_try_link "$LINENO"; then :
13519   gdb_cv_var_som=yes
13520 else
13521   gdb_cv_var_som=no
13522 fi
13523 rm -f core conftest.err conftest.$ac_objext \
13524     conftest$ac_exeext conftest.$ac_ext
13525 fi
13526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
13527 $as_echo "$gdb_cv_var_som" >&6; }
13528   CFLAGS=$OLD_CFLAGS
13529   LDFLAGS=$OLD_LDFLAGS
13530   LIBS=$OLD_LIBS
13531 if test $gdb_cv_var_som = yes; then
13532   CONFIG_OBS="$CONFIG_OBS somread.o"
13533 fi
13534
13535 # Add any host-specific objects to GDB.
13536 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13537
13538 # If building on ELF, look for lzma support for embedded compressed debug info.
13539 if test $gdb_cv_var_elf = yes; then
13540
13541 # Check whether --with-lzma was given.
13542 if test "${with_lzma+set}" = set; then :
13543   withval=$with_lzma;
13544 else
13545   with_lzma=auto
13546 fi
13547
13548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13549 $as_echo_n "checking whether to use lzma... " >&6; }
13550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13551 $as_echo "$with_lzma" >&6; }
13552
13553   if test "${with_lzma}" != no; then
13554
13555
13556
13557
13558
13559
13560
13561
13562     use_additional=yes
13563
13564   acl_save_prefix="$prefix"
13565   prefix="$acl_final_prefix"
13566   acl_save_exec_prefix="$exec_prefix"
13567   exec_prefix="$acl_final_exec_prefix"
13568
13569     eval additional_includedir=\"$includedir\"
13570     eval additional_libdir=\"$libdir\"
13571
13572   exec_prefix="$acl_save_exec_prefix"
13573   prefix="$acl_save_prefix"
13574
13575
13576 # Check whether --with-liblzma-prefix was given.
13577 if test "${with_liblzma_prefix+set}" = set; then :
13578   withval=$with_liblzma_prefix;
13579     if test "X$withval" = "Xno"; then
13580       use_additional=no
13581     else
13582       if test "X$withval" = "X"; then
13583
13584   acl_save_prefix="$prefix"
13585   prefix="$acl_final_prefix"
13586   acl_save_exec_prefix="$exec_prefix"
13587   exec_prefix="$acl_final_exec_prefix"
13588
13589           eval additional_includedir=\"$includedir\"
13590           eval additional_libdir=\"$libdir\"
13591
13592   exec_prefix="$acl_save_exec_prefix"
13593   prefix="$acl_save_prefix"
13594
13595       else
13596         additional_includedir="$withval/include"
13597         additional_libdir="$withval/lib"
13598       fi
13599     fi
13600
13601 fi
13602
13603       LIBLZMA=
13604   LTLIBLZMA=
13605   INCLZMA=
13606   rpathdirs=
13607   ltrpathdirs=
13608   names_already_handled=
13609   names_next_round='lzma '
13610   while test -n "$names_next_round"; do
13611     names_this_round="$names_next_round"
13612     names_next_round=
13613     for name in $names_this_round; do
13614       already_handled=
13615       for n in $names_already_handled; do
13616         if test "$n" = "$name"; then
13617           already_handled=yes
13618           break
13619         fi
13620       done
13621       if test -z "$already_handled"; then
13622         names_already_handled="$names_already_handled $name"
13623                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13624         eval value=\"\$HAVE_LIB$uppername\"
13625         if test -n "$value"; then
13626           if test "$value" = yes; then
13627             eval value=\"\$LIB$uppername\"
13628             test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13629             eval value=\"\$LTLIB$uppername\"
13630             test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13631           else
13632                                     :
13633           fi
13634         else
13635                               found_dir=
13636           found_la=
13637           found_so=
13638           found_a=
13639           if test $use_additional = yes; then
13640             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13641               found_dir="$additional_libdir"
13642               found_so="$additional_libdir/lib$name.$shlibext"
13643               if test -f "$additional_libdir/lib$name.la"; then
13644                 found_la="$additional_libdir/lib$name.la"
13645               fi
13646             else
13647               if test -f "$additional_libdir/lib$name.$libext"; then
13648                 found_dir="$additional_libdir"
13649                 found_a="$additional_libdir/lib$name.$libext"
13650                 if test -f "$additional_libdir/lib$name.la"; then
13651                   found_la="$additional_libdir/lib$name.la"
13652                 fi
13653               fi
13654             fi
13655           fi
13656           if test "X$found_dir" = "X"; then
13657             for x in $LDFLAGS $LTLIBLZMA; do
13658
13659   acl_save_prefix="$prefix"
13660   prefix="$acl_final_prefix"
13661   acl_save_exec_prefix="$exec_prefix"
13662   exec_prefix="$acl_final_exec_prefix"
13663   eval x=\"$x\"
13664   exec_prefix="$acl_save_exec_prefix"
13665   prefix="$acl_save_prefix"
13666
13667               case "$x" in
13668                 -L*)
13669                   dir=`echo "X$x" | sed -e 's/^X-L//'`
13670                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13671                     found_dir="$dir"
13672                     found_so="$dir/lib$name.$shlibext"
13673                     if test -f "$dir/lib$name.la"; then
13674                       found_la="$dir/lib$name.la"
13675                     fi
13676                   else
13677                     if test -f "$dir/lib$name.$libext"; then
13678                       found_dir="$dir"
13679                       found_a="$dir/lib$name.$libext"
13680                       if test -f "$dir/lib$name.la"; then
13681                         found_la="$dir/lib$name.la"
13682                       fi
13683                     fi
13684                   fi
13685                   ;;
13686               esac
13687               if test "X$found_dir" != "X"; then
13688                 break
13689               fi
13690             done
13691           fi
13692           if test "X$found_dir" != "X"; then
13693                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13694             if test "X$found_so" != "X"; then
13695                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13696                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13697               else
13698                                                                                 haveit=
13699                 for x in $ltrpathdirs; do
13700                   if test "X$x" = "X$found_dir"; then
13701                     haveit=yes
13702                     break
13703                   fi
13704                 done
13705                 if test -z "$haveit"; then
13706                   ltrpathdirs="$ltrpathdirs $found_dir"
13707                 fi
13708                                 if test "$hardcode_direct" = yes; then
13709                                                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13710                 else
13711                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13712                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13713                                                             haveit=
13714                     for x in $rpathdirs; do
13715                       if test "X$x" = "X$found_dir"; then
13716                         haveit=yes
13717                         break
13718                       fi
13719                     done
13720                     if test -z "$haveit"; then
13721                       rpathdirs="$rpathdirs $found_dir"
13722                     fi
13723                   else
13724                                                                                 haveit=
13725                     for x in $LDFLAGS $LIBLZMA; do
13726
13727   acl_save_prefix="$prefix"
13728   prefix="$acl_final_prefix"
13729   acl_save_exec_prefix="$exec_prefix"
13730   exec_prefix="$acl_final_exec_prefix"
13731   eval x=\"$x\"
13732   exec_prefix="$acl_save_exec_prefix"
13733   prefix="$acl_save_prefix"
13734
13735                       if test "X$x" = "X-L$found_dir"; then
13736                         haveit=yes
13737                         break
13738                       fi
13739                     done
13740                     if test -z "$haveit"; then
13741                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13742                     fi
13743                     if test "$hardcode_minus_L" != no; then
13744                                                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13745                     else
13746                                                                                                                                                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13747                     fi
13748                   fi
13749                 fi
13750               fi
13751             else
13752               if test "X$found_a" != "X"; then
13753                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13754               else
13755                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13756               fi
13757             fi
13758                         additional_includedir=
13759             case "$found_dir" in
13760               */lib | */lib/)
13761                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13762                 additional_includedir="$basedir/include"
13763                 ;;
13764             esac
13765             if test "X$additional_includedir" != "X"; then
13766                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
13767                 haveit=
13768                 if test "X$additional_includedir" = "X/usr/local/include"; then
13769                   if test -n "$GCC"; then
13770                     case $host_os in
13771                       linux*) haveit=yes;;
13772                     esac
13773                   fi
13774                 fi
13775                 if test -z "$haveit"; then
13776                   for x in $CPPFLAGS $INCLZMA; do
13777
13778   acl_save_prefix="$prefix"
13779   prefix="$acl_final_prefix"
13780   acl_save_exec_prefix="$exec_prefix"
13781   exec_prefix="$acl_final_exec_prefix"
13782   eval x=\"$x\"
13783   exec_prefix="$acl_save_exec_prefix"
13784   prefix="$acl_save_prefix"
13785
13786                     if test "X$x" = "X-I$additional_includedir"; then
13787                       haveit=yes
13788                       break
13789                     fi
13790                   done
13791                   if test -z "$haveit"; then
13792                     if test -d "$additional_includedir"; then
13793                                             INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13794                     fi
13795                   fi
13796                 fi
13797               fi
13798             fi
13799                         if test -n "$found_la"; then
13800                                                         save_libdir="$libdir"
13801               case "$found_la" in
13802                 */* | *\\*) . "$found_la" ;;
13803                 *) . "./$found_la" ;;
13804               esac
13805               libdir="$save_libdir"
13806                             for dep in $dependency_libs; do
13807                 case "$dep" in
13808                   -L*)
13809                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13810                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
13811                       haveit=
13812                       if test "X$additional_libdir" = "X/usr/local/lib"; then
13813                         if test -n "$GCC"; then
13814                           case $host_os in
13815                             linux*) haveit=yes;;
13816                           esac
13817                         fi
13818                       fi
13819                       if test -z "$haveit"; then
13820                         haveit=
13821                         for x in $LDFLAGS $LIBLZMA; do
13822
13823   acl_save_prefix="$prefix"
13824   prefix="$acl_final_prefix"
13825   acl_save_exec_prefix="$exec_prefix"
13826   exec_prefix="$acl_final_exec_prefix"
13827   eval x=\"$x\"
13828   exec_prefix="$acl_save_exec_prefix"
13829   prefix="$acl_save_prefix"
13830
13831                           if test "X$x" = "X-L$additional_libdir"; then
13832                             haveit=yes
13833                             break
13834                           fi
13835                         done
13836                         if test -z "$haveit"; then
13837                           if test -d "$additional_libdir"; then
13838                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13839                           fi
13840                         fi
13841                         haveit=
13842                         for x in $LDFLAGS $LTLIBLZMA; do
13843
13844   acl_save_prefix="$prefix"
13845   prefix="$acl_final_prefix"
13846   acl_save_exec_prefix="$exec_prefix"
13847   exec_prefix="$acl_final_exec_prefix"
13848   eval x=\"$x\"
13849   exec_prefix="$acl_save_exec_prefix"
13850   prefix="$acl_save_prefix"
13851
13852                           if test "X$x" = "X-L$additional_libdir"; then
13853                             haveit=yes
13854                             break
13855                           fi
13856                         done
13857                         if test -z "$haveit"; then
13858                           if test -d "$additional_libdir"; then
13859                                                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13860                           fi
13861                         fi
13862                       fi
13863                     fi
13864                     ;;
13865                   -R*)
13866                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
13867                     if test "$enable_rpath" != no; then
13868                                                                   haveit=
13869                       for x in $rpathdirs; do
13870                         if test "X$x" = "X$dir"; then
13871                           haveit=yes
13872                           break
13873                         fi
13874                       done
13875                       if test -z "$haveit"; then
13876                         rpathdirs="$rpathdirs $dir"
13877                       fi
13878                                                                   haveit=
13879                       for x in $ltrpathdirs; do
13880                         if test "X$x" = "X$dir"; then
13881                           haveit=yes
13882                           break
13883                         fi
13884                       done
13885                       if test -z "$haveit"; then
13886                         ltrpathdirs="$ltrpathdirs $dir"
13887                       fi
13888                     fi
13889                     ;;
13890                   -l*)
13891                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13892                     ;;
13893                   *.la)
13894                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13895                     ;;
13896                   *)
13897                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13898                     LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13899                     ;;
13900                 esac
13901               done
13902             fi
13903           else
13904                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13905             LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13906           fi
13907         fi
13908       fi
13909     done
13910   done
13911   if test "X$rpathdirs" != "X"; then
13912     if test -n "$hardcode_libdir_separator"; then
13913                         alldirs=
13914       for found_dir in $rpathdirs; do
13915         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13916       done
13917             acl_save_libdir="$libdir"
13918       libdir="$alldirs"
13919       eval flag=\"$hardcode_libdir_flag_spec\"
13920       libdir="$acl_save_libdir"
13921       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13922     else
13923             for found_dir in $rpathdirs; do
13924         acl_save_libdir="$libdir"
13925         libdir="$found_dir"
13926         eval flag=\"$hardcode_libdir_flag_spec\"
13927         libdir="$acl_save_libdir"
13928         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13929       done
13930     fi
13931   fi
13932   if test "X$ltrpathdirs" != "X"; then
13933             for found_dir in $ltrpathdirs; do
13934       LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13935     done
13936   fi
13937
13938
13939         ac_save_CPPFLAGS="$CPPFLAGS"
13940
13941   for element in $INCLZMA; do
13942     haveit=
13943     for x in $CPPFLAGS; do
13944
13945   acl_save_prefix="$prefix"
13946   prefix="$acl_final_prefix"
13947   acl_save_exec_prefix="$exec_prefix"
13948   exec_prefix="$acl_final_exec_prefix"
13949   eval x=\"$x\"
13950   exec_prefix="$acl_save_exec_prefix"
13951   prefix="$acl_save_prefix"
13952
13953       if test "X$x" = "X$element"; then
13954         haveit=yes
13955         break
13956       fi
13957     done
13958     if test -z "$haveit"; then
13959       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13960     fi
13961   done
13962
13963
13964   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13965 $as_echo_n "checking for liblzma... " >&6; }
13966 if test "${ac_cv_liblzma+set}" = set; then :
13967   $as_echo_n "(cached) " >&6
13968 else
13969
13970     ac_save_LIBS="$LIBS"
13971     LIBS="$LIBS $LIBLZMA"
13972     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13973 /* end confdefs.h.  */
13974 #include "lzma.h"
13975 int
13976 main ()
13977 {
13978 lzma_index_iter iter;
13979                            lzma_index_iter_init (&iter, 0);
13980                            lzma_mf_is_supported (LZMA_MF_HC3);
13981   ;
13982   return 0;
13983 }
13984 _ACEOF
13985 if ac_fn_c_try_link "$LINENO"; then :
13986   ac_cv_liblzma=yes
13987 else
13988   ac_cv_liblzma=no
13989 fi
13990 rm -f core conftest.err conftest.$ac_objext \
13991     conftest$ac_exeext conftest.$ac_ext
13992     LIBS="$ac_save_LIBS"
13993
13994 fi
13995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13996 $as_echo "$ac_cv_liblzma" >&6; }
13997   if test "$ac_cv_liblzma" = yes; then
13998     HAVE_LIBLZMA=yes
13999
14000 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
14001
14002     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
14003 $as_echo_n "checking how to link with liblzma... " >&6; }
14004     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
14005 $as_echo "$LIBLZMA" >&6; }
14006   else
14007     HAVE_LIBLZMA=no
14008             CPPFLAGS="$ac_save_CPPFLAGS"
14009     LIBLZMA=
14010     LTLIBLZMA=
14011   fi
14012
14013
14014
14015
14016
14017
14018     if test "$HAVE_LIBLZMA" != yes; then
14019       if test "$with_lzma" = yes; then
14020         as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
14021       fi
14022     fi
14023   fi
14024 fi
14025
14026 LIBGUI="../libgui/src/libgui.a"
14027 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
14028
14029
14030
14031 WIN32LDAPP=
14032
14033
14034
14035 case "${host}" in
14036 *-*-cygwin* | *-*-mingw* )
14037     configdir="win"
14038     ;;
14039 *)
14040     configdir="unix"
14041     ;;
14042 esac
14043
14044 GDBTKLIBS=
14045 if test "${enable_gdbtk}" = "yes"; then
14046
14047     # Gdbtk must have an absolute path to srcdir in order to run
14048     # properly when not installed.
14049     here=`pwd`
14050     cd ${srcdir}
14051     GDBTK_SRC_DIR=`pwd`
14052     cd $here
14053
14054
14055     #
14056     # Ok, lets find the tcl configuration
14057     # First, look for one uninstalled.
14058     # the alternative search directory is invoked by --with-tcl
14059     #
14060
14061     if test x"${no_tcl}" = x ; then
14062         # we reset no_tcl in case something fails here
14063         no_tcl=true
14064
14065 # Check whether --with-tcl was given.
14066 if test "${with_tcl+set}" = set; then :
14067   withval=$with_tcl; with_tclconfig=${withval}
14068 fi
14069
14070         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
14071 $as_echo_n "checking for Tcl configuration... " >&6; }
14072         if test "${ac_cv_c_tclconfig+set}" = set; then :
14073   $as_echo_n "(cached) " >&6
14074 else
14075
14076
14077             # First check to see if --with-tcl was specified.
14078             case "${host}" in
14079                 *-*-cygwin*) platDir="win" ;;
14080                 *) platDir="unix" ;;
14081             esac
14082             if test x"${with_tclconfig}" != x ; then
14083                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
14084                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
14085                 else
14086                     as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
14087                 fi
14088             fi
14089
14090             # then check for a private Tcl installation
14091             if test x"${ac_cv_c_tclconfig}" = x ; then
14092                 for i in \
14093                         ../tcl \
14094                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14095                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
14096                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
14097                         ../../tcl \
14098                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14099                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
14100                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
14101                         ../../../tcl \
14102                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14103                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
14104                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
14105                     if test -f "$i/$platDir/tclConfig.sh" ; then
14106                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14107                         break
14108                     fi
14109                 done
14110             fi
14111
14112             # on Darwin, check in Framework installation locations
14113             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
14114                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14115                         `ls -d /Library/Frameworks 2>/dev/null` \
14116                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
14117                         `ls -d /System/Library/Frameworks 2>/dev/null` \
14118                         ; do
14119                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
14120                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
14121                         break
14122                     fi
14123                 done
14124             fi
14125
14126             # check in a few common install locations
14127             if test x"${ac_cv_c_tclconfig}" = x ; then
14128                 for i in `ls -d ${libdir} 2>/dev/null` \
14129                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
14130                         `ls -d ${prefix}/lib 2>/dev/null` \
14131                         `ls -d /usr/local/lib 2>/dev/null` \
14132                         `ls -d /usr/contrib/lib 2>/dev/null` \
14133                         `ls -d /usr/lib 2>/dev/null` \
14134                         ; do
14135                     if test -f "$i/tclConfig.sh" ; then
14136                         ac_cv_c_tclconfig=`(cd $i; pwd)`
14137                         break
14138                     fi
14139                 done
14140             fi
14141
14142             # check in a few other private locations
14143             if test x"${ac_cv_c_tclconfig}" = x ; then
14144                 for i in \
14145                         ${srcdir}/../tcl \
14146                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14147                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
14148                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
14149                     if test -f "$i/$platDir/tclConfig.sh" ; then
14150                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14151                     break
14152                 fi
14153                 done
14154             fi
14155
14156 fi
14157
14158
14159         if test x"${ac_cv_c_tclconfig}" = x ; then
14160             TCL_BIN_DIR="# no Tcl configs found"
14161             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
14162 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
14163         else
14164             no_tcl=
14165             TCL_BIN_DIR=${ac_cv_c_tclconfig}
14166             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
14167 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
14168         fi
14169     fi
14170
14171
14172     # If $no_tk is nonempty, then we can't do Tk, and there is no
14173     # point to doing Tcl.
14174
14175     #
14176     # Ok, lets find the tk configuration
14177     # First, look for one uninstalled.
14178     # the alternative search directory is invoked by --with-tk
14179     #
14180
14181     if test x"${no_tk}" = x ; then
14182         # we reset no_tk in case something fails here
14183         no_tk=true
14184
14185 # Check whether --with-tk was given.
14186 if test "${with_tk+set}" = set; then :
14187   withval=$with_tk; with_tkconfig=${withval}
14188 fi
14189
14190         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
14191 $as_echo_n "checking for Tk configuration... " >&6; }
14192         if test "${ac_cv_c_tkconfig+set}" = set; then :
14193   $as_echo_n "(cached) " >&6
14194 else
14195
14196
14197             # First check to see if --with-tkconfig was specified.
14198             if test x"${with_tkconfig}" != x ; then
14199                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
14200                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
14201                 else
14202                     as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
14203                 fi
14204             fi
14205
14206             # then check for a private Tk library
14207             case "${host}" in
14208                 *-*-cygwin*) platDir="win" ;;
14209                 *) platDir="unix" ;;
14210             esac
14211             if test x"${ac_cv_c_tkconfig}" = x ; then
14212                 for i in \
14213                         ../tk \
14214                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14215                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
14216                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
14217                         ../../tk \
14218                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14219                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
14220                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
14221                         ../../../tk \
14222                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14223                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
14224                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
14225                     if test -f "$i/$platDir/tkConfig.sh" ; then
14226                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14227                         break
14228                     fi
14229                 done
14230             fi
14231
14232             # on Darwin, check in Framework installation locations
14233             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
14234                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14235                         `ls -d /Library/Frameworks 2>/dev/null` \
14236                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
14237                         `ls -d /System/Library/Frameworks 2>/dev/null` \
14238                         ; do
14239                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
14240                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
14241                         break
14242                     fi
14243                 done
14244             fi
14245
14246             # check in a few common install locations
14247             if test x"${ac_cv_c_tkconfig}" = x ; then
14248                 for i in `ls -d ${libdir} 2>/dev/null` \
14249                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
14250                         `ls -d ${prefix}/lib 2>/dev/null` \
14251                         `ls -d /usr/local/lib 2>/dev/null` \
14252                         `ls -d /usr/contrib/lib 2>/dev/null` \
14253                         `ls -d /usr/lib 2>/dev/null` \
14254                         ; do
14255                     if test -f "$i/tkConfig.sh" ; then
14256                         ac_cv_c_tkconfig=`(cd $i; pwd)`
14257                         break
14258                     fi
14259                 done
14260             fi
14261             # check in a few other private locations
14262             if test x"${ac_cv_c_tkconfig}" = x ; then
14263                 for i in \
14264                         ${srcdir}/../tk \
14265                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14266                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
14267                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
14268                     if test -f "$i/$platDir/tkConfig.sh" ; then
14269                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14270                         break
14271                     fi
14272                 done
14273             fi
14274
14275 fi
14276
14277
14278         if test x"${ac_cv_c_tkconfig}" = x ; then
14279             TK_BIN_DIR="# no Tk configs found"
14280             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
14281 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
14282         else
14283             no_tk=
14284             TK_BIN_DIR=${ac_cv_c_tkconfig}
14285             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
14286 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
14287         fi
14288     fi
14289
14290
14291     if test -z "${no_tcl}" -a -z "${no_tk}"; then
14292
14293     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
14294 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
14295
14296     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
14297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14298 $as_echo "loading" >&6; }
14299         . ${TCL_BIN_DIR}/tclConfig.sh
14300     else
14301         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
14302 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
14303     fi
14304
14305     # eval is required to do the TCL_DBGX substitution
14306     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
14307     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
14308
14309     # If the TCL_BIN_DIR is the build directory (not the install directory),
14310     # then set the common variable name to the value of the build variables.
14311     # For example, the variable TCL_LIB_SPEC will be set to the value
14312     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
14313     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
14314     # installed and uninstalled version of Tcl.
14315     if test -f "${TCL_BIN_DIR}/Makefile" ; then
14316         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
14317         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
14318         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
14319     elif test "`uname -s`" = "Darwin"; then
14320         # If Tcl was built as a framework, attempt to use the libraries
14321         # from the framework at the given location so that linking works
14322         # against Tcl.framework installed in an arbitrary location.
14323         case ${TCL_DEFS} in
14324             *TCL_FRAMEWORK*)
14325                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
14326                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
14327                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
14328                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
14329                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
14330                             break
14331                         fi
14332                     done
14333                 fi
14334                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
14335                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
14336                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
14337                 fi
14338                 ;;
14339         esac
14340     fi
14341
14342     # eval is required to do the TCL_DBGX substitution
14343     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
14344     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
14345     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
14346     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362         # Check for in-tree tcl
14363         here=`pwd`
14364         cd ${srcdir}/..
14365         topdir=`pwd`
14366         cd ${here}
14367
14368         intree="no"
14369         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
14370           intree="yes"
14371         fi
14372
14373         # Find Tcl private headers
14374         if test x"${intree}" = xno; then
14375
14376   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
14377 $as_echo_n "checking for Tcl private headers... " >&6; }
14378   private_dir=""
14379   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
14380   if test -f ${dir}/tclInt.h ; then
14381     private_dir=${dir}
14382   fi
14383
14384   if test x"${private_dir}" = x; then
14385     as_fn_error "could not find private Tcl headers" "$LINENO" 5
14386   else
14387     TCL_PRIVATE_INCLUDE="-I${private_dir}"
14388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14389 $as_echo "${private_dir}" >&6; }
14390   fi
14391
14392           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
14393           TCL_LIBRARY="${TCL_LIB_SPEC}"
14394           TCL_DEPS=""
14395         else
14396           # If building tcl in the same src tree, private headers
14397           # are not needed, but we need to be sure to use the right
14398           # headers library
14399           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
14400           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
14401           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
14402         fi
14403
14404
14405
14406
14407
14408     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
14409 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
14410
14411     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
14412         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14413 $as_echo "loading" >&6; }
14414         . ${TK_BIN_DIR}/tkConfig.sh
14415     else
14416         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
14417 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
14418     fi
14419
14420     # eval is required to do the TK_DBGX substitution
14421     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
14422     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
14423
14424     # If the TK_BIN_DIR is the build directory (not the install directory),
14425     # then set the common variable name to the value of the build variables.
14426     # For example, the variable TK_LIB_SPEC will be set to the value
14427     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
14428     # instead of TK_BUILD_LIB_SPEC since it will work with both an
14429     # installed and uninstalled version of Tcl.
14430     if test -f "${TK_BIN_DIR}/Makefile" ; then
14431         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
14432         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
14433         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
14434     elif test "`uname -s`" = "Darwin"; then
14435         # If Tk was built as a framework, attempt to use the libraries
14436         # from the framework at the given location so that linking works
14437         # against Tk.framework installed in an arbitrary location.
14438         case ${TK_DEFS} in
14439             *TK_FRAMEWORK*)
14440                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
14441                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
14442                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
14443                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
14444                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
14445                             break
14446                         fi
14447                     done
14448                 fi
14449                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
14450                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
14451                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
14452                 fi
14453                 ;;
14454         esac
14455     fi
14456
14457     # eval is required to do the TK_DBGX substitution
14458     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
14459     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
14460     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
14461     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476         # Check for in-tree Tk
14477         intree="no"
14478         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14479           intree="yes"
14480         fi
14481
14482         # Find Tk private headers
14483         if test x"${intree}" = xno; then
14484
14485   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14486 $as_echo_n "checking for Tk private headers... " >&6; }
14487   private_dir=""
14488   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14489   if test -f ${dir}/tkInt.h; then
14490     private_dir=${dir}
14491   fi
14492
14493   if test x"${private_dir}" = x; then
14494     as_fn_error "could not find Tk private headers" "$LINENO" 5
14495   else
14496     TK_PRIVATE_INCLUDE="-I${private_dir}"
14497     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14498 $as_echo "${private_dir}" >&6; }
14499   fi
14500
14501           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14502           TK_LIBRARY=${TK_LIB_SPEC}
14503           TK_DEPS=""
14504         else
14505           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14506           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14507           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14508         fi
14509
14510
14511
14512
14513
14514         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
14515
14516         # Include some libraries that Tcl and Tk want.
14517         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14518         # Yes, the ordering seems wrong here.  But it isn't.
14519         # TK_LIBS is the list of libraries that need to be linked
14520         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
14521         # were in LIBS then any link tests after this point would
14522         # try to include things like `$(LIBGUI)', which wouldn't work.
14523         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
14524
14525         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14526         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14527         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14528         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14529         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14530         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14531         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
14532
14533         if test x$gdb_cv_os_cygwin = xyes; then
14534           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14535           WIN32LDAPP="-Wl,--subsystem,console"
14536           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
14537         fi
14538
14539         subdirs="$subdirs gdbtk"
14540
14541     fi
14542 fi
14543
14544
14545
14546
14547
14548
14549
14550
14551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14552 $as_echo_n "checking for X... " >&6; }
14553
14554
14555 # Check whether --with-x was given.
14556 if test "${with_x+set}" = set; then :
14557   withval=$with_x;
14558 fi
14559
14560 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14561 if test "x$with_x" = xno; then
14562   # The user explicitly disabled X.
14563   have_x=disabled
14564 else
14565   case $x_includes,$x_libraries in #(
14566     *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14567     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14568   $as_echo_n "(cached) " >&6
14569 else
14570   # One or both of the vars are not set, and there is no cached value.
14571 ac_x_includes=no ac_x_libraries=no
14572 rm -f -r conftest.dir
14573 if mkdir conftest.dir; then
14574   cd conftest.dir
14575   cat >Imakefile <<'_ACEOF'
14576 incroot:
14577         @echo incroot='${INCROOT}'
14578 usrlibdir:
14579         @echo usrlibdir='${USRLIBDIR}'
14580 libdir:
14581         @echo libdir='${LIBDIR}'
14582 _ACEOF
14583   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
14584     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
14585     for ac_var in incroot usrlibdir libdir; do
14586       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14587     done
14588     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
14589     for ac_extension in a so sl dylib la dll; do
14590       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14591          test -f "$ac_im_libdir/libX11.$ac_extension"; then
14592         ac_im_usrlibdir=$ac_im_libdir; break
14593       fi
14594     done
14595     # Screen out bogus values from the imake configuration.  They are
14596     # bogus both because they are the default anyway, and because
14597     # using them would break gcc on systems where it needs fixed includes.
14598     case $ac_im_incroot in
14599         /usr/include) ac_x_includes= ;;
14600         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
14601     esac
14602     case $ac_im_usrlibdir in
14603         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
14604         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
14605     esac
14606   fi
14607   cd ..
14608   rm -f -r conftest.dir
14609 fi
14610
14611 # Standard set of common directories for X headers.
14612 # Check X11 before X11Rn because it is often a symlink to the current release.
14613 ac_x_header_dirs='
14614 /usr/X11/include
14615 /usr/X11R7/include
14616 /usr/X11R6/include
14617 /usr/X11R5/include
14618 /usr/X11R4/include
14619
14620 /usr/include/X11
14621 /usr/include/X11R7
14622 /usr/include/X11R6
14623 /usr/include/X11R5
14624 /usr/include/X11R4
14625
14626 /usr/local/X11/include
14627 /usr/local/X11R7/include
14628 /usr/local/X11R6/include
14629 /usr/local/X11R5/include
14630 /usr/local/X11R4/include
14631
14632 /usr/local/include/X11
14633 /usr/local/include/X11R7
14634 /usr/local/include/X11R6
14635 /usr/local/include/X11R5
14636 /usr/local/include/X11R4
14637
14638 /usr/X386/include
14639 /usr/x386/include
14640 /usr/XFree86/include/X11
14641
14642 /usr/include
14643 /usr/local/include
14644 /usr/unsupported/include
14645 /usr/athena/include
14646 /usr/local/x11r5/include
14647 /usr/lpp/Xamples/include
14648
14649 /usr/openwin/include
14650 /usr/openwin/share/include'
14651
14652 if test "$ac_x_includes" = no; then
14653   # Guess where to find include files, by looking for Xlib.h.
14654   # First, try using that file with no special directory specified.
14655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14656 /* end confdefs.h.  */
14657 #include <X11/Xlib.h>
14658 _ACEOF
14659 if ac_fn_c_try_cpp "$LINENO"; then :
14660   # We can compile using X headers with no special include directory.
14661 ac_x_includes=
14662 else
14663   for ac_dir in $ac_x_header_dirs; do
14664   if test -r "$ac_dir/X11/Xlib.h"; then
14665     ac_x_includes=$ac_dir
14666     break
14667   fi
14668 done
14669 fi
14670 rm -f conftest.err conftest.$ac_ext
14671 fi # $ac_x_includes = no
14672
14673 if test "$ac_x_libraries" = no; then
14674   # Check for the libraries.
14675   # See if we find them without any special options.
14676   # Don't add to $LIBS permanently.
14677   ac_save_LIBS=$LIBS
14678   LIBS="-lX11 $LIBS"
14679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14680 /* end confdefs.h.  */
14681 #include <X11/Xlib.h>
14682 int
14683 main ()
14684 {
14685 XrmInitialize ()
14686   ;
14687   return 0;
14688 }
14689 _ACEOF
14690 if ac_fn_c_try_link "$LINENO"; then :
14691   LIBS=$ac_save_LIBS
14692 # We can link X programs with no special library path.
14693 ac_x_libraries=
14694 else
14695   LIBS=$ac_save_LIBS
14696 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
14697 do
14698   # Don't even attempt the hair of trying to link an X program!
14699   for ac_extension in a so sl dylib la dll; do
14700     if test -r "$ac_dir/libX11.$ac_extension"; then
14701       ac_x_libraries=$ac_dir
14702       break 2
14703     fi
14704   done
14705 done
14706 fi
14707 rm -f core conftest.err conftest.$ac_objext \
14708     conftest$ac_exeext conftest.$ac_ext
14709 fi # $ac_x_libraries = no
14710
14711 case $ac_x_includes,$ac_x_libraries in #(
14712   no,* | *,no | *\'*)
14713     # Didn't find X, or a directory has "'" in its name.
14714     ac_cv_have_x="have_x=no";; #(
14715   *)
14716     # Record where we found X for the cache.
14717     ac_cv_have_x="have_x=yes\
14718         ac_x_includes='$ac_x_includes'\
14719         ac_x_libraries='$ac_x_libraries'"
14720 esac
14721 fi
14722 ;; #(
14723     *) have_x=yes;;
14724   esac
14725   eval "$ac_cv_have_x"
14726 fi # $with_x != no
14727
14728 if test "$have_x" != yes; then
14729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14730 $as_echo "$have_x" >&6; }
14731   no_x=yes
14732 else
14733   # If each of the values was on the command line, it overrides each guess.
14734   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14735   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14736   # Update the cache value to reflect the command line values.
14737   ac_cv_have_x="have_x=yes\
14738         ac_x_includes='$x_includes'\
14739         ac_x_libraries='$x_libraries'"
14740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14741 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
14742 fi
14743
14744
14745 # Unlike the sim directory, whether a simulator is linked is controlled by
14746 # presence of a gdb_sim definition in the target configure.tgt entry.
14747 # This code just checks for a few cases where we'd like to ignore those
14748 # definitions, even when they're present in the '.mt' file.  These cases
14749 # are when --disable-sim is specified, or if the simulator directory is
14750 # not part of the source tree.
14751 #
14752 # Check whether --enable-sim was given.
14753 if test "${enable_sim+set}" = set; then :
14754   enableval=$enable_sim; echo "enable_sim = $enable_sim";
14755  echo "enableval = ${enableval}";
14756  case "${enableval}" in
14757   yes) ignore_sim=false ;;
14758   no)  ignore_sim=true ;;
14759   *)   ignore_sim=false ;;
14760  esac
14761 else
14762   ignore_sim=false
14763 fi
14764
14765
14766 if test ! -d "${srcdir}/../sim"; then
14767   ignore_sim=true
14768 fi
14769
14770 SIM=
14771 SIM_OBS=
14772 if test "${ignore_sim}" = "false"; then
14773   if test x"${gdb_sim}" != x ; then
14774     SIM="${gdb_sim}"
14775     SIM_OBS="remote-sim.o"
14776
14777 $as_echo "#define WITH_SIM 1" >>confdefs.h
14778
14779   fi
14780 fi
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795 # List of host floatformats.
14796
14797 cat >>confdefs.h <<_ACEOF
14798 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
14799 _ACEOF
14800
14801
14802 cat >>confdefs.h <<_ACEOF
14803 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
14804 _ACEOF
14805
14806
14807 cat >>confdefs.h <<_ACEOF
14808 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
14809 _ACEOF
14810
14811
14812 # target_subdir is used by the testsuite to find the target libraries.
14813 target_subdir=
14814 if test "${host}" != "${target}"; then
14815     target_subdir="${target_alias}/"
14816 fi
14817
14818
14819 frags=
14820 if test "${gdb_native}" = "yes"; then
14821   host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14822   if test ! -f ${host_makefile_frag}; then
14823     as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
14824   fi
14825   frags="$frags $host_makefile_frag"
14826 else
14827   host_makefile_frag=/dev/null
14828 fi
14829
14830
14831
14832
14833 if test "${gdb_native}" = "yes"; then
14834 # We pick this up from the host configuration file (.mh) because we
14835 # do not have a native configuration Makefile fragment.
14836 nativefile=`sed -n '
14837 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
14838 ' ${host_makefile_frag}`
14839 fi
14840
14841
14842 if test x"${gdb_osabi}" != x ; then
14843
14844 cat >>confdefs.h <<_ACEOF
14845 #define GDB_OSABI_DEFAULT $gdb_osabi
14846 _ACEOF
14847
14848 fi
14849
14850 # Enable multi-ice-gdb-server.
14851 # Check whether --enable-multi-ice was given.
14852 if test "${enable_multi_ice+set}" = set; then :
14853   enableval=$enable_multi_ice; case $enableval in
14854     yes | no)
14855       ;;
14856     *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
14857   esac
14858 fi
14859
14860 if test "x$enable_multi_ice" = xyes; then
14861    subdirs="$subdirs multi-ice"
14862
14863 fi
14864
14865 # Check whether --enable-gdbserver was given.
14866 if test "${enable_gdbserver+set}" = set; then :
14867   enableval=$enable_gdbserver; case "${enableval}" in
14868   yes| no|auto) ;;
14869   *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14870 esac
14871 else
14872   enable_gdbserver=auto
14873 fi
14874
14875
14876 # We only build gdbserver automatically in a native configuration, and
14877 # only if the user did not explicitly disable its build.
14878 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
14879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14880 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
14881   if test "x$build_gdbserver" = xyes; then
14882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14883 $as_echo "yes" >&6; }
14884     subdirs="$subdirs gdbserver"
14885
14886     gdbserver_build_enabled=yes
14887   else
14888     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14889 $as_echo "no" >&6; }
14890   fi
14891 fi
14892
14893 # If the user explicitly request the gdbserver to be built, verify that
14894 # we were in fact able to enable it.
14895 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14896   as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14897 fi
14898
14899 # Check for babeltrace and babeltrace-ctf
14900
14901 # Check whether --with-babeltrace was given.
14902 if test "${with_babeltrace+set}" = set; then :
14903   withval=$with_babeltrace;
14904 else
14905   with_babeltrace=auto
14906 fi
14907
14908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14909 $as_echo_n "checking whether to use babeltrace... " >&6; }
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14911 $as_echo "$with_babeltrace" >&6; }
14912
14913 if test "x$with_babeltrace" = "xno"; then
14914   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14915 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14916 else
14917   # Append -Werror to CFLAGS so that configure can catch the warning
14918   # "assignment from incompatible pointer type", which is related to
14919   # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
14920   # in GDB, while babeltrace 1.0.3 is broken.
14921   # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14922   # safe to save and restore CFLAGS here.
14923   saved_CFLAGS=$CFLAGS
14924   CFLAGS="$CFLAGS -Werror"
14925
14926
14927
14928
14929
14930
14931
14932
14933     use_additional=yes
14934
14935   acl_save_prefix="$prefix"
14936   prefix="$acl_final_prefix"
14937   acl_save_exec_prefix="$exec_prefix"
14938   exec_prefix="$acl_final_exec_prefix"
14939
14940     eval additional_includedir=\"$includedir\"
14941     eval additional_libdir=\"$libdir\"
14942
14943   exec_prefix="$acl_save_exec_prefix"
14944   prefix="$acl_save_prefix"
14945
14946
14947 # Check whether --with-libbabeltrace-prefix was given.
14948 if test "${with_libbabeltrace_prefix+set}" = set; then :
14949   withval=$with_libbabeltrace_prefix;
14950     if test "X$withval" = "Xno"; then
14951       use_additional=no
14952     else
14953       if test "X$withval" = "X"; then
14954
14955   acl_save_prefix="$prefix"
14956   prefix="$acl_final_prefix"
14957   acl_save_exec_prefix="$exec_prefix"
14958   exec_prefix="$acl_final_exec_prefix"
14959
14960           eval additional_includedir=\"$includedir\"
14961           eval additional_libdir=\"$libdir\"
14962
14963   exec_prefix="$acl_save_exec_prefix"
14964   prefix="$acl_save_prefix"
14965
14966       else
14967         additional_includedir="$withval/include"
14968         additional_libdir="$withval/lib"
14969       fi
14970     fi
14971
14972 fi
14973
14974       LIBBABELTRACE=
14975   LTLIBBABELTRACE=
14976   INCBABELTRACE=
14977   rpathdirs=
14978   ltrpathdirs=
14979   names_already_handled=
14980   names_next_round='babeltrace babeltrace-ctf'
14981   while test -n "$names_next_round"; do
14982     names_this_round="$names_next_round"
14983     names_next_round=
14984     for name in $names_this_round; do
14985       already_handled=
14986       for n in $names_already_handled; do
14987         if test "$n" = "$name"; then
14988           already_handled=yes
14989           break
14990         fi
14991       done
14992       if test -z "$already_handled"; then
14993         names_already_handled="$names_already_handled $name"
14994                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14995         eval value=\"\$HAVE_LIB$uppername\"
14996         if test -n "$value"; then
14997           if test "$value" = yes; then
14998             eval value=\"\$LIB$uppername\"
14999             test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
15000             eval value=\"\$LTLIB$uppername\"
15001             test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
15002           else
15003                                     :
15004           fi
15005         else
15006                               found_dir=
15007           found_la=
15008           found_so=
15009           found_a=
15010           if test $use_additional = yes; then
15011             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15012               found_dir="$additional_libdir"
15013               found_so="$additional_libdir/lib$name.$shlibext"
15014               if test -f "$additional_libdir/lib$name.la"; then
15015                 found_la="$additional_libdir/lib$name.la"
15016               fi
15017             else
15018               if test -f "$additional_libdir/lib$name.$libext"; then
15019                 found_dir="$additional_libdir"
15020                 found_a="$additional_libdir/lib$name.$libext"
15021                 if test -f "$additional_libdir/lib$name.la"; then
15022                   found_la="$additional_libdir/lib$name.la"
15023                 fi
15024               fi
15025             fi
15026           fi
15027           if test "X$found_dir" = "X"; then
15028             for x in $LDFLAGS $LTLIBBABELTRACE; do
15029
15030   acl_save_prefix="$prefix"
15031   prefix="$acl_final_prefix"
15032   acl_save_exec_prefix="$exec_prefix"
15033   exec_prefix="$acl_final_exec_prefix"
15034   eval x=\"$x\"
15035   exec_prefix="$acl_save_exec_prefix"
15036   prefix="$acl_save_prefix"
15037
15038               case "$x" in
15039                 -L*)
15040                   dir=`echo "X$x" | sed -e 's/^X-L//'`
15041                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15042                     found_dir="$dir"
15043                     found_so="$dir/lib$name.$shlibext"
15044                     if test -f "$dir/lib$name.la"; then
15045                       found_la="$dir/lib$name.la"
15046                     fi
15047                   else
15048                     if test -f "$dir/lib$name.$libext"; then
15049                       found_dir="$dir"
15050                       found_a="$dir/lib$name.$libext"
15051                       if test -f "$dir/lib$name.la"; then
15052                         found_la="$dir/lib$name.la"
15053                       fi
15054                     fi
15055                   fi
15056                   ;;
15057               esac
15058               if test "X$found_dir" != "X"; then
15059                 break
15060               fi
15061             done
15062           fi
15063           if test "X$found_dir" != "X"; then
15064                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
15065             if test "X$found_so" != "X"; then
15066                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15067                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15068               else
15069                                                                                 haveit=
15070                 for x in $ltrpathdirs; do
15071                   if test "X$x" = "X$found_dir"; then
15072                     haveit=yes
15073                     break
15074                   fi
15075                 done
15076                 if test -z "$haveit"; then
15077                   ltrpathdirs="$ltrpathdirs $found_dir"
15078                 fi
15079                                 if test "$hardcode_direct" = yes; then
15080                                                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15081                 else
15082                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15083                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15084                                                             haveit=
15085                     for x in $rpathdirs; do
15086                       if test "X$x" = "X$found_dir"; then
15087                         haveit=yes
15088                         break
15089                       fi
15090                     done
15091                     if test -z "$haveit"; then
15092                       rpathdirs="$rpathdirs $found_dir"
15093                     fi
15094                   else
15095                                                                                 haveit=
15096                     for x in $LDFLAGS $LIBBABELTRACE; do
15097
15098   acl_save_prefix="$prefix"
15099   prefix="$acl_final_prefix"
15100   acl_save_exec_prefix="$exec_prefix"
15101   exec_prefix="$acl_final_exec_prefix"
15102   eval x=\"$x\"
15103   exec_prefix="$acl_save_exec_prefix"
15104   prefix="$acl_save_prefix"
15105
15106                       if test "X$x" = "X-L$found_dir"; then
15107                         haveit=yes
15108                         break
15109                       fi
15110                     done
15111                     if test -z "$haveit"; then
15112                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
15113                     fi
15114                     if test "$hardcode_minus_L" != no; then
15115                                                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15116                     else
15117                                                                                                                                                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15118                     fi
15119                   fi
15120                 fi
15121               fi
15122             else
15123               if test "X$found_a" != "X"; then
15124                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
15125               else
15126                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
15127               fi
15128             fi
15129                         additional_includedir=
15130             case "$found_dir" in
15131               */lib | */lib/)
15132                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15133                 additional_includedir="$basedir/include"
15134                 ;;
15135             esac
15136             if test "X$additional_includedir" != "X"; then
15137                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
15138                 haveit=
15139                 if test "X$additional_includedir" = "X/usr/local/include"; then
15140                   if test -n "$GCC"; then
15141                     case $host_os in
15142                       linux*) haveit=yes;;
15143                     esac
15144                   fi
15145                 fi
15146                 if test -z "$haveit"; then
15147                   for x in $CPPFLAGS $INCBABELTRACE; do
15148
15149   acl_save_prefix="$prefix"
15150   prefix="$acl_final_prefix"
15151   acl_save_exec_prefix="$exec_prefix"
15152   exec_prefix="$acl_final_exec_prefix"
15153   eval x=\"$x\"
15154   exec_prefix="$acl_save_exec_prefix"
15155   prefix="$acl_save_prefix"
15156
15157                     if test "X$x" = "X-I$additional_includedir"; then
15158                       haveit=yes
15159                       break
15160                     fi
15161                   done
15162                   if test -z "$haveit"; then
15163                     if test -d "$additional_includedir"; then
15164                                             INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
15165                     fi
15166                   fi
15167                 fi
15168               fi
15169             fi
15170                         if test -n "$found_la"; then
15171                                                         save_libdir="$libdir"
15172               case "$found_la" in
15173                 */* | *\\*) . "$found_la" ;;
15174                 *) . "./$found_la" ;;
15175               esac
15176               libdir="$save_libdir"
15177                             for dep in $dependency_libs; do
15178                 case "$dep" in
15179                   -L*)
15180                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15181                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
15182                       haveit=
15183                       if test "X$additional_libdir" = "X/usr/local/lib"; then
15184                         if test -n "$GCC"; then
15185                           case $host_os in
15186                             linux*) haveit=yes;;
15187                           esac
15188                         fi
15189                       fi
15190                       if test -z "$haveit"; then
15191                         haveit=
15192                         for x in $LDFLAGS $LIBBABELTRACE; do
15193
15194   acl_save_prefix="$prefix"
15195   prefix="$acl_final_prefix"
15196   acl_save_exec_prefix="$exec_prefix"
15197   exec_prefix="$acl_final_exec_prefix"
15198   eval x=\"$x\"
15199   exec_prefix="$acl_save_exec_prefix"
15200   prefix="$acl_save_prefix"
15201
15202                           if test "X$x" = "X-L$additional_libdir"; then
15203                             haveit=yes
15204                             break
15205                           fi
15206                         done
15207                         if test -z "$haveit"; then
15208                           if test -d "$additional_libdir"; then
15209                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
15210                           fi
15211                         fi
15212                         haveit=
15213                         for x in $LDFLAGS $LTLIBBABELTRACE; do
15214
15215   acl_save_prefix="$prefix"
15216   prefix="$acl_final_prefix"
15217   acl_save_exec_prefix="$exec_prefix"
15218   exec_prefix="$acl_final_exec_prefix"
15219   eval x=\"$x\"
15220   exec_prefix="$acl_save_exec_prefix"
15221   prefix="$acl_save_prefix"
15222
15223                           if test "X$x" = "X-L$additional_libdir"; then
15224                             haveit=yes
15225                             break
15226                           fi
15227                         done
15228                         if test -z "$haveit"; then
15229                           if test -d "$additional_libdir"; then
15230                                                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
15231                           fi
15232                         fi
15233                       fi
15234                     fi
15235                     ;;
15236                   -R*)
15237                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
15238                     if test "$enable_rpath" != no; then
15239                                                                   haveit=
15240                       for x in $rpathdirs; do
15241                         if test "X$x" = "X$dir"; then
15242                           haveit=yes
15243                           break
15244                         fi
15245                       done
15246                       if test -z "$haveit"; then
15247                         rpathdirs="$rpathdirs $dir"
15248                       fi
15249                                                                   haveit=
15250                       for x in $ltrpathdirs; do
15251                         if test "X$x" = "X$dir"; then
15252                           haveit=yes
15253                           break
15254                         fi
15255                       done
15256                       if test -z "$haveit"; then
15257                         ltrpathdirs="$ltrpathdirs $dir"
15258                       fi
15259                     fi
15260                     ;;
15261                   -l*)
15262                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15263                     ;;
15264                   *.la)
15265                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15266                     ;;
15267                   *)
15268                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
15269                     LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
15270                     ;;
15271                 esac
15272               done
15273             fi
15274           else
15275                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15276             LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
15277           fi
15278         fi
15279       fi
15280     done
15281   done
15282   if test "X$rpathdirs" != "X"; then
15283     if test -n "$hardcode_libdir_separator"; then
15284                         alldirs=
15285       for found_dir in $rpathdirs; do
15286         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15287       done
15288             acl_save_libdir="$libdir"
15289       libdir="$alldirs"
15290       eval flag=\"$hardcode_libdir_flag_spec\"
15291       libdir="$acl_save_libdir"
15292       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15293     else
15294             for found_dir in $rpathdirs; do
15295         acl_save_libdir="$libdir"
15296         libdir="$found_dir"
15297         eval flag=\"$hardcode_libdir_flag_spec\"
15298         libdir="$acl_save_libdir"
15299         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15300       done
15301     fi
15302   fi
15303   if test "X$ltrpathdirs" != "X"; then
15304             for found_dir in $ltrpathdirs; do
15305       LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
15306     done
15307   fi
15308
15309
15310         ac_save_CPPFLAGS="$CPPFLAGS"
15311
15312   for element in $INCBABELTRACE; do
15313     haveit=
15314     for x in $CPPFLAGS; do
15315
15316   acl_save_prefix="$prefix"
15317   prefix="$acl_final_prefix"
15318   acl_save_exec_prefix="$exec_prefix"
15319   exec_prefix="$acl_final_exec_prefix"
15320   eval x=\"$x\"
15321   exec_prefix="$acl_save_exec_prefix"
15322   prefix="$acl_save_prefix"
15323
15324       if test "X$x" = "X$element"; then
15325         haveit=yes
15326         break
15327       fi
15328     done
15329     if test -z "$haveit"; then
15330       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15331     fi
15332   done
15333
15334
15335   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
15336 $as_echo_n "checking for libbabeltrace... " >&6; }
15337 if test "${ac_cv_libbabeltrace+set}" = set; then :
15338   $as_echo_n "(cached) " >&6
15339 else
15340
15341     ac_save_LIBS="$LIBS"
15342     LIBS="$LIBS $LIBBABELTRACE"
15343     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15344 /* end confdefs.h.  */
15345 #include <babeltrace/babeltrace.h>
15346                          #include <babeltrace/ctf/events.h>
15347                          #include <babeltrace/ctf/iterator.h>
15348 int
15349 main ()
15350 {
15351 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
15352                         struct bt_ctf_event *event = NULL;
15353                         const struct bt_definition *scope;
15354
15355                         bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
15356                         scope = bt_ctf_get_top_level_scope (event,
15357                                                            BT_STREAM_EVENT_HEADER);
15358                         bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
15359
15360   ;
15361   return 0;
15362 }
15363 _ACEOF
15364 if ac_fn_c_try_link "$LINENO"; then :
15365   ac_cv_libbabeltrace=yes
15366 else
15367   ac_cv_libbabeltrace=no
15368 fi
15369 rm -f core conftest.err conftest.$ac_objext \
15370     conftest$ac_exeext conftest.$ac_ext
15371     LIBS="$ac_save_LIBS"
15372
15373 fi
15374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
15375 $as_echo "$ac_cv_libbabeltrace" >&6; }
15376   if test "$ac_cv_libbabeltrace" = yes; then
15377     HAVE_LIBBABELTRACE=yes
15378
15379 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
15380
15381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
15382 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
15383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
15384 $as_echo "$LIBBABELTRACE" >&6; }
15385   else
15386     HAVE_LIBBABELTRACE=no
15387             CPPFLAGS="$ac_save_CPPFLAGS"
15388     LIBBABELTRACE=
15389     LTLIBBABELTRACE=
15390   fi
15391
15392
15393
15394
15395
15396
15397   CFLAGS=$saved_CFLAGS
15398
15399   if test "$HAVE_LIBBABELTRACE" != yes; then
15400      if test "$with_babeltrace" = yes; then
15401        as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
15402      else
15403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
15404 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
15405      fi
15406   fi
15407 fi
15408
15409 # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
15410 # to an empty version.
15411
15412 files=
15413 links=
15414
15415 rm -f nm.h
15416 if test "${nativefile}" != ""; then
15417     case "${nativefile}" in
15418       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15419       * ) GDB_NM_FILE="${nativefile}"
15420     esac
15421     files="${files} ${GDB_NM_FILE}"
15422     links="${links} nm.h"
15423
15424 cat >>confdefs.h <<_ACEOF
15425 #define GDB_NM_FILE "${GDB_NM_FILE}"
15426 _ACEOF
15427
15428 fi
15429
15430
15431 ac_sources="$files"
15432 ac_dests="$links"
15433 while test -n "$ac_sources"; do
15434   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15435   set $ac_sources; ac_source=$1; shift; ac_sources=$*
15436   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15437 done
15438 ac_config_links="$ac_config_links $ac_config_links_1"
15439
15440
15441
15442
15443
15444 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
15445
15446
15447 # Undo the $ec_script escaping suitable for Makefile.
15448 transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15449 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
15450 if test "x$GDB_TRANSFORM_NAME" = x; then
15451   GDB_TRANSFORM_NAME=gdb
15452 fi
15453
15454 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
15455 if test "x$GCORE_TRANSFORM_NAME" = x; then
15456   GCORE_TRANSFORM_NAME=gcore
15457 fi
15458
15459 ac_config_files="$ac_config_files gcore"
15460
15461
15462 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
15463
15464 ac_config_commands="$ac_config_commands default"
15465
15466 cat >confcache <<\_ACEOF
15467 # This file is a shell script that caches the results of configure
15468 # tests run on this system so they can be shared between configure
15469 # scripts and configure runs, see configure's option --config-cache.
15470 # It is not useful on other systems.  If it contains results you don't
15471 # want to keep, you may remove or edit it.
15472 #
15473 # config.status only pays attention to the cache file if you give it
15474 # the --recheck option to rerun configure.
15475 #
15476 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15477 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15478 # following values.
15479
15480 _ACEOF
15481
15482 # The following way of writing the cache mishandles newlines in values,
15483 # but we know of no workaround that is simple, portable, and efficient.
15484 # So, we kill variables containing newlines.
15485 # Ultrix sh set writes to stderr and can't be redirected directly,
15486 # and sets the high bit in the cache file unless we assign to the vars.
15487 (
15488   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15489     eval ac_val=\$$ac_var
15490     case $ac_val in #(
15491     *${as_nl}*)
15492       case $ac_var in #(
15493       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15494 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15495       esac
15496       case $ac_var in #(
15497       _ | IFS | as_nl) ;; #(
15498       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15499       *) { eval $ac_var=; unset $ac_var;} ;;
15500       esac ;;
15501     esac
15502   done
15503
15504   (set) 2>&1 |
15505     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15506     *${as_nl}ac_space=\ *)
15507       # `set' does not quote correctly, so add quotes: double-quote
15508       # substitution turns \\\\ into \\, and sed turns \\ into \.
15509       sed -n \
15510         "s/'/'\\\\''/g;
15511           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15512       ;; #(
15513     *)
15514       # `set' quotes correctly as required by POSIX, so do not add quotes.
15515       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15516       ;;
15517     esac |
15518     sort
15519 ) |
15520   sed '
15521      /^ac_cv_env_/b end
15522      t clear
15523      :clear
15524      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15525      t end
15526      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15527      :end' >>confcache
15528 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15529   if test -w "$cache_file"; then
15530     test "x$cache_file" != "x/dev/null" &&
15531       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15532 $as_echo "$as_me: updating cache $cache_file" >&6;}
15533     cat confcache >$cache_file
15534   else
15535     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15536 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15537   fi
15538 fi
15539 rm -f confcache
15540
15541 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15542 # Let make expand exec_prefix.
15543 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15544
15545 DEFS=-DHAVE_CONFIG_H
15546
15547 ac_libobjs=
15548 ac_ltlibobjs=
15549 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15550   # 1. Remove the extension, and $U if already installed.
15551   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15552   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15553   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15554   #    will be set to the directory where LIBOBJS objects are built.
15555   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15556   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15557 done
15558 LIBOBJS=$ac_libobjs
15559
15560 LTLIBOBJS=$ac_ltlibobjs
15561
15562
15563 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
15564   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15565 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15566 fi
15567 if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
15568   as_fn_error "conditional \"GMAKE\" was never defined.
15569 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15570 fi
15571 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
15572   as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
15573 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15574 fi
15575 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
15576   as_fn_error "conditional \"HAVE_GUILE\" was never defined.
15577 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15578 fi
15579
15580
15581 : ${CONFIG_STATUS=./config.status}
15582 ac_write_fail=0
15583 ac_clean_files_save=$ac_clean_files
15584 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15585 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15586 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15587 as_write_fail=0
15588 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15589 #! $SHELL
15590 # Generated by $as_me.
15591 # Run this file to recreate the current configuration.
15592 # Compiler output produced by configure, useful for debugging
15593 # configure, is in config.log if it exists.
15594
15595 debug=false
15596 ac_cs_recheck=false
15597 ac_cs_silent=false
15598
15599 SHELL=\${CONFIG_SHELL-$SHELL}
15600 export SHELL
15601 _ASEOF
15602 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15603 ## -------------------- ##
15604 ## M4sh Initialization. ##
15605 ## -------------------- ##
15606
15607 # Be more Bourne compatible
15608 DUALCASE=1; export DUALCASE # for MKS sh
15609 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15610   emulate sh
15611   NULLCMD=:
15612   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15613   # is contrary to our usage.  Disable this feature.
15614   alias -g '${1+"$@"}'='"$@"'
15615   setopt NO_GLOB_SUBST
15616 else
15617   case `(set -o) 2>/dev/null` in #(
15618   *posix*) :
15619     set -o posix ;; #(
15620   *) :
15621      ;;
15622 esac
15623 fi
15624
15625
15626 as_nl='
15627 '
15628 export as_nl
15629 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15630 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15631 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15632 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15633 # Prefer a ksh shell builtin over an external printf program on Solaris,
15634 # but without wasting forks for bash or zsh.
15635 if test -z "$BASH_VERSION$ZSH_VERSION" \
15636     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15637   as_echo='print -r --'
15638   as_echo_n='print -rn --'
15639 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15640   as_echo='printf %s\n'
15641   as_echo_n='printf %s'
15642 else
15643   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15644     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15645     as_echo_n='/usr/ucb/echo -n'
15646   else
15647     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15648     as_echo_n_body='eval
15649       arg=$1;
15650       case $arg in #(
15651       *"$as_nl"*)
15652         expr "X$arg" : "X\\(.*\\)$as_nl";
15653         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15654       esac;
15655       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15656     '
15657     export as_echo_n_body
15658     as_echo_n='sh -c $as_echo_n_body as_echo'
15659   fi
15660   export as_echo_body
15661   as_echo='sh -c $as_echo_body as_echo'
15662 fi
15663
15664 # The user is always right.
15665 if test "${PATH_SEPARATOR+set}" != set; then
15666   PATH_SEPARATOR=:
15667   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15668     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15669       PATH_SEPARATOR=';'
15670   }
15671 fi
15672
15673
15674 # IFS
15675 # We need space, tab and new line, in precisely that order.  Quoting is
15676 # there to prevent editors from complaining about space-tab.
15677 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15678 # splitting by setting IFS to empty value.)
15679 IFS=" ""        $as_nl"
15680
15681 # Find who we are.  Look in the path if we contain no directory separator.
15682 case $0 in #((
15683   *[\\/]* ) as_myself=$0 ;;
15684   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15685 for as_dir in $PATH
15686 do
15687   IFS=$as_save_IFS
15688   test -z "$as_dir" && as_dir=.
15689     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15690   done
15691 IFS=$as_save_IFS
15692
15693      ;;
15694 esac
15695 # We did not find ourselves, most probably we were run as `sh COMMAND'
15696 # in which case we are not to be found in the path.
15697 if test "x$as_myself" = x; then
15698   as_myself=$0
15699 fi
15700 if test ! -f "$as_myself"; then
15701   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15702   exit 1
15703 fi
15704
15705 # Unset variables that we do not need and which cause bugs (e.g. in
15706 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15707 # suppresses any "Segmentation fault" message there.  '((' could
15708 # trigger a bug in pdksh 5.2.14.
15709 for as_var in BASH_ENV ENV MAIL MAILPATH
15710 do eval test x\${$as_var+set} = xset \
15711   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15712 done
15713 PS1='$ '
15714 PS2='> '
15715 PS4='+ '
15716
15717 # NLS nuisances.
15718 LC_ALL=C
15719 export LC_ALL
15720 LANGUAGE=C
15721 export LANGUAGE
15722
15723 # CDPATH.
15724 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15725
15726
15727 # as_fn_error ERROR [LINENO LOG_FD]
15728 # ---------------------------------
15729 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15730 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15731 # script with status $?, using 1 if that was 0.
15732 as_fn_error ()
15733 {
15734   as_status=$?; test $as_status -eq 0 && as_status=1
15735   if test "$3"; then
15736     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15737     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15738   fi
15739   $as_echo "$as_me: error: $1" >&2
15740   as_fn_exit $as_status
15741 } # as_fn_error
15742
15743
15744 # as_fn_set_status STATUS
15745 # -----------------------
15746 # Set $? to STATUS, without forking.
15747 as_fn_set_status ()
15748 {
15749   return $1
15750 } # as_fn_set_status
15751
15752 # as_fn_exit STATUS
15753 # -----------------
15754 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15755 as_fn_exit ()
15756 {
15757   set +e
15758   as_fn_set_status $1
15759   exit $1
15760 } # as_fn_exit
15761
15762 # as_fn_unset VAR
15763 # ---------------
15764 # Portably unset VAR.
15765 as_fn_unset ()
15766 {
15767   { eval $1=; unset $1;}
15768 }
15769 as_unset=as_fn_unset
15770 # as_fn_append VAR VALUE
15771 # ----------------------
15772 # Append the text in VALUE to the end of the definition contained in VAR. Take
15773 # advantage of any shell optimizations that allow amortized linear growth over
15774 # repeated appends, instead of the typical quadratic growth present in naive
15775 # implementations.
15776 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15777   eval 'as_fn_append ()
15778   {
15779     eval $1+=\$2
15780   }'
15781 else
15782   as_fn_append ()
15783   {
15784     eval $1=\$$1\$2
15785   }
15786 fi # as_fn_append
15787
15788 # as_fn_arith ARG...
15789 # ------------------
15790 # Perform arithmetic evaluation on the ARGs, and store the result in the
15791 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15792 # must be portable across $(()) and expr.
15793 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15794   eval 'as_fn_arith ()
15795   {
15796     as_val=$(( $* ))
15797   }'
15798 else
15799   as_fn_arith ()
15800   {
15801     as_val=`expr "$@" || test $? -eq 1`
15802   }
15803 fi # as_fn_arith
15804
15805
15806 if expr a : '\(a\)' >/dev/null 2>&1 &&
15807    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15808   as_expr=expr
15809 else
15810   as_expr=false
15811 fi
15812
15813 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15814   as_basename=basename
15815 else
15816   as_basename=false
15817 fi
15818
15819 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15820   as_dirname=dirname
15821 else
15822   as_dirname=false
15823 fi
15824
15825 as_me=`$as_basename -- "$0" ||
15826 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15827          X"$0" : 'X\(//\)$' \| \
15828          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15829 $as_echo X/"$0" |
15830     sed '/^.*\/\([^/][^/]*\)\/*$/{
15831             s//\1/
15832             q
15833           }
15834           /^X\/\(\/\/\)$/{
15835             s//\1/
15836             q
15837           }
15838           /^X\/\(\/\).*/{
15839             s//\1/
15840             q
15841           }
15842           s/.*/./; q'`
15843
15844 # Avoid depending upon Character Ranges.
15845 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15846 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15847 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15848 as_cr_digits='0123456789'
15849 as_cr_alnum=$as_cr_Letters$as_cr_digits
15850
15851 ECHO_C= ECHO_N= ECHO_T=
15852 case `echo -n x` in #(((((
15853 -n*)
15854   case `echo 'xy\c'` in
15855   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15856   xy)  ECHO_C='\c';;
15857   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15858        ECHO_T=' ';;
15859   esac;;
15860 *)
15861   ECHO_N='-n';;
15862 esac
15863
15864 rm -f conf$$ conf$$.exe conf$$.file
15865 if test -d conf$$.dir; then
15866   rm -f conf$$.dir/conf$$.file
15867 else
15868   rm -f conf$$.dir
15869   mkdir conf$$.dir 2>/dev/null
15870 fi
15871 if (echo >conf$$.file) 2>/dev/null; then
15872   if ln -s conf$$.file conf$$ 2>/dev/null; then
15873     as_ln_s='ln -s'
15874     # ... but there are two gotchas:
15875     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15876     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15877     # In both cases, we have to default to `cp -p'.
15878     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15879       as_ln_s='cp -p'
15880   elif ln conf$$.file conf$$ 2>/dev/null; then
15881     as_ln_s=ln
15882   else
15883     as_ln_s='cp -p'
15884   fi
15885 else
15886   as_ln_s='cp -p'
15887 fi
15888 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15889 rmdir conf$$.dir 2>/dev/null
15890
15891
15892 # as_fn_mkdir_p
15893 # -------------
15894 # Create "$as_dir" as a directory, including parents if necessary.
15895 as_fn_mkdir_p ()
15896 {
15897
15898   case $as_dir in #(
15899   -*) as_dir=./$as_dir;;
15900   esac
15901   test -d "$as_dir" || eval $as_mkdir_p || {
15902     as_dirs=
15903     while :; do
15904       case $as_dir in #(
15905       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15906       *) as_qdir=$as_dir;;
15907       esac
15908       as_dirs="'$as_qdir' $as_dirs"
15909       as_dir=`$as_dirname -- "$as_dir" ||
15910 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15911          X"$as_dir" : 'X\(//\)[^/]' \| \
15912          X"$as_dir" : 'X\(//\)$' \| \
15913          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15914 $as_echo X"$as_dir" |
15915     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15916             s//\1/
15917             q
15918           }
15919           /^X\(\/\/\)[^/].*/{
15920             s//\1/
15921             q
15922           }
15923           /^X\(\/\/\)$/{
15924             s//\1/
15925             q
15926           }
15927           /^X\(\/\).*/{
15928             s//\1/
15929             q
15930           }
15931           s/.*/./; q'`
15932       test -d "$as_dir" && break
15933     done
15934     test -z "$as_dirs" || eval "mkdir $as_dirs"
15935   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15936
15937
15938 } # as_fn_mkdir_p
15939 if mkdir -p . 2>/dev/null; then
15940   as_mkdir_p='mkdir -p "$as_dir"'
15941 else
15942   test -d ./-p && rmdir ./-p
15943   as_mkdir_p=false
15944 fi
15945
15946 if test -x / >/dev/null 2>&1; then
15947   as_test_x='test -x'
15948 else
15949   if ls -dL / >/dev/null 2>&1; then
15950     as_ls_L_option=L
15951   else
15952     as_ls_L_option=
15953   fi
15954   as_test_x='
15955     eval sh -c '\''
15956       if test -d "$1"; then
15957         test -d "$1/.";
15958       else
15959         case $1 in #(
15960         -*)set "./$1";;
15961         esac;
15962         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15963         ???[sx]*):;;*)false;;esac;fi
15964     '\'' sh
15965   '
15966 fi
15967 as_executable_p=$as_test_x
15968
15969 # Sed expression to map a string onto a valid CPP name.
15970 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15971
15972 # Sed expression to map a string onto a valid variable name.
15973 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15974
15975
15976 exec 6>&1
15977 ## ----------------------------------- ##
15978 ## Main body of $CONFIG_STATUS script. ##
15979 ## ----------------------------------- ##
15980 _ASEOF
15981 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15982
15983 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15984 # Save the log message, to keep $0 and so on meaningful, and to
15985 # report actual input values of CONFIG_FILES etc. instead of their
15986 # values after options handling.
15987 ac_log="
15988 This file was extended by $as_me, which was
15989 generated by GNU Autoconf 2.64.  Invocation command line was
15990
15991   CONFIG_FILES    = $CONFIG_FILES
15992   CONFIG_HEADERS  = $CONFIG_HEADERS
15993   CONFIG_LINKS    = $CONFIG_LINKS
15994   CONFIG_COMMANDS = $CONFIG_COMMANDS
15995   $ $0 $@
15996
15997 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15998 "
15999
16000 _ACEOF
16001
16002 case $ac_config_files in *"
16003 "*) set x $ac_config_files; shift; ac_config_files=$*;;
16004 esac
16005
16006 case $ac_config_headers in *"
16007 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16008 esac
16009
16010
16011 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16012 # Files that config.status was made for.
16013 config_files="$ac_config_files"
16014 config_headers="$ac_config_headers"
16015 config_links="$ac_config_links"
16016 config_commands="$ac_config_commands"
16017
16018 _ACEOF
16019
16020 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16021 ac_cs_usage="\
16022 \`$as_me' instantiates files and other configuration actions
16023 from templates according to the current configuration.  Unless the files
16024 and actions are specified as TAGs, all are instantiated by default.
16025
16026 Usage: $0 [OPTION]... [TAG]...
16027
16028   -h, --help       print this help, then exit
16029   -V, --version    print version number and configuration settings, then exit
16030   -q, --quiet, --silent
16031                    do not print progress messages
16032   -d, --debug      don't remove temporary files
16033       --recheck    update $as_me by reconfiguring in the same conditions
16034       --file=FILE[:TEMPLATE]
16035                    instantiate the configuration file FILE
16036       --header=FILE[:TEMPLATE]
16037                    instantiate the configuration header FILE
16038
16039 Configuration files:
16040 $config_files
16041
16042 Configuration headers:
16043 $config_headers
16044
16045 Configuration links:
16046 $config_links
16047
16048 Configuration commands:
16049 $config_commands
16050
16051 Report bugs to the package provider."
16052
16053 _ACEOF
16054 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16055 ac_cs_version="\\
16056 config.status
16057 configured by $0, generated by GNU Autoconf 2.64,
16058   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
16059
16060 Copyright (C) 2009 Free Software Foundation, Inc.
16061 This config.status script is free software; the Free Software Foundation
16062 gives unlimited permission to copy, distribute and modify it."
16063
16064 ac_pwd='$ac_pwd'
16065 srcdir='$srcdir'
16066 INSTALL='$INSTALL'
16067 AWK='$AWK'
16068 test -n "\$AWK" || AWK=awk
16069 _ACEOF
16070
16071 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16072 # The default lists apply if the user does not specify any file.
16073 ac_need_defaults=:
16074 while test $# != 0
16075 do
16076   case $1 in
16077   --*=*)
16078     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16079     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16080     ac_shift=:
16081     ;;
16082   *)
16083     ac_option=$1
16084     ac_optarg=$2
16085     ac_shift=shift
16086     ;;
16087   esac
16088
16089   case $ac_option in
16090   # Handling of the options.
16091   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16092     ac_cs_recheck=: ;;
16093   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16094     $as_echo "$ac_cs_version"; exit ;;
16095   --debug | --debu | --deb | --de | --d | -d )
16096     debug=: ;;
16097   --file | --fil | --fi | --f )
16098     $ac_shift
16099     case $ac_optarg in
16100     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16101     esac
16102     as_fn_append CONFIG_FILES " '$ac_optarg'"
16103     ac_need_defaults=false;;
16104   --header | --heade | --head | --hea )
16105     $ac_shift
16106     case $ac_optarg in
16107     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16108     esac
16109     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16110     ac_need_defaults=false;;
16111   --he | --h)
16112     # Conflict between --help and --header
16113     as_fn_error "ambiguous option: \`$1'
16114 Try \`$0 --help' for more information.";;
16115   --help | --hel | -h )
16116     $as_echo "$ac_cs_usage"; exit ;;
16117   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16118   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16119     ac_cs_silent=: ;;
16120
16121   # This is an error.
16122   -*) as_fn_error "unrecognized option: \`$1'
16123 Try \`$0 --help' for more information." ;;
16124
16125   *) as_fn_append ac_config_targets " $1"
16126      ac_need_defaults=false ;;
16127
16128   esac
16129   shift
16130 done
16131
16132 ac_configure_extra_args=
16133
16134 if $ac_cs_silent; then
16135   exec 6>/dev/null
16136   ac_configure_extra_args="$ac_configure_extra_args --silent"
16137 fi
16138
16139 _ACEOF
16140 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16141 if \$ac_cs_recheck; then
16142   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16143   shift
16144   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16145   CONFIG_SHELL='$SHELL'
16146   export CONFIG_SHELL
16147   exec "\$@"
16148 fi
16149
16150 _ACEOF
16151 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16152 exec 5>>config.log
16153 {
16154   echo
16155   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16156 ## Running $as_me. ##
16157 _ASBOX
16158   $as_echo "$ac_log"
16159 } >&5
16160
16161 _ACEOF
16162 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16163 #
16164 # INIT-COMMANDS
16165 #
16166 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
16167
16168 _ACEOF
16169
16170 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16171
16172 # Handling of arguments.
16173 for ac_config_target in $ac_config_targets
16174 do
16175   case $ac_config_target in
16176     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16177     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
16178     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
16179     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
16180     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
16181     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16182     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
16183     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
16184     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
16185     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16186
16187   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16188   esac
16189 done
16190
16191
16192 # If the user did not use the arguments to specify the items to instantiate,
16193 # then the envvar interface is used.  Set only those that are not.
16194 # We use the long form for the default assignment because of an extremely
16195 # bizarre bug on SunOS 4.1.3.
16196 if $ac_need_defaults; then
16197   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16198   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16199   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16200   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16201 fi
16202
16203 # Have a temporary directory for convenience.  Make it in the build tree
16204 # simply because there is no reason against having it here, and in addition,
16205 # creating and moving files from /tmp can sometimes cause problems.
16206 # Hook for its removal unless debugging.
16207 # Note that there is a small window in which the directory will not be cleaned:
16208 # after its creation but before its name has been assigned to `$tmp'.
16209 $debug ||
16210 {
16211   tmp=
16212   trap 'exit_status=$?
16213   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16214 ' 0
16215   trap 'as_fn_exit 1' 1 2 13 15
16216 }
16217 # Create a (secure) tmp directory for tmp files.
16218
16219 {
16220   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16221   test -n "$tmp" && test -d "$tmp"
16222 }  ||
16223 {
16224   tmp=./conf$$-$RANDOM
16225   (umask 077 && mkdir "$tmp")
16226 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16227
16228 # Set up the scripts for CONFIG_FILES section.
16229 # No need to generate them if there are no CONFIG_FILES.
16230 # This happens for instance with `./config.status config.h'.
16231 if test -n "$CONFIG_FILES"; then
16232
16233 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16234   ac_cs_awk_getline=:
16235   ac_cs_awk_pipe_init=
16236   ac_cs_awk_read_file='
16237       while ((getline aline < (F[key])) > 0)
16238         print(aline)
16239       close(F[key])'
16240   ac_cs_awk_pipe_fini=
16241 else
16242   ac_cs_awk_getline=false
16243   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16244   ac_cs_awk_read_file='
16245       print "|#_!!_#|"
16246       print "cat " F[key] " &&"
16247       '$ac_cs_awk_pipe_init
16248   # The final `:' finishes the AND list.
16249   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16250 fi
16251 ac_cr=`echo X | tr X '\015'`
16252 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16253 # But we know of no other shell where ac_cr would be empty at this
16254 # point, so we can use a bashism as a fallback.
16255 if test "x$ac_cr" = x; then
16256   eval ac_cr=\$\'\\r\'
16257 fi
16258 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16259 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16260   ac_cs_awk_cr='\r'
16261 else
16262   ac_cs_awk_cr=$ac_cr
16263 fi
16264
16265 echo 'BEGIN {' >"$tmp/subs1.awk" &&
16266 _ACEOF
16267
16268 # Create commands to substitute file output variables.
16269 {
16270   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16271   echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16272   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16273   echo "_ACAWK" &&
16274   echo "_ACEOF"
16275 } >conf$$files.sh &&
16276 . ./conf$$files.sh ||
16277   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16278 rm -f conf$$files.sh
16279
16280 {
16281   echo "cat >conf$$subs.awk <<_ACEOF" &&
16282   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16283   echo "_ACEOF"
16284 } >conf$$subs.sh ||
16285   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16286 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16287 ac_delim='%!_!# '
16288 for ac_last_try in false false false false false :; do
16289   . ./conf$$subs.sh ||
16290     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16291
16292   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16293   if test $ac_delim_n = $ac_delim_num; then
16294     break
16295   elif $ac_last_try; then
16296     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16297   else
16298     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16299   fi
16300 done
16301 rm -f conf$$subs.sh
16302
16303 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16304 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16305 _ACEOF
16306 sed -n '
16307 h
16308 s/^/S["/; s/!.*/"]=/
16309 p
16310 g
16311 s/^[^!]*!//
16312 :repl
16313 t repl
16314 s/'"$ac_delim"'$//
16315 t delim
16316 :nl
16317 h
16318 s/\(.\{148\}\).*/\1/
16319 t more1
16320 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16321 p
16322 n
16323 b repl
16324 :more1
16325 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16326 p
16327 g
16328 s/.\{148\}//
16329 t nl
16330 :delim
16331 h
16332 s/\(.\{148\}\).*/\1/
16333 t more2
16334 s/["\\]/\\&/g; s/^/"/; s/$/"/
16335 p
16336 b
16337 :more2
16338 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16339 p
16340 g
16341 s/.\{148\}//
16342 t delim
16343 ' <conf$$subs.awk | sed '
16344 /^[^""]/{
16345   N
16346   s/\n//
16347 }
16348 ' >>$CONFIG_STATUS || ac_write_fail=1
16349 rm -f conf$$subs.awk
16350 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16351 _ACAWK
16352 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16353   for (key in S) S_is_set[key] = 1
16354   FS = "\a"
16355   \$ac_cs_awk_pipe_init
16356 }
16357 {
16358   line = $ 0
16359   nfields = split(line, field, "@")
16360   substed = 0
16361   len = length(field[1])
16362   for (i = 2; i < nfields; i++) {
16363     key = field[i]
16364     keylen = length(key)
16365     if (S_is_set[key]) {
16366       value = S[key]
16367       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16368       len += length(value) + length(field[++i])
16369       substed = 1
16370     } else
16371       len += 1 + keylen
16372   }
16373   if (nfields == 3 && !substed) {
16374     key = field[2]
16375     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
16376       \$ac_cs_awk_read_file
16377       next
16378     }
16379   }
16380   print line
16381 }
16382 \$ac_cs_awk_pipe_fini
16383 _ACAWK
16384 _ACEOF
16385 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16386 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16387   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16388 else
16389   cat
16390 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16391   || as_fn_error "could not setup config files machinery" "$LINENO" 5
16392 _ACEOF
16393
16394 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16395 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16396 # trailing colons and then remove the whole line if VPATH becomes empty
16397 # (actually we leave an empty line to preserve line numbers).
16398 if test "x$srcdir" = x.; then
16399   ac_vpsub='/^[  ]*VPATH[        ]*=/{
16400 s/:*\$(srcdir):*/:/
16401 s/:*\${srcdir}:*/:/
16402 s/:*@srcdir@:*/:/
16403 s/^\([^=]*=[     ]*\):*/\1/
16404 s/:*$//
16405 s/^[^=]*=[       ]*$//
16406 }'
16407 fi
16408
16409 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16410 fi # test -n "$CONFIG_FILES"
16411
16412 # Set up the scripts for CONFIG_HEADERS section.
16413 # No need to generate them if there are no CONFIG_HEADERS.
16414 # This happens for instance with `./config.status Makefile'.
16415 if test -n "$CONFIG_HEADERS"; then
16416 cat >"$tmp/defines.awk" <<\_ACAWK ||
16417 BEGIN {
16418 _ACEOF
16419
16420 # Transform confdefs.h into an awk script `defines.awk', embedded as
16421 # here-document in config.status, that substitutes the proper values into
16422 # config.h.in to produce config.h.
16423
16424 # Create a delimiter string that does not exist in confdefs.h, to ease
16425 # handling of long lines.
16426 ac_delim='%!_!# '
16427 for ac_last_try in false false :; do
16428   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16429   if test -z "$ac_t"; then
16430     break
16431   elif $ac_last_try; then
16432     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16433   else
16434     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16435   fi
16436 done
16437
16438 # For the awk script, D is an array of macro values keyed by name,
16439 # likewise P contains macro parameters if any.  Preserve backslash
16440 # newline sequences.
16441
16442 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16443 sed -n '
16444 s/.\{148\}/&'"$ac_delim"'/g
16445 t rset
16446 :rset
16447 s/^[     ]*#[    ]*define[       ][      ]*/ /
16448 t def
16449 d
16450 :def
16451 s/\\$//
16452 t bsnl
16453 s/["\\]/\\&/g
16454 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16455 D["\1"]=" \3"/p
16456 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16457 d
16458 :bsnl
16459 s/["\\]/\\&/g
16460 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16461 D["\1"]=" \3\\\\\\n"\\/p
16462 t cont
16463 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16464 t cont
16465 d
16466 :cont
16467 n
16468 s/.\{148\}/&'"$ac_delim"'/g
16469 t clear
16470 :clear
16471 s/\\$//
16472 t bsnlc
16473 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16474 d
16475 :bsnlc
16476 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16477 b cont
16478 ' <confdefs.h | sed '
16479 s/'"$ac_delim"'/"\\\
16480 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16481
16482 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16483   for (key in D) D_is_set[key] = 1
16484   FS = "\a"
16485 }
16486 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16487   line = \$ 0
16488   split(line, arg, " ")
16489   if (arg[1] == "#") {
16490     defundef = arg[2]
16491     mac1 = arg[3]
16492   } else {
16493     defundef = substr(arg[1], 2)
16494     mac1 = arg[2]
16495   }
16496   split(mac1, mac2, "(") #)
16497   macro = mac2[1]
16498   prefix = substr(line, 1, index(line, defundef) - 1)
16499   if (D_is_set[macro]) {
16500     # Preserve the white space surrounding the "#".
16501     print prefix "define", macro P[macro] D[macro]
16502     next
16503   } else {
16504     # Replace #undef with comments.  This is necessary, for example,
16505     # in the case of _POSIX_SOURCE, which is predefined and required
16506     # on some systems where configure will not decide to define it.
16507     if (defundef == "undef") {
16508       print "/*", prefix defundef, macro, "*/"
16509       next
16510     }
16511   }
16512 }
16513 { print }
16514 _ACAWK
16515 _ACEOF
16516 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16517   as_fn_error "could not setup config headers machinery" "$LINENO" 5
16518 fi # test -n "$CONFIG_HEADERS"
16519
16520
16521 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16522 shift
16523 for ac_tag
16524 do
16525   case $ac_tag in
16526   :[FHLC]) ac_mode=$ac_tag; continue;;
16527   esac
16528   case $ac_mode$ac_tag in
16529   :[FHL]*:*);;
16530   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16531   :[FH]-) ac_tag=-:-;;
16532   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16533   esac
16534   ac_save_IFS=$IFS
16535   IFS=:
16536   set x $ac_tag
16537   IFS=$ac_save_IFS
16538   shift
16539   ac_file=$1
16540   shift
16541
16542   case $ac_mode in
16543   :L) ac_source=$1;;
16544   :[FH])
16545     ac_file_inputs=
16546     for ac_f
16547     do
16548       case $ac_f in
16549       -) ac_f="$tmp/stdin";;
16550       *) # Look for the file first in the build tree, then in the source tree
16551          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16552          # because $ac_f cannot contain `:'.
16553          test -f "$ac_f" ||
16554            case $ac_f in
16555            [\\/$]*) false;;
16556            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16557            esac ||
16558            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16559       esac
16560       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16561       as_fn_append ac_file_inputs " '$ac_f'"
16562     done
16563
16564     # Let's still pretend it is `configure' which instantiates (i.e., don't
16565     # use $as_me), people would be surprised to read:
16566     #    /* config.h.  Generated by config.status.  */
16567     configure_input='Generated from '`
16568           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16569         `' by configure.'
16570     if test x"$ac_file" != x-; then
16571       configure_input="$ac_file.  $configure_input"
16572       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16573 $as_echo "$as_me: creating $ac_file" >&6;}
16574     fi
16575     # Neutralize special characters interpreted by sed in replacement strings.
16576     case $configure_input in #(
16577     *\&* | *\|* | *\\* )
16578        ac_sed_conf_input=`$as_echo "$configure_input" |
16579        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16580     *) ac_sed_conf_input=$configure_input;;
16581     esac
16582
16583     case $ac_tag in
16584     *:-:* | *:-) cat >"$tmp/stdin" \
16585       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16586     esac
16587     ;;
16588   esac
16589
16590   ac_dir=`$as_dirname -- "$ac_file" ||
16591 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16592          X"$ac_file" : 'X\(//\)[^/]' \| \
16593          X"$ac_file" : 'X\(//\)$' \| \
16594          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16595 $as_echo X"$ac_file" |
16596     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16597             s//\1/
16598             q
16599           }
16600           /^X\(\/\/\)[^/].*/{
16601             s//\1/
16602             q
16603           }
16604           /^X\(\/\/\)$/{
16605             s//\1/
16606             q
16607           }
16608           /^X\(\/\).*/{
16609             s//\1/
16610             q
16611           }
16612           s/.*/./; q'`
16613   as_dir="$ac_dir"; as_fn_mkdir_p
16614   ac_builddir=.
16615
16616 case "$ac_dir" in
16617 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16618 *)
16619   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16620   # A ".." for each directory in $ac_dir_suffix.
16621   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16622   case $ac_top_builddir_sub in
16623   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16624   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16625   esac ;;
16626 esac
16627 ac_abs_top_builddir=$ac_pwd
16628 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16629 # for backward compatibility:
16630 ac_top_builddir=$ac_top_build_prefix
16631
16632 case $srcdir in
16633   .)  # We are building in place.
16634     ac_srcdir=.
16635     ac_top_srcdir=$ac_top_builddir_sub
16636     ac_abs_top_srcdir=$ac_pwd ;;
16637   [\\/]* | ?:[\\/]* )  # Absolute name.
16638     ac_srcdir=$srcdir$ac_dir_suffix;
16639     ac_top_srcdir=$srcdir
16640     ac_abs_top_srcdir=$srcdir ;;
16641   *) # Relative name.
16642     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16643     ac_top_srcdir=$ac_top_build_prefix$srcdir
16644     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16645 esac
16646 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16647
16648
16649   case $ac_mode in
16650   :F)
16651   #
16652   # CONFIG_FILE
16653   #
16654
16655   case $INSTALL in
16656   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16657   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16658   esac
16659 _ACEOF
16660
16661 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16662 # If the template does not know about datarootdir, expand it.
16663 # FIXME: This hack should be removed a few years after 2.60.
16664 ac_datarootdir_hack=; ac_datarootdir_seen=
16665 ac_sed_dataroot='
16666 /datarootdir/ {
16667   p
16668   q
16669 }
16670 /@datadir@/p
16671 /@docdir@/p
16672 /@infodir@/p
16673 /@localedir@/p
16674 /@mandir@/p'
16675 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16676 *datarootdir*) ac_datarootdir_seen=yes;;
16677 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16678   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16679 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16680 _ACEOF
16681 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16682   ac_datarootdir_hack='
16683   s&@datadir@&$datadir&g
16684   s&@docdir@&$docdir&g
16685   s&@infodir@&$infodir&g
16686   s&@localedir@&$localedir&g
16687   s&@mandir@&$mandir&g
16688   s&\\\${datarootdir}&$datarootdir&g' ;;
16689 esac
16690 _ACEOF
16691
16692 # Neutralize VPATH when `$srcdir' = `.'.
16693 # Shell code in configure.ac might set extrasub.
16694 # FIXME: do we really want to maintain this feature?
16695 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16696 ac_sed_extra="$ac_vpsub
16697 $extrasub
16698 _ACEOF
16699 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16700 :t
16701 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16702 s|@configure_input@|$ac_sed_conf_input|;t t
16703 s&@top_builddir@&$ac_top_builddir_sub&;t t
16704 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16705 s&@srcdir@&$ac_srcdir&;t t
16706 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16707 s&@top_srcdir@&$ac_top_srcdir&;t t
16708 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16709 s&@builddir@&$ac_builddir&;t t
16710 s&@abs_builddir@&$ac_abs_builddir&;t t
16711 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16712 s&@INSTALL@&$ac_INSTALL&;t t
16713 $ac_datarootdir_hack
16714 "
16715 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16716 if $ac_cs_awk_getline; then
16717   $AWK -f "$tmp/subs.awk"
16718 else
16719   $AWK -f "$tmp/subs.awk" | $SHELL
16720 fi >$tmp/out \
16721   || as_fn_error "could not create $ac_file" "$LINENO" 5
16722
16723 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16724   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16725   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16726   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16727 which seems to be undefined.  Please make sure it is defined." >&5
16728 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16729 which seems to be undefined.  Please make sure it is defined." >&2;}
16730
16731   rm -f "$tmp/stdin"
16732   case $ac_file in
16733   -) cat "$tmp/out" && rm -f "$tmp/out";;
16734   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16735   esac \
16736   || as_fn_error "could not create $ac_file" "$LINENO" 5
16737  ;;
16738   :H)
16739   #
16740   # CONFIG_HEADER
16741   #
16742   if test x"$ac_file" != x-; then
16743     {
16744       $as_echo "/* $configure_input  */" \
16745       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16746     } >"$tmp/config.h" \
16747       || as_fn_error "could not create $ac_file" "$LINENO" 5
16748     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16749       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16750 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16751     else
16752       rm -f "$ac_file"
16753       mv "$tmp/config.h" "$ac_file" \
16754         || as_fn_error "could not create $ac_file" "$LINENO" 5
16755     fi
16756   else
16757     $as_echo "/* $configure_input  */" \
16758       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16759       || as_fn_error "could not create -" "$LINENO" 5
16760   fi
16761  ;;
16762   :L)
16763   #
16764   # CONFIG_LINK
16765   #
16766
16767   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16768     :
16769   else
16770     # Prefer the file from the source tree if names are identical.
16771     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16772       ac_source=$srcdir/$ac_source
16773     fi
16774
16775     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16776 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16777
16778     if test ! -r "$ac_source"; then
16779       as_fn_error "$ac_source: file not found" "$LINENO" 5
16780     fi
16781     rm -f "$ac_file"
16782
16783     # Try a relative symlink, then a hard link, then a copy.
16784     case $srcdir in
16785     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16786         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16787     esac
16788     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16789       ln "$ac_source" "$ac_file" 2>/dev/null ||
16790       cp -p "$ac_source" "$ac_file" ||
16791       as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16792   fi
16793  ;;
16794   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16795 $as_echo "$as_me: executing $ac_file commands" >&6;}
16796  ;;
16797   esac
16798
16799
16800   case $ac_file$ac_mode in
16801     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
16802     "gcore":F) chmod +x gcore ;;
16803     "default":C)
16804 case x$CONFIG_HEADERS in
16805 xconfig.h:config.in)
16806 echo > stamp-h ;;
16807 esac
16808  ;;
16809
16810   esac
16811 done # for ac_tag
16812
16813
16814 as_fn_exit 0
16815 _ACEOF
16816 ac_clean_files=$ac_clean_files_save
16817
16818 test $ac_write_fail = 0 ||
16819   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16820
16821
16822 # configure is writing to config.log, and then calls config.status.
16823 # config.status does its own redirection, appending to config.log.
16824 # Unfortunately, on DOS this fails, as config.log is still kept open
16825 # by configure, so config.status won't be able to write to it; its
16826 # output is simply discarded.  So we exec the FD to /dev/null,
16827 # effectively closing config.log, so it can be properly (re)opened and
16828 # appended to by config.status.  When coming back to configure, we
16829 # need to make the FD available again.
16830 if test "$no_create" != yes; then
16831   ac_cs_success=:
16832   ac_config_status_args=
16833   test "$silent" = yes &&
16834     ac_config_status_args="$ac_config_status_args --quiet"
16835   exec 5>/dev/null
16836   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16837   exec 5>>config.log
16838   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16839   # would make configure fail if this is the last instruction.
16840   $ac_cs_success || as_fn_exit $?
16841 fi
16842
16843 #
16844 # CONFIG_SUBDIRS section.
16845 #
16846 if test "$no_recursion" != yes; then
16847
16848   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16849   # so they do not pile up.
16850   ac_sub_configure_args=
16851   ac_prev=
16852   eval "set x $ac_configure_args"
16853   shift
16854   for ac_arg
16855   do
16856     if test -n "$ac_prev"; then
16857       ac_prev=
16858       continue
16859     fi
16860     case $ac_arg in
16861     -cache-file | --cache-file | --cache-fil | --cache-fi \
16862     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16863       ac_prev=cache_file ;;
16864     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
16865     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16866     | --c=*)
16867       ;;
16868     --config-cache | -C)
16869       ;;
16870     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16871       ac_prev=srcdir ;;
16872     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16873       ;;
16874     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16875       ac_prev=prefix ;;
16876     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16877       ;;
16878     --disable-option-checking)
16879       ;;
16880     *)
16881       case $ac_arg in
16882       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
16883       esac
16884       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
16885     esac
16886   done
16887
16888   # Always prepend --prefix to ensure using the same prefix
16889   # in subdir configurations.
16890   ac_arg="--prefix=$prefix"
16891   case $ac_arg in
16892   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
16893   esac
16894   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16895
16896   # Pass --silent
16897   if test "$silent" = yes; then
16898     ac_sub_configure_args="--silent $ac_sub_configure_args"
16899   fi
16900
16901   # Always prepend --disable-option-checking to silence warnings, since
16902   # different subdirs can have different --enable and --with options.
16903   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
16904
16905   ac_popdir=`pwd`
16906   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
16907
16908     # Do not complain, so a configure script can configure whichever
16909     # parts of a large source tree are present.
16910     test -d "$srcdir/$ac_dir" || continue
16911
16912     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16913     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16914     $as_echo "$ac_msg" >&6
16915     as_dir="$ac_dir"; as_fn_mkdir_p
16916     ac_builddir=.
16917
16918 case "$ac_dir" in
16919 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16920 *)
16921   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16922   # A ".." for each directory in $ac_dir_suffix.
16923   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16924   case $ac_top_builddir_sub in
16925   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16926   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16927   esac ;;
16928 esac
16929 ac_abs_top_builddir=$ac_pwd
16930 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16931 # for backward compatibility:
16932 ac_top_builddir=$ac_top_build_prefix
16933
16934 case $srcdir in
16935   .)  # We are building in place.
16936     ac_srcdir=.
16937     ac_top_srcdir=$ac_top_builddir_sub
16938     ac_abs_top_srcdir=$ac_pwd ;;
16939   [\\/]* | ?:[\\/]* )  # Absolute name.
16940     ac_srcdir=$srcdir$ac_dir_suffix;
16941     ac_top_srcdir=$srcdir
16942     ac_abs_top_srcdir=$srcdir ;;
16943   *) # Relative name.
16944     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16945     ac_top_srcdir=$ac_top_build_prefix$srcdir
16946     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16947 esac
16948 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16949
16950
16951     cd "$ac_dir"
16952
16953     # Check for guested configure; otherwise get Cygnus style configure.
16954     if test -f "$ac_srcdir/configure.gnu"; then
16955       ac_sub_configure=$ac_srcdir/configure.gnu
16956     elif test -f "$ac_srcdir/configure"; then
16957       ac_sub_configure=$ac_srcdir/configure
16958     elif test -f "$ac_srcdir/configure.in"; then
16959       # This should be Cygnus configure.
16960       ac_sub_configure=$ac_aux_dir/configure
16961     else
16962       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16963 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
16964       ac_sub_configure=
16965     fi
16966
16967     # The recursion is here.
16968     if test -n "$ac_sub_configure"; then
16969       # Make the cache file name correct relative to the subdirectory.
16970       case $cache_file in
16971       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
16972       *) # Relative name.
16973         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
16974       esac
16975
16976       { $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
16977 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
16978       # The eval makes quoting arguments work.
16979       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16980            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
16981         as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
16982     fi
16983
16984     cd "$ac_popdir"
16985   done
16986 fi
16987 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16988   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16989 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16990 fi
16991
16992
16993 exit 0