Move safe_strerror to common/
[external/binutils.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.64.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7 # Foundation, Inc.
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18   emulate sh
19   NULLCMD=:
20   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23   setopt NO_GLOB_SUBST
24 else
25   case `(set -o) 2>/dev/null` in #(
26   *posix*) :
27     set -o posix ;; #(
28   *) :
29      ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45   as_echo='print -r --'
46   as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48   as_echo='printf %s\n'
49   as_echo_n='printf %s'
50 else
51   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53     as_echo_n='/usr/ucb/echo -n'
54   else
55     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56     as_echo_n_body='eval
57       arg=$1;
58       case $arg in #(
59       *"$as_nl"*)
60         expr "X$arg" : "X\\(.*\\)$as_nl";
61         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62       esac;
63       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64     '
65     export as_echo_n_body
66     as_echo_n='sh -c $as_echo_n_body as_echo'
67   fi
68   export as_echo_body
69   as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74   PATH_SEPARATOR=:
75   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77       PATH_SEPARATOR=';'
78   }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order.  Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" ""        $as_nl"
88
89 # Find who we are.  Look in the path if we contain no directory separator.
90 case $0 in #((
91   *[\\/]* ) as_myself=$0 ;;
92   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93 for as_dir in $PATH
94 do
95   IFS=$as_save_IFS
96   test -z "$as_dir" && as_dir=.
97     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98   done
99 IFS=$as_save_IFS
100
101      ;;
102 esac
103 # We did not find ourselves, most probably we were run as `sh COMMAND'
104 # in which case we are not to be found in the path.
105 if test "x$as_myself" = x; then
106   as_myself=$0
107 fi
108 if test ! -f "$as_myself"; then
109   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110   exit 1
111 fi
112
113 # Unset variables that we do not need and which cause bugs (e.g. in
114 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
115 # suppresses any "Segmentation fault" message there.  '((' could
116 # trigger a bug in pdksh 5.2.14.
117 for as_var in BASH_ENV ENV MAIL MAILPATH
118 do eval test x\${$as_var+set} = xset \
119   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120 done
121 PS1='$ '
122 PS2='> '
123 PS4='+ '
124
125 # NLS nuisances.
126 LC_ALL=C
127 export LC_ALL
128 LANGUAGE=C
129 export LANGUAGE
130
131 # CDPATH.
132 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134 if test "x$CONFIG_SHELL" = x; then
135   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136   emulate sh
137   NULLCMD=:
138   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139   # is contrary to our usage.  Disable this feature.
140   alias -g '\${1+\"\$@\"}'='\"\$@\"'
141   setopt NO_GLOB_SUBST
142 else
143   case \`(set -o) 2>/dev/null\` in #(
144   *posix*) :
145     set -o posix ;; #(
146   *) :
147      ;;
148 esac
149 fi
150 "
151   as_required="as_fn_return () { (exit \$1); }
152 as_fn_success () { as_fn_return 0; }
153 as_fn_failure () { as_fn_return 1; }
154 as_fn_ret_success () { return 0; }
155 as_fn_ret_failure () { return 1; }
156
157 exitcode=0
158 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164 else
165   exitcode=1; echo positional parameters were not saved.
166 fi
167 test x\$exitcode = x0 || exit 1"
168   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172 test \$(( 1 + 1 )) = 2 || exit 1"
173   if (eval "$as_required") 2>/dev/null; then :
174   as_have_required=yes
175 else
176   as_have_required=no
177 fi
178   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180 else
181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182 as_found=false
183 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
184 do
185   IFS=$as_save_IFS
186   test -z "$as_dir" && as_dir=.
187   as_found=:
188   case $as_dir in #(
189          /*)
190            for as_base in sh bash ksh sh5; do
191              # Try only shells that exist, to save several forks.
192              as_shell=$as_dir/$as_base
193              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195   CONFIG_SHELL=$as_shell as_have_required=yes
196                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197   break 2
198 fi
199 fi
200            done;;
201        esac
202   as_found=false
203 done
204 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206   CONFIG_SHELL=$SHELL as_have_required=yes
207 fi; }
208 IFS=$as_save_IFS
209
210
211       if test "x$CONFIG_SHELL" != x; then :
212   # We cannot yet assume a decent shell, so we have to provide a
213         # neutralization value for shells without unset; and this also
214         # works around shells that cannot unset nonexistent variables.
215         BASH_ENV=/dev/null
216         ENV=/dev/null
217         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218         export CONFIG_SHELL
219         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220 fi
221
222     if test x$as_have_required = xno; then :
223   $as_echo "$0: This script requires a shell more modern than all"
224   $as_echo "$0: the shells that I found on your system."
225   if test x${ZSH_VERSION+set} = xset ; then
226     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
228   else
229     $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230 $0: including any error possibly output before this
231 $0: message. Then install a modern shell, or manually run
232 $0: the script under such a shell if you do have one."
233   fi
234   exit 1
235 fi
236 fi
237 fi
238 SHELL=${CONFIG_SHELL-/bin/sh}
239 export SHELL
240 # Unset more variables known to interfere with behavior of common tools.
241 CLICOLOR_FORCE= GREP_OPTIONS=
242 unset CLICOLOR_FORCE GREP_OPTIONS
243
244 ## --------------------- ##
245 ## M4sh Shell Functions. ##
246 ## --------------------- ##
247 # as_fn_unset VAR
248 # ---------------
249 # Portably unset VAR.
250 as_fn_unset ()
251 {
252   { eval $1=; unset $1;}
253 }
254 as_unset=as_fn_unset
255
256 # as_fn_set_status STATUS
257 # -----------------------
258 # Set $? to STATUS, without forking.
259 as_fn_set_status ()
260 {
261   return $1
262 } # as_fn_set_status
263
264 # as_fn_exit STATUS
265 # -----------------
266 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267 as_fn_exit ()
268 {
269   set +e
270   as_fn_set_status $1
271   exit $1
272 } # as_fn_exit
273
274 # as_fn_mkdir_p
275 # -------------
276 # Create "$as_dir" as a directory, including parents if necessary.
277 as_fn_mkdir_p ()
278 {
279
280   case $as_dir in #(
281   -*) as_dir=./$as_dir;;
282   esac
283   test -d "$as_dir" || eval $as_mkdir_p || {
284     as_dirs=
285     while :; do
286       case $as_dir in #(
287       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288       *) as_qdir=$as_dir;;
289       esac
290       as_dirs="'$as_qdir' $as_dirs"
291       as_dir=`$as_dirname -- "$as_dir" ||
292 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293          X"$as_dir" : 'X\(//\)[^/]' \| \
294          X"$as_dir" : 'X\(//\)$' \| \
295          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296 $as_echo X"$as_dir" |
297     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298             s//\1/
299             q
300           }
301           /^X\(\/\/\)[^/].*/{
302             s//\1/
303             q
304           }
305           /^X\(\/\/\)$/{
306             s//\1/
307             q
308           }
309           /^X\(\/\).*/{
310             s//\1/
311             q
312           }
313           s/.*/./; q'`
314       test -d "$as_dir" && break
315     done
316     test -z "$as_dirs" || eval "mkdir $as_dirs"
317   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320 } # as_fn_mkdir_p
321 # as_fn_append VAR VALUE
322 # ----------------------
323 # Append the text in VALUE to the end of the definition contained in VAR. Take
324 # advantage of any shell optimizations that allow amortized linear growth over
325 # repeated appends, instead of the typical quadratic growth present in naive
326 # implementations.
327 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328   eval 'as_fn_append ()
329   {
330     eval $1+=\$2
331   }'
332 else
333   as_fn_append ()
334   {
335     eval $1=\$$1\$2
336   }
337 fi # as_fn_append
338
339 # as_fn_arith ARG...
340 # ------------------
341 # Perform arithmetic evaluation on the ARGs, and store the result in the
342 # global $as_val. Take advantage of shells that can avoid forks. The arguments
343 # must be portable across $(()) and expr.
344 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345   eval 'as_fn_arith ()
346   {
347     as_val=$(( $* ))
348   }'
349 else
350   as_fn_arith ()
351   {
352     as_val=`expr "$@" || test $? -eq 1`
353   }
354 fi # as_fn_arith
355
356
357 # as_fn_error ERROR [LINENO LOG_FD]
358 # ---------------------------------
359 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361 # script with status $?, using 1 if that was 0.
362 as_fn_error ()
363 {
364   as_status=$?; test $as_status -eq 0 && as_status=1
365   if test "$3"; then
366     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368   fi
369   $as_echo "$as_me: error: $1" >&2
370   as_fn_exit $as_status
371 } # as_fn_error
372
373 if expr a : '\(a\)' >/dev/null 2>&1 &&
374    test "X`expr 00001 : '.*\(...\)'`" = X001; then
375   as_expr=expr
376 else
377   as_expr=false
378 fi
379
380 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
381   as_basename=basename
382 else
383   as_basename=false
384 fi
385
386 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387   as_dirname=dirname
388 else
389   as_dirname=false
390 fi
391
392 as_me=`$as_basename -- "$0" ||
393 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394          X"$0" : 'X\(//\)$' \| \
395          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396 $as_echo X/"$0" |
397     sed '/^.*\/\([^/][^/]*\)\/*$/{
398             s//\1/
399             q
400           }
401           /^X\/\(\/\/\)$/{
402             s//\1/
403             q
404           }
405           /^X\/\(\/\).*/{
406             s//\1/
407             q
408           }
409           s/.*/./; q'`
410
411 # Avoid depending upon Character Ranges.
412 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415 as_cr_digits='0123456789'
416 as_cr_alnum=$as_cr_Letters$as_cr_digits
417
418
419   as_lineno_1=$LINENO as_lineno_1a=$LINENO
420   as_lineno_2=$LINENO as_lineno_2a=$LINENO
421   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
424   sed -n '
425     p
426     /[$]LINENO/=
427   ' <$as_myself |
428     sed '
429       s/[$]LINENO.*/&-/
430       t lineno
431       b
432       :lineno
433       N
434       :loop
435       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
436       t loop
437       s/-\n.*//
438     ' >$as_me.lineno &&
439   chmod +x "$as_me.lineno" ||
440     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
441
442   # Don't try to exec as it changes $[0], causing all sort of problems
443   # (the dirname of $[0] is not the place where we might find the
444   # original and so on.  Autoconf is especially sensitive to this).
445   . "./$as_me.lineno"
446   # Exit status is that of the last command.
447   exit
448 }
449
450 ECHO_C= ECHO_N= ECHO_T=
451 case `echo -n x` in #(((((
452 -n*)
453   case `echo 'xy\c'` in
454   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
455   xy)  ECHO_C='\c';;
456   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
457        ECHO_T=' ';;
458   esac;;
459 *)
460   ECHO_N='-n';;
461 esac
462
463 rm -f conf$$ conf$$.exe conf$$.file
464 if test -d conf$$.dir; then
465   rm -f conf$$.dir/conf$$.file
466 else
467   rm -f conf$$.dir
468   mkdir conf$$.dir 2>/dev/null
469 fi
470 if (echo >conf$$.file) 2>/dev/null; then
471   if ln -s conf$$.file conf$$ 2>/dev/null; then
472     as_ln_s='ln -s'
473     # ... but there are two gotchas:
474     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476     # In both cases, we have to default to `cp -p'.
477     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478       as_ln_s='cp -p'
479   elif ln conf$$.file conf$$ 2>/dev/null; then
480     as_ln_s=ln
481   else
482     as_ln_s='cp -p'
483   fi
484 else
485   as_ln_s='cp -p'
486 fi
487 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488 rmdir conf$$.dir 2>/dev/null
489
490 if mkdir -p . 2>/dev/null; then
491   as_mkdir_p='mkdir -p "$as_dir"'
492 else
493   test -d ./-p && rmdir ./-p
494   as_mkdir_p=false
495 fi
496
497 if test -x / >/dev/null 2>&1; then
498   as_test_x='test -x'
499 else
500   if ls -dL / >/dev/null 2>&1; then
501     as_ls_L_option=L
502   else
503     as_ls_L_option=
504   fi
505   as_test_x='
506     eval sh -c '\''
507       if test -d "$1"; then
508         test -d "$1/.";
509       else
510         case $1 in #(
511         -*)set "./$1";;
512         esac;
513         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514         ???[sx]*):;;*)false;;esac;fi
515     '\'' sh
516   '
517 fi
518 as_executable_p=$as_test_x
519
520 # Sed expression to map a string onto a valid CPP name.
521 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523 # Sed expression to map a string onto a valid variable name.
524 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
527 exec 7<&0 </dev/null 6>&1
528
529 # Name of the host.
530 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531 # so uname gets run too.
532 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
534 #
535 # Initializations.
536 #
537 ac_default_prefix=/usr/local
538 ac_clean_files=
539 ac_config_libobj_dir=.
540 LIBOBJS=
541 cross_compiling=no
542 subdirs=
543 MFLAGS=
544 MAKEFLAGS=
545
546 # Identity of this package.
547 PACKAGE_NAME=
548 PACKAGE_TARNAME=
549 PACKAGE_VERSION=
550 PACKAGE_STRING=
551 PACKAGE_BUGREPORT=
552 PACKAGE_URL=
553
554 ac_unique_file="main.c"
555 # Factoring default headers for most tests.
556 ac_includes_default="\
557 #include <stdio.h>
558 #ifdef HAVE_SYS_TYPES_H
559 # include <sys/types.h>
560 #endif
561 #ifdef HAVE_SYS_STAT_H
562 # include <sys/stat.h>
563 #endif
564 #ifdef STDC_HEADERS
565 # include <stdlib.h>
566 # include <stddef.h>
567 #else
568 # ifdef HAVE_STDLIB_H
569 #  include <stdlib.h>
570 # endif
571 #endif
572 #ifdef HAVE_STRING_H
573 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
574 #  include <memory.h>
575 # endif
576 # include <string.h>
577 #endif
578 #ifdef HAVE_STRINGS_H
579 # include <strings.h>
580 #endif
581 #ifdef HAVE_INTTYPES_H
582 # include <inttypes.h>
583 #endif
584 #ifdef HAVE_STDINT_H
585 # include <stdint.h>
586 #endif
587 #ifdef HAVE_UNISTD_H
588 # include <unistd.h>
589 #endif"
590
591 enable_option_checking=no
592 ac_subst_vars='LTLIBOBJS
593 LIBOBJS
594 GCORE_TRANSFORM_NAME
595 GDB_TRANSFORM_NAME
596 GDB_NM_FILE
597 LTLIBBABELTRACE
598 LIBBABELTRACE
599 HAVE_LIBBABELTRACE
600 frags
601 target_subdir
602 CONFIG_UNINSTALL
603 CONFIG_INSTALL
604 CONFIG_CLEAN
605 CONFIG_ALL
606 CONFIG_SRCS
607 CONFIG_DEPS
608 CONFIG_OBS
609 PROFILE_CFLAGS
610 ENABLE_CFLAGS
611 SIM_OBS
612 SIM
613 XMKMF
614 GDBTK_SRC_DIR
615 GDBTK_CFLAGS
616 GDBTKLIBS
617 X_LIBS
618 X_LDFLAGS
619 X_CFLAGS
620 TK_XINCLUDES
621 TK_DEPS
622 TK_LIBRARY
623 TK_INCLUDE
624 TK_STUB_LIB_SPEC
625 TK_STUB_LIB_FLAG
626 TK_STUB_LIB_FILE
627 TK_LIB_SPEC
628 TK_LIB_FLAG
629 TK_LIB_FILE
630 TK_SRC_DIR
631 TK_BIN_DIR
632 TK_VERSION
633 TCL_DEPS
634 TCL_LIBRARY
635 TCL_INCLUDE
636 TCL_STUB_LIB_SPEC
637 TCL_STUB_LIB_FLAG
638 TCL_STUB_LIB_FILE
639 TCL_LIB_SPEC
640 TCL_LIB_FLAG
641 TCL_LIB_FILE
642 TCL_SRC_DIR
643 TCL_BIN_DIR
644 TCL_PATCH_LEVEL
645 TCL_VERSION
646 WIN32LDAPP
647 GUI_CFLAGS_X
648 LIBGUI
649 LTLIBLZMA
650 LIBLZMA
651 HAVE_LIBLZMA
652 WIN32LIBS
653 SER_HARDWIRE
654 WERROR_CFLAGS
655 WARN_CFLAGS
656 SYSTEM_GDBINIT
657 TARGET_SYSTEM_ROOT
658 CONFIG_LDFLAGS
659 RDYNAMIC
660 ALLOCA
661 HAVE_GUILE_FALSE
662 HAVE_GUILE_TRUE
663 GUILE_LIBS
664 GUILE_CPPFLAGS
665 GUILD_TARGET_FLAG
666 GUILD
667 pkg_config_prog_path
668 HAVE_PYTHON_FALSE
669 HAVE_PYTHON_TRUE
670 PYTHON_LIBS
671 PYTHON_CPPFLAGS
672 PYTHON_CFLAGS
673 python_prog_path
674 LTLIBEXPAT
675 LIBEXPAT
676 HAVE_LIBEXPAT
677 JIT_READER_DIR
678 TARGET_PTR
679 READLINE_TEXI_INCFLAG
680 READLINE_CFLAGS
681 READLINE_DEPS
682 READLINE
683 MIG
684 WINDRES
685 DLLTOOL
686 AR
687 YFLAGS
688 YACC
689 RANLIB
690 LN_S
691 INSTALL_DATA
692 INSTALL_SCRIPT
693 INSTALL_PROGRAM
694 AWK
695 REPORT_BUGS_TEXI
696 REPORT_BUGS_TO
697 PKGVERSION
698 HAVE_NATIVE_GCORE_TARGET
699 TARGET_OBS
700 subdirs
701 GDB_DATADIR
702 DEBUGDIR
703 MAKEINFO_EXTRA_FLAGS
704 MAKEINFOFLAGS
705 MAKEINFO
706 PACKAGE
707 GNULIB_STDINT_H
708 CATOBJEXT
709 GENCAT
710 INSTOBJEXT
711 DATADIRNAME
712 CATALOGS
713 POSUB
714 GMSGFMT
715 XGETTEXT
716 INCINTL
717 LIBINTL_DEP
718 LIBINTL
719 USE_NLS
720 SET_MAKE
721 GMAKE_FALSE
722 GMAKE_TRUE
723 MAKE
724 CCDEPMODE
725 DEPDIR
726 am__leading_dot
727 INSTALL_STRIP_PROGRAM
728 STRIP
729 install_sh
730 target_os
731 target_vendor
732 target_cpu
733 target
734 host_os
735 host_vendor
736 host_cpu
737 host
738 build_os
739 build_vendor
740 build_cpu
741 build
742 EGREP
743 GREP
744 CPP
745 OBJEXT
746 EXEEXT
747 ac_ct_CC
748 CPPFLAGS
749 LDFLAGS
750 CFLAGS
751 CC
752 MAINT
753 MAINTAINER_MODE_FALSE
754 MAINTAINER_MODE_TRUE
755 target_alias
756 host_alias
757 build_alias
758 LIBS
759 ECHO_T
760 ECHO_N
761 ECHO_C
762 DEFS
763 mandir
764 localedir
765 libdir
766 psdir
767 pdfdir
768 dvidir
769 htmldir
770 infodir
771 docdir
772 oldincludedir
773 includedir
774 localstatedir
775 sharedstatedir
776 sysconfdir
777 datadir
778 datarootdir
779 libexecdir
780 sbindir
781 bindir
782 program_transform_name
783 prefix
784 exec_prefix
785 PACKAGE_URL
786 PACKAGE_BUGREPORT
787 PACKAGE_STRING
788 PACKAGE_VERSION
789 PACKAGE_TARNAME
790 PACKAGE_NAME
791 PATH_SEPARATOR
792 SHELL'
793 ac_subst_files='host_makefile_frag'
794 ac_user_opts='
795 enable_option_checking
796 enable_maintainer_mode
797 enable_plugins
798 enable_largefile
799 with_separate_debug_dir
800 with_gdb_datadir
801 with_relocated_sources
802 with_auto_load_dir
803 with_auto_load_safe_path
804 enable_targets
805 enable_64_bit_bfd
806 enable_gdbcli
807 enable_gdbmi
808 enable_tui
809 enable_gdbtk
810 with_libunwind_ia64
811 with_curses
812 enable_profiling
813 with_pkgversion
814 with_bugurl
815 with_zlib
816 with_libiconv_prefix
817 with_iconv_bin
818 with_system_readline
819 with_jit_reader_dir
820 with_expat
821 with_gnu_ld
822 enable_rpath
823 with_libexpat_prefix
824 with_python
825 with_guile
826 enable_libmcheck
827 with_included_regex
828 with_sysroot
829 with_system_gdbinit
830 enable_werror
831 enable_build_warnings
832 enable_gdb_build_warnings
833 with_lzma
834 with_liblzma_prefix
835 with_tcl
836 with_tk
837 with_x
838 enable_sim
839 enable_multi_ice
840 enable_gdbserver
841 with_babeltrace
842 with_libbabeltrace_prefix
843 '
844       ac_precious_vars='build_alias
845 host_alias
846 target_alias
847 CC
848 CFLAGS
849 LDFLAGS
850 LIBS
851 CPPFLAGS
852 CPP
853 MAKEINFO
854 MAKEINFOFLAGS
855 YACC
856 YFLAGS
857 XMKMF'
858 ac_subdirs_all='testsuite
859 gdbtk
860 multi-ice
861 gdbserver'
862
863 # Initialize some variables set by options.
864 ac_init_help=
865 ac_init_version=false
866 ac_unrecognized_opts=
867 ac_unrecognized_sep=
868 # The variables have the same names as the options, with
869 # dashes changed to underlines.
870 cache_file=/dev/null
871 exec_prefix=NONE
872 no_create=
873 no_recursion=
874 prefix=NONE
875 program_prefix=NONE
876 program_suffix=NONE
877 program_transform_name=s,x,x,
878 silent=
879 site=
880 srcdir=
881 verbose=
882 x_includes=NONE
883 x_libraries=NONE
884
885 # Installation directory options.
886 # These are left unexpanded so users can "make install exec_prefix=/foo"
887 # and all the variables that are supposed to be based on exec_prefix
888 # by default will actually change.
889 # Use braces instead of parens because sh, perl, etc. also accept them.
890 # (The list follows the same order as the GNU Coding Standards.)
891 bindir='${exec_prefix}/bin'
892 sbindir='${exec_prefix}/sbin'
893 libexecdir='${exec_prefix}/libexec'
894 datarootdir='${prefix}/share'
895 datadir='${datarootdir}'
896 sysconfdir='${prefix}/etc'
897 sharedstatedir='${prefix}/com'
898 localstatedir='${prefix}/var'
899 includedir='${prefix}/include'
900 oldincludedir='/usr/include'
901 docdir='${datarootdir}/doc/${PACKAGE}'
902 infodir='${datarootdir}/info'
903 htmldir='${docdir}'
904 dvidir='${docdir}'
905 pdfdir='${docdir}'
906 psdir='${docdir}'
907 libdir='${exec_prefix}/lib'
908 localedir='${datarootdir}/locale'
909 mandir='${datarootdir}/man'
910
911 ac_prev=
912 ac_dashdash=
913 for ac_option
914 do
915   # If the previous option needs an argument, assign it.
916   if test -n "$ac_prev"; then
917     eval $ac_prev=\$ac_option
918     ac_prev=
919     continue
920   fi
921
922   case $ac_option in
923   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924   *)    ac_optarg=yes ;;
925   esac
926
927   # Accept the important Cygnus configure options, so we can diagnose typos.
928
929   case $ac_dashdash$ac_option in
930   --)
931     ac_dashdash=yes ;;
932
933   -bindir | --bindir | --bindi | --bind | --bin | --bi)
934     ac_prev=bindir ;;
935   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
936     bindir=$ac_optarg ;;
937
938   -build | --build | --buil | --bui | --bu)
939     ac_prev=build_alias ;;
940   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
941     build_alias=$ac_optarg ;;
942
943   -cache-file | --cache-file | --cache-fil | --cache-fi \
944   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945     ac_prev=cache_file ;;
946   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
948     cache_file=$ac_optarg ;;
949
950   --config-cache | -C)
951     cache_file=config.cache ;;
952
953   -datadir | --datadir | --datadi | --datad)
954     ac_prev=datadir ;;
955   -datadir=* | --datadir=* | --datadi=* | --datad=*)
956     datadir=$ac_optarg ;;
957
958   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959   | --dataroo | --dataro | --datar)
960     ac_prev=datarootdir ;;
961   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963     datarootdir=$ac_optarg ;;
964
965   -disable-* | --disable-*)
966     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
967     # Reject names that are not valid shell variable names.
968     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969       as_fn_error "invalid feature name: $ac_useropt"
970     ac_useropt_orig=$ac_useropt
971     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972     case $ac_user_opts in
973       *"
974 "enable_$ac_useropt"
975 "*) ;;
976       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977          ac_unrecognized_sep=', ';;
978     esac
979     eval enable_$ac_useropt=no ;;
980
981   -docdir | --docdir | --docdi | --doc | --do)
982     ac_prev=docdir ;;
983   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984     docdir=$ac_optarg ;;
985
986   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987     ac_prev=dvidir ;;
988   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989     dvidir=$ac_optarg ;;
990
991   -enable-* | --enable-*)
992     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
993     # Reject names that are not valid shell variable names.
994     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
995       as_fn_error "invalid feature name: $ac_useropt"
996     ac_useropt_orig=$ac_useropt
997     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998     case $ac_user_opts in
999       *"
1000 "enable_$ac_useropt"
1001 "*) ;;
1002       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003          ac_unrecognized_sep=', ';;
1004     esac
1005     eval enable_$ac_useropt=\$ac_optarg ;;
1006
1007   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009   | --exec | --exe | --ex)
1010     ac_prev=exec_prefix ;;
1011   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013   | --exec=* | --exe=* | --ex=*)
1014     exec_prefix=$ac_optarg ;;
1015
1016   -gas | --gas | --ga | --g)
1017     # Obsolete; use --with-gas.
1018     with_gas=yes ;;
1019
1020   -help | --help | --hel | --he | -h)
1021     ac_init_help=long ;;
1022   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023     ac_init_help=recursive ;;
1024   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025     ac_init_help=short ;;
1026
1027   -host | --host | --hos | --ho)
1028     ac_prev=host_alias ;;
1029   -host=* | --host=* | --hos=* | --ho=*)
1030     host_alias=$ac_optarg ;;
1031
1032   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033     ac_prev=htmldir ;;
1034   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035   | --ht=*)
1036     htmldir=$ac_optarg ;;
1037
1038   -includedir | --includedir | --includedi | --included | --include \
1039   | --includ | --inclu | --incl | --inc)
1040     ac_prev=includedir ;;
1041   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042   | --includ=* | --inclu=* | --incl=* | --inc=*)
1043     includedir=$ac_optarg ;;
1044
1045   -infodir | --infodir | --infodi | --infod | --info | --inf)
1046     ac_prev=infodir ;;
1047   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1048     infodir=$ac_optarg ;;
1049
1050   -libdir | --libdir | --libdi | --libd)
1051     ac_prev=libdir ;;
1052   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1053     libdir=$ac_optarg ;;
1054
1055   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056   | --libexe | --libex | --libe)
1057     ac_prev=libexecdir ;;
1058   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059   | --libexe=* | --libex=* | --libe=*)
1060     libexecdir=$ac_optarg ;;
1061
1062   -localedir | --localedir | --localedi | --localed | --locale)
1063     ac_prev=localedir ;;
1064   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065     localedir=$ac_optarg ;;
1066
1067   -localstatedir | --localstatedir | --localstatedi | --localstated \
1068   | --localstate | --localstat | --localsta | --localst | --locals)
1069     ac_prev=localstatedir ;;
1070   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1071   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1072     localstatedir=$ac_optarg ;;
1073
1074   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075     ac_prev=mandir ;;
1076   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1077     mandir=$ac_optarg ;;
1078
1079   -nfp | --nfp | --nf)
1080     # Obsolete; use --without-fp.
1081     with_fp=no ;;
1082
1083   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1084   | --no-cr | --no-c | -n)
1085     no_create=yes ;;
1086
1087   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089     no_recursion=yes ;;
1090
1091   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093   | --oldin | --oldi | --old | --ol | --o)
1094     ac_prev=oldincludedir ;;
1095   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1098     oldincludedir=$ac_optarg ;;
1099
1100   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101     ac_prev=prefix ;;
1102   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1103     prefix=$ac_optarg ;;
1104
1105   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106   | --program-pre | --program-pr | --program-p)
1107     ac_prev=program_prefix ;;
1108   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1110     program_prefix=$ac_optarg ;;
1111
1112   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113   | --program-suf | --program-su | --program-s)
1114     ac_prev=program_suffix ;;
1115   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1117     program_suffix=$ac_optarg ;;
1118
1119   -program-transform-name | --program-transform-name \
1120   | --program-transform-nam | --program-transform-na \
1121   | --program-transform-n | --program-transform- \
1122   | --program-transform | --program-transfor \
1123   | --program-transfo | --program-transf \
1124   | --program-trans | --program-tran \
1125   | --progr-tra | --program-tr | --program-t)
1126     ac_prev=program_transform_name ;;
1127   -program-transform-name=* | --program-transform-name=* \
1128   | --program-transform-nam=* | --program-transform-na=* \
1129   | --program-transform-n=* | --program-transform-=* \
1130   | --program-transform=* | --program-transfor=* \
1131   | --program-transfo=* | --program-transf=* \
1132   | --program-trans=* | --program-tran=* \
1133   | --progr-tra=* | --program-tr=* | --program-t=*)
1134     program_transform_name=$ac_optarg ;;
1135
1136   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137     ac_prev=pdfdir ;;
1138   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139     pdfdir=$ac_optarg ;;
1140
1141   -psdir | --psdir | --psdi | --psd | --ps)
1142     ac_prev=psdir ;;
1143   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144     psdir=$ac_optarg ;;
1145
1146   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147   | -silent | --silent | --silen | --sile | --sil)
1148     silent=yes ;;
1149
1150   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151     ac_prev=sbindir ;;
1152   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153   | --sbi=* | --sb=*)
1154     sbindir=$ac_optarg ;;
1155
1156   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158   | --sharedst | --shareds | --shared | --share | --shar \
1159   | --sha | --sh)
1160     ac_prev=sharedstatedir ;;
1161   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164   | --sha=* | --sh=*)
1165     sharedstatedir=$ac_optarg ;;
1166
1167   -site | --site | --sit)
1168     ac_prev=site ;;
1169   -site=* | --site=* | --sit=*)
1170     site=$ac_optarg ;;
1171
1172   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173     ac_prev=srcdir ;;
1174   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1175     srcdir=$ac_optarg ;;
1176
1177   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178   | --syscon | --sysco | --sysc | --sys | --sy)
1179     ac_prev=sysconfdir ;;
1180   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1182     sysconfdir=$ac_optarg ;;
1183
1184   -target | --target | --targe | --targ | --tar | --ta | --t)
1185     ac_prev=target_alias ;;
1186   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1187     target_alias=$ac_optarg ;;
1188
1189   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190     verbose=yes ;;
1191
1192   -version | --version | --versio | --versi | --vers | -V)
1193     ac_init_version=: ;;
1194
1195   -with-* | --with-*)
1196     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1197     # Reject names that are not valid shell variable names.
1198     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199       as_fn_error "invalid package name: $ac_useropt"
1200     ac_useropt_orig=$ac_useropt
1201     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202     case $ac_user_opts in
1203       *"
1204 "with_$ac_useropt"
1205 "*) ;;
1206       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207          ac_unrecognized_sep=', ';;
1208     esac
1209     eval with_$ac_useropt=\$ac_optarg ;;
1210
1211   -without-* | --without-*)
1212     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1213     # Reject names that are not valid shell variable names.
1214     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1215       as_fn_error "invalid package name: $ac_useropt"
1216     ac_useropt_orig=$ac_useropt
1217     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218     case $ac_user_opts in
1219       *"
1220 "with_$ac_useropt"
1221 "*) ;;
1222       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223          ac_unrecognized_sep=', ';;
1224     esac
1225     eval with_$ac_useropt=no ;;
1226
1227   --x)
1228     # Obsolete; use --with-x.
1229     with_x=yes ;;
1230
1231   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232   | --x-incl | --x-inc | --x-in | --x-i)
1233     ac_prev=x_includes ;;
1234   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1236     x_includes=$ac_optarg ;;
1237
1238   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240     ac_prev=x_libraries ;;
1241   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1243     x_libraries=$ac_optarg ;;
1244
1245   -*) as_fn_error "unrecognized option: \`$ac_option'
1246 Try \`$0 --help' for more information."
1247     ;;
1248
1249   *=*)
1250     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251     # Reject names that are not valid shell variable names.
1252     case $ac_envvar in #(
1253       '' | [0-9]* | *[!_$as_cr_alnum]* )
1254       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1255     esac
1256     eval $ac_envvar=\$ac_optarg
1257     export $ac_envvar ;;
1258
1259   *)
1260     # FIXME: should be removed in autoconf 3.0.
1261     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1262     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1263       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1264     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1265     ;;
1266
1267   esac
1268 done
1269
1270 if test -n "$ac_prev"; then
1271   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1272   as_fn_error "missing argument to $ac_option"
1273 fi
1274
1275 if test -n "$ac_unrecognized_opts"; then
1276   case $enable_option_checking in
1277     no) ;;
1278     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1279     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280   esac
1281 fi
1282
1283 # Check all directory arguments for consistency.
1284 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285                 datadir sysconfdir sharedstatedir localstatedir includedir \
1286                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1287                 libdir localedir mandir
1288 do
1289   eval ac_val=\$$ac_var
1290   # Remove trailing slashes.
1291   case $ac_val in
1292     */ )
1293       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294       eval $ac_var=\$ac_val;;
1295   esac
1296   # Be sure to have absolute directory names.
1297   case $ac_val in
1298     [\\/$]* | ?:[\\/]* )  continue;;
1299     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1300   esac
1301   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1302 done
1303
1304 # There might be people who depend on the old broken behavior: `$host'
1305 # used to hold the argument of --host etc.
1306 # FIXME: To remove some day.
1307 build=$build_alias
1308 host=$host_alias
1309 target=$target_alias
1310
1311 # FIXME: To remove some day.
1312 if test "x$host_alias" != x; then
1313   if test "x$build_alias" = x; then
1314     cross_compiling=maybe
1315     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1316     If a cross compiler is detected then cross compile mode will be used." >&2
1317   elif test "x$build_alias" != "x$host_alias"; then
1318     cross_compiling=yes
1319   fi
1320 fi
1321
1322 ac_tool_prefix=
1323 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1324
1325 test "$silent" = yes && exec 6>/dev/null
1326
1327
1328 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1329 ac_ls_di=`ls -di .` &&
1330 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1331   as_fn_error "working directory cannot be determined"
1332 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1333   as_fn_error "pwd does not report name of working directory"
1334
1335
1336 # Find the source files, if location was not specified.
1337 if test -z "$srcdir"; then
1338   ac_srcdir_defaulted=yes
1339   # Try the directory containing this script, then the parent directory.
1340   ac_confdir=`$as_dirname -- "$as_myself" ||
1341 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1342          X"$as_myself" : 'X\(//\)[^/]' \| \
1343          X"$as_myself" : 'X\(//\)$' \| \
1344          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1345 $as_echo X"$as_myself" |
1346     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1347             s//\1/
1348             q
1349           }
1350           /^X\(\/\/\)[^/].*/{
1351             s//\1/
1352             q
1353           }
1354           /^X\(\/\/\)$/{
1355             s//\1/
1356             q
1357           }
1358           /^X\(\/\).*/{
1359             s//\1/
1360             q
1361           }
1362           s/.*/./; q'`
1363   srcdir=$ac_confdir
1364   if test ! -r "$srcdir/$ac_unique_file"; then
1365     srcdir=..
1366   fi
1367 else
1368   ac_srcdir_defaulted=no
1369 fi
1370 if test ! -r "$srcdir/$ac_unique_file"; then
1371   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1372   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1373 fi
1374 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1375 ac_abs_confdir=`(
1376         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1377         pwd)`
1378 # When building in place, set srcdir=.
1379 if test "$ac_abs_confdir" = "$ac_pwd"; then
1380   srcdir=.
1381 fi
1382 # Remove unnecessary trailing slashes from srcdir.
1383 # Double slashes in file names in object file debugging info
1384 # mess up M-x gdb in Emacs.
1385 case $srcdir in
1386 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1387 esac
1388 for ac_var in $ac_precious_vars; do
1389   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1390   eval ac_env_${ac_var}_value=\$${ac_var}
1391   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1392   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1393 done
1394
1395 #
1396 # Report the --help message.
1397 #
1398 if test "$ac_init_help" = "long"; then
1399   # Omit some internal or obsolete options to make the list less imposing.
1400   # This message is too long to be a string in the A/UX 3.1 sh.
1401   cat <<_ACEOF
1402 \`configure' configures this package to adapt to many kinds of systems.
1403
1404 Usage: $0 [OPTION]... [VAR=VALUE]...
1405
1406 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1407 VAR=VALUE.  See below for descriptions of some of the useful variables.
1408
1409 Defaults for the options are specified in brackets.
1410
1411 Configuration:
1412   -h, --help              display this help and exit
1413       --help=short        display options specific to this package
1414       --help=recursive    display the short help of all the included packages
1415   -V, --version           display version information and exit
1416   -q, --quiet, --silent   do not print \`checking...' messages
1417       --cache-file=FILE   cache test results in FILE [disabled]
1418   -C, --config-cache      alias for \`--cache-file=config.cache'
1419   -n, --no-create         do not create output files
1420       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1421
1422 Installation directories:
1423   --prefix=PREFIX         install architecture-independent files in PREFIX
1424                           [$ac_default_prefix]
1425   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1426                           [PREFIX]
1427
1428 By default, \`make install' will install all the files in
1429 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1430 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1431 for instance \`--prefix=\$HOME'.
1432
1433 For better control, use the options below.
1434
1435 Fine tuning of the installation directories:
1436   --bindir=DIR            user executables [EPREFIX/bin]
1437   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1438   --libexecdir=DIR        program executables [EPREFIX/libexec]
1439   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1440   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1441   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1442   --libdir=DIR            object code libraries [EPREFIX/lib]
1443   --includedir=DIR        C header files [PREFIX/include]
1444   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1445   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1446   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1447   --infodir=DIR           info documentation [DATAROOTDIR/info]
1448   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1449   --mandir=DIR            man documentation [DATAROOTDIR/man]
1450   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1451   --htmldir=DIR           html documentation [DOCDIR]
1452   --dvidir=DIR            dvi documentation [DOCDIR]
1453   --pdfdir=DIR            pdf documentation [DOCDIR]
1454   --psdir=DIR             ps documentation [DOCDIR]
1455 _ACEOF
1456
1457   cat <<\_ACEOF
1458
1459 Program names:
1460   --program-prefix=PREFIX            prepend PREFIX to installed program names
1461   --program-suffix=SUFFIX            append SUFFIX to installed program names
1462   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1463
1464 X features:
1465   --x-includes=DIR    X include files are in DIR
1466   --x-libraries=DIR   X library files are in DIR
1467
1468 System types:
1469   --build=BUILD     configure for building on BUILD [guessed]
1470   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1471   --target=TARGET   configure for building compilers for TARGET [HOST]
1472 _ACEOF
1473 fi
1474
1475 if test -n "$ac_init_help"; then
1476
1477   cat <<\_ACEOF
1478
1479 Optional Features:
1480   --disable-option-checking  ignore unrecognized --enable/--with options
1481   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1482   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1483   --enable-maintainer-mode  enable make rules and dependencies not useful
1484                           (and sometimes confusing) to the casual installer
1485   --enable-plugins        Enable support for plugins
1486   --disable-largefile     omit support for large files
1487   --enable-targets=TARGETS
1488                           alternative target configurations
1489   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
1490   --disable-gdbcli        disable command-line interface (CLI)
1491   --disable-gdbmi         disable machine-interface (MI)
1492   --enable-tui            enable full-screen terminal user interface (TUI)
1493   --enable-gdbtk          enable gdbtk graphical user interface (GUI)
1494   --enable-profiling      enable profiling of GDB
1495   --disable-rpath         do not hardcode runtime library paths
1496   --enable-libmcheck      Try linking with -lmcheck if available
1497   --enable-werror         treat compile warnings as errors
1498   --enable-build-warnings enable build-time compiler warnings if gcc is used
1499   --enable-gdb-build-warnings
1500                           enable GDB specific build-time compiler warnings if
1501                           gcc is used
1502   --enable-sim            link gdb with simulator
1503   --enable-multi-ice      build the multi-ice-gdb-server
1504   --enable-gdbserver      automatically build gdbserver (yes/no/auto, default
1505                           is auto)
1506
1507 Optional Packages:
1508   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1509   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1510   --with-separate-debug-dir=PATH
1511                           look for global separate debug info in this path
1512                           [LIBDIR/debug]
1513   --with-gdb-datadir=PATH look for global separate data files in this path
1514                           [DATADIR/gdb]
1515   --with-relocated-sources=PATH
1516                           automatically relocate this path for source files
1517   --with-auto-load-dir=PATH
1518                           directories from which to load auto-loaded scripts
1519                           [$debugdir:$datadir/auto-load]
1520   --with-auto-load-safe-path=PATH
1521                           directories safe to hold auto-loaded files
1522                           [--with-auto-load-dir]
1523   --without-auto-load-safe-path
1524                           do not restrict auto-loaded files locations
1525   --with-libunwind-ia64   use libunwind frame unwinding for ia64 targets
1526   --with-curses           use the curses library instead of the termcap
1527                           library
1528   --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
1529   --with-bugurl=URL       Direct users to URL to report a bug
1530   --with-zlib             include zlib support (auto/yes/no) default=auto
1531   --with-libiconv-prefix=DIR
1532                           search for libiconv in DIR/include and DIR/lib
1533   --with-iconv-bin=PATH   specify where to find the iconv program
1534   --with-system-readline  use installed readline library
1535   --with-jit-reader-dir=PATH
1536                           directory to load the JIT readers from
1537   --with-expat            include expat support (auto/yes/no)
1538   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1539   --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
1540   --without-libexpat-prefix     don't search for libexpat in includedir and libdir
1541   --with-python[=PYTHON]  include python support
1542                           (auto/yes/no/<python-program>)
1543   --with-guile[=GUILE]    include guile support
1544                           (auto/yes/no/<guile-version>/<pkg-config-program>)
1545   --without-included-regex
1546                           don't use included regex; this is the default on
1547                           systems with version 2 of the GNU C library (use
1548                           with caution on other system)
1549   --with-sysroot[=DIR]    search for usr/lib et al within DIR
1550   --with-system-gdbinit=PATH
1551                           automatically load a system-wide gdbinit file
1552   --with-lzma             support lzma compression (auto/yes/no)
1553   --with-liblzma-prefix[=DIR]  search for liblzma in DIR/include and DIR/lib
1554   --without-liblzma-prefix     don't search for liblzma in includedir and libdir
1555   --with-tcl              directory containing tcl configuration (tclConfig.sh)
1556   --with-tk               directory containing tk configuration (tkConfig.sh)
1557   --with-x                use the X Window System
1558   --with-babeltrace       include babeltrace support (auto/yes/no)
1559   --with-libbabeltrace-prefix[=DIR]  search for libbabeltrace in DIR/include and DIR/lib
1560   --without-libbabeltrace-prefix     don't search for libbabeltrace in includedir and libdir
1561
1562 Some influential environment variables:
1563   CC          C compiler command
1564   CFLAGS      C compiler flags
1565   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1566               nonstandard directory <lib dir>
1567   LIBS        libraries to pass to the linker, e.g. -l<library>
1568   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1569               you have headers in a nonstandard directory <include dir>
1570   CPP         C preprocessor
1571   MAKEINFO    Parent configure detects if it is of sufficient version.
1572   MAKEINFOFLAGS
1573               Parameters for MAKEINFO.
1574   YACC        The `Yet Another C Compiler' implementation to use. Defaults to
1575               the first program found out of: `bison -y', `byacc', `yacc'.
1576   YFLAGS      The list of arguments that will be passed by default to $YACC.
1577               This script will default YFLAGS to the empty string to avoid a
1578               default value of `-d' given by some make applications.
1579   XMKMF       Path to xmkmf, Makefile generator for X Window System
1580
1581 Use these variables to override the choices made by `configure' or to help
1582 it to find libraries and programs with nonstandard names/locations.
1583
1584 Report bugs to the package provider.
1585 _ACEOF
1586 ac_status=$?
1587 fi
1588
1589 if test "$ac_init_help" = "recursive"; then
1590   # If there are subdirs, report their specific --help.
1591   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1592     test -d "$ac_dir" ||
1593       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1594       continue
1595     ac_builddir=.
1596
1597 case "$ac_dir" in
1598 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1599 *)
1600   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1601   # A ".." for each directory in $ac_dir_suffix.
1602   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1603   case $ac_top_builddir_sub in
1604   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1605   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1606   esac ;;
1607 esac
1608 ac_abs_top_builddir=$ac_pwd
1609 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1610 # for backward compatibility:
1611 ac_top_builddir=$ac_top_build_prefix
1612
1613 case $srcdir in
1614   .)  # We are building in place.
1615     ac_srcdir=.
1616     ac_top_srcdir=$ac_top_builddir_sub
1617     ac_abs_top_srcdir=$ac_pwd ;;
1618   [\\/]* | ?:[\\/]* )  # Absolute name.
1619     ac_srcdir=$srcdir$ac_dir_suffix;
1620     ac_top_srcdir=$srcdir
1621     ac_abs_top_srcdir=$srcdir ;;
1622   *) # Relative name.
1623     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1624     ac_top_srcdir=$ac_top_build_prefix$srcdir
1625     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1626 esac
1627 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1628
1629     cd "$ac_dir" || { ac_status=$?; continue; }
1630     # Check for guested configure.
1631     if test -f "$ac_srcdir/configure.gnu"; then
1632       echo &&
1633       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1634     elif test -f "$ac_srcdir/configure"; then
1635       echo &&
1636       $SHELL "$ac_srcdir/configure" --help=recursive
1637     else
1638       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1639     fi || ac_status=$?
1640     cd "$ac_pwd" || { ac_status=$?; break; }
1641   done
1642 fi
1643
1644 test -n "$ac_init_help" && exit $ac_status
1645 if $ac_init_version; then
1646   cat <<\_ACEOF
1647 configure
1648 generated by GNU Autoconf 2.64
1649
1650 Copyright (C) 2009 Free Software Foundation, Inc.
1651 This configure script is free software; the Free Software Foundation
1652 gives unlimited permission to copy, distribute and modify it.
1653 _ACEOF
1654   exit
1655 fi
1656
1657 ## ------------------------ ##
1658 ## Autoconf initialization. ##
1659 ## ------------------------ ##
1660
1661 # ac_fn_c_try_compile LINENO
1662 # --------------------------
1663 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1664 ac_fn_c_try_compile ()
1665 {
1666   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1667   rm -f conftest.$ac_objext
1668   if { { ac_try="$ac_compile"
1669 case "(($ac_try" in
1670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1671   *) ac_try_echo=$ac_try;;
1672 esac
1673 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1674 $as_echo "$ac_try_echo"; } >&5
1675   (eval "$ac_compile") 2>conftest.err
1676   ac_status=$?
1677   if test -s conftest.err; then
1678     grep -v '^ *+' conftest.err >conftest.er1
1679     cat conftest.er1 >&5
1680     mv -f conftest.er1 conftest.err
1681   fi
1682   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1683   test $ac_status = 0; } && {
1684          test -z "$ac_c_werror_flag" ||
1685          test ! -s conftest.err
1686        } && test -s conftest.$ac_objext; then :
1687   ac_retval=0
1688 else
1689   $as_echo "$as_me: failed program was:" >&5
1690 sed 's/^/| /' conftest.$ac_ext >&5
1691
1692         ac_retval=1
1693 fi
1694   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1695   return $ac_retval
1696
1697 } # ac_fn_c_try_compile
1698
1699 # ac_fn_c_try_cpp LINENO
1700 # ----------------------
1701 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1702 ac_fn_c_try_cpp ()
1703 {
1704   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1705   if { { ac_try="$ac_cpp conftest.$ac_ext"
1706 case "(($ac_try" in
1707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708   *) ac_try_echo=$ac_try;;
1709 esac
1710 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711 $as_echo "$ac_try_echo"; } >&5
1712   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1713   ac_status=$?
1714   if test -s conftest.err; then
1715     grep -v '^ *+' conftest.err >conftest.er1
1716     cat conftest.er1 >&5
1717     mv -f conftest.er1 conftest.err
1718   fi
1719   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720   test $ac_status = 0; } >/dev/null && {
1721          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1722          test ! -s conftest.err
1723        }; then :
1724   ac_retval=0
1725 else
1726   $as_echo "$as_me: failed program was:" >&5
1727 sed 's/^/| /' conftest.$ac_ext >&5
1728
1729     ac_retval=1
1730 fi
1731   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1732   return $ac_retval
1733
1734 } # ac_fn_c_try_cpp
1735
1736 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1737 # -------------------------------------------------------
1738 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1739 # the include files in INCLUDES and setting the cache variable VAR
1740 # accordingly.
1741 ac_fn_c_check_header_mongrel ()
1742 {
1743   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1744   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1745   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1746 $as_echo_n "checking for $2... " >&6; }
1747 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1748   $as_echo_n "(cached) " >&6
1749 fi
1750 eval ac_res=\$$3
1751                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1752 $as_echo "$ac_res" >&6; }
1753 else
1754   # Is the header compilable?
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1756 $as_echo_n "checking $2 usability... " >&6; }
1757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758 /* end confdefs.h.  */
1759 $4
1760 #include <$2>
1761 _ACEOF
1762 if ac_fn_c_try_compile "$LINENO"; then :
1763   ac_header_compiler=yes
1764 else
1765   ac_header_compiler=no
1766 fi
1767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1769 $as_echo "$ac_header_compiler" >&6; }
1770
1771 # Is the header present?
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1773 $as_echo_n "checking $2 presence... " >&6; }
1774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1775 /* end confdefs.h.  */
1776 #include <$2>
1777 _ACEOF
1778 if ac_fn_c_try_cpp "$LINENO"; then :
1779   ac_header_preproc=yes
1780 else
1781   ac_header_preproc=no
1782 fi
1783 rm -f conftest.err conftest.$ac_ext
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1785 $as_echo "$ac_header_preproc" >&6; }
1786
1787 # So?  What about this header?
1788 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1789   yes:no: )
1790     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1791 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1792     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1793 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1794     ;;
1795   no:yes:* )
1796     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1797 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1798     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1799 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1800     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1801 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1802     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1803 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1804     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1805 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1806     ;;
1807 esac
1808   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1809 $as_echo_n "checking for $2... " >&6; }
1810 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1811   $as_echo_n "(cached) " >&6
1812 else
1813   eval "$3=\$ac_header_compiler"
1814 fi
1815 eval ac_res=\$$3
1816                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1817 $as_echo "$ac_res" >&6; }
1818 fi
1819   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1820
1821 } # ac_fn_c_check_header_mongrel
1822
1823 # ac_fn_c_try_run LINENO
1824 # ----------------------
1825 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1826 # that executables *can* be run.
1827 ac_fn_c_try_run ()
1828 {
1829   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830   if { { ac_try="$ac_link"
1831 case "(($ac_try" in
1832   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833   *) ac_try_echo=$ac_try;;
1834 esac
1835 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836 $as_echo "$ac_try_echo"; } >&5
1837   (eval "$ac_link") 2>&5
1838   ac_status=$?
1839   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1840   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1841   { { case "(($ac_try" in
1842   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1843   *) ac_try_echo=$ac_try;;
1844 esac
1845 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1846 $as_echo "$ac_try_echo"; } >&5
1847   (eval "$ac_try") 2>&5
1848   ac_status=$?
1849   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1850   test $ac_status = 0; }; }; then :
1851   ac_retval=0
1852 else
1853   $as_echo "$as_me: program exited with status $ac_status" >&5
1854        $as_echo "$as_me: failed program was:" >&5
1855 sed 's/^/| /' conftest.$ac_ext >&5
1856
1857        ac_retval=$ac_status
1858 fi
1859   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1860   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1861   return $ac_retval
1862
1863 } # ac_fn_c_try_run
1864
1865 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1866 # -------------------------------------------------------
1867 # Tests whether HEADER exists and can be compiled using the include files in
1868 # INCLUDES, setting the cache variable VAR accordingly.
1869 ac_fn_c_check_header_compile ()
1870 {
1871   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873 $as_echo_n "checking for $2... " >&6; }
1874 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1875   $as_echo_n "(cached) " >&6
1876 else
1877   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878 /* end confdefs.h.  */
1879 $4
1880 #include <$2>
1881 _ACEOF
1882 if ac_fn_c_try_compile "$LINENO"; then :
1883   eval "$3=yes"
1884 else
1885   eval "$3=no"
1886 fi
1887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1888 fi
1889 eval ac_res=\$$3
1890                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891 $as_echo "$ac_res" >&6; }
1892   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1893
1894 } # ac_fn_c_check_header_compile
1895
1896 # ac_fn_c_try_link LINENO
1897 # -----------------------
1898 # Try to link conftest.$ac_ext, and return whether this succeeded.
1899 ac_fn_c_try_link ()
1900 {
1901   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902   rm -f conftest.$ac_objext conftest$ac_exeext
1903   if { { ac_try="$ac_link"
1904 case "(($ac_try" in
1905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1906   *) ac_try_echo=$ac_try;;
1907 esac
1908 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1909 $as_echo "$ac_try_echo"; } >&5
1910   (eval "$ac_link") 2>conftest.err
1911   ac_status=$?
1912   if test -s conftest.err; then
1913     grep -v '^ *+' conftest.err >conftest.er1
1914     cat conftest.er1 >&5
1915     mv -f conftest.er1 conftest.err
1916   fi
1917   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1918   test $ac_status = 0; } && {
1919          test -z "$ac_c_werror_flag" ||
1920          test ! -s conftest.err
1921        } && test -s conftest$ac_exeext && {
1922          test "$cross_compiling" = yes ||
1923          $as_test_x conftest$ac_exeext
1924        }; then :
1925   ac_retval=0
1926 else
1927   $as_echo "$as_me: failed program was:" >&5
1928 sed 's/^/| /' conftest.$ac_ext >&5
1929
1930         ac_retval=1
1931 fi
1932   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1933   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1934   # interfere with the next link command; also delete a directory that is
1935   # left behind by Apple's compiler.  We do this before executing the actions.
1936   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1937   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1938   return $ac_retval
1939
1940 } # ac_fn_c_try_link
1941
1942 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1943 # --------------------------------------------
1944 # Tries to find the compile-time value of EXPR in a program that includes
1945 # INCLUDES, setting VAR accordingly. Returns whether the value could be
1946 # computed
1947 ac_fn_c_compute_int ()
1948 {
1949   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950   if test "$cross_compiling" = yes; then
1951     # Depending upon the size, compute the lo and hi bounds.
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953 /* end confdefs.h.  */
1954 $4
1955 int
1956 main ()
1957 {
1958 static int test_array [1 - 2 * !(($2) >= 0)];
1959 test_array [0] = 0
1960
1961   ;
1962   return 0;
1963 }
1964 _ACEOF
1965 if ac_fn_c_try_compile "$LINENO"; then :
1966   ac_lo=0 ac_mid=0
1967   while :; do
1968     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969 /* end confdefs.h.  */
1970 $4
1971 int
1972 main ()
1973 {
1974 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1975 test_array [0] = 0
1976
1977   ;
1978   return 0;
1979 }
1980 _ACEOF
1981 if ac_fn_c_try_compile "$LINENO"; then :
1982   ac_hi=$ac_mid; break
1983 else
1984   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1985                         if test $ac_lo -le $ac_mid; then
1986                           ac_lo= ac_hi=
1987                           break
1988                         fi
1989                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1990 fi
1991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1992   done
1993 else
1994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995 /* end confdefs.h.  */
1996 $4
1997 int
1998 main ()
1999 {
2000 static int test_array [1 - 2 * !(($2) < 0)];
2001 test_array [0] = 0
2002
2003   ;
2004   return 0;
2005 }
2006 _ACEOF
2007 if ac_fn_c_try_compile "$LINENO"; then :
2008   ac_hi=-1 ac_mid=-1
2009   while :; do
2010     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011 /* end confdefs.h.  */
2012 $4
2013 int
2014 main ()
2015 {
2016 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2017 test_array [0] = 0
2018
2019   ;
2020   return 0;
2021 }
2022 _ACEOF
2023 if ac_fn_c_try_compile "$LINENO"; then :
2024   ac_lo=$ac_mid; break
2025 else
2026   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2027                         if test $ac_mid -le $ac_hi; then
2028                           ac_lo= ac_hi=
2029                           break
2030                         fi
2031                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2032 fi
2033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034   done
2035 else
2036   ac_lo= ac_hi=
2037 fi
2038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 fi
2040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2041 # Binary search between lo and hi bounds.
2042 while test "x$ac_lo" != "x$ac_hi"; do
2043   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045 /* end confdefs.h.  */
2046 $4
2047 int
2048 main ()
2049 {
2050 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2051 test_array [0] = 0
2052
2053   ;
2054   return 0;
2055 }
2056 _ACEOF
2057 if ac_fn_c_try_compile "$LINENO"; then :
2058   ac_hi=$ac_mid
2059 else
2060   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2061 fi
2062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2063 done
2064 case $ac_lo in #((
2065 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2066 '') ac_retval=1 ;;
2067 esac
2068   else
2069     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070 /* end confdefs.h.  */
2071 $4
2072 static long int longval () { return $2; }
2073 static unsigned long int ulongval () { return $2; }
2074 #include <stdio.h>
2075 #include <stdlib.h>
2076 int
2077 main ()
2078 {
2079
2080   FILE *f = fopen ("conftest.val", "w");
2081   if (! f)
2082     return 1;
2083   if (($2) < 0)
2084     {
2085       long int i = longval ();
2086       if (i != ($2))
2087         return 1;
2088       fprintf (f, "%ld", i);
2089     }
2090   else
2091     {
2092       unsigned long int i = ulongval ();
2093       if (i != ($2))
2094         return 1;
2095       fprintf (f, "%lu", i);
2096     }
2097   /* Do not output a trailing newline, as this causes \r\n confusion
2098      on some platforms.  */
2099   return ferror (f) || fclose (f) != 0;
2100
2101   ;
2102   return 0;
2103 }
2104 _ACEOF
2105 if ac_fn_c_try_run "$LINENO"; then :
2106   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2107 else
2108   ac_retval=1
2109 fi
2110 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2111   conftest.$ac_objext conftest.beam conftest.$ac_ext
2112 rm -f conftest.val
2113
2114   fi
2115   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2116   return $ac_retval
2117
2118 } # ac_fn_c_compute_int
2119
2120 # ac_fn_c_check_func LINENO FUNC VAR
2121 # ----------------------------------
2122 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2123 ac_fn_c_check_func ()
2124 {
2125   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2126   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2127 $as_echo_n "checking for $2... " >&6; }
2128 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2129   $as_echo_n "(cached) " >&6
2130 else
2131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132 /* end confdefs.h.  */
2133 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2134    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2135 #define $2 innocuous_$2
2136
2137 /* System header to define __stub macros and hopefully few prototypes,
2138     which can conflict with char $2 (); below.
2139     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2140     <limits.h> exists even on freestanding compilers.  */
2141
2142 #ifdef __STDC__
2143 # include <limits.h>
2144 #else
2145 # include <assert.h>
2146 #endif
2147
2148 #undef $2
2149
2150 /* Override any GCC internal prototype to avoid an error.
2151    Use char because int might match the return type of a GCC
2152    builtin and then its argument prototype would still apply.  */
2153 #ifdef __cplusplus
2154 extern "C"
2155 #endif
2156 char $2 ();
2157 /* The GNU C library defines this for functions which it implements
2158     to always fail with ENOSYS.  Some functions are actually named
2159     something starting with __ and the normal name is an alias.  */
2160 #if defined __stub_$2 || defined __stub___$2
2161 choke me
2162 #endif
2163
2164 int
2165 main ()
2166 {
2167 return $2 ();
2168   ;
2169   return 0;
2170 }
2171 _ACEOF
2172 if ac_fn_c_try_link "$LINENO"; then :
2173   eval "$3=yes"
2174 else
2175   eval "$3=no"
2176 fi
2177 rm -f core conftest.err conftest.$ac_objext \
2178     conftest$ac_exeext conftest.$ac_ext
2179 fi
2180 eval ac_res=\$$3
2181                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2182 $as_echo "$ac_res" >&6; }
2183   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2184
2185 } # ac_fn_c_check_func
2186
2187 # ac_fn_c_check_decl LINENO SYMBOL VAR
2188 # ------------------------------------
2189 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2190 ac_fn_c_check_decl ()
2191 {
2192   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2193   as_decl_name=`echo $2|sed 's/ *(.*//'`
2194   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2196 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2197 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2198   $as_echo_n "(cached) " >&6
2199 else
2200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2201 /* end confdefs.h.  */
2202 $4
2203 int
2204 main ()
2205 {
2206 #ifndef $as_decl_name
2207 #ifdef __cplusplus
2208   (void) $as_decl_use;
2209 #else
2210   (void) $as_decl_name;
2211 #endif
2212 #endif
2213
2214   ;
2215   return 0;
2216 }
2217 _ACEOF
2218 if ac_fn_c_try_compile "$LINENO"; then :
2219   eval "$3=yes"
2220 else
2221   eval "$3=no"
2222 fi
2223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2224 fi
2225 eval ac_res=\$$3
2226                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227 $as_echo "$ac_res" >&6; }
2228   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229
2230 } # ac_fn_c_check_decl
2231
2232 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2233 # ----------------------------------------------------
2234 # Tries to find if the field MEMBER exists in type AGGR, after including
2235 # INCLUDES, setting cache variable VAR accordingly.
2236 ac_fn_c_check_member ()
2237 {
2238   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2240 $as_echo_n "checking for $2.$3... " >&6; }
2241 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2242   $as_echo_n "(cached) " >&6
2243 else
2244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h.  */
2246 $5
2247 int
2248 main ()
2249 {
2250 static $2 ac_aggr;
2251 if (ac_aggr.$3)
2252 return 0;
2253   ;
2254   return 0;
2255 }
2256 _ACEOF
2257 if ac_fn_c_try_compile "$LINENO"; then :
2258   eval "$4=yes"
2259 else
2260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261 /* end confdefs.h.  */
2262 $5
2263 int
2264 main ()
2265 {
2266 static $2 ac_aggr;
2267 if (sizeof ac_aggr.$3)
2268 return 0;
2269   ;
2270   return 0;
2271 }
2272 _ACEOF
2273 if ac_fn_c_try_compile "$LINENO"; then :
2274   eval "$4=yes"
2275 else
2276   eval "$4=no"
2277 fi
2278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279 fi
2280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281 fi
2282 eval ac_res=\$$4
2283                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2284 $as_echo "$ac_res" >&6; }
2285   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2286
2287 } # ac_fn_c_check_member
2288
2289 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2290 # -------------------------------------------
2291 # Tests whether TYPE exists after having included INCLUDES, setting cache
2292 # variable VAR accordingly.
2293 ac_fn_c_check_type ()
2294 {
2295   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2296   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2297 $as_echo_n "checking for $2... " >&6; }
2298 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2299   $as_echo_n "(cached) " >&6
2300 else
2301   eval "$3=no"
2302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303 /* end confdefs.h.  */
2304 $4
2305 int
2306 main ()
2307 {
2308 if (sizeof ($2))
2309          return 0;
2310   ;
2311   return 0;
2312 }
2313 _ACEOF
2314 if ac_fn_c_try_compile "$LINENO"; then :
2315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h.  */
2317 $4
2318 int
2319 main ()
2320 {
2321 if (sizeof (($2)))
2322             return 0;
2323   ;
2324   return 0;
2325 }
2326 _ACEOF
2327 if ac_fn_c_try_compile "$LINENO"; then :
2328
2329 else
2330   eval "$3=yes"
2331 fi
2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333 fi
2334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335 fi
2336 eval ac_res=\$$3
2337                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338 $as_echo "$ac_res" >&6; }
2339   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2340
2341 } # ac_fn_c_check_type
2342 cat >config.log <<_ACEOF
2343 This file contains any messages produced by compilers while
2344 running configure, to aid debugging if configure makes a mistake.
2345
2346 It was created by $as_me, which was
2347 generated by GNU Autoconf 2.64.  Invocation command line was
2348
2349   $ $0 $@
2350
2351 _ACEOF
2352 exec 5>>config.log
2353 {
2354 cat <<_ASUNAME
2355 ## --------- ##
2356 ## Platform. ##
2357 ## --------- ##
2358
2359 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2360 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2361 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2362 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2363 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2364
2365 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2366 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2367
2368 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2369 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2370 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2371 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2372 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2373 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2374 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2375
2376 _ASUNAME
2377
2378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2379 for as_dir in $PATH
2380 do
2381   IFS=$as_save_IFS
2382   test -z "$as_dir" && as_dir=.
2383     $as_echo "PATH: $as_dir"
2384   done
2385 IFS=$as_save_IFS
2386
2387 } >&5
2388
2389 cat >&5 <<_ACEOF
2390
2391
2392 ## ----------- ##
2393 ## Core tests. ##
2394 ## ----------- ##
2395
2396 _ACEOF
2397
2398
2399 # Keep a trace of the command line.
2400 # Strip out --no-create and --no-recursion so they do not pile up.
2401 # Strip out --silent because we don't want to record it for future runs.
2402 # Also quote any args containing shell meta-characters.
2403 # Make two passes to allow for proper duplicate-argument suppression.
2404 ac_configure_args=
2405 ac_configure_args0=
2406 ac_configure_args1=
2407 ac_must_keep_next=false
2408 for ac_pass in 1 2
2409 do
2410   for ac_arg
2411   do
2412     case $ac_arg in
2413     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2414     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2415     | -silent | --silent | --silen | --sile | --sil)
2416       continue ;;
2417     *\'*)
2418       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2419     esac
2420     case $ac_pass in
2421     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2422     2)
2423       as_fn_append ac_configure_args1 " '$ac_arg'"
2424       if test $ac_must_keep_next = true; then
2425         ac_must_keep_next=false # Got value, back to normal.
2426       else
2427         case $ac_arg in
2428           *=* | --config-cache | -C | -disable-* | --disable-* \
2429           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2430           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2431           | -with-* | --with-* | -without-* | --without-* | --x)
2432             case "$ac_configure_args0 " in
2433               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2434             esac
2435             ;;
2436           -* ) ac_must_keep_next=true ;;
2437         esac
2438       fi
2439       as_fn_append ac_configure_args " '$ac_arg'"
2440       ;;
2441     esac
2442   done
2443 done
2444 { ac_configure_args0=; unset ac_configure_args0;}
2445 { ac_configure_args1=; unset ac_configure_args1;}
2446
2447 # When interrupted or exit'd, cleanup temporary files, and complete
2448 # config.log.  We remove comments because anyway the quotes in there
2449 # would cause problems or look ugly.
2450 # WARNING: Use '\'' to represent an apostrophe within the trap.
2451 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2452 trap 'exit_status=$?
2453   # Save into config.log some information that might help in debugging.
2454   {
2455     echo
2456
2457     cat <<\_ASBOX
2458 ## ---------------- ##
2459 ## Cache variables. ##
2460 ## ---------------- ##
2461 _ASBOX
2462     echo
2463     # The following way of writing the cache mishandles newlines in values,
2464 (
2465   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2466     eval ac_val=\$$ac_var
2467     case $ac_val in #(
2468     *${as_nl}*)
2469       case $ac_var in #(
2470       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2471 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2472       esac
2473       case $ac_var in #(
2474       _ | IFS | as_nl) ;; #(
2475       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2476       *) { eval $ac_var=; unset $ac_var;} ;;
2477       esac ;;
2478     esac
2479   done
2480   (set) 2>&1 |
2481     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2482     *${as_nl}ac_space=\ *)
2483       sed -n \
2484         "s/'\''/'\''\\\\'\'''\''/g;
2485           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2486       ;; #(
2487     *)
2488       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2489       ;;
2490     esac |
2491     sort
2492 )
2493     echo
2494
2495     cat <<\_ASBOX
2496 ## ----------------- ##
2497 ## Output variables. ##
2498 ## ----------------- ##
2499 _ASBOX
2500     echo
2501     for ac_var in $ac_subst_vars
2502     do
2503       eval ac_val=\$$ac_var
2504       case $ac_val in
2505       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2506       esac
2507       $as_echo "$ac_var='\''$ac_val'\''"
2508     done | sort
2509     echo
2510
2511     if test -n "$ac_subst_files"; then
2512       cat <<\_ASBOX
2513 ## ------------------- ##
2514 ## File substitutions. ##
2515 ## ------------------- ##
2516 _ASBOX
2517       echo
2518       for ac_var in $ac_subst_files
2519       do
2520         eval ac_val=\$$ac_var
2521         case $ac_val in
2522         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2523         esac
2524         $as_echo "$ac_var='\''$ac_val'\''"
2525       done | sort
2526       echo
2527     fi
2528
2529     if test -s confdefs.h; then
2530       cat <<\_ASBOX
2531 ## ----------- ##
2532 ## confdefs.h. ##
2533 ## ----------- ##
2534 _ASBOX
2535       echo
2536       cat confdefs.h
2537       echo
2538     fi
2539     test "$ac_signal" != 0 &&
2540       $as_echo "$as_me: caught signal $ac_signal"
2541     $as_echo "$as_me: exit $exit_status"
2542   } >&5
2543   rm -f core *.core core.conftest.* &&
2544     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2545     exit $exit_status
2546 ' 0
2547 for ac_signal in 1 2 13 15; do
2548   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2549 done
2550 ac_signal=0
2551
2552 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2553 rm -f -r conftest* confdefs.h
2554
2555 $as_echo "/* confdefs.h */" > confdefs.h
2556
2557 # Predefined preprocessor variables.
2558
2559 cat >>confdefs.h <<_ACEOF
2560 #define PACKAGE_NAME "$PACKAGE_NAME"
2561 _ACEOF
2562
2563 cat >>confdefs.h <<_ACEOF
2564 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2565 _ACEOF
2566
2567 cat >>confdefs.h <<_ACEOF
2568 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2569 _ACEOF
2570
2571 cat >>confdefs.h <<_ACEOF
2572 #define PACKAGE_STRING "$PACKAGE_STRING"
2573 _ACEOF
2574
2575 cat >>confdefs.h <<_ACEOF
2576 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2577 _ACEOF
2578
2579 cat >>confdefs.h <<_ACEOF
2580 #define PACKAGE_URL "$PACKAGE_URL"
2581 _ACEOF
2582
2583
2584 # Let the site file select an alternate cache file if it wants to.
2585 # Prefer an explicitly selected file to automatically selected ones.
2586 ac_site_file1=NONE
2587 ac_site_file2=NONE
2588 if test -n "$CONFIG_SITE"; then
2589   ac_site_file1=$CONFIG_SITE
2590 elif test "x$prefix" != xNONE; then
2591   ac_site_file1=$prefix/share/config.site
2592   ac_site_file2=$prefix/etc/config.site
2593 else
2594   ac_site_file1=$ac_default_prefix/share/config.site
2595   ac_site_file2=$ac_default_prefix/etc/config.site
2596 fi
2597 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2598 do
2599   test "x$ac_site_file" = xNONE && continue
2600   if test -r "$ac_site_file"; then
2601     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2602 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2603     sed 's/^/| /' "$ac_site_file" >&5
2604     . "$ac_site_file"
2605   fi
2606 done
2607
2608 if test -r "$cache_file"; then
2609   # Some versions of bash will fail to source /dev/null (special
2610   # files actually), so we avoid doing that.
2611   if test -f "$cache_file"; then
2612     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2613 $as_echo "$as_me: loading cache $cache_file" >&6;}
2614     case $cache_file in
2615       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2616       *)                      . "./$cache_file";;
2617     esac
2618   fi
2619 else
2620   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2621 $as_echo "$as_me: creating cache $cache_file" >&6;}
2622   >$cache_file
2623 fi
2624
2625 # Check that the precious variables saved in the cache have kept the same
2626 # value.
2627 ac_cache_corrupted=false
2628 for ac_var in $ac_precious_vars; do
2629   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2630   eval ac_new_set=\$ac_env_${ac_var}_set
2631   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2632   eval ac_new_val=\$ac_env_${ac_var}_value
2633   case $ac_old_set,$ac_new_set in
2634     set,)
2635       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2636 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2637       ac_cache_corrupted=: ;;
2638     ,set)
2639       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2640 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2641       ac_cache_corrupted=: ;;
2642     ,);;
2643     *)
2644       if test "x$ac_old_val" != "x$ac_new_val"; then
2645         # differences in whitespace do not lead to failure.
2646         ac_old_val_w=`echo x $ac_old_val`
2647         ac_new_val_w=`echo x $ac_new_val`
2648         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2649           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2650 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2651           ac_cache_corrupted=:
2652         else
2653           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2654 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2655           eval $ac_var=\$ac_old_val
2656         fi
2657         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2658 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2659         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2660 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2661       fi;;
2662   esac
2663   # Pass precious variables to config.status.
2664   if test "$ac_new_set" = set; then
2665     case $ac_new_val in
2666     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2667     *) ac_arg=$ac_var=$ac_new_val ;;
2668     esac
2669     case " $ac_configure_args " in
2670       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2671       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2672     esac
2673   fi
2674 done
2675 if $ac_cache_corrupted; then
2676   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2677 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2678   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2679 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2680   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2681 fi
2682 ## -------------------- ##
2683 ## Main body of script. ##
2684 ## -------------------- ##
2685
2686 ac_ext=c
2687 ac_cpp='$CPP $CPPFLAGS'
2688 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2689 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2690 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2691
2692
2693
2694
2695
2696 ac_config_headers="$ac_config_headers config.h:config.in"
2697
2698
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2700 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2701     # Check whether --enable-maintainer-mode was given.
2702 if test "${enable_maintainer_mode+set}" = set; then :
2703   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2704 else
2705   USE_MAINTAINER_MODE=no
2706 fi
2707
2708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2709 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2710    if test $USE_MAINTAINER_MODE = yes; then
2711   MAINTAINER_MODE_TRUE=
2712   MAINTAINER_MODE_FALSE='#'
2713 else
2714   MAINTAINER_MODE_TRUE='#'
2715   MAINTAINER_MODE_FALSE=
2716 fi
2717
2718   MAINT=$MAINTAINER_MODE_TRUE
2719
2720
2721
2722 # Set the 'development' global.
2723 . $srcdir/../bfd/development.sh
2724
2725 ac_ext=c
2726 ac_cpp='$CPP $CPPFLAGS'
2727 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2730 if test -n "$ac_tool_prefix"; then
2731   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2732 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2734 $as_echo_n "checking for $ac_word... " >&6; }
2735 if test "${ac_cv_prog_CC+set}" = set; then :
2736   $as_echo_n "(cached) " >&6
2737 else
2738   if test -n "$CC"; then
2739   ac_cv_prog_CC="$CC" # Let the user override the test.
2740 else
2741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2742 for as_dir in $PATH
2743 do
2744   IFS=$as_save_IFS
2745   test -z "$as_dir" && as_dir=.
2746     for ac_exec_ext in '' $ac_executable_extensions; do
2747   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2748     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2750     break 2
2751   fi
2752 done
2753   done
2754 IFS=$as_save_IFS
2755
2756 fi
2757 fi
2758 CC=$ac_cv_prog_CC
2759 if test -n "$CC"; then
2760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2761 $as_echo "$CC" >&6; }
2762 else
2763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2764 $as_echo "no" >&6; }
2765 fi
2766
2767
2768 fi
2769 if test -z "$ac_cv_prog_CC"; then
2770   ac_ct_CC=$CC
2771   # Extract the first word of "gcc", so it can be a program name with args.
2772 set dummy gcc; ac_word=$2
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2774 $as_echo_n "checking for $ac_word... " >&6; }
2775 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2776   $as_echo_n "(cached) " >&6
2777 else
2778   if test -n "$ac_ct_CC"; then
2779   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2780 else
2781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782 for as_dir in $PATH
2783 do
2784   IFS=$as_save_IFS
2785   test -z "$as_dir" && as_dir=.
2786     for ac_exec_ext in '' $ac_executable_extensions; do
2787   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2788     ac_cv_prog_ac_ct_CC="gcc"
2789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2790     break 2
2791   fi
2792 done
2793   done
2794 IFS=$as_save_IFS
2795
2796 fi
2797 fi
2798 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2799 if test -n "$ac_ct_CC"; then
2800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2801 $as_echo "$ac_ct_CC" >&6; }
2802 else
2803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2804 $as_echo "no" >&6; }
2805 fi
2806
2807   if test "x$ac_ct_CC" = x; then
2808     CC=""
2809   else
2810     case $cross_compiling:$ac_tool_warned in
2811 yes:)
2812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2813 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2814 ac_tool_warned=yes ;;
2815 esac
2816     CC=$ac_ct_CC
2817   fi
2818 else
2819   CC="$ac_cv_prog_CC"
2820 fi
2821
2822 if test -z "$CC"; then
2823           if test -n "$ac_tool_prefix"; then
2824     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2825 set dummy ${ac_tool_prefix}cc; ac_word=$2
2826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2827 $as_echo_n "checking for $ac_word... " >&6; }
2828 if test "${ac_cv_prog_CC+set}" = set; then :
2829   $as_echo_n "(cached) " >&6
2830 else
2831   if test -n "$CC"; then
2832   ac_cv_prog_CC="$CC" # Let the user override the test.
2833 else
2834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2835 for as_dir in $PATH
2836 do
2837   IFS=$as_save_IFS
2838   test -z "$as_dir" && as_dir=.
2839     for ac_exec_ext in '' $ac_executable_extensions; do
2840   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2841     ac_cv_prog_CC="${ac_tool_prefix}cc"
2842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2843     break 2
2844   fi
2845 done
2846   done
2847 IFS=$as_save_IFS
2848
2849 fi
2850 fi
2851 CC=$ac_cv_prog_CC
2852 if test -n "$CC"; then
2853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2854 $as_echo "$CC" >&6; }
2855 else
2856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2857 $as_echo "no" >&6; }
2858 fi
2859
2860
2861   fi
2862 fi
2863 if test -z "$CC"; then
2864   # Extract the first word of "cc", so it can be a program name with args.
2865 set dummy cc; ac_word=$2
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2867 $as_echo_n "checking for $ac_word... " >&6; }
2868 if test "${ac_cv_prog_CC+set}" = set; then :
2869   $as_echo_n "(cached) " >&6
2870 else
2871   if test -n "$CC"; then
2872   ac_cv_prog_CC="$CC" # Let the user override the test.
2873 else
2874   ac_prog_rejected=no
2875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2876 for as_dir in $PATH
2877 do
2878   IFS=$as_save_IFS
2879   test -z "$as_dir" && as_dir=.
2880     for ac_exec_ext in '' $ac_executable_extensions; do
2881   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2882     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2883        ac_prog_rejected=yes
2884        continue
2885      fi
2886     ac_cv_prog_CC="cc"
2887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2888     break 2
2889   fi
2890 done
2891   done
2892 IFS=$as_save_IFS
2893
2894 if test $ac_prog_rejected = yes; then
2895   # We found a bogon in the path, so make sure we never use it.
2896   set dummy $ac_cv_prog_CC
2897   shift
2898   if test $# != 0; then
2899     # We chose a different compiler from the bogus one.
2900     # However, it has the same basename, so the bogon will be chosen
2901     # first if we set CC to just the basename; use the full file name.
2902     shift
2903     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2904   fi
2905 fi
2906 fi
2907 fi
2908 CC=$ac_cv_prog_CC
2909 if test -n "$CC"; then
2910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2911 $as_echo "$CC" >&6; }
2912 else
2913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914 $as_echo "no" >&6; }
2915 fi
2916
2917
2918 fi
2919 if test -z "$CC"; then
2920   if test -n "$ac_tool_prefix"; then
2921   for ac_prog in cl.exe
2922   do
2923     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2924 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2926 $as_echo_n "checking for $ac_word... " >&6; }
2927 if test "${ac_cv_prog_CC+set}" = set; then :
2928   $as_echo_n "(cached) " >&6
2929 else
2930   if test -n "$CC"; then
2931   ac_cv_prog_CC="$CC" # Let the user override the test.
2932 else
2933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2934 for as_dir in $PATH
2935 do
2936   IFS=$as_save_IFS
2937   test -z "$as_dir" && as_dir=.
2938     for ac_exec_ext in '' $ac_executable_extensions; do
2939   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2940     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2942     break 2
2943   fi
2944 done
2945   done
2946 IFS=$as_save_IFS
2947
2948 fi
2949 fi
2950 CC=$ac_cv_prog_CC
2951 if test -n "$CC"; then
2952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2953 $as_echo "$CC" >&6; }
2954 else
2955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2956 $as_echo "no" >&6; }
2957 fi
2958
2959
2960     test -n "$CC" && break
2961   done
2962 fi
2963 if test -z "$CC"; then
2964   ac_ct_CC=$CC
2965   for ac_prog in cl.exe
2966 do
2967   # Extract the first word of "$ac_prog", so it can be a program name with args.
2968 set dummy $ac_prog; ac_word=$2
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2970 $as_echo_n "checking for $ac_word... " >&6; }
2971 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2972   $as_echo_n "(cached) " >&6
2973 else
2974   if test -n "$ac_ct_CC"; then
2975   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2976 else
2977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2978 for as_dir in $PATH
2979 do
2980   IFS=$as_save_IFS
2981   test -z "$as_dir" && as_dir=.
2982     for ac_exec_ext in '' $ac_executable_extensions; do
2983   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2984     ac_cv_prog_ac_ct_CC="$ac_prog"
2985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2986     break 2
2987   fi
2988 done
2989   done
2990 IFS=$as_save_IFS
2991
2992 fi
2993 fi
2994 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2995 if test -n "$ac_ct_CC"; then
2996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2997 $as_echo "$ac_ct_CC" >&6; }
2998 else
2999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3000 $as_echo "no" >&6; }
3001 fi
3002
3003
3004   test -n "$ac_ct_CC" && break
3005 done
3006
3007   if test "x$ac_ct_CC" = x; then
3008     CC=""
3009   else
3010     case $cross_compiling:$ac_tool_warned in
3011 yes:)
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3013 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3014 ac_tool_warned=yes ;;
3015 esac
3016     CC=$ac_ct_CC
3017   fi
3018 fi
3019
3020 fi
3021
3022
3023 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3024 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3025 as_fn_error "no acceptable C compiler found in \$PATH
3026 See \`config.log' for more details." "$LINENO" 5; }
3027
3028 # Provide some information about the compiler.
3029 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3030 set X $ac_compile
3031 ac_compiler=$2
3032 for ac_option in --version -v -V -qversion; do
3033   { { ac_try="$ac_compiler $ac_option >&5"
3034 case "(($ac_try" in
3035   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3036   *) ac_try_echo=$ac_try;;
3037 esac
3038 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3039 $as_echo "$ac_try_echo"; } >&5
3040   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3041   ac_status=$?
3042   if test -s conftest.err; then
3043     sed '10a\
3044 ... rest of stderr output deleted ...
3045          10q' conftest.err >conftest.er1
3046     cat conftest.er1 >&5
3047     rm -f conftest.er1 conftest.err
3048   fi
3049   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3050   test $ac_status = 0; }
3051 done
3052
3053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3054 /* end confdefs.h.  */
3055
3056 int
3057 main ()
3058 {
3059
3060   ;
3061   return 0;
3062 }
3063 _ACEOF
3064 ac_clean_files_save=$ac_clean_files
3065 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3066 # Try to create an executable without -o first, disregard a.out.
3067 # It will help us diagnose broken compilers, and finding out an intuition
3068 # of exeext.
3069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3070 $as_echo_n "checking for C compiler default output file name... " >&6; }
3071 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3072
3073 # The possible output files:
3074 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3075
3076 ac_rmfiles=
3077 for ac_file in $ac_files
3078 do
3079   case $ac_file in
3080     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3081     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3082   esac
3083 done
3084 rm -f $ac_rmfiles
3085
3086 if { { ac_try="$ac_link_default"
3087 case "(($ac_try" in
3088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3089   *) ac_try_echo=$ac_try;;
3090 esac
3091 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3092 $as_echo "$ac_try_echo"; } >&5
3093   (eval "$ac_link_default") 2>&5
3094   ac_status=$?
3095   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3096   test $ac_status = 0; }; then :
3097   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3098 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3099 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3100 # so that the user can short-circuit this test for compilers unknown to
3101 # Autoconf.
3102 for ac_file in $ac_files ''
3103 do
3104   test -f "$ac_file" || continue
3105   case $ac_file in
3106     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3107         ;;
3108     [ab].out )
3109         # We found the default executable, but exeext='' is most
3110         # certainly right.
3111         break;;
3112     *.* )
3113         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3114         then :; else
3115            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3116         fi
3117         # We set ac_cv_exeext here because the later test for it is not
3118         # safe: cross compilers may not add the suffix if given an `-o'
3119         # argument, so we may need to know it at that point already.
3120         # Even if this section looks crufty: it has the advantage of
3121         # actually working.
3122         break;;
3123     * )
3124         break;;
3125   esac
3126 done
3127 test "$ac_cv_exeext" = no && ac_cv_exeext=
3128
3129 else
3130   ac_file=''
3131 fi
3132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3133 $as_echo "$ac_file" >&6; }
3134 if test -z "$ac_file"; then :
3135   $as_echo "$as_me: failed program was:" >&5
3136 sed 's/^/| /' conftest.$ac_ext >&5
3137
3138 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3139 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3140 { as_fn_set_status 77
3141 as_fn_error "C compiler cannot create executables
3142 See \`config.log' for more details." "$LINENO" 5; }; }
3143 fi
3144 ac_exeext=$ac_cv_exeext
3145
3146 # Check that the compiler produces executables we can run.  If not, either
3147 # the compiler is broken, or we cross compile.
3148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3149 $as_echo_n "checking whether the C compiler works... " >&6; }
3150 # If not cross compiling, check that we can run a simple program.
3151 if test "$cross_compiling" != yes; then
3152   if { ac_try='./$ac_file'
3153   { { case "(($ac_try" in
3154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3155   *) ac_try_echo=$ac_try;;
3156 esac
3157 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3158 $as_echo "$ac_try_echo"; } >&5
3159   (eval "$ac_try") 2>&5
3160   ac_status=$?
3161   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3162   test $ac_status = 0; }; }; then
3163     cross_compiling=no
3164   else
3165     if test "$cross_compiling" = maybe; then
3166         cross_compiling=yes
3167     else
3168         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3169 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3170 as_fn_error "cannot run C compiled programs.
3171 If you meant to cross compile, use \`--host'.
3172 See \`config.log' for more details." "$LINENO" 5; }
3173     fi
3174   fi
3175 fi
3176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3177 $as_echo "yes" >&6; }
3178
3179 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3180 ac_clean_files=$ac_clean_files_save
3181 # Check that the compiler produces executables we can run.  If not, either
3182 # the compiler is broken, or we cross compile.
3183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3184 $as_echo_n "checking whether we are cross compiling... " >&6; }
3185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3186 $as_echo "$cross_compiling" >&6; }
3187
3188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3189 $as_echo_n "checking for suffix of executables... " >&6; }
3190 if { { ac_try="$ac_link"
3191 case "(($ac_try" in
3192   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3193   *) ac_try_echo=$ac_try;;
3194 esac
3195 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3196 $as_echo "$ac_try_echo"; } >&5
3197   (eval "$ac_link") 2>&5
3198   ac_status=$?
3199   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3200   test $ac_status = 0; }; then :
3201   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3202 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3203 # work properly (i.e., refer to `conftest.exe'), while it won't with
3204 # `rm'.
3205 for ac_file in conftest.exe conftest conftest.*; do
3206   test -f "$ac_file" || continue
3207   case $ac_file in
3208     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3209     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3210           break;;
3211     * ) break;;
3212   esac
3213 done
3214 else
3215   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3216 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3217 as_fn_error "cannot compute suffix of executables: cannot compile and link
3218 See \`config.log' for more details." "$LINENO" 5; }
3219 fi
3220 rm -f conftest$ac_cv_exeext
3221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3222 $as_echo "$ac_cv_exeext" >&6; }
3223
3224 rm -f conftest.$ac_ext
3225 EXEEXT=$ac_cv_exeext
3226 ac_exeext=$EXEEXT
3227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3228 $as_echo_n "checking for suffix of object files... " >&6; }
3229 if test "${ac_cv_objext+set}" = set; then :
3230   $as_echo_n "(cached) " >&6
3231 else
3232   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3233 /* end confdefs.h.  */
3234
3235 int
3236 main ()
3237 {
3238
3239   ;
3240   return 0;
3241 }
3242 _ACEOF
3243 rm -f conftest.o conftest.obj
3244 if { { ac_try="$ac_compile"
3245 case "(($ac_try" in
3246   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3247   *) ac_try_echo=$ac_try;;
3248 esac
3249 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3250 $as_echo "$ac_try_echo"; } >&5
3251   (eval "$ac_compile") 2>&5
3252   ac_status=$?
3253   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3254   test $ac_status = 0; }; then :
3255   for ac_file in conftest.o conftest.obj conftest.*; do
3256   test -f "$ac_file" || continue;
3257   case $ac_file in
3258     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3259     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3260        break;;
3261   esac
3262 done
3263 else
3264   $as_echo "$as_me: failed program was:" >&5
3265 sed 's/^/| /' conftest.$ac_ext >&5
3266
3267 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3268 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3269 as_fn_error "cannot compute suffix of object files: cannot compile
3270 See \`config.log' for more details." "$LINENO" 5; }
3271 fi
3272 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3273 fi
3274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3275 $as_echo "$ac_cv_objext" >&6; }
3276 OBJEXT=$ac_cv_objext
3277 ac_objext=$OBJEXT
3278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3279 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3280 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3281   $as_echo_n "(cached) " >&6
3282 else
3283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3284 /* end confdefs.h.  */
3285
3286 int
3287 main ()
3288 {
3289 #ifndef __GNUC__
3290        choke me
3291 #endif
3292
3293   ;
3294   return 0;
3295 }
3296 _ACEOF
3297 if ac_fn_c_try_compile "$LINENO"; then :
3298   ac_compiler_gnu=yes
3299 else
3300   ac_compiler_gnu=no
3301 fi
3302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3303 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3304
3305 fi
3306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3307 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3308 if test $ac_compiler_gnu = yes; then
3309   GCC=yes
3310 else
3311   GCC=
3312 fi
3313 ac_test_CFLAGS=${CFLAGS+set}
3314 ac_save_CFLAGS=$CFLAGS
3315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3316 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3317 if test "${ac_cv_prog_cc_g+set}" = set; then :
3318   $as_echo_n "(cached) " >&6
3319 else
3320   ac_save_c_werror_flag=$ac_c_werror_flag
3321    ac_c_werror_flag=yes
3322    ac_cv_prog_cc_g=no
3323    CFLAGS="-g"
3324    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3325 /* end confdefs.h.  */
3326
3327 int
3328 main ()
3329 {
3330
3331   ;
3332   return 0;
3333 }
3334 _ACEOF
3335 if ac_fn_c_try_compile "$LINENO"; then :
3336   ac_cv_prog_cc_g=yes
3337 else
3338   CFLAGS=""
3339       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3340 /* end confdefs.h.  */
3341
3342 int
3343 main ()
3344 {
3345
3346   ;
3347   return 0;
3348 }
3349 _ACEOF
3350 if ac_fn_c_try_compile "$LINENO"; then :
3351
3352 else
3353   ac_c_werror_flag=$ac_save_c_werror_flag
3354          CFLAGS="-g"
3355          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3356 /* end confdefs.h.  */
3357
3358 int
3359 main ()
3360 {
3361
3362   ;
3363   return 0;
3364 }
3365 _ACEOF
3366 if ac_fn_c_try_compile "$LINENO"; then :
3367   ac_cv_prog_cc_g=yes
3368 fi
3369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3370 fi
3371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3372 fi
3373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3374    ac_c_werror_flag=$ac_save_c_werror_flag
3375 fi
3376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3377 $as_echo "$ac_cv_prog_cc_g" >&6; }
3378 if test "$ac_test_CFLAGS" = set; then
3379   CFLAGS=$ac_save_CFLAGS
3380 elif test $ac_cv_prog_cc_g = yes; then
3381   if test "$GCC" = yes; then
3382     CFLAGS="-g -O2"
3383   else
3384     CFLAGS="-g"
3385   fi
3386 else
3387   if test "$GCC" = yes; then
3388     CFLAGS="-O2"
3389   else
3390     CFLAGS=
3391   fi
3392 fi
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3394 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3395 if test "${ac_cv_prog_cc_c89+set}" = set; then :
3396   $as_echo_n "(cached) " >&6
3397 else
3398   ac_cv_prog_cc_c89=no
3399 ac_save_CC=$CC
3400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3401 /* end confdefs.h.  */
3402 #include <stdarg.h>
3403 #include <stdio.h>
3404 #include <sys/types.h>
3405 #include <sys/stat.h>
3406 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3407 struct buf { int x; };
3408 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3409 static char *e (p, i)
3410      char **p;
3411      int i;
3412 {
3413   return p[i];
3414 }
3415 static char *f (char * (*g) (char **, int), char **p, ...)
3416 {
3417   char *s;
3418   va_list v;
3419   va_start (v,p);
3420   s = g (p, va_arg (v,int));
3421   va_end (v);
3422   return s;
3423 }
3424
3425 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3426    function prototypes and stuff, but not '\xHH' hex character constants.
3427    These don't provoke an error unfortunately, instead are silently treated
3428    as 'x'.  The following induces an error, until -std is added to get
3429    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3430    array size at least.  It's necessary to write '\x00'==0 to get something
3431    that's true only with -std.  */
3432 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3433
3434 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3435    inside strings and character constants.  */
3436 #define FOO(x) 'x'
3437 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3438
3439 int test (int i, double x);
3440 struct s1 {int (*f) (int a);};
3441 struct s2 {int (*f) (double a);};
3442 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3443 int argc;
3444 char **argv;
3445 int
3446 main ()
3447 {
3448 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3449   ;
3450   return 0;
3451 }
3452 _ACEOF
3453 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3454         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3455 do
3456   CC="$ac_save_CC $ac_arg"
3457   if ac_fn_c_try_compile "$LINENO"; then :
3458   ac_cv_prog_cc_c89=$ac_arg
3459 fi
3460 rm -f core conftest.err conftest.$ac_objext
3461   test "x$ac_cv_prog_cc_c89" != "xno" && break
3462 done
3463 rm -f conftest.$ac_ext
3464 CC=$ac_save_CC
3465
3466 fi
3467 # AC_CACHE_VAL
3468 case "x$ac_cv_prog_cc_c89" in
3469   x)
3470     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3471 $as_echo "none needed" >&6; } ;;
3472   xno)
3473     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3474 $as_echo "unsupported" >&6; } ;;
3475   *)
3476     CC="$CC $ac_cv_prog_cc_c89"
3477     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3478 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3479 esac
3480 if test "x$ac_cv_prog_cc_c89" != xno; then :
3481
3482 fi
3483
3484 ac_ext=c
3485 ac_cpp='$CPP $CPPFLAGS'
3486 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3487 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3488 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3489
3490
3491 ac_ext=c
3492 ac_cpp='$CPP $CPPFLAGS'
3493 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3494 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3495 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3497 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3498 # On Suns, sometimes $CPP names a directory.
3499 if test -n "$CPP" && test -d "$CPP"; then
3500   CPP=
3501 fi
3502 if test -z "$CPP"; then
3503   if test "${ac_cv_prog_CPP+set}" = set; then :
3504   $as_echo_n "(cached) " >&6
3505 else
3506       # Double quotes because CPP needs to be expanded
3507     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3508     do
3509       ac_preproc_ok=false
3510 for ac_c_preproc_warn_flag in '' yes
3511 do
3512   # Use a header file that comes with gcc, so configuring glibc
3513   # with a fresh cross-compiler works.
3514   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3515   # <limits.h> exists even on freestanding compilers.
3516   # On the NeXT, cc -E runs the code through the compiler's parser,
3517   # not just through cpp. "Syntax error" is here to catch this case.
3518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3519 /* end confdefs.h.  */
3520 #ifdef __STDC__
3521 # include <limits.h>
3522 #else
3523 # include <assert.h>
3524 #endif
3525                      Syntax error
3526 _ACEOF
3527 if ac_fn_c_try_cpp "$LINENO"; then :
3528
3529 else
3530   # Broken: fails on valid input.
3531 continue
3532 fi
3533 rm -f conftest.err conftest.$ac_ext
3534
3535   # OK, works on sane cases.  Now check whether nonexistent headers
3536   # can be detected and how.
3537   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3538 /* end confdefs.h.  */
3539 #include <ac_nonexistent.h>
3540 _ACEOF
3541 if ac_fn_c_try_cpp "$LINENO"; then :
3542   # Broken: success on invalid input.
3543 continue
3544 else
3545   # Passes both tests.
3546 ac_preproc_ok=:
3547 break
3548 fi
3549 rm -f conftest.err conftest.$ac_ext
3550
3551 done
3552 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553 rm -f conftest.err conftest.$ac_ext
3554 if $ac_preproc_ok; then :
3555   break
3556 fi
3557
3558     done
3559     ac_cv_prog_CPP=$CPP
3560
3561 fi
3562   CPP=$ac_cv_prog_CPP
3563 else
3564   ac_cv_prog_CPP=$CPP
3565 fi
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3567 $as_echo "$CPP" >&6; }
3568 ac_preproc_ok=false
3569 for ac_c_preproc_warn_flag in '' yes
3570 do
3571   # Use a header file that comes with gcc, so configuring glibc
3572   # with a fresh cross-compiler works.
3573   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3574   # <limits.h> exists even on freestanding compilers.
3575   # On the NeXT, cc -E runs the code through the compiler's parser,
3576   # not just through cpp. "Syntax error" is here to catch this case.
3577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3578 /* end confdefs.h.  */
3579 #ifdef __STDC__
3580 # include <limits.h>
3581 #else
3582 # include <assert.h>
3583 #endif
3584                      Syntax error
3585 _ACEOF
3586 if ac_fn_c_try_cpp "$LINENO"; then :
3587
3588 else
3589   # Broken: fails on valid input.
3590 continue
3591 fi
3592 rm -f conftest.err conftest.$ac_ext
3593
3594   # OK, works on sane cases.  Now check whether nonexistent headers
3595   # can be detected and how.
3596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3597 /* end confdefs.h.  */
3598 #include <ac_nonexistent.h>
3599 _ACEOF
3600 if ac_fn_c_try_cpp "$LINENO"; then :
3601   # Broken: success on invalid input.
3602 continue
3603 else
3604   # Passes both tests.
3605 ac_preproc_ok=:
3606 break
3607 fi
3608 rm -f conftest.err conftest.$ac_ext
3609
3610 done
3611 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3612 rm -f conftest.err conftest.$ac_ext
3613 if $ac_preproc_ok; then :
3614
3615 else
3616   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3617 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3618 as_fn_error "C preprocessor \"$CPP\" fails sanity check
3619 See \`config.log' for more details." "$LINENO" 5; }
3620 fi
3621
3622 ac_ext=c
3623 ac_cpp='$CPP $CPPFLAGS'
3624 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3625 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3626 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3627
3628
3629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3630 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3631 if test "${ac_cv_path_GREP+set}" = set; then :
3632   $as_echo_n "(cached) " >&6
3633 else
3634   if test -z "$GREP"; then
3635   ac_path_GREP_found=false
3636   # Loop through the user's path and test for each of PROGNAME-LIST
3637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3639 do
3640   IFS=$as_save_IFS
3641   test -z "$as_dir" && as_dir=.
3642     for ac_prog in grep ggrep; do
3643     for ac_exec_ext in '' $ac_executable_extensions; do
3644       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3645       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3646 # Check for GNU ac_path_GREP and select it if it is found.
3647   # Check for GNU $ac_path_GREP
3648 case `"$ac_path_GREP" --version 2>&1` in
3649 *GNU*)
3650   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3651 *)
3652   ac_count=0
3653   $as_echo_n 0123456789 >"conftest.in"
3654   while :
3655   do
3656     cat "conftest.in" "conftest.in" >"conftest.tmp"
3657     mv "conftest.tmp" "conftest.in"
3658     cp "conftest.in" "conftest.nl"
3659     $as_echo 'GREP' >> "conftest.nl"
3660     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3661     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3662     as_fn_arith $ac_count + 1 && ac_count=$as_val
3663     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3664       # Best one so far, save it but keep looking for a better one
3665       ac_cv_path_GREP="$ac_path_GREP"
3666       ac_path_GREP_max=$ac_count
3667     fi
3668     # 10*(2^10) chars as input seems more than enough
3669     test $ac_count -gt 10 && break
3670   done
3671   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3672 esac
3673
3674       $ac_path_GREP_found && break 3
3675     done
3676   done
3677   done
3678 IFS=$as_save_IFS
3679   if test -z "$ac_cv_path_GREP"; then
3680     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3681   fi
3682 else
3683   ac_cv_path_GREP=$GREP
3684 fi
3685
3686 fi
3687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3688 $as_echo "$ac_cv_path_GREP" >&6; }
3689  GREP="$ac_cv_path_GREP"
3690
3691
3692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3693 $as_echo_n "checking for egrep... " >&6; }
3694 if test "${ac_cv_path_EGREP+set}" = set; then :
3695   $as_echo_n "(cached) " >&6
3696 else
3697   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3698    then ac_cv_path_EGREP="$GREP -E"
3699    else
3700      if test -z "$EGREP"; then
3701   ac_path_EGREP_found=false
3702   # Loop through the user's path and test for each of PROGNAME-LIST
3703   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3704 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3705 do
3706   IFS=$as_save_IFS
3707   test -z "$as_dir" && as_dir=.
3708     for ac_prog in egrep; do
3709     for ac_exec_ext in '' $ac_executable_extensions; do
3710       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3711       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3712 # Check for GNU ac_path_EGREP and select it if it is found.
3713   # Check for GNU $ac_path_EGREP
3714 case `"$ac_path_EGREP" --version 2>&1` in
3715 *GNU*)
3716   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3717 *)
3718   ac_count=0
3719   $as_echo_n 0123456789 >"conftest.in"
3720   while :
3721   do
3722     cat "conftest.in" "conftest.in" >"conftest.tmp"
3723     mv "conftest.tmp" "conftest.in"
3724     cp "conftest.in" "conftest.nl"
3725     $as_echo 'EGREP' >> "conftest.nl"
3726     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3727     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3728     as_fn_arith $ac_count + 1 && ac_count=$as_val
3729     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3730       # Best one so far, save it but keep looking for a better one
3731       ac_cv_path_EGREP="$ac_path_EGREP"
3732       ac_path_EGREP_max=$ac_count
3733     fi
3734     # 10*(2^10) chars as input seems more than enough
3735     test $ac_count -gt 10 && break
3736   done
3737   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3738 esac
3739
3740       $ac_path_EGREP_found && break 3
3741     done
3742   done
3743   done
3744 IFS=$as_save_IFS
3745   if test -z "$ac_cv_path_EGREP"; then
3746     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3747   fi
3748 else
3749   ac_cv_path_EGREP=$EGREP
3750 fi
3751
3752    fi
3753 fi
3754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3755 $as_echo "$ac_cv_path_EGREP" >&6; }
3756  EGREP="$ac_cv_path_EGREP"
3757
3758
3759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3760 $as_echo_n "checking for ANSI C header files... " >&6; }
3761 if test "${ac_cv_header_stdc+set}" = set; then :
3762   $as_echo_n "(cached) " >&6
3763 else
3764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3765 /* end confdefs.h.  */
3766 #include <stdlib.h>
3767 #include <stdarg.h>
3768 #include <string.h>
3769 #include <float.h>
3770
3771 int
3772 main ()
3773 {
3774
3775   ;
3776   return 0;
3777 }
3778 _ACEOF
3779 if ac_fn_c_try_compile "$LINENO"; then :
3780   ac_cv_header_stdc=yes
3781 else
3782   ac_cv_header_stdc=no
3783 fi
3784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3785
3786 if test $ac_cv_header_stdc = yes; then
3787   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3789 /* end confdefs.h.  */
3790 #include <string.h>
3791
3792 _ACEOF
3793 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3794   $EGREP "memchr" >/dev/null 2>&1; then :
3795
3796 else
3797   ac_cv_header_stdc=no
3798 fi
3799 rm -f conftest*
3800
3801 fi
3802
3803 if test $ac_cv_header_stdc = yes; then
3804   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3806 /* end confdefs.h.  */
3807 #include <stdlib.h>
3808
3809 _ACEOF
3810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3811   $EGREP "free" >/dev/null 2>&1; then :
3812
3813 else
3814   ac_cv_header_stdc=no
3815 fi
3816 rm -f conftest*
3817
3818 fi
3819
3820 if test $ac_cv_header_stdc = yes; then
3821   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3822   if test "$cross_compiling" = yes; then :
3823   :
3824 else
3825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3826 /* end confdefs.h.  */
3827 #include <ctype.h>
3828 #include <stdlib.h>
3829 #if ((' ' & 0x0FF) == 0x020)
3830 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3831 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3832 #else
3833 # define ISLOWER(c) \
3834                    (('a' <= (c) && (c) <= 'i') \
3835                      || ('j' <= (c) && (c) <= 'r') \
3836                      || ('s' <= (c) && (c) <= 'z'))
3837 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3838 #endif
3839
3840 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3841 int
3842 main ()
3843 {
3844   int i;
3845   for (i = 0; i < 256; i++)
3846     if (XOR (islower (i), ISLOWER (i))
3847         || toupper (i) != TOUPPER (i))
3848       return 2;
3849   return 0;
3850 }
3851 _ACEOF
3852 if ac_fn_c_try_run "$LINENO"; then :
3853
3854 else
3855   ac_cv_header_stdc=no
3856 fi
3857 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3858   conftest.$ac_objext conftest.beam conftest.$ac_ext
3859 fi
3860
3861 fi
3862 fi
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3864 $as_echo "$ac_cv_header_stdc" >&6; }
3865 if test $ac_cv_header_stdc = yes; then
3866
3867 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
3868
3869 fi
3870
3871 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3872 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3873                   inttypes.h stdint.h unistd.h
3874 do :
3875   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3876 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3877 "
3878 eval as_val=\$$as_ac_Header
3879    if test "x$as_val" = x""yes; then :
3880   cat >>confdefs.h <<_ACEOF
3881 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3882 _ACEOF
3883
3884 fi
3885
3886 done
3887
3888
3889
3890   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3891 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
3892   MINIX=yes
3893 else
3894   MINIX=
3895 fi
3896
3897
3898   if test "$MINIX" = yes; then
3899
3900 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
3901
3902
3903 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
3904
3905
3906 $as_echo "#define _MINIX 1" >>confdefs.h
3907
3908   fi
3909
3910
3911   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3912 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3913 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3914   $as_echo_n "(cached) " >&6
3915 else
3916   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3917 /* end confdefs.h.  */
3918
3919 #         define __EXTENSIONS__ 1
3920           $ac_includes_default
3921 int
3922 main ()
3923 {
3924
3925   ;
3926   return 0;
3927 }
3928 _ACEOF
3929 if ac_fn_c_try_compile "$LINENO"; then :
3930   ac_cv_safe_to_define___extensions__=yes
3931 else
3932   ac_cv_safe_to_define___extensions__=no
3933 fi
3934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3935 fi
3936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3937 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
3938   test $ac_cv_safe_to_define___extensions__ = yes &&
3939     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
3940
3941   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
3942
3943   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
3944
3945   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
3946
3947   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
3948
3949
3950 ac_aux_dir=
3951 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3952   for ac_t in install-sh install.sh shtool; do
3953     if test -f "$ac_dir/$ac_t"; then
3954       ac_aux_dir=$ac_dir
3955       ac_install_sh="$ac_aux_dir/$ac_t -c"
3956       break 2
3957     fi
3958   done
3959 done
3960 if test -z "$ac_aux_dir"; then
3961   as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3962 fi
3963
3964 # These three variables are undocumented and unsupported,
3965 # and are intended to be withdrawn in a future Autoconf release.
3966 # They can cause serious problems if a builder's source tree is in a directory
3967 # whose full name contains unusual characters.
3968 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3969 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3970 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3971
3972
3973 # Make sure we can run config.sub.
3974 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3975   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3976
3977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3978 $as_echo_n "checking build system type... " >&6; }
3979 if test "${ac_cv_build+set}" = set; then :
3980   $as_echo_n "(cached) " >&6
3981 else
3982   ac_build_alias=$build_alias
3983 test "x$ac_build_alias" = x &&
3984   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3985 test "x$ac_build_alias" = x &&
3986   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3987 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3988   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3989
3990 fi
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3992 $as_echo "$ac_cv_build" >&6; }
3993 case $ac_cv_build in
3994 *-*-*) ;;
3995 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3996 esac
3997 build=$ac_cv_build
3998 ac_save_IFS=$IFS; IFS='-'
3999 set x $ac_cv_build
4000 shift
4001 build_cpu=$1
4002 build_vendor=$2
4003 shift; shift
4004 # Remember, the first character of IFS is used to create $*,
4005 # except with old shells:
4006 build_os=$*
4007 IFS=$ac_save_IFS
4008 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4009
4010
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4012 $as_echo_n "checking host system type... " >&6; }
4013 if test "${ac_cv_host+set}" = set; then :
4014   $as_echo_n "(cached) " >&6
4015 else
4016   if test "x$host_alias" = x; then
4017   ac_cv_host=$ac_cv_build
4018 else
4019   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4020     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4021 fi
4022
4023 fi
4024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4025 $as_echo "$ac_cv_host" >&6; }
4026 case $ac_cv_host in
4027 *-*-*) ;;
4028 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4029 esac
4030 host=$ac_cv_host
4031 ac_save_IFS=$IFS; IFS='-'
4032 set x $ac_cv_host
4033 shift
4034 host_cpu=$1
4035 host_vendor=$2
4036 shift; shift
4037 # Remember, the first character of IFS is used to create $*,
4038 # except with old shells:
4039 host_os=$*
4040 IFS=$ac_save_IFS
4041 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4042
4043
4044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4045 $as_echo_n "checking target system type... " >&6; }
4046 if test "${ac_cv_target+set}" = set; then :
4047   $as_echo_n "(cached) " >&6
4048 else
4049   if test "x$target_alias" = x; then
4050   ac_cv_target=$ac_cv_host
4051 else
4052   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4053     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4054 fi
4055
4056 fi
4057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4058 $as_echo "$ac_cv_target" >&6; }
4059 case $ac_cv_target in
4060 *-*-*) ;;
4061 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4062 esac
4063 target=$ac_cv_target
4064 ac_save_IFS=$IFS; IFS='-'
4065 set x $ac_cv_target
4066 shift
4067 target_cpu=$1
4068 target_vendor=$2
4069 shift; shift
4070 # Remember, the first character of IFS is used to create $*,
4071 # except with old shells:
4072 target_os=$*
4073 IFS=$ac_save_IFS
4074 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4075
4076
4077 # The aliases save the names the user supplied, while $host etc.
4078 # will get canonicalized.
4079 test -n "$target_alias" &&
4080   test "$program_prefix$program_suffix$program_transform_name" = \
4081     NONENONEs,x,x, &&
4082   program_prefix=${target_alias}-
4083
4084 # The tests for host and target for $enable_largefile require
4085 # canonical names.
4086
4087
4088
4089 # As the $enable_largefile decision depends on --enable-plugins we must set it
4090 # even in directories otherwise not depending on the $plugins option.
4091
4092
4093   maybe_plugins=no
4094   for ac_header in dlfcn.h
4095 do :
4096   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4097 "
4098 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4099   cat >>confdefs.h <<_ACEOF
4100 #define HAVE_DLFCN_H 1
4101 _ACEOF
4102  maybe_plugins=yes
4103 fi
4104
4105 done
4106
4107   for ac_header in windows.h
4108 do :
4109   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4110 "
4111 if test "x$ac_cv_header_windows_h" = x""yes; then :
4112   cat >>confdefs.h <<_ACEOF
4113 #define HAVE_WINDOWS_H 1
4114 _ACEOF
4115  maybe_plugins=yes
4116 fi
4117
4118 done
4119
4120
4121   # Check whether --enable-plugins was given.
4122 if test "${enable_plugins+set}" = set; then :
4123   enableval=$enable_plugins; case "${enableval}" in
4124       no) plugins=no ;;
4125       *) plugins=yes
4126          if test "$maybe_plugins" != "yes" ; then
4127            as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4128          fi ;;
4129      esac
4130 else
4131   plugins=$maybe_plugins
4132
4133 fi
4134
4135   if test "$plugins" = "yes"; then
4136     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4137 $as_echo_n "checking for library containing dlopen... " >&6; }
4138 if test "${ac_cv_search_dlopen+set}" = set; then :
4139   $as_echo_n "(cached) " >&6
4140 else
4141   ac_func_search_save_LIBS=$LIBS
4142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4143 /* end confdefs.h.  */
4144
4145 /* Override any GCC internal prototype to avoid an error.
4146    Use char because int might match the return type of a GCC
4147    builtin and then its argument prototype would still apply.  */
4148 #ifdef __cplusplus
4149 extern "C"
4150 #endif
4151 char dlopen ();
4152 int
4153 main ()
4154 {
4155 return dlopen ();
4156   ;
4157   return 0;
4158 }
4159 _ACEOF
4160 for ac_lib in '' dl; do
4161   if test -z "$ac_lib"; then
4162     ac_res="none required"
4163   else
4164     ac_res=-l$ac_lib
4165     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4166   fi
4167   if ac_fn_c_try_link "$LINENO"; then :
4168   ac_cv_search_dlopen=$ac_res
4169 fi
4170 rm -f core conftest.err conftest.$ac_objext \
4171     conftest$ac_exeext
4172   if test "${ac_cv_search_dlopen+set}" = set; then :
4173   break
4174 fi
4175 done
4176 if test "${ac_cv_search_dlopen+set}" = set; then :
4177
4178 else
4179   ac_cv_search_dlopen=no
4180 fi
4181 rm conftest.$ac_ext
4182 LIBS=$ac_func_search_save_LIBS
4183 fi
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4185 $as_echo "$ac_cv_search_dlopen" >&6; }
4186 ac_res=$ac_cv_search_dlopen
4187 if test "$ac_res" != no; then :
4188   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4189
4190 fi
4191
4192   fi
4193
4194
4195 case "${host}" in
4196   sparc-*-solaris*|i[3-7]86-*-solaris*)
4197     # On native 32bit sparc and ia32 solaris, large-file and procfs support
4198     # are mutually exclusive; and without procfs support, the bfd/ elf module
4199     # cannot provide certain routines such as elfcore_write_prpsinfo
4200     # or elfcore_write_prstatus.  So unless the user explicitly requested
4201     # large-file support through the --enable-largefile switch, disable
4202     # large-file support in favor of procfs support.
4203     test "${target}" = "${host}" -a "x$plugins" = xno \
4204       && : ${enable_largefile="no"}
4205     ;;
4206 esac
4207
4208 # Check whether --enable-largefile was given.
4209 if test "${enable_largefile+set}" = set; then :
4210   enableval=$enable_largefile;
4211 fi
4212
4213 if test "$enable_largefile" != no; then
4214
4215   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4216 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4217 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4218   $as_echo_n "(cached) " >&6
4219 else
4220   ac_cv_sys_largefile_CC=no
4221      if test "$GCC" != yes; then
4222        ac_save_CC=$CC
4223        while :; do
4224          # IRIX 6.2 and later do not support large files by default,
4225          # so use the C compiler's -n32 option if that helps.
4226          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227 /* end confdefs.h.  */
4228 #include <sys/types.h>
4229  /* Check that off_t can represent 2**63 - 1 correctly.
4230     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4231     since some C++ compilers masquerading as C compilers
4232     incorrectly reject 9223372036854775807.  */
4233 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4234   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4235                        && LARGE_OFF_T % 2147483647 == 1)
4236                       ? 1 : -1];
4237 int
4238 main ()
4239 {
4240
4241   ;
4242   return 0;
4243 }
4244 _ACEOF
4245          if ac_fn_c_try_compile "$LINENO"; then :
4246   break
4247 fi
4248 rm -f core conftest.err conftest.$ac_objext
4249          CC="$CC -n32"
4250          if ac_fn_c_try_compile "$LINENO"; then :
4251   ac_cv_sys_largefile_CC=' -n32'; break
4252 fi
4253 rm -f core conftest.err conftest.$ac_objext
4254          break
4255        done
4256        CC=$ac_save_CC
4257        rm -f conftest.$ac_ext
4258     fi
4259 fi
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4261 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4262   if test "$ac_cv_sys_largefile_CC" != no; then
4263     CC=$CC$ac_cv_sys_largefile_CC
4264   fi
4265
4266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4267 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4268 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4269   $as_echo_n "(cached) " >&6
4270 else
4271   while :; do
4272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4273 /* end confdefs.h.  */
4274 #include <sys/types.h>
4275  /* Check that off_t can represent 2**63 - 1 correctly.
4276     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4277     since some C++ compilers masquerading as C compilers
4278     incorrectly reject 9223372036854775807.  */
4279 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4280   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4281                        && LARGE_OFF_T % 2147483647 == 1)
4282                       ? 1 : -1];
4283 int
4284 main ()
4285 {
4286
4287   ;
4288   return 0;
4289 }
4290 _ACEOF
4291 if ac_fn_c_try_compile "$LINENO"; then :
4292   ac_cv_sys_file_offset_bits=no; break
4293 fi
4294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4296 /* end confdefs.h.  */
4297 #define _FILE_OFFSET_BITS 64
4298 #include <sys/types.h>
4299  /* Check that off_t can represent 2**63 - 1 correctly.
4300     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4301     since some C++ compilers masquerading as C compilers
4302     incorrectly reject 9223372036854775807.  */
4303 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4304   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4305                        && LARGE_OFF_T % 2147483647 == 1)
4306                       ? 1 : -1];
4307 int
4308 main ()
4309 {
4310
4311   ;
4312   return 0;
4313 }
4314 _ACEOF
4315 if ac_fn_c_try_compile "$LINENO"; then :
4316   ac_cv_sys_file_offset_bits=64; break
4317 fi
4318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4319   ac_cv_sys_file_offset_bits=unknown
4320   break
4321 done
4322 fi
4323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4324 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4325 case $ac_cv_sys_file_offset_bits in #(
4326   no | unknown) ;;
4327   *)
4328 cat >>confdefs.h <<_ACEOF
4329 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4330 _ACEOF
4331 ;;
4332 esac
4333 rm -rf conftest*
4334   if test $ac_cv_sys_file_offset_bits = unknown; then
4335     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4336 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4337 if test "${ac_cv_sys_large_files+set}" = set; then :
4338   $as_echo_n "(cached) " >&6
4339 else
4340   while :; do
4341   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342 /* end confdefs.h.  */
4343 #include <sys/types.h>
4344  /* Check that off_t can represent 2**63 - 1 correctly.
4345     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4346     since some C++ compilers masquerading as C compilers
4347     incorrectly reject 9223372036854775807.  */
4348 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4349   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4350                        && LARGE_OFF_T % 2147483647 == 1)
4351                       ? 1 : -1];
4352 int
4353 main ()
4354 {
4355
4356   ;
4357   return 0;
4358 }
4359 _ACEOF
4360 if ac_fn_c_try_compile "$LINENO"; then :
4361   ac_cv_sys_large_files=no; break
4362 fi
4363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365 /* end confdefs.h.  */
4366 #define _LARGE_FILES 1
4367 #include <sys/types.h>
4368  /* Check that off_t can represent 2**63 - 1 correctly.
4369     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4370     since some C++ compilers masquerading as C compilers
4371     incorrectly reject 9223372036854775807.  */
4372 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4373   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4374                        && LARGE_OFF_T % 2147483647 == 1)
4375                       ? 1 : -1];
4376 int
4377 main ()
4378 {
4379
4380   ;
4381   return 0;
4382 }
4383 _ACEOF
4384 if ac_fn_c_try_compile "$LINENO"; then :
4385   ac_cv_sys_large_files=1; break
4386 fi
4387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4388   ac_cv_sys_large_files=unknown
4389   break
4390 done
4391 fi
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4393 $as_echo "$ac_cv_sys_large_files" >&6; }
4394 case $ac_cv_sys_large_files in #(
4395   no | unknown) ;;
4396   *)
4397 cat >>confdefs.h <<_ACEOF
4398 #define _LARGE_FILES $ac_cv_sys_large_files
4399 _ACEOF
4400 ;;
4401 esac
4402 rm -rf conftest*
4403   fi
4404 fi
4405
4406
4407
4408
4409
4410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4411 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4412 if test "${am_cv_prog_cc_stdc+set}" = set; then :
4413   $as_echo_n "(cached) " >&6
4414 else
4415   am_cv_prog_cc_stdc=no
4416 ac_save_CC="$CC"
4417 # Don't try gcc -ansi; that turns off useful extensions and
4418 # breaks some systems' header files.
4419 # AIX                   -qlanglvl=ansi
4420 # Ultrix and OSF/1      -std1
4421 # HP-UX 10.20 and later -Ae
4422 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4423 # SVR4                  -Xc -D__EXTENSIONS__
4424 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4425 do
4426   CC="$ac_save_CC $ac_arg"
4427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428 /* end confdefs.h.  */
4429 #include <stdarg.h>
4430 #include <stdio.h>
4431 #include <sys/types.h>
4432 #include <sys/stat.h>
4433 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4434 struct buf { int x; };
4435 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4436 static char *e (p, i)
4437      char **p;
4438      int i;
4439 {
4440   return p[i];
4441 }
4442 static char *f (char * (*g) (char **, int), char **p, ...)
4443 {
4444   char *s;
4445   va_list v;
4446   va_start (v,p);
4447   s = g (p, va_arg (v,int));
4448   va_end (v);
4449   return s;
4450 }
4451 int test (int i, double x);
4452 struct s1 {int (*f) (int a);};
4453 struct s2 {int (*f) (double a);};
4454 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4455 int argc;
4456 char **argv;
4457
4458 int
4459 main ()
4460 {
4461
4462 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4463
4464   ;
4465   return 0;
4466 }
4467 _ACEOF
4468 if ac_fn_c_try_compile "$LINENO"; then :
4469   am_cv_prog_cc_stdc="$ac_arg"; break
4470 fi
4471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4472 done
4473 CC="$ac_save_CC"
4474
4475 fi
4476
4477 if test -z "$am_cv_prog_cc_stdc"; then
4478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4479 $as_echo "none needed" >&6; }
4480 else
4481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4482 $as_echo "$am_cv_prog_cc_stdc" >&6; }
4483 fi
4484 case "x$am_cv_prog_cc_stdc" in
4485   x|xno) ;;
4486   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4487 esac
4488
4489 # expand $ac_aux_dir to an absolute path
4490 am_aux_dir=`cd $ac_aux_dir && pwd`
4491
4492 if test x"${install_sh}" != xset; then
4493   case $am_aux_dir in
4494   *\ * | *\     *)
4495     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4496   *)
4497     install_sh="\${SHELL} $am_aux_dir/install-sh"
4498   esac
4499 fi
4500
4501 # Installed binaries are usually stripped using `strip' when the user
4502 # run `make install-strip'.  However `strip' might not be the right
4503 # tool to use in cross-compilation environments, therefore Automake
4504 # will honor the `STRIP' environment variable to overrule this program.
4505 if test "$cross_compiling" != no; then
4506   if test -n "$ac_tool_prefix"; then
4507   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4508 set dummy ${ac_tool_prefix}strip; ac_word=$2
4509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4510 $as_echo_n "checking for $ac_word... " >&6; }
4511 if test "${ac_cv_prog_STRIP+set}" = set; then :
4512   $as_echo_n "(cached) " >&6
4513 else
4514   if test -n "$STRIP"; then
4515   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4516 else
4517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518 for as_dir in $PATH
4519 do
4520   IFS=$as_save_IFS
4521   test -z "$as_dir" && as_dir=.
4522     for ac_exec_ext in '' $ac_executable_extensions; do
4523   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4524     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4526     break 2
4527   fi
4528 done
4529   done
4530 IFS=$as_save_IFS
4531
4532 fi
4533 fi
4534 STRIP=$ac_cv_prog_STRIP
4535 if test -n "$STRIP"; then
4536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4537 $as_echo "$STRIP" >&6; }
4538 else
4539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540 $as_echo "no" >&6; }
4541 fi
4542
4543
4544 fi
4545 if test -z "$ac_cv_prog_STRIP"; then
4546   ac_ct_STRIP=$STRIP
4547   # Extract the first word of "strip", so it can be a program name with args.
4548 set dummy strip; ac_word=$2
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4550 $as_echo_n "checking for $ac_word... " >&6; }
4551 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4552   $as_echo_n "(cached) " >&6
4553 else
4554   if test -n "$ac_ct_STRIP"; then
4555   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4556 else
4557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558 for as_dir in $PATH
4559 do
4560   IFS=$as_save_IFS
4561   test -z "$as_dir" && as_dir=.
4562     for ac_exec_ext in '' $ac_executable_extensions; do
4563   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4564     ac_cv_prog_ac_ct_STRIP="strip"
4565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4566     break 2
4567   fi
4568 done
4569   done
4570 IFS=$as_save_IFS
4571
4572 fi
4573 fi
4574 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4575 if test -n "$ac_ct_STRIP"; then
4576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4577 $as_echo "$ac_ct_STRIP" >&6; }
4578 else
4579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4580 $as_echo "no" >&6; }
4581 fi
4582
4583   if test "x$ac_ct_STRIP" = x; then
4584     STRIP=":"
4585   else
4586     case $cross_compiling:$ac_tool_warned in
4587 yes:)
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4589 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4590 ac_tool_warned=yes ;;
4591 esac
4592     STRIP=$ac_ct_STRIP
4593   fi
4594 else
4595   STRIP="$ac_cv_prog_STRIP"
4596 fi
4597
4598 fi
4599 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4600
4601
4602 ac_aux_dir=
4603 for ac_dir in .. "$srcdir"/..; do
4604   for ac_t in install-sh install.sh shtool; do
4605     if test -f "$ac_dir/$ac_t"; then
4606       ac_aux_dir=$ac_dir
4607       ac_install_sh="$ac_aux_dir/$ac_t -c"
4608       break 2
4609     fi
4610   done
4611 done
4612 if test -z "$ac_aux_dir"; then
4613   as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
4614 fi
4615
4616 # These three variables are undocumented and unsupported,
4617 # and are intended to be withdrawn in a future Autoconf release.
4618 # They can cause serious problems if a builder's source tree is in a directory
4619 # whose full name contains unusual characters.
4620 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4621 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4622 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4623
4624
4625
4626 test "$program_prefix" != NONE &&
4627   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4628 # Use a double $ so make ignores it.
4629 test "$program_suffix" != NONE &&
4630   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4631 # Double any \ or $.
4632 # By default was `s,x,x', remove it if useless.
4633 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4634 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4635
4636
4637 # Dependency checking.
4638 rm -rf .tst 2>/dev/null
4639 mkdir .tst 2>/dev/null
4640 if test -d .tst; then
4641   am__leading_dot=.
4642 else
4643   am__leading_dot=_
4644 fi
4645 rmdir .tst 2>/dev/null
4646
4647 DEPDIR="${am__leading_dot}deps"
4648
4649 ac_config_commands="$ac_config_commands depdir"
4650
4651
4652 depcc="$CC"   am_compiler_list=
4653
4654 am_depcomp=$ac_aux_dir/depcomp
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4656 $as_echo_n "checking dependency style of $depcc... " >&6; }
4657 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4658   $as_echo_n "(cached) " >&6
4659 else
4660   if test -f "$am_depcomp"; then
4661   # We make a subdir and do the tests there.  Otherwise we can end up
4662   # making bogus files that we don't know about and never remove.  For
4663   # instance it was reported that on HP-UX the gcc test will end up
4664   # making a dummy file named `D' -- because `-MD' means `put the output
4665   # in D'.
4666   mkdir conftest.dir
4667   # Copy depcomp to subdir because otherwise we won't find it if we're
4668   # using a relative directory.
4669   cp "$am_depcomp" conftest.dir
4670   cd conftest.dir
4671   # We will build objects and dependencies in a subdirectory because
4672   # it helps to detect inapplicable dependency modes.  For instance
4673   # both Tru64's cc and ICC support -MD to output dependencies as a
4674   # side effect of compilation, but ICC will put the dependencies in
4675   # the current directory while Tru64 will put them in the object
4676   # directory.
4677   mkdir sub
4678
4679   am_cv_CC_dependencies_compiler_type=none
4680   if test "$am_compiler_list" = ""; then
4681      am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4682   fi
4683   for depmode in $am_compiler_list; do
4684     if test $depmode = none; then break; fi
4685
4686     $as_echo "$as_me:$LINENO: trying $depmode" >&5
4687     # Setup a source with many dependencies, because some compilers
4688     # like to wrap large dependency lists on column 80 (with \), and
4689     # we should not choose a depcomp mode which is confused by this.
4690     #
4691     # We need to recreate these files for each test, as the compiler may
4692     # overwrite some of them when testing with obscure command lines.
4693     # This happens at least with the AIX C compiler.
4694     : > sub/conftest.c
4695     for i in 1 2 3 4 5 6; do
4696       echo '#include "conftst'$i'.h"' >> sub/conftest.c
4697       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4698       # Solaris 8's {/usr,}/bin/sh.
4699       touch sub/conftst$i.h
4700     done
4701     echo "include sub/conftest.Po" > confmf
4702
4703     # We check with `-c' and `-o' for the sake of the "dashmstdout"
4704     # mode.  It turns out that the SunPro C++ compiler does not properly
4705     # handle `-M -o', and we need to detect this.
4706     depcmd="depmode=$depmode \
4707        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4708        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4709        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4710     echo "| $depcmd" | sed -e 's/  */ /g' >&5
4711     if env $depcmd > conftest.err 2>&1 &&
4712        grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4713        grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4714        ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4715       # icc doesn't choke on unknown options, it will just issue warnings
4716       # or remarks (even with -Werror).  So we grep stderr for any message
4717       # that says an option was ignored or not supported.
4718       # When given -MP, icc 7.0 and 7.1 complain thusly:
4719       #   icc: Command line warning: ignoring option '-M'; no argument required
4720       # The diagnosis changed in icc 8.0:
4721       #   icc: Command line remark: option '-MP' not supported
4722       if (grep 'ignoring option' conftest.err ||
4723           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4724         am_cv_CC_dependencies_compiler_type=$depmode
4725         $as_echo "$as_me:$LINENO: success" >&5
4726         break
4727       fi
4728     fi
4729     $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
4730     sed -e 's/^/| /' < conftest.err >&5
4731   done
4732
4733   cd ..
4734   rm -rf conftest.dir
4735 else
4736   am_cv_CC_dependencies_compiler_type=none
4737 fi
4738
4739 fi
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4741 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4742 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
4743 then as_fn_error "no usable dependency style found" "$LINENO" 5
4744 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4745
4746 fi
4747
4748
4749 # Check for the 'make' the user wants to use.
4750 for ac_prog in make
4751 do
4752   # Extract the first word of "$ac_prog", so it can be a program name with args.
4753 set dummy $ac_prog; ac_word=$2
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4755 $as_echo_n "checking for $ac_word... " >&6; }
4756 if test "${ac_cv_prog_MAKE+set}" = set; then :
4757   $as_echo_n "(cached) " >&6
4758 else
4759   if test -n "$MAKE"; then
4760   ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4761 else
4762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4763 for as_dir in $PATH
4764 do
4765   IFS=$as_save_IFS
4766   test -z "$as_dir" && as_dir=.
4767     for ac_exec_ext in '' $ac_executable_extensions; do
4768   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4769     ac_cv_prog_MAKE="$ac_prog"
4770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4771     break 2
4772   fi
4773 done
4774   done
4775 IFS=$as_save_IFS
4776
4777 fi
4778 fi
4779 MAKE=$ac_cv_prog_MAKE
4780 if test -n "$MAKE"; then
4781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4782 $as_echo "$MAKE" >&6; }
4783 else
4784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4785 $as_echo "no" >&6; }
4786 fi
4787
4788
4789   test -n "$MAKE" && break
4790 done
4791
4792 MAKE_IS_GNU=
4793 case "`$MAKE --version 2>&1 | sed 1q`" in
4794   *GNU*)
4795     MAKE_IS_GNU=yes
4796     ;;
4797 esac
4798  if test "$MAKE_IS_GNU" = yes; then
4799   GMAKE_TRUE=
4800   GMAKE_FALSE='#'
4801 else
4802   GMAKE_TRUE='#'
4803   GMAKE_FALSE=
4804 fi
4805
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4807 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4808 set x ${MAKE-make}
4809 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4810 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4811   $as_echo_n "(cached) " >&6
4812 else
4813   cat >conftest.make <<\_ACEOF
4814 SHELL = /bin/sh
4815 all:
4816         @echo '@@@%%%=$(MAKE)=@@@%%%'
4817 _ACEOF
4818 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4819 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4820   *@@@%%%=?*=@@@%%%*)
4821     eval ac_cv_prog_make_${ac_make}_set=yes;;
4822   *)
4823     eval ac_cv_prog_make_${ac_make}_set=no;;
4824 esac
4825 rm -f conftest.make
4826 fi
4827 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4829 $as_echo "yes" >&6; }
4830   SET_MAKE=
4831 else
4832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833 $as_echo "no" >&6; }
4834   SET_MAKE="MAKE=${MAKE-make}"
4835 fi
4836
4837
4838 gnulib_extra_configure_args=
4839 # If large-file support is disabled, make sure gnulib does the same.
4840 if test "$enable_largefile" = no; then
4841 gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
4842 fi
4843
4844 # Configure gnulib.  We need to build gnulib under some other
4845 # directory not "gnulib", to avoid the problem of both GDB and
4846 # GDBserver wanting to build it in the same directory, when building
4847 # in the source dir.
4848
4849   in_src="gnulib"
4850   in_build="build-gnulib"
4851   in_extra_args="$gnulib_extra_configure_args"
4852
4853   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4854   # so they do not pile up.
4855   ac_sub_configure_args=
4856   ac_prev=
4857   eval "set x $ac_configure_args"
4858   shift
4859   for ac_arg
4860   do
4861     if test -n "$ac_prev"; then
4862       ac_prev=
4863       continue
4864     fi
4865     case $ac_arg in
4866     -cache-file | --cache-file | --cache-fil | --cache-fi \
4867     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4868       ac_prev=cache_file ;;
4869     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4870     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4871     | --c=*)
4872       ;;
4873     --config-cache | -C)
4874       ;;
4875     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4876       ac_prev=srcdir ;;
4877     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4878       ;;
4879     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4880       ac_prev=prefix ;;
4881     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4882       ;;
4883     --disable-option-checking)
4884       ;;
4885     *)
4886       case $ac_arg in
4887       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4888       esac
4889       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4890     esac
4891   done
4892
4893   # Always prepend --prefix to ensure using the same prefix
4894   # in subdir configurations.
4895   ac_arg="--prefix=$prefix"
4896   case $ac_arg in
4897   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4898   esac
4899   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4900
4901   # Pass --silent
4902   if test "$silent" = yes; then
4903     ac_sub_configure_args="--silent $ac_sub_configure_args"
4904   fi
4905
4906   # Always prepend --disable-option-checking to silence warnings, since
4907   # different subdirs can have different --enable and --with options.
4908   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4909
4910   ac_popdir=`pwd`
4911   ac_dir=$in_build
4912
4913   ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4914   $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4915   $as_echo "$ac_msg" >&6
4916   as_dir="$ac_dir"; as_fn_mkdir_p
4917
4918   case $srcdir in
4919   [\\/]* | ?:[\\/]* )
4920     ac_srcdir=$srcdir/$in_src ;;
4921   *) # Relative name.
4922     ac_srcdir=../$srcdir/$in_src ;;
4923   esac
4924
4925   cd "$ac_dir"
4926
4927   ac_sub_configure=$ac_srcdir/configure
4928
4929   # Make the cache file name correct relative to the subdirectory.
4930   case $cache_file in
4931   [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4932   *) # Relative name.
4933     ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4934   esac
4935
4936   if test -n "$in_extra_args"; then
4937     # Add the extra args at the end.
4938     ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
4939   fi
4940
4941   { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
4942 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4943   # The eval makes quoting arguments work.
4944   eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4945        --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4946     as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4947
4948   cd "$ac_popdir"
4949
4950
4951
4952 CONFIG_OBS=
4953 CONFIG_DEPS=
4954 CONFIG_SRCS=
4955 ENABLE_CFLAGS=
4956
4957 CONFIG_ALL=
4958 CONFIG_CLEAN=
4959 CONFIG_INSTALL=
4960 CONFIG_UNINSTALL=
4961
4962 # If we haven't got the data from the intl directory,
4963 # assume NLS is disabled.
4964 USE_NLS=no
4965 LIBINTL=
4966 LIBINTL_DEP=
4967 INCINTL=
4968 XGETTEXT=
4969 GMSGFMT=
4970 POSUB=
4971
4972 if test -f  ../intl/config.intl; then
4973   .  ../intl/config.intl
4974 fi
4975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4976 $as_echo_n "checking whether NLS is requested... " >&6; }
4977 if test x"$USE_NLS" != xyes; then
4978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4979 $as_echo "no" >&6; }
4980 else
4981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4982 $as_echo "yes" >&6; }
4983
4984 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
4985
4986
4987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4988 $as_echo_n "checking for catalogs to be installed... " >&6; }
4989   # Look for .po and .gmo files in the source directory.
4990   CATALOGS=
4991   XLINGUAS=
4992   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4993     # If there aren't any .gmo files the shell will give us the
4994     # literal string "../path/to/srcdir/po/*.gmo" which has to be
4995     # weeded out.
4996     case "$cat" in *\**)
4997       continue;;
4998     esac
4999     # The quadruple backslash is collapsed to a double backslash
5000     # by the backticks, then collapsed again by the double quotes,
5001     # leaving us with one backslash in the sed expression (right
5002     # before the dot that mustn't act as a wildcard).
5003     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5004     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5005     # The user is allowed to set LINGUAS to a list of languages to
5006     # install catalogs for.  If it's empty that means "all of them."
5007     if test "x$LINGUAS" = x; then
5008       CATALOGS="$CATALOGS $cat"
5009       XLINGUAS="$XLINGUAS $lang"
5010     else
5011       case "$LINGUAS" in *$lang*)
5012         CATALOGS="$CATALOGS $cat"
5013         XLINGUAS="$XLINGUAS $lang"
5014         ;;
5015       esac
5016     fi
5017   done
5018   LINGUAS="$XLINGUAS"
5019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5020 $as_echo "$LINGUAS" >&6; }
5021
5022
5023     DATADIRNAME=share
5024
5025   INSTOBJEXT=.mo
5026
5027   GENCAT=gencat
5028
5029   CATOBJEXT=.gmo
5030
5031 fi
5032
5033 localedir='${datadir}/locale'
5034
5035
5036 if test x"$USE_NLS" = xyes; then
5037    CONFIG_ALL="$CONFIG_ALL all-po"
5038    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5039    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5040    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
5041 fi
5042
5043 GNULIB=build-gnulib/import
5044
5045 # For Makefile dependencies.
5046 GNULIB_STDINT_H=
5047 if test x"$STDINT_H" != x; then
5048   GNULIB_STDINT_H=$GNULIB/$STDINT_H
5049 fi
5050
5051
5052 PACKAGE=gdb
5053
5054 cat >>confdefs.h <<_ACEOF
5055 #define PACKAGE "$PACKAGE"
5056 _ACEOF
5057
5058
5059
5060 # We never need to detect it in this sub-configure.
5061 # But preserve it for config.status --recheck.
5062
5063
5064
5065 MAKEINFO_EXTRA_FLAGS=""
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5067 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5068 if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5069   $as_echo_n "(cached) " >&6
5070 else
5071   echo '@clicksequence{a @click{} b}' >conftest.texinfo
5072   if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5073     gdb_cv_have_makeinfo_click=yes
5074   else
5075     gdb_cv_have_makeinfo_click=no
5076   fi
5077 fi
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5079 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5080 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5081   MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5082 fi
5083
5084
5085
5086
5087 # Check whether --with-separate-debug-dir was given.
5088 if test "${with_separate_debug_dir+set}" = set; then :
5089   withval=$with_separate_debug_dir;
5090     DEBUGDIR=$withval
5091 else
5092   DEBUGDIR=${libdir}/debug
5093 fi
5094
5095
5096   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5097   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5098   ac_define_dir=`eval echo $DEBUGDIR`
5099   ac_define_dir=`eval echo $ac_define_dir`
5100
5101 cat >>confdefs.h <<_ACEOF
5102 #define DEBUGDIR "$ac_define_dir"
5103 _ACEOF
5104
5105
5106
5107
5108   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5109      if test "x$prefix" = xNONE; then
5110         test_prefix=/usr/local
5111      else
5112         test_prefix=$prefix
5113      fi
5114   else
5115      test_prefix=$exec_prefix
5116   fi
5117   value=0
5118   case ${ac_define_dir} in
5119      "${test_prefix}"|"${test_prefix}/"*|\
5120         '${exec_prefix}'|'${exec_prefix}/'*)
5121      value=1
5122      ;;
5123   esac
5124
5125 cat >>confdefs.h <<_ACEOF
5126 #define DEBUGDIR_RELOCATABLE $value
5127 _ACEOF
5128
5129
5130
5131
5132 # We can't pass paths as command line arguments.
5133 # Mingw32 tries to be clever and will convert the paths for us.
5134 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
5135 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5136 # This breaks GDB's relocatable path conversions since paths passed in
5137 # config.h would not get so translated, the path prefixes no longer match.
5138
5139   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5140   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5141   ac_define_dir=`eval echo $bindir`
5142   ac_define_dir=`eval echo $ac_define_dir`
5143
5144 cat >>confdefs.h <<_ACEOF
5145 #define BINDIR "$ac_define_dir"
5146 _ACEOF
5147
5148
5149
5150 # GDB's datadir relocation
5151
5152
5153
5154 # Check whether --with-gdb-datadir was given.
5155 if test "${with_gdb_datadir+set}" = set; then :
5156   withval=$with_gdb_datadir;
5157     GDB_DATADIR=$withval
5158 else
5159   GDB_DATADIR=${datadir}/gdb
5160 fi
5161
5162
5163   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5164   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5165   ac_define_dir=`eval echo $GDB_DATADIR`
5166   ac_define_dir=`eval echo $ac_define_dir`
5167
5168 cat >>confdefs.h <<_ACEOF
5169 #define GDB_DATADIR "$ac_define_dir"
5170 _ACEOF
5171
5172
5173
5174
5175   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5176      if test "x$prefix" = xNONE; then
5177         test_prefix=/usr/local
5178      else
5179         test_prefix=$prefix
5180      fi
5181   else
5182      test_prefix=$exec_prefix
5183   fi
5184   value=0
5185   case ${ac_define_dir} in
5186      "${test_prefix}"|"${test_prefix}/"*|\
5187         '${exec_prefix}'|'${exec_prefix}/'*)
5188      value=1
5189      ;;
5190   esac
5191
5192 cat >>confdefs.h <<_ACEOF
5193 #define GDB_DATADIR_RELOCATABLE $value
5194 _ACEOF
5195
5196
5197
5198
5199
5200 # Check whether --with-relocated-sources was given.
5201 if test "${with_relocated_sources+set}" = set; then :
5202   withval=$with_relocated_sources; reloc_srcdir="${withval}"
5203
5204   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5205   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5206   ac_define_dir=`eval echo $reloc_srcdir`
5207   ac_define_dir=`eval echo $ac_define_dir`
5208
5209 cat >>confdefs.h <<_ACEOF
5210 #define RELOC_SRCDIR "$ac_define_dir"
5211 _ACEOF
5212
5213
5214
5215 fi
5216
5217
5218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5219 $as_echo_n "checking for default auto-load directory... " >&6; }
5220
5221 # Check whether --with-auto-load-dir was given.
5222 if test "${with_auto_load_dir+set}" = set; then :
5223   withval=$with_auto_load_dir;
5224 else
5225   with_auto_load_dir='$debugdir:$datadir/auto-load'
5226 fi
5227
5228 escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
5229
5230   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5231   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5232   ac_define_dir=`eval echo $escape_dir`
5233   ac_define_dir=`eval echo $ac_define_dir`
5234
5235 cat >>confdefs.h <<_ACEOF
5236 #define AUTO_LOAD_DIR "$ac_define_dir"
5237 _ACEOF
5238
5239
5240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5241 $as_echo "$with_auto_load_dir" >&6; }
5242
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5244 $as_echo_n "checking for default auto-load safe-path... " >&6; }
5245
5246 # Check whether --with-auto-load-safe-path was given.
5247 if test "${with_auto_load_safe_path+set}" = set; then :
5248   withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
5249      with_auto_load_safe_path="/"
5250      fi
5251 else
5252   with_auto_load_safe_path="$with_auto_load_dir"
5253 fi
5254
5255 escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
5256
5257   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5258   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5259   ac_define_dir=`eval echo $escape_dir`
5260   ac_define_dir=`eval echo $ac_define_dir`
5261
5262 cat >>confdefs.h <<_ACEOF
5263 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
5264 _ACEOF
5265
5266
5267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5268 $as_echo "$with_auto_load_safe_path" >&6; }
5269
5270
5271
5272 subdirs="$subdirs testsuite"
5273
5274
5275 # Check whether to support alternative target configurations
5276 # Check whether --enable-targets was given.
5277 if test "${enable_targets+set}" = set; then :
5278   enableval=$enable_targets; case "${enableval}" in
5279   yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
5280             ;;
5281   no)       enable_targets= ;;
5282   *)        enable_targets=$enableval ;;
5283 esac
5284 fi
5285
5286
5287 # Check whether to enable 64-bit support on 32-bit hosts
5288 # Check whether --enable-64-bit-bfd was given.
5289 if test "${enable_64_bit_bfd+set}" = set; then :
5290   enableval=$enable_64_bit_bfd; case "${enableval}" in
5291   yes)  want64=true  ;;
5292   no)   want64=false ;;
5293   *)    as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
5294 esac
5295 else
5296   want64=false
5297 fi
5298
5299 # Provide defaults for some variables set by the per-host and per-target
5300 # configuration.
5301 gdb_host_obs=posix-hdep.o
5302
5303 if test "${target}" = "${host}"; then
5304   gdb_native=yes
5305 else
5306   gdb_native=no
5307 fi
5308
5309 . $srcdir/configure.host
5310
5311 # Add in the common host objects.
5312 . $srcdir/common/common.host
5313 gdb_host_obs="$gdb_host_obs $common_host_obs"
5314
5315 # Accumulate some settings from configure.tgt over all enabled targets
5316
5317 TARGET_OBS=
5318 all_targets=
5319 HAVE_NATIVE_GCORE_TARGET=
5320
5321 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
5322 do
5323   if test "$targ_alias" = "all"; then
5324     all_targets=true
5325   else
5326     # Canonicalize the secondary target names.
5327     result=`$ac_config_sub $targ_alias 2>/dev/null`
5328     if test -n "$result"; then
5329         targ=$result
5330     else
5331         targ=$targ_alias
5332     fi
5333
5334     . ${srcdir}/configure.tgt
5335
5336     if test -z "${gdb_target_obs}"; then :
5337   as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5338 fi
5339
5340     # Target-specific object files
5341     for i in ${gdb_target_obs}; do
5342         case " $TARGET_OBS " in
5343         *" ${i} "*) ;;
5344         *)
5345           TARGET_OBS="$TARGET_OBS ${i}"
5346           ;;
5347         esac
5348     done
5349
5350     # Check whether this target needs 64-bit CORE_ADDR
5351     if test x${want64} = xfalse; then
5352       . ${srcdir}/../bfd/config.bfd
5353     fi
5354
5355     # Check whether this target is native and supports gcore.
5356     if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5357        && $gdb_have_gcore; then
5358       HAVE_NATIVE_GCORE_TARGET=1
5359     fi
5360   fi
5361 done
5362
5363 if test x${all_targets} = xtrue; then
5364
5365   # We want all 64-bit targets if we either:
5366   #  - run on a 64-bit host  or
5367   #  - already require 64-bit support for some other target  or
5368   #  - the --enable-64-bit-bfd option was supplied
5369   # Otherwise we only support all 32-bit targets.
5370   #
5371   # NOTE: This test must be in sync with the corresponding
5372   #       tests in BFD!
5373
5374   if test x${want64} = xfalse; then
5375     # The cast to long int works around a bug in the HP C Compiler
5376 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5377 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5378 # This bug is HP SR number 8606223364.
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5380 $as_echo_n "checking size of long... " >&6; }
5381 if test "${ac_cv_sizeof_long+set}" = set; then :
5382   $as_echo_n "(cached) " >&6
5383 else
5384   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
5385
5386 else
5387   if test "$ac_cv_type_long" = yes; then
5388      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5389 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5390 { as_fn_set_status 77
5391 as_fn_error "cannot compute sizeof (long)
5392 See \`config.log' for more details." "$LINENO" 5; }; }
5393    else
5394      ac_cv_sizeof_long=0
5395    fi
5396 fi
5397
5398 fi
5399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5400 $as_echo "$ac_cv_sizeof_long" >&6; }
5401
5402
5403
5404 cat >>confdefs.h <<_ACEOF
5405 #define SIZEOF_LONG $ac_cv_sizeof_long
5406 _ACEOF
5407
5408
5409     if test "x${ac_cv_sizeof_long}" = "x8"; then
5410       want64=true
5411     fi
5412   fi
5413   if test x${want64} = xtrue; then
5414     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5415   else
5416     TARGET_OBS='$(ALL_TARGET_OBS)'
5417   fi
5418 fi
5419
5420
5421
5422
5423 # For other settings, only the main target counts.
5424 gdb_sim=
5425 gdb_osabi=
5426 build_gdbserver=
5427 targ=$target; . ${srcdir}/configure.tgt
5428
5429 # Fetch the default architecture and default target vector from BFD.
5430 targ=$target; . $srcdir/../bfd/config.bfd
5431
5432 # We only want the first architecture, so strip off the others if
5433 # there is more than one.
5434 targ_archs=`echo $targ_archs | sed 's/ .*//'`
5435
5436 if test "x$targ_archs" != x; then
5437
5438 cat >>confdefs.h <<_ACEOF
5439 #define DEFAULT_BFD_ARCH $targ_archs
5440 _ACEOF
5441
5442 fi
5443 if test "x$targ_defvec" != x; then
5444
5445 cat >>confdefs.h <<_ACEOF
5446 #define DEFAULT_BFD_VEC $targ_defvec
5447 _ACEOF
5448
5449 fi
5450
5451 # The CLI cannot be disabled yet, but may be in the future.
5452
5453 # Enable CLI.
5454 # Check whether --enable-gdbcli was given.
5455 if test "${enable_gdbcli+set}" = set; then :
5456   enableval=$enable_gdbcli; case $enableval in
5457     yes)
5458       ;;
5459     no)
5460       as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
5461     *)
5462       as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
5463   esac
5464 else
5465   enable_gdbcli=yes
5466 fi
5467
5468 if test x"$enable_gdbcli" = xyes; then
5469   if test -d $srcdir/cli; then
5470     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5471     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5472     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5473     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5474   fi
5475 fi
5476
5477 # Enable MI.
5478 # Check whether --enable-gdbmi was given.
5479 if test "${enable_gdbmi+set}" = set; then :
5480   enableval=$enable_gdbmi; case $enableval in
5481     yes | no)
5482       ;;
5483     *)
5484       as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
5485   esac
5486 else
5487   enable_gdbmi=yes
5488 fi
5489
5490 if test x"$enable_gdbmi" = xyes; then
5491   if test -d $srcdir/mi; then
5492     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5493     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5494     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5495     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5496   fi
5497 fi
5498
5499 # Enable TUI.
5500 # Check whether --enable-tui was given.
5501 if test "${enable_tui+set}" = set; then :
5502   enableval=$enable_tui; case $enableval in
5503     yes | no | auto)
5504       ;;
5505     *)
5506       as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
5507   esac
5508 else
5509   enable_tui=auto
5510 fi
5511
5512
5513 # Enable gdbtk.
5514 # Check whether --enable-gdbtk was given.
5515 if test "${enable_gdbtk+set}" = set; then :
5516   enableval=$enable_gdbtk; case $enableval in
5517     yes | no)
5518       ;;
5519     *)
5520       as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
5521   esac
5522 else
5523   if test -d $srcdir/gdbtk; then
5524     enable_gdbtk=yes
5525   else
5526     enable_gdbtk=no
5527   fi
5528 fi
5529
5530 # We unconditionally disable gdbtk tests on selected platforms.
5531 case $host_os in
5532   go32* | windows*)
5533     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5534 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
5535     enable_gdbtk=no ;;
5536 esac
5537
5538 # Libunwind support for ia64.
5539
5540
5541 # Check whether --with-libunwind-ia64 was given.
5542 if test "${with_libunwind_ia64+set}" = set; then :
5543   withval=$with_libunwind_ia64;
5544 else
5545   with_libunwind_ia64=auto
5546 fi
5547
5548
5549 # Backward compatibility option.
5550 if test "${with_libunwind+set}" = set; then
5551   if test x"$with_libunwind_ia64" != xauto; then
5552     as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5553   fi
5554   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5555 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5556   with_libunwind_ia64="$with_libunwind"
5557 fi
5558
5559 case "$with_libunwind_ia64" in
5560   yes | no)
5561     ;;
5562   auto)
5563     for ac_header in libunwind-ia64.h
5564 do :
5565   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5566 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
5567   cat >>confdefs.h <<_ACEOF
5568 #define HAVE_LIBUNWIND_IA64_H 1
5569 _ACEOF
5570
5571 fi
5572
5573 done
5574
5575     with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5576     ;;
5577   *)
5578     as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5579     ;;
5580 esac
5581
5582 if test x"$with_libunwind_ia64" = xyes; then
5583   for ac_header in libunwind-ia64.h
5584 do :
5585   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5586 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
5587   cat >>confdefs.h <<_ACEOF
5588 #define HAVE_LIBUNWIND_IA64_H 1
5589 _ACEOF
5590
5591 fi
5592
5593 done
5594
5595   if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5596     as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5597   fi
5598   CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5599   CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5600   CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
5601 fi
5602
5603 opt_curses=no
5604
5605 # Check whether --with-curses was given.
5606 if test "${with_curses+set}" = set; then :
5607   withval=$with_curses; opt_curses=$withval
5608 fi
5609
5610
5611 prefer_curses=no
5612 if test "$opt_curses" = "yes"; then
5613   prefer_curses=yes
5614 fi
5615
5616 # Profiling support.
5617 # Check whether --enable-profiling was given.
5618 if test "${enable_profiling+set}" = set; then :
5619   enableval=$enable_profiling; case $enableval in
5620     yes | no)
5621       ;;
5622     *)
5623       as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
5624   esac
5625 else
5626   enable_profiling=no
5627 fi
5628
5629
5630 for ac_func in monstartup _mcleanup
5631 do :
5632   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5633 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5634 eval as_val=\$$as_ac_var
5635    if test "x$as_val" = x""yes; then :
5636   cat >>confdefs.h <<_ACEOF
5637 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5638 _ACEOF
5639
5640 fi
5641 done
5642
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5644 $as_echo_n "checking for _etext... " >&6; }
5645 if test "${ac_cv_var__etext+set}" = set; then :
5646   $as_echo_n "(cached) " >&6
5647 else
5648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5649 /* end confdefs.h.  */
5650 #include <stdlib.h>
5651 extern char _etext;
5652
5653 int
5654 main ()
5655 {
5656 free (&_etext);
5657   ;
5658   return 0;
5659 }
5660 _ACEOF
5661 if ac_fn_c_try_link "$LINENO"; then :
5662   ac_cv_var__etext=yes
5663 else
5664   ac_cv_var__etext=no
5665 fi
5666 rm -f core conftest.err conftest.$ac_objext \
5667     conftest$ac_exeext conftest.$ac_ext
5668 fi
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5670 $as_echo "$ac_cv_var__etext" >&6; }
5671 if test $ac_cv_var__etext = yes; then
5672
5673 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
5674
5675 fi
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5677 $as_echo_n "checking for etext... " >&6; }
5678 if test "${ac_cv_var_etext+set}" = set; then :
5679   $as_echo_n "(cached) " >&6
5680 else
5681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5682 /* end confdefs.h.  */
5683 #include <stdlib.h>
5684 extern char etext;
5685
5686 int
5687 main ()
5688 {
5689 free (&etext);
5690   ;
5691   return 0;
5692 }
5693 _ACEOF
5694 if ac_fn_c_try_link "$LINENO"; then :
5695   ac_cv_var_etext=yes
5696 else
5697   ac_cv_var_etext=no
5698 fi
5699 rm -f core conftest.err conftest.$ac_objext \
5700     conftest$ac_exeext conftest.$ac_ext
5701 fi
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5703 $as_echo "$ac_cv_var_etext" >&6; }
5704 if test $ac_cv_var_etext = yes; then
5705
5706 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
5707
5708 fi
5709 if test "$enable_profiling" = yes ; then
5710   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
5711     as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
5712   fi
5713   PROFILE_CFLAGS=-pg
5714   OLD_CFLAGS="$CFLAGS"
5715   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
5716
5717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5718 $as_echo_n "checking whether $CC supports -pg... " >&6; }
5719 if test "${ac_cv_cc_supports_pg+set}" = set; then :
5720   $as_echo_n "(cached) " >&6
5721 else
5722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5723 /* end confdefs.h.  */
5724
5725 int
5726 main ()
5727 {
5728 int x;
5729   ;
5730   return 0;
5731 }
5732 _ACEOF
5733 if ac_fn_c_try_compile "$LINENO"; then :
5734   ac_cv_cc_supports_pg=yes
5735 else
5736   ac_cv_cc_supports_pg=no
5737 fi
5738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5739 fi
5740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5741 $as_echo "$ac_cv_cc_supports_pg" >&6; }
5742
5743   if test $ac_cv_cc_supports_pg = no; then
5744     as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
5745   fi
5746
5747   CFLAGS="$OLD_CFLAGS"
5748 fi
5749
5750
5751
5752 # Check whether --with-pkgversion was given.
5753 if test "${with_pkgversion+set}" = set; then :
5754   withval=$with_pkgversion; case "$withval" in
5755       yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
5756       no)  PKGVERSION= ;;
5757       *)   PKGVERSION="($withval) " ;;
5758      esac
5759 else
5760   PKGVERSION="(GDB) "
5761
5762 fi
5763
5764
5765
5766
5767
5768 # Check whether --with-bugurl was given.
5769 if test "${with_bugurl+set}" = set; then :
5770   withval=$with_bugurl; case "$withval" in
5771       yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
5772       no)  BUGURL=
5773            ;;
5774       *)   BUGURL="$withval"
5775            ;;
5776      esac
5777 else
5778   BUGURL="http://www.gnu.org/software/gdb/bugs/"
5779
5780 fi
5781
5782   case ${BUGURL} in
5783   "")
5784     REPORT_BUGS_TO=
5785     REPORT_BUGS_TEXI=
5786     ;;
5787   *)
5788     REPORT_BUGS_TO="<$BUGURL>"
5789     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5790     ;;
5791   esac;
5792
5793
5794
5795
5796 cat >>confdefs.h <<_ACEOF
5797 #define PKGVERSION "$PKGVERSION"
5798 _ACEOF
5799
5800
5801 cat >>confdefs.h <<_ACEOF
5802 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5803 _ACEOF
5804
5805
5806 # --------------------- #
5807 # Checks for programs.  #
5808 # --------------------- #
5809
5810 for ac_prog in gawk mawk nawk awk
5811 do
5812   # Extract the first word of "$ac_prog", so it can be a program name with args.
5813 set dummy $ac_prog; ac_word=$2
5814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5815 $as_echo_n "checking for $ac_word... " >&6; }
5816 if test "${ac_cv_prog_AWK+set}" = set; then :
5817   $as_echo_n "(cached) " >&6
5818 else
5819   if test -n "$AWK"; then
5820   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5821 else
5822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5823 for as_dir in $PATH
5824 do
5825   IFS=$as_save_IFS
5826   test -z "$as_dir" && as_dir=.
5827     for ac_exec_ext in '' $ac_executable_extensions; do
5828   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5829     ac_cv_prog_AWK="$ac_prog"
5830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5831     break 2
5832   fi
5833 done
5834   done
5835 IFS=$as_save_IFS
5836
5837 fi
5838 fi
5839 AWK=$ac_cv_prog_AWK
5840 if test -n "$AWK"; then
5841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5842 $as_echo "$AWK" >&6; }
5843 else
5844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5845 $as_echo "no" >&6; }
5846 fi
5847
5848
5849   test -n "$AWK" && break
5850 done
5851
5852 # Find a good install program.  We prefer a C program (faster),
5853 # so one script is as good as another.  But avoid the broken or
5854 # incompatible versions:
5855 # SysV /etc/install, /usr/sbin/install
5856 # SunOS /usr/etc/install
5857 # IRIX /sbin/install
5858 # AIX /bin/install
5859 # AmigaOS /C/install, which installs bootblocks on floppy discs
5860 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5861 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
5862 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5863 # OS/2's system install, which has a completely different semantic
5864 # ./install, which can be erroneously created by make from ./install.sh.
5865 # Reject install programs that cannot install multiple files.
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5867 $as_echo_n "checking for a BSD-compatible install... " >&6; }
5868 if test -z "$INSTALL"; then
5869 if test "${ac_cv_path_install+set}" = set; then :
5870   $as_echo_n "(cached) " >&6
5871 else
5872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5873 for as_dir in $PATH
5874 do
5875   IFS=$as_save_IFS
5876   test -z "$as_dir" && as_dir=.
5877     # Account for people who put trailing slashes in PATH elements.
5878 case $as_dir/ in #((
5879   ./ | .// | /[cC]/* | \
5880   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5881   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5882   /usr/ucb/* ) ;;
5883   *)
5884     # OSF1 and SCO ODT 3.0 have their own names for install.
5885     # Don't use installbsd from OSF since it installs stuff as root
5886     # by default.
5887     for ac_prog in ginstall scoinst install; do
5888       for ac_exec_ext in '' $ac_executable_extensions; do
5889         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5890           if test $ac_prog = install &&
5891             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5892             # AIX install.  It has an incompatible calling convention.
5893             :
5894           elif test $ac_prog = install &&
5895             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5896             # program-specific install script used by HP pwplus--don't use.
5897             :
5898           else
5899             rm -rf conftest.one conftest.two conftest.dir
5900             echo one > conftest.one
5901             echo two > conftest.two
5902             mkdir conftest.dir
5903             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5904               test -s conftest.one && test -s conftest.two &&
5905               test -s conftest.dir/conftest.one &&
5906               test -s conftest.dir/conftest.two
5907             then
5908               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5909               break 3
5910             fi
5911           fi
5912         fi
5913       done
5914     done
5915     ;;
5916 esac
5917
5918   done
5919 IFS=$as_save_IFS
5920
5921 rm -rf conftest.one conftest.two conftest.dir
5922
5923 fi
5924   if test "${ac_cv_path_install+set}" = set; then
5925     INSTALL=$ac_cv_path_install
5926   else
5927     # As a last resort, use the slow shell script.  Don't cache a
5928     # value for INSTALL within a source directory, because that will
5929     # break other packages using the cache if that directory is
5930     # removed, or if the value is a relative name.
5931     INSTALL=$ac_install_sh
5932   fi
5933 fi
5934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5935 $as_echo "$INSTALL" >&6; }
5936
5937 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5938 # It thinks the first close brace ends the variable substitution.
5939 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5940
5941 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5942
5943 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5944
5945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5946 $as_echo_n "checking whether ln -s works... " >&6; }
5947 LN_S=$as_ln_s
5948 if test "$LN_S" = "ln -s"; then
5949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5950 $as_echo "yes" >&6; }
5951 else
5952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5953 $as_echo "no, using $LN_S" >&6; }
5954 fi
5955
5956 if test -n "$ac_tool_prefix"; then
5957   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5958 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5960 $as_echo_n "checking for $ac_word... " >&6; }
5961 if test "${ac_cv_prog_RANLIB+set}" = set; then :
5962   $as_echo_n "(cached) " >&6
5963 else
5964   if test -n "$RANLIB"; then
5965   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5966 else
5967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5968 for as_dir in $PATH
5969 do
5970   IFS=$as_save_IFS
5971   test -z "$as_dir" && as_dir=.
5972     for ac_exec_ext in '' $ac_executable_extensions; do
5973   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5974     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5975     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5976     break 2
5977   fi
5978 done
5979   done
5980 IFS=$as_save_IFS
5981
5982 fi
5983 fi
5984 RANLIB=$ac_cv_prog_RANLIB
5985 if test -n "$RANLIB"; then
5986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5987 $as_echo "$RANLIB" >&6; }
5988 else
5989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5990 $as_echo "no" >&6; }
5991 fi
5992
5993
5994 fi
5995 if test -z "$ac_cv_prog_RANLIB"; then
5996   ac_ct_RANLIB=$RANLIB
5997   # Extract the first word of "ranlib", so it can be a program name with args.
5998 set dummy ranlib; ac_word=$2
5999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6000 $as_echo_n "checking for $ac_word... " >&6; }
6001 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6002   $as_echo_n "(cached) " >&6
6003 else
6004   if test -n "$ac_ct_RANLIB"; then
6005   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6006 else
6007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008 for as_dir in $PATH
6009 do
6010   IFS=$as_save_IFS
6011   test -z "$as_dir" && as_dir=.
6012     for ac_exec_ext in '' $ac_executable_extensions; do
6013   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6014     ac_cv_prog_ac_ct_RANLIB="ranlib"
6015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6016     break 2
6017   fi
6018 done
6019   done
6020 IFS=$as_save_IFS
6021
6022 fi
6023 fi
6024 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6025 if test -n "$ac_ct_RANLIB"; then
6026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6027 $as_echo "$ac_ct_RANLIB" >&6; }
6028 else
6029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030 $as_echo "no" >&6; }
6031 fi
6032
6033   if test "x$ac_ct_RANLIB" = x; then
6034     RANLIB=":"
6035   else
6036     case $cross_compiling:$ac_tool_warned in
6037 yes:)
6038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6039 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6040 ac_tool_warned=yes ;;
6041 esac
6042     RANLIB=$ac_ct_RANLIB
6043   fi
6044 else
6045   RANLIB="$ac_cv_prog_RANLIB"
6046 fi
6047
6048 for ac_prog in 'bison -y' byacc
6049 do
6050   # Extract the first word of "$ac_prog", so it can be a program name with args.
6051 set dummy $ac_prog; ac_word=$2
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053 $as_echo_n "checking for $ac_word... " >&6; }
6054 if test "${ac_cv_prog_YACC+set}" = set; then :
6055   $as_echo_n "(cached) " >&6
6056 else
6057   if test -n "$YACC"; then
6058   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6059 else
6060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061 for as_dir in $PATH
6062 do
6063   IFS=$as_save_IFS
6064   test -z "$as_dir" && as_dir=.
6065     for ac_exec_ext in '' $ac_executable_extensions; do
6066   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6067     ac_cv_prog_YACC="$ac_prog"
6068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6069     break 2
6070   fi
6071 done
6072   done
6073 IFS=$as_save_IFS
6074
6075 fi
6076 fi
6077 YACC=$ac_cv_prog_YACC
6078 if test -n "$YACC"; then
6079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6080 $as_echo "$YACC" >&6; }
6081 else
6082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083 $as_echo "no" >&6; }
6084 fi
6085
6086
6087   test -n "$YACC" && break
6088 done
6089 test -n "$YACC" || YACC="yacc"
6090
6091
6092 if test -n "$ac_tool_prefix"; then
6093   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6094 set dummy ${ac_tool_prefix}ar; ac_word=$2
6095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6096 $as_echo_n "checking for $ac_word... " >&6; }
6097 if test "${ac_cv_prog_AR+set}" = set; then :
6098   $as_echo_n "(cached) " >&6
6099 else
6100   if test -n "$AR"; then
6101   ac_cv_prog_AR="$AR" # Let the user override the test.
6102 else
6103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6104 for as_dir in $PATH
6105 do
6106   IFS=$as_save_IFS
6107   test -z "$as_dir" && as_dir=.
6108     for ac_exec_ext in '' $ac_executable_extensions; do
6109   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6110     ac_cv_prog_AR="${ac_tool_prefix}ar"
6111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6112     break 2
6113   fi
6114 done
6115   done
6116 IFS=$as_save_IFS
6117
6118 fi
6119 fi
6120 AR=$ac_cv_prog_AR
6121 if test -n "$AR"; then
6122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6123 $as_echo "$AR" >&6; }
6124 else
6125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6126 $as_echo "no" >&6; }
6127 fi
6128
6129
6130 fi
6131 if test -z "$ac_cv_prog_AR"; then
6132   ac_ct_AR=$AR
6133   # Extract the first word of "ar", so it can be a program name with args.
6134 set dummy ar; ac_word=$2
6135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6136 $as_echo_n "checking for $ac_word... " >&6; }
6137 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6138   $as_echo_n "(cached) " >&6
6139 else
6140   if test -n "$ac_ct_AR"; then
6141   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6142 else
6143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6144 for as_dir in $PATH
6145 do
6146   IFS=$as_save_IFS
6147   test -z "$as_dir" && as_dir=.
6148     for ac_exec_ext in '' $ac_executable_extensions; do
6149   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6150     ac_cv_prog_ac_ct_AR="ar"
6151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6152     break 2
6153   fi
6154 done
6155   done
6156 IFS=$as_save_IFS
6157
6158 fi
6159 fi
6160 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6161 if test -n "$ac_ct_AR"; then
6162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6163 $as_echo "$ac_ct_AR" >&6; }
6164 else
6165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6166 $as_echo "no" >&6; }
6167 fi
6168
6169   if test "x$ac_ct_AR" = x; then
6170     AR=""
6171   else
6172     case $cross_compiling:$ac_tool_warned in
6173 yes:)
6174 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6175 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6176 ac_tool_warned=yes ;;
6177 esac
6178     AR=$ac_ct_AR
6179   fi
6180 else
6181   AR="$ac_cv_prog_AR"
6182 fi
6183
6184 if test -n "$ac_tool_prefix"; then
6185   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6186 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188 $as_echo_n "checking for $ac_word... " >&6; }
6189 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6190   $as_echo_n "(cached) " >&6
6191 else
6192   if test -n "$DLLTOOL"; then
6193   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6194 else
6195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6196 for as_dir in $PATH
6197 do
6198   IFS=$as_save_IFS
6199   test -z "$as_dir" && as_dir=.
6200     for ac_exec_ext in '' $ac_executable_extensions; do
6201   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6202     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6204     break 2
6205   fi
6206 done
6207   done
6208 IFS=$as_save_IFS
6209
6210 fi
6211 fi
6212 DLLTOOL=$ac_cv_prog_DLLTOOL
6213 if test -n "$DLLTOOL"; then
6214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6215 $as_echo "$DLLTOOL" >&6; }
6216 else
6217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6218 $as_echo "no" >&6; }
6219 fi
6220
6221
6222 fi
6223 if test -z "$ac_cv_prog_DLLTOOL"; then
6224   ac_ct_DLLTOOL=$DLLTOOL
6225   # Extract the first word of "dlltool", so it can be a program name with args.
6226 set dummy dlltool; ac_word=$2
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6228 $as_echo_n "checking for $ac_word... " >&6; }
6229 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6230   $as_echo_n "(cached) " >&6
6231 else
6232   if test -n "$ac_ct_DLLTOOL"; then
6233   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6234 else
6235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6236 for as_dir in $PATH
6237 do
6238   IFS=$as_save_IFS
6239   test -z "$as_dir" && as_dir=.
6240     for ac_exec_ext in '' $ac_executable_extensions; do
6241   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6242     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6244     break 2
6245   fi
6246 done
6247   done
6248 IFS=$as_save_IFS
6249
6250 fi
6251 fi
6252 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6253 if test -n "$ac_ct_DLLTOOL"; then
6254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6255 $as_echo "$ac_ct_DLLTOOL" >&6; }
6256 else
6257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6258 $as_echo "no" >&6; }
6259 fi
6260
6261   if test "x$ac_ct_DLLTOOL" = x; then
6262     DLLTOOL=""
6263   else
6264     case $cross_compiling:$ac_tool_warned in
6265 yes:)
6266 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6267 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6268 ac_tool_warned=yes ;;
6269 esac
6270     DLLTOOL=$ac_ct_DLLTOOL
6271   fi
6272 else
6273   DLLTOOL="$ac_cv_prog_DLLTOOL"
6274 fi
6275
6276 if test -n "$ac_tool_prefix"; then
6277   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6278 set dummy ${ac_tool_prefix}windres; ac_word=$2
6279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6280 $as_echo_n "checking for $ac_word... " >&6; }
6281 if test "${ac_cv_prog_WINDRES+set}" = set; then :
6282   $as_echo_n "(cached) " >&6
6283 else
6284   if test -n "$WINDRES"; then
6285   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6286 else
6287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6288 for as_dir in $PATH
6289 do
6290   IFS=$as_save_IFS
6291   test -z "$as_dir" && as_dir=.
6292     for ac_exec_ext in '' $ac_executable_extensions; do
6293   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6294     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6296     break 2
6297   fi
6298 done
6299   done
6300 IFS=$as_save_IFS
6301
6302 fi
6303 fi
6304 WINDRES=$ac_cv_prog_WINDRES
6305 if test -n "$WINDRES"; then
6306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6307 $as_echo "$WINDRES" >&6; }
6308 else
6309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6310 $as_echo "no" >&6; }
6311 fi
6312
6313
6314 fi
6315 if test -z "$ac_cv_prog_WINDRES"; then
6316   ac_ct_WINDRES=$WINDRES
6317   # Extract the first word of "windres", so it can be a program name with args.
6318 set dummy windres; ac_word=$2
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6320 $as_echo_n "checking for $ac_word... " >&6; }
6321 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6322   $as_echo_n "(cached) " >&6
6323 else
6324   if test -n "$ac_ct_WINDRES"; then
6325   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6326 else
6327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6328 for as_dir in $PATH
6329 do
6330   IFS=$as_save_IFS
6331   test -z "$as_dir" && as_dir=.
6332     for ac_exec_ext in '' $ac_executable_extensions; do
6333   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6334     ac_cv_prog_ac_ct_WINDRES="windres"
6335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6336     break 2
6337   fi
6338 done
6339   done
6340 IFS=$as_save_IFS
6341
6342 fi
6343 fi
6344 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6345 if test -n "$ac_ct_WINDRES"; then
6346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6347 $as_echo "$ac_ct_WINDRES" >&6; }
6348 else
6349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6350 $as_echo "no" >&6; }
6351 fi
6352
6353   if test "x$ac_ct_WINDRES" = x; then
6354     WINDRES=""
6355   else
6356     case $cross_compiling:$ac_tool_warned in
6357 yes:)
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6359 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6360 ac_tool_warned=yes ;;
6361 esac
6362     WINDRES=$ac_ct_WINDRES
6363   fi
6364 else
6365   WINDRES="$ac_cv_prog_WINDRES"
6366 fi
6367
6368
6369 case $host_os in
6370   gnu*)
6371     # Needed for GNU Hurd hosts.
6372     if test -n "$ac_tool_prefix"; then
6373   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6374 set dummy ${ac_tool_prefix}mig; ac_word=$2
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6376 $as_echo_n "checking for $ac_word... " >&6; }
6377 if test "${ac_cv_prog_MIG+set}" = set; then :
6378   $as_echo_n "(cached) " >&6
6379 else
6380   if test -n "$MIG"; then
6381   ac_cv_prog_MIG="$MIG" # Let the user override the test.
6382 else
6383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6384 for as_dir in $PATH
6385 do
6386   IFS=$as_save_IFS
6387   test -z "$as_dir" && as_dir=.
6388     for ac_exec_ext in '' $ac_executable_extensions; do
6389   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6390     ac_cv_prog_MIG="${ac_tool_prefix}mig"
6391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6392     break 2
6393   fi
6394 done
6395   done
6396 IFS=$as_save_IFS
6397
6398 fi
6399 fi
6400 MIG=$ac_cv_prog_MIG
6401 if test -n "$MIG"; then
6402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6403 $as_echo "$MIG" >&6; }
6404 else
6405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406 $as_echo "no" >&6; }
6407 fi
6408
6409
6410 fi
6411 if test -z "$ac_cv_prog_MIG"; then
6412   ac_ct_MIG=$MIG
6413   # Extract the first word of "mig", so it can be a program name with args.
6414 set dummy mig; ac_word=$2
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6416 $as_echo_n "checking for $ac_word... " >&6; }
6417 if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6418   $as_echo_n "(cached) " >&6
6419 else
6420   if test -n "$ac_ct_MIG"; then
6421   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6422 else
6423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6424 for as_dir in $PATH
6425 do
6426   IFS=$as_save_IFS
6427   test -z "$as_dir" && as_dir=.
6428     for ac_exec_ext in '' $ac_executable_extensions; do
6429   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6430     ac_cv_prog_ac_ct_MIG="mig"
6431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6432     break 2
6433   fi
6434 done
6435   done
6436 IFS=$as_save_IFS
6437
6438 fi
6439 fi
6440 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6441 if test -n "$ac_ct_MIG"; then
6442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6443 $as_echo "$ac_ct_MIG" >&6; }
6444 else
6445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6446 $as_echo "no" >&6; }
6447 fi
6448
6449   if test "x$ac_ct_MIG" = x; then
6450     MIG=""
6451   else
6452     case $cross_compiling:$ac_tool_warned in
6453 yes:)
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6455 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6456 ac_tool_warned=yes ;;
6457 esac
6458     MIG=$ac_ct_MIG
6459   fi
6460 else
6461   MIG="$ac_cv_prog_MIG"
6462 fi
6463
6464     if test x"$MIG" = x; then
6465       as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6466     fi
6467     ;;
6468 esac
6469
6470 # ---------------------- #
6471 # Checks for libraries.  #
6472 # ---------------------- #
6473
6474 # We might need to link with -lm; most simulators need it.
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6476 $as_echo_n "checking for main in -lm... " >&6; }
6477 if test "${ac_cv_lib_m_main+set}" = set; then :
6478   $as_echo_n "(cached) " >&6
6479 else
6480   ac_check_lib_save_LIBS=$LIBS
6481 LIBS="-lm  $LIBS"
6482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6483 /* end confdefs.h.  */
6484
6485
6486 int
6487 main ()
6488 {
6489 return main ();
6490   ;
6491   return 0;
6492 }
6493 _ACEOF
6494 if ac_fn_c_try_link "$LINENO"; then :
6495   ac_cv_lib_m_main=yes
6496 else
6497   ac_cv_lib_m_main=no
6498 fi
6499 rm -f core conftest.err conftest.$ac_objext \
6500     conftest$ac_exeext conftest.$ac_ext
6501 LIBS=$ac_check_lib_save_LIBS
6502 fi
6503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6504 $as_echo "$ac_cv_lib_m_main" >&6; }
6505 if test "x$ac_cv_lib_m_main" = x""yes; then :
6506   cat >>confdefs.h <<_ACEOF
6507 #define HAVE_LIBM 1
6508 _ACEOF
6509
6510   LIBS="-lm $LIBS"
6511
6512 fi
6513
6514
6515 # We need to link with -lw to get `wctype' on Solaris before Solaris
6516 # 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
6517 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6518 # is known to have this problem).  Therefore we avoid libw if we can.
6519 ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6520 if test "x$ac_cv_func_wctype" = x""yes; then :
6521
6522 else
6523   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6524 $as_echo_n "checking for wctype in -lw... " >&6; }
6525 if test "${ac_cv_lib_w_wctype+set}" = set; then :
6526   $as_echo_n "(cached) " >&6
6527 else
6528   ac_check_lib_save_LIBS=$LIBS
6529 LIBS="-lw  $LIBS"
6530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6531 /* end confdefs.h.  */
6532
6533 /* Override any GCC internal prototype to avoid an error.
6534    Use char because int might match the return type of a GCC
6535    builtin and then its argument prototype would still apply.  */
6536 #ifdef __cplusplus
6537 extern "C"
6538 #endif
6539 char wctype ();
6540 int
6541 main ()
6542 {
6543 return wctype ();
6544   ;
6545   return 0;
6546 }
6547 _ACEOF
6548 if ac_fn_c_try_link "$LINENO"; then :
6549   ac_cv_lib_w_wctype=yes
6550 else
6551   ac_cv_lib_w_wctype=no
6552 fi
6553 rm -f core conftest.err conftest.$ac_objext \
6554     conftest$ac_exeext conftest.$ac_ext
6555 LIBS=$ac_check_lib_save_LIBS
6556 fi
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6558 $as_echo "$ac_cv_lib_w_wctype" >&6; }
6559 if test "x$ac_cv_lib_w_wctype" = x""yes; then :
6560   cat >>confdefs.h <<_ACEOF
6561 #define HAVE_LIBW 1
6562 _ACEOF
6563
6564   LIBS="-lw $LIBS"
6565
6566 fi
6567
6568 fi
6569
6570
6571 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6573 $as_echo_n "checking for library containing gethostbyname... " >&6; }
6574 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6575   $as_echo_n "(cached) " >&6
6576 else
6577   ac_func_search_save_LIBS=$LIBS
6578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6579 /* end confdefs.h.  */
6580
6581 /* Override any GCC internal prototype to avoid an error.
6582    Use char because int might match the return type of a GCC
6583    builtin and then its argument prototype would still apply.  */
6584 #ifdef __cplusplus
6585 extern "C"
6586 #endif
6587 char gethostbyname ();
6588 int
6589 main ()
6590 {
6591 return gethostbyname ();
6592   ;
6593   return 0;
6594 }
6595 _ACEOF
6596 for ac_lib in '' nsl; do
6597   if test -z "$ac_lib"; then
6598     ac_res="none required"
6599   else
6600     ac_res=-l$ac_lib
6601     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6602   fi
6603   if ac_fn_c_try_link "$LINENO"; then :
6604   ac_cv_search_gethostbyname=$ac_res
6605 fi
6606 rm -f core conftest.err conftest.$ac_objext \
6607     conftest$ac_exeext
6608   if test "${ac_cv_search_gethostbyname+set}" = set; then :
6609   break
6610 fi
6611 done
6612 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6613
6614 else
6615   ac_cv_search_gethostbyname=no
6616 fi
6617 rm conftest.$ac_ext
6618 LIBS=$ac_func_search_save_LIBS
6619 fi
6620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6621 $as_echo "$ac_cv_search_gethostbyname" >&6; }
6622 ac_res=$ac_cv_search_gethostbyname
6623 if test "$ac_res" != no; then :
6624   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6625
6626 fi
6627
6628
6629 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
6630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6631 $as_echo_n "checking for library containing socketpair... " >&6; }
6632 if test "${ac_cv_search_socketpair+set}" = set; then :
6633   $as_echo_n "(cached) " >&6
6634 else
6635   ac_func_search_save_LIBS=$LIBS
6636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6637 /* end confdefs.h.  */
6638
6639 /* Override any GCC internal prototype to avoid an error.
6640    Use char because int might match the return type of a GCC
6641    builtin and then its argument prototype would still apply.  */
6642 #ifdef __cplusplus
6643 extern "C"
6644 #endif
6645 char socketpair ();
6646 int
6647 main ()
6648 {
6649 return socketpair ();
6650   ;
6651   return 0;
6652 }
6653 _ACEOF
6654 for ac_lib in '' socket; do
6655   if test -z "$ac_lib"; then
6656     ac_res="none required"
6657   else
6658     ac_res=-l$ac_lib
6659     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6660   fi
6661   if ac_fn_c_try_link "$LINENO"; then :
6662   ac_cv_search_socketpair=$ac_res
6663 fi
6664 rm -f core conftest.err conftest.$ac_objext \
6665     conftest$ac_exeext
6666   if test "${ac_cv_search_socketpair+set}" = set; then :
6667   break
6668 fi
6669 done
6670 if test "${ac_cv_search_socketpair+set}" = set; then :
6671
6672 else
6673   ac_cv_search_socketpair=no
6674 fi
6675 rm conftest.$ac_ext
6676 LIBS=$ac_func_search_save_LIBS
6677 fi
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6679 $as_echo "$ac_cv_search_socketpair" >&6; }
6680 ac_res=$ac_cv_search_socketpair
6681 if test "$ac_res" != no; then :
6682   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6683
6684 fi
6685
6686
6687 # Link in zlib if we can.  This allows us to read compressed debug sections.
6688
6689   # See if the user specified whether he wants zlib support or not.
6690
6691 # Check whether --with-zlib was given.
6692 if test "${with_zlib+set}" = set; then :
6693   withval=$with_zlib;
6694 else
6695   with_zlib=auto
6696 fi
6697
6698
6699   if test "$with_zlib" != "no"; then
6700     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
6701 $as_echo_n "checking for library containing zlibVersion... " >&6; }
6702 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6703   $as_echo_n "(cached) " >&6
6704 else
6705   ac_func_search_save_LIBS=$LIBS
6706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6707 /* end confdefs.h.  */
6708
6709 /* Override any GCC internal prototype to avoid an error.
6710    Use char because int might match the return type of a GCC
6711    builtin and then its argument prototype would still apply.  */
6712 #ifdef __cplusplus
6713 extern "C"
6714 #endif
6715 char zlibVersion ();
6716 int
6717 main ()
6718 {
6719 return zlibVersion ();
6720   ;
6721   return 0;
6722 }
6723 _ACEOF
6724 for ac_lib in '' z; do
6725   if test -z "$ac_lib"; then
6726     ac_res="none required"
6727   else
6728     ac_res=-l$ac_lib
6729     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6730   fi
6731   if ac_fn_c_try_link "$LINENO"; then :
6732   ac_cv_search_zlibVersion=$ac_res
6733 fi
6734 rm -f core conftest.err conftest.$ac_objext \
6735     conftest$ac_exeext
6736   if test "${ac_cv_search_zlibVersion+set}" = set; then :
6737   break
6738 fi
6739 done
6740 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6741
6742 else
6743   ac_cv_search_zlibVersion=no
6744 fi
6745 rm conftest.$ac_ext
6746 LIBS=$ac_func_search_save_LIBS
6747 fi
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6749 $as_echo "$ac_cv_search_zlibVersion" >&6; }
6750 ac_res=$ac_cv_search_zlibVersion
6751 if test "$ac_res" != no; then :
6752   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6753   for ac_header in zlib.h
6754 do :
6755   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6756 if test "x$ac_cv_header_zlib_h" = x""yes; then :
6757   cat >>confdefs.h <<_ACEOF
6758 #define HAVE_ZLIB_H 1
6759 _ACEOF
6760
6761 fi
6762
6763 done
6764
6765 fi
6766
6767     if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6768       as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6769     fi
6770   fi
6771
6772
6773 # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6775 $as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6776 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6777   $as_echo_n "(cached) " >&6
6778 else
6779   ac_func_search_save_LIBS=$LIBS
6780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6781 /* end confdefs.h.  */
6782
6783 /* Override any GCC internal prototype to avoid an error.
6784    Use char because int might match the return type of a GCC
6785    builtin and then its argument prototype would still apply.  */
6786 #ifdef __cplusplus
6787 extern "C"
6788 #endif
6789 char dlgetmodinfo ();
6790 int
6791 main ()
6792 {
6793 return dlgetmodinfo ();
6794   ;
6795   return 0;
6796 }
6797 _ACEOF
6798 for ac_lib in '' dl xpdl; do
6799   if test -z "$ac_lib"; then
6800     ac_res="none required"
6801   else
6802     ac_res=-l$ac_lib
6803     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6804   fi
6805   if ac_fn_c_try_link "$LINENO"; then :
6806   ac_cv_search_dlgetmodinfo=$ac_res
6807 fi
6808 rm -f core conftest.err conftest.$ac_objext \
6809     conftest$ac_exeext
6810   if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6811   break
6812 fi
6813 done
6814 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6815
6816 else
6817   ac_cv_search_dlgetmodinfo=no
6818 fi
6819 rm conftest.$ac_ext
6820 LIBS=$ac_func_search_save_LIBS
6821 fi
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6823 $as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6824 ac_res=$ac_cv_search_dlgetmodinfo
6825 if test "$ac_res" != no; then :
6826   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6827
6828 fi
6829
6830
6831
6832
6833
6834 # Check whether --with-libiconv-prefix was given.
6835 if test "${with_libiconv_prefix+set}" = set; then :
6836   withval=$with_libiconv_prefix;
6837     for dir in `echo "$withval" | tr : ' '`; do
6838       if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6839       if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6840     done
6841
6842 fi
6843
6844
6845   BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6846   BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6847
6848   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6849 $as_echo_n "checking for iconv... " >&6; }
6850 if test "${am_cv_func_iconv+set}" = set; then :
6851   $as_echo_n "(cached) " >&6
6852 else
6853
6854     am_cv_func_iconv="no, consider installing GNU libiconv"
6855     am_cv_lib_iconv=no
6856     am_cv_use_build_libiconv=no
6857     am_cv_build_libiconv_path=
6858
6859     # If libiconv is part of the build tree, then try using it over
6860     # any system iconv.
6861     if test -d ../libiconv; then
6862       for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6863         am_save_LIBS="$LIBS"
6864         am_save_CPPFLAGS="$CPPFLAGS"
6865         LIBS="$LIBS $lib_dir/libiconv.a"
6866         CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6867         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6868 /* end confdefs.h.  */
6869 #include <stdlib.h>
6870 #include <iconv.h>
6871 int
6872 main ()
6873 {
6874 iconv_t cd = iconv_open("","");
6875            iconv(cd,NULL,NULL,NULL,NULL);
6876            iconv_close(cd);
6877   ;
6878   return 0;
6879 }
6880 _ACEOF
6881 if ac_fn_c_try_link "$LINENO"; then :
6882   am_cv_use_build_libiconv=yes
6883           am_cv_build_libiconv_path=$lib_dir/libiconv.a
6884           am_cv_lib_iconv=yes
6885           am_cv_func_iconv=yes
6886 fi
6887 rm -f core conftest.err conftest.$ac_objext \
6888     conftest$ac_exeext conftest.$ac_ext
6889         LIBS="$am_save_LIBS"
6890         CPPFLAGS="$am_save_CPPFLAGS"
6891         if test "$am_cv_use_build_libiconv" = "yes"; then
6892           break
6893         fi
6894       done
6895     fi
6896
6897     # Next, try to find iconv in libc.
6898     if test "$am_cv_func_iconv" != yes; then
6899       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6900 /* end confdefs.h.  */
6901 #include <stdlib.h>
6902 #include <iconv.h>
6903 int
6904 main ()
6905 {
6906 iconv_t cd = iconv_open("","");
6907          iconv(cd,NULL,NULL,NULL,NULL);
6908          iconv_close(cd);
6909   ;
6910   return 0;
6911 }
6912 _ACEOF
6913 if ac_fn_c_try_link "$LINENO"; then :
6914   am_cv_func_iconv=yes
6915 fi
6916 rm -f core conftest.err conftest.$ac_objext \
6917     conftest$ac_exeext conftest.$ac_ext
6918     fi
6919
6920     # If iconv was not in libc, try -liconv.  In this case, arrange to
6921     # look in the libiconv prefix, if it was specified by the user.
6922     if test "$am_cv_func_iconv" != yes; then
6923       am_save_CPPFLAGS="$CPPFLAGS"
6924       am_save_LIBS="$LIBS"
6925       if test -n "$LIBICONV_INCLUDE"; then
6926         CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6927         LIBS="$LIBS $LIBICONV_LIBDIR"
6928       fi
6929       LIBS="$LIBS -liconv"
6930       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6931 /* end confdefs.h.  */
6932 #include <stdlib.h>
6933 #include <iconv.h>
6934 int
6935 main ()
6936 {
6937 iconv_t cd = iconv_open("","");
6938          iconv(cd,NULL,NULL,NULL,NULL);
6939          iconv_close(cd);
6940   ;
6941   return 0;
6942 }
6943 _ACEOF
6944 if ac_fn_c_try_link "$LINENO"; then :
6945   am_cv_lib_iconv=yes
6946         am_cv_func_iconv=yes
6947 fi
6948 rm -f core conftest.err conftest.$ac_objext \
6949     conftest$ac_exeext conftest.$ac_ext
6950       LIBS="$am_save_LIBS"
6951       CPPFLAGS="$am_save_CPPFLAGS"
6952     fi
6953
6954 fi
6955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6956 $as_echo "$am_cv_func_iconv" >&6; }
6957
6958   # Set the various flags based on the cache variables.  We can't rely
6959   # on the flags to remain set from the above code, due to caching.
6960   LIBICONV=
6961   if test "$am_cv_lib_iconv" = yes; then
6962     LIBICONV="-liconv"
6963   else
6964     LIBICONV_LIBDIR=
6965     LIBICONV_INCLUDE=
6966   fi
6967   if test "$am_cv_use_build_libiconv" = yes; then
6968     LIBICONV="$am_cv_build_libiconv_path"
6969     LIBICONV_LIBDIR=""
6970     LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6971   fi
6972   CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6973   LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
6974
6975   if test "$am_cv_func_iconv" = yes; then
6976
6977 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
6978
6979     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6980 $as_echo_n "checking for iconv declaration... " >&6; }
6981     if test "${am_cv_proto_iconv+set}" = set; then :
6982   $as_echo_n "(cached) " >&6
6983 else
6984
6985       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6986 /* end confdefs.h.  */
6987
6988 #include <stdlib.h>
6989 #include <iconv.h>
6990 extern
6991 #ifdef __cplusplus
6992 "C"
6993 #endif
6994 #if defined(__STDC__) || defined(__cplusplus)
6995 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6996 #else
6997 size_t iconv();
6998 #endif
6999
7000 int
7001 main ()
7002 {
7003
7004   ;
7005   return 0;
7006 }
7007 _ACEOF
7008 if ac_fn_c_try_compile "$LINENO"; then :
7009   am_cv_proto_iconv_arg1=""
7010 else
7011   am_cv_proto_iconv_arg1="const"
7012 fi
7013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7014       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);"
7015 fi
7016
7017     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
7018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
7019          }$am_cv_proto_iconv" >&5
7020 $as_echo "${ac_t:-
7021          }$am_cv_proto_iconv" >&6; }
7022
7023 cat >>confdefs.h <<_ACEOF
7024 #define ICONV_CONST $am_cv_proto_iconv_arg1
7025 _ACEOF
7026
7027   fi
7028
7029
7030 # GDB may fork/exec the iconv program to get the list of supported character
7031 # sets.  Allow the user to specify where to find it.
7032 # There are several factors affecting the choice of option name:
7033 # - There is already --with-libiconv-prefix but we can't use it, it specifies
7034 #   the build-time location of libiconv files.
7035 # - The program we need to find is iconv, which comes with glibc.  The user
7036 #   doesn't necessarily have libiconv installed.  Therefore naming this
7037 #   --with-libiconv-foo feels wrong.
7038 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7039 #   defined to work on directories not files (though it really doesn't know
7040 #   the difference).
7041 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
7042 #   with --with-libiconv-prefix.
7043 # Putting these together is why the option name is --with-iconv-bin.
7044
7045
7046 # Check whether --with-iconv-bin was given.
7047 if test "${with_iconv_bin+set}" = set; then :
7048   withval=$with_iconv_bin; iconv_bin="${withval}"
7049
7050 cat >>confdefs.h <<_ACEOF
7051 #define ICONV_BIN "${iconv_bin}"
7052 _ACEOF
7053
7054
7055   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7056      if test "x$prefix" = xNONE; then
7057         test_prefix=/usr/local
7058      else
7059         test_prefix=$prefix
7060      fi
7061   else
7062      test_prefix=$exec_prefix
7063   fi
7064   value=0
7065   case ${iconv_bin} in
7066      "${test_prefix}"|"${test_prefix}/"*|\
7067         '${exec_prefix}'|'${exec_prefix}/'*)
7068      value=1
7069      ;;
7070   esac
7071
7072 cat >>confdefs.h <<_ACEOF
7073 #define ICONV_BIN_RELOCATABLE $value
7074 _ACEOF
7075
7076
7077
7078 fi
7079
7080
7081 # For the TUI, we need enhanced curses functionality.
7082 if test x"$enable_tui" != xno; then
7083   prefer_curses=yes
7084 fi
7085
7086 curses_found=no
7087 if test x"$prefer_curses" = xyes; then
7088   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7089   # curses library because the latter might not provide all the
7090   # functionality we need.  However, this leads to problems on systems
7091   # where the linker searches /usr/local/lib, but the compiler doesn't
7092   # search /usr/local/include, if ncurses is installed in /usr/local.  A
7093   # default installation of ncurses on alpha*-dec-osf* will lead to such
7094   # a situation.
7095   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7096 $as_echo_n "checking for library containing waddstr... " >&6; }
7097 if test "${ac_cv_search_waddstr+set}" = set; then :
7098   $as_echo_n "(cached) " >&6
7099 else
7100   ac_func_search_save_LIBS=$LIBS
7101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7102 /* end confdefs.h.  */
7103
7104 /* Override any GCC internal prototype to avoid an error.
7105    Use char because int might match the return type of a GCC
7106    builtin and then its argument prototype would still apply.  */
7107 #ifdef __cplusplus
7108 extern "C"
7109 #endif
7110 char waddstr ();
7111 int
7112 main ()
7113 {
7114 return waddstr ();
7115   ;
7116   return 0;
7117 }
7118 _ACEOF
7119 for ac_lib in '' ncurses cursesX curses; do
7120   if test -z "$ac_lib"; then
7121     ac_res="none required"
7122   else
7123     ac_res=-l$ac_lib
7124     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7125   fi
7126   if ac_fn_c_try_link "$LINENO"; then :
7127   ac_cv_search_waddstr=$ac_res
7128 fi
7129 rm -f core conftest.err conftest.$ac_objext \
7130     conftest$ac_exeext
7131   if test "${ac_cv_search_waddstr+set}" = set; then :
7132   break
7133 fi
7134 done
7135 if test "${ac_cv_search_waddstr+set}" = set; then :
7136
7137 else
7138   ac_cv_search_waddstr=no
7139 fi
7140 rm conftest.$ac_ext
7141 LIBS=$ac_func_search_save_LIBS
7142 fi
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7144 $as_echo "$ac_cv_search_waddstr" >&6; }
7145 ac_res=$ac_cv_search_waddstr
7146 if test "$ac_res" != no; then :
7147   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7148
7149 fi
7150
7151
7152   if test "$ac_cv_search_waddstr" != no; then
7153     curses_found=yes
7154   fi
7155 fi
7156
7157 # Check whether we should enable the TUI, but only do so if we really
7158 # can.
7159 if test x"$enable_tui" != xno; then
7160   if test -d $srcdir/tui; then
7161     if test "$curses_found" != no; then
7162       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7163       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7164       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7165       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
7166     else
7167       if test x"$enable_tui" = xyes; then
7168         as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
7169       else
7170         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7171 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
7172       fi
7173     fi
7174   fi
7175 fi
7176
7177 # Since GDB uses Readline, we need termcap functionality.  In many
7178 # cases this will be provided by the curses library, but some systems
7179 # have a seperate termcap library, or no curses library at all.
7180
7181 case $host_os in
7182   cygwin*)
7183     if test -d $srcdir/libtermcap; then
7184       LIBS="../libtermcap/libtermcap.a $LIBS"
7185       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7186     fi ;;
7187   go32* | *djgpp*)
7188     ac_cv_search_tgetent="none required"
7189     ;;
7190   *mingw32*)
7191     ac_cv_search_tgetent="none required"
7192     CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
7193     ;;
7194 esac
7195
7196 # These are the libraries checked by Readline.
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7198 $as_echo_n "checking for library containing tgetent... " >&6; }
7199 if test "${ac_cv_search_tgetent+set}" = set; then :
7200   $as_echo_n "(cached) " >&6
7201 else
7202   ac_func_search_save_LIBS=$LIBS
7203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7204 /* end confdefs.h.  */
7205
7206 /* Override any GCC internal prototype to avoid an error.
7207    Use char because int might match the return type of a GCC
7208    builtin and then its argument prototype would still apply.  */
7209 #ifdef __cplusplus
7210 extern "C"
7211 #endif
7212 char tgetent ();
7213 int
7214 main ()
7215 {
7216 return tgetent ();
7217   ;
7218   return 0;
7219 }
7220 _ACEOF
7221 for ac_lib in '' termcap tinfo curses ncurses; do
7222   if test -z "$ac_lib"; then
7223     ac_res="none required"
7224   else
7225     ac_res=-l$ac_lib
7226     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7227   fi
7228   if ac_fn_c_try_link "$LINENO"; then :
7229   ac_cv_search_tgetent=$ac_res
7230 fi
7231 rm -f core conftest.err conftest.$ac_objext \
7232     conftest$ac_exeext
7233   if test "${ac_cv_search_tgetent+set}" = set; then :
7234   break
7235 fi
7236 done
7237 if test "${ac_cv_search_tgetent+set}" = set; then :
7238
7239 else
7240   ac_cv_search_tgetent=no
7241 fi
7242 rm conftest.$ac_ext
7243 LIBS=$ac_func_search_save_LIBS
7244 fi
7245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7246 $as_echo "$ac_cv_search_tgetent" >&6; }
7247 ac_res=$ac_cv_search_tgetent
7248 if test "$ac_res" != no; then :
7249   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7250
7251 fi
7252
7253
7254 if test "$ac_cv_search_tgetent" = no; then
7255   as_fn_error "no termcap library found" "$LINENO" 5
7256 fi
7257
7258
7259 # Check whether --with-system-readline was given.
7260 if test "${with_system_readline+set}" = set; then :
7261   withval=$with_system_readline;
7262 fi
7263
7264
7265 if test "$with_system_readline" = yes; then
7266   READLINE=-lreadline
7267   READLINE_DEPS=
7268   READLINE_CFLAGS=
7269   READLINE_TEXI_INCFLAG=
7270 else
7271   READLINE='$(READLINE_DIR)/libreadline.a'
7272   READLINE_DEPS='$(READLINE)'
7273   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
7274   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
7275 fi
7276
7277
7278
7279
7280
7281 # Generate jit-reader.h
7282
7283 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7284 TARGET_PTR=
7285
7286 # The cast to long int works around a bug in the HP C Compiler
7287 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7288 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7289 # This bug is HP SR number 8606223364.
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7291 $as_echo_n "checking size of unsigned long long... " >&6; }
7292 if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7293   $as_echo_n "(cached) " >&6
7294 else
7295   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
7296
7297 else
7298   if test "$ac_cv_type_unsigned_long_long" = yes; then
7299      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7300 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7301 { as_fn_set_status 77
7302 as_fn_error "cannot compute sizeof (unsigned long long)
7303 See \`config.log' for more details." "$LINENO" 5; }; }
7304    else
7305      ac_cv_sizeof_unsigned_long_long=0
7306    fi
7307 fi
7308
7309 fi
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7311 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7312
7313
7314
7315 cat >>confdefs.h <<_ACEOF
7316 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7317 _ACEOF
7318
7319
7320 # The cast to long int works around a bug in the HP C Compiler
7321 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7322 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7323 # This bug is HP SR number 8606223364.
7324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7325 $as_echo_n "checking size of unsigned long... " >&6; }
7326 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7327   $as_echo_n "(cached) " >&6
7328 else
7329   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
7330
7331 else
7332   if test "$ac_cv_type_unsigned_long" = yes; then
7333      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7334 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7335 { as_fn_set_status 77
7336 as_fn_error "cannot compute sizeof (unsigned long)
7337 See \`config.log' for more details." "$LINENO" 5; }; }
7338    else
7339      ac_cv_sizeof_unsigned_long=0
7340    fi
7341 fi
7342
7343 fi
7344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7345 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7346
7347
7348
7349 cat >>confdefs.h <<_ACEOF
7350 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7351 _ACEOF
7352
7353
7354 # The cast to long int works around a bug in the HP C Compiler
7355 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7356 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7357 # This bug is HP SR number 8606223364.
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7359 $as_echo_n "checking size of unsigned __int128... " >&6; }
7360 if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7361   $as_echo_n "(cached) " >&6
7362 else
7363   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
7364
7365 else
7366   if test "$ac_cv_type_unsigned___int128" = yes; then
7367      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7368 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7369 { as_fn_set_status 77
7370 as_fn_error "cannot compute sizeof (unsigned __int128)
7371 See \`config.log' for more details." "$LINENO" 5; }; }
7372    else
7373      ac_cv_sizeof_unsigned___int128=0
7374    fi
7375 fi
7376
7377 fi
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7379 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7380
7381
7382
7383 cat >>confdefs.h <<_ACEOF
7384 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7385 _ACEOF
7386
7387
7388
7389 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7390   TARGET_PTR="unsigned long"
7391 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7392   TARGET_PTR="unsigned long long"
7393 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7394   TARGET_PTR="unsigned __int128"
7395 else
7396   TARGET_PTR="unsigned long"
7397 fi
7398
7399
7400 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7401
7402
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7404 $as_echo_n "checking for library containing dlopen... " >&6; }
7405 if test "${ac_cv_search_dlopen+set}" = set; then :
7406   $as_echo_n "(cached) " >&6
7407 else
7408   ac_func_search_save_LIBS=$LIBS
7409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7410 /* end confdefs.h.  */
7411
7412 /* Override any GCC internal prototype to avoid an error.
7413    Use char because int might match the return type of a GCC
7414    builtin and then its argument prototype would still apply.  */
7415 #ifdef __cplusplus
7416 extern "C"
7417 #endif
7418 char dlopen ();
7419 int
7420 main ()
7421 {
7422 return dlopen ();
7423   ;
7424   return 0;
7425 }
7426 _ACEOF
7427 for ac_lib in '' dl; do
7428   if test -z "$ac_lib"; then
7429     ac_res="none required"
7430   else
7431     ac_res=-l$ac_lib
7432     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7433   fi
7434   if ac_fn_c_try_link "$LINENO"; then :
7435   ac_cv_search_dlopen=$ac_res
7436 fi
7437 rm -f core conftest.err conftest.$ac_objext \
7438     conftest$ac_exeext
7439   if test "${ac_cv_search_dlopen+set}" = set; then :
7440   break
7441 fi
7442 done
7443 if test "${ac_cv_search_dlopen+set}" = set; then :
7444
7445 else
7446   ac_cv_search_dlopen=no
7447 fi
7448 rm conftest.$ac_ext
7449 LIBS=$ac_func_search_save_LIBS
7450 fi
7451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7452 $as_echo "$ac_cv_search_dlopen" >&6; }
7453 ac_res=$ac_cv_search_dlopen
7454 if test "$ac_res" != no; then :
7455   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7456
7457 fi
7458
7459
7460
7461
7462 # Check whether --with-jit-reader-dir was given.
7463 if test "${with_jit_reader_dir+set}" = set; then :
7464   withval=$with_jit_reader_dir;
7465     JIT_READER_DIR=$withval
7466 else
7467   JIT_READER_DIR=${libdir}/gdb
7468 fi
7469
7470
7471   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7472   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7473   ac_define_dir=`eval echo $JIT_READER_DIR`
7474   ac_define_dir=`eval echo $ac_define_dir`
7475
7476 cat >>confdefs.h <<_ACEOF
7477 #define JIT_READER_DIR "$ac_define_dir"
7478 _ACEOF
7479
7480
7481
7482
7483   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7484      if test "x$prefix" = xNONE; then
7485         test_prefix=/usr/local
7486      else
7487         test_prefix=$prefix
7488      fi
7489   else
7490      test_prefix=$exec_prefix
7491   fi
7492   value=0
7493   case ${ac_define_dir} in
7494      "${test_prefix}"|"${test_prefix}/"*|\
7495         '${exec_prefix}'|'${exec_prefix}/'*)
7496      value=1
7497      ;;
7498   esac
7499
7500 cat >>confdefs.h <<_ACEOF
7501 #define JIT_READER_DIR_RELOCATABLE $value
7502 _ACEOF
7503
7504
7505
7506
7507
7508 # Check whether --with-expat was given.
7509 if test "${with_expat+set}" = set; then :
7510   withval=$with_expat;
7511 else
7512   with_expat=auto
7513 fi
7514
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7516 $as_echo_n "checking whether to use expat... " >&6; }
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7518 $as_echo "$with_expat" >&6; }
7519
7520 if test "${with_expat}" = no; then
7521   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7522 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
7523   HAVE_LIBEXPAT=no
7524 else
7525
7526       if test "X$prefix" = "XNONE"; then
7527     acl_final_prefix="$ac_default_prefix"
7528   else
7529     acl_final_prefix="$prefix"
7530   fi
7531   if test "X$exec_prefix" = "XNONE"; then
7532     acl_final_exec_prefix='${prefix}'
7533   else
7534     acl_final_exec_prefix="$exec_prefix"
7535   fi
7536   acl_save_prefix="$prefix"
7537   prefix="$acl_final_prefix"
7538   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7539   prefix="$acl_save_prefix"
7540
7541
7542 # Check whether --with-gnu-ld was given.
7543 if test "${with_gnu_ld+set}" = set; then :
7544   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7545 else
7546   with_gnu_ld=no
7547 fi
7548
7549 # Prepare PATH_SEPARATOR.
7550 # The user is always right.
7551 if test "${PATH_SEPARATOR+set}" != set; then
7552   echo "#! /bin/sh" >conf$$.sh
7553   echo  "exit 0"   >>conf$$.sh
7554   chmod +x conf$$.sh
7555   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7556     PATH_SEPARATOR=';'
7557   else
7558     PATH_SEPARATOR=:
7559   fi
7560   rm -f conf$$.sh
7561 fi
7562 ac_prog=ld
7563 if test "$GCC" = yes; then
7564   # Check if gcc -print-prog-name=ld gives a path.
7565   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7566 $as_echo_n "checking for ld used by GCC... " >&6; }
7567   case $host in
7568   *-*-mingw*)
7569     # gcc leaves a trailing carriage return which upsets mingw
7570     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7571   *)
7572     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7573   esac
7574   case $ac_prog in
7575     # Accept absolute paths.
7576     [\\/]* | [A-Za-z]:[\\/]*)
7577       re_direlt='/[^/][^/]*/\.\./'
7578       # Canonicalize the path of ld
7579       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7580       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7581         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7582       done
7583       test -z "$LD" && LD="$ac_prog"
7584       ;;
7585   "")
7586     # If it fails, then pretend we aren't using GCC.
7587     ac_prog=ld
7588     ;;
7589   *)
7590     # If it is relative, then search for the first ld in PATH.
7591     with_gnu_ld=unknown
7592     ;;
7593   esac
7594 elif test "$with_gnu_ld" = yes; then
7595   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7596 $as_echo_n "checking for GNU ld... " >&6; }
7597 else
7598   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7599 $as_echo_n "checking for non-GNU ld... " >&6; }
7600 fi
7601 if test "${acl_cv_path_LD+set}" = set; then :
7602   $as_echo_n "(cached) " >&6
7603 else
7604   if test -z "$LD"; then
7605   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7606   for ac_dir in $PATH; do
7607     test -z "$ac_dir" && ac_dir=.
7608     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7609       acl_cv_path_LD="$ac_dir/$ac_prog"
7610       # Check to see if the program is GNU ld.  I'd rather use --version,
7611       # but apparently some GNU ld's only accept -v.
7612       # Break only if it was the GNU/non-GNU ld that we prefer.
7613       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7614         test "$with_gnu_ld" != no && break
7615       else
7616         test "$with_gnu_ld" != yes && break
7617       fi
7618     fi
7619   done
7620   IFS="$ac_save_ifs"
7621 else
7622   acl_cv_path_LD="$LD" # Let the user override the test with a path.
7623 fi
7624 fi
7625
7626 LD="$acl_cv_path_LD"
7627 if test -n "$LD"; then
7628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7629 $as_echo "$LD" >&6; }
7630 else
7631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7632 $as_echo "no" >&6; }
7633 fi
7634 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7636 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7637 if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7638   $as_echo_n "(cached) " >&6
7639 else
7640   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7641 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7642   acl_cv_prog_gnu_ld=yes
7643 else
7644   acl_cv_prog_gnu_ld=no
7645 fi
7646 fi
7647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7648 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
7649 with_gnu_ld=$acl_cv_prog_gnu_ld
7650
7651
7652
7653                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7654 $as_echo_n "checking for shared library run path origin... " >&6; }
7655 if test "${acl_cv_rpath+set}" = set; then :
7656   $as_echo_n "(cached) " >&6
7657 else
7658
7659     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7660     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7661     . ./conftest.sh
7662     rm -f ./conftest.sh
7663     acl_cv_rpath=done
7664
7665 fi
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7667 $as_echo "$acl_cv_rpath" >&6; }
7668   wl="$acl_cv_wl"
7669   libext="$acl_cv_libext"
7670   shlibext="$acl_cv_shlibext"
7671   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7672   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7673   hardcode_direct="$acl_cv_hardcode_direct"
7674   hardcode_minus_L="$acl_cv_hardcode_minus_L"
7675     # Check whether --enable-rpath was given.
7676 if test "${enable_rpath+set}" = set; then :
7677   enableval=$enable_rpath; :
7678 else
7679   enable_rpath=yes
7680 fi
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691     use_additional=yes
7692
7693   acl_save_prefix="$prefix"
7694   prefix="$acl_final_prefix"
7695   acl_save_exec_prefix="$exec_prefix"
7696   exec_prefix="$acl_final_exec_prefix"
7697
7698     eval additional_includedir=\"$includedir\"
7699     eval additional_libdir=\"$libdir\"
7700
7701   exec_prefix="$acl_save_exec_prefix"
7702   prefix="$acl_save_prefix"
7703
7704
7705 # Check whether --with-libexpat-prefix was given.
7706 if test "${with_libexpat_prefix+set}" = set; then :
7707   withval=$with_libexpat_prefix;
7708     if test "X$withval" = "Xno"; then
7709       use_additional=no
7710     else
7711       if test "X$withval" = "X"; then
7712
7713   acl_save_prefix="$prefix"
7714   prefix="$acl_final_prefix"
7715   acl_save_exec_prefix="$exec_prefix"
7716   exec_prefix="$acl_final_exec_prefix"
7717
7718           eval additional_includedir=\"$includedir\"
7719           eval additional_libdir=\"$libdir\"
7720
7721   exec_prefix="$acl_save_exec_prefix"
7722   prefix="$acl_save_prefix"
7723
7724       else
7725         additional_includedir="$withval/include"
7726         additional_libdir="$withval/lib"
7727       fi
7728     fi
7729
7730 fi
7731
7732       LIBEXPAT=
7733   LTLIBEXPAT=
7734   INCEXPAT=
7735   rpathdirs=
7736   ltrpathdirs=
7737   names_already_handled=
7738   names_next_round='expat '
7739   while test -n "$names_next_round"; do
7740     names_this_round="$names_next_round"
7741     names_next_round=
7742     for name in $names_this_round; do
7743       already_handled=
7744       for n in $names_already_handled; do
7745         if test "$n" = "$name"; then
7746           already_handled=yes
7747           break
7748         fi
7749       done
7750       if test -z "$already_handled"; then
7751         names_already_handled="$names_already_handled $name"
7752                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7753         eval value=\"\$HAVE_LIB$uppername\"
7754         if test -n "$value"; then
7755           if test "$value" = yes; then
7756             eval value=\"\$LIB$uppername\"
7757             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7758             eval value=\"\$LTLIB$uppername\"
7759             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7760           else
7761                                     :
7762           fi
7763         else
7764                               found_dir=
7765           found_la=
7766           found_so=
7767           found_a=
7768           if test $use_additional = yes; then
7769             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7770               found_dir="$additional_libdir"
7771               found_so="$additional_libdir/lib$name.$shlibext"
7772               if test -f "$additional_libdir/lib$name.la"; then
7773                 found_la="$additional_libdir/lib$name.la"
7774               fi
7775             else
7776               if test -f "$additional_libdir/lib$name.$libext"; then
7777                 found_dir="$additional_libdir"
7778                 found_a="$additional_libdir/lib$name.$libext"
7779                 if test -f "$additional_libdir/lib$name.la"; then
7780                   found_la="$additional_libdir/lib$name.la"
7781                 fi
7782               fi
7783             fi
7784           fi
7785           if test "X$found_dir" = "X"; then
7786             for x in $LDFLAGS $LTLIBEXPAT; do
7787
7788   acl_save_prefix="$prefix"
7789   prefix="$acl_final_prefix"
7790   acl_save_exec_prefix="$exec_prefix"
7791   exec_prefix="$acl_final_exec_prefix"
7792   eval x=\"$x\"
7793   exec_prefix="$acl_save_exec_prefix"
7794   prefix="$acl_save_prefix"
7795
7796               case "$x" in
7797                 -L*)
7798                   dir=`echo "X$x" | sed -e 's/^X-L//'`
7799                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7800                     found_dir="$dir"
7801                     found_so="$dir/lib$name.$shlibext"
7802                     if test -f "$dir/lib$name.la"; then
7803                       found_la="$dir/lib$name.la"
7804                     fi
7805                   else
7806                     if test -f "$dir/lib$name.$libext"; then
7807                       found_dir="$dir"
7808                       found_a="$dir/lib$name.$libext"
7809                       if test -f "$dir/lib$name.la"; then
7810                         found_la="$dir/lib$name.la"
7811                       fi
7812                     fi
7813                   fi
7814                   ;;
7815               esac
7816               if test "X$found_dir" != "X"; then
7817                 break
7818               fi
7819             done
7820           fi
7821           if test "X$found_dir" != "X"; then
7822                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7823             if test "X$found_so" != "X"; then
7824                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7825                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7826               else
7827                                                                                 haveit=
7828                 for x in $ltrpathdirs; do
7829                   if test "X$x" = "X$found_dir"; then
7830                     haveit=yes
7831                     break
7832                   fi
7833                 done
7834                 if test -z "$haveit"; then
7835                   ltrpathdirs="$ltrpathdirs $found_dir"
7836                 fi
7837                                 if test "$hardcode_direct" = yes; then
7838                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7839                 else
7840                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7841                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7842                                                             haveit=
7843                     for x in $rpathdirs; do
7844                       if test "X$x" = "X$found_dir"; then
7845                         haveit=yes
7846                         break
7847                       fi
7848                     done
7849                     if test -z "$haveit"; then
7850                       rpathdirs="$rpathdirs $found_dir"
7851                     fi
7852                   else
7853                                                                                 haveit=
7854                     for x in $LDFLAGS $LIBEXPAT; do
7855
7856   acl_save_prefix="$prefix"
7857   prefix="$acl_final_prefix"
7858   acl_save_exec_prefix="$exec_prefix"
7859   exec_prefix="$acl_final_exec_prefix"
7860   eval x=\"$x\"
7861   exec_prefix="$acl_save_exec_prefix"
7862   prefix="$acl_save_prefix"
7863
7864                       if test "X$x" = "X-L$found_dir"; then
7865                         haveit=yes
7866                         break
7867                       fi
7868                     done
7869                     if test -z "$haveit"; then
7870                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7871                     fi
7872                     if test "$hardcode_minus_L" != no; then
7873                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7874                     else
7875                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7876                     fi
7877                   fi
7878                 fi
7879               fi
7880             else
7881               if test "X$found_a" != "X"; then
7882                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7883               else
7884                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7885               fi
7886             fi
7887                         additional_includedir=
7888             case "$found_dir" in
7889               */lib | */lib/)
7890                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7891                 additional_includedir="$basedir/include"
7892                 ;;
7893             esac
7894             if test "X$additional_includedir" != "X"; then
7895                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
7896                 haveit=
7897                 if test "X$additional_includedir" = "X/usr/local/include"; then
7898                   if test -n "$GCC"; then
7899                     case $host_os in
7900                       linux*) haveit=yes;;
7901                     esac
7902                   fi
7903                 fi
7904                 if test -z "$haveit"; then
7905                   for x in $CPPFLAGS $INCEXPAT; do
7906
7907   acl_save_prefix="$prefix"
7908   prefix="$acl_final_prefix"
7909   acl_save_exec_prefix="$exec_prefix"
7910   exec_prefix="$acl_final_exec_prefix"
7911   eval x=\"$x\"
7912   exec_prefix="$acl_save_exec_prefix"
7913   prefix="$acl_save_prefix"
7914
7915                     if test "X$x" = "X-I$additional_includedir"; then
7916                       haveit=yes
7917                       break
7918                     fi
7919                   done
7920                   if test -z "$haveit"; then
7921                     if test -d "$additional_includedir"; then
7922                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7923                     fi
7924                   fi
7925                 fi
7926               fi
7927             fi
7928                         if test -n "$found_la"; then
7929                                                         save_libdir="$libdir"
7930               case "$found_la" in
7931                 */* | *\\*) . "$found_la" ;;
7932                 *) . "./$found_la" ;;
7933               esac
7934               libdir="$save_libdir"
7935                             for dep in $dependency_libs; do
7936                 case "$dep" in
7937                   -L*)
7938                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7939                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
7940                       haveit=
7941                       if test "X$additional_libdir" = "X/usr/local/lib"; then
7942                         if test -n "$GCC"; then
7943                           case $host_os in
7944                             linux*) haveit=yes;;
7945                           esac
7946                         fi
7947                       fi
7948                       if test -z "$haveit"; then
7949                         haveit=
7950                         for x in $LDFLAGS $LIBEXPAT; do
7951
7952   acl_save_prefix="$prefix"
7953   prefix="$acl_final_prefix"
7954   acl_save_exec_prefix="$exec_prefix"
7955   exec_prefix="$acl_final_exec_prefix"
7956   eval x=\"$x\"
7957   exec_prefix="$acl_save_exec_prefix"
7958   prefix="$acl_save_prefix"
7959
7960                           if test "X$x" = "X-L$additional_libdir"; then
7961                             haveit=yes
7962                             break
7963                           fi
7964                         done
7965                         if test -z "$haveit"; then
7966                           if test -d "$additional_libdir"; then
7967                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7968                           fi
7969                         fi
7970                         haveit=
7971                         for x in $LDFLAGS $LTLIBEXPAT; do
7972
7973   acl_save_prefix="$prefix"
7974   prefix="$acl_final_prefix"
7975   acl_save_exec_prefix="$exec_prefix"
7976   exec_prefix="$acl_final_exec_prefix"
7977   eval x=\"$x\"
7978   exec_prefix="$acl_save_exec_prefix"
7979   prefix="$acl_save_prefix"
7980
7981                           if test "X$x" = "X-L$additional_libdir"; then
7982                             haveit=yes
7983                             break
7984                           fi
7985                         done
7986                         if test -z "$haveit"; then
7987                           if test -d "$additional_libdir"; then
7988                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7989                           fi
7990                         fi
7991                       fi
7992                     fi
7993                     ;;
7994                   -R*)
7995                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
7996                     if test "$enable_rpath" != no; then
7997                                                                   haveit=
7998                       for x in $rpathdirs; do
7999                         if test "X$x" = "X$dir"; then
8000                           haveit=yes
8001                           break
8002                         fi
8003                       done
8004                       if test -z "$haveit"; then
8005                         rpathdirs="$rpathdirs $dir"
8006                       fi
8007                                                                   haveit=
8008                       for x in $ltrpathdirs; do
8009                         if test "X$x" = "X$dir"; then
8010                           haveit=yes
8011                           break
8012                         fi
8013                       done
8014                       if test -z "$haveit"; then
8015                         ltrpathdirs="$ltrpathdirs $dir"
8016                       fi
8017                     fi
8018                     ;;
8019                   -l*)
8020                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8021                     ;;
8022                   *.la)
8023                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8024                     ;;
8025                   *)
8026                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8027                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8028                     ;;
8029                 esac
8030               done
8031             fi
8032           else
8033                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8034             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8035           fi
8036         fi
8037       fi
8038     done
8039   done
8040   if test "X$rpathdirs" != "X"; then
8041     if test -n "$hardcode_libdir_separator"; then
8042                         alldirs=
8043       for found_dir in $rpathdirs; do
8044         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8045       done
8046             acl_save_libdir="$libdir"
8047       libdir="$alldirs"
8048       eval flag=\"$hardcode_libdir_flag_spec\"
8049       libdir="$acl_save_libdir"
8050       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8051     else
8052             for found_dir in $rpathdirs; do
8053         acl_save_libdir="$libdir"
8054         libdir="$found_dir"
8055         eval flag=\"$hardcode_libdir_flag_spec\"
8056         libdir="$acl_save_libdir"
8057         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8058       done
8059     fi
8060   fi
8061   if test "X$ltrpathdirs" != "X"; then
8062             for found_dir in $ltrpathdirs; do
8063       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8064     done
8065   fi
8066
8067
8068         ac_save_CPPFLAGS="$CPPFLAGS"
8069
8070   for element in $INCEXPAT; do
8071     haveit=
8072     for x in $CPPFLAGS; do
8073
8074   acl_save_prefix="$prefix"
8075   prefix="$acl_final_prefix"
8076   acl_save_exec_prefix="$exec_prefix"
8077   exec_prefix="$acl_final_exec_prefix"
8078   eval x=\"$x\"
8079   exec_prefix="$acl_save_exec_prefix"
8080   prefix="$acl_save_prefix"
8081
8082       if test "X$x" = "X$element"; then
8083         haveit=yes
8084         break
8085       fi
8086     done
8087     if test -z "$haveit"; then
8088       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8089     fi
8090   done
8091
8092
8093   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8094 $as_echo_n "checking for libexpat... " >&6; }
8095 if test "${ac_cv_libexpat+set}" = set; then :
8096   $as_echo_n "(cached) " >&6
8097 else
8098
8099     ac_save_LIBS="$LIBS"
8100     LIBS="$LIBS $LIBEXPAT"
8101     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8102 /* end confdefs.h.  */
8103 #include "expat.h"
8104 int
8105 main ()
8106 {
8107 XML_Parser p = XML_ParserCreate (0);
8108   ;
8109   return 0;
8110 }
8111 _ACEOF
8112 if ac_fn_c_try_link "$LINENO"; then :
8113   ac_cv_libexpat=yes
8114 else
8115   ac_cv_libexpat=no
8116 fi
8117 rm -f core conftest.err conftest.$ac_objext \
8118     conftest$ac_exeext conftest.$ac_ext
8119     LIBS="$ac_save_LIBS"
8120
8121 fi
8122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8123 $as_echo "$ac_cv_libexpat" >&6; }
8124   if test "$ac_cv_libexpat" = yes; then
8125     HAVE_LIBEXPAT=yes
8126
8127 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
8128
8129     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8130 $as_echo_n "checking how to link with libexpat... " >&6; }
8131     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8132 $as_echo "$LIBEXPAT" >&6; }
8133   else
8134     HAVE_LIBEXPAT=no
8135             CPPFLAGS="$ac_save_CPPFLAGS"
8136     LIBEXPAT=
8137     LTLIBEXPAT=
8138   fi
8139
8140
8141
8142
8143
8144
8145   if test "$HAVE_LIBEXPAT" != yes; then
8146     if test "$with_expat" = yes; then
8147       as_fn_error "expat is missing or unusable" "$LINENO" 5
8148     else
8149       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8150 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8151     fi
8152   else
8153     save_LIBS=$LIBS
8154     LIBS="$LIBS $LIBEXPAT"
8155     for ac_func in XML_StopParser
8156 do :
8157   ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8158 if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
8159   cat >>confdefs.h <<_ACEOF
8160 #define HAVE_XML_STOPPARSER 1
8161 _ACEOF
8162
8163 fi
8164 done
8165
8166     LIBS=$save_LIBS
8167   fi
8168 fi
8169
8170 # --------------------- #
8171 # Check for libpython.  #
8172 # --------------------- #
8173
8174
8175
8176
8177
8178
8179 # Check whether --with-python was given.
8180 if test "${with_python+set}" = set; then :
8181   withval=$with_python;
8182 else
8183   with_python=auto
8184 fi
8185
8186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8187 $as_echo_n "checking whether to use python... " >&6; }
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8189 $as_echo "$with_python" >&6; }
8190
8191 if test "${with_python}" = no; then
8192   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8193 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8194   have_libpython=no
8195 else
8196   case "${with_python}" in
8197   [\\/]* | ?:[\\/]*)
8198     if test -d ${with_python}; then
8199       # Assume the python binary is ${with_python}/bin/python.
8200       python_prog="${with_python}/bin/python"
8201       python_prefix=
8202       # If python does not exit ${with_python}/bin, then try in
8203       # ${with_python}.  On Windows/MinGW, this is where the Python
8204       # executable is.
8205       if test ! -x "${python_prog}"; then
8206         python_prog="${with_python}/python"
8207         python_prefix=
8208       fi
8209       if test ! -x "${python_prog}"; then
8210         # Fall back to gdb 7.0/7.1 behaviour.
8211         python_prog=missing
8212         python_prefix=${with_python}
8213       fi
8214     elif test -x "${with_python}"; then
8215       # While we can't run python compiled for $host (unless host == build),
8216       # the user could write a script that provides the needed information,
8217       # so we support that.
8218       python_prog=${with_python}
8219       python_prefix=
8220     else
8221       as_fn_error "invalid value for --with-python" "$LINENO" 5
8222     fi
8223     ;;
8224   */*)
8225     # Disallow --with-python=foo/bar.
8226     as_fn_error "invalid value for --with-python" "$LINENO" 5
8227     ;;
8228   *)
8229     # The user has either specified auto, yes, or the name of the python
8230     # program assumed to be in $PATH.
8231     python_prefix=
8232     case "${with_python}" in
8233     yes | auto)
8234       if test ${build} = ${host}; then
8235         # Extract the first word of "python", so it can be a program name with args.
8236 set dummy python; ac_word=$2
8237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8238 $as_echo_n "checking for $ac_word... " >&6; }
8239 if test "${ac_cv_path_python_prog_path+set}" = set; then :
8240   $as_echo_n "(cached) " >&6
8241 else
8242   case $python_prog_path in
8243   [\\/]* | ?:[\\/]*)
8244   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8245   ;;
8246   *)
8247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8248 for as_dir in $PATH
8249 do
8250   IFS=$as_save_IFS
8251   test -z "$as_dir" && as_dir=.
8252     for ac_exec_ext in '' $ac_executable_extensions; do
8253   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8254     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8256     break 2
8257   fi
8258 done
8259   done
8260 IFS=$as_save_IFS
8261
8262   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8263   ;;
8264 esac
8265 fi
8266 python_prog_path=$ac_cv_path_python_prog_path
8267 if test -n "$python_prog_path"; then
8268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8269 $as_echo "$python_prog_path" >&6; }
8270 else
8271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8272 $as_echo "no" >&6; }
8273 fi
8274
8275
8276         if test "${python_prog_path}" = missing; then
8277           python_prog=missing
8278         else
8279           python_prog=${python_prog_path}
8280         fi
8281       else
8282         # Not much we can do except assume the cross-compiler will find the
8283         # right files.
8284         python_prog=missing
8285       fi
8286       ;;
8287     *)
8288       # While we can't run python compiled for $host (unless host == build),
8289       # the user could write a script that provides the needed information,
8290       # so we support that.
8291       python_prog="${with_python}"
8292       # Extract the first word of "${python_prog}", so it can be a program name with args.
8293 set dummy ${python_prog}; ac_word=$2
8294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8295 $as_echo_n "checking for $ac_word... " >&6; }
8296 if test "${ac_cv_path_python_prog_path+set}" = set; then :
8297   $as_echo_n "(cached) " >&6
8298 else
8299   case $python_prog_path in
8300   [\\/]* | ?:[\\/]*)
8301   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8302   ;;
8303   *)
8304   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305 for as_dir in $PATH
8306 do
8307   IFS=$as_save_IFS
8308   test -z "$as_dir" && as_dir=.
8309     for ac_exec_ext in '' $ac_executable_extensions; do
8310   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8311     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8313     break 2
8314   fi
8315 done
8316   done
8317 IFS=$as_save_IFS
8318
8319   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8320   ;;
8321 esac
8322 fi
8323 python_prog_path=$ac_cv_path_python_prog_path
8324 if test -n "$python_prog_path"; then
8325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8326 $as_echo "$python_prog_path" >&6; }
8327 else
8328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8329 $as_echo "no" >&6; }
8330 fi
8331
8332
8333       if test "${python_prog_path}" = missing; then
8334         as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8335       fi
8336       ;;
8337     esac
8338   esac
8339
8340   if test "${python_prog}" != missing; then
8341     # We have a python program to use, but it may be too old.
8342     # Don't flag an error for --with-python=auto (the default).
8343     have_python_config=yes
8344     python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8345     if test $? != 0; then
8346       have_python_config=failed
8347       if test "${with_python}" != auto; then
8348         as_fn_error "failure running python-config --includes" "$LINENO" 5
8349       fi
8350     fi
8351     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8352     if test $? != 0; then
8353       have_python_config=failed
8354       if test "${with_python}" != auto; then
8355         as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8356       fi
8357     fi
8358     python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8359     if test $? != 0; then
8360       have_python_config=failed
8361       if test "${with_python}" != auto; then
8362         as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8363       fi
8364     fi
8365   else
8366     # We do not have a python executable we can use to determine where
8367     # to find the Python headers and libs.  We cannot guess the include
8368     # path from the python_prefix either, because that include path
8369     # depends on the Python version.  So, there is nothing much we can
8370     # do except assume that the compiler will be able to find those files.
8371     python_includes=
8372     python_libs=
8373     have_python_config=no
8374   fi
8375
8376   # If we have python-config, only try the configuration it provides.
8377   # Otherwise fallback on the old way of trying different versions of
8378   # python in turn.
8379
8380   have_libpython=no
8381   if test "${have_python_config}" = yes; then
8382     # Determine the Python version by extracting "-lpython<version>"
8383     # part of the python_libs. <version> is usually X.Y with X and Y
8384     # being decimal numbers, but can also be XY (seen on Windows).
8385     #
8386     # The extraction is performed using sed with a regular expression.
8387     # Initially, the regexp used was using the '?' quantifier to make
8388     # the dot in the version number optional.  Unfortunately, this
8389     # does not work with non-GNU versions of sed because, because of
8390     # what looks like a limitation (the '?' quantifier does not work
8391     # with back-references).  We work around this limitation by using
8392     # the '*' quantifier instead.  It means that, in theory, we might
8393     # match unexpected version strings such as "-lpython2..7", but
8394     # this seems unlikely in practice.  And even if that happens,
8395     # an error will be triggered later on, when checking that version
8396     # number.
8397     python_version=`echo " ${python_libs} " \
8398                          | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
8399     case "${python_version}" in
8400     python*)
8401
8402   version=${python_version}
8403
8404   new_CPPFLAGS=${python_includes}
8405   new_LIBS=${python_libs}
8406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8407 $as_echo_n "checking for ${version}... " >&6; }
8408   save_CPPFLAGS=$CPPFLAGS
8409   save_LIBS=$LIBS
8410   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8411   LIBS="$LIBS $new_LIBS"
8412   found_usable_python=no
8413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8414 /* end confdefs.h.  */
8415 #include "Python.h"
8416 int
8417 main ()
8418 {
8419 Py_Initialize ();
8420   ;
8421   return 0;
8422 }
8423 _ACEOF
8424 if ac_fn_c_try_link "$LINENO"; then :
8425   have_libpython=${version}
8426                   found_usable_python=yes
8427                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8428                   PYTHON_LIBS=$new_LIBS
8429 fi
8430 rm -f core conftest.err conftest.$ac_objext \
8431     conftest$ac_exeext conftest.$ac_ext
8432   CPPFLAGS=$save_CPPFLAGS
8433   LIBS=$save_LIBS
8434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8435 $as_echo "${found_usable_python}" >&6; }
8436
8437       ;;
8438     *)
8439       as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
8440       ;;
8441     esac
8442   elif test "${have_python_config}" != failed; then
8443     if test "${have_libpython}" = no; then
8444
8445   version=python2.7
8446
8447   new_CPPFLAGS=${python_includes}
8448   new_LIBS="${python_libs} -lpython2.7"
8449   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8450 $as_echo_n "checking for ${version}... " >&6; }
8451   save_CPPFLAGS=$CPPFLAGS
8452   save_LIBS=$LIBS
8453   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8454   LIBS="$LIBS $new_LIBS"
8455   found_usable_python=no
8456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8457 /* end confdefs.h.  */
8458 #include "Python.h"
8459 int
8460 main ()
8461 {
8462 Py_Initialize ();
8463   ;
8464   return 0;
8465 }
8466 _ACEOF
8467 if ac_fn_c_try_link "$LINENO"; then :
8468   have_libpython=${version}
8469                   found_usable_python=yes
8470                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8471                   PYTHON_LIBS=$new_LIBS
8472 fi
8473 rm -f core conftest.err conftest.$ac_objext \
8474     conftest$ac_exeext conftest.$ac_ext
8475   CPPFLAGS=$save_CPPFLAGS
8476   LIBS=$save_LIBS
8477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8478 $as_echo "${found_usable_python}" >&6; }
8479
8480     fi
8481     if test "${have_libpython}" = no; then
8482
8483   version=python2.6
8484
8485   new_CPPFLAGS=${python_includes}
8486   new_LIBS="${python_libs} -lpython2.6"
8487   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8488 $as_echo_n "checking for ${version}... " >&6; }
8489   save_CPPFLAGS=$CPPFLAGS
8490   save_LIBS=$LIBS
8491   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8492   LIBS="$LIBS $new_LIBS"
8493   found_usable_python=no
8494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8495 /* end confdefs.h.  */
8496 #include "Python.h"
8497 int
8498 main ()
8499 {
8500 Py_Initialize ();
8501   ;
8502   return 0;
8503 }
8504 _ACEOF
8505 if ac_fn_c_try_link "$LINENO"; then :
8506   have_libpython=${version}
8507                   found_usable_python=yes
8508                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8509                   PYTHON_LIBS=$new_LIBS
8510 fi
8511 rm -f core conftest.err conftest.$ac_objext \
8512     conftest$ac_exeext conftest.$ac_ext
8513   CPPFLAGS=$save_CPPFLAGS
8514   LIBS=$save_LIBS
8515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8516 $as_echo "${found_usable_python}" >&6; }
8517
8518     fi
8519     if test ${have_libpython} = no; then
8520
8521   version=python2.5
8522
8523   new_CPPFLAGS=${python_includes}
8524   new_LIBS="${python_libs} -lpython2.5"
8525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8526 $as_echo_n "checking for ${version}... " >&6; }
8527   save_CPPFLAGS=$CPPFLAGS
8528   save_LIBS=$LIBS
8529   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8530   LIBS="$LIBS $new_LIBS"
8531   found_usable_python=no
8532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8533 /* end confdefs.h.  */
8534 #include "Python.h"
8535 int
8536 main ()
8537 {
8538 Py_Initialize ();
8539   ;
8540   return 0;
8541 }
8542 _ACEOF
8543 if ac_fn_c_try_link "$LINENO"; then :
8544   have_libpython=${version}
8545                   found_usable_python=yes
8546                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8547                   PYTHON_LIBS=$new_LIBS
8548 fi
8549 rm -f core conftest.err conftest.$ac_objext \
8550     conftest$ac_exeext conftest.$ac_ext
8551   CPPFLAGS=$save_CPPFLAGS
8552   LIBS=$save_LIBS
8553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8554 $as_echo "${found_usable_python}" >&6; }
8555
8556     fi
8557     if test ${have_libpython} = no; then
8558
8559   version=python2.4
8560
8561   new_CPPFLAGS=${python_includes}
8562   new_LIBS="${python_libs} -lpython2.4"
8563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8564 $as_echo_n "checking for ${version}... " >&6; }
8565   save_CPPFLAGS=$CPPFLAGS
8566   save_LIBS=$LIBS
8567   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8568   LIBS="$LIBS $new_LIBS"
8569   found_usable_python=no
8570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8571 /* end confdefs.h.  */
8572 #include "Python.h"
8573 int
8574 main ()
8575 {
8576 Py_Initialize ();
8577   ;
8578   return 0;
8579 }
8580 _ACEOF
8581 if ac_fn_c_try_link "$LINENO"; then :
8582   have_libpython=${version}
8583                   found_usable_python=yes
8584                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8585                   PYTHON_LIBS=$new_LIBS
8586 fi
8587 rm -f core conftest.err conftest.$ac_objext \
8588     conftest$ac_exeext conftest.$ac_ext
8589   CPPFLAGS=$save_CPPFLAGS
8590   LIBS=$save_LIBS
8591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8592 $as_echo "${found_usable_python}" >&6; }
8593
8594     fi
8595   fi
8596   if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
8597
8598 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8599
8600   elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
8601
8602 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8603
8604   elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
8605
8606 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8607
8608   elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
8609
8610 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8611
8612   fi
8613
8614   if test "${have_libpython}" = no; then
8615     case "${with_python}" in
8616     yes)
8617       as_fn_error "python is missing or unusable" "$LINENO" 5
8618       ;;
8619     auto)
8620       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8621 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8622       ;;
8623     *)
8624       as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8625       ;;
8626     esac
8627   else
8628     if test -n "${python_prefix}"; then
8629
8630 cat >>confdefs.h <<_ACEOF
8631 #define WITH_PYTHON_PATH "${python_prefix}"
8632 _ACEOF
8633
8634
8635   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8636      if test "x$prefix" = xNONE; then
8637         test_prefix=/usr/local
8638      else
8639         test_prefix=$prefix
8640      fi
8641   else
8642      test_prefix=$exec_prefix
8643   fi
8644   value=0
8645   case ${python_prefix} in
8646      "${test_prefix}"|"${test_prefix}/"*|\
8647         '${exec_prefix}'|'${exec_prefix}/'*)
8648      value=1
8649      ;;
8650   esac
8651
8652 cat >>confdefs.h <<_ACEOF
8653 #define PYTHON_PATH_RELOCATABLE $value
8654 _ACEOF
8655
8656
8657     fi
8658   fi
8659 fi
8660
8661 if test "${have_libpython}" != no; then
8662
8663 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
8664
8665   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8666   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8667   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
8668   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
8669   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
8670
8671   # Flags needed to compile Python code (taken from python-config --cflags).
8672   # We cannot call python-config directly because it will output whatever was
8673   # used when compiling the Python interpreter itself, including flags which
8674   # would make the python-related objects be compiled differently from the
8675   # rest of GDB (e.g., -O2 and -fPIC).
8676   if test "${GCC}" = yes; then
8677     tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8678   fi
8679
8680   if test "x${tentative_python_cflags}" != x; then
8681     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8682 $as_echo_n "checking compiler flags for python code... " >&6; }
8683     for flag in ${tentative_python_cflags}; do
8684       # Check that the compiler accepts it
8685       saved_CFLAGS="$CFLAGS"
8686       CFLAGS="$CFLAGS $flag"
8687       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8688 /* end confdefs.h.  */
8689
8690 int
8691 main ()
8692 {
8693
8694   ;
8695   return 0;
8696 }
8697 _ACEOF
8698 if ac_fn_c_try_compile "$LINENO"; then :
8699   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
8700 fi
8701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8702       CFLAGS="$saved_CFLAGS"
8703     done
8704     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8705 $as_echo "${PYTHON_CFLAGS}" >&6; }
8706   fi
8707
8708   # On x64 Windows, Python's include headers, and pyconfig.h in
8709   # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8710   # version of Windows.  Unfortunately, MS_WIN64 is only defined if
8711   # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
8712   # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8713   # The issue was reported to the Python community, but still isn't
8714   # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8715
8716   case "$gdb_host" in
8717     mingw64)
8718            if test "${GCC}" = yes; then
8719              CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8720            fi
8721            ;;
8722   esac
8723
8724   # Note that "python -m threading" cannot be used to check for
8725   # threading support due to a bug in Python 2.7.3
8726   # (http://bugs.python.org/issue15567).
8727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8728 $as_echo_n "checking whether python supports threads... " >&6; }
8729   saved_CPPFLAGS="${CPPFLAGS}"
8730   CPPFLAGS="${PYTHON_CPPFLAGS}"
8731   # Note that the test is reversed so that python_has_threads=yes on
8732   # unexpected failures.
8733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8734 /* end confdefs.h.  */
8735
8736 #include <Python.h>
8737 #ifdef WITH_THREAD
8738 # error
8739 #endif
8740
8741 _ACEOF
8742 if ac_fn_c_try_cpp "$LINENO"; then :
8743   python_has_threads=no
8744 else
8745   python_has_threads=yes
8746 fi
8747 rm -f conftest.err conftest.$ac_ext
8748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8749 $as_echo "${python_has_threads}" >&6; }
8750   CPPFLAGS="${saved_CPPFLAGS}"
8751 else
8752   # Even if Python support is not compiled in, we need to have this file
8753   # included so that the "python" command, et.al., still exists.
8754   CONFIG_OBS="$CONFIG_OBS python.o"
8755   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
8756 fi
8757
8758
8759
8760  if test "${have_libpython}" != no; then
8761   HAVE_PYTHON_TRUE=
8762   HAVE_PYTHON_FALSE='#'
8763 else
8764   HAVE_PYTHON_TRUE='#'
8765   HAVE_PYTHON_FALSE=
8766 fi
8767
8768
8769 # -------------------- #
8770 # Check for libguile.  #
8771 # -------------------- #
8772
8773
8774
8775
8776
8777
8778 # Check whether --with-guile was given.
8779 if test "${with_guile+set}" = set; then :
8780   withval=$with_guile;
8781 else
8782   with_guile=auto
8783 fi
8784
8785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
8786 $as_echo_n "checking whether to use guile... " >&6; }
8787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
8788 $as_echo "$with_guile" >&6; }
8789
8790 # Extract the first word of "pkg-config", so it can be a program name with args.
8791 set dummy pkg-config; ac_word=$2
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8793 $as_echo_n "checking for $ac_word... " >&6; }
8794 if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
8795   $as_echo_n "(cached) " >&6
8796 else
8797   case $pkg_config_prog_path in
8798   [\\/]* | ?:[\\/]*)
8799   ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
8800   ;;
8801   *)
8802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8803 for as_dir in $PATH
8804 do
8805   IFS=$as_save_IFS
8806   test -z "$as_dir" && as_dir=.
8807     for ac_exec_ext in '' $ac_executable_extensions; do
8808   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8809     ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
8810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8811     break 2
8812   fi
8813 done
8814   done
8815 IFS=$as_save_IFS
8816
8817   test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
8818   ;;
8819 esac
8820 fi
8821 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
8822 if test -n "$pkg_config_prog_path"; then
8823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
8824 $as_echo "$pkg_config_prog_path" >&6; }
8825 else
8826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827 $as_echo "no" >&6; }
8828 fi
8829
8830
8831
8832 try_guile_versions="guile-2.2 guile-2.0"
8833 have_libguile=no
8834 case "${with_guile}" in
8835 no)
8836   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
8837 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
8838   ;;
8839 auto)
8840   if test "${pkg_config_prog_path}" = "missing"; then
8841     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
8842 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
8843   else
8844
8845   pkg_config=${pkg_config_prog_path}
8846   guile_version_list=${try_guile_versions}
8847   flag_errors=no
8848
8849   found_usable_guile=checking
8850   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8851 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8852   for guile_version in ${guile_version_list}; do
8853     ${pkg_config} --exists ${guile_version} 2>/dev/null
8854     if test $? != 0; then
8855       continue
8856     fi
8857             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8858     if test $? != 0; then
8859       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8860     fi
8861     new_LIBS=`${pkg_config} --libs ${guile_version}`
8862     if test $? != 0; then
8863       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8864     fi
8865         found_usable_guile=${guile_version}
8866     break
8867   done
8868   if test "${found_usable_guile}" = "checking"; then
8869     if test "${flag_errors}" = "yes"; then
8870       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8871     else
8872       found_usable_guile=no
8873     fi
8874   fi
8875       if test "${found_usable_guile}" != no; then
8876     save_CPPFLAGS=$CPPFLAGS
8877     save_LIBS=$LIBS
8878     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8879     LIBS="$LIBS $new_LIBS"
8880     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8881 /* end confdefs.h.  */
8882 #include "libguile.h"
8883 int
8884 main ()
8885 {
8886 scm_init_guile ();
8887   ;
8888   return 0;
8889 }
8890 _ACEOF
8891 if ac_fn_c_try_link "$LINENO"; then :
8892   have_libguile=yes
8893                     GUILE_CPPFLAGS=$new_CPPFLAGS
8894                     GUILE_LIBS=$new_LIBS
8895 else
8896   found_usable_guile=no
8897 fi
8898 rm -f core conftest.err conftest.$ac_objext \
8899     conftest$ac_exeext conftest.$ac_ext
8900     CPPFLAGS=$save_CPPFLAGS
8901     LIBS=$save_LIBS
8902     if test "${found_usable_guile}" = no; then
8903       if test "${flag_errors}" = yes; then
8904         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8905 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8906 as_fn_error "linking guile version ${guile_version} test program failed
8907 See \`config.log' for more details." "$LINENO" 5; }
8908       fi
8909     fi
8910   fi
8911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8912 $as_echo "${found_usable_guile}" >&6; }
8913
8914   fi
8915   ;;
8916 yes)
8917   if test "${pkg_config_prog_path}" = "missing"; then
8918     as_fn_error "pkg-config not found" "$LINENO" 5
8919   fi
8920
8921   pkg_config=${pkg_config_prog_path}
8922   guile_version_list=${try_guile_versions}
8923   flag_errors=yes
8924
8925   found_usable_guile=checking
8926   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8927 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8928   for guile_version in ${guile_version_list}; do
8929     ${pkg_config} --exists ${guile_version} 2>/dev/null
8930     if test $? != 0; then
8931       continue
8932     fi
8933             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8934     if test $? != 0; then
8935       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8936     fi
8937     new_LIBS=`${pkg_config} --libs ${guile_version}`
8938     if test $? != 0; then
8939       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8940     fi
8941         found_usable_guile=${guile_version}
8942     break
8943   done
8944   if test "${found_usable_guile}" = "checking"; then
8945     if test "${flag_errors}" = "yes"; then
8946       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8947     else
8948       found_usable_guile=no
8949     fi
8950   fi
8951       if test "${found_usable_guile}" != no; then
8952     save_CPPFLAGS=$CPPFLAGS
8953     save_LIBS=$LIBS
8954     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8955     LIBS="$LIBS $new_LIBS"
8956     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8957 /* end confdefs.h.  */
8958 #include "libguile.h"
8959 int
8960 main ()
8961 {
8962 scm_init_guile ();
8963   ;
8964   return 0;
8965 }
8966 _ACEOF
8967 if ac_fn_c_try_link "$LINENO"; then :
8968   have_libguile=yes
8969                     GUILE_CPPFLAGS=$new_CPPFLAGS
8970                     GUILE_LIBS=$new_LIBS
8971 else
8972   found_usable_guile=no
8973 fi
8974 rm -f core conftest.err conftest.$ac_objext \
8975     conftest$ac_exeext conftest.$ac_ext
8976     CPPFLAGS=$save_CPPFLAGS
8977     LIBS=$save_LIBS
8978     if test "${found_usable_guile}" = no; then
8979       if test "${flag_errors}" = yes; then
8980         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8981 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8982 as_fn_error "linking guile version ${guile_version} test program failed
8983 See \`config.log' for more details." "$LINENO" 5; }
8984       fi
8985     fi
8986   fi
8987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8988 $as_echo "${found_usable_guile}" >&6; }
8989
8990   ;;
8991 [\\/]* | ?:[\\/]*)
8992   if test -x "${with_guile}"; then
8993
8994   pkg_config=${with_guile}
8995   guile_version_list=${try_guile_versions}
8996   flag_errors=yes
8997
8998   found_usable_guile=checking
8999   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9000 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9001   for guile_version in ${guile_version_list}; do
9002     ${pkg_config} --exists ${guile_version} 2>/dev/null
9003     if test $? != 0; then
9004       continue
9005     fi
9006             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9007     if test $? != 0; then
9008       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9009     fi
9010     new_LIBS=`${pkg_config} --libs ${guile_version}`
9011     if test $? != 0; then
9012       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9013     fi
9014         found_usable_guile=${guile_version}
9015     break
9016   done
9017   if test "${found_usable_guile}" = "checking"; then
9018     if test "${flag_errors}" = "yes"; then
9019       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9020     else
9021       found_usable_guile=no
9022     fi
9023   fi
9024       if test "${found_usable_guile}" != no; then
9025     save_CPPFLAGS=$CPPFLAGS
9026     save_LIBS=$LIBS
9027     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9028     LIBS="$LIBS $new_LIBS"
9029     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9030 /* end confdefs.h.  */
9031 #include "libguile.h"
9032 int
9033 main ()
9034 {
9035 scm_init_guile ();
9036   ;
9037   return 0;
9038 }
9039 _ACEOF
9040 if ac_fn_c_try_link "$LINENO"; then :
9041   have_libguile=yes
9042                     GUILE_CPPFLAGS=$new_CPPFLAGS
9043                     GUILE_LIBS=$new_LIBS
9044 else
9045   found_usable_guile=no
9046 fi
9047 rm -f core conftest.err conftest.$ac_objext \
9048     conftest$ac_exeext conftest.$ac_ext
9049     CPPFLAGS=$save_CPPFLAGS
9050     LIBS=$save_LIBS
9051     if test "${found_usable_guile}" = no; then
9052       if test "${flag_errors}" = yes; then
9053         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9054 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9055 as_fn_error "linking guile version ${guile_version} test program failed
9056 See \`config.log' for more details." "$LINENO" 5; }
9057       fi
9058     fi
9059   fi
9060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9061 $as_echo "${found_usable_guile}" >&6; }
9062
9063   else
9064     as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9065   fi
9066   ;;
9067 "" | */*)
9068   # Disallow --with=guile="" and --with-guile=foo/bar.
9069   as_fn_error "invalid value for --with-guile" "$LINENO" 5
9070   ;;
9071 *)
9072   # A space separate list of guile versions to try, in order.
9073   if test "${pkg_config_prog_path}" = "missing"; then
9074     as_fn_error "pkg-config not found" "$LINENO" 5
9075   fi
9076
9077   pkg_config=${pkg_config_prog_path}
9078   guile_version_list=${with_guile}
9079   flag_errors=yes
9080
9081   found_usable_guile=checking
9082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9083 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9084   for guile_version in ${guile_version_list}; do
9085     ${pkg_config} --exists ${guile_version} 2>/dev/null
9086     if test $? != 0; then
9087       continue
9088     fi
9089             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9090     if test $? != 0; then
9091       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9092     fi
9093     new_LIBS=`${pkg_config} --libs ${guile_version}`
9094     if test $? != 0; then
9095       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9096     fi
9097         found_usable_guile=${guile_version}
9098     break
9099   done
9100   if test "${found_usable_guile}" = "checking"; then
9101     if test "${flag_errors}" = "yes"; then
9102       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9103     else
9104       found_usable_guile=no
9105     fi
9106   fi
9107       if test "${found_usable_guile}" != no; then
9108     save_CPPFLAGS=$CPPFLAGS
9109     save_LIBS=$LIBS
9110     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9111     LIBS="$LIBS $new_LIBS"
9112     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9113 /* end confdefs.h.  */
9114 #include "libguile.h"
9115 int
9116 main ()
9117 {
9118 scm_init_guile ();
9119   ;
9120   return 0;
9121 }
9122 _ACEOF
9123 if ac_fn_c_try_link "$LINENO"; then :
9124   have_libguile=yes
9125                     GUILE_CPPFLAGS=$new_CPPFLAGS
9126                     GUILE_LIBS=$new_LIBS
9127 else
9128   found_usable_guile=no
9129 fi
9130 rm -f core conftest.err conftest.$ac_objext \
9131     conftest$ac_exeext conftest.$ac_ext
9132     CPPFLAGS=$save_CPPFLAGS
9133     LIBS=$save_LIBS
9134     if test "${found_usable_guile}" = no; then
9135       if test "${flag_errors}" = yes; then
9136         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9137 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9138 as_fn_error "linking guile version ${guile_version} test program failed
9139 See \`config.log' for more details." "$LINENO" 5; }
9140       fi
9141     fi
9142   fi
9143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9144 $as_echo "${found_usable_guile}" >&6; }
9145
9146   ;;
9147 esac
9148
9149 if test "${have_libguile}" != no; then
9150     case "${with_guile}" in
9151   [\\/]* | ?:[\\/]*)
9152
9153   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9154 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9155 if test "${ac_cv_guild_program_name+set}" = set; then :
9156   $as_echo_n "(cached) " >&6
9157 else
9158   ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
9159
9160      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9161      # the 'guild' and 'bindir' variables.  In that case, try to guess
9162      # what the program name is, at the risk of getting it wrong if
9163      # Guile was configured with '--program-suffix' or similar.
9164      if test "x$ac_cv_guild_program_name" = "x"; then
9165        guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
9166        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9167      fi
9168
9169 fi
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9171 $as_echo "$ac_cv_guild_program_name" >&6; }
9172
9173   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9174     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9175   fi
9176
9177   GUILD="$ac_cv_guild_program_name"
9178
9179
9180     ;;
9181   *)
9182
9183   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9184 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9185 if test "${ac_cv_guild_program_name+set}" = set; then :
9186   $as_echo_n "(cached) " >&6
9187 else
9188   ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9189
9190      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9191      # the 'guild' and 'bindir' variables.  In that case, try to guess
9192      # what the program name is, at the risk of getting it wrong if
9193      # Guile was configured with '--program-suffix' or similar.
9194      if test "x$ac_cv_guild_program_name" = "x"; then
9195        guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9196        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9197      fi
9198
9199 fi
9200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9201 $as_echo "$ac_cv_guild_program_name" >&6; }
9202
9203   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9204     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9205   fi
9206
9207   GUILD="$ac_cv_guild_program_name"
9208
9209
9210     ;;
9211   esac
9212
9213
9214   if test "$cross_compiling" = no; then
9215     GUILD_TARGET_FLAG=
9216   else
9217     GUILD_TARGET_FLAG="--target=$host"
9218   fi
9219
9220
9221
9222
9223   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9224 $as_echo_n "checking whether guild supports this host... " >&6; }
9225 if test "${ac_cv_guild_ok+set}" = set; then :
9226   $as_echo_n "(cached) " >&6
9227 else
9228   echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9229      if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9230        ac_cv_guild_ok=yes
9231      else
9232        ac_cv_guild_ok=no
9233      fi
9234 fi
9235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9236 $as_echo "$ac_cv_guild_ok" >&6; }
9237
9238     if test "$ac_cv_guild_ok" = no; then
9239     have_libguile=no
9240     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9241 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
9242   fi
9243 fi
9244
9245 if test "${have_libguile}" != no; then
9246
9247 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
9248
9249   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9250   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9251   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9252   CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9253   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
9254
9255     save_LIBS="$LIBS"
9256   save_CPPFLAGS="$CPPFLAGS"
9257   LIBS="$GUILE_LIBS"
9258   CPPFLAGS="$GUILE_CPPFLAGS"
9259   for ac_func in scm_new_smob
9260 do :
9261   ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9262 if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9263   cat >>confdefs.h <<_ACEOF
9264 #define HAVE_SCM_NEW_SMOB 1
9265 _ACEOF
9266
9267 fi
9268 done
9269
9270   LIBS="$save_LIBS"
9271   CPPFLAGS="$save_CPPFLAGS"
9272 else
9273   # Even if Guile support is not compiled in, we need to have these files
9274   # included.
9275   CONFIG_OBS="$CONFIG_OBS guile.o"
9276   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9277 fi
9278
9279
9280  if test "${have_libguile}" != no; then
9281   HAVE_GUILE_TRUE=
9282   HAVE_GUILE_FALSE='#'
9283 else
9284   HAVE_GUILE_TRUE='#'
9285   HAVE_GUILE_FALSE=
9286 fi
9287
9288
9289 # --------------------- #
9290 # Check for libmcheck.  #
9291 # --------------------- #
9292
9293 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
9294 # but turn it off if Python is enabled with threads, since -lmcheck is
9295 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9296 # and for releases.
9297 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9298    && $development; then
9299   libmcheck_default=yes
9300 else
9301   libmcheck_default=no
9302 fi
9303
9304   # Check whether --enable-libmcheck was given.
9305 if test "${enable_libmcheck+set}" = set; then :
9306   enableval=$enable_libmcheck; case "${enableval}" in
9307       yes | y) ENABLE_LIBMCHECK="yes" ;;
9308       no | n)  ENABLE_LIBMCHECK="no" ;;
9309       *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
9310     esac
9311 fi
9312
9313
9314   if test -z "${ENABLE_LIBMCHECK}"; then
9315     ENABLE_LIBMCHECK=${libmcheck_default}
9316   fi
9317
9318   if test "$ENABLE_LIBMCHECK" = "yes" ; then
9319     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
9320 $as_echo_n "checking for main in -lmcheck... " >&6; }
9321 if test "${ac_cv_lib_mcheck_main+set}" = set; then :
9322   $as_echo_n "(cached) " >&6
9323 else
9324   ac_check_lib_save_LIBS=$LIBS
9325 LIBS="-lmcheck  $LIBS"
9326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9327 /* end confdefs.h.  */
9328
9329
9330 int
9331 main ()
9332 {
9333 return main ();
9334   ;
9335   return 0;
9336 }
9337 _ACEOF
9338 if ac_fn_c_try_link "$LINENO"; then :
9339   ac_cv_lib_mcheck_main=yes
9340 else
9341   ac_cv_lib_mcheck_main=no
9342 fi
9343 rm -f core conftest.err conftest.$ac_objext \
9344     conftest$ac_exeext conftest.$ac_ext
9345 LIBS=$ac_check_lib_save_LIBS
9346 fi
9347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
9348 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
9349 if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
9350   cat >>confdefs.h <<_ACEOF
9351 #define HAVE_LIBMCHECK 1
9352 _ACEOF
9353
9354   LIBS="-lmcheck $LIBS"
9355
9356 fi
9357
9358   fi
9359
9360
9361 if test "$ENABLE_LIBMCHECK" = "yes" \
9362         -a "${have_libpython}" != "no" \
9363         -a "${python_has_threads}" = "yes" ; then
9364   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
9365 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
9366 fi
9367
9368 # ------------------------- #
9369 # Checks for header files.  #
9370 # ------------------------- #
9371
9372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9373 $as_echo_n "checking for ANSI C header files... " >&6; }
9374 if test "${ac_cv_header_stdc+set}" = set; then :
9375   $as_echo_n "(cached) " >&6
9376 else
9377   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9378 /* end confdefs.h.  */
9379 #include <stdlib.h>
9380 #include <stdarg.h>
9381 #include <string.h>
9382 #include <float.h>
9383
9384 int
9385 main ()
9386 {
9387
9388   ;
9389   return 0;
9390 }
9391 _ACEOF
9392 if ac_fn_c_try_compile "$LINENO"; then :
9393   ac_cv_header_stdc=yes
9394 else
9395   ac_cv_header_stdc=no
9396 fi
9397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9398
9399 if test $ac_cv_header_stdc = yes; then
9400   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9402 /* end confdefs.h.  */
9403 #include <string.h>
9404
9405 _ACEOF
9406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9407   $EGREP "memchr" >/dev/null 2>&1; then :
9408
9409 else
9410   ac_cv_header_stdc=no
9411 fi
9412 rm -f conftest*
9413
9414 fi
9415
9416 if test $ac_cv_header_stdc = yes; then
9417   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9419 /* end confdefs.h.  */
9420 #include <stdlib.h>
9421
9422 _ACEOF
9423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9424   $EGREP "free" >/dev/null 2>&1; then :
9425
9426 else
9427   ac_cv_header_stdc=no
9428 fi
9429 rm -f conftest*
9430
9431 fi
9432
9433 if test $ac_cv_header_stdc = yes; then
9434   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9435   if test "$cross_compiling" = yes; then :
9436   :
9437 else
9438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9439 /* end confdefs.h.  */
9440 #include <ctype.h>
9441 #include <stdlib.h>
9442 #if ((' ' & 0x0FF) == 0x020)
9443 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9444 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9445 #else
9446 # define ISLOWER(c) \
9447                    (('a' <= (c) && (c) <= 'i') \
9448                      || ('j' <= (c) && (c) <= 'r') \
9449                      || ('s' <= (c) && (c) <= 'z'))
9450 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9451 #endif
9452
9453 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9454 int
9455 main ()
9456 {
9457   int i;
9458   for (i = 0; i < 256; i++)
9459     if (XOR (islower (i), ISLOWER (i))
9460         || toupper (i) != TOUPPER (i))
9461       return 2;
9462   return 0;
9463 }
9464 _ACEOF
9465 if ac_fn_c_try_run "$LINENO"; then :
9466
9467 else
9468   ac_cv_header_stdc=no
9469 fi
9470 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9471   conftest.$ac_objext conftest.beam conftest.$ac_ext
9472 fi
9473
9474 fi
9475 fi
9476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9477 $as_echo "$ac_cv_header_stdc" >&6; }
9478 if test $ac_cv_header_stdc = yes; then
9479
9480 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9481
9482 fi
9483
9484 # elf_hp.h is for HP/UX 64-bit shared library support.
9485 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
9486                   thread_db.h \
9487                   sys/fault.h \
9488                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9489                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9490                   sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9491                   termios.h termio.h \
9492                   sgtty.h elf_hp.h \
9493                   dlfcn.h
9494 do :
9495   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9496 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9497 eval as_val=\$$as_ac_Header
9498    if test "x$as_val" = x""yes; then :
9499   cat >>confdefs.h <<_ACEOF
9500 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9501 _ACEOF
9502
9503 fi
9504
9505 done
9506
9507 for ac_header in sys/proc.h
9508 do :
9509   ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9510 # include <sys/param.h>
9511 #endif
9512
9513 "
9514 if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
9515   cat >>confdefs.h <<_ACEOF
9516 #define HAVE_SYS_PROC_H 1
9517 _ACEOF
9518
9519 fi
9520
9521 done
9522
9523 for ac_header in sys/user.h
9524 do :
9525   ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9526 # include <sys/param.h>
9527 #endif
9528
9529 "
9530 if test "x$ac_cv_header_sys_user_h" = x""yes; then :
9531   cat >>confdefs.h <<_ACEOF
9532 #define HAVE_SYS_USER_H 1
9533 _ACEOF
9534
9535 fi
9536
9537 done
9538
9539
9540 # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
9541 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9542 # think that we don't have <curses.h> if we're using GCC.
9543 case $host_os in
9544   solaris2.[789])
9545     if test "$GCC" = yes; then
9546
9547 $as_echo "#define _MSE_INT_H 1" >>confdefs.h
9548
9549     fi ;;
9550 esac
9551 for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
9552 do :
9553   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9554 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9555 eval as_val=\$$as_ac_Header
9556    if test "x$as_val" = x""yes; then :
9557   cat >>confdefs.h <<_ACEOF
9558 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9559 _ACEOF
9560
9561 fi
9562
9563 done
9564
9565 for ac_header in term.h
9566 do :
9567   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9568 # include <curses.h>
9569 #endif
9570
9571 "
9572 if test "x$ac_cv_header_term_h" = x""yes; then :
9573   cat >>confdefs.h <<_ACEOF
9574 #define HAVE_TERM_H 1
9575 _ACEOF
9576
9577 fi
9578
9579 done
9580
9581
9582 # ------------------------- #
9583 # Checks for declarations.  #
9584 # ------------------------- #
9585
9586 ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9587 if test "x$ac_cv_have_decl_free" = x""yes; then :
9588   ac_have_decl=1
9589 else
9590   ac_have_decl=0
9591 fi
9592
9593 cat >>confdefs.h <<_ACEOF
9594 #define HAVE_DECL_FREE $ac_have_decl
9595 _ACEOF
9596 ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9597 if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9598   ac_have_decl=1
9599 else
9600   ac_have_decl=0
9601 fi
9602
9603 cat >>confdefs.h <<_ACEOF
9604 #define HAVE_DECL_MALLOC $ac_have_decl
9605 _ACEOF
9606 ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9607 if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9608   ac_have_decl=1
9609 else
9610   ac_have_decl=0
9611 fi
9612
9613 cat >>confdefs.h <<_ACEOF
9614 #define HAVE_DECL_REALLOC $ac_have_decl
9615 _ACEOF
9616 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9617 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9618   ac_have_decl=1
9619 else
9620   ac_have_decl=0
9621 fi
9622
9623 cat >>confdefs.h <<_ACEOF
9624 #define HAVE_DECL_SNPRINTF $ac_have_decl
9625 _ACEOF
9626
9627
9628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9629 $as_echo_n "checking for LC_MESSAGES... " >&6; }
9630 if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9631   $as_echo_n "(cached) " >&6
9632 else
9633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9634 /* end confdefs.h.  */
9635 #include <locale.h>
9636 int
9637 main ()
9638 {
9639 return LC_MESSAGES
9640   ;
9641   return 0;
9642 }
9643 _ACEOF
9644 if ac_fn_c_try_link "$LINENO"; then :
9645   am_cv_val_LC_MESSAGES=yes
9646 else
9647   am_cv_val_LC_MESSAGES=no
9648 fi
9649 rm -f core conftest.err conftest.$ac_objext \
9650     conftest$ac_exeext conftest.$ac_ext
9651 fi
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9653 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9654   if test $am_cv_val_LC_MESSAGES = yes; then
9655
9656 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9657
9658   fi
9659
9660
9661 # ----------------------- #
9662 # Checks for structures.  #
9663 # ----------------------- #
9664
9665 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9666 if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9667
9668 cat >>confdefs.h <<_ACEOF
9669 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
9670 _ACEOF
9671
9672
9673 fi
9674 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9675 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
9676
9677 cat >>confdefs.h <<_ACEOF
9678 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
9679 _ACEOF
9680
9681
9682 fi
9683
9684
9685 # ------------------ #
9686 # Checks for types.  #
9687 # ------------------ #
9688
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9690 $as_echo_n "checking return type of signal handlers... " >&6; }
9691 if test "${ac_cv_type_signal+set}" = set; then :
9692   $as_echo_n "(cached) " >&6
9693 else
9694   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9695 /* end confdefs.h.  */
9696 #include <sys/types.h>
9697 #include <signal.h>
9698
9699 int
9700 main ()
9701 {
9702 return *(signal (0, 0)) (0) == 1;
9703   ;
9704   return 0;
9705 }
9706 _ACEOF
9707 if ac_fn_c_try_compile "$LINENO"; then :
9708   ac_cv_type_signal=int
9709 else
9710   ac_cv_type_signal=void
9711 fi
9712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9713 fi
9714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9715 $as_echo "$ac_cv_type_signal" >&6; }
9716
9717 cat >>confdefs.h <<_ACEOF
9718 #define RETSIGTYPE $ac_cv_type_signal
9719 _ACEOF
9720
9721
9722 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
9723 #include <sys/socket.h>
9724
9725 "
9726 if test "x$ac_cv_type_socklen_t" = x""yes; then :
9727
9728 cat >>confdefs.h <<_ACEOF
9729 #define HAVE_SOCKLEN_T 1
9730 _ACEOF
9731
9732
9733 fi
9734
9735
9736 # ------------------------------------- #
9737 # Checks for compiler characteristics.  #
9738 # ------------------------------------- #
9739
9740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9741 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9742 if test "${ac_cv_c_const+set}" = set; then :
9743   $as_echo_n "(cached) " >&6
9744 else
9745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9746 /* end confdefs.h.  */
9747
9748 int
9749 main ()
9750 {
9751 /* FIXME: Include the comments suggested by Paul. */
9752 #ifndef __cplusplus
9753   /* Ultrix mips cc rejects this.  */
9754   typedef int charset[2];
9755   const charset cs;
9756   /* SunOS 4.1.1 cc rejects this.  */
9757   char const *const *pcpcc;
9758   char **ppc;
9759   /* NEC SVR4.0.2 mips cc rejects this.  */
9760   struct point {int x, y;};
9761   static struct point const zero = {0,0};
9762   /* AIX XL C 1.02.0.0 rejects this.
9763      It does not let you subtract one const X* pointer from another in
9764      an arm of an if-expression whose if-part is not a constant
9765      expression */
9766   const char *g = "string";
9767   pcpcc = &g + (g ? g-g : 0);
9768   /* HPUX 7.0 cc rejects these. */
9769   ++pcpcc;
9770   ppc = (char**) pcpcc;
9771   pcpcc = (char const *const *) ppc;
9772   { /* SCO 3.2v4 cc rejects this.  */
9773     char *t;
9774     char const *s = 0 ? (char *) 0 : (char const *) 0;
9775
9776     *t++ = 0;
9777     if (s) return 0;
9778   }
9779   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9780     int x[] = {25, 17};
9781     const int *foo = &x[0];
9782     ++foo;
9783   }
9784   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9785     typedef const int *iptr;
9786     iptr p = 0;
9787     ++p;
9788   }
9789   { /* AIX XL C 1.02.0.0 rejects this saying
9790        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9791     struct s { int j; const int *ap[3]; };
9792     struct s *b; b->j = 5;
9793   }
9794   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9795     const int foo = 10;
9796     if (!foo) return 0;
9797   }
9798   return !cs[0] && !zero.x;
9799 #endif
9800
9801   ;
9802   return 0;
9803 }
9804 _ACEOF
9805 if ac_fn_c_try_compile "$LINENO"; then :
9806   ac_cv_c_const=yes
9807 else
9808   ac_cv_c_const=no
9809 fi
9810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9811 fi
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9813 $as_echo "$ac_cv_c_const" >&6; }
9814 if test $ac_cv_c_const = no; then
9815
9816 $as_echo "#define const /**/" >>confdefs.h
9817
9818 fi
9819
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9821 $as_echo_n "checking for inline... " >&6; }
9822 if test "${ac_cv_c_inline+set}" = set; then :
9823   $as_echo_n "(cached) " >&6
9824 else
9825   ac_cv_c_inline=no
9826 for ac_kw in inline __inline__ __inline; do
9827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9828 /* end confdefs.h.  */
9829 #ifndef __cplusplus
9830 typedef int foo_t;
9831 static $ac_kw foo_t static_foo () {return 0; }
9832 $ac_kw foo_t foo () {return 0; }
9833 #endif
9834
9835 _ACEOF
9836 if ac_fn_c_try_compile "$LINENO"; then :
9837   ac_cv_c_inline=$ac_kw
9838 fi
9839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9840   test "$ac_cv_c_inline" != no && break
9841 done
9842
9843 fi
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9845 $as_echo "$ac_cv_c_inline" >&6; }
9846
9847 case $ac_cv_c_inline in
9848   inline | yes) ;;
9849   *)
9850     case $ac_cv_c_inline in
9851       no) ac_val=;;
9852       *) ac_val=$ac_cv_c_inline;;
9853     esac
9854     cat >>confdefs.h <<_ACEOF
9855 #ifndef __cplusplus
9856 #define inline $ac_val
9857 #endif
9858 _ACEOF
9859     ;;
9860 esac
9861
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9863 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9864 if test "${ac_cv_c_bigendian+set}" = set; then :
9865   $as_echo_n "(cached) " >&6
9866 else
9867   ac_cv_c_bigendian=unknown
9868     # See if we're dealing with a universal compiler.
9869     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9870 /* end confdefs.h.  */
9871 #ifndef __APPLE_CC__
9872                not a universal capable compiler
9873              #endif
9874              typedef int dummy;
9875
9876 _ACEOF
9877 if ac_fn_c_try_compile "$LINENO"; then :
9878
9879         # Check for potential -arch flags.  It is not universal unless
9880         # there are at least two -arch flags with different values.
9881         ac_arch=
9882         ac_prev=
9883         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9884          if test -n "$ac_prev"; then
9885            case $ac_word in
9886              i?86 | x86_64 | ppc | ppc64)
9887                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9888                  ac_arch=$ac_word
9889                else
9890                  ac_cv_c_bigendian=universal
9891                  break
9892                fi
9893                ;;
9894            esac
9895            ac_prev=
9896          elif test "x$ac_word" = "x-arch"; then
9897            ac_prev=arch
9898          fi
9899        done
9900 fi
9901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9902     if test $ac_cv_c_bigendian = unknown; then
9903       # See if sys/param.h defines the BYTE_ORDER macro.
9904       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9905 /* end confdefs.h.  */
9906 #include <sys/types.h>
9907              #include <sys/param.h>
9908
9909 int
9910 main ()
9911 {
9912 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9913                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9914                      && LITTLE_ENDIAN)
9915               bogus endian macros
9916              #endif
9917
9918   ;
9919   return 0;
9920 }
9921 _ACEOF
9922 if ac_fn_c_try_compile "$LINENO"; then :
9923   # It does; now see whether it defined to BIG_ENDIAN or not.
9924          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9925 /* end confdefs.h.  */
9926 #include <sys/types.h>
9927                 #include <sys/param.h>
9928
9929 int
9930 main ()
9931 {
9932 #if BYTE_ORDER != BIG_ENDIAN
9933                  not big endian
9934                 #endif
9935
9936   ;
9937   return 0;
9938 }
9939 _ACEOF
9940 if ac_fn_c_try_compile "$LINENO"; then :
9941   ac_cv_c_bigendian=yes
9942 else
9943   ac_cv_c_bigendian=no
9944 fi
9945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9946 fi
9947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9948     fi
9949     if test $ac_cv_c_bigendian = unknown; then
9950       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9951       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9952 /* end confdefs.h.  */
9953 #include <limits.h>
9954
9955 int
9956 main ()
9957 {
9958 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9959               bogus endian macros
9960              #endif
9961
9962   ;
9963   return 0;
9964 }
9965 _ACEOF
9966 if ac_fn_c_try_compile "$LINENO"; then :
9967   # It does; now see whether it defined to _BIG_ENDIAN or not.
9968          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9969 /* end confdefs.h.  */
9970 #include <limits.h>
9971
9972 int
9973 main ()
9974 {
9975 #ifndef _BIG_ENDIAN
9976                  not big endian
9977                 #endif
9978
9979   ;
9980   return 0;
9981 }
9982 _ACEOF
9983 if ac_fn_c_try_compile "$LINENO"; then :
9984   ac_cv_c_bigendian=yes
9985 else
9986   ac_cv_c_bigendian=no
9987 fi
9988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9989 fi
9990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9991     fi
9992     if test $ac_cv_c_bigendian = unknown; then
9993       # Compile a test program.
9994       if test "$cross_compiling" = yes; then :
9995   # Try to guess by grepping values from an object file.
9996          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9997 /* end confdefs.h.  */
9998 short int ascii_mm[] =
9999                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10000                 short int ascii_ii[] =
10001                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10002                 int use_ascii (int i) {
10003                   return ascii_mm[i] + ascii_ii[i];
10004                 }
10005                 short int ebcdic_ii[] =
10006                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10007                 short int ebcdic_mm[] =
10008                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10009                 int use_ebcdic (int i) {
10010                   return ebcdic_mm[i] + ebcdic_ii[i];
10011                 }
10012                 extern int foo;
10013
10014 int
10015 main ()
10016 {
10017 return use_ascii (foo) == use_ebcdic (foo);
10018   ;
10019   return 0;
10020 }
10021 _ACEOF
10022 if ac_fn_c_try_compile "$LINENO"; then :
10023   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10024               ac_cv_c_bigendian=yes
10025             fi
10026             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10027               if test "$ac_cv_c_bigendian" = unknown; then
10028                 ac_cv_c_bigendian=no
10029               else
10030                 # finding both strings is unlikely to happen, but who knows?
10031                 ac_cv_c_bigendian=unknown
10032               fi
10033             fi
10034 fi
10035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10036 else
10037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10038 /* end confdefs.h.  */
10039 $ac_includes_default
10040 int
10041 main ()
10042 {
10043
10044              /* Are we little or big endian?  From Harbison&Steele.  */
10045              union
10046              {
10047                long int l;
10048                char c[sizeof (long int)];
10049              } u;
10050              u.l = 1;
10051              return u.c[sizeof (long int) - 1] == 1;
10052
10053   ;
10054   return 0;
10055 }
10056 _ACEOF
10057 if ac_fn_c_try_run "$LINENO"; then :
10058   ac_cv_c_bigendian=no
10059 else
10060   ac_cv_c_bigendian=yes
10061 fi
10062 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10063   conftest.$ac_objext conftest.beam conftest.$ac_ext
10064 fi
10065
10066     fi
10067 fi
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10069 $as_echo "$ac_cv_c_bigendian" >&6; }
10070  case $ac_cv_c_bigendian in #(
10071    yes)
10072      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10073 ;; #(
10074    no)
10075       ;; #(
10076    universal)
10077
10078 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10079
10080      ;; #(
10081    *)
10082      as_fn_error "unknown endianness
10083  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10084  esac
10085
10086
10087 # ------------------------------ #
10088 # Checks for library functions.  #
10089 # ------------------------------ #
10090
10091 for ac_header in stdlib.h unistd.h
10092 do :
10093   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10094 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10095 eval as_val=\$$as_ac_Header
10096    if test "x$as_val" = x""yes; then :
10097   cat >>confdefs.h <<_ACEOF
10098 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10099 _ACEOF
10100
10101 fi
10102
10103 done
10104
10105 for ac_func in getpagesize
10106 do :
10107   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10108 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10109   cat >>confdefs.h <<_ACEOF
10110 #define HAVE_GETPAGESIZE 1
10111 _ACEOF
10112
10113 fi
10114 done
10115
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10117 $as_echo_n "checking for working mmap... " >&6; }
10118 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10119   $as_echo_n "(cached) " >&6
10120 else
10121   if test "$cross_compiling" = yes; then :
10122   ac_cv_func_mmap_fixed_mapped=no
10123 else
10124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10125 /* end confdefs.h.  */
10126 $ac_includes_default
10127 /* malloc might have been renamed as rpl_malloc. */
10128 #undef malloc
10129
10130 /* Thanks to Mike Haertel and Jim Avera for this test.
10131    Here is a matrix of mmap possibilities:
10132         mmap private not fixed
10133         mmap private fixed at somewhere currently unmapped
10134         mmap private fixed at somewhere already mapped
10135         mmap shared not fixed
10136         mmap shared fixed at somewhere currently unmapped
10137         mmap shared fixed at somewhere already mapped
10138    For private mappings, we should verify that changes cannot be read()
10139    back from the file, nor mmap's back from the file at a different
10140    address.  (There have been systems where private was not correctly
10141    implemented like the infamous i386 svr4.0, and systems where the
10142    VM page cache was not coherent with the file system buffer cache
10143    like early versions of FreeBSD and possibly contemporary NetBSD.)
10144    For shared mappings, we should conversely verify that changes get
10145    propagated back to all the places they're supposed to be.
10146
10147    Grep wants private fixed already mapped.
10148    The main things grep needs to know about mmap are:
10149    * does it exist and is it safe to write into the mmap'd area
10150    * how to use it (BSD variants)  */
10151
10152 #include <fcntl.h>
10153 #include <sys/mman.h>
10154
10155 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10156 char *malloc ();
10157 #endif
10158
10159 /* This mess was copied from the GNU getpagesize.h.  */
10160 #ifndef HAVE_GETPAGESIZE
10161 /* Assume that all systems that can run configure have sys/param.h.  */
10162 # ifndef HAVE_SYS_PARAM_H
10163 #  define HAVE_SYS_PARAM_H 1
10164 # endif
10165
10166 # ifdef _SC_PAGESIZE
10167 #  define getpagesize() sysconf(_SC_PAGESIZE)
10168 # else /* no _SC_PAGESIZE */
10169 #  ifdef HAVE_SYS_PARAM_H
10170 #   include <sys/param.h>
10171 #   ifdef EXEC_PAGESIZE
10172 #    define getpagesize() EXEC_PAGESIZE
10173 #   else /* no EXEC_PAGESIZE */
10174 #    ifdef NBPG
10175 #     define getpagesize() NBPG * CLSIZE
10176 #     ifndef CLSIZE
10177 #      define CLSIZE 1
10178 #     endif /* no CLSIZE */
10179 #    else /* no NBPG */
10180 #     ifdef NBPC
10181 #      define getpagesize() NBPC
10182 #     else /* no NBPC */
10183 #      ifdef PAGESIZE
10184 #       define getpagesize() PAGESIZE
10185 #      endif /* PAGESIZE */
10186 #     endif /* no NBPC */
10187 #    endif /* no NBPG */
10188 #   endif /* no EXEC_PAGESIZE */
10189 #  else /* no HAVE_SYS_PARAM_H */
10190 #   define getpagesize() 8192   /* punt totally */
10191 #  endif /* no HAVE_SYS_PARAM_H */
10192 # endif /* no _SC_PAGESIZE */
10193
10194 #endif /* no HAVE_GETPAGESIZE */
10195
10196 int
10197 main ()
10198 {
10199   char *data, *data2, *data3;
10200   int i, pagesize;
10201   int fd;
10202
10203   pagesize = getpagesize ();
10204
10205   /* First, make a file with some known garbage in it. */
10206   data = (char *) malloc (pagesize);
10207   if (!data)
10208     return 1;
10209   for (i = 0; i < pagesize; ++i)
10210     *(data + i) = rand ();
10211   umask (0);
10212   fd = creat ("conftest.mmap", 0600);
10213   if (fd < 0)
10214     return 1;
10215   if (write (fd, data, pagesize) != pagesize)
10216     return 1;
10217   close (fd);
10218
10219   /* Next, try to mmap the file at a fixed address which already has
10220      something else allocated at it.  If we can, also make sure that
10221      we see the same garbage.  */
10222   fd = open ("conftest.mmap", O_RDWR);
10223   if (fd < 0)
10224     return 1;
10225   data2 = (char *) malloc (2 * pagesize);
10226   if (!data2)
10227     return 1;
10228   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
10229   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10230                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
10231     return 1;
10232   for (i = 0; i < pagesize; ++i)
10233     if (*(data + i) != *(data2 + i))
10234       return 1;
10235
10236   /* Finally, make sure that changes to the mapped area do not
10237      percolate back to the file as seen by read().  (This is a bug on
10238      some variants of i386 svr4.0.)  */
10239   for (i = 0; i < pagesize; ++i)
10240     *(data2 + i) = *(data2 + i) + 1;
10241   data3 = (char *) malloc (pagesize);
10242   if (!data3)
10243     return 1;
10244   if (read (fd, data3, pagesize) != pagesize)
10245     return 1;
10246   for (i = 0; i < pagesize; ++i)
10247     if (*(data + i) != *(data3 + i))
10248       return 1;
10249   close (fd);
10250   return 0;
10251 }
10252 _ACEOF
10253 if ac_fn_c_try_run "$LINENO"; then :
10254   ac_cv_func_mmap_fixed_mapped=yes
10255 else
10256   ac_cv_func_mmap_fixed_mapped=no
10257 fi
10258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10259   conftest.$ac_objext conftest.beam conftest.$ac_ext
10260 fi
10261
10262 fi
10263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10264 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10265 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10266
10267 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10268
10269 fi
10270 rm -f conftest.mmap
10271
10272 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10273 if test "x$ac_cv_type_pid_t" = x""yes; then :
10274
10275 else
10276
10277 cat >>confdefs.h <<_ACEOF
10278 #define pid_t int
10279 _ACEOF
10280
10281 fi
10282
10283 for ac_header in vfork.h
10284 do :
10285   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10286 if test "x$ac_cv_header_vfork_h" = x""yes; then :
10287   cat >>confdefs.h <<_ACEOF
10288 #define HAVE_VFORK_H 1
10289 _ACEOF
10290
10291 fi
10292
10293 done
10294
10295 for ac_func in fork vfork
10296 do :
10297   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10298 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10299 eval as_val=\$$as_ac_var
10300    if test "x$as_val" = x""yes; then :
10301   cat >>confdefs.h <<_ACEOF
10302 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10303 _ACEOF
10304
10305 fi
10306 done
10307
10308 if test "x$ac_cv_func_fork" = xyes; then
10309   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
10310 $as_echo_n "checking for working fork... " >&6; }
10311 if test "${ac_cv_func_fork_works+set}" = set; then :
10312   $as_echo_n "(cached) " >&6
10313 else
10314   if test "$cross_compiling" = yes; then :
10315   ac_cv_func_fork_works=cross
10316 else
10317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10318 /* end confdefs.h.  */
10319 $ac_includes_default
10320 int
10321 main ()
10322 {
10323
10324           /* By Ruediger Kuhlmann. */
10325           return fork () < 0;
10326
10327   ;
10328   return 0;
10329 }
10330 _ACEOF
10331 if ac_fn_c_try_run "$LINENO"; then :
10332   ac_cv_func_fork_works=yes
10333 else
10334   ac_cv_func_fork_works=no
10335 fi
10336 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10337   conftest.$ac_objext conftest.beam conftest.$ac_ext
10338 fi
10339
10340 fi
10341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10342 $as_echo "$ac_cv_func_fork_works" >&6; }
10343
10344 else
10345   ac_cv_func_fork_works=$ac_cv_func_fork
10346 fi
10347 if test "x$ac_cv_func_fork_works" = xcross; then
10348   case $host in
10349     *-*-amigaos* | *-*-msdosdjgpp*)
10350       # Override, as these systems have only a dummy fork() stub
10351       ac_cv_func_fork_works=no
10352       ;;
10353     *)
10354       ac_cv_func_fork_works=yes
10355       ;;
10356   esac
10357   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10358 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
10359 fi
10360 ac_cv_func_vfork_works=$ac_cv_func_vfork
10361 if test "x$ac_cv_func_vfork" = xyes; then
10362   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10363 $as_echo_n "checking for working vfork... " >&6; }
10364 if test "${ac_cv_func_vfork_works+set}" = set; then :
10365   $as_echo_n "(cached) " >&6
10366 else
10367   if test "$cross_compiling" = yes; then :
10368   ac_cv_func_vfork_works=cross
10369 else
10370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10371 /* end confdefs.h.  */
10372 /* Thanks to Paul Eggert for this test.  */
10373 $ac_includes_default
10374 #include <sys/wait.h>
10375 #ifdef HAVE_VFORK_H
10376 # include <vfork.h>
10377 #endif
10378 /* On some sparc systems, changes by the child to local and incoming
10379    argument registers are propagated back to the parent.  The compiler
10380    is told about this with #include <vfork.h>, but some compilers
10381    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
10382    static variable whose address is put into a register that is
10383    clobbered by the vfork.  */
10384 static void
10385 #ifdef __cplusplus
10386 sparc_address_test (int arg)
10387 # else
10388 sparc_address_test (arg) int arg;
10389 #endif
10390 {
10391   static pid_t child;
10392   if (!child) {
10393     child = vfork ();
10394     if (child < 0) {
10395       perror ("vfork");
10396       _exit(2);
10397     }
10398     if (!child) {
10399       arg = getpid();
10400       write(-1, "", 0);
10401       _exit (arg);
10402     }
10403   }
10404 }
10405
10406 int
10407 main ()
10408 {
10409   pid_t parent = getpid ();
10410   pid_t child;
10411
10412   sparc_address_test (0);
10413
10414   child = vfork ();
10415
10416   if (child == 0) {
10417     /* Here is another test for sparc vfork register problems.  This
10418        test uses lots of local variables, at least as many local
10419        variables as main has allocated so far including compiler
10420        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
10421        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
10422        reuse the register of parent for one of the local variables,
10423        since it will think that parent can't possibly be used any more
10424        in this routine.  Assigning to the local variable will thus
10425        munge parent in the parent process.  */
10426     pid_t
10427       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10428       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10429     /* Convince the compiler that p..p7 are live; otherwise, it might
10430        use the same hardware register for all 8 local variables.  */
10431     if (p != p1 || p != p2 || p != p3 || p != p4
10432         || p != p5 || p != p6 || p != p7)
10433       _exit(1);
10434
10435     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10436        from child file descriptors.  If the child closes a descriptor
10437        before it execs or exits, this munges the parent's descriptor
10438        as well.  Test for this by closing stdout in the child.  */
10439     _exit(close(fileno(stdout)) != 0);
10440   } else {
10441     int status;
10442     struct stat st;
10443
10444     while (wait(&status) != child)
10445       ;
10446     return (
10447          /* Was there some problem with vforking?  */
10448          child < 0
10449
10450          /* Did the child fail?  (This shouldn't happen.)  */
10451          || status
10452
10453          /* Did the vfork/compiler bug occur?  */
10454          || parent != getpid()
10455
10456          /* Did the file descriptor bug occur?  */
10457          || fstat(fileno(stdout), &st) != 0
10458          );
10459   }
10460 }
10461 _ACEOF
10462 if ac_fn_c_try_run "$LINENO"; then :
10463   ac_cv_func_vfork_works=yes
10464 else
10465   ac_cv_func_vfork_works=no
10466 fi
10467 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10468   conftest.$ac_objext conftest.beam conftest.$ac_ext
10469 fi
10470
10471 fi
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10473 $as_echo "$ac_cv_func_vfork_works" >&6; }
10474
10475 fi;
10476 if test "x$ac_cv_func_fork_works" = xcross; then
10477   ac_cv_func_vfork_works=$ac_cv_func_vfork
10478   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10479 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
10480 fi
10481
10482 if test "x$ac_cv_func_vfork_works" = xyes; then
10483
10484 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
10485
10486 else
10487
10488 $as_echo "#define vfork fork" >>confdefs.h
10489
10490 fi
10491 if test "x$ac_cv_func_fork_works" = xyes; then
10492
10493 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
10494
10495 fi
10496
10497 for ac_func in getauxval getrusage getuid getgid \
10498                 pipe poll pread pread64 pwrite resize_term \
10499                 sbrk setpgid setpgrp setsid \
10500                 sigaction sigprocmask sigsetmask socketpair \
10501                 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
10502                 setrlimit getrlimit posix_madvise waitpid \
10503                 ptrace64 sigaltstack mkdtemp
10504 do :
10505   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10506 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10507 eval as_val=\$$as_ac_var
10508    if test "x$as_val" = x""yes; then :
10509   cat >>confdefs.h <<_ACEOF
10510 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10511 _ACEOF
10512
10513 fi
10514 done
10515
10516
10517   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10518 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10519 if test "${am_cv_langinfo_codeset+set}" = set; then :
10520   $as_echo_n "(cached) " >&6
10521 else
10522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10523 /* end confdefs.h.  */
10524 #include <langinfo.h>
10525 int
10526 main ()
10527 {
10528 char* cs = nl_langinfo(CODESET);
10529   ;
10530   return 0;
10531 }
10532 _ACEOF
10533 if ac_fn_c_try_link "$LINENO"; then :
10534   am_cv_langinfo_codeset=yes
10535 else
10536   am_cv_langinfo_codeset=no
10537 fi
10538 rm -f core conftest.err conftest.$ac_objext \
10539     conftest$ac_exeext conftest.$ac_ext
10540
10541 fi
10542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10543 $as_echo "$am_cv_langinfo_codeset" >&6; }
10544   if test $am_cv_langinfo_codeset = yes; then
10545
10546 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10547
10548   fi
10549
10550
10551   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10552 $as_echo_n "checking for ANSI C header files... " >&6; }
10553 if test "${ac_cv_header_stdc+set}" = set; then :
10554   $as_echo_n "(cached) " >&6
10555 else
10556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10557 /* end confdefs.h.  */
10558 #include <stdlib.h>
10559 #include <stdarg.h>
10560 #include <string.h>
10561 #include <float.h>
10562
10563 int
10564 main ()
10565 {
10566
10567   ;
10568   return 0;
10569 }
10570 _ACEOF
10571 if ac_fn_c_try_compile "$LINENO"; then :
10572   ac_cv_header_stdc=yes
10573 else
10574   ac_cv_header_stdc=no
10575 fi
10576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10577
10578 if test $ac_cv_header_stdc = yes; then
10579   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10581 /* end confdefs.h.  */
10582 #include <string.h>
10583
10584 _ACEOF
10585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10586   $EGREP "memchr" >/dev/null 2>&1; then :
10587
10588 else
10589   ac_cv_header_stdc=no
10590 fi
10591 rm -f conftest*
10592
10593 fi
10594
10595 if test $ac_cv_header_stdc = yes; then
10596   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10598 /* end confdefs.h.  */
10599 #include <stdlib.h>
10600
10601 _ACEOF
10602 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10603   $EGREP "free" >/dev/null 2>&1; then :
10604
10605 else
10606   ac_cv_header_stdc=no
10607 fi
10608 rm -f conftest*
10609
10610 fi
10611
10612 if test $ac_cv_header_stdc = yes; then
10613   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10614   if test "$cross_compiling" = yes; then :
10615   :
10616 else
10617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10618 /* end confdefs.h.  */
10619 #include <ctype.h>
10620 #include <stdlib.h>
10621 #if ((' ' & 0x0FF) == 0x020)
10622 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10623 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10624 #else
10625 # define ISLOWER(c) \
10626                    (('a' <= (c) && (c) <= 'i') \
10627                      || ('j' <= (c) && (c) <= 'r') \
10628                      || ('s' <= (c) && (c) <= 'z'))
10629 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10630 #endif
10631
10632 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10633 int
10634 main ()
10635 {
10636   int i;
10637   for (i = 0; i < 256; i++)
10638     if (XOR (islower (i), ISLOWER (i))
10639         || toupper (i) != TOUPPER (i))
10640       return 2;
10641   return 0;
10642 }
10643 _ACEOF
10644 if ac_fn_c_try_run "$LINENO"; then :
10645
10646 else
10647   ac_cv_header_stdc=no
10648 fi
10649 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10650   conftest.$ac_objext conftest.beam conftest.$ac_ext
10651 fi
10652
10653 fi
10654 fi
10655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10656 $as_echo "$ac_cv_header_stdc" >&6; }
10657 if test $ac_cv_header_stdc = yes; then
10658
10659 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10660
10661 fi
10662
10663   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10664 # for constant arguments.  Useless!
10665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10666 $as_echo_n "checking for working alloca.h... " >&6; }
10667 if test "${ac_cv_working_alloca_h+set}" = set; then :
10668   $as_echo_n "(cached) " >&6
10669 else
10670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10671 /* end confdefs.h.  */
10672 #include <alloca.h>
10673 int
10674 main ()
10675 {
10676 char *p = (char *) alloca (2 * sizeof (int));
10677                           if (p) return 0;
10678   ;
10679   return 0;
10680 }
10681 _ACEOF
10682 if ac_fn_c_try_link "$LINENO"; then :
10683   ac_cv_working_alloca_h=yes
10684 else
10685   ac_cv_working_alloca_h=no
10686 fi
10687 rm -f core conftest.err conftest.$ac_objext \
10688     conftest$ac_exeext conftest.$ac_ext
10689 fi
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10691 $as_echo "$ac_cv_working_alloca_h" >&6; }
10692 if test $ac_cv_working_alloca_h = yes; then
10693
10694 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10695
10696 fi
10697
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10699 $as_echo_n "checking for alloca... " >&6; }
10700 if test "${ac_cv_func_alloca_works+set}" = set; then :
10701   $as_echo_n "(cached) " >&6
10702 else
10703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10704 /* end confdefs.h.  */
10705 #ifdef __GNUC__
10706 # define alloca __builtin_alloca
10707 #else
10708 # ifdef _MSC_VER
10709 #  include <malloc.h>
10710 #  define alloca _alloca
10711 # else
10712 #  ifdef HAVE_ALLOCA_H
10713 #   include <alloca.h>
10714 #  else
10715 #   ifdef _AIX
10716  #pragma alloca
10717 #   else
10718 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10719 char *alloca ();
10720 #    endif
10721 #   endif
10722 #  endif
10723 # endif
10724 #endif
10725
10726 int
10727 main ()
10728 {
10729 char *p = (char *) alloca (1);
10730                                     if (p) return 0;
10731   ;
10732   return 0;
10733 }
10734 _ACEOF
10735 if ac_fn_c_try_link "$LINENO"; then :
10736   ac_cv_func_alloca_works=yes
10737 else
10738   ac_cv_func_alloca_works=no
10739 fi
10740 rm -f core conftest.err conftest.$ac_objext \
10741     conftest$ac_exeext conftest.$ac_ext
10742 fi
10743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10744 $as_echo "$ac_cv_func_alloca_works" >&6; }
10745
10746 if test $ac_cv_func_alloca_works = yes; then
10747
10748 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10749
10750 else
10751   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10752 # that cause trouble.  Some versions do not even contain alloca or
10753 # contain a buggy version.  If you still want to use their alloca,
10754 # use ar to extract alloca.o from them instead of compiling alloca.c.
10755
10756 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10757
10758 $as_echo "#define C_ALLOCA 1" >>confdefs.h
10759
10760
10761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10762 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10763 if test "${ac_cv_os_cray+set}" = set; then :
10764   $as_echo_n "(cached) " >&6
10765 else
10766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10767 /* end confdefs.h.  */
10768 #if defined CRAY && ! defined CRAY2
10769 webecray
10770 #else
10771 wenotbecray
10772 #endif
10773
10774 _ACEOF
10775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10776   $EGREP "webecray" >/dev/null 2>&1; then :
10777   ac_cv_os_cray=yes
10778 else
10779   ac_cv_os_cray=no
10780 fi
10781 rm -f conftest*
10782
10783 fi
10784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10785 $as_echo "$ac_cv_os_cray" >&6; }
10786 if test $ac_cv_os_cray = yes; then
10787   for ac_func in _getb67 GETB67 getb67; do
10788     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10789 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10790 eval as_val=\$$as_ac_var
10791    if test "x$as_val" = x""yes; then :
10792
10793 cat >>confdefs.h <<_ACEOF
10794 #define CRAY_STACKSEG_END $ac_func
10795 _ACEOF
10796
10797     break
10798 fi
10799
10800   done
10801 fi
10802
10803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10804 $as_echo_n "checking stack direction for C alloca... " >&6; }
10805 if test "${ac_cv_c_stack_direction+set}" = set; then :
10806   $as_echo_n "(cached) " >&6
10807 else
10808   if test "$cross_compiling" = yes; then :
10809   ac_cv_c_stack_direction=0
10810 else
10811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10812 /* end confdefs.h.  */
10813 $ac_includes_default
10814 int
10815 find_stack_direction ()
10816 {
10817   static char *addr = 0;
10818   auto char dummy;
10819   if (addr == 0)
10820     {
10821       addr = &dummy;
10822       return find_stack_direction ();
10823     }
10824   else
10825     return (&dummy > addr) ? 1 : -1;
10826 }
10827
10828 int
10829 main ()
10830 {
10831   return find_stack_direction () < 0;
10832 }
10833 _ACEOF
10834 if ac_fn_c_try_run "$LINENO"; then :
10835   ac_cv_c_stack_direction=1
10836 else
10837   ac_cv_c_stack_direction=-1
10838 fi
10839 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10840   conftest.$ac_objext conftest.beam conftest.$ac_ext
10841 fi
10842
10843 fi
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10845 $as_echo "$ac_cv_c_stack_direction" >&6; }
10846 cat >>confdefs.h <<_ACEOF
10847 #define STACK_DIRECTION $ac_cv_c_stack_direction
10848 _ACEOF
10849
10850
10851 fi
10852
10853
10854
10855   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10856 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10857 if test "${am_cv_langinfo_codeset+set}" = set; then :
10858   $as_echo_n "(cached) " >&6
10859 else
10860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10861 /* end confdefs.h.  */
10862 #include <langinfo.h>
10863 int
10864 main ()
10865 {
10866 char* cs = nl_langinfo(CODESET);
10867   ;
10868   return 0;
10869 }
10870 _ACEOF
10871 if ac_fn_c_try_link "$LINENO"; then :
10872   am_cv_langinfo_codeset=yes
10873 else
10874   am_cv_langinfo_codeset=no
10875 fi
10876 rm -f core conftest.err conftest.$ac_objext \
10877     conftest$ac_exeext conftest.$ac_ext
10878
10879 fi
10880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10881 $as_echo "$am_cv_langinfo_codeset" >&6; }
10882   if test $am_cv_langinfo_codeset = yes; then
10883
10884 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10885
10886   fi
10887
10888
10889   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
10890 do :
10891   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10892 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10893 eval as_val=\$$as_ac_Header
10894    if test "x$as_val" = x""yes; then :
10895   cat >>confdefs.h <<_ACEOF
10896 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10897 _ACEOF
10898
10899 fi
10900
10901 done
10902
10903
10904   for ac_func in fdwalk getrlimit pipe pipe2 socketpair
10905 do :
10906   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10907 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10908 eval as_val=\$$as_ac_var
10909    if test "x$as_val" = x""yes; then :
10910   cat >>confdefs.h <<_ACEOF
10911 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10912 _ACEOF
10913
10914 fi
10915 done
10916
10917
10918   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
10919 if test "x$ac_cv_have_decl_strerror" = x""yes; then :
10920   ac_have_decl=1
10921 else
10922   ac_have_decl=0
10923 fi
10924
10925 cat >>confdefs.h <<_ACEOF
10926 #define HAVE_DECL_STRERROR $ac_have_decl
10927 _ACEOF
10928 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
10929 if test "x$ac_cv_have_decl_strstr" = x""yes; then :
10930   ac_have_decl=1
10931 else
10932   ac_have_decl=0
10933 fi
10934
10935 cat >>confdefs.h <<_ACEOF
10936 #define HAVE_DECL_STRSTR $ac_have_decl
10937 _ACEOF
10938
10939
10940     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10941 $as_echo_n "checking for sigsetjmp... " >&6; }
10942 if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10943   $as_echo_n "(cached) " >&6
10944 else
10945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10946 /* end confdefs.h.  */
10947
10948 #include <setjmp.h>
10949
10950 int
10951 main ()
10952 {
10953 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
10954   ;
10955   return 0;
10956 }
10957 _ACEOF
10958 if ac_fn_c_try_compile "$LINENO"; then :
10959   gdb_cv_func_sigsetjmp=yes
10960 else
10961   gdb_cv_func_sigsetjmp=no
10962 fi
10963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10964 fi
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10966 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
10967 if test $gdb_cv_func_sigsetjmp = yes; then
10968
10969 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
10970
10971 fi
10972
10973
10974 # Check the return and argument types of ptrace.  No canned test for
10975 # this, so roll our own.
10976 gdb_ptrace_headers='
10977 #include <sys/types.h>
10978 #if HAVE_SYS_PTRACE_H
10979 # include <sys/ptrace.h>
10980 #endif
10981 #if HAVE_UNISTD_H
10982 # include <unistd.h>
10983 #endif
10984 '
10985 # There is no point in checking if we don't have a prototype.
10986 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10987 "
10988 if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10989   ac_have_decl=1
10990 else
10991   ac_have_decl=0
10992 fi
10993
10994 cat >>confdefs.h <<_ACEOF
10995 #define HAVE_DECL_PTRACE $ac_have_decl
10996 _ACEOF
10997 if test $ac_have_decl = 1; then :
10998
10999 else
11000
11001   : ${gdb_cv_func_ptrace_ret='int'}
11002   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11003
11004 fi
11005
11006 # Check return type.  Varargs (used on GNU/Linux) conflict with the
11007 # empty argument list, so check for that explicitly.
11008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11009 $as_echo_n "checking return type of ptrace... " >&6; }
11010 if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11011   $as_echo_n "(cached) " >&6
11012 else
11013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11014 /* end confdefs.h.  */
11015 $gdb_ptrace_headers
11016 int
11017 main ()
11018 {
11019 extern long ptrace (enum __ptrace_request, ...);
11020   ;
11021   return 0;
11022 }
11023 _ACEOF
11024 if ac_fn_c_try_compile "$LINENO"; then :
11025   gdb_cv_func_ptrace_ret='long'
11026 else
11027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11028 /* end confdefs.h.  */
11029 $gdb_ptrace_headers
11030 int
11031 main ()
11032 {
11033 extern int ptrace ();
11034   ;
11035   return 0;
11036 }
11037 _ACEOF
11038 if ac_fn_c_try_compile "$LINENO"; then :
11039   gdb_cv_func_ptrace_ret='int'
11040 else
11041   gdb_cv_func_ptrace_ret='long'
11042 fi
11043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11044 fi
11045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11046 fi
11047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11048 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
11049
11050 cat >>confdefs.h <<_ACEOF
11051 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
11052 _ACEOF
11053
11054 # Check argument types.
11055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11056 $as_echo_n "checking types of arguments for ptrace... " >&6; }
11057 if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11058   $as_echo_n "(cached) " >&6
11059 else
11060
11061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11062 /* end confdefs.h.  */
11063 $gdb_ptrace_headers
11064 int
11065 main ()
11066 {
11067 extern long ptrace (enum __ptrace_request, ...);
11068   ;
11069   return 0;
11070 }
11071 _ACEOF
11072 if ac_fn_c_try_compile "$LINENO"; then :
11073   gdb_cv_func_ptrace_args='int,int,long,long'
11074 else
11075
11076 for gdb_arg1 in 'int' 'long'; do
11077  for gdb_arg2 in 'pid_t' 'int' 'long'; do
11078   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
11079    for gdb_arg4 in 'int' 'long' 'void *'; do
11080      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11081 /* end confdefs.h.  */
11082 $gdb_ptrace_headers
11083 int
11084 main ()
11085 {
11086
11087 extern $gdb_cv_func_ptrace_ret
11088   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11089
11090   ;
11091   return 0;
11092 }
11093 _ACEOF
11094 if ac_fn_c_try_compile "$LINENO"; then :
11095   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11096     break 4;
11097 fi
11098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11099     for gdb_arg5 in 'int *' 'int' 'long'; do
11100      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11101 /* end confdefs.h.  */
11102 $gdb_ptrace_headers
11103 int
11104 main ()
11105 {
11106
11107 extern $gdb_cv_func_ptrace_ret
11108   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11109
11110   ;
11111   return 0;
11112 }
11113 _ACEOF
11114 if ac_fn_c_try_compile "$LINENO"; then :
11115
11116 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11117     break 5;
11118 fi
11119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11120     done
11121    done
11122   done
11123  done
11124 done
11125 # Provide a safe default value.
11126 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11127
11128 fi
11129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11130 fi
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11132 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
11133 ac_save_IFS=$IFS; IFS=','
11134 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11135 IFS=$ac_save_IFS
11136 shift
11137
11138 cat >>confdefs.h <<_ACEOF
11139 #define PTRACE_TYPE_ARG3 $3
11140 _ACEOF
11141
11142
11143 cat >>confdefs.h <<_ACEOF
11144 #define PTRACE_TYPE_ARG4 $4
11145 _ACEOF
11146
11147 if test -n "$5"; then
11148
11149 cat >>confdefs.h <<_ACEOF
11150 #define PTRACE_TYPE_ARG5 $5
11151 _ACEOF
11152
11153 fi
11154
11155 if test "$cross_compiling" = no; then
11156   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11157 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11158 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11159   $as_echo_n "(cached) " >&6
11160 else
11161   if test "$cross_compiling" = yes; then :
11162   as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
11163 else
11164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11165 /* end confdefs.h.  */
11166 $ac_includes_default
11167 int
11168 main ()
11169 {
11170 /* If this system has a BSD-style setpgrp which takes arguments,
11171   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11172   exit successfully. */
11173   return setpgrp (1,1) != -1;
11174   ;
11175   return 0;
11176 }
11177 _ACEOF
11178 if ac_fn_c_try_run "$LINENO"; then :
11179   ac_cv_func_setpgrp_void=no
11180 else
11181   ac_cv_func_setpgrp_void=yes
11182 fi
11183 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11184   conftest.$ac_objext conftest.beam conftest.$ac_ext
11185 fi
11186
11187 fi
11188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11189 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
11190 if test $ac_cv_func_setpgrp_void = yes; then
11191
11192 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
11193
11194 fi
11195
11196 else
11197   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11198 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11199 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11200   $as_echo_n "(cached) " >&6
11201 else
11202   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11203 /* end confdefs.h.  */
11204
11205 #include <unistd.h>
11206
11207 int
11208 main ()
11209 {
11210
11211   if (setpgrp(1,1) == -1)
11212     exit (0);
11213   else
11214     exit (1);
11215
11216   ;
11217   return 0;
11218 }
11219 _ACEOF
11220 if ac_fn_c_try_compile "$LINENO"; then :
11221   ac_cv_func_setpgrp_void=no
11222 else
11223   ac_cv_func_setpgrp_void=yes
11224 fi
11225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11226 fi
11227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11228 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
11229 if test $ac_cv_func_setpgrp_void = yes; then
11230   $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
11231
11232 fi
11233 fi
11234
11235 # Assume we'll default to using the included libiberty regex.
11236 gdb_use_included_regex=yes
11237
11238 # However, if the system regex is GNU regex, then default to *not*
11239 # using the included regex.
11240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11241 $as_echo_n "checking for GNU regex... " >&6; }
11242 if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11243   $as_echo_n "(cached) " >&6
11244 else
11245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11246 /* end confdefs.h.  */
11247 #include <gnu-versions.h>
11248 int
11249 main ()
11250 {
11251 #define REGEX_INTERFACE_VERSION 1
11252 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11253 # error "Version mismatch"
11254 #endif
11255   ;
11256   return 0;
11257 }
11258 _ACEOF
11259 if ac_fn_c_try_compile "$LINENO"; then :
11260   gdb_cv_have_gnu_regex=yes
11261 else
11262   gdb_cv_have_gnu_regex=no
11263 fi
11264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11265 fi
11266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11267 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
11268 if test $gdb_cv_have_gnu_regex = yes; then
11269   gdb_use_included_regex=no
11270 fi
11271
11272
11273 # Check whether --with-included-regex was given.
11274 if test "${with_included_regex+set}" = set; then :
11275   withval=$with_included_regex; gdb_with_regex=$withval
11276 else
11277   gdb_with_regex=$gdb_use_included_regex
11278 fi
11279
11280 if test "$gdb_with_regex" = yes; then
11281
11282 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11283
11284 fi
11285
11286 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11287 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11288 #include <sys/proc.h>
11289
11290 "
11291 if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
11292
11293 cat >>confdefs.h <<_ACEOF
11294 #define HAVE_STRUCT_THREAD_TD_PCB 1
11295 _ACEOF
11296
11297
11298 fi
11299
11300
11301 # See if <sys/lwp.h> defines `struct lwp`.
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11303 $as_echo_n "checking for struct lwp... " >&6; }
11304 if test "${gdb_cv_struct_lwp+set}" = set; then :
11305   $as_echo_n "(cached) " >&6
11306 else
11307   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11308 /* end confdefs.h.  */
11309 #include <sys/param.h>
11310 #include <sys/lwp.h>
11311 int
11312 main ()
11313 {
11314 struct lwp l;
11315   ;
11316   return 0;
11317 }
11318 _ACEOF
11319 if ac_fn_c_try_compile "$LINENO"; then :
11320   gdb_cv_struct_lwp=yes
11321 else
11322   gdb_cv_struct_lwp=no
11323 fi
11324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11325 fi
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11327 $as_echo "$gdb_cv_struct_lwp" >&6; }
11328 if test $gdb_cv_struct_lwp = yes; then
11329
11330 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
11331
11332 fi
11333
11334 # See if <machine/reg.h> degines `struct reg'.
11335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11336 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11337 if test "${gdb_cv_struct_reg+set}" = set; then :
11338   $as_echo_n "(cached) " >&6
11339 else
11340   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11341 /* end confdefs.h.  */
11342 #include <sys/types.h>
11343 #include <machine/reg.h>
11344 int
11345 main ()
11346 {
11347 struct reg r;
11348   ;
11349   return 0;
11350 }
11351 _ACEOF
11352 if ac_fn_c_try_compile "$LINENO"; then :
11353   gdb_cv_struct_reg=yes
11354 else
11355   gdb_cv_struct_reg=no
11356 fi
11357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11358 fi
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11360 $as_echo "$gdb_cv_struct_reg" >&6; }
11361 if test $gdb_cv_struct_reg = yes; then
11362
11363 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
11364
11365 fi
11366
11367 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11368 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
11369 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11370 "
11371 if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
11372
11373 cat >>confdefs.h <<_ACEOF
11374 #define HAVE_STRUCT_REG_R_FS 1
11375 _ACEOF
11376
11377
11378 fi
11379 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11380 "
11381 if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
11382
11383 cat >>confdefs.h <<_ACEOF
11384 #define HAVE_STRUCT_REG_R_GS 1
11385 _ACEOF
11386
11387
11388 fi
11389
11390
11391 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
11392 # Older amd64 Linux's don't have the fs_base and gs_base members of
11393 # `struct user_regs_struct'.
11394 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>
11395 "
11396 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
11397
11398 cat >>confdefs.h <<_ACEOF
11399 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
11400 _ACEOF
11401
11402
11403 fi
11404 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>
11405 "
11406 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
11407
11408 cat >>confdefs.h <<_ACEOF
11409 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
11410 _ACEOF
11411
11412
11413 fi
11414
11415
11416 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
11417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11418 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11419 if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11420   $as_echo_n "(cached) " >&6
11421 else
11422   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11423 /* end confdefs.h.  */
11424 #include <sys/ptrace.h>
11425 int
11426 main ()
11427 {
11428 PTRACE_GETREGS;
11429   ;
11430   return 0;
11431 }
11432 _ACEOF
11433 if ac_fn_c_try_compile "$LINENO"; then :
11434   gdb_cv_have_ptrace_getregs=yes
11435 else
11436   gdb_cv_have_ptrace_getregs=no
11437 fi
11438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11439 fi
11440
11441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11442 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
11443 if test $gdb_cv_have_ptrace_getregs = yes; then
11444
11445 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
11446
11447 fi
11448
11449 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
11450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11451 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11452 if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11453   $as_echo_n "(cached) " >&6
11454 else
11455   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11456 /* end confdefs.h.  */
11457 #include <sys/ptrace.h>
11458 int
11459 main ()
11460 {
11461 PTRACE_GETFPXREGS;
11462   ;
11463   return 0;
11464 }
11465 _ACEOF
11466 if ac_fn_c_try_compile "$LINENO"; then :
11467   gdb_cv_have_ptrace_getfpxregs=yes
11468 else
11469   gdb_cv_have_ptrace_getfpxregs=no
11470 fi
11471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11472 fi
11473
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11475 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
11476 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
11477
11478 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
11479
11480 fi
11481
11482 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11484 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
11485 if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11486   $as_echo_n "(cached) " >&6
11487 else
11488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11489 /* end confdefs.h.  */
11490 #include <sys/types.h>
11491 #include <sys/ptrace.h>
11492 int
11493 main ()
11494 {
11495 PT_GETDBREGS;
11496   ;
11497   return 0;
11498 }
11499 _ACEOF
11500 if ac_fn_c_try_compile "$LINENO"; then :
11501   gdb_cv_have_pt_getdbregs=yes
11502 else
11503   gdb_cv_have_pt_getdbregs=no
11504 fi
11505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11506 fi
11507
11508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11509 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
11510 if test $gdb_cv_have_pt_getdbregs = yes; then
11511
11512 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
11513
11514 fi
11515
11516 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
11517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11518 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11519 if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11520   $as_echo_n "(cached) " >&6
11521 else
11522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11523 /* end confdefs.h.  */
11524 #include <sys/types.h>
11525 #include <sys/ptrace.h>
11526 int
11527 main ()
11528 {
11529 PT_GETXMMREGS;
11530   ;
11531   return 0;
11532 }
11533 _ACEOF
11534 if ac_fn_c_try_compile "$LINENO"; then :
11535   gdb_cv_have_pt_getxmmregs=yes
11536 else
11537   gdb_cv_have_pt_getxmmregs=no
11538 fi
11539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11540 fi
11541
11542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11543 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
11544 if test $gdb_cv_have_pt_getxmmregs = yes; then
11545
11546 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
11547
11548 fi
11549
11550 # Detect which type of /proc is in use, such as for Solaris.
11551
11552 if test "${target}" = "${host}"; then
11553   case "${host}" in
11554   *-*-sysv4.2* | *-*-sysv5* )
11555
11556 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
11557
11558       ;;
11559   *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
11560
11561 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
11562
11563       ;;
11564   mips-sgi-irix5*)
11565       # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
11566
11567 $as_echo "#define _KMEMUSER 1" >>confdefs.h
11568
11569       ;;
11570   esac
11571 fi
11572
11573 if test "$ac_cv_header_sys_procfs_h" = yes; then
11574   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11575 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11576  if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11577   $as_echo_n "(cached) " >&6
11578 else
11579   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11580 /* end confdefs.h.  */
11581
11582 #define _SYSCALL32
11583 /* Needed for new procfs interface on sparc-solaris.  */
11584 #define _STRUCTURED_PROC 1
11585 #include <sys/procfs.h>
11586 int
11587 main ()
11588 {
11589 gregset_t avar
11590   ;
11591   return 0;
11592 }
11593 _ACEOF
11594 if ac_fn_c_try_compile "$LINENO"; then :
11595   bfd_cv_have_sys_procfs_type_gregset_t=yes
11596 else
11597   bfd_cv_have_sys_procfs_type_gregset_t=no
11598
11599 fi
11600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11601 fi
11602
11603  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
11604
11605 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
11606
11607  fi
11608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11609 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
11610
11611   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11612 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11613  if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11614   $as_echo_n "(cached) " >&6
11615 else
11616   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11617 /* end confdefs.h.  */
11618
11619 #define _SYSCALL32
11620 /* Needed for new procfs interface on sparc-solaris.  */
11621 #define _STRUCTURED_PROC 1
11622 #include <sys/procfs.h>
11623 int
11624 main ()
11625 {
11626 fpregset_t avar
11627   ;
11628   return 0;
11629 }
11630 _ACEOF
11631 if ac_fn_c_try_compile "$LINENO"; then :
11632   bfd_cv_have_sys_procfs_type_fpregset_t=yes
11633 else
11634   bfd_cv_have_sys_procfs_type_fpregset_t=no
11635
11636 fi
11637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11638 fi
11639
11640  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
11641
11642 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
11643
11644  fi
11645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11646 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
11647
11648   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11649 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11650  if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11651   $as_echo_n "(cached) " >&6
11652 else
11653   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11654 /* end confdefs.h.  */
11655
11656 #define _SYSCALL32
11657 /* Needed for new procfs interface on sparc-solaris.  */
11658 #define _STRUCTURED_PROC 1
11659 #include <sys/procfs.h>
11660 int
11661 main ()
11662 {
11663 prgregset_t avar
11664   ;
11665   return 0;
11666 }
11667 _ACEOF
11668 if ac_fn_c_try_compile "$LINENO"; then :
11669   bfd_cv_have_sys_procfs_type_prgregset_t=yes
11670 else
11671   bfd_cv_have_sys_procfs_type_prgregset_t=no
11672
11673 fi
11674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11675 fi
11676
11677  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
11678
11679 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
11680
11681  fi
11682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11683 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
11684
11685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11686 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11687  if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11688   $as_echo_n "(cached) " >&6
11689 else
11690   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11691 /* end confdefs.h.  */
11692
11693 #define _SYSCALL32
11694 /* Needed for new procfs interface on sparc-solaris.  */
11695 #define _STRUCTURED_PROC 1
11696 #include <sys/procfs.h>
11697 int
11698 main ()
11699 {
11700 prfpregset_t avar
11701   ;
11702   return 0;
11703 }
11704 _ACEOF
11705 if ac_fn_c_try_compile "$LINENO"; then :
11706   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
11707 else
11708   bfd_cv_have_sys_procfs_type_prfpregset_t=no
11709
11710 fi
11711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11712 fi
11713
11714  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
11715
11716 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
11717
11718  fi
11719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11720 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
11721
11722   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11723 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11724  if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11725   $as_echo_n "(cached) " >&6
11726 else
11727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11728 /* end confdefs.h.  */
11729
11730 #define _SYSCALL32
11731 /* Needed for new procfs interface on sparc-solaris.  */
11732 #define _STRUCTURED_PROC 1
11733 #include <sys/procfs.h>
11734 int
11735 main ()
11736 {
11737 prgregset32_t avar
11738   ;
11739   return 0;
11740 }
11741 _ACEOF
11742 if ac_fn_c_try_compile "$LINENO"; then :
11743   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
11744 else
11745   bfd_cv_have_sys_procfs_type_prgregset32_t=no
11746
11747 fi
11748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11749 fi
11750
11751  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
11752
11753 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
11754
11755  fi
11756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11757 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
11758
11759   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11760 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11761  if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11762   $as_echo_n "(cached) " >&6
11763 else
11764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11765 /* end confdefs.h.  */
11766
11767 #define _SYSCALL32
11768 /* Needed for new procfs interface on sparc-solaris.  */
11769 #define _STRUCTURED_PROC 1
11770 #include <sys/procfs.h>
11771 int
11772 main ()
11773 {
11774 lwpid_t avar
11775   ;
11776   return 0;
11777 }
11778 _ACEOF
11779 if ac_fn_c_try_compile "$LINENO"; then :
11780   bfd_cv_have_sys_procfs_type_lwpid_t=yes
11781 else
11782   bfd_cv_have_sys_procfs_type_lwpid_t=no
11783
11784 fi
11785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11786 fi
11787
11788  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
11789
11790 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
11791
11792  fi
11793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11794 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
11795
11796   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11797 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11798  if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11799   $as_echo_n "(cached) " >&6
11800 else
11801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11802 /* end confdefs.h.  */
11803
11804 #define _SYSCALL32
11805 /* Needed for new procfs interface on sparc-solaris.  */
11806 #define _STRUCTURED_PROC 1
11807 #include <sys/procfs.h>
11808 int
11809 main ()
11810 {
11811 psaddr_t avar
11812   ;
11813   return 0;
11814 }
11815 _ACEOF
11816 if ac_fn_c_try_compile "$LINENO"; then :
11817   bfd_cv_have_sys_procfs_type_psaddr_t=yes
11818 else
11819   bfd_cv_have_sys_procfs_type_psaddr_t=no
11820
11821 fi
11822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11823 fi
11824
11825  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
11826
11827 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
11828
11829  fi
11830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11831 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
11832
11833   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11834 $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11835  if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11836   $as_echo_n "(cached) " >&6
11837 else
11838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11839 /* end confdefs.h.  */
11840
11841 #define _SYSCALL32
11842 /* Needed for new procfs interface on sparc-solaris.  */
11843 #define _STRUCTURED_PROC 1
11844 #include <sys/procfs.h>
11845 int
11846 main ()
11847 {
11848 prsysent_t avar
11849   ;
11850   return 0;
11851 }
11852 _ACEOF
11853 if ac_fn_c_try_compile "$LINENO"; then :
11854   bfd_cv_have_sys_procfs_type_prsysent_t=yes
11855 else
11856   bfd_cv_have_sys_procfs_type_prsysent_t=no
11857
11858 fi
11859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11860 fi
11861
11862  if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
11863
11864 $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
11865
11866  fi
11867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11868 $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
11869
11870   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11871 $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11872  if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11873   $as_echo_n "(cached) " >&6
11874 else
11875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11876 /* end confdefs.h.  */
11877
11878 #define _SYSCALL32
11879 /* Needed for new procfs interface on sparc-solaris.  */
11880 #define _STRUCTURED_PROC 1
11881 #include <sys/procfs.h>
11882 int
11883 main ()
11884 {
11885 pr_sigset_t avar
11886   ;
11887   return 0;
11888 }
11889 _ACEOF
11890 if ac_fn_c_try_compile "$LINENO"; then :
11891   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
11892 else
11893   bfd_cv_have_sys_procfs_type_pr_sigset_t=no
11894
11895 fi
11896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11897 fi
11898
11899  if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
11900
11901 $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
11902
11903  fi
11904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11905 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
11906
11907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11908 $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11909  if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11910   $as_echo_n "(cached) " >&6
11911 else
11912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11913 /* end confdefs.h.  */
11914
11915 #define _SYSCALL32
11916 /* Needed for new procfs interface on sparc-solaris.  */
11917 #define _STRUCTURED_PROC 1
11918 #include <sys/procfs.h>
11919 int
11920 main ()
11921 {
11922 pr_sigaction64_t avar
11923   ;
11924   return 0;
11925 }
11926 _ACEOF
11927 if ac_fn_c_try_compile "$LINENO"; then :
11928   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
11929 else
11930   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
11931
11932 fi
11933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11934 fi
11935
11936  if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
11937
11938 $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
11939
11940  fi
11941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11942 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
11943
11944   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11945 $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11946  if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11947   $as_echo_n "(cached) " >&6
11948 else
11949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11950 /* end confdefs.h.  */
11951
11952 #define _SYSCALL32
11953 /* Needed for new procfs interface on sparc-solaris.  */
11954 #define _STRUCTURED_PROC 1
11955 #include <sys/procfs.h>
11956 int
11957 main ()
11958 {
11959 pr_siginfo64_t avar
11960   ;
11961   return 0;
11962 }
11963 _ACEOF
11964 if ac_fn_c_try_compile "$LINENO"; then :
11965   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11966 else
11967   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
11968
11969 fi
11970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11971 fi
11972
11973  if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
11974
11975 $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
11976
11977  fi
11978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11979 $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
11980
11981
11982
11983
11984
11985   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
11986     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11987 $as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11988     if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11989   $as_echo_n "(cached) " >&6
11990 else
11991   if test "$cross_compiling" = yes; then :
11992   gdb_cv_prfpregset_t_broken=yes
11993 else
11994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11995 /* end confdefs.h.  */
11996 #include <sys/procfs.h>
11997        int main ()
11998        {
11999          if (sizeof (prfpregset_t) == sizeof (void *))
12000            return 1;
12001          return 0;
12002        }
12003 _ACEOF
12004 if ac_fn_c_try_run "$LINENO"; then :
12005   gdb_cv_prfpregset_t_broken=no
12006 else
12007   gdb_cv_prfpregset_t_broken=yes
12008 fi
12009 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12010   conftest.$ac_objext conftest.beam conftest.$ac_ext
12011 fi
12012
12013 fi
12014
12015     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12016 $as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
12017     if test $gdb_cv_prfpregset_t_broken = yes; then
12018
12019 $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
12020
12021     fi
12022   fi
12023 fi
12024
12025 # Check if the compiler supports the `long long' type.
12026
12027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12028 $as_echo_n "checking for long long support in compiler... " >&6; }
12029 if test "${gdb_cv_c_long_long+set}" = set; then :
12030   $as_echo_n "(cached) " >&6
12031 else
12032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12033 /* end confdefs.h.  */
12034 extern long long foo;
12035 int
12036 main ()
12037 {
12038 switch (foo & 2) { case 0: return 1; }
12039   ;
12040   return 0;
12041 }
12042 _ACEOF
12043 if ac_fn_c_try_compile "$LINENO"; then :
12044   gdb_cv_c_long_long=yes
12045 else
12046   gdb_cv_c_long_long=no
12047 fi
12048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12049 fi
12050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12051 $as_echo "$gdb_cv_c_long_long" >&6; }
12052 if test $gdb_cv_c_long_long != yes; then
12053   # libdecnumber requires long long.
12054   as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
12055 fi
12056
12057 # Check if the compiler and runtime support printing long longs.
12058
12059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12060 $as_echo_n "checking for long long support in printf... " >&6; }
12061 if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12062   $as_echo_n "(cached) " >&6
12063 else
12064   if test "$cross_compiling" = yes; then :
12065   gdb_cv_printf_has_long_long=no
12066 else
12067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12068 /* end confdefs.h.  */
12069 $ac_includes_default
12070 int
12071 main ()
12072 {
12073 char buf[32];
12074   long long l = 0;
12075   l = (l << 16) + 0x0123;
12076   l = (l << 16) + 0x4567;
12077   l = (l << 16) + 0x89ab;
12078   l = (l << 16) + 0xcdef;
12079   sprintf (buf, "0x%016llx", l);
12080   return (strcmp ("0x0123456789abcdef", buf));
12081   ;
12082   return 0;
12083 }
12084 _ACEOF
12085 if ac_fn_c_try_run "$LINENO"; then :
12086   gdb_cv_printf_has_long_long=yes
12087 else
12088   gdb_cv_printf_has_long_long=no
12089 fi
12090 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12091   conftest.$ac_objext conftest.beam conftest.$ac_ext
12092 fi
12093
12094 fi
12095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12096 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
12097 if test $gdb_cv_printf_has_long_long = yes; then
12098
12099 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
12100
12101 fi
12102
12103 # Check if the compiler and runtime support printing decfloats.
12104
12105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12106 $as_echo_n "checking for decfloat support in printf... " >&6; }
12107 if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12108   $as_echo_n "(cached) " >&6
12109 else
12110   if test "$cross_compiling" = yes; then :
12111   gdb_cv_printf_has_decfloat=no
12112 else
12113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12114 /* end confdefs.h.  */
12115 $ac_includes_default
12116 int
12117 main ()
12118 {
12119 char buf[64];
12120   _Decimal32 d32 = 1.2345df;
12121   _Decimal64 d64 = 1.2345dd;
12122   _Decimal128 d128 = 1.2345dl;
12123   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12124   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12125   ;
12126   return 0;
12127 }
12128 _ACEOF
12129 if ac_fn_c_try_run "$LINENO"; then :
12130   gdb_cv_printf_has_decfloat=yes
12131 else
12132   gdb_cv_printf_has_decfloat=no
12133 fi
12134 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12135   conftest.$ac_objext conftest.beam conftest.$ac_ext
12136 fi
12137
12138 fi
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12140 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
12141 if test $gdb_cv_printf_has_decfloat = yes; then
12142
12143 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
12144
12145 fi
12146
12147 # Check if the compiler supports the `long double' type.  We can't use
12148 # AC_C_LONG_DOUBLE because that one does additional checks on the
12149 # constants defined in <float.h> that fail on some systems,
12150 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
12151
12152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12153 $as_echo_n "checking for long double support in compiler... " >&6; }
12154 if test "${gdb_cv_c_long_double+set}" = set; then :
12155   $as_echo_n "(cached) " >&6
12156 else
12157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12158 /* end confdefs.h.  */
12159 long double foo;
12160 _ACEOF
12161 if ac_fn_c_try_compile "$LINENO"; then :
12162   gdb_cv_c_long_double=yes
12163 else
12164   gdb_cv_c_long_double=no
12165 fi
12166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12167 fi
12168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12169 $as_echo "$gdb_cv_c_long_double" >&6; }
12170 if test $gdb_cv_c_long_double = yes; then
12171
12172 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
12173
12174 fi
12175
12176 # Check if the compiler and runtime support printing long doubles.
12177
12178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12179 $as_echo_n "checking for long double support in printf... " >&6; }
12180 if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12181   $as_echo_n "(cached) " >&6
12182 else
12183   if test "$cross_compiling" = yes; then :
12184   gdb_cv_printf_has_long_double=no
12185 else
12186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12187 /* end confdefs.h.  */
12188 $ac_includes_default
12189 int
12190 main ()
12191 {
12192 char buf[16];
12193   long double f = 3.141592653;
12194   sprintf (buf, "%Lg", f);
12195   return (strncmp ("3.14159", buf, 7));
12196   ;
12197   return 0;
12198 }
12199 _ACEOF
12200 if ac_fn_c_try_run "$LINENO"; then :
12201   gdb_cv_printf_has_long_double=yes
12202 else
12203   gdb_cv_printf_has_long_double=no
12204 fi
12205 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12206   conftest.$ac_objext conftest.beam conftest.$ac_ext
12207 fi
12208
12209 fi
12210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12211 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
12212 if test $gdb_cv_printf_has_long_double = yes; then
12213
12214 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
12215
12216 fi
12217
12218 # Check if the compiler and runtime support scanning long doubles.
12219
12220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12221 $as_echo_n "checking for long double support in scanf... " >&6; }
12222 if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12223   $as_echo_n "(cached) " >&6
12224 else
12225   if test "$cross_compiling" = yes; then :
12226   gdb_cv_scanf_has_long_double=no
12227 else
12228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12229 /* end confdefs.h.  */
12230 #include <stdio.h>
12231 int
12232 main ()
12233 {
12234 char *buf = "3.141592653";
12235   long double f = 0;
12236   sscanf (buf, "%Lg", &f);
12237   return !(f > 3.14159 && f < 3.14160);
12238   ;
12239   return 0;
12240 }
12241 _ACEOF
12242 if ac_fn_c_try_run "$LINENO"; then :
12243   gdb_cv_scanf_has_long_double=yes
12244 else
12245   gdb_cv_scanf_has_long_double=no
12246 fi
12247 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12248   conftest.$ac_objext conftest.beam conftest.$ac_ext
12249 fi
12250
12251 fi
12252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12253 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
12254 if test $gdb_cv_scanf_has_long_double = yes; then
12255
12256 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
12257
12258 fi
12259
12260 case ${host_os} in
12261 aix*)
12262   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12263 $as_echo_n "checking for -bbigtoc option... " >&6; }
12264 if test "${gdb_cv_bigtoc+set}" = set; then :
12265   $as_echo_n "(cached) " >&6
12266 else
12267
12268     SAVE_LDFLAGS=$LDFLAGS
12269
12270     case $GCC in
12271     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12272     *) gdb_cv_bigtoc=-bbigtoc ;;
12273     esac
12274
12275     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
12276     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12277 /* end confdefs.h.  */
12278
12279 int
12280 main ()
12281 {
12282 int i;
12283   ;
12284   return 0;
12285 }
12286 _ACEOF
12287 if ac_fn_c_try_link "$LINENO"; then :
12288
12289 else
12290   gdb_cv_bigtoc=
12291 fi
12292 rm -f core conftest.err conftest.$ac_objext \
12293     conftest$ac_exeext conftest.$ac_ext
12294     LDFLAGS="${SAVE_LDFLAGS}"
12295
12296 fi
12297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12298 $as_echo "$gdb_cv_bigtoc" >&6; }
12299   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12300   ;;
12301 esac
12302
12303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
12304 $as_echo_n "checking for the dynamic export flag... " >&6; }
12305 dynamic_list=false
12306 if test "${gdb_native}" = yes; then
12307    # The dynamically loaded libthread_db needs access to symbols in the gdb
12308    # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
12309    # may not be supported there.
12310    old_LDFLAGS="$LDFLAGS"
12311    # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
12312    RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
12313    LDFLAGS="$LDFLAGS $RDYNAMIC"
12314    if test "${have_libpython}" = no; then
12315      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12316 /* end confdefs.h.  */
12317
12318 int
12319 main ()
12320 {
12321
12322   ;
12323   return 0;
12324 }
12325 _ACEOF
12326 if ac_fn_c_try_link "$LINENO"; then :
12327   dynamic_list=true
12328 fi
12329 rm -f core conftest.err conftest.$ac_objext \
12330     conftest$ac_exeext conftest.$ac_ext
12331    else
12332      # Workaround http://bugs.python.org/issue4434 where static
12333      # libpythonX.Y.a would get its symbols required for
12334      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
12335      # Problem does not happen for the recommended libpythonX.Y.so linkage.
12336      old_CFLAGS="$CFLAGS"
12337      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
12338      old_LIBS="$LIBS"
12339      LIBS="$LIBS $PYTHON_LIBS"
12340      if test "$cross_compiling" = yes; then :
12341   true
12342 else
12343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12344 /* end confdefs.h.  */
12345 #include "${have_libpython}/Python.h"
12346 int
12347 main ()
12348 {
12349 int err;
12350           Py_Initialize ();
12351           err = PyRun_SimpleString ("import itertools\n");
12352           Py_Finalize ();
12353           return err == 0 ? 0 : 1;
12354   ;
12355   return 0;
12356 }
12357 _ACEOF
12358 if ac_fn_c_try_run "$LINENO"; then :
12359   dynamic_list=true
12360 fi
12361 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12362   conftest.$ac_objext conftest.beam conftest.$ac_ext
12363 fi
12364
12365      LIBS="$old_LIBS"
12366      CFLAGS="$old_CFLAGS"
12367    fi
12368    LDFLAGS="$old_LDFLAGS"
12369 fi
12370 if $dynamic_list; then
12371   found="-Wl,--dynamic-list"
12372   RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
12373 else
12374   found="-rdynamic"
12375   RDYNAMIC="-rdynamic"
12376 fi
12377
12378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
12379 $as_echo "$found" >&6; }
12380
12381
12382 if test ${build} = ${host} -a ${host} = ${target} ; then
12383    case ${host_os} in
12384    solaris*)
12385       # See if thread_db library is around for Solaris thread debugging.
12386       # Note that we must explicitly test for version 1 of the library
12387       # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12388       # the same API.
12389       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12390 $as_echo_n "checking for Solaris thread debugging library... " >&6; }
12391       if test -f /usr/lib/libthread_db.so.1 ; then
12392          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12393 $as_echo "yes" >&6; }
12394
12395 $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
12396
12397          CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
12398          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
12399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12400 $as_echo_n "checking for dlopen in -ldl... " >&6; }
12401 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12402   $as_echo_n "(cached) " >&6
12403 else
12404   ac_check_lib_save_LIBS=$LIBS
12405 LIBS="-ldl  $LIBS"
12406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12407 /* end confdefs.h.  */
12408
12409 /* Override any GCC internal prototype to avoid an error.
12410    Use char because int might match the return type of a GCC
12411    builtin and then its argument prototype would still apply.  */
12412 #ifdef __cplusplus
12413 extern "C"
12414 #endif
12415 char dlopen ();
12416 int
12417 main ()
12418 {
12419 return dlopen ();
12420   ;
12421   return 0;
12422 }
12423 _ACEOF
12424 if ac_fn_c_try_link "$LINENO"; then :
12425   ac_cv_lib_dl_dlopen=yes
12426 else
12427   ac_cv_lib_dl_dlopen=no
12428 fi
12429 rm -f core conftest.err conftest.$ac_objext \
12430     conftest$ac_exeext conftest.$ac_ext
12431 LIBS=$ac_check_lib_save_LIBS
12432 fi
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12434 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12435 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
12436   cat >>confdefs.h <<_ACEOF
12437 #define HAVE_LIBDL 1
12438 _ACEOF
12439
12440   LIBS="-ldl $LIBS"
12441
12442 fi
12443
12444          CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
12445          # Sun randomly tweaked the prototypes in <proc_service.h>
12446          # at one point.
12447          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12448 $as_echo_n "checking if <proc_service.h> is old... " >&6; }
12449          if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12450   $as_echo_n "(cached) " >&6
12451 else
12452
12453             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12454 /* end confdefs.h.  */
12455
12456                 #include <proc_service.h>
12457                 ps_err_e ps_pdwrite
12458                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
12459
12460 int
12461 main ()
12462 {
12463
12464   ;
12465   return 0;
12466 }
12467 _ACEOF
12468 if ac_fn_c_try_compile "$LINENO"; then :
12469   gdb_cv_proc_service_is_old=no
12470 else
12471   gdb_cv_proc_service_is_old=yes
12472 fi
12473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12474
12475 fi
12476
12477          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12478 $as_echo "$gdb_cv_proc_service_is_old" >&6; }
12479          if test $gdb_cv_proc_service_is_old = yes; then
12480
12481 $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
12482
12483          fi
12484       else
12485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12486 $as_echo "no" >&6; }
12487       fi
12488       ;;
12489    aix*)
12490       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12491 $as_echo_n "checking for AiX thread debugging library... " >&6; }
12492       if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12493   $as_echo_n "(cached) " >&6
12494 else
12495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12496 /* end confdefs.h.  */
12497 #include <sys/pthdebug.h>
12498 int
12499 main ()
12500 {
12501 #ifndef PTHDB_VERSION_3
12502                                     #error
12503                                     #endif
12504   ;
12505   return 0;
12506 }
12507 _ACEOF
12508 if ac_fn_c_try_compile "$LINENO"; then :
12509   gdb_cv_have_aix_thread_debug=yes
12510 else
12511   gdb_cv_have_aix_thread_debug=no
12512 fi
12513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12514 fi
12515
12516       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12517 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
12518       if test $gdb_cv_have_aix_thread_debug = yes; then
12519          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
12520          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
12521          LIBS="$LIBS -lpthdebug"
12522
12523          # Older versions of AIX do not provide the declaration for
12524          # the getthrds function (it appears that it was introduced
12525          # with AIX 6.x).
12526          ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12527 "
12528 if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12529   ac_have_decl=1
12530 else
12531   ac_have_decl=0
12532 fi
12533
12534 cat >>confdefs.h <<_ACEOF
12535 #define HAVE_DECL_GETTHRDS $ac_have_decl
12536 _ACEOF
12537
12538       fi
12539       ;;
12540    esac
12541
12542 fi
12543
12544 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
12545    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12546 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12547 if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12548   $as_echo_n "(cached) " >&6
12549 else
12550   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12551 /* end confdefs.h.  */
12552 #include <thread_db.h>
12553 int
12554 main ()
12555 {
12556 int i = TD_NOTALLOC;
12557   ;
12558   return 0;
12559 }
12560 _ACEOF
12561 if ac_fn_c_try_compile "$LINENO"; then :
12562   gdb_cv_thread_db_h_has_td_notalloc=yes
12563 else
12564   gdb_cv_thread_db_h_has_td_notalloc=no
12565
12566 fi
12567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12568
12569 fi
12570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12571 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12573 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12574 if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12575   $as_echo_n "(cached) " >&6
12576 else
12577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12578 /* end confdefs.h.  */
12579 #include <thread_db.h>
12580 int
12581 main ()
12582 {
12583 int i = TD_VERSION;
12584   ;
12585   return 0;
12586 }
12587 _ACEOF
12588 if ac_fn_c_try_compile "$LINENO"; then :
12589   gdb_cv_thread_db_h_has_td_version=yes
12590 else
12591   gdb_cv_thread_db_h_has_td_version=no
12592
12593 fi
12594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12595
12596 fi
12597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12598 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12600 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12601 if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12602   $as_echo_n "(cached) " >&6
12603 else
12604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12605 /* end confdefs.h.  */
12606 #include <thread_db.h>
12607 int
12608 main ()
12609 {
12610 int i = TD_NOTLS;
12611   ;
12612   return 0;
12613 }
12614 _ACEOF
12615 if ac_fn_c_try_compile "$LINENO"; then :
12616   gdb_cv_thread_db_h_has_td_notls=yes
12617 else
12618   gdb_cv_thread_db_h_has_td_notls=no
12619
12620 fi
12621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12622
12623 fi
12624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12625 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
12626 fi
12627 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
12628
12629 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
12630
12631 fi
12632 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12633
12634 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
12635
12636 fi
12637 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12638
12639 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
12640
12641 fi
12642
12643 if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
12644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12645 $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12646 if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12647   $as_echo_n "(cached) " >&6
12648 else
12649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12650 /* end confdefs.h.  */
12651 #include <sys/syscall.h>
12652 int
12653 main ()
12654 {
12655 int i = __NR_tkill;
12656   ;
12657   return 0;
12658 }
12659 _ACEOF
12660 if ac_fn_c_try_compile "$LINENO"; then :
12661   gdb_cv_sys_syscall_h_has_tkill=yes
12662 else
12663   gdb_cv_sys_syscall_h_has_tkill=no
12664
12665 fi
12666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12667
12668 fi
12669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12670 $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
12671 fi
12672 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
12673   ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
12674 if test "x$ac_cv_func_syscall" = x""yes; then :
12675
12676 $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
12677
12678
12679 fi
12680
12681 fi
12682
12683 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12684 "
12685 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12686   ac_have_decl=1
12687 else
12688   ac_have_decl=0
12689 fi
12690
12691 cat >>confdefs.h <<_ACEOF
12692 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
12693 _ACEOF
12694
12695
12696 if test "$cross_compiling" = yes; then :
12697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12698 /* end confdefs.h.  */
12699 #include <sys/personality.h>
12700 int
12701 main ()
12702 {
12703
12704 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
12705 #       define ADDR_NO_RANDOMIZE 0x0040000
12706 #      endif
12707        /* Test the flag could be set and stays set.  */
12708        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12709        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12710            return 1
12711   ;
12712   return 0;
12713 }
12714 _ACEOF
12715 if ac_fn_c_try_link "$LINENO"; then :
12716   have_personality=true
12717 else
12718   have_personality=false
12719 fi
12720 rm -f core conftest.err conftest.$ac_objext \
12721     conftest$ac_exeext conftest.$ac_ext
12722 else
12723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12724 /* end confdefs.h.  */
12725 #include <sys/personality.h>
12726 int
12727 main ()
12728 {
12729
12730 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
12731 #       define ADDR_NO_RANDOMIZE 0x0040000
12732 #      endif
12733        /* Test the flag could be set and stays set.  */
12734        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12735        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12736            return 1
12737   ;
12738   return 0;
12739 }
12740 _ACEOF
12741 if ac_fn_c_try_run "$LINENO"; then :
12742   have_personality=true
12743 else
12744   have_personality=false
12745 fi
12746 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12747   conftest.$ac_objext conftest.beam conftest.$ac_ext
12748 fi
12749
12750 if $have_personality
12751 then
12752
12753 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
12754
12755 fi
12756
12757 case $host_os in
12758   go32* | *djgpp*)
12759     gdbinit=gdb.ini
12760     ;;
12761   *)
12762     gdbinit=.gdbinit
12763     ;;
12764 esac
12765
12766 cat >>confdefs.h <<_ACEOF
12767 #define GDBINIT "$gdbinit"
12768 _ACEOF
12769
12770
12771
12772 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12773 # except that the argument to --with-sysroot is optional.
12774 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12775 if test "x$with_sysroot" = xyes; then
12776   with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12777 fi
12778
12779 # Check whether --with-sysroot was given.
12780 if test "${with_sysroot+set}" = set; then :
12781   withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12782 else
12783   TARGET_SYSTEM_ROOT=
12784 fi
12785
12786
12787   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12788   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12789   ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12790   ac_define_dir=`eval echo $ac_define_dir`
12791
12792 cat >>confdefs.h <<_ACEOF
12793 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
12794 _ACEOF
12795
12796
12797
12798
12799   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12800      if test "x$prefix" = xNONE; then
12801         test_prefix=/usr/local
12802      else
12803         test_prefix=$prefix
12804      fi
12805   else
12806      test_prefix=$exec_prefix
12807   fi
12808   value=0
12809   case ${ac_define_dir} in
12810      "${test_prefix}"|"${test_prefix}/"*|\
12811         '${exec_prefix}'|'${exec_prefix}/'*)
12812      value=1
12813      ;;
12814   esac
12815
12816 cat >>confdefs.h <<_ACEOF
12817 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12818 _ACEOF
12819
12820
12821
12822
12823
12824 # Check whether --with-system-gdbinit was given.
12825 if test "${with_system_gdbinit+set}" = set; then :
12826   withval=$with_system_gdbinit;
12827     SYSTEM_GDBINIT=$withval
12828 else
12829   SYSTEM_GDBINIT=
12830 fi
12831
12832
12833   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12834   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12835   ac_define_dir=`eval echo $SYSTEM_GDBINIT`
12836   ac_define_dir=`eval echo $ac_define_dir`
12837
12838 cat >>confdefs.h <<_ACEOF
12839 #define SYSTEM_GDBINIT "$ac_define_dir"
12840 _ACEOF
12841
12842
12843
12844
12845   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12846      if test "x$prefix" = xNONE; then
12847         test_prefix=/usr/local
12848      else
12849         test_prefix=$prefix
12850      fi
12851   else
12852      test_prefix=$exec_prefix
12853   fi
12854   value=0
12855   case ${ac_define_dir} in
12856      "${test_prefix}"|"${test_prefix}/"*|\
12857         '${exec_prefix}'|'${exec_prefix}/'*)
12858      value=1
12859      ;;
12860   esac
12861
12862 cat >>confdefs.h <<_ACEOF
12863 #define SYSTEM_GDBINIT_RELOCATABLE $value
12864 _ACEOF
12865
12866
12867
12868
12869 # Check whether --enable-werror was given.
12870 if test "${enable_werror+set}" = set; then :
12871   enableval=$enable_werror; case "${enableval}" in
12872      yes | y) ERROR_ON_WARNING="yes" ;;
12873      no | n)  ERROR_ON_WARNING="no" ;;
12874      *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
12875    esac
12876 fi
12877
12878
12879 # Enable -Werror by default when using gcc.  Turn it off for releases.
12880 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
12881     ERROR_ON_WARNING=yes
12882 fi
12883
12884 WERROR_CFLAGS=""
12885 if test "${ERROR_ON_WARNING}" = yes ; then
12886     WERROR_CFLAGS="-Werror"
12887 fi
12888
12889 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
12890 -Wpointer-sign \
12891 -Wno-unused -Wunused-value -Wunused-function \
12892 -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
12893 -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
12894 -Wold-style-declaration -Wold-style-definition"
12895
12896 # Enable -Wno-format by default when using gcc on mingw since many
12897 # GCC versions complain about %I64.
12898 case "${host}" in
12899   *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
12900   *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
12901 esac
12902
12903 # Check whether --enable-build-warnings was given.
12904 if test "${enable_build_warnings+set}" = set; then :
12905   enableval=$enable_build_warnings; case "${enableval}" in
12906   yes)  ;;
12907   no)   build_warnings="-w";;
12908   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
12909         build_warnings="${build_warnings} ${t}";;
12910   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
12911         build_warnings="${t} ${build_warnings}";;
12912   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12913 esac
12914 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12915   echo "Setting compiler warning flags = $build_warnings" 6>&1
12916 fi
12917 fi
12918 # Check whether --enable-gdb-build-warnings was given.
12919 if test "${enable_gdb_build_warnings+set}" = set; then :
12920   enableval=$enable_gdb_build_warnings; case "${enableval}" in
12921   yes)  ;;
12922   no)   build_warnings="-w";;
12923   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
12924         build_warnings="${build_warnings} ${t}";;
12925   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
12926         build_warnings="${t} ${build_warnings}";;
12927   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12928 esac
12929 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12930   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12931 fi
12932 fi
12933 WARN_CFLAGS=""
12934 if test "x${build_warnings}" != x -a "x$GCC" = xyes
12935 then
12936     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12937 $as_echo_n "checking compiler warning flags... " >&6; }
12938     # Separate out the -Werror flag as some files just cannot be
12939     # compiled with it enabled.
12940     for w in ${build_warnings}; do
12941         case $w in
12942         -Werr*) WERROR_CFLAGS=-Werror ;;
12943         *) # Check that GCC accepts it
12944             saved_CFLAGS="$CFLAGS"
12945             CFLAGS="$CFLAGS $w"
12946             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12947 /* end confdefs.h.  */
12948
12949 int
12950 main ()
12951 {
12952
12953   ;
12954   return 0;
12955 }
12956 _ACEOF
12957 if ac_fn_c_try_compile "$LINENO"; then :
12958   WARN_CFLAGS="${WARN_CFLAGS} $w"
12959 fi
12960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12961             CFLAGS="$saved_CFLAGS"
12962         esac
12963     done
12964     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12965 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
12966 fi
12967
12968
12969
12970 # In the Cygwin environment, we need some additional flags.
12971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12972 $as_echo_n "checking for cygwin... " >&6; }
12973 if test "${gdb_cv_os_cygwin+set}" = set; then :
12974   $as_echo_n "(cached) " >&6
12975 else
12976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12977 /* end confdefs.h.  */
12978
12979 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
12980 lose
12981 #endif
12982 _ACEOF
12983 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12984   $EGREP "^lose$" >/dev/null 2>&1; then :
12985   gdb_cv_os_cygwin=yes
12986 else
12987   gdb_cv_os_cygwin=no
12988 fi
12989 rm -f conftest*
12990
12991 fi
12992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12993 $as_echo "$gdb_cv_os_cygwin" >&6; }
12994
12995
12996 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
12997 case ${host} in
12998   *go32* ) SER_HARDWIRE=ser-go32.o ;;
12999   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
13000   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
13001 esac
13002
13003
13004 # libreadline needs libuser32.a in a cygwin environment
13005 WIN32LIBS=
13006 if test x$gdb_cv_os_cygwin = xyes; then
13007     WIN32LIBS="-luser32"
13008     case "${target}" in
13009         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13010         ;;
13011     esac
13012 fi
13013
13014 # The ser-tcp.c module requires sockets.
13015 case ${host} in
13016   *mingw32*)
13017
13018 $as_echo "#define USE_WIN32API 1" >>confdefs.h
13019
13020     WIN32LIBS="$WIN32LIBS -lws2_32"
13021     ;;
13022 esac
13023
13024
13025 # Add ELF support to GDB, but only if BFD includes ELF support.
13026
13027   OLD_CFLAGS=$CFLAGS
13028   OLD_LDFLAGS=$LDFLAGS
13029   OLD_LIBS=$LIBS
13030   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13031   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13032   # always want our bfd.
13033   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13034   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13035   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13036   LIBS="-lbfd -liberty $intl $LIBS"
13037   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
13038 $as_echo_n "checking for ELF support in BFD... " >&6; }
13039 if test "${gdb_cv_var_elf+set}" = set; then :
13040   $as_echo_n "(cached) " >&6
13041 else
13042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13043 /* end confdefs.h.  */
13044 #include <stdlib.h>
13045   #include "bfd.h"
13046   #include "elf-bfd.h"
13047
13048 int
13049 main ()
13050 {
13051 return bfd_get_elf_phdr_upper_bound (NULL);
13052   ;
13053   return 0;
13054 }
13055 _ACEOF
13056 if ac_fn_c_try_link "$LINENO"; then :
13057   gdb_cv_var_elf=yes
13058 else
13059   gdb_cv_var_elf=no
13060 fi
13061 rm -f core conftest.err conftest.$ac_objext \
13062     conftest$ac_exeext conftest.$ac_ext
13063 fi
13064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13065 $as_echo "$gdb_cv_var_elf" >&6; }
13066   CFLAGS=$OLD_CFLAGS
13067   LDFLAGS=$OLD_LDFLAGS
13068   LIBS=$OLD_LIBS
13069 if test $gdb_cv_var_elf = yes; then
13070   CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
13071
13072 $as_echo "#define HAVE_ELF 1" >>confdefs.h
13073
13074   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13075   if test "$plugins" = "yes"; then
13076     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13077 $as_echo_n "checking for library containing dlopen... " >&6; }
13078 if test "${ac_cv_search_dlopen+set}" = set; then :
13079   $as_echo_n "(cached) " >&6
13080 else
13081   ac_func_search_save_LIBS=$LIBS
13082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13083 /* end confdefs.h.  */
13084
13085 /* Override any GCC internal prototype to avoid an error.
13086    Use char because int might match the return type of a GCC
13087    builtin and then its argument prototype would still apply.  */
13088 #ifdef __cplusplus
13089 extern "C"
13090 #endif
13091 char dlopen ();
13092 int
13093 main ()
13094 {
13095 return dlopen ();
13096   ;
13097   return 0;
13098 }
13099 _ACEOF
13100 for ac_lib in '' dl; do
13101   if test -z "$ac_lib"; then
13102     ac_res="none required"
13103   else
13104     ac_res=-l$ac_lib
13105     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13106   fi
13107   if ac_fn_c_try_link "$LINENO"; then :
13108   ac_cv_search_dlopen=$ac_res
13109 fi
13110 rm -f core conftest.err conftest.$ac_objext \
13111     conftest$ac_exeext
13112   if test "${ac_cv_search_dlopen+set}" = set; then :
13113   break
13114 fi
13115 done
13116 if test "${ac_cv_search_dlopen+set}" = set; then :
13117
13118 else
13119   ac_cv_search_dlopen=no
13120 fi
13121 rm conftest.$ac_ext
13122 LIBS=$ac_func_search_save_LIBS
13123 fi
13124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13125 $as_echo "$ac_cv_search_dlopen" >&6; }
13126 ac_res=$ac_cv_search_dlopen
13127 if test "$ac_res" != no; then :
13128   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13129
13130 fi
13131
13132   fi
13133 fi
13134
13135 # Add macho support to GDB, but only if BFD includes it.
13136
13137   OLD_CFLAGS=$CFLAGS
13138   OLD_LDFLAGS=$LDFLAGS
13139   OLD_LIBS=$LIBS
13140   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13141   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13142   # always want our bfd.
13143   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13144   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13145   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13146   LIBS="-lbfd -liberty $intl $LIBS"
13147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
13148 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
13149 if test "${gdb_cv_var_macho+set}" = set; then :
13150   $as_echo_n "(cached) " >&6
13151 else
13152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13153 /* end confdefs.h.  */
13154 #include <stdlib.h>
13155   #include "bfd.h"
13156   #include "mach-o.h"
13157
13158 int
13159 main ()
13160 {
13161 return bfd_mach_o_lookup_command (NULL, 0, NULL);
13162   ;
13163   return 0;
13164 }
13165 _ACEOF
13166 if ac_fn_c_try_link "$LINENO"; then :
13167   gdb_cv_var_macho=yes
13168 else
13169   gdb_cv_var_macho=no
13170 fi
13171 rm -f core conftest.err conftest.$ac_objext \
13172     conftest$ac_exeext conftest.$ac_ext
13173 fi
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
13175 $as_echo "$gdb_cv_var_macho" >&6; }
13176   CFLAGS=$OLD_CFLAGS
13177   LDFLAGS=$OLD_LDFLAGS
13178   LIBS=$OLD_LIBS
13179 if test $gdb_cv_var_macho = yes; then
13180   CONFIG_OBS="$CONFIG_OBS machoread.o"
13181 fi
13182
13183 # Add SOM support to GDB, but only if BFD includes it.
13184
13185   OLD_CFLAGS=$CFLAGS
13186   OLD_LDFLAGS=$LDFLAGS
13187   OLD_LIBS=$LIBS
13188   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13189   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13190   # always want our bfd.
13191   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13192   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13193   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13194   LIBS="-lbfd -liberty $intl $LIBS"
13195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
13196 $as_echo_n "checking for SOM support in BFD... " >&6; }
13197 if test "${gdb_cv_var_som+set}" = set; then :
13198   $as_echo_n "(cached) " >&6
13199 else
13200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13201 /* end confdefs.h.  */
13202 #include <stdlib.h>
13203   #include "bfd.h"
13204   #include "som.h"
13205
13206 int
13207 main ()
13208 {
13209 return bfd_som_attach_aux_hdr (NULL, 0, NULL);
13210   ;
13211   return 0;
13212 }
13213 _ACEOF
13214 if ac_fn_c_try_link "$LINENO"; then :
13215   gdb_cv_var_som=yes
13216 else
13217   gdb_cv_var_som=no
13218 fi
13219 rm -f core conftest.err conftest.$ac_objext \
13220     conftest$ac_exeext conftest.$ac_ext
13221 fi
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
13223 $as_echo "$gdb_cv_var_som" >&6; }
13224   CFLAGS=$OLD_CFLAGS
13225   LDFLAGS=$OLD_LDFLAGS
13226   LIBS=$OLD_LIBS
13227 if test $gdb_cv_var_som = yes; then
13228   CONFIG_OBS="$CONFIG_OBS somread.o"
13229 fi
13230
13231 # Add any host-specific objects to GDB.
13232 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13233
13234 # If building on ELF, look for lzma support for embedded compressed debug info.
13235 if test $gdb_cv_var_elf = yes; then
13236
13237 # Check whether --with-lzma was given.
13238 if test "${with_lzma+set}" = set; then :
13239   withval=$with_lzma;
13240 else
13241   with_lzma=auto
13242 fi
13243
13244   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13245 $as_echo_n "checking whether to use lzma... " >&6; }
13246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13247 $as_echo "$with_lzma" >&6; }
13248
13249   if test "${with_lzma}" != no; then
13250
13251
13252
13253
13254
13255
13256
13257
13258     use_additional=yes
13259
13260   acl_save_prefix="$prefix"
13261   prefix="$acl_final_prefix"
13262   acl_save_exec_prefix="$exec_prefix"
13263   exec_prefix="$acl_final_exec_prefix"
13264
13265     eval additional_includedir=\"$includedir\"
13266     eval additional_libdir=\"$libdir\"
13267
13268   exec_prefix="$acl_save_exec_prefix"
13269   prefix="$acl_save_prefix"
13270
13271
13272 # Check whether --with-liblzma-prefix was given.
13273 if test "${with_liblzma_prefix+set}" = set; then :
13274   withval=$with_liblzma_prefix;
13275     if test "X$withval" = "Xno"; then
13276       use_additional=no
13277     else
13278       if test "X$withval" = "X"; then
13279
13280   acl_save_prefix="$prefix"
13281   prefix="$acl_final_prefix"
13282   acl_save_exec_prefix="$exec_prefix"
13283   exec_prefix="$acl_final_exec_prefix"
13284
13285           eval additional_includedir=\"$includedir\"
13286           eval additional_libdir=\"$libdir\"
13287
13288   exec_prefix="$acl_save_exec_prefix"
13289   prefix="$acl_save_prefix"
13290
13291       else
13292         additional_includedir="$withval/include"
13293         additional_libdir="$withval/lib"
13294       fi
13295     fi
13296
13297 fi
13298
13299       LIBLZMA=
13300   LTLIBLZMA=
13301   INCLZMA=
13302   rpathdirs=
13303   ltrpathdirs=
13304   names_already_handled=
13305   names_next_round='lzma '
13306   while test -n "$names_next_round"; do
13307     names_this_round="$names_next_round"
13308     names_next_round=
13309     for name in $names_this_round; do
13310       already_handled=
13311       for n in $names_already_handled; do
13312         if test "$n" = "$name"; then
13313           already_handled=yes
13314           break
13315         fi
13316       done
13317       if test -z "$already_handled"; then
13318         names_already_handled="$names_already_handled $name"
13319                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13320         eval value=\"\$HAVE_LIB$uppername\"
13321         if test -n "$value"; then
13322           if test "$value" = yes; then
13323             eval value=\"\$LIB$uppername\"
13324             test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13325             eval value=\"\$LTLIB$uppername\"
13326             test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13327           else
13328                                     :
13329           fi
13330         else
13331                               found_dir=
13332           found_la=
13333           found_so=
13334           found_a=
13335           if test $use_additional = yes; then
13336             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13337               found_dir="$additional_libdir"
13338               found_so="$additional_libdir/lib$name.$shlibext"
13339               if test -f "$additional_libdir/lib$name.la"; then
13340                 found_la="$additional_libdir/lib$name.la"
13341               fi
13342             else
13343               if test -f "$additional_libdir/lib$name.$libext"; then
13344                 found_dir="$additional_libdir"
13345                 found_a="$additional_libdir/lib$name.$libext"
13346                 if test -f "$additional_libdir/lib$name.la"; then
13347                   found_la="$additional_libdir/lib$name.la"
13348                 fi
13349               fi
13350             fi
13351           fi
13352           if test "X$found_dir" = "X"; then
13353             for x in $LDFLAGS $LTLIBLZMA; do
13354
13355   acl_save_prefix="$prefix"
13356   prefix="$acl_final_prefix"
13357   acl_save_exec_prefix="$exec_prefix"
13358   exec_prefix="$acl_final_exec_prefix"
13359   eval x=\"$x\"
13360   exec_prefix="$acl_save_exec_prefix"
13361   prefix="$acl_save_prefix"
13362
13363               case "$x" in
13364                 -L*)
13365                   dir=`echo "X$x" | sed -e 's/^X-L//'`
13366                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13367                     found_dir="$dir"
13368                     found_so="$dir/lib$name.$shlibext"
13369                     if test -f "$dir/lib$name.la"; then
13370                       found_la="$dir/lib$name.la"
13371                     fi
13372                   else
13373                     if test -f "$dir/lib$name.$libext"; then
13374                       found_dir="$dir"
13375                       found_a="$dir/lib$name.$libext"
13376                       if test -f "$dir/lib$name.la"; then
13377                         found_la="$dir/lib$name.la"
13378                       fi
13379                     fi
13380                   fi
13381                   ;;
13382               esac
13383               if test "X$found_dir" != "X"; then
13384                 break
13385               fi
13386             done
13387           fi
13388           if test "X$found_dir" != "X"; then
13389                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13390             if test "X$found_so" != "X"; then
13391                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13392                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13393               else
13394                                                                                 haveit=
13395                 for x in $ltrpathdirs; do
13396                   if test "X$x" = "X$found_dir"; then
13397                     haveit=yes
13398                     break
13399                   fi
13400                 done
13401                 if test -z "$haveit"; then
13402                   ltrpathdirs="$ltrpathdirs $found_dir"
13403                 fi
13404                                 if test "$hardcode_direct" = yes; then
13405                                                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13406                 else
13407                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13408                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13409                                                             haveit=
13410                     for x in $rpathdirs; do
13411                       if test "X$x" = "X$found_dir"; then
13412                         haveit=yes
13413                         break
13414                       fi
13415                     done
13416                     if test -z "$haveit"; then
13417                       rpathdirs="$rpathdirs $found_dir"
13418                     fi
13419                   else
13420                                                                                 haveit=
13421                     for x in $LDFLAGS $LIBLZMA; do
13422
13423   acl_save_prefix="$prefix"
13424   prefix="$acl_final_prefix"
13425   acl_save_exec_prefix="$exec_prefix"
13426   exec_prefix="$acl_final_exec_prefix"
13427   eval x=\"$x\"
13428   exec_prefix="$acl_save_exec_prefix"
13429   prefix="$acl_save_prefix"
13430
13431                       if test "X$x" = "X-L$found_dir"; then
13432                         haveit=yes
13433                         break
13434                       fi
13435                     done
13436                     if test -z "$haveit"; then
13437                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13438                     fi
13439                     if test "$hardcode_minus_L" != no; then
13440                                                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13441                     else
13442                                                                                                                                                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13443                     fi
13444                   fi
13445                 fi
13446               fi
13447             else
13448               if test "X$found_a" != "X"; then
13449                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13450               else
13451                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13452               fi
13453             fi
13454                         additional_includedir=
13455             case "$found_dir" in
13456               */lib | */lib/)
13457                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13458                 additional_includedir="$basedir/include"
13459                 ;;
13460             esac
13461             if test "X$additional_includedir" != "X"; then
13462                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
13463                 haveit=
13464                 if test "X$additional_includedir" = "X/usr/local/include"; then
13465                   if test -n "$GCC"; then
13466                     case $host_os in
13467                       linux*) haveit=yes;;
13468                     esac
13469                   fi
13470                 fi
13471                 if test -z "$haveit"; then
13472                   for x in $CPPFLAGS $INCLZMA; do
13473
13474   acl_save_prefix="$prefix"
13475   prefix="$acl_final_prefix"
13476   acl_save_exec_prefix="$exec_prefix"
13477   exec_prefix="$acl_final_exec_prefix"
13478   eval x=\"$x\"
13479   exec_prefix="$acl_save_exec_prefix"
13480   prefix="$acl_save_prefix"
13481
13482                     if test "X$x" = "X-I$additional_includedir"; then
13483                       haveit=yes
13484                       break
13485                     fi
13486                   done
13487                   if test -z "$haveit"; then
13488                     if test -d "$additional_includedir"; then
13489                                             INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13490                     fi
13491                   fi
13492                 fi
13493               fi
13494             fi
13495                         if test -n "$found_la"; then
13496                                                         save_libdir="$libdir"
13497               case "$found_la" in
13498                 */* | *\\*) . "$found_la" ;;
13499                 *) . "./$found_la" ;;
13500               esac
13501               libdir="$save_libdir"
13502                             for dep in $dependency_libs; do
13503                 case "$dep" in
13504                   -L*)
13505                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13506                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
13507                       haveit=
13508                       if test "X$additional_libdir" = "X/usr/local/lib"; then
13509                         if test -n "$GCC"; then
13510                           case $host_os in
13511                             linux*) haveit=yes;;
13512                           esac
13513                         fi
13514                       fi
13515                       if test -z "$haveit"; then
13516                         haveit=
13517                         for x in $LDFLAGS $LIBLZMA; do
13518
13519   acl_save_prefix="$prefix"
13520   prefix="$acl_final_prefix"
13521   acl_save_exec_prefix="$exec_prefix"
13522   exec_prefix="$acl_final_exec_prefix"
13523   eval x=\"$x\"
13524   exec_prefix="$acl_save_exec_prefix"
13525   prefix="$acl_save_prefix"
13526
13527                           if test "X$x" = "X-L$additional_libdir"; then
13528                             haveit=yes
13529                             break
13530                           fi
13531                         done
13532                         if test -z "$haveit"; then
13533                           if test -d "$additional_libdir"; then
13534                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13535                           fi
13536                         fi
13537                         haveit=
13538                         for x in $LDFLAGS $LTLIBLZMA; do
13539
13540   acl_save_prefix="$prefix"
13541   prefix="$acl_final_prefix"
13542   acl_save_exec_prefix="$exec_prefix"
13543   exec_prefix="$acl_final_exec_prefix"
13544   eval x=\"$x\"
13545   exec_prefix="$acl_save_exec_prefix"
13546   prefix="$acl_save_prefix"
13547
13548                           if test "X$x" = "X-L$additional_libdir"; then
13549                             haveit=yes
13550                             break
13551                           fi
13552                         done
13553                         if test -z "$haveit"; then
13554                           if test -d "$additional_libdir"; then
13555                                                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13556                           fi
13557                         fi
13558                       fi
13559                     fi
13560                     ;;
13561                   -R*)
13562                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
13563                     if test "$enable_rpath" != no; then
13564                                                                   haveit=
13565                       for x in $rpathdirs; do
13566                         if test "X$x" = "X$dir"; then
13567                           haveit=yes
13568                           break
13569                         fi
13570                       done
13571                       if test -z "$haveit"; then
13572                         rpathdirs="$rpathdirs $dir"
13573                       fi
13574                                                                   haveit=
13575                       for x in $ltrpathdirs; do
13576                         if test "X$x" = "X$dir"; then
13577                           haveit=yes
13578                           break
13579                         fi
13580                       done
13581                       if test -z "$haveit"; then
13582                         ltrpathdirs="$ltrpathdirs $dir"
13583                       fi
13584                     fi
13585                     ;;
13586                   -l*)
13587                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13588                     ;;
13589                   *.la)
13590                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13591                     ;;
13592                   *)
13593                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13594                     LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13595                     ;;
13596                 esac
13597               done
13598             fi
13599           else
13600                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13601             LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13602           fi
13603         fi
13604       fi
13605     done
13606   done
13607   if test "X$rpathdirs" != "X"; then
13608     if test -n "$hardcode_libdir_separator"; then
13609                         alldirs=
13610       for found_dir in $rpathdirs; do
13611         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13612       done
13613             acl_save_libdir="$libdir"
13614       libdir="$alldirs"
13615       eval flag=\"$hardcode_libdir_flag_spec\"
13616       libdir="$acl_save_libdir"
13617       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13618     else
13619             for found_dir in $rpathdirs; do
13620         acl_save_libdir="$libdir"
13621         libdir="$found_dir"
13622         eval flag=\"$hardcode_libdir_flag_spec\"
13623         libdir="$acl_save_libdir"
13624         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13625       done
13626     fi
13627   fi
13628   if test "X$ltrpathdirs" != "X"; then
13629             for found_dir in $ltrpathdirs; do
13630       LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13631     done
13632   fi
13633
13634
13635         ac_save_CPPFLAGS="$CPPFLAGS"
13636
13637   for element in $INCLZMA; do
13638     haveit=
13639     for x in $CPPFLAGS; do
13640
13641   acl_save_prefix="$prefix"
13642   prefix="$acl_final_prefix"
13643   acl_save_exec_prefix="$exec_prefix"
13644   exec_prefix="$acl_final_exec_prefix"
13645   eval x=\"$x\"
13646   exec_prefix="$acl_save_exec_prefix"
13647   prefix="$acl_save_prefix"
13648
13649       if test "X$x" = "X$element"; then
13650         haveit=yes
13651         break
13652       fi
13653     done
13654     if test -z "$haveit"; then
13655       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13656     fi
13657   done
13658
13659
13660   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13661 $as_echo_n "checking for liblzma... " >&6; }
13662 if test "${ac_cv_liblzma+set}" = set; then :
13663   $as_echo_n "(cached) " >&6
13664 else
13665
13666     ac_save_LIBS="$LIBS"
13667     LIBS="$LIBS $LIBLZMA"
13668     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13669 /* end confdefs.h.  */
13670 #include "lzma.h"
13671 int
13672 main ()
13673 {
13674 lzma_index_iter iter;
13675                            lzma_index_iter_init (&iter, 0);
13676                            lzma_mf_is_supported (LZMA_MF_HC3);
13677   ;
13678   return 0;
13679 }
13680 _ACEOF
13681 if ac_fn_c_try_link "$LINENO"; then :
13682   ac_cv_liblzma=yes
13683 else
13684   ac_cv_liblzma=no
13685 fi
13686 rm -f core conftest.err conftest.$ac_objext \
13687     conftest$ac_exeext conftest.$ac_ext
13688     LIBS="$ac_save_LIBS"
13689
13690 fi
13691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13692 $as_echo "$ac_cv_liblzma" >&6; }
13693   if test "$ac_cv_liblzma" = yes; then
13694     HAVE_LIBLZMA=yes
13695
13696 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13697
13698     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13699 $as_echo_n "checking how to link with liblzma... " >&6; }
13700     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13701 $as_echo "$LIBLZMA" >&6; }
13702   else
13703     HAVE_LIBLZMA=no
13704             CPPFLAGS="$ac_save_CPPFLAGS"
13705     LIBLZMA=
13706     LTLIBLZMA=
13707   fi
13708
13709
13710
13711
13712
13713
13714     if test "$HAVE_LIBLZMA" != yes; then
13715       if test "$with_lzma" = yes; then
13716         as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
13717       fi
13718     fi
13719   fi
13720 fi
13721
13722 LIBGUI="../libgui/src/libgui.a"
13723 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13724
13725
13726
13727 WIN32LDAPP=
13728
13729
13730
13731 case "${host}" in
13732 *-*-cygwin* | *-*-mingw* )
13733     configdir="win"
13734     ;;
13735 *)
13736     configdir="unix"
13737     ;;
13738 esac
13739
13740 GDBTKLIBS=
13741 if test "${enable_gdbtk}" = "yes"; then
13742
13743     # Gdbtk must have an absolute path to srcdir in order to run
13744     # properly when not installed.
13745     here=`pwd`
13746     cd ${srcdir}
13747     GDBTK_SRC_DIR=`pwd`
13748     cd $here
13749
13750
13751     #
13752     # Ok, lets find the tcl configuration
13753     # First, look for one uninstalled.
13754     # the alternative search directory is invoked by --with-tcl
13755     #
13756
13757     if test x"${no_tcl}" = x ; then
13758         # we reset no_tcl in case something fails here
13759         no_tcl=true
13760
13761 # Check whether --with-tcl was given.
13762 if test "${with_tcl+set}" = set; then :
13763   withval=$with_tcl; with_tclconfig=${withval}
13764 fi
13765
13766         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13767 $as_echo_n "checking for Tcl configuration... " >&6; }
13768         if test "${ac_cv_c_tclconfig+set}" = set; then :
13769   $as_echo_n "(cached) " >&6
13770 else
13771
13772
13773             # First check to see if --with-tcl was specified.
13774             case "${host}" in
13775                 *-*-cygwin*) platDir="win" ;;
13776                 *) platDir="unix" ;;
13777             esac
13778             if test x"${with_tclconfig}" != x ; then
13779                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13780                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13781                 else
13782                     as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
13783                 fi
13784             fi
13785
13786             # then check for a private Tcl installation
13787             if test x"${ac_cv_c_tclconfig}" = x ; then
13788                 for i in \
13789                         ../tcl \
13790                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13791                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13792                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13793                         ../../tcl \
13794                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13795                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13796                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13797                         ../../../tcl \
13798                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13799                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13800                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13801                     if test -f "$i/$platDir/tclConfig.sh" ; then
13802                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13803                         break
13804                     fi
13805                 done
13806             fi
13807
13808             # on Darwin, check in Framework installation locations
13809             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13810                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13811                         `ls -d /Library/Frameworks 2>/dev/null` \
13812                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
13813                         `ls -d /System/Library/Frameworks 2>/dev/null` \
13814                         ; do
13815                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13816                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13817                         break
13818                     fi
13819                 done
13820             fi
13821
13822             # check in a few common install locations
13823             if test x"${ac_cv_c_tclconfig}" = x ; then
13824                 for i in `ls -d ${libdir} 2>/dev/null` \
13825                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
13826                         `ls -d ${prefix}/lib 2>/dev/null` \
13827                         `ls -d /usr/local/lib 2>/dev/null` \
13828                         `ls -d /usr/contrib/lib 2>/dev/null` \
13829                         `ls -d /usr/lib 2>/dev/null` \
13830                         ; do
13831                     if test -f "$i/tclConfig.sh" ; then
13832                         ac_cv_c_tclconfig=`(cd $i; pwd)`
13833                         break
13834                     fi
13835                 done
13836             fi
13837
13838             # check in a few other private locations
13839             if test x"${ac_cv_c_tclconfig}" = x ; then
13840                 for i in \
13841                         ${srcdir}/../tcl \
13842                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13843                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
13844                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
13845                     if test -f "$i/$platDir/tclConfig.sh" ; then
13846                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13847                     break
13848                 fi
13849                 done
13850             fi
13851
13852 fi
13853
13854
13855         if test x"${ac_cv_c_tclconfig}" = x ; then
13856             TCL_BIN_DIR="# no Tcl configs found"
13857             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
13858 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
13859         else
13860             no_tcl=
13861             TCL_BIN_DIR=${ac_cv_c_tclconfig}
13862             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
13863 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
13864         fi
13865     fi
13866
13867
13868     # If $no_tk is nonempty, then we can't do Tk, and there is no
13869     # point to doing Tcl.
13870
13871     #
13872     # Ok, lets find the tk configuration
13873     # First, look for one uninstalled.
13874     # the alternative search directory is invoked by --with-tk
13875     #
13876
13877     if test x"${no_tk}" = x ; then
13878         # we reset no_tk in case something fails here
13879         no_tk=true
13880
13881 # Check whether --with-tk was given.
13882 if test "${with_tk+set}" = set; then :
13883   withval=$with_tk; with_tkconfig=${withval}
13884 fi
13885
13886         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
13887 $as_echo_n "checking for Tk configuration... " >&6; }
13888         if test "${ac_cv_c_tkconfig+set}" = set; then :
13889   $as_echo_n "(cached) " >&6
13890 else
13891
13892
13893             # First check to see if --with-tkconfig was specified.
13894             if test x"${with_tkconfig}" != x ; then
13895                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
13896                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
13897                 else
13898                     as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
13899                 fi
13900             fi
13901
13902             # then check for a private Tk library
13903             case "${host}" in
13904                 *-*-cygwin*) platDir="win" ;;
13905                 *) platDir="unix" ;;
13906             esac
13907             if test x"${ac_cv_c_tkconfig}" = x ; then
13908                 for i in \
13909                         ../tk \
13910                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13911                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
13912                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
13913                         ../../tk \
13914                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13915                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
13916                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
13917                         ../../../tk \
13918                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13919                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
13920                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
13921                     if test -f "$i/$platDir/tkConfig.sh" ; then
13922                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13923                         break
13924                     fi
13925                 done
13926             fi
13927
13928             # on Darwin, check in Framework installation locations
13929             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
13930                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13931                         `ls -d /Library/Frameworks 2>/dev/null` \
13932                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
13933                         `ls -d /System/Library/Frameworks 2>/dev/null` \
13934                         ; do
13935                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
13936                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
13937                         break
13938                     fi
13939                 done
13940             fi
13941
13942             # check in a few common install locations
13943             if test x"${ac_cv_c_tkconfig}" = x ; then
13944                 for i in `ls -d ${libdir} 2>/dev/null` \
13945                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
13946                         `ls -d ${prefix}/lib 2>/dev/null` \
13947                         `ls -d /usr/local/lib 2>/dev/null` \
13948                         `ls -d /usr/contrib/lib 2>/dev/null` \
13949                         `ls -d /usr/lib 2>/dev/null` \
13950                         ; do
13951                     if test -f "$i/tkConfig.sh" ; then
13952                         ac_cv_c_tkconfig=`(cd $i; pwd)`
13953                         break
13954                     fi
13955                 done
13956             fi
13957             # check in a few other private locations
13958             if test x"${ac_cv_c_tkconfig}" = x ; then
13959                 for i in \
13960                         ${srcdir}/../tk \
13961                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13962                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
13963                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
13964                     if test -f "$i/$platDir/tkConfig.sh" ; then
13965                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13966                         break
13967                     fi
13968                 done
13969             fi
13970
13971 fi
13972
13973
13974         if test x"${ac_cv_c_tkconfig}" = x ; then
13975             TK_BIN_DIR="# no Tk configs found"
13976             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
13977 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
13978         else
13979             no_tk=
13980             TK_BIN_DIR=${ac_cv_c_tkconfig}
13981             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
13982 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
13983         fi
13984     fi
13985
13986
13987     if test -z "${no_tcl}" -a -z "${no_tk}"; then
13988
13989     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
13990 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
13991
13992     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
13993         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13994 $as_echo "loading" >&6; }
13995         . ${TCL_BIN_DIR}/tclConfig.sh
13996     else
13997         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
13998 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
13999     fi
14000
14001     # eval is required to do the TCL_DBGX substitution
14002     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
14003     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
14004
14005     # If the TCL_BIN_DIR is the build directory (not the install directory),
14006     # then set the common variable name to the value of the build variables.
14007     # For example, the variable TCL_LIB_SPEC will be set to the value
14008     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
14009     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
14010     # installed and uninstalled version of Tcl.
14011     if test -f "${TCL_BIN_DIR}/Makefile" ; then
14012         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
14013         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
14014         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
14015     elif test "`uname -s`" = "Darwin"; then
14016         # If Tcl was built as a framework, attempt to use the libraries
14017         # from the framework at the given location so that linking works
14018         # against Tcl.framework installed in an arbitrary location.
14019         case ${TCL_DEFS} in
14020             *TCL_FRAMEWORK*)
14021                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
14022                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
14023                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
14024                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
14025                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
14026                             break
14027                         fi
14028                     done
14029                 fi
14030                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
14031                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
14032                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
14033                 fi
14034                 ;;
14035         esac
14036     fi
14037
14038     # eval is required to do the TCL_DBGX substitution
14039     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
14040     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
14041     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
14042     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058         # Check for in-tree tcl
14059         here=`pwd`
14060         cd ${srcdir}/..
14061         topdir=`pwd`
14062         cd ${here}
14063
14064         intree="no"
14065         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
14066           intree="yes"
14067         fi
14068
14069         # Find Tcl private headers
14070         if test x"${intree}" = xno; then
14071
14072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
14073 $as_echo_n "checking for Tcl private headers... " >&6; }
14074   private_dir=""
14075   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
14076   if test -f ${dir}/tclInt.h ; then
14077     private_dir=${dir}
14078   fi
14079
14080   if test x"${private_dir}" = x; then
14081     as_fn_error "could not find private Tcl headers" "$LINENO" 5
14082   else
14083     TCL_PRIVATE_INCLUDE="-I${private_dir}"
14084     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14085 $as_echo "${private_dir}" >&6; }
14086   fi
14087
14088           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
14089           TCL_LIBRARY="${TCL_LIB_SPEC}"
14090           TCL_DEPS=""
14091         else
14092           # If building tcl in the same src tree, private headers
14093           # are not needed, but we need to be sure to use the right
14094           # headers library
14095           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
14096           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
14097           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
14098         fi
14099
14100
14101
14102
14103
14104     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
14105 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
14106
14107     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
14108         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14109 $as_echo "loading" >&6; }
14110         . ${TK_BIN_DIR}/tkConfig.sh
14111     else
14112         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
14113 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
14114     fi
14115
14116     # eval is required to do the TK_DBGX substitution
14117     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
14118     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
14119
14120     # If the TK_BIN_DIR is the build directory (not the install directory),
14121     # then set the common variable name to the value of the build variables.
14122     # For example, the variable TK_LIB_SPEC will be set to the value
14123     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
14124     # instead of TK_BUILD_LIB_SPEC since it will work with both an
14125     # installed and uninstalled version of Tcl.
14126     if test -f "${TK_BIN_DIR}/Makefile" ; then
14127         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
14128         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
14129         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
14130     elif test "`uname -s`" = "Darwin"; then
14131         # If Tk was built as a framework, attempt to use the libraries
14132         # from the framework at the given location so that linking works
14133         # against Tk.framework installed in an arbitrary location.
14134         case ${TK_DEFS} in
14135             *TK_FRAMEWORK*)
14136                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
14137                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
14138                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
14139                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
14140                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
14141                             break
14142                         fi
14143                     done
14144                 fi
14145                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
14146                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
14147                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
14148                 fi
14149                 ;;
14150         esac
14151     fi
14152
14153     # eval is required to do the TK_DBGX substitution
14154     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
14155     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
14156     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
14157     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172         # Check for in-tree Tk
14173         intree="no"
14174         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14175           intree="yes"
14176         fi
14177
14178         # Find Tk private headers
14179         if test x"${intree}" = xno; then
14180
14181   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14182 $as_echo_n "checking for Tk private headers... " >&6; }
14183   private_dir=""
14184   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14185   if test -f ${dir}/tkInt.h; then
14186     private_dir=${dir}
14187   fi
14188
14189   if test x"${private_dir}" = x; then
14190     as_fn_error "could not find Tk private headers" "$LINENO" 5
14191   else
14192     TK_PRIVATE_INCLUDE="-I${private_dir}"
14193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14194 $as_echo "${private_dir}" >&6; }
14195   fi
14196
14197           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14198           TK_LIBRARY=${TK_LIB_SPEC}
14199           TK_DEPS=""
14200         else
14201           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14202           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14203           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14204         fi
14205
14206
14207
14208
14209
14210         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
14211
14212         # Include some libraries that Tcl and Tk want.
14213         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14214         # Yes, the ordering seems wrong here.  But it isn't.
14215         # TK_LIBS is the list of libraries that need to be linked
14216         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
14217         # were in LIBS then any link tests after this point would
14218         # try to include things like `$(LIBGUI)', which wouldn't work.
14219         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
14220
14221         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14222         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14223         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14224         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14225         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14226         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14227         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
14228
14229         if test x$gdb_cv_os_cygwin = xyes; then
14230           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14231           WIN32LDAPP="-Wl,--subsystem,console"
14232           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
14233         fi
14234
14235         subdirs="$subdirs gdbtk"
14236
14237     fi
14238 fi
14239
14240
14241
14242
14243
14244
14245
14246
14247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14248 $as_echo_n "checking for X... " >&6; }
14249
14250
14251 # Check whether --with-x was given.
14252 if test "${with_x+set}" = set; then :
14253   withval=$with_x;
14254 fi
14255
14256 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14257 if test "x$with_x" = xno; then
14258   # The user explicitly disabled X.
14259   have_x=disabled
14260 else
14261   case $x_includes,$x_libraries in #(
14262     *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14263     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14264   $as_echo_n "(cached) " >&6
14265 else
14266   # One or both of the vars are not set, and there is no cached value.
14267 ac_x_includes=no ac_x_libraries=no
14268 rm -f -r conftest.dir
14269 if mkdir conftest.dir; then
14270   cd conftest.dir
14271   cat >Imakefile <<'_ACEOF'
14272 incroot:
14273         @echo incroot='${INCROOT}'
14274 usrlibdir:
14275         @echo usrlibdir='${USRLIBDIR}'
14276 libdir:
14277         @echo libdir='${LIBDIR}'
14278 _ACEOF
14279   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
14280     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
14281     for ac_var in incroot usrlibdir libdir; do
14282       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14283     done
14284     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
14285     for ac_extension in a so sl dylib la dll; do
14286       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14287          test -f "$ac_im_libdir/libX11.$ac_extension"; then
14288         ac_im_usrlibdir=$ac_im_libdir; break
14289       fi
14290     done
14291     # Screen out bogus values from the imake configuration.  They are
14292     # bogus both because they are the default anyway, and because
14293     # using them would break gcc on systems where it needs fixed includes.
14294     case $ac_im_incroot in
14295         /usr/include) ac_x_includes= ;;
14296         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
14297     esac
14298     case $ac_im_usrlibdir in
14299         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
14300         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
14301     esac
14302   fi
14303   cd ..
14304   rm -f -r conftest.dir
14305 fi
14306
14307 # Standard set of common directories for X headers.
14308 # Check X11 before X11Rn because it is often a symlink to the current release.
14309 ac_x_header_dirs='
14310 /usr/X11/include
14311 /usr/X11R7/include
14312 /usr/X11R6/include
14313 /usr/X11R5/include
14314 /usr/X11R4/include
14315
14316 /usr/include/X11
14317 /usr/include/X11R7
14318 /usr/include/X11R6
14319 /usr/include/X11R5
14320 /usr/include/X11R4
14321
14322 /usr/local/X11/include
14323 /usr/local/X11R7/include
14324 /usr/local/X11R6/include
14325 /usr/local/X11R5/include
14326 /usr/local/X11R4/include
14327
14328 /usr/local/include/X11
14329 /usr/local/include/X11R7
14330 /usr/local/include/X11R6
14331 /usr/local/include/X11R5
14332 /usr/local/include/X11R4
14333
14334 /usr/X386/include
14335 /usr/x386/include
14336 /usr/XFree86/include/X11
14337
14338 /usr/include
14339 /usr/local/include
14340 /usr/unsupported/include
14341 /usr/athena/include
14342 /usr/local/x11r5/include
14343 /usr/lpp/Xamples/include
14344
14345 /usr/openwin/include
14346 /usr/openwin/share/include'
14347
14348 if test "$ac_x_includes" = no; then
14349   # Guess where to find include files, by looking for Xlib.h.
14350   # First, try using that file with no special directory specified.
14351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14352 /* end confdefs.h.  */
14353 #include <X11/Xlib.h>
14354 _ACEOF
14355 if ac_fn_c_try_cpp "$LINENO"; then :
14356   # We can compile using X headers with no special include directory.
14357 ac_x_includes=
14358 else
14359   for ac_dir in $ac_x_header_dirs; do
14360   if test -r "$ac_dir/X11/Xlib.h"; then
14361     ac_x_includes=$ac_dir
14362     break
14363   fi
14364 done
14365 fi
14366 rm -f conftest.err conftest.$ac_ext
14367 fi # $ac_x_includes = no
14368
14369 if test "$ac_x_libraries" = no; then
14370   # Check for the libraries.
14371   # See if we find them without any special options.
14372   # Don't add to $LIBS permanently.
14373   ac_save_LIBS=$LIBS
14374   LIBS="-lX11 $LIBS"
14375   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14376 /* end confdefs.h.  */
14377 #include <X11/Xlib.h>
14378 int
14379 main ()
14380 {
14381 XrmInitialize ()
14382   ;
14383   return 0;
14384 }
14385 _ACEOF
14386 if ac_fn_c_try_link "$LINENO"; then :
14387   LIBS=$ac_save_LIBS
14388 # We can link X programs with no special library path.
14389 ac_x_libraries=
14390 else
14391   LIBS=$ac_save_LIBS
14392 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
14393 do
14394   # Don't even attempt the hair of trying to link an X program!
14395   for ac_extension in a so sl dylib la dll; do
14396     if test -r "$ac_dir/libX11.$ac_extension"; then
14397       ac_x_libraries=$ac_dir
14398       break 2
14399     fi
14400   done
14401 done
14402 fi
14403 rm -f core conftest.err conftest.$ac_objext \
14404     conftest$ac_exeext conftest.$ac_ext
14405 fi # $ac_x_libraries = no
14406
14407 case $ac_x_includes,$ac_x_libraries in #(
14408   no,* | *,no | *\'*)
14409     # Didn't find X, or a directory has "'" in its name.
14410     ac_cv_have_x="have_x=no";; #(
14411   *)
14412     # Record where we found X for the cache.
14413     ac_cv_have_x="have_x=yes\
14414         ac_x_includes='$ac_x_includes'\
14415         ac_x_libraries='$ac_x_libraries'"
14416 esac
14417 fi
14418 ;; #(
14419     *) have_x=yes;;
14420   esac
14421   eval "$ac_cv_have_x"
14422 fi # $with_x != no
14423
14424 if test "$have_x" != yes; then
14425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14426 $as_echo "$have_x" >&6; }
14427   no_x=yes
14428 else
14429   # If each of the values was on the command line, it overrides each guess.
14430   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14431   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14432   # Update the cache value to reflect the command line values.
14433   ac_cv_have_x="have_x=yes\
14434         ac_x_includes='$x_includes'\
14435         ac_x_libraries='$x_libraries'"
14436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14437 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
14438 fi
14439
14440
14441 # Unlike the sim directory, whether a simulator is linked is controlled by
14442 # presence of a gdb_sim definition in the target configure.tgt entry.
14443 # This code just checks for a few cases where we'd like to ignore those
14444 # definitions, even when they're present in the '.mt' file.  These cases
14445 # are when --disable-sim is specified, or if the simulator directory is
14446 # not part of the source tree.
14447 #
14448 # Check whether --enable-sim was given.
14449 if test "${enable_sim+set}" = set; then :
14450   enableval=$enable_sim; echo "enable_sim = $enable_sim";
14451  echo "enableval = ${enableval}";
14452  case "${enableval}" in
14453   yes) ignore_sim=false ;;
14454   no)  ignore_sim=true ;;
14455   *)   ignore_sim=false ;;
14456  esac
14457 else
14458   ignore_sim=false
14459 fi
14460
14461
14462 if test ! -d "${srcdir}/../sim"; then
14463   ignore_sim=true
14464 fi
14465
14466 SIM=
14467 SIM_OBS=
14468 if test "${ignore_sim}" = "false"; then
14469   if test x"${gdb_sim}" != x ; then
14470     SIM="${gdb_sim}"
14471     SIM_OBS="remote-sim.o"
14472
14473 $as_echo "#define WITH_SIM 1" >>confdefs.h
14474
14475   fi
14476 fi
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491 # List of host floatformats.
14492
14493 cat >>confdefs.h <<_ACEOF
14494 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
14495 _ACEOF
14496
14497
14498 cat >>confdefs.h <<_ACEOF
14499 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
14500 _ACEOF
14501
14502
14503 cat >>confdefs.h <<_ACEOF
14504 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
14505 _ACEOF
14506
14507
14508 # target_subdir is used by the testsuite to find the target libraries.
14509 target_subdir=
14510 if test "${host}" != "${target}"; then
14511     target_subdir="${target_alias}/"
14512 fi
14513
14514
14515 frags=
14516 if test "${gdb_native}" = "yes"; then
14517   host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14518   if test ! -f ${host_makefile_frag}; then
14519     as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
14520   fi
14521   frags="$frags $host_makefile_frag"
14522 else
14523   host_makefile_frag=/dev/null
14524 fi
14525
14526
14527
14528
14529 if test "${gdb_native}" = "yes"; then
14530 # We pick this up from the host configuration file (.mh) because we
14531 # do not have a native configuration Makefile fragment.
14532 nativefile=`sed -n '
14533 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
14534 ' ${host_makefile_frag}`
14535 fi
14536
14537
14538 if test x"${gdb_osabi}" != x ; then
14539
14540 cat >>confdefs.h <<_ACEOF
14541 #define GDB_OSABI_DEFAULT $gdb_osabi
14542 _ACEOF
14543
14544 fi
14545
14546 # Enable multi-ice-gdb-server.
14547 # Check whether --enable-multi-ice was given.
14548 if test "${enable_multi_ice+set}" = set; then :
14549   enableval=$enable_multi_ice; case $enableval in
14550     yes | no)
14551       ;;
14552     *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
14553   esac
14554 fi
14555
14556 if test "x$enable_multi_ice" = xyes; then
14557    subdirs="$subdirs multi-ice"
14558
14559 fi
14560
14561 # Check whether --enable-gdbserver was given.
14562 if test "${enable_gdbserver+set}" = set; then :
14563   enableval=$enable_gdbserver; case "${enableval}" in
14564   yes| no|auto) ;;
14565   *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14566 esac
14567 else
14568   enable_gdbserver=auto
14569 fi
14570
14571
14572 # We only build gdbserver automatically in a native configuration, and
14573 # only if the user did not explicitly disable its build.
14574 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
14575   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14576 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
14577   if test "x$build_gdbserver" = xyes; then
14578     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14579 $as_echo "yes" >&6; }
14580     subdirs="$subdirs gdbserver"
14581
14582     gdbserver_build_enabled=yes
14583   else
14584     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14585 $as_echo "no" >&6; }
14586   fi
14587 fi
14588
14589 # If the user explicitly request the gdbserver to be built, verify that
14590 # we were in fact able to enable it.
14591 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14592   as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14593 fi
14594
14595 # Check for babeltrace and babeltrace-ctf
14596
14597 # Check whether --with-babeltrace was given.
14598 if test "${with_babeltrace+set}" = set; then :
14599   withval=$with_babeltrace;
14600 else
14601   with_babeltrace=auto
14602 fi
14603
14604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14605 $as_echo_n "checking whether to use babeltrace... " >&6; }
14606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14607 $as_echo "$with_babeltrace" >&6; }
14608
14609 if test "x$with_babeltrace" = "xno"; then
14610   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14611 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14612 else
14613   # Append -Werror to CFLAGS so that configure can catch the warning
14614   # "assignment from incompatible pointer type", which is related to
14615   # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
14616   # in GDB, while babeltrace 1.0.3 is broken.
14617   # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14618   # safe to save and restore CFLAGS here.
14619   saved_CFLAGS=$CFLAGS
14620   CFLAGS="$CFLAGS -Werror"
14621
14622
14623
14624
14625
14626
14627
14628
14629     use_additional=yes
14630
14631   acl_save_prefix="$prefix"
14632   prefix="$acl_final_prefix"
14633   acl_save_exec_prefix="$exec_prefix"
14634   exec_prefix="$acl_final_exec_prefix"
14635
14636     eval additional_includedir=\"$includedir\"
14637     eval additional_libdir=\"$libdir\"
14638
14639   exec_prefix="$acl_save_exec_prefix"
14640   prefix="$acl_save_prefix"
14641
14642
14643 # Check whether --with-libbabeltrace-prefix was given.
14644 if test "${with_libbabeltrace_prefix+set}" = set; then :
14645   withval=$with_libbabeltrace_prefix;
14646     if test "X$withval" = "Xno"; then
14647       use_additional=no
14648     else
14649       if test "X$withval" = "X"; then
14650
14651   acl_save_prefix="$prefix"
14652   prefix="$acl_final_prefix"
14653   acl_save_exec_prefix="$exec_prefix"
14654   exec_prefix="$acl_final_exec_prefix"
14655
14656           eval additional_includedir=\"$includedir\"
14657           eval additional_libdir=\"$libdir\"
14658
14659   exec_prefix="$acl_save_exec_prefix"
14660   prefix="$acl_save_prefix"
14661
14662       else
14663         additional_includedir="$withval/include"
14664         additional_libdir="$withval/lib"
14665       fi
14666     fi
14667
14668 fi
14669
14670       LIBBABELTRACE=
14671   LTLIBBABELTRACE=
14672   INCBABELTRACE=
14673   rpathdirs=
14674   ltrpathdirs=
14675   names_already_handled=
14676   names_next_round='babeltrace babeltrace-ctf'
14677   while test -n "$names_next_round"; do
14678     names_this_round="$names_next_round"
14679     names_next_round=
14680     for name in $names_this_round; do
14681       already_handled=
14682       for n in $names_already_handled; do
14683         if test "$n" = "$name"; then
14684           already_handled=yes
14685           break
14686         fi
14687       done
14688       if test -z "$already_handled"; then
14689         names_already_handled="$names_already_handled $name"
14690                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14691         eval value=\"\$HAVE_LIB$uppername\"
14692         if test -n "$value"; then
14693           if test "$value" = yes; then
14694             eval value=\"\$LIB$uppername\"
14695             test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
14696             eval value=\"\$LTLIB$uppername\"
14697             test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
14698           else
14699                                     :
14700           fi
14701         else
14702                               found_dir=
14703           found_la=
14704           found_so=
14705           found_a=
14706           if test $use_additional = yes; then
14707             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14708               found_dir="$additional_libdir"
14709               found_so="$additional_libdir/lib$name.$shlibext"
14710               if test -f "$additional_libdir/lib$name.la"; then
14711                 found_la="$additional_libdir/lib$name.la"
14712               fi
14713             else
14714               if test -f "$additional_libdir/lib$name.$libext"; then
14715                 found_dir="$additional_libdir"
14716                 found_a="$additional_libdir/lib$name.$libext"
14717                 if test -f "$additional_libdir/lib$name.la"; then
14718                   found_la="$additional_libdir/lib$name.la"
14719                 fi
14720               fi
14721             fi
14722           fi
14723           if test "X$found_dir" = "X"; then
14724             for x in $LDFLAGS $LTLIBBABELTRACE; do
14725
14726   acl_save_prefix="$prefix"
14727   prefix="$acl_final_prefix"
14728   acl_save_exec_prefix="$exec_prefix"
14729   exec_prefix="$acl_final_exec_prefix"
14730   eval x=\"$x\"
14731   exec_prefix="$acl_save_exec_prefix"
14732   prefix="$acl_save_prefix"
14733
14734               case "$x" in
14735                 -L*)
14736                   dir=`echo "X$x" | sed -e 's/^X-L//'`
14737                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14738                     found_dir="$dir"
14739                     found_so="$dir/lib$name.$shlibext"
14740                     if test -f "$dir/lib$name.la"; then
14741                       found_la="$dir/lib$name.la"
14742                     fi
14743                   else
14744                     if test -f "$dir/lib$name.$libext"; then
14745                       found_dir="$dir"
14746                       found_a="$dir/lib$name.$libext"
14747                       if test -f "$dir/lib$name.la"; then
14748                         found_la="$dir/lib$name.la"
14749                       fi
14750                     fi
14751                   fi
14752                   ;;
14753               esac
14754               if test "X$found_dir" != "X"; then
14755                 break
14756               fi
14757             done
14758           fi
14759           if test "X$found_dir" != "X"; then
14760                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
14761             if test "X$found_so" != "X"; then
14762                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14763                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14764               else
14765                                                                                 haveit=
14766                 for x in $ltrpathdirs; do
14767                   if test "X$x" = "X$found_dir"; then
14768                     haveit=yes
14769                     break
14770                   fi
14771                 done
14772                 if test -z "$haveit"; then
14773                   ltrpathdirs="$ltrpathdirs $found_dir"
14774                 fi
14775                                 if test "$hardcode_direct" = yes; then
14776                                                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14777                 else
14778                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14779                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14780                                                             haveit=
14781                     for x in $rpathdirs; do
14782                       if test "X$x" = "X$found_dir"; then
14783                         haveit=yes
14784                         break
14785                       fi
14786                     done
14787                     if test -z "$haveit"; then
14788                       rpathdirs="$rpathdirs $found_dir"
14789                     fi
14790                   else
14791                                                                                 haveit=
14792                     for x in $LDFLAGS $LIBBABELTRACE; do
14793
14794   acl_save_prefix="$prefix"
14795   prefix="$acl_final_prefix"
14796   acl_save_exec_prefix="$exec_prefix"
14797   exec_prefix="$acl_final_exec_prefix"
14798   eval x=\"$x\"
14799   exec_prefix="$acl_save_exec_prefix"
14800   prefix="$acl_save_prefix"
14801
14802                       if test "X$x" = "X-L$found_dir"; then
14803                         haveit=yes
14804                         break
14805                       fi
14806                     done
14807                     if test -z "$haveit"; then
14808                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
14809                     fi
14810                     if test "$hardcode_minus_L" != no; then
14811                                                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14812                     else
14813                                                                                                                                                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14814                     fi
14815                   fi
14816                 fi
14817               fi
14818             else
14819               if test "X$found_a" != "X"; then
14820                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
14821               else
14822                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
14823               fi
14824             fi
14825                         additional_includedir=
14826             case "$found_dir" in
14827               */lib | */lib/)
14828                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14829                 additional_includedir="$basedir/include"
14830                 ;;
14831             esac
14832             if test "X$additional_includedir" != "X"; then
14833                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
14834                 haveit=
14835                 if test "X$additional_includedir" = "X/usr/local/include"; then
14836                   if test -n "$GCC"; then
14837                     case $host_os in
14838                       linux*) haveit=yes;;
14839                     esac
14840                   fi
14841                 fi
14842                 if test -z "$haveit"; then
14843                   for x in $CPPFLAGS $INCBABELTRACE; do
14844
14845   acl_save_prefix="$prefix"
14846   prefix="$acl_final_prefix"
14847   acl_save_exec_prefix="$exec_prefix"
14848   exec_prefix="$acl_final_exec_prefix"
14849   eval x=\"$x\"
14850   exec_prefix="$acl_save_exec_prefix"
14851   prefix="$acl_save_prefix"
14852
14853                     if test "X$x" = "X-I$additional_includedir"; then
14854                       haveit=yes
14855                       break
14856                     fi
14857                   done
14858                   if test -z "$haveit"; then
14859                     if test -d "$additional_includedir"; then
14860                                             INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
14861                     fi
14862                   fi
14863                 fi
14864               fi
14865             fi
14866                         if test -n "$found_la"; then
14867                                                         save_libdir="$libdir"
14868               case "$found_la" in
14869                 */* | *\\*) . "$found_la" ;;
14870                 *) . "./$found_la" ;;
14871               esac
14872               libdir="$save_libdir"
14873                             for dep in $dependency_libs; do
14874                 case "$dep" in
14875                   -L*)
14876                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14877                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
14878                       haveit=
14879                       if test "X$additional_libdir" = "X/usr/local/lib"; then
14880                         if test -n "$GCC"; then
14881                           case $host_os in
14882                             linux*) haveit=yes;;
14883                           esac
14884                         fi
14885                       fi
14886                       if test -z "$haveit"; then
14887                         haveit=
14888                         for x in $LDFLAGS $LIBBABELTRACE; do
14889
14890   acl_save_prefix="$prefix"
14891   prefix="$acl_final_prefix"
14892   acl_save_exec_prefix="$exec_prefix"
14893   exec_prefix="$acl_final_exec_prefix"
14894   eval x=\"$x\"
14895   exec_prefix="$acl_save_exec_prefix"
14896   prefix="$acl_save_prefix"
14897
14898                           if test "X$x" = "X-L$additional_libdir"; then
14899                             haveit=yes
14900                             break
14901                           fi
14902                         done
14903                         if test -z "$haveit"; then
14904                           if test -d "$additional_libdir"; then
14905                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
14906                           fi
14907                         fi
14908                         haveit=
14909                         for x in $LDFLAGS $LTLIBBABELTRACE; do
14910
14911   acl_save_prefix="$prefix"
14912   prefix="$acl_final_prefix"
14913   acl_save_exec_prefix="$exec_prefix"
14914   exec_prefix="$acl_final_exec_prefix"
14915   eval x=\"$x\"
14916   exec_prefix="$acl_save_exec_prefix"
14917   prefix="$acl_save_prefix"
14918
14919                           if test "X$x" = "X-L$additional_libdir"; then
14920                             haveit=yes
14921                             break
14922                           fi
14923                         done
14924                         if test -z "$haveit"; then
14925                           if test -d "$additional_libdir"; then
14926                                                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
14927                           fi
14928                         fi
14929                       fi
14930                     fi
14931                     ;;
14932                   -R*)
14933                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
14934                     if test "$enable_rpath" != no; then
14935                                                                   haveit=
14936                       for x in $rpathdirs; do
14937                         if test "X$x" = "X$dir"; then
14938                           haveit=yes
14939                           break
14940                         fi
14941                       done
14942                       if test -z "$haveit"; then
14943                         rpathdirs="$rpathdirs $dir"
14944                       fi
14945                                                                   haveit=
14946                       for x in $ltrpathdirs; do
14947                         if test "X$x" = "X$dir"; then
14948                           haveit=yes
14949                           break
14950                         fi
14951                       done
14952                       if test -z "$haveit"; then
14953                         ltrpathdirs="$ltrpathdirs $dir"
14954                       fi
14955                     fi
14956                     ;;
14957                   -l*)
14958                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14959                     ;;
14960                   *.la)
14961                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14962                     ;;
14963                   *)
14964                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
14965                     LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
14966                     ;;
14967                 esac
14968               done
14969             fi
14970           else
14971                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14972             LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
14973           fi
14974         fi
14975       fi
14976     done
14977   done
14978   if test "X$rpathdirs" != "X"; then
14979     if test -n "$hardcode_libdir_separator"; then
14980                         alldirs=
14981       for found_dir in $rpathdirs; do
14982         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14983       done
14984             acl_save_libdir="$libdir"
14985       libdir="$alldirs"
14986       eval flag=\"$hardcode_libdir_flag_spec\"
14987       libdir="$acl_save_libdir"
14988       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14989     else
14990             for found_dir in $rpathdirs; do
14991         acl_save_libdir="$libdir"
14992         libdir="$found_dir"
14993         eval flag=\"$hardcode_libdir_flag_spec\"
14994         libdir="$acl_save_libdir"
14995         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14996       done
14997     fi
14998   fi
14999   if test "X$ltrpathdirs" != "X"; then
15000             for found_dir in $ltrpathdirs; do
15001       LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
15002     done
15003   fi
15004
15005
15006         ac_save_CPPFLAGS="$CPPFLAGS"
15007
15008   for element in $INCBABELTRACE; do
15009     haveit=
15010     for x in $CPPFLAGS; do
15011
15012   acl_save_prefix="$prefix"
15013   prefix="$acl_final_prefix"
15014   acl_save_exec_prefix="$exec_prefix"
15015   exec_prefix="$acl_final_exec_prefix"
15016   eval x=\"$x\"
15017   exec_prefix="$acl_save_exec_prefix"
15018   prefix="$acl_save_prefix"
15019
15020       if test "X$x" = "X$element"; then
15021         haveit=yes
15022         break
15023       fi
15024     done
15025     if test -z "$haveit"; then
15026       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15027     fi
15028   done
15029
15030
15031   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
15032 $as_echo_n "checking for libbabeltrace... " >&6; }
15033 if test "${ac_cv_libbabeltrace+set}" = set; then :
15034   $as_echo_n "(cached) " >&6
15035 else
15036
15037     ac_save_LIBS="$LIBS"
15038     LIBS="$LIBS $LIBBABELTRACE"
15039     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15040 /* end confdefs.h.  */
15041 #include <babeltrace/babeltrace.h>
15042                          #include <babeltrace/ctf/events.h>
15043                          #include <babeltrace/ctf/iterator.h>
15044 int
15045 main ()
15046 {
15047 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
15048                         struct bt_ctf_event *event = NULL;
15049                         const struct bt_definition *scope;
15050
15051                         bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
15052                         scope = bt_ctf_get_top_level_scope (event,
15053                                                            BT_STREAM_EVENT_HEADER);
15054                         bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
15055
15056   ;
15057   return 0;
15058 }
15059 _ACEOF
15060 if ac_fn_c_try_link "$LINENO"; then :
15061   ac_cv_libbabeltrace=yes
15062 else
15063   ac_cv_libbabeltrace=no
15064 fi
15065 rm -f core conftest.err conftest.$ac_objext \
15066     conftest$ac_exeext conftest.$ac_ext
15067     LIBS="$ac_save_LIBS"
15068
15069 fi
15070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
15071 $as_echo "$ac_cv_libbabeltrace" >&6; }
15072   if test "$ac_cv_libbabeltrace" = yes; then
15073     HAVE_LIBBABELTRACE=yes
15074
15075 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
15076
15077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
15078 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
15079     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
15080 $as_echo "$LIBBABELTRACE" >&6; }
15081   else
15082     HAVE_LIBBABELTRACE=no
15083             CPPFLAGS="$ac_save_CPPFLAGS"
15084     LIBBABELTRACE=
15085     LTLIBBABELTRACE=
15086   fi
15087
15088
15089
15090
15091
15092
15093   CFLAGS=$saved_CFLAGS
15094
15095   if test "$HAVE_LIBBABELTRACE" != yes; then
15096      if test "$with_babeltrace" = yes; then
15097        as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
15098      else
15099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
15100 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
15101      fi
15102   fi
15103 fi
15104
15105 # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
15106 # to an empty version.
15107
15108 files=
15109 links=
15110
15111 rm -f nm.h
15112 if test "${nativefile}" != ""; then
15113     case "${nativefile}" in
15114       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15115       * ) GDB_NM_FILE="${nativefile}"
15116     esac
15117     files="${files} ${GDB_NM_FILE}"
15118     links="${links} nm.h"
15119
15120 cat >>confdefs.h <<_ACEOF
15121 #define GDB_NM_FILE "${GDB_NM_FILE}"
15122 _ACEOF
15123
15124 fi
15125
15126
15127 ac_sources="$files"
15128 ac_dests="$links"
15129 while test -n "$ac_sources"; do
15130   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15131   set $ac_sources; ac_source=$1; shift; ac_sources=$*
15132   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15133 done
15134 ac_config_links="$ac_config_links $ac_config_links_1"
15135
15136
15137
15138
15139
15140 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
15141
15142
15143 # Undo the $ec_script escaping suitable for Makefile.
15144 transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15145 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
15146 if test "x$GDB_TRANSFORM_NAME" = x; then
15147   GDB_TRANSFORM_NAME=gdb
15148 fi
15149
15150 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
15151 if test "x$GCORE_TRANSFORM_NAME" = x; then
15152   GCORE_TRANSFORM_NAME=gcore
15153 fi
15154
15155 ac_config_files="$ac_config_files gcore"
15156
15157
15158 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
15159
15160 ac_config_commands="$ac_config_commands default"
15161
15162 cat >confcache <<\_ACEOF
15163 # This file is a shell script that caches the results of configure
15164 # tests run on this system so they can be shared between configure
15165 # scripts and configure runs, see configure's option --config-cache.
15166 # It is not useful on other systems.  If it contains results you don't
15167 # want to keep, you may remove or edit it.
15168 #
15169 # config.status only pays attention to the cache file if you give it
15170 # the --recheck option to rerun configure.
15171 #
15172 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15173 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15174 # following values.
15175
15176 _ACEOF
15177
15178 # The following way of writing the cache mishandles newlines in values,
15179 # but we know of no workaround that is simple, portable, and efficient.
15180 # So, we kill variables containing newlines.
15181 # Ultrix sh set writes to stderr and can't be redirected directly,
15182 # and sets the high bit in the cache file unless we assign to the vars.
15183 (
15184   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15185     eval ac_val=\$$ac_var
15186     case $ac_val in #(
15187     *${as_nl}*)
15188       case $ac_var in #(
15189       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15190 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15191       esac
15192       case $ac_var in #(
15193       _ | IFS | as_nl) ;; #(
15194       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15195       *) { eval $ac_var=; unset $ac_var;} ;;
15196       esac ;;
15197     esac
15198   done
15199
15200   (set) 2>&1 |
15201     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15202     *${as_nl}ac_space=\ *)
15203       # `set' does not quote correctly, so add quotes: double-quote
15204       # substitution turns \\\\ into \\, and sed turns \\ into \.
15205       sed -n \
15206         "s/'/'\\\\''/g;
15207           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15208       ;; #(
15209     *)
15210       # `set' quotes correctly as required by POSIX, so do not add quotes.
15211       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15212       ;;
15213     esac |
15214     sort
15215 ) |
15216   sed '
15217      /^ac_cv_env_/b end
15218      t clear
15219      :clear
15220      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15221      t end
15222      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15223      :end' >>confcache
15224 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15225   if test -w "$cache_file"; then
15226     test "x$cache_file" != "x/dev/null" &&
15227       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15228 $as_echo "$as_me: updating cache $cache_file" >&6;}
15229     cat confcache >$cache_file
15230   else
15231     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15232 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15233   fi
15234 fi
15235 rm -f confcache
15236
15237 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15238 # Let make expand exec_prefix.
15239 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15240
15241 DEFS=-DHAVE_CONFIG_H
15242
15243 ac_libobjs=
15244 ac_ltlibobjs=
15245 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15246   # 1. Remove the extension, and $U if already installed.
15247   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15248   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15249   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15250   #    will be set to the directory where LIBOBJS objects are built.
15251   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15252   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15253 done
15254 LIBOBJS=$ac_libobjs
15255
15256 LTLIBOBJS=$ac_ltlibobjs
15257
15258
15259 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
15260   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15261 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15262 fi
15263 if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
15264   as_fn_error "conditional \"GMAKE\" was never defined.
15265 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15266 fi
15267 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
15268   as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
15269 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15270 fi
15271 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
15272   as_fn_error "conditional \"HAVE_GUILE\" was never defined.
15273 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15274 fi
15275
15276
15277 : ${CONFIG_STATUS=./config.status}
15278 ac_write_fail=0
15279 ac_clean_files_save=$ac_clean_files
15280 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15281 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15282 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15283 as_write_fail=0
15284 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15285 #! $SHELL
15286 # Generated by $as_me.
15287 # Run this file to recreate the current configuration.
15288 # Compiler output produced by configure, useful for debugging
15289 # configure, is in config.log if it exists.
15290
15291 debug=false
15292 ac_cs_recheck=false
15293 ac_cs_silent=false
15294
15295 SHELL=\${CONFIG_SHELL-$SHELL}
15296 export SHELL
15297 _ASEOF
15298 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15299 ## -------------------- ##
15300 ## M4sh Initialization. ##
15301 ## -------------------- ##
15302
15303 # Be more Bourne compatible
15304 DUALCASE=1; export DUALCASE # for MKS sh
15305 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15306   emulate sh
15307   NULLCMD=:
15308   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15309   # is contrary to our usage.  Disable this feature.
15310   alias -g '${1+"$@"}'='"$@"'
15311   setopt NO_GLOB_SUBST
15312 else
15313   case `(set -o) 2>/dev/null` in #(
15314   *posix*) :
15315     set -o posix ;; #(
15316   *) :
15317      ;;
15318 esac
15319 fi
15320
15321
15322 as_nl='
15323 '
15324 export as_nl
15325 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15326 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15327 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15328 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15329 # Prefer a ksh shell builtin over an external printf program on Solaris,
15330 # but without wasting forks for bash or zsh.
15331 if test -z "$BASH_VERSION$ZSH_VERSION" \
15332     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15333   as_echo='print -r --'
15334   as_echo_n='print -rn --'
15335 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15336   as_echo='printf %s\n'
15337   as_echo_n='printf %s'
15338 else
15339   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15340     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15341     as_echo_n='/usr/ucb/echo -n'
15342   else
15343     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15344     as_echo_n_body='eval
15345       arg=$1;
15346       case $arg in #(
15347       *"$as_nl"*)
15348         expr "X$arg" : "X\\(.*\\)$as_nl";
15349         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15350       esac;
15351       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15352     '
15353     export as_echo_n_body
15354     as_echo_n='sh -c $as_echo_n_body as_echo'
15355   fi
15356   export as_echo_body
15357   as_echo='sh -c $as_echo_body as_echo'
15358 fi
15359
15360 # The user is always right.
15361 if test "${PATH_SEPARATOR+set}" != set; then
15362   PATH_SEPARATOR=:
15363   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15364     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15365       PATH_SEPARATOR=';'
15366   }
15367 fi
15368
15369
15370 # IFS
15371 # We need space, tab and new line, in precisely that order.  Quoting is
15372 # there to prevent editors from complaining about space-tab.
15373 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15374 # splitting by setting IFS to empty value.)
15375 IFS=" ""        $as_nl"
15376
15377 # Find who we are.  Look in the path if we contain no directory separator.
15378 case $0 in #((
15379   *[\\/]* ) as_myself=$0 ;;
15380   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15381 for as_dir in $PATH
15382 do
15383   IFS=$as_save_IFS
15384   test -z "$as_dir" && as_dir=.
15385     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15386   done
15387 IFS=$as_save_IFS
15388
15389      ;;
15390 esac
15391 # We did not find ourselves, most probably we were run as `sh COMMAND'
15392 # in which case we are not to be found in the path.
15393 if test "x$as_myself" = x; then
15394   as_myself=$0
15395 fi
15396 if test ! -f "$as_myself"; then
15397   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15398   exit 1
15399 fi
15400
15401 # Unset variables that we do not need and which cause bugs (e.g. in
15402 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15403 # suppresses any "Segmentation fault" message there.  '((' could
15404 # trigger a bug in pdksh 5.2.14.
15405 for as_var in BASH_ENV ENV MAIL MAILPATH
15406 do eval test x\${$as_var+set} = xset \
15407   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15408 done
15409 PS1='$ '
15410 PS2='> '
15411 PS4='+ '
15412
15413 # NLS nuisances.
15414 LC_ALL=C
15415 export LC_ALL
15416 LANGUAGE=C
15417 export LANGUAGE
15418
15419 # CDPATH.
15420 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15421
15422
15423 # as_fn_error ERROR [LINENO LOG_FD]
15424 # ---------------------------------
15425 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15426 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15427 # script with status $?, using 1 if that was 0.
15428 as_fn_error ()
15429 {
15430   as_status=$?; test $as_status -eq 0 && as_status=1
15431   if test "$3"; then
15432     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15433     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15434   fi
15435   $as_echo "$as_me: error: $1" >&2
15436   as_fn_exit $as_status
15437 } # as_fn_error
15438
15439
15440 # as_fn_set_status STATUS
15441 # -----------------------
15442 # Set $? to STATUS, without forking.
15443 as_fn_set_status ()
15444 {
15445   return $1
15446 } # as_fn_set_status
15447
15448 # as_fn_exit STATUS
15449 # -----------------
15450 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15451 as_fn_exit ()
15452 {
15453   set +e
15454   as_fn_set_status $1
15455   exit $1
15456 } # as_fn_exit
15457
15458 # as_fn_unset VAR
15459 # ---------------
15460 # Portably unset VAR.
15461 as_fn_unset ()
15462 {
15463   { eval $1=; unset $1;}
15464 }
15465 as_unset=as_fn_unset
15466 # as_fn_append VAR VALUE
15467 # ----------------------
15468 # Append the text in VALUE to the end of the definition contained in VAR. Take
15469 # advantage of any shell optimizations that allow amortized linear growth over
15470 # repeated appends, instead of the typical quadratic growth present in naive
15471 # implementations.
15472 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15473   eval 'as_fn_append ()
15474   {
15475     eval $1+=\$2
15476   }'
15477 else
15478   as_fn_append ()
15479   {
15480     eval $1=\$$1\$2
15481   }
15482 fi # as_fn_append
15483
15484 # as_fn_arith ARG...
15485 # ------------------
15486 # Perform arithmetic evaluation on the ARGs, and store the result in the
15487 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15488 # must be portable across $(()) and expr.
15489 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15490   eval 'as_fn_arith ()
15491   {
15492     as_val=$(( $* ))
15493   }'
15494 else
15495   as_fn_arith ()
15496   {
15497     as_val=`expr "$@" || test $? -eq 1`
15498   }
15499 fi # as_fn_arith
15500
15501
15502 if expr a : '\(a\)' >/dev/null 2>&1 &&
15503    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15504   as_expr=expr
15505 else
15506   as_expr=false
15507 fi
15508
15509 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15510   as_basename=basename
15511 else
15512   as_basename=false
15513 fi
15514
15515 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15516   as_dirname=dirname
15517 else
15518   as_dirname=false
15519 fi
15520
15521 as_me=`$as_basename -- "$0" ||
15522 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15523          X"$0" : 'X\(//\)$' \| \
15524          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15525 $as_echo X/"$0" |
15526     sed '/^.*\/\([^/][^/]*\)\/*$/{
15527             s//\1/
15528             q
15529           }
15530           /^X\/\(\/\/\)$/{
15531             s//\1/
15532             q
15533           }
15534           /^X\/\(\/\).*/{
15535             s//\1/
15536             q
15537           }
15538           s/.*/./; q'`
15539
15540 # Avoid depending upon Character Ranges.
15541 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15542 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15543 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15544 as_cr_digits='0123456789'
15545 as_cr_alnum=$as_cr_Letters$as_cr_digits
15546
15547 ECHO_C= ECHO_N= ECHO_T=
15548 case `echo -n x` in #(((((
15549 -n*)
15550   case `echo 'xy\c'` in
15551   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15552   xy)  ECHO_C='\c';;
15553   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15554        ECHO_T=' ';;
15555   esac;;
15556 *)
15557   ECHO_N='-n';;
15558 esac
15559
15560 rm -f conf$$ conf$$.exe conf$$.file
15561 if test -d conf$$.dir; then
15562   rm -f conf$$.dir/conf$$.file
15563 else
15564   rm -f conf$$.dir
15565   mkdir conf$$.dir 2>/dev/null
15566 fi
15567 if (echo >conf$$.file) 2>/dev/null; then
15568   if ln -s conf$$.file conf$$ 2>/dev/null; then
15569     as_ln_s='ln -s'
15570     # ... but there are two gotchas:
15571     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15572     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15573     # In both cases, we have to default to `cp -p'.
15574     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15575       as_ln_s='cp -p'
15576   elif ln conf$$.file conf$$ 2>/dev/null; then
15577     as_ln_s=ln
15578   else
15579     as_ln_s='cp -p'
15580   fi
15581 else
15582   as_ln_s='cp -p'
15583 fi
15584 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15585 rmdir conf$$.dir 2>/dev/null
15586
15587
15588 # as_fn_mkdir_p
15589 # -------------
15590 # Create "$as_dir" as a directory, including parents if necessary.
15591 as_fn_mkdir_p ()
15592 {
15593
15594   case $as_dir in #(
15595   -*) as_dir=./$as_dir;;
15596   esac
15597   test -d "$as_dir" || eval $as_mkdir_p || {
15598     as_dirs=
15599     while :; do
15600       case $as_dir in #(
15601       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15602       *) as_qdir=$as_dir;;
15603       esac
15604       as_dirs="'$as_qdir' $as_dirs"
15605       as_dir=`$as_dirname -- "$as_dir" ||
15606 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15607          X"$as_dir" : 'X\(//\)[^/]' \| \
15608          X"$as_dir" : 'X\(//\)$' \| \
15609          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15610 $as_echo X"$as_dir" |
15611     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15612             s//\1/
15613             q
15614           }
15615           /^X\(\/\/\)[^/].*/{
15616             s//\1/
15617             q
15618           }
15619           /^X\(\/\/\)$/{
15620             s//\1/
15621             q
15622           }
15623           /^X\(\/\).*/{
15624             s//\1/
15625             q
15626           }
15627           s/.*/./; q'`
15628       test -d "$as_dir" && break
15629     done
15630     test -z "$as_dirs" || eval "mkdir $as_dirs"
15631   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15632
15633
15634 } # as_fn_mkdir_p
15635 if mkdir -p . 2>/dev/null; then
15636   as_mkdir_p='mkdir -p "$as_dir"'
15637 else
15638   test -d ./-p && rmdir ./-p
15639   as_mkdir_p=false
15640 fi
15641
15642 if test -x / >/dev/null 2>&1; then
15643   as_test_x='test -x'
15644 else
15645   if ls -dL / >/dev/null 2>&1; then
15646     as_ls_L_option=L
15647   else
15648     as_ls_L_option=
15649   fi
15650   as_test_x='
15651     eval sh -c '\''
15652       if test -d "$1"; then
15653         test -d "$1/.";
15654       else
15655         case $1 in #(
15656         -*)set "./$1";;
15657         esac;
15658         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15659         ???[sx]*):;;*)false;;esac;fi
15660     '\'' sh
15661   '
15662 fi
15663 as_executable_p=$as_test_x
15664
15665 # Sed expression to map a string onto a valid CPP name.
15666 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15667
15668 # Sed expression to map a string onto a valid variable name.
15669 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15670
15671
15672 exec 6>&1
15673 ## ----------------------------------- ##
15674 ## Main body of $CONFIG_STATUS script. ##
15675 ## ----------------------------------- ##
15676 _ASEOF
15677 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15678
15679 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15680 # Save the log message, to keep $0 and so on meaningful, and to
15681 # report actual input values of CONFIG_FILES etc. instead of their
15682 # values after options handling.
15683 ac_log="
15684 This file was extended by $as_me, which was
15685 generated by GNU Autoconf 2.64.  Invocation command line was
15686
15687   CONFIG_FILES    = $CONFIG_FILES
15688   CONFIG_HEADERS  = $CONFIG_HEADERS
15689   CONFIG_LINKS    = $CONFIG_LINKS
15690   CONFIG_COMMANDS = $CONFIG_COMMANDS
15691   $ $0 $@
15692
15693 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15694 "
15695
15696 _ACEOF
15697
15698 case $ac_config_files in *"
15699 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15700 esac
15701
15702 case $ac_config_headers in *"
15703 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15704 esac
15705
15706
15707 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15708 # Files that config.status was made for.
15709 config_files="$ac_config_files"
15710 config_headers="$ac_config_headers"
15711 config_links="$ac_config_links"
15712 config_commands="$ac_config_commands"
15713
15714 _ACEOF
15715
15716 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15717 ac_cs_usage="\
15718 \`$as_me' instantiates files and other configuration actions
15719 from templates according to the current configuration.  Unless the files
15720 and actions are specified as TAGs, all are instantiated by default.
15721
15722 Usage: $0 [OPTION]... [TAG]...
15723
15724   -h, --help       print this help, then exit
15725   -V, --version    print version number and configuration settings, then exit
15726   -q, --quiet, --silent
15727                    do not print progress messages
15728   -d, --debug      don't remove temporary files
15729       --recheck    update $as_me by reconfiguring in the same conditions
15730       --file=FILE[:TEMPLATE]
15731                    instantiate the configuration file FILE
15732       --header=FILE[:TEMPLATE]
15733                    instantiate the configuration header FILE
15734
15735 Configuration files:
15736 $config_files
15737
15738 Configuration headers:
15739 $config_headers
15740
15741 Configuration links:
15742 $config_links
15743
15744 Configuration commands:
15745 $config_commands
15746
15747 Report bugs to the package provider."
15748
15749 _ACEOF
15750 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15751 ac_cs_version="\\
15752 config.status
15753 configured by $0, generated by GNU Autoconf 2.64,
15754   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
15755
15756 Copyright (C) 2009 Free Software Foundation, Inc.
15757 This config.status script is free software; the Free Software Foundation
15758 gives unlimited permission to copy, distribute and modify it."
15759
15760 ac_pwd='$ac_pwd'
15761 srcdir='$srcdir'
15762 INSTALL='$INSTALL'
15763 AWK='$AWK'
15764 test -n "\$AWK" || AWK=awk
15765 _ACEOF
15766
15767 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15768 # The default lists apply if the user does not specify any file.
15769 ac_need_defaults=:
15770 while test $# != 0
15771 do
15772   case $1 in
15773   --*=*)
15774     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15775     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15776     ac_shift=:
15777     ;;
15778   *)
15779     ac_option=$1
15780     ac_optarg=$2
15781     ac_shift=shift
15782     ;;
15783   esac
15784
15785   case $ac_option in
15786   # Handling of the options.
15787   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15788     ac_cs_recheck=: ;;
15789   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15790     $as_echo "$ac_cs_version"; exit ;;
15791   --debug | --debu | --deb | --de | --d | -d )
15792     debug=: ;;
15793   --file | --fil | --fi | --f )
15794     $ac_shift
15795     case $ac_optarg in
15796     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15797     esac
15798     as_fn_append CONFIG_FILES " '$ac_optarg'"
15799     ac_need_defaults=false;;
15800   --header | --heade | --head | --hea )
15801     $ac_shift
15802     case $ac_optarg in
15803     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15804     esac
15805     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15806     ac_need_defaults=false;;
15807   --he | --h)
15808     # Conflict between --help and --header
15809     as_fn_error "ambiguous option: \`$1'
15810 Try \`$0 --help' for more information.";;
15811   --help | --hel | -h )
15812     $as_echo "$ac_cs_usage"; exit ;;
15813   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15814   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15815     ac_cs_silent=: ;;
15816
15817   # This is an error.
15818   -*) as_fn_error "unrecognized option: \`$1'
15819 Try \`$0 --help' for more information." ;;
15820
15821   *) as_fn_append ac_config_targets " $1"
15822      ac_need_defaults=false ;;
15823
15824   esac
15825   shift
15826 done
15827
15828 ac_configure_extra_args=
15829
15830 if $ac_cs_silent; then
15831   exec 6>/dev/null
15832   ac_configure_extra_args="$ac_configure_extra_args --silent"
15833 fi
15834
15835 _ACEOF
15836 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15837 if \$ac_cs_recheck; then
15838   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15839   shift
15840   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15841   CONFIG_SHELL='$SHELL'
15842   export CONFIG_SHELL
15843   exec "\$@"
15844 fi
15845
15846 _ACEOF
15847 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15848 exec 5>>config.log
15849 {
15850   echo
15851   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15852 ## Running $as_me. ##
15853 _ASBOX
15854   $as_echo "$ac_log"
15855 } >&5
15856
15857 _ACEOF
15858 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15859 #
15860 # INIT-COMMANDS
15861 #
15862 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
15863
15864 _ACEOF
15865
15866 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15867
15868 # Handling of arguments.
15869 for ac_config_target in $ac_config_targets
15870 do
15871   case $ac_config_target in
15872     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15873     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
15874     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
15875     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
15876     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
15877     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15878     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
15879     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
15880     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
15881     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15882
15883   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15884   esac
15885 done
15886
15887
15888 # If the user did not use the arguments to specify the items to instantiate,
15889 # then the envvar interface is used.  Set only those that are not.
15890 # We use the long form for the default assignment because of an extremely
15891 # bizarre bug on SunOS 4.1.3.
15892 if $ac_need_defaults; then
15893   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15894   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15895   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15896   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15897 fi
15898
15899 # Have a temporary directory for convenience.  Make it in the build tree
15900 # simply because there is no reason against having it here, and in addition,
15901 # creating and moving files from /tmp can sometimes cause problems.
15902 # Hook for its removal unless debugging.
15903 # Note that there is a small window in which the directory will not be cleaned:
15904 # after its creation but before its name has been assigned to `$tmp'.
15905 $debug ||
15906 {
15907   tmp=
15908   trap 'exit_status=$?
15909   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15910 ' 0
15911   trap 'as_fn_exit 1' 1 2 13 15
15912 }
15913 # Create a (secure) tmp directory for tmp files.
15914
15915 {
15916   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15917   test -n "$tmp" && test -d "$tmp"
15918 }  ||
15919 {
15920   tmp=./conf$$-$RANDOM
15921   (umask 077 && mkdir "$tmp")
15922 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
15923
15924 # Set up the scripts for CONFIG_FILES section.
15925 # No need to generate them if there are no CONFIG_FILES.
15926 # This happens for instance with `./config.status config.h'.
15927 if test -n "$CONFIG_FILES"; then
15928
15929 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15930   ac_cs_awk_getline=:
15931   ac_cs_awk_pipe_init=
15932   ac_cs_awk_read_file='
15933       while ((getline aline < (F[key])) > 0)
15934         print(aline)
15935       close(F[key])'
15936   ac_cs_awk_pipe_fini=
15937 else
15938   ac_cs_awk_getline=false
15939   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15940   ac_cs_awk_read_file='
15941       print "|#_!!_#|"
15942       print "cat " F[key] " &&"
15943       '$ac_cs_awk_pipe_init
15944   # The final `:' finishes the AND list.
15945   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15946 fi
15947 ac_cr=`echo X | tr X '\015'`
15948 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15949 # But we know of no other shell where ac_cr would be empty at this
15950 # point, so we can use a bashism as a fallback.
15951 if test "x$ac_cr" = x; then
15952   eval ac_cr=\$\'\\r\'
15953 fi
15954 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15955 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15956   ac_cs_awk_cr='\r'
15957 else
15958   ac_cs_awk_cr=$ac_cr
15959 fi
15960
15961 echo 'BEGIN {' >"$tmp/subs1.awk" &&
15962 _ACEOF
15963
15964 # Create commands to substitute file output variables.
15965 {
15966   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15967   echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15968   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15969   echo "_ACAWK" &&
15970   echo "_ACEOF"
15971 } >conf$$files.sh &&
15972 . ./conf$$files.sh ||
15973   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15974 rm -f conf$$files.sh
15975
15976 {
15977   echo "cat >conf$$subs.awk <<_ACEOF" &&
15978   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15979   echo "_ACEOF"
15980 } >conf$$subs.sh ||
15981   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15982 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
15983 ac_delim='%!_!# '
15984 for ac_last_try in false false false false false :; do
15985   . ./conf$$subs.sh ||
15986     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15987
15988   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15989   if test $ac_delim_n = $ac_delim_num; then
15990     break
15991   elif $ac_last_try; then
15992     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15993   else
15994     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15995   fi
15996 done
15997 rm -f conf$$subs.sh
15998
15999 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16000 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16001 _ACEOF
16002 sed -n '
16003 h
16004 s/^/S["/; s/!.*/"]=/
16005 p
16006 g
16007 s/^[^!]*!//
16008 :repl
16009 t repl
16010 s/'"$ac_delim"'$//
16011 t delim
16012 :nl
16013 h
16014 s/\(.\{148\}\).*/\1/
16015 t more1
16016 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16017 p
16018 n
16019 b repl
16020 :more1
16021 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16022 p
16023 g
16024 s/.\{148\}//
16025 t nl
16026 :delim
16027 h
16028 s/\(.\{148\}\).*/\1/
16029 t more2
16030 s/["\\]/\\&/g; s/^/"/; s/$/"/
16031 p
16032 b
16033 :more2
16034 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16035 p
16036 g
16037 s/.\{148\}//
16038 t delim
16039 ' <conf$$subs.awk | sed '
16040 /^[^""]/{
16041   N
16042   s/\n//
16043 }
16044 ' >>$CONFIG_STATUS || ac_write_fail=1
16045 rm -f conf$$subs.awk
16046 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16047 _ACAWK
16048 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16049   for (key in S) S_is_set[key] = 1
16050   FS = "\a"
16051   \$ac_cs_awk_pipe_init
16052 }
16053 {
16054   line = $ 0
16055   nfields = split(line, field, "@")
16056   substed = 0
16057   len = length(field[1])
16058   for (i = 2; i < nfields; i++) {
16059     key = field[i]
16060     keylen = length(key)
16061     if (S_is_set[key]) {
16062       value = S[key]
16063       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16064       len += length(value) + length(field[++i])
16065       substed = 1
16066     } else
16067       len += 1 + keylen
16068   }
16069   if (nfields == 3 && !substed) {
16070     key = field[2]
16071     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
16072       \$ac_cs_awk_read_file
16073       next
16074     }
16075   }
16076   print line
16077 }
16078 \$ac_cs_awk_pipe_fini
16079 _ACAWK
16080 _ACEOF
16081 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16082 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16083   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16084 else
16085   cat
16086 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16087   || as_fn_error "could not setup config files machinery" "$LINENO" 5
16088 _ACEOF
16089
16090 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16091 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16092 # trailing colons and then remove the whole line if VPATH becomes empty
16093 # (actually we leave an empty line to preserve line numbers).
16094 if test "x$srcdir" = x.; then
16095   ac_vpsub='/^[  ]*VPATH[        ]*=/{
16096 s/:*\$(srcdir):*/:/
16097 s/:*\${srcdir}:*/:/
16098 s/:*@srcdir@:*/:/
16099 s/^\([^=]*=[     ]*\):*/\1/
16100 s/:*$//
16101 s/^[^=]*=[       ]*$//
16102 }'
16103 fi
16104
16105 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16106 fi # test -n "$CONFIG_FILES"
16107
16108 # Set up the scripts for CONFIG_HEADERS section.
16109 # No need to generate them if there are no CONFIG_HEADERS.
16110 # This happens for instance with `./config.status Makefile'.
16111 if test -n "$CONFIG_HEADERS"; then
16112 cat >"$tmp/defines.awk" <<\_ACAWK ||
16113 BEGIN {
16114 _ACEOF
16115
16116 # Transform confdefs.h into an awk script `defines.awk', embedded as
16117 # here-document in config.status, that substitutes the proper values into
16118 # config.h.in to produce config.h.
16119
16120 # Create a delimiter string that does not exist in confdefs.h, to ease
16121 # handling of long lines.
16122 ac_delim='%!_!# '
16123 for ac_last_try in false false :; do
16124   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16125   if test -z "$ac_t"; then
16126     break
16127   elif $ac_last_try; then
16128     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16129   else
16130     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16131   fi
16132 done
16133
16134 # For the awk script, D is an array of macro values keyed by name,
16135 # likewise P contains macro parameters if any.  Preserve backslash
16136 # newline sequences.
16137
16138 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16139 sed -n '
16140 s/.\{148\}/&'"$ac_delim"'/g
16141 t rset
16142 :rset
16143 s/^[     ]*#[    ]*define[       ][      ]*/ /
16144 t def
16145 d
16146 :def
16147 s/\\$//
16148 t bsnl
16149 s/["\\]/\\&/g
16150 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16151 D["\1"]=" \3"/p
16152 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16153 d
16154 :bsnl
16155 s/["\\]/\\&/g
16156 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16157 D["\1"]=" \3\\\\\\n"\\/p
16158 t cont
16159 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16160 t cont
16161 d
16162 :cont
16163 n
16164 s/.\{148\}/&'"$ac_delim"'/g
16165 t clear
16166 :clear
16167 s/\\$//
16168 t bsnlc
16169 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16170 d
16171 :bsnlc
16172 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16173 b cont
16174 ' <confdefs.h | sed '
16175 s/'"$ac_delim"'/"\\\
16176 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16177
16178 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16179   for (key in D) D_is_set[key] = 1
16180   FS = "\a"
16181 }
16182 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16183   line = \$ 0
16184   split(line, arg, " ")
16185   if (arg[1] == "#") {
16186     defundef = arg[2]
16187     mac1 = arg[3]
16188   } else {
16189     defundef = substr(arg[1], 2)
16190     mac1 = arg[2]
16191   }
16192   split(mac1, mac2, "(") #)
16193   macro = mac2[1]
16194   prefix = substr(line, 1, index(line, defundef) - 1)
16195   if (D_is_set[macro]) {
16196     # Preserve the white space surrounding the "#".
16197     print prefix "define", macro P[macro] D[macro]
16198     next
16199   } else {
16200     # Replace #undef with comments.  This is necessary, for example,
16201     # in the case of _POSIX_SOURCE, which is predefined and required
16202     # on some systems where configure will not decide to define it.
16203     if (defundef == "undef") {
16204       print "/*", prefix defundef, macro, "*/"
16205       next
16206     }
16207   }
16208 }
16209 { print }
16210 _ACAWK
16211 _ACEOF
16212 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16213   as_fn_error "could not setup config headers machinery" "$LINENO" 5
16214 fi # test -n "$CONFIG_HEADERS"
16215
16216
16217 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16218 shift
16219 for ac_tag
16220 do
16221   case $ac_tag in
16222   :[FHLC]) ac_mode=$ac_tag; continue;;
16223   esac
16224   case $ac_mode$ac_tag in
16225   :[FHL]*:*);;
16226   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16227   :[FH]-) ac_tag=-:-;;
16228   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16229   esac
16230   ac_save_IFS=$IFS
16231   IFS=:
16232   set x $ac_tag
16233   IFS=$ac_save_IFS
16234   shift
16235   ac_file=$1
16236   shift
16237
16238   case $ac_mode in
16239   :L) ac_source=$1;;
16240   :[FH])
16241     ac_file_inputs=
16242     for ac_f
16243     do
16244       case $ac_f in
16245       -) ac_f="$tmp/stdin";;
16246       *) # Look for the file first in the build tree, then in the source tree
16247          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16248          # because $ac_f cannot contain `:'.
16249          test -f "$ac_f" ||
16250            case $ac_f in
16251            [\\/$]*) false;;
16252            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16253            esac ||
16254            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16255       esac
16256       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16257       as_fn_append ac_file_inputs " '$ac_f'"
16258     done
16259
16260     # Let's still pretend it is `configure' which instantiates (i.e., don't
16261     # use $as_me), people would be surprised to read:
16262     #    /* config.h.  Generated by config.status.  */
16263     configure_input='Generated from '`
16264           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16265         `' by configure.'
16266     if test x"$ac_file" != x-; then
16267       configure_input="$ac_file.  $configure_input"
16268       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16269 $as_echo "$as_me: creating $ac_file" >&6;}
16270     fi
16271     # Neutralize special characters interpreted by sed in replacement strings.
16272     case $configure_input in #(
16273     *\&* | *\|* | *\\* )
16274        ac_sed_conf_input=`$as_echo "$configure_input" |
16275        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16276     *) ac_sed_conf_input=$configure_input;;
16277     esac
16278
16279     case $ac_tag in
16280     *:-:* | *:-) cat >"$tmp/stdin" \
16281       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16282     esac
16283     ;;
16284   esac
16285
16286   ac_dir=`$as_dirname -- "$ac_file" ||
16287 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16288          X"$ac_file" : 'X\(//\)[^/]' \| \
16289          X"$ac_file" : 'X\(//\)$' \| \
16290          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16291 $as_echo X"$ac_file" |
16292     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16293             s//\1/
16294             q
16295           }
16296           /^X\(\/\/\)[^/].*/{
16297             s//\1/
16298             q
16299           }
16300           /^X\(\/\/\)$/{
16301             s//\1/
16302             q
16303           }
16304           /^X\(\/\).*/{
16305             s//\1/
16306             q
16307           }
16308           s/.*/./; q'`
16309   as_dir="$ac_dir"; as_fn_mkdir_p
16310   ac_builddir=.
16311
16312 case "$ac_dir" in
16313 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16314 *)
16315   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16316   # A ".." for each directory in $ac_dir_suffix.
16317   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16318   case $ac_top_builddir_sub in
16319   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16320   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16321   esac ;;
16322 esac
16323 ac_abs_top_builddir=$ac_pwd
16324 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16325 # for backward compatibility:
16326 ac_top_builddir=$ac_top_build_prefix
16327
16328 case $srcdir in
16329   .)  # We are building in place.
16330     ac_srcdir=.
16331     ac_top_srcdir=$ac_top_builddir_sub
16332     ac_abs_top_srcdir=$ac_pwd ;;
16333   [\\/]* | ?:[\\/]* )  # Absolute name.
16334     ac_srcdir=$srcdir$ac_dir_suffix;
16335     ac_top_srcdir=$srcdir
16336     ac_abs_top_srcdir=$srcdir ;;
16337   *) # Relative name.
16338     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16339     ac_top_srcdir=$ac_top_build_prefix$srcdir
16340     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16341 esac
16342 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16343
16344
16345   case $ac_mode in
16346   :F)
16347   #
16348   # CONFIG_FILE
16349   #
16350
16351   case $INSTALL in
16352   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16353   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16354   esac
16355 _ACEOF
16356
16357 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16358 # If the template does not know about datarootdir, expand it.
16359 # FIXME: This hack should be removed a few years after 2.60.
16360 ac_datarootdir_hack=; ac_datarootdir_seen=
16361 ac_sed_dataroot='
16362 /datarootdir/ {
16363   p
16364   q
16365 }
16366 /@datadir@/p
16367 /@docdir@/p
16368 /@infodir@/p
16369 /@localedir@/p
16370 /@mandir@/p'
16371 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16372 *datarootdir*) ac_datarootdir_seen=yes;;
16373 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16374   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16375 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16376 _ACEOF
16377 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16378   ac_datarootdir_hack='
16379   s&@datadir@&$datadir&g
16380   s&@docdir@&$docdir&g
16381   s&@infodir@&$infodir&g
16382   s&@localedir@&$localedir&g
16383   s&@mandir@&$mandir&g
16384   s&\\\${datarootdir}&$datarootdir&g' ;;
16385 esac
16386 _ACEOF
16387
16388 # Neutralize VPATH when `$srcdir' = `.'.
16389 # Shell code in configure.ac might set extrasub.
16390 # FIXME: do we really want to maintain this feature?
16391 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16392 ac_sed_extra="$ac_vpsub
16393 $extrasub
16394 _ACEOF
16395 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16396 :t
16397 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16398 s|@configure_input@|$ac_sed_conf_input|;t t
16399 s&@top_builddir@&$ac_top_builddir_sub&;t t
16400 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16401 s&@srcdir@&$ac_srcdir&;t t
16402 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16403 s&@top_srcdir@&$ac_top_srcdir&;t t
16404 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16405 s&@builddir@&$ac_builddir&;t t
16406 s&@abs_builddir@&$ac_abs_builddir&;t t
16407 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16408 s&@INSTALL@&$ac_INSTALL&;t t
16409 $ac_datarootdir_hack
16410 "
16411 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16412 if $ac_cs_awk_getline; then
16413   $AWK -f "$tmp/subs.awk"
16414 else
16415   $AWK -f "$tmp/subs.awk" | $SHELL
16416 fi >$tmp/out \
16417   || as_fn_error "could not create $ac_file" "$LINENO" 5
16418
16419 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16420   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16421   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16422   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16423 which seems to be undefined.  Please make sure it is defined." >&5
16424 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16425 which seems to be undefined.  Please make sure it is defined." >&2;}
16426
16427   rm -f "$tmp/stdin"
16428   case $ac_file in
16429   -) cat "$tmp/out" && rm -f "$tmp/out";;
16430   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16431   esac \
16432   || as_fn_error "could not create $ac_file" "$LINENO" 5
16433  ;;
16434   :H)
16435   #
16436   # CONFIG_HEADER
16437   #
16438   if test x"$ac_file" != x-; then
16439     {
16440       $as_echo "/* $configure_input  */" \
16441       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16442     } >"$tmp/config.h" \
16443       || as_fn_error "could not create $ac_file" "$LINENO" 5
16444     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16445       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16446 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16447     else
16448       rm -f "$ac_file"
16449       mv "$tmp/config.h" "$ac_file" \
16450         || as_fn_error "could not create $ac_file" "$LINENO" 5
16451     fi
16452   else
16453     $as_echo "/* $configure_input  */" \
16454       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16455       || as_fn_error "could not create -" "$LINENO" 5
16456   fi
16457  ;;
16458   :L)
16459   #
16460   # CONFIG_LINK
16461   #
16462
16463   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16464     :
16465   else
16466     # Prefer the file from the source tree if names are identical.
16467     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16468       ac_source=$srcdir/$ac_source
16469     fi
16470
16471     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16472 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16473
16474     if test ! -r "$ac_source"; then
16475       as_fn_error "$ac_source: file not found" "$LINENO" 5
16476     fi
16477     rm -f "$ac_file"
16478
16479     # Try a relative symlink, then a hard link, then a copy.
16480     case $srcdir in
16481     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16482         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16483     esac
16484     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16485       ln "$ac_source" "$ac_file" 2>/dev/null ||
16486       cp -p "$ac_source" "$ac_file" ||
16487       as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16488   fi
16489  ;;
16490   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16491 $as_echo "$as_me: executing $ac_file commands" >&6;}
16492  ;;
16493   esac
16494
16495
16496   case $ac_file$ac_mode in
16497     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
16498     "gcore":F) chmod +x gcore ;;
16499     "default":C)
16500 case x$CONFIG_HEADERS in
16501 xconfig.h:config.in)
16502 echo > stamp-h ;;
16503 esac
16504  ;;
16505
16506   esac
16507 done # for ac_tag
16508
16509
16510 as_fn_exit 0
16511 _ACEOF
16512 ac_clean_files=$ac_clean_files_save
16513
16514 test $ac_write_fail = 0 ||
16515   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16516
16517
16518 # configure is writing to config.log, and then calls config.status.
16519 # config.status does its own redirection, appending to config.log.
16520 # Unfortunately, on DOS this fails, as config.log is still kept open
16521 # by configure, so config.status won't be able to write to it; its
16522 # output is simply discarded.  So we exec the FD to /dev/null,
16523 # effectively closing config.log, so it can be properly (re)opened and
16524 # appended to by config.status.  When coming back to configure, we
16525 # need to make the FD available again.
16526 if test "$no_create" != yes; then
16527   ac_cs_success=:
16528   ac_config_status_args=
16529   test "$silent" = yes &&
16530     ac_config_status_args="$ac_config_status_args --quiet"
16531   exec 5>/dev/null
16532   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16533   exec 5>>config.log
16534   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16535   # would make configure fail if this is the last instruction.
16536   $ac_cs_success || as_fn_exit $?
16537 fi
16538
16539 #
16540 # CONFIG_SUBDIRS section.
16541 #
16542 if test "$no_recursion" != yes; then
16543
16544   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16545   # so they do not pile up.
16546   ac_sub_configure_args=
16547   ac_prev=
16548   eval "set x $ac_configure_args"
16549   shift
16550   for ac_arg
16551   do
16552     if test -n "$ac_prev"; then
16553       ac_prev=
16554       continue
16555     fi
16556     case $ac_arg in
16557     -cache-file | --cache-file | --cache-fil | --cache-fi \
16558     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16559       ac_prev=cache_file ;;
16560     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
16561     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16562     | --c=*)
16563       ;;
16564     --config-cache | -C)
16565       ;;
16566     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16567       ac_prev=srcdir ;;
16568     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16569       ;;
16570     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16571       ac_prev=prefix ;;
16572     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16573       ;;
16574     --disable-option-checking)
16575       ;;
16576     *)
16577       case $ac_arg in
16578       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
16579       esac
16580       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
16581     esac
16582   done
16583
16584   # Always prepend --prefix to ensure using the same prefix
16585   # in subdir configurations.
16586   ac_arg="--prefix=$prefix"
16587   case $ac_arg in
16588   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
16589   esac
16590   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16591
16592   # Pass --silent
16593   if test "$silent" = yes; then
16594     ac_sub_configure_args="--silent $ac_sub_configure_args"
16595   fi
16596
16597   # Always prepend --disable-option-checking to silence warnings, since
16598   # different subdirs can have different --enable and --with options.
16599   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
16600
16601   ac_popdir=`pwd`
16602   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
16603
16604     # Do not complain, so a configure script can configure whichever
16605     # parts of a large source tree are present.
16606     test -d "$srcdir/$ac_dir" || continue
16607
16608     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16609     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16610     $as_echo "$ac_msg" >&6
16611     as_dir="$ac_dir"; as_fn_mkdir_p
16612     ac_builddir=.
16613
16614 case "$ac_dir" in
16615 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16616 *)
16617   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16618   # A ".." for each directory in $ac_dir_suffix.
16619   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16620   case $ac_top_builddir_sub in
16621   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16622   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16623   esac ;;
16624 esac
16625 ac_abs_top_builddir=$ac_pwd
16626 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16627 # for backward compatibility:
16628 ac_top_builddir=$ac_top_build_prefix
16629
16630 case $srcdir in
16631   .)  # We are building in place.
16632     ac_srcdir=.
16633     ac_top_srcdir=$ac_top_builddir_sub
16634     ac_abs_top_srcdir=$ac_pwd ;;
16635   [\\/]* | ?:[\\/]* )  # Absolute name.
16636     ac_srcdir=$srcdir$ac_dir_suffix;
16637     ac_top_srcdir=$srcdir
16638     ac_abs_top_srcdir=$srcdir ;;
16639   *) # Relative name.
16640     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16641     ac_top_srcdir=$ac_top_build_prefix$srcdir
16642     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16643 esac
16644 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16645
16646
16647     cd "$ac_dir"
16648
16649     # Check for guested configure; otherwise get Cygnus style configure.
16650     if test -f "$ac_srcdir/configure.gnu"; then
16651       ac_sub_configure=$ac_srcdir/configure.gnu
16652     elif test -f "$ac_srcdir/configure"; then
16653       ac_sub_configure=$ac_srcdir/configure
16654     elif test -f "$ac_srcdir/configure.in"; then
16655       # This should be Cygnus configure.
16656       ac_sub_configure=$ac_aux_dir/configure
16657     else
16658       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16659 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
16660       ac_sub_configure=
16661     fi
16662
16663     # The recursion is here.
16664     if test -n "$ac_sub_configure"; then
16665       # Make the cache file name correct relative to the subdirectory.
16666       case $cache_file in
16667       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
16668       *) # Relative name.
16669         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
16670       esac
16671
16672       { $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
16673 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
16674       # The eval makes quoting arguments work.
16675       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16676            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
16677         as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
16678     fi
16679
16680     cd "$ac_popdir"
16681   done
16682 fi
16683 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16684   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16685 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16686 fi
16687
16688
16689 exit 0