Add tests for PR ld/16452 and PR ld/16457
[platform/upstream/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 # Configure gnulib.  We need to build gnulib under some other
4839 # directory not "gnulib", to avoid the problem of both GDB and
4840 # GDBserver wanting to build it in the same directory, when building
4841 # in the source dir.
4842
4843   in_src="gnulib"
4844   in_build="build-gnulib"
4845
4846   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4847   # so they do not pile up.
4848   ac_sub_configure_args=
4849   ac_prev=
4850   eval "set x $ac_configure_args"
4851   shift
4852   for ac_arg
4853   do
4854     if test -n "$ac_prev"; then
4855       ac_prev=
4856       continue
4857     fi
4858     case $ac_arg in
4859     -cache-file | --cache-file | --cache-fil | --cache-fi \
4860     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4861       ac_prev=cache_file ;;
4862     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4863     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4864     | --c=*)
4865       ;;
4866     --config-cache | -C)
4867       ;;
4868     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4869       ac_prev=srcdir ;;
4870     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4871       ;;
4872     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4873       ac_prev=prefix ;;
4874     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4875       ;;
4876     --disable-option-checking)
4877       ;;
4878     *)
4879       case $ac_arg in
4880       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4881       esac
4882       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4883     esac
4884   done
4885
4886   # Always prepend --prefix to ensure using the same prefix
4887   # in subdir configurations.
4888   ac_arg="--prefix=$prefix"
4889   case $ac_arg in
4890   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4891   esac
4892   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4893
4894   # Pass --silent
4895   if test "$silent" = yes; then
4896     ac_sub_configure_args="--silent $ac_sub_configure_args"
4897   fi
4898
4899   # Always prepend --disable-option-checking to silence warnings, since
4900   # different subdirs can have different --enable and --with options.
4901   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4902
4903   ac_popdir=`pwd`
4904   ac_dir=$in_build
4905
4906   ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4907   $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4908   $as_echo "$ac_msg" >&6
4909   as_dir="$ac_dir"; as_fn_mkdir_p
4910
4911   case $srcdir in
4912   [\\/]* | ?:[\\/]* )
4913     ac_srcdir=$srcdir/$in_src ;;
4914   *) # Relative name.
4915     ac_srcdir=../$srcdir/$in_src ;;
4916   esac
4917
4918   cd "$ac_dir"
4919
4920   ac_sub_configure=$ac_srcdir/configure
4921
4922   # Make the cache file name correct relative to the subdirectory.
4923   case $cache_file in
4924   [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4925   *) # Relative name.
4926     ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4927   esac
4928
4929   { $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
4930 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4931   # The eval makes quoting arguments work.
4932   eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4933        --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4934     as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4935
4936   cd "$ac_popdir"
4937
4938
4939
4940 CONFIG_OBS=
4941 CONFIG_DEPS=
4942 CONFIG_SRCS=
4943 ENABLE_CFLAGS=
4944
4945 CONFIG_ALL=
4946 CONFIG_CLEAN=
4947 CONFIG_INSTALL=
4948 CONFIG_UNINSTALL=
4949
4950 # If we haven't got the data from the intl directory,
4951 # assume NLS is disabled.
4952 USE_NLS=no
4953 LIBINTL=
4954 LIBINTL_DEP=
4955 INCINTL=
4956 XGETTEXT=
4957 GMSGFMT=
4958 POSUB=
4959
4960 if test -f  ../intl/config.intl; then
4961   .  ../intl/config.intl
4962 fi
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4964 $as_echo_n "checking whether NLS is requested... " >&6; }
4965 if test x"$USE_NLS" != xyes; then
4966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967 $as_echo "no" >&6; }
4968 else
4969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4970 $as_echo "yes" >&6; }
4971
4972 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
4973
4974
4975   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4976 $as_echo_n "checking for catalogs to be installed... " >&6; }
4977   # Look for .po and .gmo files in the source directory.
4978   CATALOGS=
4979   XLINGUAS=
4980   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4981     # If there aren't any .gmo files the shell will give us the
4982     # literal string "../path/to/srcdir/po/*.gmo" which has to be
4983     # weeded out.
4984     case "$cat" in *\**)
4985       continue;;
4986     esac
4987     # The quadruple backslash is collapsed to a double backslash
4988     # by the backticks, then collapsed again by the double quotes,
4989     # leaving us with one backslash in the sed expression (right
4990     # before the dot that mustn't act as a wildcard).
4991     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4992     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4993     # The user is allowed to set LINGUAS to a list of languages to
4994     # install catalogs for.  If it's empty that means "all of them."
4995     if test "x$LINGUAS" = x; then
4996       CATALOGS="$CATALOGS $cat"
4997       XLINGUAS="$XLINGUAS $lang"
4998     else
4999       case "$LINGUAS" in *$lang*)
5000         CATALOGS="$CATALOGS $cat"
5001         XLINGUAS="$XLINGUAS $lang"
5002         ;;
5003       esac
5004     fi
5005   done
5006   LINGUAS="$XLINGUAS"
5007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5008 $as_echo "$LINGUAS" >&6; }
5009
5010
5011     DATADIRNAME=share
5012
5013   INSTOBJEXT=.mo
5014
5015   GENCAT=gencat
5016
5017   CATOBJEXT=.gmo
5018
5019 fi
5020
5021 localedir='${datadir}/locale'
5022
5023
5024 if test x"$USE_NLS" = xyes; then
5025    CONFIG_ALL="$CONFIG_ALL all-po"
5026    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5027    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5028    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
5029 fi
5030
5031 GNULIB=build-gnulib/import
5032
5033 # For Makefile dependencies.
5034 GNULIB_STDINT_H=
5035 if test x"$STDINT_H" != x; then
5036   GNULIB_STDINT_H=$GNULIB/$STDINT_H
5037 fi
5038
5039
5040 PACKAGE=gdb
5041
5042 cat >>confdefs.h <<_ACEOF
5043 #define PACKAGE "$PACKAGE"
5044 _ACEOF
5045
5046
5047
5048 # We never need to detect it in this sub-configure.
5049 # But preserve it for config.status --recheck.
5050
5051
5052
5053 MAKEINFO_EXTRA_FLAGS=""
5054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5055 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5056 if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5057   $as_echo_n "(cached) " >&6
5058 else
5059   echo '@clicksequence{a @click{} b}' >conftest.texinfo
5060   if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5061     gdb_cv_have_makeinfo_click=yes
5062   else
5063     gdb_cv_have_makeinfo_click=no
5064   fi
5065 fi
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5067 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5068 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5069   MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5070 fi
5071
5072
5073
5074
5075 # Check whether --with-separate-debug-dir was given.
5076 if test "${with_separate_debug_dir+set}" = set; then :
5077   withval=$with_separate_debug_dir;
5078     DEBUGDIR=$withval
5079 else
5080   DEBUGDIR=${libdir}/debug
5081 fi
5082
5083
5084   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5085   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5086   ac_define_dir=`eval echo $DEBUGDIR`
5087   ac_define_dir=`eval echo $ac_define_dir`
5088
5089 cat >>confdefs.h <<_ACEOF
5090 #define DEBUGDIR "$ac_define_dir"
5091 _ACEOF
5092
5093
5094
5095
5096   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5097      if test "x$prefix" = xNONE; then
5098         test_prefix=/usr/local
5099      else
5100         test_prefix=$prefix
5101      fi
5102   else
5103      test_prefix=$exec_prefix
5104   fi
5105   value=0
5106   case ${ac_define_dir} in
5107      "${test_prefix}"|"${test_prefix}/"*|\
5108         '${exec_prefix}'|'${exec_prefix}/'*)
5109      value=1
5110      ;;
5111   esac
5112
5113 cat >>confdefs.h <<_ACEOF
5114 #define DEBUGDIR_RELOCATABLE $value
5115 _ACEOF
5116
5117
5118
5119
5120 # We can't pass paths as command line arguments.
5121 # Mingw32 tries to be clever and will convert the paths for us.
5122 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
5123 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5124 # This breaks GDB's relocatable path conversions since paths passed in
5125 # config.h would not get so translated, the path prefixes no longer match.
5126
5127   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5128   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5129   ac_define_dir=`eval echo $bindir`
5130   ac_define_dir=`eval echo $ac_define_dir`
5131
5132 cat >>confdefs.h <<_ACEOF
5133 #define BINDIR "$ac_define_dir"
5134 _ACEOF
5135
5136
5137
5138 # GDB's datadir relocation
5139
5140
5141
5142 # Check whether --with-gdb-datadir was given.
5143 if test "${with_gdb_datadir+set}" = set; then :
5144   withval=$with_gdb_datadir;
5145     GDB_DATADIR=$withval
5146 else
5147   GDB_DATADIR=${datadir}/gdb
5148 fi
5149
5150
5151   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5152   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5153   ac_define_dir=`eval echo $GDB_DATADIR`
5154   ac_define_dir=`eval echo $ac_define_dir`
5155
5156 cat >>confdefs.h <<_ACEOF
5157 #define GDB_DATADIR "$ac_define_dir"
5158 _ACEOF
5159
5160
5161
5162
5163   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5164      if test "x$prefix" = xNONE; then
5165         test_prefix=/usr/local
5166      else
5167         test_prefix=$prefix
5168      fi
5169   else
5170      test_prefix=$exec_prefix
5171   fi
5172   value=0
5173   case ${ac_define_dir} in
5174      "${test_prefix}"|"${test_prefix}/"*|\
5175         '${exec_prefix}'|'${exec_prefix}/'*)
5176      value=1
5177      ;;
5178   esac
5179
5180 cat >>confdefs.h <<_ACEOF
5181 #define GDB_DATADIR_RELOCATABLE $value
5182 _ACEOF
5183
5184
5185
5186
5187
5188 # Check whether --with-relocated-sources was given.
5189 if test "${with_relocated_sources+set}" = set; then :
5190   withval=$with_relocated_sources; reloc_srcdir="${withval}"
5191
5192   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5193   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5194   ac_define_dir=`eval echo $reloc_srcdir`
5195   ac_define_dir=`eval echo $ac_define_dir`
5196
5197 cat >>confdefs.h <<_ACEOF
5198 #define RELOC_SRCDIR "$ac_define_dir"
5199 _ACEOF
5200
5201
5202
5203 fi
5204
5205
5206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5207 $as_echo_n "checking for default auto-load directory... " >&6; }
5208
5209 # Check whether --with-auto-load-dir was given.
5210 if test "${with_auto_load_dir+set}" = set; then :
5211   withval=$with_auto_load_dir;
5212 else
5213   with_auto_load_dir='$debugdir:$datadir/auto-load'
5214 fi
5215
5216 escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
5217
5218   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5219   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5220   ac_define_dir=`eval echo $escape_dir`
5221   ac_define_dir=`eval echo $ac_define_dir`
5222
5223 cat >>confdefs.h <<_ACEOF
5224 #define AUTO_LOAD_DIR "$ac_define_dir"
5225 _ACEOF
5226
5227
5228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5229 $as_echo "$with_auto_load_dir" >&6; }
5230
5231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5232 $as_echo_n "checking for default auto-load safe-path... " >&6; }
5233
5234 # Check whether --with-auto-load-safe-path was given.
5235 if test "${with_auto_load_safe_path+set}" = set; then :
5236   withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
5237      with_auto_load_safe_path="/"
5238      fi
5239 else
5240   with_auto_load_safe_path="$with_auto_load_dir"
5241 fi
5242
5243 escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
5244
5245   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5246   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5247   ac_define_dir=`eval echo $escape_dir`
5248   ac_define_dir=`eval echo $ac_define_dir`
5249
5250 cat >>confdefs.h <<_ACEOF
5251 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
5252 _ACEOF
5253
5254
5255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5256 $as_echo "$with_auto_load_safe_path" >&6; }
5257
5258
5259
5260 subdirs="$subdirs testsuite"
5261
5262
5263 # Check whether to support alternative target configurations
5264 # Check whether --enable-targets was given.
5265 if test "${enable_targets+set}" = set; then :
5266   enableval=$enable_targets; case "${enableval}" in
5267   yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
5268             ;;
5269   no)       enable_targets= ;;
5270   *)        enable_targets=$enableval ;;
5271 esac
5272 fi
5273
5274
5275 # Check whether to enable 64-bit support on 32-bit hosts
5276 # Check whether --enable-64-bit-bfd was given.
5277 if test "${enable_64_bit_bfd+set}" = set; then :
5278   enableval=$enable_64_bit_bfd; case "${enableval}" in
5279   yes)  want64=true  ;;
5280   no)   want64=false ;;
5281   *)    as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
5282 esac
5283 else
5284   want64=false
5285 fi
5286
5287 # Provide defaults for some variables set by the per-host and per-target
5288 # configuration.
5289 gdb_host_obs=posix-hdep.o
5290
5291 if test "${target}" = "${host}"; then
5292   gdb_native=yes
5293 else
5294   gdb_native=no
5295 fi
5296
5297 . $srcdir/configure.host
5298
5299 # Accumulate some settings from configure.tgt over all enabled targets
5300
5301 TARGET_OBS=
5302 all_targets=
5303 HAVE_NATIVE_GCORE_TARGET=
5304
5305 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
5306 do
5307   if test "$targ_alias" = "all"; then
5308     all_targets=true
5309   else
5310     # Canonicalize the secondary target names.
5311     result=`$ac_config_sub $targ_alias 2>/dev/null`
5312     if test -n "$result"; then
5313         targ=$result
5314     else
5315         targ=$targ_alias
5316     fi
5317
5318     . ${srcdir}/configure.tgt
5319
5320     if test -z "${gdb_target_obs}"; then :
5321   as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5322 fi
5323
5324     # Target-specific object files
5325     for i in ${gdb_target_obs}; do
5326         case " $TARGET_OBS " in
5327         *" ${i} "*) ;;
5328         *)
5329           TARGET_OBS="$TARGET_OBS ${i}"
5330           ;;
5331         esac
5332     done
5333
5334     # Check whether this target needs 64-bit CORE_ADDR
5335     if test x${want64} = xfalse; then
5336       . ${srcdir}/../bfd/config.bfd
5337     fi
5338
5339     # Check whether this target is native and supports gcore.
5340     if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5341        && $gdb_have_gcore; then
5342       HAVE_NATIVE_GCORE_TARGET=1
5343     fi
5344   fi
5345 done
5346
5347 if test x${all_targets} = xtrue; then
5348
5349   # We want all 64-bit targets if we either:
5350   #  - run on a 64-bit host  or
5351   #  - already require 64-bit support for some other target  or
5352   #  - the --enable-64-bit-bfd option was supplied
5353   # Otherwise we only support all 32-bit targets.
5354   #
5355   # NOTE: This test must be in sync with the corresponding
5356   #       tests in BFD!
5357
5358   if test x${want64} = xfalse; then
5359     # The cast to long int works around a bug in the HP C Compiler
5360 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5361 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5362 # This bug is HP SR number 8606223364.
5363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5364 $as_echo_n "checking size of long... " >&6; }
5365 if test "${ac_cv_sizeof_long+set}" = set; then :
5366   $as_echo_n "(cached) " >&6
5367 else
5368   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
5369
5370 else
5371   if test "$ac_cv_type_long" = yes; then
5372      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5373 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5374 { as_fn_set_status 77
5375 as_fn_error "cannot compute sizeof (long)
5376 See \`config.log' for more details." "$LINENO" 5; }; }
5377    else
5378      ac_cv_sizeof_long=0
5379    fi
5380 fi
5381
5382 fi
5383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5384 $as_echo "$ac_cv_sizeof_long" >&6; }
5385
5386
5387
5388 cat >>confdefs.h <<_ACEOF
5389 #define SIZEOF_LONG $ac_cv_sizeof_long
5390 _ACEOF
5391
5392
5393     if test "x${ac_cv_sizeof_long}" = "x8"; then
5394       want64=true
5395     fi
5396   fi
5397   if test x${want64} = xtrue; then
5398     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5399   else
5400     TARGET_OBS='$(ALL_TARGET_OBS)'
5401   fi
5402 fi
5403
5404
5405
5406
5407 # For other settings, only the main target counts.
5408 gdb_sim=
5409 gdb_osabi=
5410 build_gdbserver=
5411 targ=$target; . ${srcdir}/configure.tgt
5412
5413 # Fetch the default architecture and default target vector from BFD.
5414 targ=$target; . $srcdir/../bfd/config.bfd
5415
5416 # We only want the first architecture, so strip off the others if
5417 # there is more than one.
5418 targ_archs=`echo $targ_archs | sed 's/ .*//'`
5419
5420 if test "x$targ_archs" != x; then
5421
5422 cat >>confdefs.h <<_ACEOF
5423 #define DEFAULT_BFD_ARCH $targ_archs
5424 _ACEOF
5425
5426 fi
5427 if test "x$targ_defvec" != x; then
5428
5429 cat >>confdefs.h <<_ACEOF
5430 #define DEFAULT_BFD_VEC $targ_defvec
5431 _ACEOF
5432
5433 fi
5434
5435 # The CLI cannot be disabled yet, but may be in the future.
5436
5437 # Enable CLI.
5438 # Check whether --enable-gdbcli was given.
5439 if test "${enable_gdbcli+set}" = set; then :
5440   enableval=$enable_gdbcli; case $enableval in
5441     yes)
5442       ;;
5443     no)
5444       as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
5445     *)
5446       as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
5447   esac
5448 else
5449   enable_gdbcli=yes
5450 fi
5451
5452 if test x"$enable_gdbcli" = xyes; then
5453   if test -d $srcdir/cli; then
5454     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5455     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5456     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5457     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5458   fi
5459 fi
5460
5461 # Enable MI.
5462 # Check whether --enable-gdbmi was given.
5463 if test "${enable_gdbmi+set}" = set; then :
5464   enableval=$enable_gdbmi; case $enableval in
5465     yes | no)
5466       ;;
5467     *)
5468       as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
5469   esac
5470 else
5471   enable_gdbmi=yes
5472 fi
5473
5474 if test x"$enable_gdbmi" = xyes; then
5475   if test -d $srcdir/mi; then
5476     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5477     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5478     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5479     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5480   fi
5481 fi
5482
5483 # Enable TUI.
5484 # Check whether --enable-tui was given.
5485 if test "${enable_tui+set}" = set; then :
5486   enableval=$enable_tui; case $enableval in
5487     yes | no | auto)
5488       ;;
5489     *)
5490       as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
5491   esac
5492 else
5493   enable_tui=auto
5494 fi
5495
5496
5497 # Enable gdbtk.
5498 # Check whether --enable-gdbtk was given.
5499 if test "${enable_gdbtk+set}" = set; then :
5500   enableval=$enable_gdbtk; case $enableval in
5501     yes | no)
5502       ;;
5503     *)
5504       as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
5505   esac
5506 else
5507   if test -d $srcdir/gdbtk; then
5508     enable_gdbtk=yes
5509   else
5510     enable_gdbtk=no
5511   fi
5512 fi
5513
5514 # We unconditionally disable gdbtk tests on selected platforms.
5515 case $host_os in
5516   go32* | windows*)
5517     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5518 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
5519     enable_gdbtk=no ;;
5520 esac
5521
5522 # Libunwind support for ia64.
5523
5524
5525 # Check whether --with-libunwind-ia64 was given.
5526 if test "${with_libunwind_ia64+set}" = set; then :
5527   withval=$with_libunwind_ia64;
5528 else
5529   with_libunwind_ia64=auto
5530 fi
5531
5532
5533 # Backward compatibility option.
5534 if test "${with_libunwind+set}" = set; then
5535   if test x"$with_libunwind_ia64" != xauto; then
5536     as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5537   fi
5538   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5539 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5540   with_libunwind_ia64="$with_libunwind"
5541 fi
5542
5543 case "$with_libunwind_ia64" in
5544   yes | no)
5545     ;;
5546   auto)
5547     for ac_header in libunwind-ia64.h
5548 do :
5549   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5550 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
5551   cat >>confdefs.h <<_ACEOF
5552 #define HAVE_LIBUNWIND_IA64_H 1
5553 _ACEOF
5554
5555 fi
5556
5557 done
5558
5559     with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5560     ;;
5561   *)
5562     as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5563     ;;
5564 esac
5565
5566 if test x"$with_libunwind_ia64" = xyes; then
5567   for ac_header in libunwind-ia64.h
5568 do :
5569   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5570 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
5571   cat >>confdefs.h <<_ACEOF
5572 #define HAVE_LIBUNWIND_IA64_H 1
5573 _ACEOF
5574
5575 fi
5576
5577 done
5578
5579   if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5580     as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5581   fi
5582   CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5583   CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5584   CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
5585 fi
5586
5587 opt_curses=no
5588
5589 # Check whether --with-curses was given.
5590 if test "${with_curses+set}" = set; then :
5591   withval=$with_curses; opt_curses=$withval
5592 fi
5593
5594
5595 prefer_curses=no
5596 if test "$opt_curses" = "yes"; then
5597   prefer_curses=yes
5598 fi
5599
5600 # Profiling support.
5601 # Check whether --enable-profiling was given.
5602 if test "${enable_profiling+set}" = set; then :
5603   enableval=$enable_profiling; case $enableval in
5604     yes | no)
5605       ;;
5606     *)
5607       as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
5608   esac
5609 else
5610   enable_profiling=no
5611 fi
5612
5613
5614 for ac_func in monstartup _mcleanup
5615 do :
5616   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5617 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5618 eval as_val=\$$as_ac_var
5619    if test "x$as_val" = x""yes; then :
5620   cat >>confdefs.h <<_ACEOF
5621 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5622 _ACEOF
5623
5624 fi
5625 done
5626
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5628 $as_echo_n "checking for _etext... " >&6; }
5629 if test "${ac_cv_var__etext+set}" = set; then :
5630   $as_echo_n "(cached) " >&6
5631 else
5632   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5633 /* end confdefs.h.  */
5634 #include <stdlib.h>
5635 extern char _etext;
5636
5637 int
5638 main ()
5639 {
5640 free (&_etext);
5641   ;
5642   return 0;
5643 }
5644 _ACEOF
5645 if ac_fn_c_try_link "$LINENO"; then :
5646   ac_cv_var__etext=yes
5647 else
5648   ac_cv_var__etext=no
5649 fi
5650 rm -f core conftest.err conftest.$ac_objext \
5651     conftest$ac_exeext conftest.$ac_ext
5652 fi
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5654 $as_echo "$ac_cv_var__etext" >&6; }
5655 if test $ac_cv_var__etext = yes; then
5656
5657 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
5658
5659 fi
5660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5661 $as_echo_n "checking for etext... " >&6; }
5662 if test "${ac_cv_var_etext+set}" = set; then :
5663   $as_echo_n "(cached) " >&6
5664 else
5665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5666 /* end confdefs.h.  */
5667 #include <stdlib.h>
5668 extern char etext;
5669
5670 int
5671 main ()
5672 {
5673 free (&etext);
5674   ;
5675   return 0;
5676 }
5677 _ACEOF
5678 if ac_fn_c_try_link "$LINENO"; then :
5679   ac_cv_var_etext=yes
5680 else
5681   ac_cv_var_etext=no
5682 fi
5683 rm -f core conftest.err conftest.$ac_objext \
5684     conftest$ac_exeext conftest.$ac_ext
5685 fi
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5687 $as_echo "$ac_cv_var_etext" >&6; }
5688 if test $ac_cv_var_etext = yes; then
5689
5690 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
5691
5692 fi
5693 if test "$enable_profiling" = yes ; then
5694   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
5695     as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
5696   fi
5697   PROFILE_CFLAGS=-pg
5698   OLD_CFLAGS="$CFLAGS"
5699   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
5700
5701   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5702 $as_echo_n "checking whether $CC supports -pg... " >&6; }
5703 if test "${ac_cv_cc_supports_pg+set}" = set; then :
5704   $as_echo_n "(cached) " >&6
5705 else
5706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5707 /* end confdefs.h.  */
5708
5709 int
5710 main ()
5711 {
5712 int x;
5713   ;
5714   return 0;
5715 }
5716 _ACEOF
5717 if ac_fn_c_try_compile "$LINENO"; then :
5718   ac_cv_cc_supports_pg=yes
5719 else
5720   ac_cv_cc_supports_pg=no
5721 fi
5722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5723 fi
5724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5725 $as_echo "$ac_cv_cc_supports_pg" >&6; }
5726
5727   if test $ac_cv_cc_supports_pg = no; then
5728     as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
5729   fi
5730
5731   CFLAGS="$OLD_CFLAGS"
5732 fi
5733
5734
5735
5736 # Check whether --with-pkgversion was given.
5737 if test "${with_pkgversion+set}" = set; then :
5738   withval=$with_pkgversion; case "$withval" in
5739       yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
5740       no)  PKGVERSION= ;;
5741       *)   PKGVERSION="($withval) " ;;
5742      esac
5743 else
5744   PKGVERSION="(GDB) "
5745
5746 fi
5747
5748
5749
5750
5751
5752 # Check whether --with-bugurl was given.
5753 if test "${with_bugurl+set}" = set; then :
5754   withval=$with_bugurl; case "$withval" in
5755       yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
5756       no)  BUGURL=
5757            ;;
5758       *)   BUGURL="$withval"
5759            ;;
5760      esac
5761 else
5762   BUGURL="http://www.gnu.org/software/gdb/bugs/"
5763
5764 fi
5765
5766   case ${BUGURL} in
5767   "")
5768     REPORT_BUGS_TO=
5769     REPORT_BUGS_TEXI=
5770     ;;
5771   *)
5772     REPORT_BUGS_TO="<$BUGURL>"
5773     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5774     ;;
5775   esac;
5776
5777
5778
5779
5780 cat >>confdefs.h <<_ACEOF
5781 #define PKGVERSION "$PKGVERSION"
5782 _ACEOF
5783
5784
5785 cat >>confdefs.h <<_ACEOF
5786 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5787 _ACEOF
5788
5789
5790 # --------------------- #
5791 # Checks for programs.  #
5792 # --------------------- #
5793
5794 for ac_prog in gawk mawk nawk awk
5795 do
5796   # Extract the first word of "$ac_prog", so it can be a program name with args.
5797 set dummy $ac_prog; ac_word=$2
5798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5799 $as_echo_n "checking for $ac_word... " >&6; }
5800 if test "${ac_cv_prog_AWK+set}" = set; then :
5801   $as_echo_n "(cached) " >&6
5802 else
5803   if test -n "$AWK"; then
5804   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5805 else
5806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5807 for as_dir in $PATH
5808 do
5809   IFS=$as_save_IFS
5810   test -z "$as_dir" && as_dir=.
5811     for ac_exec_ext in '' $ac_executable_extensions; do
5812   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5813     ac_cv_prog_AWK="$ac_prog"
5814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5815     break 2
5816   fi
5817 done
5818   done
5819 IFS=$as_save_IFS
5820
5821 fi
5822 fi
5823 AWK=$ac_cv_prog_AWK
5824 if test -n "$AWK"; then
5825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5826 $as_echo "$AWK" >&6; }
5827 else
5828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5829 $as_echo "no" >&6; }
5830 fi
5831
5832
5833   test -n "$AWK" && break
5834 done
5835
5836 # Find a good install program.  We prefer a C program (faster),
5837 # so one script is as good as another.  But avoid the broken or
5838 # incompatible versions:
5839 # SysV /etc/install, /usr/sbin/install
5840 # SunOS /usr/etc/install
5841 # IRIX /sbin/install
5842 # AIX /bin/install
5843 # AmigaOS /C/install, which installs bootblocks on floppy discs
5844 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5845 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
5846 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5847 # OS/2's system install, which has a completely different semantic
5848 # ./install, which can be erroneously created by make from ./install.sh.
5849 # Reject install programs that cannot install multiple files.
5850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5851 $as_echo_n "checking for a BSD-compatible install... " >&6; }
5852 if test -z "$INSTALL"; then
5853 if test "${ac_cv_path_install+set}" = set; then :
5854   $as_echo_n "(cached) " >&6
5855 else
5856   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857 for as_dir in $PATH
5858 do
5859   IFS=$as_save_IFS
5860   test -z "$as_dir" && as_dir=.
5861     # Account for people who put trailing slashes in PATH elements.
5862 case $as_dir/ in #((
5863   ./ | .// | /[cC]/* | \
5864   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5865   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5866   /usr/ucb/* ) ;;
5867   *)
5868     # OSF1 and SCO ODT 3.0 have their own names for install.
5869     # Don't use installbsd from OSF since it installs stuff as root
5870     # by default.
5871     for ac_prog in ginstall scoinst install; do
5872       for ac_exec_ext in '' $ac_executable_extensions; do
5873         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5874           if test $ac_prog = install &&
5875             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5876             # AIX install.  It has an incompatible calling convention.
5877             :
5878           elif test $ac_prog = install &&
5879             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5880             # program-specific install script used by HP pwplus--don't use.
5881             :
5882           else
5883             rm -rf conftest.one conftest.two conftest.dir
5884             echo one > conftest.one
5885             echo two > conftest.two
5886             mkdir conftest.dir
5887             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5888               test -s conftest.one && test -s conftest.two &&
5889               test -s conftest.dir/conftest.one &&
5890               test -s conftest.dir/conftest.two
5891             then
5892               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5893               break 3
5894             fi
5895           fi
5896         fi
5897       done
5898     done
5899     ;;
5900 esac
5901
5902   done
5903 IFS=$as_save_IFS
5904
5905 rm -rf conftest.one conftest.two conftest.dir
5906
5907 fi
5908   if test "${ac_cv_path_install+set}" = set; then
5909     INSTALL=$ac_cv_path_install
5910   else
5911     # As a last resort, use the slow shell script.  Don't cache a
5912     # value for INSTALL within a source directory, because that will
5913     # break other packages using the cache if that directory is
5914     # removed, or if the value is a relative name.
5915     INSTALL=$ac_install_sh
5916   fi
5917 fi
5918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5919 $as_echo "$INSTALL" >&6; }
5920
5921 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5922 # It thinks the first close brace ends the variable substitution.
5923 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5924
5925 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5926
5927 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5928
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5930 $as_echo_n "checking whether ln -s works... " >&6; }
5931 LN_S=$as_ln_s
5932 if test "$LN_S" = "ln -s"; then
5933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5934 $as_echo "yes" >&6; }
5935 else
5936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5937 $as_echo "no, using $LN_S" >&6; }
5938 fi
5939
5940 if test -n "$ac_tool_prefix"; then
5941   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5942 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5944 $as_echo_n "checking for $ac_word... " >&6; }
5945 if test "${ac_cv_prog_RANLIB+set}" = set; then :
5946   $as_echo_n "(cached) " >&6
5947 else
5948   if test -n "$RANLIB"; then
5949   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5950 else
5951 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5952 for as_dir in $PATH
5953 do
5954   IFS=$as_save_IFS
5955   test -z "$as_dir" && as_dir=.
5956     for ac_exec_ext in '' $ac_executable_extensions; do
5957   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5958     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5960     break 2
5961   fi
5962 done
5963   done
5964 IFS=$as_save_IFS
5965
5966 fi
5967 fi
5968 RANLIB=$ac_cv_prog_RANLIB
5969 if test -n "$RANLIB"; then
5970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5971 $as_echo "$RANLIB" >&6; }
5972 else
5973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5974 $as_echo "no" >&6; }
5975 fi
5976
5977
5978 fi
5979 if test -z "$ac_cv_prog_RANLIB"; then
5980   ac_ct_RANLIB=$RANLIB
5981   # Extract the first word of "ranlib", so it can be a program name with args.
5982 set dummy ranlib; ac_word=$2
5983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984 $as_echo_n "checking for $ac_word... " >&6; }
5985 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5986   $as_echo_n "(cached) " >&6
5987 else
5988   if test -n "$ac_ct_RANLIB"; then
5989   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5990 else
5991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992 for as_dir in $PATH
5993 do
5994   IFS=$as_save_IFS
5995   test -z "$as_dir" && as_dir=.
5996     for ac_exec_ext in '' $ac_executable_extensions; do
5997   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5998     ac_cv_prog_ac_ct_RANLIB="ranlib"
5999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6000     break 2
6001   fi
6002 done
6003   done
6004 IFS=$as_save_IFS
6005
6006 fi
6007 fi
6008 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6009 if test -n "$ac_ct_RANLIB"; then
6010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6011 $as_echo "$ac_ct_RANLIB" >&6; }
6012 else
6013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014 $as_echo "no" >&6; }
6015 fi
6016
6017   if test "x$ac_ct_RANLIB" = x; then
6018     RANLIB=":"
6019   else
6020     case $cross_compiling:$ac_tool_warned in
6021 yes:)
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6023 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6024 ac_tool_warned=yes ;;
6025 esac
6026     RANLIB=$ac_ct_RANLIB
6027   fi
6028 else
6029   RANLIB="$ac_cv_prog_RANLIB"
6030 fi
6031
6032 for ac_prog in 'bison -y' byacc
6033 do
6034   # Extract the first word of "$ac_prog", so it can be a program name with args.
6035 set dummy $ac_prog; ac_word=$2
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6037 $as_echo_n "checking for $ac_word... " >&6; }
6038 if test "${ac_cv_prog_YACC+set}" = set; then :
6039   $as_echo_n "(cached) " >&6
6040 else
6041   if test -n "$YACC"; then
6042   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6043 else
6044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045 for as_dir in $PATH
6046 do
6047   IFS=$as_save_IFS
6048   test -z "$as_dir" && as_dir=.
6049     for ac_exec_ext in '' $ac_executable_extensions; do
6050   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6051     ac_cv_prog_YACC="$ac_prog"
6052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6053     break 2
6054   fi
6055 done
6056   done
6057 IFS=$as_save_IFS
6058
6059 fi
6060 fi
6061 YACC=$ac_cv_prog_YACC
6062 if test -n "$YACC"; then
6063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6064 $as_echo "$YACC" >&6; }
6065 else
6066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067 $as_echo "no" >&6; }
6068 fi
6069
6070
6071   test -n "$YACC" && break
6072 done
6073 test -n "$YACC" || YACC="yacc"
6074
6075
6076 if test -n "$ac_tool_prefix"; then
6077   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6078 set dummy ${ac_tool_prefix}ar; ac_word=$2
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6080 $as_echo_n "checking for $ac_word... " >&6; }
6081 if test "${ac_cv_prog_AR+set}" = set; then :
6082   $as_echo_n "(cached) " >&6
6083 else
6084   if test -n "$AR"; then
6085   ac_cv_prog_AR="$AR" # Let the user override the test.
6086 else
6087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6088 for as_dir in $PATH
6089 do
6090   IFS=$as_save_IFS
6091   test -z "$as_dir" && as_dir=.
6092     for ac_exec_ext in '' $ac_executable_extensions; do
6093   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6094     ac_cv_prog_AR="${ac_tool_prefix}ar"
6095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6096     break 2
6097   fi
6098 done
6099   done
6100 IFS=$as_save_IFS
6101
6102 fi
6103 fi
6104 AR=$ac_cv_prog_AR
6105 if test -n "$AR"; then
6106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6107 $as_echo "$AR" >&6; }
6108 else
6109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6110 $as_echo "no" >&6; }
6111 fi
6112
6113
6114 fi
6115 if test -z "$ac_cv_prog_AR"; then
6116   ac_ct_AR=$AR
6117   # Extract the first word of "ar", so it can be a program name with args.
6118 set dummy ar; ac_word=$2
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6120 $as_echo_n "checking for $ac_word... " >&6; }
6121 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6122   $as_echo_n "(cached) " >&6
6123 else
6124   if test -n "$ac_ct_AR"; then
6125   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6126 else
6127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6128 for as_dir in $PATH
6129 do
6130   IFS=$as_save_IFS
6131   test -z "$as_dir" && as_dir=.
6132     for ac_exec_ext in '' $ac_executable_extensions; do
6133   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6134     ac_cv_prog_ac_ct_AR="ar"
6135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6136     break 2
6137   fi
6138 done
6139   done
6140 IFS=$as_save_IFS
6141
6142 fi
6143 fi
6144 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6145 if test -n "$ac_ct_AR"; then
6146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6147 $as_echo "$ac_ct_AR" >&6; }
6148 else
6149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6150 $as_echo "no" >&6; }
6151 fi
6152
6153   if test "x$ac_ct_AR" = x; then
6154     AR=""
6155   else
6156     case $cross_compiling:$ac_tool_warned in
6157 yes:)
6158 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6159 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6160 ac_tool_warned=yes ;;
6161 esac
6162     AR=$ac_ct_AR
6163   fi
6164 else
6165   AR="$ac_cv_prog_AR"
6166 fi
6167
6168 if test -n "$ac_tool_prefix"; then
6169   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6170 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6172 $as_echo_n "checking for $ac_word... " >&6; }
6173 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6174   $as_echo_n "(cached) " >&6
6175 else
6176   if test -n "$DLLTOOL"; then
6177   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6178 else
6179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180 for as_dir in $PATH
6181 do
6182   IFS=$as_save_IFS
6183   test -z "$as_dir" && as_dir=.
6184     for ac_exec_ext in '' $ac_executable_extensions; do
6185   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6186     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6188     break 2
6189   fi
6190 done
6191   done
6192 IFS=$as_save_IFS
6193
6194 fi
6195 fi
6196 DLLTOOL=$ac_cv_prog_DLLTOOL
6197 if test -n "$DLLTOOL"; then
6198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6199 $as_echo "$DLLTOOL" >&6; }
6200 else
6201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6202 $as_echo "no" >&6; }
6203 fi
6204
6205
6206 fi
6207 if test -z "$ac_cv_prog_DLLTOOL"; then
6208   ac_ct_DLLTOOL=$DLLTOOL
6209   # Extract the first word of "dlltool", so it can be a program name with args.
6210 set dummy dlltool; ac_word=$2
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6212 $as_echo_n "checking for $ac_word... " >&6; }
6213 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6214   $as_echo_n "(cached) " >&6
6215 else
6216   if test -n "$ac_ct_DLLTOOL"; then
6217   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6218 else
6219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6220 for as_dir in $PATH
6221 do
6222   IFS=$as_save_IFS
6223   test -z "$as_dir" && as_dir=.
6224     for ac_exec_ext in '' $ac_executable_extensions; do
6225   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6226     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6228     break 2
6229   fi
6230 done
6231   done
6232 IFS=$as_save_IFS
6233
6234 fi
6235 fi
6236 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6237 if test -n "$ac_ct_DLLTOOL"; then
6238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6239 $as_echo "$ac_ct_DLLTOOL" >&6; }
6240 else
6241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6242 $as_echo "no" >&6; }
6243 fi
6244
6245   if test "x$ac_ct_DLLTOOL" = x; then
6246     DLLTOOL=""
6247   else
6248     case $cross_compiling:$ac_tool_warned in
6249 yes:)
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6251 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6252 ac_tool_warned=yes ;;
6253 esac
6254     DLLTOOL=$ac_ct_DLLTOOL
6255   fi
6256 else
6257   DLLTOOL="$ac_cv_prog_DLLTOOL"
6258 fi
6259
6260 if test -n "$ac_tool_prefix"; then
6261   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6262 set dummy ${ac_tool_prefix}windres; ac_word=$2
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6264 $as_echo_n "checking for $ac_word... " >&6; }
6265 if test "${ac_cv_prog_WINDRES+set}" = set; then :
6266   $as_echo_n "(cached) " >&6
6267 else
6268   if test -n "$WINDRES"; then
6269   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6270 else
6271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6272 for as_dir in $PATH
6273 do
6274   IFS=$as_save_IFS
6275   test -z "$as_dir" && as_dir=.
6276     for ac_exec_ext in '' $ac_executable_extensions; do
6277   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6278     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6280     break 2
6281   fi
6282 done
6283   done
6284 IFS=$as_save_IFS
6285
6286 fi
6287 fi
6288 WINDRES=$ac_cv_prog_WINDRES
6289 if test -n "$WINDRES"; then
6290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6291 $as_echo "$WINDRES" >&6; }
6292 else
6293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6294 $as_echo "no" >&6; }
6295 fi
6296
6297
6298 fi
6299 if test -z "$ac_cv_prog_WINDRES"; then
6300   ac_ct_WINDRES=$WINDRES
6301   # Extract the first word of "windres", so it can be a program name with args.
6302 set dummy windres; ac_word=$2
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6304 $as_echo_n "checking for $ac_word... " >&6; }
6305 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6306   $as_echo_n "(cached) " >&6
6307 else
6308   if test -n "$ac_ct_WINDRES"; then
6309   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6310 else
6311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6312 for as_dir in $PATH
6313 do
6314   IFS=$as_save_IFS
6315   test -z "$as_dir" && as_dir=.
6316     for ac_exec_ext in '' $ac_executable_extensions; do
6317   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6318     ac_cv_prog_ac_ct_WINDRES="windres"
6319     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6320     break 2
6321   fi
6322 done
6323   done
6324 IFS=$as_save_IFS
6325
6326 fi
6327 fi
6328 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6329 if test -n "$ac_ct_WINDRES"; then
6330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6331 $as_echo "$ac_ct_WINDRES" >&6; }
6332 else
6333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6334 $as_echo "no" >&6; }
6335 fi
6336
6337   if test "x$ac_ct_WINDRES" = x; then
6338     WINDRES=""
6339   else
6340     case $cross_compiling:$ac_tool_warned in
6341 yes:)
6342 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6343 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6344 ac_tool_warned=yes ;;
6345 esac
6346     WINDRES=$ac_ct_WINDRES
6347   fi
6348 else
6349   WINDRES="$ac_cv_prog_WINDRES"
6350 fi
6351
6352
6353 case $host_os in
6354   gnu*)
6355     # Needed for GNU Hurd hosts.
6356     if test -n "$ac_tool_prefix"; then
6357   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6358 set dummy ${ac_tool_prefix}mig; ac_word=$2
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6360 $as_echo_n "checking for $ac_word... " >&6; }
6361 if test "${ac_cv_prog_MIG+set}" = set; then :
6362   $as_echo_n "(cached) " >&6
6363 else
6364   if test -n "$MIG"; then
6365   ac_cv_prog_MIG="$MIG" # Let the user override the test.
6366 else
6367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6368 for as_dir in $PATH
6369 do
6370   IFS=$as_save_IFS
6371   test -z "$as_dir" && as_dir=.
6372     for ac_exec_ext in '' $ac_executable_extensions; do
6373   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6374     ac_cv_prog_MIG="${ac_tool_prefix}mig"
6375     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6376     break 2
6377   fi
6378 done
6379   done
6380 IFS=$as_save_IFS
6381
6382 fi
6383 fi
6384 MIG=$ac_cv_prog_MIG
6385 if test -n "$MIG"; then
6386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6387 $as_echo "$MIG" >&6; }
6388 else
6389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6390 $as_echo "no" >&6; }
6391 fi
6392
6393
6394 fi
6395 if test -z "$ac_cv_prog_MIG"; then
6396   ac_ct_MIG=$MIG
6397   # Extract the first word of "mig", so it can be a program name with args.
6398 set dummy mig; ac_word=$2
6399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6400 $as_echo_n "checking for $ac_word... " >&6; }
6401 if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6402   $as_echo_n "(cached) " >&6
6403 else
6404   if test -n "$ac_ct_MIG"; then
6405   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6406 else
6407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6408 for as_dir in $PATH
6409 do
6410   IFS=$as_save_IFS
6411   test -z "$as_dir" && as_dir=.
6412     for ac_exec_ext in '' $ac_executable_extensions; do
6413   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6414     ac_cv_prog_ac_ct_MIG="mig"
6415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6416     break 2
6417   fi
6418 done
6419   done
6420 IFS=$as_save_IFS
6421
6422 fi
6423 fi
6424 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6425 if test -n "$ac_ct_MIG"; then
6426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6427 $as_echo "$ac_ct_MIG" >&6; }
6428 else
6429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6430 $as_echo "no" >&6; }
6431 fi
6432
6433   if test "x$ac_ct_MIG" = x; then
6434     MIG=""
6435   else
6436     case $cross_compiling:$ac_tool_warned in
6437 yes:)
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6439 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6440 ac_tool_warned=yes ;;
6441 esac
6442     MIG=$ac_ct_MIG
6443   fi
6444 else
6445   MIG="$ac_cv_prog_MIG"
6446 fi
6447
6448     if test x"$MIG" = x; then
6449       as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6450     fi
6451     ;;
6452 esac
6453
6454 # ---------------------- #
6455 # Checks for libraries.  #
6456 # ---------------------- #
6457
6458 # We might need to link with -lm; most simulators need it.
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6460 $as_echo_n "checking for main in -lm... " >&6; }
6461 if test "${ac_cv_lib_m_main+set}" = set; then :
6462   $as_echo_n "(cached) " >&6
6463 else
6464   ac_check_lib_save_LIBS=$LIBS
6465 LIBS="-lm  $LIBS"
6466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6467 /* end confdefs.h.  */
6468
6469
6470 int
6471 main ()
6472 {
6473 return main ();
6474   ;
6475   return 0;
6476 }
6477 _ACEOF
6478 if ac_fn_c_try_link "$LINENO"; then :
6479   ac_cv_lib_m_main=yes
6480 else
6481   ac_cv_lib_m_main=no
6482 fi
6483 rm -f core conftest.err conftest.$ac_objext \
6484     conftest$ac_exeext conftest.$ac_ext
6485 LIBS=$ac_check_lib_save_LIBS
6486 fi
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6488 $as_echo "$ac_cv_lib_m_main" >&6; }
6489 if test "x$ac_cv_lib_m_main" = x""yes; then :
6490   cat >>confdefs.h <<_ACEOF
6491 #define HAVE_LIBM 1
6492 _ACEOF
6493
6494   LIBS="-lm $LIBS"
6495
6496 fi
6497
6498
6499 # We need to link with -lw to get `wctype' on Solaris before Solaris
6500 # 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
6501 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6502 # is known to have this problem).  Therefore we avoid libw if we can.
6503 ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6504 if test "x$ac_cv_func_wctype" = x""yes; then :
6505
6506 else
6507   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6508 $as_echo_n "checking for wctype in -lw... " >&6; }
6509 if test "${ac_cv_lib_w_wctype+set}" = set; then :
6510   $as_echo_n "(cached) " >&6
6511 else
6512   ac_check_lib_save_LIBS=$LIBS
6513 LIBS="-lw  $LIBS"
6514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6515 /* end confdefs.h.  */
6516
6517 /* Override any GCC internal prototype to avoid an error.
6518    Use char because int might match the return type of a GCC
6519    builtin and then its argument prototype would still apply.  */
6520 #ifdef __cplusplus
6521 extern "C"
6522 #endif
6523 char wctype ();
6524 int
6525 main ()
6526 {
6527 return wctype ();
6528   ;
6529   return 0;
6530 }
6531 _ACEOF
6532 if ac_fn_c_try_link "$LINENO"; then :
6533   ac_cv_lib_w_wctype=yes
6534 else
6535   ac_cv_lib_w_wctype=no
6536 fi
6537 rm -f core conftest.err conftest.$ac_objext \
6538     conftest$ac_exeext conftest.$ac_ext
6539 LIBS=$ac_check_lib_save_LIBS
6540 fi
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6542 $as_echo "$ac_cv_lib_w_wctype" >&6; }
6543 if test "x$ac_cv_lib_w_wctype" = x""yes; then :
6544   cat >>confdefs.h <<_ACEOF
6545 #define HAVE_LIBW 1
6546 _ACEOF
6547
6548   LIBS="-lw $LIBS"
6549
6550 fi
6551
6552 fi
6553
6554
6555 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6557 $as_echo_n "checking for library containing gethostbyname... " >&6; }
6558 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6559   $as_echo_n "(cached) " >&6
6560 else
6561   ac_func_search_save_LIBS=$LIBS
6562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6563 /* end confdefs.h.  */
6564
6565 /* Override any GCC internal prototype to avoid an error.
6566    Use char because int might match the return type of a GCC
6567    builtin and then its argument prototype would still apply.  */
6568 #ifdef __cplusplus
6569 extern "C"
6570 #endif
6571 char gethostbyname ();
6572 int
6573 main ()
6574 {
6575 return gethostbyname ();
6576   ;
6577   return 0;
6578 }
6579 _ACEOF
6580 for ac_lib in '' nsl; do
6581   if test -z "$ac_lib"; then
6582     ac_res="none required"
6583   else
6584     ac_res=-l$ac_lib
6585     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6586   fi
6587   if ac_fn_c_try_link "$LINENO"; then :
6588   ac_cv_search_gethostbyname=$ac_res
6589 fi
6590 rm -f core conftest.err conftest.$ac_objext \
6591     conftest$ac_exeext
6592   if test "${ac_cv_search_gethostbyname+set}" = set; then :
6593   break
6594 fi
6595 done
6596 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6597
6598 else
6599   ac_cv_search_gethostbyname=no
6600 fi
6601 rm conftest.$ac_ext
6602 LIBS=$ac_func_search_save_LIBS
6603 fi
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6605 $as_echo "$ac_cv_search_gethostbyname" >&6; }
6606 ac_res=$ac_cv_search_gethostbyname
6607 if test "$ac_res" != no; then :
6608   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6609
6610 fi
6611
6612
6613 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
6614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6615 $as_echo_n "checking for library containing socketpair... " >&6; }
6616 if test "${ac_cv_search_socketpair+set}" = set; then :
6617   $as_echo_n "(cached) " >&6
6618 else
6619   ac_func_search_save_LIBS=$LIBS
6620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6621 /* end confdefs.h.  */
6622
6623 /* Override any GCC internal prototype to avoid an error.
6624    Use char because int might match the return type of a GCC
6625    builtin and then its argument prototype would still apply.  */
6626 #ifdef __cplusplus
6627 extern "C"
6628 #endif
6629 char socketpair ();
6630 int
6631 main ()
6632 {
6633 return socketpair ();
6634   ;
6635   return 0;
6636 }
6637 _ACEOF
6638 for ac_lib in '' socket; do
6639   if test -z "$ac_lib"; then
6640     ac_res="none required"
6641   else
6642     ac_res=-l$ac_lib
6643     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6644   fi
6645   if ac_fn_c_try_link "$LINENO"; then :
6646   ac_cv_search_socketpair=$ac_res
6647 fi
6648 rm -f core conftest.err conftest.$ac_objext \
6649     conftest$ac_exeext
6650   if test "${ac_cv_search_socketpair+set}" = set; then :
6651   break
6652 fi
6653 done
6654 if test "${ac_cv_search_socketpair+set}" = set; then :
6655
6656 else
6657   ac_cv_search_socketpair=no
6658 fi
6659 rm conftest.$ac_ext
6660 LIBS=$ac_func_search_save_LIBS
6661 fi
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6663 $as_echo "$ac_cv_search_socketpair" >&6; }
6664 ac_res=$ac_cv_search_socketpair
6665 if test "$ac_res" != no; then :
6666   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6667
6668 fi
6669
6670
6671 # Link in zlib if we can.  This allows us to read compressed debug sections.
6672
6673   # See if the user specified whether he wants zlib support or not.
6674
6675 # Check whether --with-zlib was given.
6676 if test "${with_zlib+set}" = set; then :
6677   withval=$with_zlib;
6678 else
6679   with_zlib=auto
6680 fi
6681
6682
6683   if test "$with_zlib" != "no"; then
6684     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
6685 $as_echo_n "checking for library containing zlibVersion... " >&6; }
6686 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6687   $as_echo_n "(cached) " >&6
6688 else
6689   ac_func_search_save_LIBS=$LIBS
6690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6691 /* end confdefs.h.  */
6692
6693 /* Override any GCC internal prototype to avoid an error.
6694    Use char because int might match the return type of a GCC
6695    builtin and then its argument prototype would still apply.  */
6696 #ifdef __cplusplus
6697 extern "C"
6698 #endif
6699 char zlibVersion ();
6700 int
6701 main ()
6702 {
6703 return zlibVersion ();
6704   ;
6705   return 0;
6706 }
6707 _ACEOF
6708 for ac_lib in '' z; do
6709   if test -z "$ac_lib"; then
6710     ac_res="none required"
6711   else
6712     ac_res=-l$ac_lib
6713     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6714   fi
6715   if ac_fn_c_try_link "$LINENO"; then :
6716   ac_cv_search_zlibVersion=$ac_res
6717 fi
6718 rm -f core conftest.err conftest.$ac_objext \
6719     conftest$ac_exeext
6720   if test "${ac_cv_search_zlibVersion+set}" = set; then :
6721   break
6722 fi
6723 done
6724 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6725
6726 else
6727   ac_cv_search_zlibVersion=no
6728 fi
6729 rm conftest.$ac_ext
6730 LIBS=$ac_func_search_save_LIBS
6731 fi
6732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6733 $as_echo "$ac_cv_search_zlibVersion" >&6; }
6734 ac_res=$ac_cv_search_zlibVersion
6735 if test "$ac_res" != no; then :
6736   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6737   for ac_header in zlib.h
6738 do :
6739   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6740 if test "x$ac_cv_header_zlib_h" = x""yes; then :
6741   cat >>confdefs.h <<_ACEOF
6742 #define HAVE_ZLIB_H 1
6743 _ACEOF
6744
6745 fi
6746
6747 done
6748
6749 fi
6750
6751     if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6752       as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6753     fi
6754   fi
6755
6756
6757 # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6759 $as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6760 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6761   $as_echo_n "(cached) " >&6
6762 else
6763   ac_func_search_save_LIBS=$LIBS
6764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6765 /* end confdefs.h.  */
6766
6767 /* Override any GCC internal prototype to avoid an error.
6768    Use char because int might match the return type of a GCC
6769    builtin and then its argument prototype would still apply.  */
6770 #ifdef __cplusplus
6771 extern "C"
6772 #endif
6773 char dlgetmodinfo ();
6774 int
6775 main ()
6776 {
6777 return dlgetmodinfo ();
6778   ;
6779   return 0;
6780 }
6781 _ACEOF
6782 for ac_lib in '' dl xpdl; do
6783   if test -z "$ac_lib"; then
6784     ac_res="none required"
6785   else
6786     ac_res=-l$ac_lib
6787     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6788   fi
6789   if ac_fn_c_try_link "$LINENO"; then :
6790   ac_cv_search_dlgetmodinfo=$ac_res
6791 fi
6792 rm -f core conftest.err conftest.$ac_objext \
6793     conftest$ac_exeext
6794   if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6795   break
6796 fi
6797 done
6798 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6799
6800 else
6801   ac_cv_search_dlgetmodinfo=no
6802 fi
6803 rm conftest.$ac_ext
6804 LIBS=$ac_func_search_save_LIBS
6805 fi
6806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6807 $as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6808 ac_res=$ac_cv_search_dlgetmodinfo
6809 if test "$ac_res" != no; then :
6810   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6811
6812 fi
6813
6814
6815
6816
6817
6818 # Check whether --with-libiconv-prefix was given.
6819 if test "${with_libiconv_prefix+set}" = set; then :
6820   withval=$with_libiconv_prefix;
6821     for dir in `echo "$withval" | tr : ' '`; do
6822       if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6823       if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6824     done
6825
6826 fi
6827
6828
6829   BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6830   BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6831
6832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6833 $as_echo_n "checking for iconv... " >&6; }
6834 if test "${am_cv_func_iconv+set}" = set; then :
6835   $as_echo_n "(cached) " >&6
6836 else
6837
6838     am_cv_func_iconv="no, consider installing GNU libiconv"
6839     am_cv_lib_iconv=no
6840     am_cv_use_build_libiconv=no
6841     am_cv_build_libiconv_path=
6842
6843     # If libiconv is part of the build tree, then try using it over
6844     # any system iconv.
6845     if test -d ../libiconv; then
6846       for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6847         am_save_LIBS="$LIBS"
6848         am_save_CPPFLAGS="$CPPFLAGS"
6849         LIBS="$LIBS $lib_dir/libiconv.a"
6850         CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6851         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6852 /* end confdefs.h.  */
6853 #include <stdlib.h>
6854 #include <iconv.h>
6855 int
6856 main ()
6857 {
6858 iconv_t cd = iconv_open("","");
6859            iconv(cd,NULL,NULL,NULL,NULL);
6860            iconv_close(cd);
6861   ;
6862   return 0;
6863 }
6864 _ACEOF
6865 if ac_fn_c_try_link "$LINENO"; then :
6866   am_cv_use_build_libiconv=yes
6867           am_cv_build_libiconv_path=$lib_dir/libiconv.a
6868           am_cv_lib_iconv=yes
6869           am_cv_func_iconv=yes
6870 fi
6871 rm -f core conftest.err conftest.$ac_objext \
6872     conftest$ac_exeext conftest.$ac_ext
6873         LIBS="$am_save_LIBS"
6874         CPPFLAGS="$am_save_CPPFLAGS"
6875         if test "$am_cv_use_build_libiconv" = "yes"; then
6876           break
6877         fi
6878       done
6879     fi
6880
6881     # Next, try to find iconv in libc.
6882     if test "$am_cv_func_iconv" != yes; then
6883       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6884 /* end confdefs.h.  */
6885 #include <stdlib.h>
6886 #include <iconv.h>
6887 int
6888 main ()
6889 {
6890 iconv_t cd = iconv_open("","");
6891          iconv(cd,NULL,NULL,NULL,NULL);
6892          iconv_close(cd);
6893   ;
6894   return 0;
6895 }
6896 _ACEOF
6897 if ac_fn_c_try_link "$LINENO"; then :
6898   am_cv_func_iconv=yes
6899 fi
6900 rm -f core conftest.err conftest.$ac_objext \
6901     conftest$ac_exeext conftest.$ac_ext
6902     fi
6903
6904     # If iconv was not in libc, try -liconv.  In this case, arrange to
6905     # look in the libiconv prefix, if it was specified by the user.
6906     if test "$am_cv_func_iconv" != yes; then
6907       am_save_CPPFLAGS="$CPPFLAGS"
6908       am_save_LIBS="$LIBS"
6909       if test -n "$LIBICONV_INCLUDE"; then
6910         CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6911         LIBS="$LIBS $LIBICONV_LIBDIR"
6912       fi
6913       LIBS="$LIBS -liconv"
6914       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6915 /* end confdefs.h.  */
6916 #include <stdlib.h>
6917 #include <iconv.h>
6918 int
6919 main ()
6920 {
6921 iconv_t cd = iconv_open("","");
6922          iconv(cd,NULL,NULL,NULL,NULL);
6923          iconv_close(cd);
6924   ;
6925   return 0;
6926 }
6927 _ACEOF
6928 if ac_fn_c_try_link "$LINENO"; then :
6929   am_cv_lib_iconv=yes
6930         am_cv_func_iconv=yes
6931 fi
6932 rm -f core conftest.err conftest.$ac_objext \
6933     conftest$ac_exeext conftest.$ac_ext
6934       LIBS="$am_save_LIBS"
6935       CPPFLAGS="$am_save_CPPFLAGS"
6936     fi
6937
6938 fi
6939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6940 $as_echo "$am_cv_func_iconv" >&6; }
6941
6942   # Set the various flags based on the cache variables.  We can't rely
6943   # on the flags to remain set from the above code, due to caching.
6944   LIBICONV=
6945   if test "$am_cv_lib_iconv" = yes; then
6946     LIBICONV="-liconv"
6947   else
6948     LIBICONV_LIBDIR=
6949     LIBICONV_INCLUDE=
6950   fi
6951   if test "$am_cv_use_build_libiconv" = yes; then
6952     LIBICONV="$am_cv_build_libiconv_path"
6953     LIBICONV_LIBDIR=""
6954     LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6955   fi
6956   CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6957   LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
6958
6959   if test "$am_cv_func_iconv" = yes; then
6960
6961 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
6962
6963     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6964 $as_echo_n "checking for iconv declaration... " >&6; }
6965     if test "${am_cv_proto_iconv+set}" = set; then :
6966   $as_echo_n "(cached) " >&6
6967 else
6968
6969       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6970 /* end confdefs.h.  */
6971
6972 #include <stdlib.h>
6973 #include <iconv.h>
6974 extern
6975 #ifdef __cplusplus
6976 "C"
6977 #endif
6978 #if defined(__STDC__) || defined(__cplusplus)
6979 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6980 #else
6981 size_t iconv();
6982 #endif
6983
6984 int
6985 main ()
6986 {
6987
6988   ;
6989   return 0;
6990 }
6991 _ACEOF
6992 if ac_fn_c_try_compile "$LINENO"; then :
6993   am_cv_proto_iconv_arg1=""
6994 else
6995   am_cv_proto_iconv_arg1="const"
6996 fi
6997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6998       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);"
6999 fi
7000
7001     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
7002     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
7003          }$am_cv_proto_iconv" >&5
7004 $as_echo "${ac_t:-
7005          }$am_cv_proto_iconv" >&6; }
7006
7007 cat >>confdefs.h <<_ACEOF
7008 #define ICONV_CONST $am_cv_proto_iconv_arg1
7009 _ACEOF
7010
7011   fi
7012
7013
7014 # GDB may fork/exec the iconv program to get the list of supported character
7015 # sets.  Allow the user to specify where to find it.
7016 # There are several factors affecting the choice of option name:
7017 # - There is already --with-libiconv-prefix but we can't use it, it specifies
7018 #   the build-time location of libiconv files.
7019 # - The program we need to find is iconv, which comes with glibc.  The user
7020 #   doesn't necessarily have libiconv installed.  Therefore naming this
7021 #   --with-libiconv-foo feels wrong.
7022 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7023 #   defined to work on directories not files (though it really doesn't know
7024 #   the difference).
7025 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
7026 #   with --with-libiconv-prefix.
7027 # Putting these together is why the option name is --with-iconv-bin.
7028
7029
7030 # Check whether --with-iconv-bin was given.
7031 if test "${with_iconv_bin+set}" = set; then :
7032   withval=$with_iconv_bin; iconv_bin="${withval}"
7033
7034 cat >>confdefs.h <<_ACEOF
7035 #define ICONV_BIN "${iconv_bin}"
7036 _ACEOF
7037
7038
7039   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7040      if test "x$prefix" = xNONE; then
7041         test_prefix=/usr/local
7042      else
7043         test_prefix=$prefix
7044      fi
7045   else
7046      test_prefix=$exec_prefix
7047   fi
7048   value=0
7049   case ${iconv_bin} in
7050      "${test_prefix}"|"${test_prefix}/"*|\
7051         '${exec_prefix}'|'${exec_prefix}/'*)
7052      value=1
7053      ;;
7054   esac
7055
7056 cat >>confdefs.h <<_ACEOF
7057 #define ICONV_BIN_RELOCATABLE $value
7058 _ACEOF
7059
7060
7061
7062 fi
7063
7064
7065 # On alpha-osf, it appears that libtermcap and libcurses are not compatible.
7066 # There is a very specific comment in /usr/include/curses.h explaining that
7067 # termcap routines built into libcurses must not be used.
7068 #
7069 # The symptoms we observed so far is GDB unexpectedly changing
7070 # the terminal settings when tgetent is called - this is particularly
7071 # visible as the output is missing carriage returns, and so rapidly
7072 # becomes very hard to read.
7073 #
7074 # The readline configure script has already decided that libtermcap
7075 # was enough for its purposes, and so decided to build readline using
7076 # libtermcap.  Since the TUI mode requires curses, building GDB with
7077 # TUI enabled results in both libraries to be used at the same time,
7078 # which is not allowed.  This basically means that GDB with TUI is
7079 # broken on alpha-osf.
7080
7081 case $host_os in
7082   osf* )
7083     if test x"$enable_tui" = xyes; then
7084       as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
7085     fi
7086     if test x"$enable_tui" = xauto; then
7087       enable_tui=no
7088     fi
7089     ;;
7090 esac
7091
7092 # For the TUI, we need enhanced curses functionality.
7093 if test x"$enable_tui" != xno; then
7094   prefer_curses=yes
7095 fi
7096
7097 curses_found=no
7098 if test x"$prefer_curses" = xyes; then
7099   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7100   # curses library because the latter might not provide all the
7101   # functionality we need.  However, this leads to problems on systems
7102   # where the linker searches /usr/local/lib, but the compiler doesn't
7103   # search /usr/local/include, if ncurses is installed in /usr/local.  A
7104   # default installation of ncurses on alpha*-dec-osf* will lead to such
7105   # a situation.
7106   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7107 $as_echo_n "checking for library containing waddstr... " >&6; }
7108 if test "${ac_cv_search_waddstr+set}" = set; then :
7109   $as_echo_n "(cached) " >&6
7110 else
7111   ac_func_search_save_LIBS=$LIBS
7112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7113 /* end confdefs.h.  */
7114
7115 /* Override any GCC internal prototype to avoid an error.
7116    Use char because int might match the return type of a GCC
7117    builtin and then its argument prototype would still apply.  */
7118 #ifdef __cplusplus
7119 extern "C"
7120 #endif
7121 char waddstr ();
7122 int
7123 main ()
7124 {
7125 return waddstr ();
7126   ;
7127   return 0;
7128 }
7129 _ACEOF
7130 for ac_lib in '' ncurses cursesX curses; do
7131   if test -z "$ac_lib"; then
7132     ac_res="none required"
7133   else
7134     ac_res=-l$ac_lib
7135     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7136   fi
7137   if ac_fn_c_try_link "$LINENO"; then :
7138   ac_cv_search_waddstr=$ac_res
7139 fi
7140 rm -f core conftest.err conftest.$ac_objext \
7141     conftest$ac_exeext
7142   if test "${ac_cv_search_waddstr+set}" = set; then :
7143   break
7144 fi
7145 done
7146 if test "${ac_cv_search_waddstr+set}" = set; then :
7147
7148 else
7149   ac_cv_search_waddstr=no
7150 fi
7151 rm conftest.$ac_ext
7152 LIBS=$ac_func_search_save_LIBS
7153 fi
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7155 $as_echo "$ac_cv_search_waddstr" >&6; }
7156 ac_res=$ac_cv_search_waddstr
7157 if test "$ac_res" != no; then :
7158   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7159
7160 fi
7161
7162
7163   if test "$ac_cv_search_waddstr" != no; then
7164     curses_found=yes
7165   fi
7166 fi
7167
7168 # Check whether we should enable the TUI, but only do so if we really
7169 # can.
7170 if test x"$enable_tui" != xno; then
7171   if test -d $srcdir/tui; then
7172     if test "$curses_found" != no; then
7173       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7174       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7175       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7176       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
7177     else
7178       if test x"$enable_tui" = xyes; then
7179         as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
7180       else
7181         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7182 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
7183       fi
7184     fi
7185   fi
7186 fi
7187
7188 # Since GDB uses Readline, we need termcap functionality.  In many
7189 # cases this will be provided by the curses library, but some systems
7190 # have a seperate termcap library, or no curses library at all.
7191
7192 case $host_os in
7193   cygwin*)
7194     if test -d $srcdir/libtermcap; then
7195       LIBS="../libtermcap/libtermcap.a $LIBS"
7196       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7197     fi ;;
7198   go32* | *djgpp*)
7199     ac_cv_search_tgetent="none required"
7200     ;;
7201   *mingw32*)
7202     ac_cv_search_tgetent="none required"
7203     CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
7204     ;;
7205 esac
7206
7207 # These are the libraries checked by Readline.
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7209 $as_echo_n "checking for library containing tgetent... " >&6; }
7210 if test "${ac_cv_search_tgetent+set}" = set; then :
7211   $as_echo_n "(cached) " >&6
7212 else
7213   ac_func_search_save_LIBS=$LIBS
7214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7215 /* end confdefs.h.  */
7216
7217 /* Override any GCC internal prototype to avoid an error.
7218    Use char because int might match the return type of a GCC
7219    builtin and then its argument prototype would still apply.  */
7220 #ifdef __cplusplus
7221 extern "C"
7222 #endif
7223 char tgetent ();
7224 int
7225 main ()
7226 {
7227 return tgetent ();
7228   ;
7229   return 0;
7230 }
7231 _ACEOF
7232 for ac_lib in '' termcap tinfo curses ncurses; do
7233   if test -z "$ac_lib"; then
7234     ac_res="none required"
7235   else
7236     ac_res=-l$ac_lib
7237     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7238   fi
7239   if ac_fn_c_try_link "$LINENO"; then :
7240   ac_cv_search_tgetent=$ac_res
7241 fi
7242 rm -f core conftest.err conftest.$ac_objext \
7243     conftest$ac_exeext
7244   if test "${ac_cv_search_tgetent+set}" = set; then :
7245   break
7246 fi
7247 done
7248 if test "${ac_cv_search_tgetent+set}" = set; then :
7249
7250 else
7251   ac_cv_search_tgetent=no
7252 fi
7253 rm conftest.$ac_ext
7254 LIBS=$ac_func_search_save_LIBS
7255 fi
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7257 $as_echo "$ac_cv_search_tgetent" >&6; }
7258 ac_res=$ac_cv_search_tgetent
7259 if test "$ac_res" != no; then :
7260   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7261
7262 fi
7263
7264
7265 if test "$ac_cv_search_tgetent" = no; then
7266   as_fn_error "no termcap library found" "$LINENO" 5
7267 fi
7268
7269
7270 # Check whether --with-system-readline was given.
7271 if test "${with_system_readline+set}" = set; then :
7272   withval=$with_system_readline;
7273 fi
7274
7275
7276 if test "$with_system_readline" = yes; then
7277   READLINE=-lreadline
7278   READLINE_DEPS=
7279   READLINE_CFLAGS=
7280   READLINE_TEXI_INCFLAG=
7281 else
7282   READLINE='$(READLINE_DIR)/libreadline.a'
7283   READLINE_DEPS='$(READLINE)'
7284   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
7285   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
7286 fi
7287
7288
7289
7290
7291
7292 # Generate jit-reader.h
7293
7294 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7295 TARGET_PTR=
7296
7297 # The cast to long int works around a bug in the HP C Compiler
7298 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7299 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7300 # This bug is HP SR number 8606223364.
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7302 $as_echo_n "checking size of unsigned long long... " >&6; }
7303 if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7304   $as_echo_n "(cached) " >&6
7305 else
7306   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
7307
7308 else
7309   if test "$ac_cv_type_unsigned_long_long" = yes; then
7310      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7311 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7312 { as_fn_set_status 77
7313 as_fn_error "cannot compute sizeof (unsigned long long)
7314 See \`config.log' for more details." "$LINENO" 5; }; }
7315    else
7316      ac_cv_sizeof_unsigned_long_long=0
7317    fi
7318 fi
7319
7320 fi
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7322 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7323
7324
7325
7326 cat >>confdefs.h <<_ACEOF
7327 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7328 _ACEOF
7329
7330
7331 # The cast to long int works around a bug in the HP C Compiler
7332 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7333 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7334 # This bug is HP SR number 8606223364.
7335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7336 $as_echo_n "checking size of unsigned long... " >&6; }
7337 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7338   $as_echo_n "(cached) " >&6
7339 else
7340   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
7341
7342 else
7343   if test "$ac_cv_type_unsigned_long" = yes; then
7344      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7345 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7346 { as_fn_set_status 77
7347 as_fn_error "cannot compute sizeof (unsigned long)
7348 See \`config.log' for more details." "$LINENO" 5; }; }
7349    else
7350      ac_cv_sizeof_unsigned_long=0
7351    fi
7352 fi
7353
7354 fi
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7356 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7357
7358
7359
7360 cat >>confdefs.h <<_ACEOF
7361 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7362 _ACEOF
7363
7364
7365 # The cast to long int works around a bug in the HP C Compiler
7366 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7367 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7368 # This bug is HP SR number 8606223364.
7369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7370 $as_echo_n "checking size of unsigned __int128... " >&6; }
7371 if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7372   $as_echo_n "(cached) " >&6
7373 else
7374   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
7375
7376 else
7377   if test "$ac_cv_type_unsigned___int128" = yes; then
7378      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7379 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7380 { as_fn_set_status 77
7381 as_fn_error "cannot compute sizeof (unsigned __int128)
7382 See \`config.log' for more details." "$LINENO" 5; }; }
7383    else
7384      ac_cv_sizeof_unsigned___int128=0
7385    fi
7386 fi
7387
7388 fi
7389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7390 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7391
7392
7393
7394 cat >>confdefs.h <<_ACEOF
7395 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7396 _ACEOF
7397
7398
7399
7400 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7401   TARGET_PTR="unsigned long"
7402 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7403   TARGET_PTR="unsigned long long"
7404 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7405   TARGET_PTR="unsigned __int128"
7406 else
7407   TARGET_PTR="unsigned long"
7408 fi
7409
7410
7411 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7412
7413
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7415 $as_echo_n "checking for library containing dlopen... " >&6; }
7416 if test "${ac_cv_search_dlopen+set}" = set; then :
7417   $as_echo_n "(cached) " >&6
7418 else
7419   ac_func_search_save_LIBS=$LIBS
7420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7421 /* end confdefs.h.  */
7422
7423 /* Override any GCC internal prototype to avoid an error.
7424    Use char because int might match the return type of a GCC
7425    builtin and then its argument prototype would still apply.  */
7426 #ifdef __cplusplus
7427 extern "C"
7428 #endif
7429 char dlopen ();
7430 int
7431 main ()
7432 {
7433 return dlopen ();
7434   ;
7435   return 0;
7436 }
7437 _ACEOF
7438 for ac_lib in '' dl; do
7439   if test -z "$ac_lib"; then
7440     ac_res="none required"
7441   else
7442     ac_res=-l$ac_lib
7443     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7444   fi
7445   if ac_fn_c_try_link "$LINENO"; then :
7446   ac_cv_search_dlopen=$ac_res
7447 fi
7448 rm -f core conftest.err conftest.$ac_objext \
7449     conftest$ac_exeext
7450   if test "${ac_cv_search_dlopen+set}" = set; then :
7451   break
7452 fi
7453 done
7454 if test "${ac_cv_search_dlopen+set}" = set; then :
7455
7456 else
7457   ac_cv_search_dlopen=no
7458 fi
7459 rm conftest.$ac_ext
7460 LIBS=$ac_func_search_save_LIBS
7461 fi
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7463 $as_echo "$ac_cv_search_dlopen" >&6; }
7464 ac_res=$ac_cv_search_dlopen
7465 if test "$ac_res" != no; then :
7466   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7467
7468 fi
7469
7470
7471
7472
7473 # Check whether --with-jit-reader-dir was given.
7474 if test "${with_jit_reader_dir+set}" = set; then :
7475   withval=$with_jit_reader_dir;
7476     JIT_READER_DIR=$withval
7477 else
7478   JIT_READER_DIR=${libdir}/gdb
7479 fi
7480
7481
7482   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7483   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7484   ac_define_dir=`eval echo $JIT_READER_DIR`
7485   ac_define_dir=`eval echo $ac_define_dir`
7486
7487 cat >>confdefs.h <<_ACEOF
7488 #define JIT_READER_DIR "$ac_define_dir"
7489 _ACEOF
7490
7491
7492
7493
7494   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7495      if test "x$prefix" = xNONE; then
7496         test_prefix=/usr/local
7497      else
7498         test_prefix=$prefix
7499      fi
7500   else
7501      test_prefix=$exec_prefix
7502   fi
7503   value=0
7504   case ${ac_define_dir} in
7505      "${test_prefix}"|"${test_prefix}/"*|\
7506         '${exec_prefix}'|'${exec_prefix}/'*)
7507      value=1
7508      ;;
7509   esac
7510
7511 cat >>confdefs.h <<_ACEOF
7512 #define JIT_READER_DIR_RELOCATABLE $value
7513 _ACEOF
7514
7515
7516
7517
7518
7519 # Check whether --with-expat was given.
7520 if test "${with_expat+set}" = set; then :
7521   withval=$with_expat;
7522 else
7523   with_expat=auto
7524 fi
7525
7526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7527 $as_echo_n "checking whether to use expat... " >&6; }
7528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7529 $as_echo "$with_expat" >&6; }
7530
7531 if test "${with_expat}" = no; then
7532   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7533 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
7534   HAVE_LIBEXPAT=no
7535 else
7536
7537       if test "X$prefix" = "XNONE"; then
7538     acl_final_prefix="$ac_default_prefix"
7539   else
7540     acl_final_prefix="$prefix"
7541   fi
7542   if test "X$exec_prefix" = "XNONE"; then
7543     acl_final_exec_prefix='${prefix}'
7544   else
7545     acl_final_exec_prefix="$exec_prefix"
7546   fi
7547   acl_save_prefix="$prefix"
7548   prefix="$acl_final_prefix"
7549   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7550   prefix="$acl_save_prefix"
7551
7552
7553 # Check whether --with-gnu-ld was given.
7554 if test "${with_gnu_ld+set}" = set; then :
7555   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7556 else
7557   with_gnu_ld=no
7558 fi
7559
7560 # Prepare PATH_SEPARATOR.
7561 # The user is always right.
7562 if test "${PATH_SEPARATOR+set}" != set; then
7563   echo "#! /bin/sh" >conf$$.sh
7564   echo  "exit 0"   >>conf$$.sh
7565   chmod +x conf$$.sh
7566   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7567     PATH_SEPARATOR=';'
7568   else
7569     PATH_SEPARATOR=:
7570   fi
7571   rm -f conf$$.sh
7572 fi
7573 ac_prog=ld
7574 if test "$GCC" = yes; then
7575   # Check if gcc -print-prog-name=ld gives a path.
7576   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7577 $as_echo_n "checking for ld used by GCC... " >&6; }
7578   case $host in
7579   *-*-mingw*)
7580     # gcc leaves a trailing carriage return which upsets mingw
7581     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7582   *)
7583     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7584   esac
7585   case $ac_prog in
7586     # Accept absolute paths.
7587     [\\/]* | [A-Za-z]:[\\/]*)
7588       re_direlt='/[^/][^/]*/\.\./'
7589       # Canonicalize the path of ld
7590       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7591       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7592         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7593       done
7594       test -z "$LD" && LD="$ac_prog"
7595       ;;
7596   "")
7597     # If it fails, then pretend we aren't using GCC.
7598     ac_prog=ld
7599     ;;
7600   *)
7601     # If it is relative, then search for the first ld in PATH.
7602     with_gnu_ld=unknown
7603     ;;
7604   esac
7605 elif test "$with_gnu_ld" = yes; then
7606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7607 $as_echo_n "checking for GNU ld... " >&6; }
7608 else
7609   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7610 $as_echo_n "checking for non-GNU ld... " >&6; }
7611 fi
7612 if test "${acl_cv_path_LD+set}" = set; then :
7613   $as_echo_n "(cached) " >&6
7614 else
7615   if test -z "$LD"; then
7616   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7617   for ac_dir in $PATH; do
7618     test -z "$ac_dir" && ac_dir=.
7619     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7620       acl_cv_path_LD="$ac_dir/$ac_prog"
7621       # Check to see if the program is GNU ld.  I'd rather use --version,
7622       # but apparently some GNU ld's only accept -v.
7623       # Break only if it was the GNU/non-GNU ld that we prefer.
7624       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7625         test "$with_gnu_ld" != no && break
7626       else
7627         test "$with_gnu_ld" != yes && break
7628       fi
7629     fi
7630   done
7631   IFS="$ac_save_ifs"
7632 else
7633   acl_cv_path_LD="$LD" # Let the user override the test with a path.
7634 fi
7635 fi
7636
7637 LD="$acl_cv_path_LD"
7638 if test -n "$LD"; then
7639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7640 $as_echo "$LD" >&6; }
7641 else
7642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7643 $as_echo "no" >&6; }
7644 fi
7645 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7647 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7648 if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7649   $as_echo_n "(cached) " >&6
7650 else
7651   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7652 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7653   acl_cv_prog_gnu_ld=yes
7654 else
7655   acl_cv_prog_gnu_ld=no
7656 fi
7657 fi
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7659 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
7660 with_gnu_ld=$acl_cv_prog_gnu_ld
7661
7662
7663
7664                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7665 $as_echo_n "checking for shared library run path origin... " >&6; }
7666 if test "${acl_cv_rpath+set}" = set; then :
7667   $as_echo_n "(cached) " >&6
7668 else
7669
7670     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7671     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7672     . ./conftest.sh
7673     rm -f ./conftest.sh
7674     acl_cv_rpath=done
7675
7676 fi
7677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7678 $as_echo "$acl_cv_rpath" >&6; }
7679   wl="$acl_cv_wl"
7680   libext="$acl_cv_libext"
7681   shlibext="$acl_cv_shlibext"
7682   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7683   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7684   hardcode_direct="$acl_cv_hardcode_direct"
7685   hardcode_minus_L="$acl_cv_hardcode_minus_L"
7686     # Check whether --enable-rpath was given.
7687 if test "${enable_rpath+set}" = set; then :
7688   enableval=$enable_rpath; :
7689 else
7690   enable_rpath=yes
7691 fi
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702     use_additional=yes
7703
7704   acl_save_prefix="$prefix"
7705   prefix="$acl_final_prefix"
7706   acl_save_exec_prefix="$exec_prefix"
7707   exec_prefix="$acl_final_exec_prefix"
7708
7709     eval additional_includedir=\"$includedir\"
7710     eval additional_libdir=\"$libdir\"
7711
7712   exec_prefix="$acl_save_exec_prefix"
7713   prefix="$acl_save_prefix"
7714
7715
7716 # Check whether --with-libexpat-prefix was given.
7717 if test "${with_libexpat_prefix+set}" = set; then :
7718   withval=$with_libexpat_prefix;
7719     if test "X$withval" = "Xno"; then
7720       use_additional=no
7721     else
7722       if test "X$withval" = "X"; then
7723
7724   acl_save_prefix="$prefix"
7725   prefix="$acl_final_prefix"
7726   acl_save_exec_prefix="$exec_prefix"
7727   exec_prefix="$acl_final_exec_prefix"
7728
7729           eval additional_includedir=\"$includedir\"
7730           eval additional_libdir=\"$libdir\"
7731
7732   exec_prefix="$acl_save_exec_prefix"
7733   prefix="$acl_save_prefix"
7734
7735       else
7736         additional_includedir="$withval/include"
7737         additional_libdir="$withval/lib"
7738       fi
7739     fi
7740
7741 fi
7742
7743       LIBEXPAT=
7744   LTLIBEXPAT=
7745   INCEXPAT=
7746   rpathdirs=
7747   ltrpathdirs=
7748   names_already_handled=
7749   names_next_round='expat '
7750   while test -n "$names_next_round"; do
7751     names_this_round="$names_next_round"
7752     names_next_round=
7753     for name in $names_this_round; do
7754       already_handled=
7755       for n in $names_already_handled; do
7756         if test "$n" = "$name"; then
7757           already_handled=yes
7758           break
7759         fi
7760       done
7761       if test -z "$already_handled"; then
7762         names_already_handled="$names_already_handled $name"
7763                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7764         eval value=\"\$HAVE_LIB$uppername\"
7765         if test -n "$value"; then
7766           if test "$value" = yes; then
7767             eval value=\"\$LIB$uppername\"
7768             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7769             eval value=\"\$LTLIB$uppername\"
7770             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7771           else
7772                                     :
7773           fi
7774         else
7775                               found_dir=
7776           found_la=
7777           found_so=
7778           found_a=
7779           if test $use_additional = yes; then
7780             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7781               found_dir="$additional_libdir"
7782               found_so="$additional_libdir/lib$name.$shlibext"
7783               if test -f "$additional_libdir/lib$name.la"; then
7784                 found_la="$additional_libdir/lib$name.la"
7785               fi
7786             else
7787               if test -f "$additional_libdir/lib$name.$libext"; then
7788                 found_dir="$additional_libdir"
7789                 found_a="$additional_libdir/lib$name.$libext"
7790                 if test -f "$additional_libdir/lib$name.la"; then
7791                   found_la="$additional_libdir/lib$name.la"
7792                 fi
7793               fi
7794             fi
7795           fi
7796           if test "X$found_dir" = "X"; then
7797             for x in $LDFLAGS $LTLIBEXPAT; do
7798
7799   acl_save_prefix="$prefix"
7800   prefix="$acl_final_prefix"
7801   acl_save_exec_prefix="$exec_prefix"
7802   exec_prefix="$acl_final_exec_prefix"
7803   eval x=\"$x\"
7804   exec_prefix="$acl_save_exec_prefix"
7805   prefix="$acl_save_prefix"
7806
7807               case "$x" in
7808                 -L*)
7809                   dir=`echo "X$x" | sed -e 's/^X-L//'`
7810                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7811                     found_dir="$dir"
7812                     found_so="$dir/lib$name.$shlibext"
7813                     if test -f "$dir/lib$name.la"; then
7814                       found_la="$dir/lib$name.la"
7815                     fi
7816                   else
7817                     if test -f "$dir/lib$name.$libext"; then
7818                       found_dir="$dir"
7819                       found_a="$dir/lib$name.$libext"
7820                       if test -f "$dir/lib$name.la"; then
7821                         found_la="$dir/lib$name.la"
7822                       fi
7823                     fi
7824                   fi
7825                   ;;
7826               esac
7827               if test "X$found_dir" != "X"; then
7828                 break
7829               fi
7830             done
7831           fi
7832           if test "X$found_dir" != "X"; then
7833                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7834             if test "X$found_so" != "X"; then
7835                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7836                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7837               else
7838                                                                                 haveit=
7839                 for x in $ltrpathdirs; do
7840                   if test "X$x" = "X$found_dir"; then
7841                     haveit=yes
7842                     break
7843                   fi
7844                 done
7845                 if test -z "$haveit"; then
7846                   ltrpathdirs="$ltrpathdirs $found_dir"
7847                 fi
7848                                 if test "$hardcode_direct" = yes; then
7849                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7850                 else
7851                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7852                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7853                                                             haveit=
7854                     for x in $rpathdirs; do
7855                       if test "X$x" = "X$found_dir"; then
7856                         haveit=yes
7857                         break
7858                       fi
7859                     done
7860                     if test -z "$haveit"; then
7861                       rpathdirs="$rpathdirs $found_dir"
7862                     fi
7863                   else
7864                                                                                 haveit=
7865                     for x in $LDFLAGS $LIBEXPAT; do
7866
7867   acl_save_prefix="$prefix"
7868   prefix="$acl_final_prefix"
7869   acl_save_exec_prefix="$exec_prefix"
7870   exec_prefix="$acl_final_exec_prefix"
7871   eval x=\"$x\"
7872   exec_prefix="$acl_save_exec_prefix"
7873   prefix="$acl_save_prefix"
7874
7875                       if test "X$x" = "X-L$found_dir"; then
7876                         haveit=yes
7877                         break
7878                       fi
7879                     done
7880                     if test -z "$haveit"; then
7881                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7882                     fi
7883                     if test "$hardcode_minus_L" != no; then
7884                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7885                     else
7886                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7887                     fi
7888                   fi
7889                 fi
7890               fi
7891             else
7892               if test "X$found_a" != "X"; then
7893                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7894               else
7895                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7896               fi
7897             fi
7898                         additional_includedir=
7899             case "$found_dir" in
7900               */lib | */lib/)
7901                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7902                 additional_includedir="$basedir/include"
7903                 ;;
7904             esac
7905             if test "X$additional_includedir" != "X"; then
7906                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
7907                 haveit=
7908                 if test "X$additional_includedir" = "X/usr/local/include"; then
7909                   if test -n "$GCC"; then
7910                     case $host_os in
7911                       linux*) haveit=yes;;
7912                     esac
7913                   fi
7914                 fi
7915                 if test -z "$haveit"; then
7916                   for x in $CPPFLAGS $INCEXPAT; do
7917
7918   acl_save_prefix="$prefix"
7919   prefix="$acl_final_prefix"
7920   acl_save_exec_prefix="$exec_prefix"
7921   exec_prefix="$acl_final_exec_prefix"
7922   eval x=\"$x\"
7923   exec_prefix="$acl_save_exec_prefix"
7924   prefix="$acl_save_prefix"
7925
7926                     if test "X$x" = "X-I$additional_includedir"; then
7927                       haveit=yes
7928                       break
7929                     fi
7930                   done
7931                   if test -z "$haveit"; then
7932                     if test -d "$additional_includedir"; then
7933                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7934                     fi
7935                   fi
7936                 fi
7937               fi
7938             fi
7939                         if test -n "$found_la"; then
7940                                                         save_libdir="$libdir"
7941               case "$found_la" in
7942                 */* | *\\*) . "$found_la" ;;
7943                 *) . "./$found_la" ;;
7944               esac
7945               libdir="$save_libdir"
7946                             for dep in $dependency_libs; do
7947                 case "$dep" in
7948                   -L*)
7949                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7950                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
7951                       haveit=
7952                       if test "X$additional_libdir" = "X/usr/local/lib"; then
7953                         if test -n "$GCC"; then
7954                           case $host_os in
7955                             linux*) haveit=yes;;
7956                           esac
7957                         fi
7958                       fi
7959                       if test -z "$haveit"; then
7960                         haveit=
7961                         for x in $LDFLAGS $LIBEXPAT; do
7962
7963   acl_save_prefix="$prefix"
7964   prefix="$acl_final_prefix"
7965   acl_save_exec_prefix="$exec_prefix"
7966   exec_prefix="$acl_final_exec_prefix"
7967   eval x=\"$x\"
7968   exec_prefix="$acl_save_exec_prefix"
7969   prefix="$acl_save_prefix"
7970
7971                           if test "X$x" = "X-L$additional_libdir"; then
7972                             haveit=yes
7973                             break
7974                           fi
7975                         done
7976                         if test -z "$haveit"; then
7977                           if test -d "$additional_libdir"; then
7978                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7979                           fi
7980                         fi
7981                         haveit=
7982                         for x in $LDFLAGS $LTLIBEXPAT; do
7983
7984   acl_save_prefix="$prefix"
7985   prefix="$acl_final_prefix"
7986   acl_save_exec_prefix="$exec_prefix"
7987   exec_prefix="$acl_final_exec_prefix"
7988   eval x=\"$x\"
7989   exec_prefix="$acl_save_exec_prefix"
7990   prefix="$acl_save_prefix"
7991
7992                           if test "X$x" = "X-L$additional_libdir"; then
7993                             haveit=yes
7994                             break
7995                           fi
7996                         done
7997                         if test -z "$haveit"; then
7998                           if test -d "$additional_libdir"; then
7999                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8000                           fi
8001                         fi
8002                       fi
8003                     fi
8004                     ;;
8005                   -R*)
8006                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
8007                     if test "$enable_rpath" != no; then
8008                                                                   haveit=
8009                       for x in $rpathdirs; do
8010                         if test "X$x" = "X$dir"; then
8011                           haveit=yes
8012                           break
8013                         fi
8014                       done
8015                       if test -z "$haveit"; then
8016                         rpathdirs="$rpathdirs $dir"
8017                       fi
8018                                                                   haveit=
8019                       for x in $ltrpathdirs; do
8020                         if test "X$x" = "X$dir"; then
8021                           haveit=yes
8022                           break
8023                         fi
8024                       done
8025                       if test -z "$haveit"; then
8026                         ltrpathdirs="$ltrpathdirs $dir"
8027                       fi
8028                     fi
8029                     ;;
8030                   -l*)
8031                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8032                     ;;
8033                   *.la)
8034                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8035                     ;;
8036                   *)
8037                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8038                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8039                     ;;
8040                 esac
8041               done
8042             fi
8043           else
8044                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8045             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8046           fi
8047         fi
8048       fi
8049     done
8050   done
8051   if test "X$rpathdirs" != "X"; then
8052     if test -n "$hardcode_libdir_separator"; then
8053                         alldirs=
8054       for found_dir in $rpathdirs; do
8055         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8056       done
8057             acl_save_libdir="$libdir"
8058       libdir="$alldirs"
8059       eval flag=\"$hardcode_libdir_flag_spec\"
8060       libdir="$acl_save_libdir"
8061       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8062     else
8063             for found_dir in $rpathdirs; do
8064         acl_save_libdir="$libdir"
8065         libdir="$found_dir"
8066         eval flag=\"$hardcode_libdir_flag_spec\"
8067         libdir="$acl_save_libdir"
8068         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8069       done
8070     fi
8071   fi
8072   if test "X$ltrpathdirs" != "X"; then
8073             for found_dir in $ltrpathdirs; do
8074       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8075     done
8076   fi
8077
8078
8079         ac_save_CPPFLAGS="$CPPFLAGS"
8080
8081   for element in $INCEXPAT; do
8082     haveit=
8083     for x in $CPPFLAGS; do
8084
8085   acl_save_prefix="$prefix"
8086   prefix="$acl_final_prefix"
8087   acl_save_exec_prefix="$exec_prefix"
8088   exec_prefix="$acl_final_exec_prefix"
8089   eval x=\"$x\"
8090   exec_prefix="$acl_save_exec_prefix"
8091   prefix="$acl_save_prefix"
8092
8093       if test "X$x" = "X$element"; then
8094         haveit=yes
8095         break
8096       fi
8097     done
8098     if test -z "$haveit"; then
8099       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8100     fi
8101   done
8102
8103
8104   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8105 $as_echo_n "checking for libexpat... " >&6; }
8106 if test "${ac_cv_libexpat+set}" = set; then :
8107   $as_echo_n "(cached) " >&6
8108 else
8109
8110     ac_save_LIBS="$LIBS"
8111     LIBS="$LIBS $LIBEXPAT"
8112     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8113 /* end confdefs.h.  */
8114 #include "expat.h"
8115 int
8116 main ()
8117 {
8118 XML_Parser p = XML_ParserCreate (0);
8119   ;
8120   return 0;
8121 }
8122 _ACEOF
8123 if ac_fn_c_try_link "$LINENO"; then :
8124   ac_cv_libexpat=yes
8125 else
8126   ac_cv_libexpat=no
8127 fi
8128 rm -f core conftest.err conftest.$ac_objext \
8129     conftest$ac_exeext conftest.$ac_ext
8130     LIBS="$ac_save_LIBS"
8131
8132 fi
8133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8134 $as_echo "$ac_cv_libexpat" >&6; }
8135   if test "$ac_cv_libexpat" = yes; then
8136     HAVE_LIBEXPAT=yes
8137
8138 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
8139
8140     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8141 $as_echo_n "checking how to link with libexpat... " >&6; }
8142     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8143 $as_echo "$LIBEXPAT" >&6; }
8144   else
8145     HAVE_LIBEXPAT=no
8146             CPPFLAGS="$ac_save_CPPFLAGS"
8147     LIBEXPAT=
8148     LTLIBEXPAT=
8149   fi
8150
8151
8152
8153
8154
8155
8156   if test "$HAVE_LIBEXPAT" != yes; then
8157     if test "$with_expat" = yes; then
8158       as_fn_error "expat is missing or unusable" "$LINENO" 5
8159     else
8160       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8161 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8162     fi
8163   else
8164     save_LIBS=$LIBS
8165     LIBS="$LIBS $LIBEXPAT"
8166     for ac_func in XML_StopParser
8167 do :
8168   ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8169 if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
8170   cat >>confdefs.h <<_ACEOF
8171 #define HAVE_XML_STOPPARSER 1
8172 _ACEOF
8173
8174 fi
8175 done
8176
8177     LIBS=$save_LIBS
8178   fi
8179 fi
8180
8181 # --------------------- #
8182 # Check for libpython.  #
8183 # --------------------- #
8184
8185
8186
8187
8188
8189
8190 # Check whether --with-python was given.
8191 if test "${with_python+set}" = set; then :
8192   withval=$with_python;
8193 else
8194   with_python=auto
8195 fi
8196
8197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8198 $as_echo_n "checking whether to use python... " >&6; }
8199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8200 $as_echo "$with_python" >&6; }
8201
8202 if test "${with_python}" = no; then
8203   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8204 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8205   have_libpython=no
8206 else
8207   case "${with_python}" in
8208   [\\/]* | ?:[\\/]*)
8209     if test -d ${with_python}; then
8210       # Assume the python binary is ${with_python}/bin/python.
8211       python_prog="${with_python}/bin/python"
8212       python_prefix=
8213       # If python does not exit ${with_python}/bin, then try in
8214       # ${with_python}.  On Windows/MinGW, this is where the Python
8215       # executable is.
8216       if test ! -x "${python_prog}"; then
8217         python_prog="${with_python}/python"
8218         python_prefix=
8219       fi
8220       if test ! -x "${python_prog}"; then
8221         # Fall back to gdb 7.0/7.1 behaviour.
8222         python_prog=missing
8223         python_prefix=${with_python}
8224       fi
8225     elif test -x "${with_python}"; then
8226       # While we can't run python compiled for $host (unless host == build),
8227       # the user could write a script that provides the needed information,
8228       # so we support that.
8229       python_prog=${with_python}
8230       python_prefix=
8231     else
8232       as_fn_error "invalid value for --with-python" "$LINENO" 5
8233     fi
8234     ;;
8235   */*)
8236     # Disallow --with-python=foo/bar.
8237     as_fn_error "invalid value for --with-python" "$LINENO" 5
8238     ;;
8239   *)
8240     # The user has either specified auto, yes, or the name of the python
8241     # program assumed to be in $PATH.
8242     python_prefix=
8243     case "${with_python}" in
8244     yes | auto)
8245       if test ${build} = ${host}; then
8246         # Extract the first word of "python", so it can be a program name with args.
8247 set dummy python; ac_word=$2
8248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8249 $as_echo_n "checking for $ac_word... " >&6; }
8250 if test "${ac_cv_path_python_prog_path+set}" = set; then :
8251   $as_echo_n "(cached) " >&6
8252 else
8253   case $python_prog_path in
8254   [\\/]* | ?:[\\/]*)
8255   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8256   ;;
8257   *)
8258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8259 for as_dir in $PATH
8260 do
8261   IFS=$as_save_IFS
8262   test -z "$as_dir" && as_dir=.
8263     for ac_exec_ext in '' $ac_executable_extensions; do
8264   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8265     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8267     break 2
8268   fi
8269 done
8270   done
8271 IFS=$as_save_IFS
8272
8273   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8274   ;;
8275 esac
8276 fi
8277 python_prog_path=$ac_cv_path_python_prog_path
8278 if test -n "$python_prog_path"; then
8279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8280 $as_echo "$python_prog_path" >&6; }
8281 else
8282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8283 $as_echo "no" >&6; }
8284 fi
8285
8286
8287         if test "${python_prog_path}" = missing; then
8288           python_prog=missing
8289         else
8290           python_prog=${python_prog_path}
8291         fi
8292       else
8293         # Not much we can do except assume the cross-compiler will find the
8294         # right files.
8295         python_prog=missing
8296       fi
8297       ;;
8298     *)
8299       # While we can't run python compiled for $host (unless host == build),
8300       # the user could write a script that provides the needed information,
8301       # so we support that.
8302       python_prog="${with_python}"
8303       # Extract the first word of "${python_prog}", so it can be a program name with args.
8304 set dummy ${python_prog}; ac_word=$2
8305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8306 $as_echo_n "checking for $ac_word... " >&6; }
8307 if test "${ac_cv_path_python_prog_path+set}" = set; then :
8308   $as_echo_n "(cached) " >&6
8309 else
8310   case $python_prog_path in
8311   [\\/]* | ?:[\\/]*)
8312   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8313   ;;
8314   *)
8315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8316 for as_dir in $PATH
8317 do
8318   IFS=$as_save_IFS
8319   test -z "$as_dir" && as_dir=.
8320     for ac_exec_ext in '' $ac_executable_extensions; do
8321   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8322     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8324     break 2
8325   fi
8326 done
8327   done
8328 IFS=$as_save_IFS
8329
8330   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8331   ;;
8332 esac
8333 fi
8334 python_prog_path=$ac_cv_path_python_prog_path
8335 if test -n "$python_prog_path"; then
8336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8337 $as_echo "$python_prog_path" >&6; }
8338 else
8339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8340 $as_echo "no" >&6; }
8341 fi
8342
8343
8344       if test "${python_prog_path}" = missing; then
8345         as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8346       fi
8347       ;;
8348     esac
8349   esac
8350
8351   if test "${python_prog}" != missing; then
8352     # We have a python program to use, but it may be too old.
8353     # Don't flag an error for --with-python=auto (the default).
8354     have_python_config=yes
8355     python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8356     if test $? != 0; then
8357       have_python_config=failed
8358       if test "${with_python}" != auto; then
8359         as_fn_error "failure running python-config --includes" "$LINENO" 5
8360       fi
8361     fi
8362     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8363     if test $? != 0; then
8364       have_python_config=failed
8365       if test "${with_python}" != auto; then
8366         as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8367       fi
8368     fi
8369     python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8370     if test $? != 0; then
8371       have_python_config=failed
8372       if test "${with_python}" != auto; then
8373         as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8374       fi
8375     fi
8376   else
8377     # We do not have a python executable we can use to determine where
8378     # to find the Python headers and libs.  We cannot guess the include
8379     # path from the python_prefix either, because that include path
8380     # depends on the Python version.  So, there is nothing much we can
8381     # do except assume that the compiler will be able to find those files.
8382     python_includes=
8383     python_libs=
8384     have_python_config=no
8385   fi
8386
8387   # If we have python-config, only try the configuration it provides.
8388   # Otherwise fallback on the old way of trying different versions of
8389   # python in turn.
8390
8391   have_libpython=no
8392   if test "${have_python_config}" = yes; then
8393     # Determine the Python version by extracting "-lpython<version>"
8394     # part of the python_libs. <version> is usually X.Y with X and Y
8395     # being decimal numbers, but can also be XY (seen on Windows).
8396     #
8397     # The extraction is performed using sed with a regular expression.
8398     # Initially, the regexp used was using the '?' quantifier to make
8399     # the dot in the version number optional.  Unfortunately, this
8400     # does not work with non-GNU versions of sed because, because of
8401     # what looks like a limitation (the '?' quantifier does not work
8402     # with back-references).  We work around this limitation by using
8403     # the '*' quantifier instead.  It means that, in theory, we might
8404     # match unexpected version strings such as "-lpython2..7", but
8405     # this seems unlikely in practice.  And even if that happens,
8406     # an error will be triggered later on, when checking that version
8407     # number.
8408     python_version=`echo " ${python_libs} " \
8409                          | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
8410     case "${python_version}" in
8411     python*)
8412
8413   version=${python_version}
8414
8415   new_CPPFLAGS=${python_includes}
8416   new_LIBS=${python_libs}
8417   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8418 $as_echo_n "checking for ${version}... " >&6; }
8419   save_CPPFLAGS=$CPPFLAGS
8420   save_LIBS=$LIBS
8421   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8422   LIBS="$LIBS $new_LIBS"
8423   found_usable_python=no
8424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8425 /* end confdefs.h.  */
8426 #include "Python.h"
8427 int
8428 main ()
8429 {
8430 Py_Initialize ();
8431   ;
8432   return 0;
8433 }
8434 _ACEOF
8435 if ac_fn_c_try_link "$LINENO"; then :
8436   have_libpython=${version}
8437                   found_usable_python=yes
8438                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8439                   PYTHON_LIBS=$new_LIBS
8440 fi
8441 rm -f core conftest.err conftest.$ac_objext \
8442     conftest$ac_exeext conftest.$ac_ext
8443   CPPFLAGS=$save_CPPFLAGS
8444   LIBS=$save_LIBS
8445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8446 $as_echo "${found_usable_python}" >&6; }
8447
8448       ;;
8449     *)
8450       as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
8451       ;;
8452     esac
8453   elif test "${have_python_config}" != failed; then
8454     if test "${have_libpython}" = no; then
8455
8456   version=python2.7
8457
8458   new_CPPFLAGS=${python_includes}
8459   new_LIBS="${python_libs} -lpython2.7"
8460   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8461 $as_echo_n "checking for ${version}... " >&6; }
8462   save_CPPFLAGS=$CPPFLAGS
8463   save_LIBS=$LIBS
8464   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8465   LIBS="$LIBS $new_LIBS"
8466   found_usable_python=no
8467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8468 /* end confdefs.h.  */
8469 #include "Python.h"
8470 int
8471 main ()
8472 {
8473 Py_Initialize ();
8474   ;
8475   return 0;
8476 }
8477 _ACEOF
8478 if ac_fn_c_try_link "$LINENO"; then :
8479   have_libpython=${version}
8480                   found_usable_python=yes
8481                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8482                   PYTHON_LIBS=$new_LIBS
8483 fi
8484 rm -f core conftest.err conftest.$ac_objext \
8485     conftest$ac_exeext conftest.$ac_ext
8486   CPPFLAGS=$save_CPPFLAGS
8487   LIBS=$save_LIBS
8488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8489 $as_echo "${found_usable_python}" >&6; }
8490
8491     fi
8492     if test "${have_libpython}" = no; then
8493
8494   version=python2.6
8495
8496   new_CPPFLAGS=${python_includes}
8497   new_LIBS="${python_libs} -lpython2.6"
8498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8499 $as_echo_n "checking for ${version}... " >&6; }
8500   save_CPPFLAGS=$CPPFLAGS
8501   save_LIBS=$LIBS
8502   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8503   LIBS="$LIBS $new_LIBS"
8504   found_usable_python=no
8505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8506 /* end confdefs.h.  */
8507 #include "Python.h"
8508 int
8509 main ()
8510 {
8511 Py_Initialize ();
8512   ;
8513   return 0;
8514 }
8515 _ACEOF
8516 if ac_fn_c_try_link "$LINENO"; then :
8517   have_libpython=${version}
8518                   found_usable_python=yes
8519                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8520                   PYTHON_LIBS=$new_LIBS
8521 fi
8522 rm -f core conftest.err conftest.$ac_objext \
8523     conftest$ac_exeext conftest.$ac_ext
8524   CPPFLAGS=$save_CPPFLAGS
8525   LIBS=$save_LIBS
8526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8527 $as_echo "${found_usable_python}" >&6; }
8528
8529     fi
8530     if test ${have_libpython} = no; then
8531
8532   version=python2.5
8533
8534   new_CPPFLAGS=${python_includes}
8535   new_LIBS="${python_libs} -lpython2.5"
8536   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8537 $as_echo_n "checking for ${version}... " >&6; }
8538   save_CPPFLAGS=$CPPFLAGS
8539   save_LIBS=$LIBS
8540   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8541   LIBS="$LIBS $new_LIBS"
8542   found_usable_python=no
8543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8544 /* end confdefs.h.  */
8545 #include "Python.h"
8546 int
8547 main ()
8548 {
8549 Py_Initialize ();
8550   ;
8551   return 0;
8552 }
8553 _ACEOF
8554 if ac_fn_c_try_link "$LINENO"; then :
8555   have_libpython=${version}
8556                   found_usable_python=yes
8557                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8558                   PYTHON_LIBS=$new_LIBS
8559 fi
8560 rm -f core conftest.err conftest.$ac_objext \
8561     conftest$ac_exeext conftest.$ac_ext
8562   CPPFLAGS=$save_CPPFLAGS
8563   LIBS=$save_LIBS
8564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8565 $as_echo "${found_usable_python}" >&6; }
8566
8567     fi
8568     if test ${have_libpython} = no; then
8569
8570   version=python2.4
8571
8572   new_CPPFLAGS=${python_includes}
8573   new_LIBS="${python_libs} -lpython2.4"
8574   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8575 $as_echo_n "checking for ${version}... " >&6; }
8576   save_CPPFLAGS=$CPPFLAGS
8577   save_LIBS=$LIBS
8578   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8579   LIBS="$LIBS $new_LIBS"
8580   found_usable_python=no
8581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8582 /* end confdefs.h.  */
8583 #include "Python.h"
8584 int
8585 main ()
8586 {
8587 Py_Initialize ();
8588   ;
8589   return 0;
8590 }
8591 _ACEOF
8592 if ac_fn_c_try_link "$LINENO"; then :
8593   have_libpython=${version}
8594                   found_usable_python=yes
8595                   PYTHON_CPPFLAGS=$new_CPPFLAGS
8596                   PYTHON_LIBS=$new_LIBS
8597 fi
8598 rm -f core conftest.err conftest.$ac_objext \
8599     conftest$ac_exeext conftest.$ac_ext
8600   CPPFLAGS=$save_CPPFLAGS
8601   LIBS=$save_LIBS
8602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8603 $as_echo "${found_usable_python}" >&6; }
8604
8605     fi
8606   fi
8607   if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
8608
8609 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8610
8611   elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
8612
8613 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8614
8615   elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
8616
8617 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8618
8619   elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
8620
8621 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8622
8623   fi
8624
8625   if test "${have_libpython}" = no; then
8626     case "${with_python}" in
8627     yes)
8628       as_fn_error "python is missing or unusable" "$LINENO" 5
8629       ;;
8630     auto)
8631       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8632 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8633       ;;
8634     *)
8635       as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8636       ;;
8637     esac
8638   else
8639     if test -n "${python_prefix}"; then
8640
8641 cat >>confdefs.h <<_ACEOF
8642 #define WITH_PYTHON_PATH "${python_prefix}"
8643 _ACEOF
8644
8645
8646   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8647      if test "x$prefix" = xNONE; then
8648         test_prefix=/usr/local
8649      else
8650         test_prefix=$prefix
8651      fi
8652   else
8653      test_prefix=$exec_prefix
8654   fi
8655   value=0
8656   case ${python_prefix} in
8657      "${test_prefix}"|"${test_prefix}/"*|\
8658         '${exec_prefix}'|'${exec_prefix}/'*)
8659      value=1
8660      ;;
8661   esac
8662
8663 cat >>confdefs.h <<_ACEOF
8664 #define PYTHON_PATH_RELOCATABLE $value
8665 _ACEOF
8666
8667
8668     fi
8669   fi
8670 fi
8671
8672 if test "${have_libpython}" != no; then
8673
8674 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
8675
8676   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8677   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8678   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
8679   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
8680   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
8681
8682   # Flags needed to compile Python code (taken from python-config --cflags).
8683   # We cannot call python-config directly because it will output whatever was
8684   # used when compiling the Python interpreter itself, including flags which
8685   # would make the python-related objects be compiled differently from the
8686   # rest of GDB (e.g., -O2 and -fPIC).
8687   if test "${GCC}" = yes; then
8688     tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8689   fi
8690
8691   if test "x${tentative_python_cflags}" != x; then
8692     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8693 $as_echo_n "checking compiler flags for python code... " >&6; }
8694     for flag in ${tentative_python_cflags}; do
8695       # Check that the compiler accepts it
8696       saved_CFLAGS="$CFLAGS"
8697       CFLAGS="$CFLAGS $flag"
8698       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8699 /* end confdefs.h.  */
8700
8701 int
8702 main ()
8703 {
8704
8705   ;
8706   return 0;
8707 }
8708 _ACEOF
8709 if ac_fn_c_try_compile "$LINENO"; then :
8710   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
8711 fi
8712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8713       CFLAGS="$saved_CFLAGS"
8714     done
8715     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8716 $as_echo "${PYTHON_CFLAGS}" >&6; }
8717   fi
8718
8719   # On x64 Windows, Python's include headers, and pyconfig.h in
8720   # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8721   # version of Windows.  Unfortunately, MS_WIN64 is only defined if
8722   # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
8723   # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8724   # The issue was reported to the Python community, but still isn't
8725   # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8726
8727   case "$gdb_host" in
8728     mingw64)
8729            if test "${GCC}" = yes; then
8730              CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8731            fi
8732            ;;
8733   esac
8734
8735   # Note that "python -m threading" cannot be used to check for
8736   # threading support due to a bug in Python 2.7.3
8737   # (http://bugs.python.org/issue15567).
8738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8739 $as_echo_n "checking whether python supports threads... " >&6; }
8740   saved_CPPFLAGS="${CPPFLAGS}"
8741   CPPFLAGS="${PYTHON_CPPFLAGS}"
8742   # Note that the test is reversed so that python_has_threads=yes on
8743   # unexpected failures.
8744   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8745 /* end confdefs.h.  */
8746
8747 #include <Python.h>
8748 #ifdef WITH_THREAD
8749 # error
8750 #endif
8751
8752 _ACEOF
8753 if ac_fn_c_try_cpp "$LINENO"; then :
8754   python_has_threads=no
8755 else
8756   python_has_threads=yes
8757 fi
8758 rm -f conftest.err conftest.$ac_ext
8759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8760 $as_echo "${python_has_threads}" >&6; }
8761   CPPFLAGS="${saved_CPPFLAGS}"
8762 else
8763   # Even if Python support is not compiled in, we need to have this file
8764   # included so that the "python" command, et.al., still exists.
8765   CONFIG_OBS="$CONFIG_OBS python.o"
8766   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
8767 fi
8768
8769
8770
8771  if test "${have_libpython}" != no; then
8772   HAVE_PYTHON_TRUE=
8773   HAVE_PYTHON_FALSE='#'
8774 else
8775   HAVE_PYTHON_TRUE='#'
8776   HAVE_PYTHON_FALSE=
8777 fi
8778
8779
8780 # -------------------- #
8781 # Check for libguile.  #
8782 # -------------------- #
8783
8784
8785
8786
8787
8788
8789 # Check whether --with-guile was given.
8790 if test "${with_guile+set}" = set; then :
8791   withval=$with_guile;
8792 else
8793   with_guile=auto
8794 fi
8795
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
8797 $as_echo_n "checking whether to use guile... " >&6; }
8798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
8799 $as_echo "$with_guile" >&6; }
8800
8801 # Extract the first word of "pkg-config", so it can be a program name with args.
8802 set dummy pkg-config; ac_word=$2
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8804 $as_echo_n "checking for $ac_word... " >&6; }
8805 if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
8806   $as_echo_n "(cached) " >&6
8807 else
8808   case $pkg_config_prog_path in
8809   [\\/]* | ?:[\\/]*)
8810   ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
8811   ;;
8812   *)
8813   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8814 for as_dir in $PATH
8815 do
8816   IFS=$as_save_IFS
8817   test -z "$as_dir" && as_dir=.
8818     for ac_exec_ext in '' $ac_executable_extensions; do
8819   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8820     ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
8821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8822     break 2
8823   fi
8824 done
8825   done
8826 IFS=$as_save_IFS
8827
8828   test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
8829   ;;
8830 esac
8831 fi
8832 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
8833 if test -n "$pkg_config_prog_path"; then
8834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
8835 $as_echo "$pkg_config_prog_path" >&6; }
8836 else
8837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8838 $as_echo "no" >&6; }
8839 fi
8840
8841
8842
8843 try_guile_versions="guile-2.2 guile-2.0"
8844 have_libguile=no
8845 case "${with_guile}" in
8846 no)
8847   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
8848 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
8849   ;;
8850 auto)
8851   if test "${pkg_config_prog_path}" = "missing"; then
8852     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
8853 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
8854   else
8855
8856   pkg_config=${pkg_config_prog_path}
8857   guile_version_list=${try_guile_versions}
8858   flag_errors=no
8859
8860   found_usable_guile=checking
8861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8862 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8863   for guile_version in ${guile_version_list}; do
8864     ${pkg_config} --exists ${guile_version} 2>/dev/null
8865     if test $? != 0; then
8866       continue
8867     fi
8868             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8869     if test $? != 0; then
8870       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8871     fi
8872     new_LIBS=`${pkg_config} --libs ${guile_version}`
8873     if test $? != 0; then
8874       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8875     fi
8876         found_usable_guile=${guile_version}
8877     break
8878   done
8879   if test "${found_usable_guile}" = "checking"; then
8880     if test "${flag_errors}" = "yes"; then
8881       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8882     else
8883       found_usable_guile=no
8884     fi
8885   fi
8886       if test "${found_usable_guile}" != no; then
8887     save_CPPFLAGS=$CPPFLAGS
8888     save_LIBS=$LIBS
8889     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8890     LIBS="$LIBS $new_LIBS"
8891     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8892 /* end confdefs.h.  */
8893 #include "libguile.h"
8894 int
8895 main ()
8896 {
8897 scm_init_guile ();
8898   ;
8899   return 0;
8900 }
8901 _ACEOF
8902 if ac_fn_c_try_link "$LINENO"; then :
8903   have_libguile=yes
8904                     GUILE_CPPFLAGS=$new_CPPFLAGS
8905                     GUILE_LIBS=$new_LIBS
8906 else
8907   found_usable_guile=no
8908 fi
8909 rm -f core conftest.err conftest.$ac_objext \
8910     conftest$ac_exeext conftest.$ac_ext
8911     CPPFLAGS=$save_CPPFLAGS
8912     LIBS=$save_LIBS
8913     if test "${found_usable_guile}" = no; then
8914       if test "${flag_errors}" = yes; then
8915         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8916 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8917 as_fn_error "linking guile version ${guile_version} test program failed
8918 See \`config.log' for more details." "$LINENO" 5; }
8919       fi
8920     fi
8921   fi
8922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8923 $as_echo "${found_usable_guile}" >&6; }
8924
8925   fi
8926   ;;
8927 yes)
8928   if test "${pkg_config_prog_path}" = "missing"; then
8929     as_fn_error "pkg-config not found" "$LINENO" 5
8930   fi
8931
8932   pkg_config=${pkg_config_prog_path}
8933   guile_version_list=${try_guile_versions}
8934   flag_errors=yes
8935
8936   found_usable_guile=checking
8937   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8938 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8939   for guile_version in ${guile_version_list}; do
8940     ${pkg_config} --exists ${guile_version} 2>/dev/null
8941     if test $? != 0; then
8942       continue
8943     fi
8944             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8945     if test $? != 0; then
8946       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8947     fi
8948     new_LIBS=`${pkg_config} --libs ${guile_version}`
8949     if test $? != 0; then
8950       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8951     fi
8952         found_usable_guile=${guile_version}
8953     break
8954   done
8955   if test "${found_usable_guile}" = "checking"; then
8956     if test "${flag_errors}" = "yes"; then
8957       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8958     else
8959       found_usable_guile=no
8960     fi
8961   fi
8962       if test "${found_usable_guile}" != no; then
8963     save_CPPFLAGS=$CPPFLAGS
8964     save_LIBS=$LIBS
8965     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8966     LIBS="$LIBS $new_LIBS"
8967     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8968 /* end confdefs.h.  */
8969 #include "libguile.h"
8970 int
8971 main ()
8972 {
8973 scm_init_guile ();
8974   ;
8975   return 0;
8976 }
8977 _ACEOF
8978 if ac_fn_c_try_link "$LINENO"; then :
8979   have_libguile=yes
8980                     GUILE_CPPFLAGS=$new_CPPFLAGS
8981                     GUILE_LIBS=$new_LIBS
8982 else
8983   found_usable_guile=no
8984 fi
8985 rm -f core conftest.err conftest.$ac_objext \
8986     conftest$ac_exeext conftest.$ac_ext
8987     CPPFLAGS=$save_CPPFLAGS
8988     LIBS=$save_LIBS
8989     if test "${found_usable_guile}" = no; then
8990       if test "${flag_errors}" = yes; then
8991         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8992 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8993 as_fn_error "linking guile version ${guile_version} test program failed
8994 See \`config.log' for more details." "$LINENO" 5; }
8995       fi
8996     fi
8997   fi
8998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8999 $as_echo "${found_usable_guile}" >&6; }
9000
9001   ;;
9002 [\\/]* | ?:[\\/]*)
9003   if test -x "${with_guile}"; then
9004
9005   pkg_config=${with_guile}
9006   guile_version_list=${try_guile_versions}
9007   flag_errors=yes
9008
9009   found_usable_guile=checking
9010   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9011 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9012   for guile_version in ${guile_version_list}; do
9013     ${pkg_config} --exists ${guile_version} 2>/dev/null
9014     if test $? != 0; then
9015       continue
9016     fi
9017             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9018     if test $? != 0; then
9019       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9020     fi
9021     new_LIBS=`${pkg_config} --libs ${guile_version}`
9022     if test $? != 0; then
9023       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9024     fi
9025         found_usable_guile=${guile_version}
9026     break
9027   done
9028   if test "${found_usable_guile}" = "checking"; then
9029     if test "${flag_errors}" = "yes"; then
9030       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9031     else
9032       found_usable_guile=no
9033     fi
9034   fi
9035       if test "${found_usable_guile}" != no; then
9036     save_CPPFLAGS=$CPPFLAGS
9037     save_LIBS=$LIBS
9038     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9039     LIBS="$LIBS $new_LIBS"
9040     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9041 /* end confdefs.h.  */
9042 #include "libguile.h"
9043 int
9044 main ()
9045 {
9046 scm_init_guile ();
9047   ;
9048   return 0;
9049 }
9050 _ACEOF
9051 if ac_fn_c_try_link "$LINENO"; then :
9052   have_libguile=yes
9053                     GUILE_CPPFLAGS=$new_CPPFLAGS
9054                     GUILE_LIBS=$new_LIBS
9055 else
9056   found_usable_guile=no
9057 fi
9058 rm -f core conftest.err conftest.$ac_objext \
9059     conftest$ac_exeext conftest.$ac_ext
9060     CPPFLAGS=$save_CPPFLAGS
9061     LIBS=$save_LIBS
9062     if test "${found_usable_guile}" = no; then
9063       if test "${flag_errors}" = yes; then
9064         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9065 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9066 as_fn_error "linking guile version ${guile_version} test program failed
9067 See \`config.log' for more details." "$LINENO" 5; }
9068       fi
9069     fi
9070   fi
9071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9072 $as_echo "${found_usable_guile}" >&6; }
9073
9074   else
9075     as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9076   fi
9077   ;;
9078 "" | */*)
9079   # Disallow --with=guile="" and --with-guile=foo/bar.
9080   as_fn_error "invalid value for --with-guile" "$LINENO" 5
9081   ;;
9082 *)
9083   # A space separate list of guile versions to try, in order.
9084   if test "${pkg_config_prog_path}" = "missing"; then
9085     as_fn_error "pkg-config not found" "$LINENO" 5
9086   fi
9087
9088   pkg_config=${pkg_config_prog_path}
9089   guile_version_list=${with_guile}
9090   flag_errors=yes
9091
9092   found_usable_guile=checking
9093   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9094 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9095   for guile_version in ${guile_version_list}; do
9096     ${pkg_config} --exists ${guile_version} 2>/dev/null
9097     if test $? != 0; then
9098       continue
9099     fi
9100             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9101     if test $? != 0; then
9102       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9103     fi
9104     new_LIBS=`${pkg_config} --libs ${guile_version}`
9105     if test $? != 0; then
9106       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9107     fi
9108         found_usable_guile=${guile_version}
9109     break
9110   done
9111   if test "${found_usable_guile}" = "checking"; then
9112     if test "${flag_errors}" = "yes"; then
9113       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9114     else
9115       found_usable_guile=no
9116     fi
9117   fi
9118       if test "${found_usable_guile}" != no; then
9119     save_CPPFLAGS=$CPPFLAGS
9120     save_LIBS=$LIBS
9121     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9122     LIBS="$LIBS $new_LIBS"
9123     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9124 /* end confdefs.h.  */
9125 #include "libguile.h"
9126 int
9127 main ()
9128 {
9129 scm_init_guile ();
9130   ;
9131   return 0;
9132 }
9133 _ACEOF
9134 if ac_fn_c_try_link "$LINENO"; then :
9135   have_libguile=yes
9136                     GUILE_CPPFLAGS=$new_CPPFLAGS
9137                     GUILE_LIBS=$new_LIBS
9138 else
9139   found_usable_guile=no
9140 fi
9141 rm -f core conftest.err conftest.$ac_objext \
9142     conftest$ac_exeext conftest.$ac_ext
9143     CPPFLAGS=$save_CPPFLAGS
9144     LIBS=$save_LIBS
9145     if test "${found_usable_guile}" = no; then
9146       if test "${flag_errors}" = yes; then
9147         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9148 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9149 as_fn_error "linking guile version ${guile_version} test program failed
9150 See \`config.log' for more details." "$LINENO" 5; }
9151       fi
9152     fi
9153   fi
9154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9155 $as_echo "${found_usable_guile}" >&6; }
9156
9157   ;;
9158 esac
9159
9160 if test "${have_libguile}" != no; then
9161     case "${with_guile}" in
9162   [\\/]* | ?:[\\/]*)
9163
9164   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9165 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9166 if test "${ac_cv_guild_program_name+set}" = set; then :
9167   $as_echo_n "(cached) " >&6
9168 else
9169   ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
9170
9171      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9172      # the 'guild' and 'bindir' variables.  In that case, try to guess
9173      # what the program name is, at the risk of getting it wrong if
9174      # Guile was configured with '--program-suffix' or similar.
9175      if test "x$ac_cv_guild_program_name" = "x"; then
9176        guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
9177        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9178      fi
9179
9180 fi
9181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9182 $as_echo "$ac_cv_guild_program_name" >&6; }
9183
9184   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9185     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9186   fi
9187
9188   GUILD="$ac_cv_guild_program_name"
9189
9190
9191     ;;
9192   *)
9193
9194   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9195 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9196 if test "${ac_cv_guild_program_name+set}" = set; then :
9197   $as_echo_n "(cached) " >&6
9198 else
9199   ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9200
9201      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9202      # the 'guild' and 'bindir' variables.  In that case, try to guess
9203      # what the program name is, at the risk of getting it wrong if
9204      # Guile was configured with '--program-suffix' or similar.
9205      if test "x$ac_cv_guild_program_name" = "x"; then
9206        guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9207        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9208      fi
9209
9210 fi
9211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9212 $as_echo "$ac_cv_guild_program_name" >&6; }
9213
9214   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9215     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9216   fi
9217
9218   GUILD="$ac_cv_guild_program_name"
9219
9220
9221     ;;
9222   esac
9223
9224
9225   if test "$cross_compiling" = no; then
9226     GUILD_TARGET_FLAG=
9227   else
9228     GUILD_TARGET_FLAG="--target=$host"
9229   fi
9230
9231
9232
9233
9234   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9235 $as_echo_n "checking whether guild supports this host... " >&6; }
9236 if test "${ac_cv_guild_ok+set}" = set; then :
9237   $as_echo_n "(cached) " >&6
9238 else
9239   echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9240      if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9241        ac_cv_guild_ok=yes
9242      else
9243        ac_cv_guild_ok=no
9244      fi
9245 fi
9246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9247 $as_echo "$ac_cv_guild_ok" >&6; }
9248
9249     if test "$ac_cv_guild_ok" = no; then
9250     have_libguile=no
9251     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9252 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
9253   fi
9254 fi
9255
9256 if test "${have_libguile}" != no; then
9257
9258 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
9259
9260   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9261   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9262   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9263   CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9264   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
9265
9266     save_LIBS="$LIBS"
9267   save_CPPFLAGS="$CPPFLAGS"
9268   LIBS="$GUILE_LIBS"
9269   CPPFLAGS="$GUILE_CPPFLAGS"
9270   for ac_func in scm_new_smob
9271 do :
9272   ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9273 if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9274   cat >>confdefs.h <<_ACEOF
9275 #define HAVE_SCM_NEW_SMOB 1
9276 _ACEOF
9277
9278 fi
9279 done
9280
9281   LIBS="$save_LIBS"
9282   CPPFLAGS="$save_CPPFLAGS"
9283 else
9284   # Even if Guile support is not compiled in, we need to have these files
9285   # included.
9286   CONFIG_OBS="$CONFIG_OBS guile.o"
9287   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9288 fi
9289
9290
9291  if test "${have_libguile}" != no; then
9292   HAVE_GUILE_TRUE=
9293   HAVE_GUILE_FALSE='#'
9294 else
9295   HAVE_GUILE_TRUE='#'
9296   HAVE_GUILE_FALSE=
9297 fi
9298
9299
9300 # --------------------- #
9301 # Check for libmcheck.  #
9302 # --------------------- #
9303
9304 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
9305 # but turn it off if Python is enabled with threads, since -lmcheck is
9306 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9307 # and for releases.
9308 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9309    && $development; then
9310   libmcheck_default=yes
9311 else
9312   libmcheck_default=no
9313 fi
9314
9315   # Check whether --enable-libmcheck was given.
9316 if test "${enable_libmcheck+set}" = set; then :
9317   enableval=$enable_libmcheck; case "${enableval}" in
9318       yes | y) ENABLE_LIBMCHECK="yes" ;;
9319       no | n)  ENABLE_LIBMCHECK="no" ;;
9320       *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
9321     esac
9322 fi
9323
9324
9325   if test -z "${ENABLE_LIBMCHECK}"; then
9326     ENABLE_LIBMCHECK=${libmcheck_default}
9327   fi
9328
9329   if test "$ENABLE_LIBMCHECK" = "yes" ; then
9330     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
9331 $as_echo_n "checking for main in -lmcheck... " >&6; }
9332 if test "${ac_cv_lib_mcheck_main+set}" = set; then :
9333   $as_echo_n "(cached) " >&6
9334 else
9335   ac_check_lib_save_LIBS=$LIBS
9336 LIBS="-lmcheck  $LIBS"
9337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9338 /* end confdefs.h.  */
9339
9340
9341 int
9342 main ()
9343 {
9344 return main ();
9345   ;
9346   return 0;
9347 }
9348 _ACEOF
9349 if ac_fn_c_try_link "$LINENO"; then :
9350   ac_cv_lib_mcheck_main=yes
9351 else
9352   ac_cv_lib_mcheck_main=no
9353 fi
9354 rm -f core conftest.err conftest.$ac_objext \
9355     conftest$ac_exeext conftest.$ac_ext
9356 LIBS=$ac_check_lib_save_LIBS
9357 fi
9358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
9359 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
9360 if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
9361   cat >>confdefs.h <<_ACEOF
9362 #define HAVE_LIBMCHECK 1
9363 _ACEOF
9364
9365   LIBS="-lmcheck $LIBS"
9366
9367 fi
9368
9369   fi
9370
9371
9372 if test "$ENABLE_LIBMCHECK" = "yes" \
9373         -a "${have_libpython}" != "no" \
9374         -a "${python_has_threads}" = "yes" ; then
9375   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
9376 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
9377 fi
9378
9379 # ------------------------- #
9380 # Checks for header files.  #
9381 # ------------------------- #
9382
9383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9384 $as_echo_n "checking for ANSI C header files... " >&6; }
9385 if test "${ac_cv_header_stdc+set}" = set; then :
9386   $as_echo_n "(cached) " >&6
9387 else
9388   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9389 /* end confdefs.h.  */
9390 #include <stdlib.h>
9391 #include <stdarg.h>
9392 #include <string.h>
9393 #include <float.h>
9394
9395 int
9396 main ()
9397 {
9398
9399   ;
9400   return 0;
9401 }
9402 _ACEOF
9403 if ac_fn_c_try_compile "$LINENO"; then :
9404   ac_cv_header_stdc=yes
9405 else
9406   ac_cv_header_stdc=no
9407 fi
9408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9409
9410 if test $ac_cv_header_stdc = yes; then
9411   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9413 /* end confdefs.h.  */
9414 #include <string.h>
9415
9416 _ACEOF
9417 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9418   $EGREP "memchr" >/dev/null 2>&1; then :
9419
9420 else
9421   ac_cv_header_stdc=no
9422 fi
9423 rm -f conftest*
9424
9425 fi
9426
9427 if test $ac_cv_header_stdc = yes; then
9428   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9429   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9430 /* end confdefs.h.  */
9431 #include <stdlib.h>
9432
9433 _ACEOF
9434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9435   $EGREP "free" >/dev/null 2>&1; then :
9436
9437 else
9438   ac_cv_header_stdc=no
9439 fi
9440 rm -f conftest*
9441
9442 fi
9443
9444 if test $ac_cv_header_stdc = yes; then
9445   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9446   if test "$cross_compiling" = yes; then :
9447   :
9448 else
9449   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9450 /* end confdefs.h.  */
9451 #include <ctype.h>
9452 #include <stdlib.h>
9453 #if ((' ' & 0x0FF) == 0x020)
9454 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9455 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9456 #else
9457 # define ISLOWER(c) \
9458                    (('a' <= (c) && (c) <= 'i') \
9459                      || ('j' <= (c) && (c) <= 'r') \
9460                      || ('s' <= (c) && (c) <= 'z'))
9461 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9462 #endif
9463
9464 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9465 int
9466 main ()
9467 {
9468   int i;
9469   for (i = 0; i < 256; i++)
9470     if (XOR (islower (i), ISLOWER (i))
9471         || toupper (i) != TOUPPER (i))
9472       return 2;
9473   return 0;
9474 }
9475 _ACEOF
9476 if ac_fn_c_try_run "$LINENO"; then :
9477
9478 else
9479   ac_cv_header_stdc=no
9480 fi
9481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9482   conftest.$ac_objext conftest.beam conftest.$ac_ext
9483 fi
9484
9485 fi
9486 fi
9487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9488 $as_echo "$ac_cv_header_stdc" >&6; }
9489 if test $ac_cv_header_stdc = yes; then
9490
9491 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9492
9493 fi
9494
9495 # elf_hp.h is for HP/UX 64-bit shared library support.
9496 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
9497                   thread_db.h \
9498                   sys/fault.h \
9499                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9500                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9501                   sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9502                   termios.h termio.h \
9503                   sgtty.h elf_hp.h \
9504                   dlfcn.h
9505 do :
9506   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9507 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9508 eval as_val=\$$as_ac_Header
9509    if test "x$as_val" = x""yes; then :
9510   cat >>confdefs.h <<_ACEOF
9511 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9512 _ACEOF
9513
9514 fi
9515
9516 done
9517
9518 for ac_header in sys/proc.h
9519 do :
9520   ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9521 # include <sys/param.h>
9522 #endif
9523
9524 "
9525 if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
9526   cat >>confdefs.h <<_ACEOF
9527 #define HAVE_SYS_PROC_H 1
9528 _ACEOF
9529
9530 fi
9531
9532 done
9533
9534 for ac_header in sys/user.h
9535 do :
9536   ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9537 # include <sys/param.h>
9538 #endif
9539
9540 "
9541 if test "x$ac_cv_header_sys_user_h" = x""yes; then :
9542   cat >>confdefs.h <<_ACEOF
9543 #define HAVE_SYS_USER_H 1
9544 _ACEOF
9545
9546 fi
9547
9548 done
9549
9550
9551 # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
9552 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9553 # think that we don't have <curses.h> if we're using GCC.
9554 case $host_os in
9555   solaris2.[789])
9556     if test "$GCC" = yes; then
9557
9558 $as_echo "#define _MSE_INT_H 1" >>confdefs.h
9559
9560     fi ;;
9561 esac
9562 for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
9563 do :
9564   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9565 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9566 eval as_val=\$$as_ac_Header
9567    if test "x$as_val" = x""yes; then :
9568   cat >>confdefs.h <<_ACEOF
9569 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9570 _ACEOF
9571
9572 fi
9573
9574 done
9575
9576 for ac_header in term.h
9577 do :
9578   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9579 # include <curses.h>
9580 #endif
9581
9582 "
9583 if test "x$ac_cv_header_term_h" = x""yes; then :
9584   cat >>confdefs.h <<_ACEOF
9585 #define HAVE_TERM_H 1
9586 _ACEOF
9587
9588 fi
9589
9590 done
9591
9592
9593 # ------------------------- #
9594 # Checks for declarations.  #
9595 # ------------------------- #
9596
9597 ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9598 if test "x$ac_cv_have_decl_free" = x""yes; then :
9599   ac_have_decl=1
9600 else
9601   ac_have_decl=0
9602 fi
9603
9604 cat >>confdefs.h <<_ACEOF
9605 #define HAVE_DECL_FREE $ac_have_decl
9606 _ACEOF
9607 ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9608 if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9609   ac_have_decl=1
9610 else
9611   ac_have_decl=0
9612 fi
9613
9614 cat >>confdefs.h <<_ACEOF
9615 #define HAVE_DECL_MALLOC $ac_have_decl
9616 _ACEOF
9617 ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9618 if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9619   ac_have_decl=1
9620 else
9621   ac_have_decl=0
9622 fi
9623
9624 cat >>confdefs.h <<_ACEOF
9625 #define HAVE_DECL_REALLOC $ac_have_decl
9626 _ACEOF
9627 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9628 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9629   ac_have_decl=1
9630 else
9631   ac_have_decl=0
9632 fi
9633
9634 cat >>confdefs.h <<_ACEOF
9635 #define HAVE_DECL_SNPRINTF $ac_have_decl
9636 _ACEOF
9637
9638
9639   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9640 $as_echo_n "checking for LC_MESSAGES... " >&6; }
9641 if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9642   $as_echo_n "(cached) " >&6
9643 else
9644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9645 /* end confdefs.h.  */
9646 #include <locale.h>
9647 int
9648 main ()
9649 {
9650 return LC_MESSAGES
9651   ;
9652   return 0;
9653 }
9654 _ACEOF
9655 if ac_fn_c_try_link "$LINENO"; then :
9656   am_cv_val_LC_MESSAGES=yes
9657 else
9658   am_cv_val_LC_MESSAGES=no
9659 fi
9660 rm -f core conftest.err conftest.$ac_objext \
9661     conftest$ac_exeext conftest.$ac_ext
9662 fi
9663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9664 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9665   if test $am_cv_val_LC_MESSAGES = yes; then
9666
9667 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9668
9669   fi
9670
9671
9672 # ----------------------- #
9673 # Checks for structures.  #
9674 # ----------------------- #
9675
9676 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9677 if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9678
9679 cat >>confdefs.h <<_ACEOF
9680 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
9681 _ACEOF
9682
9683
9684 fi
9685 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9686 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
9687
9688 cat >>confdefs.h <<_ACEOF
9689 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
9690 _ACEOF
9691
9692
9693 fi
9694
9695
9696 # ------------------ #
9697 # Checks for types.  #
9698 # ------------------ #
9699
9700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9701 $as_echo_n "checking return type of signal handlers... " >&6; }
9702 if test "${ac_cv_type_signal+set}" = set; then :
9703   $as_echo_n "(cached) " >&6
9704 else
9705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9706 /* end confdefs.h.  */
9707 #include <sys/types.h>
9708 #include <signal.h>
9709
9710 int
9711 main ()
9712 {
9713 return *(signal (0, 0)) (0) == 1;
9714   ;
9715   return 0;
9716 }
9717 _ACEOF
9718 if ac_fn_c_try_compile "$LINENO"; then :
9719   ac_cv_type_signal=int
9720 else
9721   ac_cv_type_signal=void
9722 fi
9723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9724 fi
9725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9726 $as_echo "$ac_cv_type_signal" >&6; }
9727
9728 cat >>confdefs.h <<_ACEOF
9729 #define RETSIGTYPE $ac_cv_type_signal
9730 _ACEOF
9731
9732
9733 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
9734 #include <sys/socket.h>
9735
9736 "
9737 if test "x$ac_cv_type_socklen_t" = x""yes; then :
9738
9739 cat >>confdefs.h <<_ACEOF
9740 #define HAVE_SOCKLEN_T 1
9741 _ACEOF
9742
9743
9744 fi
9745
9746
9747 # ------------------------------------- #
9748 # Checks for compiler characteristics.  #
9749 # ------------------------------------- #
9750
9751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9752 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9753 if test "${ac_cv_c_const+set}" = set; then :
9754   $as_echo_n "(cached) " >&6
9755 else
9756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9757 /* end confdefs.h.  */
9758
9759 int
9760 main ()
9761 {
9762 /* FIXME: Include the comments suggested by Paul. */
9763 #ifndef __cplusplus
9764   /* Ultrix mips cc rejects this.  */
9765   typedef int charset[2];
9766   const charset cs;
9767   /* SunOS 4.1.1 cc rejects this.  */
9768   char const *const *pcpcc;
9769   char **ppc;
9770   /* NEC SVR4.0.2 mips cc rejects this.  */
9771   struct point {int x, y;};
9772   static struct point const zero = {0,0};
9773   /* AIX XL C 1.02.0.0 rejects this.
9774      It does not let you subtract one const X* pointer from another in
9775      an arm of an if-expression whose if-part is not a constant
9776      expression */
9777   const char *g = "string";
9778   pcpcc = &g + (g ? g-g : 0);
9779   /* HPUX 7.0 cc rejects these. */
9780   ++pcpcc;
9781   ppc = (char**) pcpcc;
9782   pcpcc = (char const *const *) ppc;
9783   { /* SCO 3.2v4 cc rejects this.  */
9784     char *t;
9785     char const *s = 0 ? (char *) 0 : (char const *) 0;
9786
9787     *t++ = 0;
9788     if (s) return 0;
9789   }
9790   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9791     int x[] = {25, 17};
9792     const int *foo = &x[0];
9793     ++foo;
9794   }
9795   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9796     typedef const int *iptr;
9797     iptr p = 0;
9798     ++p;
9799   }
9800   { /* AIX XL C 1.02.0.0 rejects this saying
9801        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9802     struct s { int j; const int *ap[3]; };
9803     struct s *b; b->j = 5;
9804   }
9805   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9806     const int foo = 10;
9807     if (!foo) return 0;
9808   }
9809   return !cs[0] && !zero.x;
9810 #endif
9811
9812   ;
9813   return 0;
9814 }
9815 _ACEOF
9816 if ac_fn_c_try_compile "$LINENO"; then :
9817   ac_cv_c_const=yes
9818 else
9819   ac_cv_c_const=no
9820 fi
9821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9822 fi
9823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9824 $as_echo "$ac_cv_c_const" >&6; }
9825 if test $ac_cv_c_const = no; then
9826
9827 $as_echo "#define const /**/" >>confdefs.h
9828
9829 fi
9830
9831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9832 $as_echo_n "checking for inline... " >&6; }
9833 if test "${ac_cv_c_inline+set}" = set; then :
9834   $as_echo_n "(cached) " >&6
9835 else
9836   ac_cv_c_inline=no
9837 for ac_kw in inline __inline__ __inline; do
9838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9839 /* end confdefs.h.  */
9840 #ifndef __cplusplus
9841 typedef int foo_t;
9842 static $ac_kw foo_t static_foo () {return 0; }
9843 $ac_kw foo_t foo () {return 0; }
9844 #endif
9845
9846 _ACEOF
9847 if ac_fn_c_try_compile "$LINENO"; then :
9848   ac_cv_c_inline=$ac_kw
9849 fi
9850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9851   test "$ac_cv_c_inline" != no && break
9852 done
9853
9854 fi
9855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9856 $as_echo "$ac_cv_c_inline" >&6; }
9857
9858 case $ac_cv_c_inline in
9859   inline | yes) ;;
9860   *)
9861     case $ac_cv_c_inline in
9862       no) ac_val=;;
9863       *) ac_val=$ac_cv_c_inline;;
9864     esac
9865     cat >>confdefs.h <<_ACEOF
9866 #ifndef __cplusplus
9867 #define inline $ac_val
9868 #endif
9869 _ACEOF
9870     ;;
9871 esac
9872
9873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9874 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9875 if test "${ac_cv_c_bigendian+set}" = set; then :
9876   $as_echo_n "(cached) " >&6
9877 else
9878   ac_cv_c_bigendian=unknown
9879     # See if we're dealing with a universal compiler.
9880     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9881 /* end confdefs.h.  */
9882 #ifndef __APPLE_CC__
9883                not a universal capable compiler
9884              #endif
9885              typedef int dummy;
9886
9887 _ACEOF
9888 if ac_fn_c_try_compile "$LINENO"; then :
9889
9890         # Check for potential -arch flags.  It is not universal unless
9891         # there are at least two -arch flags with different values.
9892         ac_arch=
9893         ac_prev=
9894         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9895          if test -n "$ac_prev"; then
9896            case $ac_word in
9897              i?86 | x86_64 | ppc | ppc64)
9898                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9899                  ac_arch=$ac_word
9900                else
9901                  ac_cv_c_bigendian=universal
9902                  break
9903                fi
9904                ;;
9905            esac
9906            ac_prev=
9907          elif test "x$ac_word" = "x-arch"; then
9908            ac_prev=arch
9909          fi
9910        done
9911 fi
9912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9913     if test $ac_cv_c_bigendian = unknown; then
9914       # See if sys/param.h defines the BYTE_ORDER macro.
9915       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9916 /* end confdefs.h.  */
9917 #include <sys/types.h>
9918              #include <sys/param.h>
9919
9920 int
9921 main ()
9922 {
9923 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9924                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9925                      && LITTLE_ENDIAN)
9926               bogus endian macros
9927              #endif
9928
9929   ;
9930   return 0;
9931 }
9932 _ACEOF
9933 if ac_fn_c_try_compile "$LINENO"; then :
9934   # It does; now see whether it defined to BIG_ENDIAN or not.
9935          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9936 /* end confdefs.h.  */
9937 #include <sys/types.h>
9938                 #include <sys/param.h>
9939
9940 int
9941 main ()
9942 {
9943 #if BYTE_ORDER != BIG_ENDIAN
9944                  not big endian
9945                 #endif
9946
9947   ;
9948   return 0;
9949 }
9950 _ACEOF
9951 if ac_fn_c_try_compile "$LINENO"; then :
9952   ac_cv_c_bigendian=yes
9953 else
9954   ac_cv_c_bigendian=no
9955 fi
9956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9957 fi
9958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9959     fi
9960     if test $ac_cv_c_bigendian = unknown; then
9961       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9962       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9963 /* end confdefs.h.  */
9964 #include <limits.h>
9965
9966 int
9967 main ()
9968 {
9969 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9970               bogus endian macros
9971              #endif
9972
9973   ;
9974   return 0;
9975 }
9976 _ACEOF
9977 if ac_fn_c_try_compile "$LINENO"; then :
9978   # It does; now see whether it defined to _BIG_ENDIAN or not.
9979          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9980 /* end confdefs.h.  */
9981 #include <limits.h>
9982
9983 int
9984 main ()
9985 {
9986 #ifndef _BIG_ENDIAN
9987                  not big endian
9988                 #endif
9989
9990   ;
9991   return 0;
9992 }
9993 _ACEOF
9994 if ac_fn_c_try_compile "$LINENO"; then :
9995   ac_cv_c_bigendian=yes
9996 else
9997   ac_cv_c_bigendian=no
9998 fi
9999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10000 fi
10001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10002     fi
10003     if test $ac_cv_c_bigendian = unknown; then
10004       # Compile a test program.
10005       if test "$cross_compiling" = yes; then :
10006   # Try to guess by grepping values from an object file.
10007          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10008 /* end confdefs.h.  */
10009 short int ascii_mm[] =
10010                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10011                 short int ascii_ii[] =
10012                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10013                 int use_ascii (int i) {
10014                   return ascii_mm[i] + ascii_ii[i];
10015                 }
10016                 short int ebcdic_ii[] =
10017                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10018                 short int ebcdic_mm[] =
10019                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10020                 int use_ebcdic (int i) {
10021                   return ebcdic_mm[i] + ebcdic_ii[i];
10022                 }
10023                 extern int foo;
10024
10025 int
10026 main ()
10027 {
10028 return use_ascii (foo) == use_ebcdic (foo);
10029   ;
10030   return 0;
10031 }
10032 _ACEOF
10033 if ac_fn_c_try_compile "$LINENO"; then :
10034   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10035               ac_cv_c_bigendian=yes
10036             fi
10037             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10038               if test "$ac_cv_c_bigendian" = unknown; then
10039                 ac_cv_c_bigendian=no
10040               else
10041                 # finding both strings is unlikely to happen, but who knows?
10042                 ac_cv_c_bigendian=unknown
10043               fi
10044             fi
10045 fi
10046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10047 else
10048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10049 /* end confdefs.h.  */
10050 $ac_includes_default
10051 int
10052 main ()
10053 {
10054
10055              /* Are we little or big endian?  From Harbison&Steele.  */
10056              union
10057              {
10058                long int l;
10059                char c[sizeof (long int)];
10060              } u;
10061              u.l = 1;
10062              return u.c[sizeof (long int) - 1] == 1;
10063
10064   ;
10065   return 0;
10066 }
10067 _ACEOF
10068 if ac_fn_c_try_run "$LINENO"; then :
10069   ac_cv_c_bigendian=no
10070 else
10071   ac_cv_c_bigendian=yes
10072 fi
10073 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10074   conftest.$ac_objext conftest.beam conftest.$ac_ext
10075 fi
10076
10077     fi
10078 fi
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10080 $as_echo "$ac_cv_c_bigendian" >&6; }
10081  case $ac_cv_c_bigendian in #(
10082    yes)
10083      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10084 ;; #(
10085    no)
10086       ;; #(
10087    universal)
10088
10089 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10090
10091      ;; #(
10092    *)
10093      as_fn_error "unknown endianness
10094  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10095  esac
10096
10097
10098 # ------------------------------ #
10099 # Checks for library functions.  #
10100 # ------------------------------ #
10101
10102 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10103 # for constant arguments.  Useless!
10104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10105 $as_echo_n "checking for working alloca.h... " >&6; }
10106 if test "${ac_cv_working_alloca_h+set}" = set; then :
10107   $as_echo_n "(cached) " >&6
10108 else
10109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10110 /* end confdefs.h.  */
10111 #include <alloca.h>
10112 int
10113 main ()
10114 {
10115 char *p = (char *) alloca (2 * sizeof (int));
10116                           if (p) return 0;
10117   ;
10118   return 0;
10119 }
10120 _ACEOF
10121 if ac_fn_c_try_link "$LINENO"; then :
10122   ac_cv_working_alloca_h=yes
10123 else
10124   ac_cv_working_alloca_h=no
10125 fi
10126 rm -f core conftest.err conftest.$ac_objext \
10127     conftest$ac_exeext conftest.$ac_ext
10128 fi
10129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10130 $as_echo "$ac_cv_working_alloca_h" >&6; }
10131 if test $ac_cv_working_alloca_h = yes; then
10132
10133 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10134
10135 fi
10136
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10138 $as_echo_n "checking for alloca... " >&6; }
10139 if test "${ac_cv_func_alloca_works+set}" = set; then :
10140   $as_echo_n "(cached) " >&6
10141 else
10142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10143 /* end confdefs.h.  */
10144 #ifdef __GNUC__
10145 # define alloca __builtin_alloca
10146 #else
10147 # ifdef _MSC_VER
10148 #  include <malloc.h>
10149 #  define alloca _alloca
10150 # else
10151 #  ifdef HAVE_ALLOCA_H
10152 #   include <alloca.h>
10153 #  else
10154 #   ifdef _AIX
10155  #pragma alloca
10156 #   else
10157 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10158 char *alloca ();
10159 #    endif
10160 #   endif
10161 #  endif
10162 # endif
10163 #endif
10164
10165 int
10166 main ()
10167 {
10168 char *p = (char *) alloca (1);
10169                                     if (p) return 0;
10170   ;
10171   return 0;
10172 }
10173 _ACEOF
10174 if ac_fn_c_try_link "$LINENO"; then :
10175   ac_cv_func_alloca_works=yes
10176 else
10177   ac_cv_func_alloca_works=no
10178 fi
10179 rm -f core conftest.err conftest.$ac_objext \
10180     conftest$ac_exeext conftest.$ac_ext
10181 fi
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10183 $as_echo "$ac_cv_func_alloca_works" >&6; }
10184
10185 if test $ac_cv_func_alloca_works = yes; then
10186
10187 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10188
10189 else
10190   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10191 # that cause trouble.  Some versions do not even contain alloca or
10192 # contain a buggy version.  If you still want to use their alloca,
10193 # use ar to extract alloca.o from them instead of compiling alloca.c.
10194
10195 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10196
10197 $as_echo "#define C_ALLOCA 1" >>confdefs.h
10198
10199
10200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10201 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10202 if test "${ac_cv_os_cray+set}" = set; then :
10203   $as_echo_n "(cached) " >&6
10204 else
10205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10206 /* end confdefs.h.  */
10207 #if defined CRAY && ! defined CRAY2
10208 webecray
10209 #else
10210 wenotbecray
10211 #endif
10212
10213 _ACEOF
10214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10215   $EGREP "webecray" >/dev/null 2>&1; then :
10216   ac_cv_os_cray=yes
10217 else
10218   ac_cv_os_cray=no
10219 fi
10220 rm -f conftest*
10221
10222 fi
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10224 $as_echo "$ac_cv_os_cray" >&6; }
10225 if test $ac_cv_os_cray = yes; then
10226   for ac_func in _getb67 GETB67 getb67; do
10227     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10228 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10229 eval as_val=\$$as_ac_var
10230    if test "x$as_val" = x""yes; then :
10231
10232 cat >>confdefs.h <<_ACEOF
10233 #define CRAY_STACKSEG_END $ac_func
10234 _ACEOF
10235
10236     break
10237 fi
10238
10239   done
10240 fi
10241
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10243 $as_echo_n "checking stack direction for C alloca... " >&6; }
10244 if test "${ac_cv_c_stack_direction+set}" = set; then :
10245   $as_echo_n "(cached) " >&6
10246 else
10247   if test "$cross_compiling" = yes; then :
10248   ac_cv_c_stack_direction=0
10249 else
10250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10251 /* end confdefs.h.  */
10252 $ac_includes_default
10253 int
10254 find_stack_direction ()
10255 {
10256   static char *addr = 0;
10257   auto char dummy;
10258   if (addr == 0)
10259     {
10260       addr = &dummy;
10261       return find_stack_direction ();
10262     }
10263   else
10264     return (&dummy > addr) ? 1 : -1;
10265 }
10266
10267 int
10268 main ()
10269 {
10270   return find_stack_direction () < 0;
10271 }
10272 _ACEOF
10273 if ac_fn_c_try_run "$LINENO"; then :
10274   ac_cv_c_stack_direction=1
10275 else
10276   ac_cv_c_stack_direction=-1
10277 fi
10278 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10279   conftest.$ac_objext conftest.beam conftest.$ac_ext
10280 fi
10281
10282 fi
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10284 $as_echo "$ac_cv_c_stack_direction" >&6; }
10285 cat >>confdefs.h <<_ACEOF
10286 #define STACK_DIRECTION $ac_cv_c_stack_direction
10287 _ACEOF
10288
10289
10290 fi
10291
10292 for ac_header in stdlib.h unistd.h
10293 do :
10294   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10295 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10296 eval as_val=\$$as_ac_Header
10297    if test "x$as_val" = x""yes; then :
10298   cat >>confdefs.h <<_ACEOF
10299 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10300 _ACEOF
10301
10302 fi
10303
10304 done
10305
10306 for ac_func in getpagesize
10307 do :
10308   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10309 if test "x$ac_cv_func_getpagesize" = x""yes; then :
10310   cat >>confdefs.h <<_ACEOF
10311 #define HAVE_GETPAGESIZE 1
10312 _ACEOF
10313
10314 fi
10315 done
10316
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10318 $as_echo_n "checking for working mmap... " >&6; }
10319 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10320   $as_echo_n "(cached) " >&6
10321 else
10322   if test "$cross_compiling" = yes; then :
10323   ac_cv_func_mmap_fixed_mapped=no
10324 else
10325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10326 /* end confdefs.h.  */
10327 $ac_includes_default
10328 /* malloc might have been renamed as rpl_malloc. */
10329 #undef malloc
10330
10331 /* Thanks to Mike Haertel and Jim Avera for this test.
10332    Here is a matrix of mmap possibilities:
10333         mmap private not fixed
10334         mmap private fixed at somewhere currently unmapped
10335         mmap private fixed at somewhere already mapped
10336         mmap shared not fixed
10337         mmap shared fixed at somewhere currently unmapped
10338         mmap shared fixed at somewhere already mapped
10339    For private mappings, we should verify that changes cannot be read()
10340    back from the file, nor mmap's back from the file at a different
10341    address.  (There have been systems where private was not correctly
10342    implemented like the infamous i386 svr4.0, and systems where the
10343    VM page cache was not coherent with the file system buffer cache
10344    like early versions of FreeBSD and possibly contemporary NetBSD.)
10345    For shared mappings, we should conversely verify that changes get
10346    propagated back to all the places they're supposed to be.
10347
10348    Grep wants private fixed already mapped.
10349    The main things grep needs to know about mmap are:
10350    * does it exist and is it safe to write into the mmap'd area
10351    * how to use it (BSD variants)  */
10352
10353 #include <fcntl.h>
10354 #include <sys/mman.h>
10355
10356 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10357 char *malloc ();
10358 #endif
10359
10360 /* This mess was copied from the GNU getpagesize.h.  */
10361 #ifndef HAVE_GETPAGESIZE
10362 /* Assume that all systems that can run configure have sys/param.h.  */
10363 # ifndef HAVE_SYS_PARAM_H
10364 #  define HAVE_SYS_PARAM_H 1
10365 # endif
10366
10367 # ifdef _SC_PAGESIZE
10368 #  define getpagesize() sysconf(_SC_PAGESIZE)
10369 # else /* no _SC_PAGESIZE */
10370 #  ifdef HAVE_SYS_PARAM_H
10371 #   include <sys/param.h>
10372 #   ifdef EXEC_PAGESIZE
10373 #    define getpagesize() EXEC_PAGESIZE
10374 #   else /* no EXEC_PAGESIZE */
10375 #    ifdef NBPG
10376 #     define getpagesize() NBPG * CLSIZE
10377 #     ifndef CLSIZE
10378 #      define CLSIZE 1
10379 #     endif /* no CLSIZE */
10380 #    else /* no NBPG */
10381 #     ifdef NBPC
10382 #      define getpagesize() NBPC
10383 #     else /* no NBPC */
10384 #      ifdef PAGESIZE
10385 #       define getpagesize() PAGESIZE
10386 #      endif /* PAGESIZE */
10387 #     endif /* no NBPC */
10388 #    endif /* no NBPG */
10389 #   endif /* no EXEC_PAGESIZE */
10390 #  else /* no HAVE_SYS_PARAM_H */
10391 #   define getpagesize() 8192   /* punt totally */
10392 #  endif /* no HAVE_SYS_PARAM_H */
10393 # endif /* no _SC_PAGESIZE */
10394
10395 #endif /* no HAVE_GETPAGESIZE */
10396
10397 int
10398 main ()
10399 {
10400   char *data, *data2, *data3;
10401   int i, pagesize;
10402   int fd;
10403
10404   pagesize = getpagesize ();
10405
10406   /* First, make a file with some known garbage in it. */
10407   data = (char *) malloc (pagesize);
10408   if (!data)
10409     return 1;
10410   for (i = 0; i < pagesize; ++i)
10411     *(data + i) = rand ();
10412   umask (0);
10413   fd = creat ("conftest.mmap", 0600);
10414   if (fd < 0)
10415     return 1;
10416   if (write (fd, data, pagesize) != pagesize)
10417     return 1;
10418   close (fd);
10419
10420   /* Next, try to mmap the file at a fixed address which already has
10421      something else allocated at it.  If we can, also make sure that
10422      we see the same garbage.  */
10423   fd = open ("conftest.mmap", O_RDWR);
10424   if (fd < 0)
10425     return 1;
10426   data2 = (char *) malloc (2 * pagesize);
10427   if (!data2)
10428     return 1;
10429   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
10430   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10431                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
10432     return 1;
10433   for (i = 0; i < pagesize; ++i)
10434     if (*(data + i) != *(data2 + i))
10435       return 1;
10436
10437   /* Finally, make sure that changes to the mapped area do not
10438      percolate back to the file as seen by read().  (This is a bug on
10439      some variants of i386 svr4.0.)  */
10440   for (i = 0; i < pagesize; ++i)
10441     *(data2 + i) = *(data2 + i) + 1;
10442   data3 = (char *) malloc (pagesize);
10443   if (!data3)
10444     return 1;
10445   if (read (fd, data3, pagesize) != pagesize)
10446     return 1;
10447   for (i = 0; i < pagesize; ++i)
10448     if (*(data + i) != *(data3 + i))
10449       return 1;
10450   close (fd);
10451   return 0;
10452 }
10453 _ACEOF
10454 if ac_fn_c_try_run "$LINENO"; then :
10455   ac_cv_func_mmap_fixed_mapped=yes
10456 else
10457   ac_cv_func_mmap_fixed_mapped=no
10458 fi
10459 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10460   conftest.$ac_objext conftest.beam conftest.$ac_ext
10461 fi
10462
10463 fi
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10465 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10466 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10467
10468 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10469
10470 fi
10471 rm -f conftest.mmap
10472
10473 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10474 if test "x$ac_cv_type_pid_t" = x""yes; then :
10475
10476 else
10477
10478 cat >>confdefs.h <<_ACEOF
10479 #define pid_t int
10480 _ACEOF
10481
10482 fi
10483
10484 for ac_header in vfork.h
10485 do :
10486   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10487 if test "x$ac_cv_header_vfork_h" = x""yes; then :
10488   cat >>confdefs.h <<_ACEOF
10489 #define HAVE_VFORK_H 1
10490 _ACEOF
10491
10492 fi
10493
10494 done
10495
10496 for ac_func in fork vfork
10497 do :
10498   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10499 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10500 eval as_val=\$$as_ac_var
10501    if test "x$as_val" = x""yes; then :
10502   cat >>confdefs.h <<_ACEOF
10503 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10504 _ACEOF
10505
10506 fi
10507 done
10508
10509 if test "x$ac_cv_func_fork" = xyes; then
10510   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
10511 $as_echo_n "checking for working fork... " >&6; }
10512 if test "${ac_cv_func_fork_works+set}" = set; then :
10513   $as_echo_n "(cached) " >&6
10514 else
10515   if test "$cross_compiling" = yes; then :
10516   ac_cv_func_fork_works=cross
10517 else
10518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10519 /* end confdefs.h.  */
10520 $ac_includes_default
10521 int
10522 main ()
10523 {
10524
10525           /* By Ruediger Kuhlmann. */
10526           return fork () < 0;
10527
10528   ;
10529   return 0;
10530 }
10531 _ACEOF
10532 if ac_fn_c_try_run "$LINENO"; then :
10533   ac_cv_func_fork_works=yes
10534 else
10535   ac_cv_func_fork_works=no
10536 fi
10537 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10538   conftest.$ac_objext conftest.beam conftest.$ac_ext
10539 fi
10540
10541 fi
10542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10543 $as_echo "$ac_cv_func_fork_works" >&6; }
10544
10545 else
10546   ac_cv_func_fork_works=$ac_cv_func_fork
10547 fi
10548 if test "x$ac_cv_func_fork_works" = xcross; then
10549   case $host in
10550     *-*-amigaos* | *-*-msdosdjgpp*)
10551       # Override, as these systems have only a dummy fork() stub
10552       ac_cv_func_fork_works=no
10553       ;;
10554     *)
10555       ac_cv_func_fork_works=yes
10556       ;;
10557   esac
10558   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10559 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
10560 fi
10561 ac_cv_func_vfork_works=$ac_cv_func_vfork
10562 if test "x$ac_cv_func_vfork" = xyes; then
10563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10564 $as_echo_n "checking for working vfork... " >&6; }
10565 if test "${ac_cv_func_vfork_works+set}" = set; then :
10566   $as_echo_n "(cached) " >&6
10567 else
10568   if test "$cross_compiling" = yes; then :
10569   ac_cv_func_vfork_works=cross
10570 else
10571   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10572 /* end confdefs.h.  */
10573 /* Thanks to Paul Eggert for this test.  */
10574 $ac_includes_default
10575 #include <sys/wait.h>
10576 #ifdef HAVE_VFORK_H
10577 # include <vfork.h>
10578 #endif
10579 /* On some sparc systems, changes by the child to local and incoming
10580    argument registers are propagated back to the parent.  The compiler
10581    is told about this with #include <vfork.h>, but some compilers
10582    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
10583    static variable whose address is put into a register that is
10584    clobbered by the vfork.  */
10585 static void
10586 #ifdef __cplusplus
10587 sparc_address_test (int arg)
10588 # else
10589 sparc_address_test (arg) int arg;
10590 #endif
10591 {
10592   static pid_t child;
10593   if (!child) {
10594     child = vfork ();
10595     if (child < 0) {
10596       perror ("vfork");
10597       _exit(2);
10598     }
10599     if (!child) {
10600       arg = getpid();
10601       write(-1, "", 0);
10602       _exit (arg);
10603     }
10604   }
10605 }
10606
10607 int
10608 main ()
10609 {
10610   pid_t parent = getpid ();
10611   pid_t child;
10612
10613   sparc_address_test (0);
10614
10615   child = vfork ();
10616
10617   if (child == 0) {
10618     /* Here is another test for sparc vfork register problems.  This
10619        test uses lots of local variables, at least as many local
10620        variables as main has allocated so far including compiler
10621        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
10622        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
10623        reuse the register of parent for one of the local variables,
10624        since it will think that parent can't possibly be used any more
10625        in this routine.  Assigning to the local variable will thus
10626        munge parent in the parent process.  */
10627     pid_t
10628       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10629       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10630     /* Convince the compiler that p..p7 are live; otherwise, it might
10631        use the same hardware register for all 8 local variables.  */
10632     if (p != p1 || p != p2 || p != p3 || p != p4
10633         || p != p5 || p != p6 || p != p7)
10634       _exit(1);
10635
10636     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10637        from child file descriptors.  If the child closes a descriptor
10638        before it execs or exits, this munges the parent's descriptor
10639        as well.  Test for this by closing stdout in the child.  */
10640     _exit(close(fileno(stdout)) != 0);
10641   } else {
10642     int status;
10643     struct stat st;
10644
10645     while (wait(&status) != child)
10646       ;
10647     return (
10648          /* Was there some problem with vforking?  */
10649          child < 0
10650
10651          /* Did the child fail?  (This shouldn't happen.)  */
10652          || status
10653
10654          /* Did the vfork/compiler bug occur?  */
10655          || parent != getpid()
10656
10657          /* Did the file descriptor bug occur?  */
10658          || fstat(fileno(stdout), &st) != 0
10659          );
10660   }
10661 }
10662 _ACEOF
10663 if ac_fn_c_try_run "$LINENO"; then :
10664   ac_cv_func_vfork_works=yes
10665 else
10666   ac_cv_func_vfork_works=no
10667 fi
10668 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10669   conftest.$ac_objext conftest.beam conftest.$ac_ext
10670 fi
10671
10672 fi
10673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10674 $as_echo "$ac_cv_func_vfork_works" >&6; }
10675
10676 fi;
10677 if test "x$ac_cv_func_fork_works" = xcross; then
10678   ac_cv_func_vfork_works=$ac_cv_func_vfork
10679   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10680 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
10681 fi
10682
10683 if test "x$ac_cv_func_vfork_works" = xyes; then
10684
10685 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
10686
10687 else
10688
10689 $as_echo "#define vfork fork" >>confdefs.h
10690
10691 fi
10692 if test "x$ac_cv_func_fork_works" = xyes; then
10693
10694 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
10695
10696 fi
10697
10698 for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
10699                 pipe poll pread pread64 pwrite readlink resize_term \
10700                 sbrk setpgid setpgrp setsid \
10701                 sigaction sigprocmask sigsetmask socketpair \
10702                 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
10703                 setrlimit getrlimit posix_madvise waitpid lstat \
10704                 ptrace64 sigaltstack
10705 do :
10706   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10707 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10708 eval as_val=\$$as_ac_var
10709    if test "x$as_val" = x""yes; then :
10710   cat >>confdefs.h <<_ACEOF
10711 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10712 _ACEOF
10713
10714 fi
10715 done
10716
10717
10718   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10719 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10720 if test "${am_cv_langinfo_codeset+set}" = set; then :
10721   $as_echo_n "(cached) " >&6
10722 else
10723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10724 /* end confdefs.h.  */
10725 #include <langinfo.h>
10726 int
10727 main ()
10728 {
10729 char* cs = nl_langinfo(CODESET);
10730   ;
10731   return 0;
10732 }
10733 _ACEOF
10734 if ac_fn_c_try_link "$LINENO"; then :
10735   am_cv_langinfo_codeset=yes
10736 else
10737   am_cv_langinfo_codeset=no
10738 fi
10739 rm -f core conftest.err conftest.$ac_objext \
10740     conftest$ac_exeext conftest.$ac_ext
10741
10742 fi
10743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10744 $as_echo "$am_cv_langinfo_codeset" >&6; }
10745   if test $am_cv_langinfo_codeset = yes; then
10746
10747 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10748
10749   fi
10750
10751
10752   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10753 $as_echo_n "checking for ANSI C header files... " >&6; }
10754 if test "${ac_cv_header_stdc+set}" = set; then :
10755   $as_echo_n "(cached) " >&6
10756 else
10757   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10758 /* end confdefs.h.  */
10759 #include <stdlib.h>
10760 #include <stdarg.h>
10761 #include <string.h>
10762 #include <float.h>
10763
10764 int
10765 main ()
10766 {
10767
10768   ;
10769   return 0;
10770 }
10771 _ACEOF
10772 if ac_fn_c_try_compile "$LINENO"; then :
10773   ac_cv_header_stdc=yes
10774 else
10775   ac_cv_header_stdc=no
10776 fi
10777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10778
10779 if test $ac_cv_header_stdc = yes; then
10780   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10781   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10782 /* end confdefs.h.  */
10783 #include <string.h>
10784
10785 _ACEOF
10786 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10787   $EGREP "memchr" >/dev/null 2>&1; then :
10788
10789 else
10790   ac_cv_header_stdc=no
10791 fi
10792 rm -f conftest*
10793
10794 fi
10795
10796 if test $ac_cv_header_stdc = yes; then
10797   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10799 /* end confdefs.h.  */
10800 #include <stdlib.h>
10801
10802 _ACEOF
10803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10804   $EGREP "free" >/dev/null 2>&1; then :
10805
10806 else
10807   ac_cv_header_stdc=no
10808 fi
10809 rm -f conftest*
10810
10811 fi
10812
10813 if test $ac_cv_header_stdc = yes; then
10814   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10815   if test "$cross_compiling" = yes; then :
10816   :
10817 else
10818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10819 /* end confdefs.h.  */
10820 #include <ctype.h>
10821 #include <stdlib.h>
10822 #if ((' ' & 0x0FF) == 0x020)
10823 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10824 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10825 #else
10826 # define ISLOWER(c) \
10827                    (('a' <= (c) && (c) <= 'i') \
10828                      || ('j' <= (c) && (c) <= 'r') \
10829                      || ('s' <= (c) && (c) <= 'z'))
10830 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10831 #endif
10832
10833 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10834 int
10835 main ()
10836 {
10837   int i;
10838   for (i = 0; i < 256; i++)
10839     if (XOR (islower (i), ISLOWER (i))
10840         || toupper (i) != TOUPPER (i))
10841       return 2;
10842   return 0;
10843 }
10844 _ACEOF
10845 if ac_fn_c_try_run "$LINENO"; then :
10846
10847 else
10848   ac_cv_header_stdc=no
10849 fi
10850 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10851   conftest.$ac_objext conftest.beam conftest.$ac_ext
10852 fi
10853
10854 fi
10855 fi
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10857 $as_echo "$ac_cv_header_stdc" >&6; }
10858 if test $ac_cv_header_stdc = yes; then
10859
10860 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10861
10862 fi
10863
10864   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10865 # for constant arguments.  Useless!
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10867 $as_echo_n "checking for working alloca.h... " >&6; }
10868 if test "${ac_cv_working_alloca_h+set}" = set; then :
10869   $as_echo_n "(cached) " >&6
10870 else
10871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10872 /* end confdefs.h.  */
10873 #include <alloca.h>
10874 int
10875 main ()
10876 {
10877 char *p = (char *) alloca (2 * sizeof (int));
10878                           if (p) return 0;
10879   ;
10880   return 0;
10881 }
10882 _ACEOF
10883 if ac_fn_c_try_link "$LINENO"; then :
10884   ac_cv_working_alloca_h=yes
10885 else
10886   ac_cv_working_alloca_h=no
10887 fi
10888 rm -f core conftest.err conftest.$ac_objext \
10889     conftest$ac_exeext conftest.$ac_ext
10890 fi
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10892 $as_echo "$ac_cv_working_alloca_h" >&6; }
10893 if test $ac_cv_working_alloca_h = yes; then
10894
10895 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10896
10897 fi
10898
10899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10900 $as_echo_n "checking for alloca... " >&6; }
10901 if test "${ac_cv_func_alloca_works+set}" = set; then :
10902   $as_echo_n "(cached) " >&6
10903 else
10904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10905 /* end confdefs.h.  */
10906 #ifdef __GNUC__
10907 # define alloca __builtin_alloca
10908 #else
10909 # ifdef _MSC_VER
10910 #  include <malloc.h>
10911 #  define alloca _alloca
10912 # else
10913 #  ifdef HAVE_ALLOCA_H
10914 #   include <alloca.h>
10915 #  else
10916 #   ifdef _AIX
10917  #pragma alloca
10918 #   else
10919 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10920 char *alloca ();
10921 #    endif
10922 #   endif
10923 #  endif
10924 # endif
10925 #endif
10926
10927 int
10928 main ()
10929 {
10930 char *p = (char *) alloca (1);
10931                                     if (p) return 0;
10932   ;
10933   return 0;
10934 }
10935 _ACEOF
10936 if ac_fn_c_try_link "$LINENO"; then :
10937   ac_cv_func_alloca_works=yes
10938 else
10939   ac_cv_func_alloca_works=no
10940 fi
10941 rm -f core conftest.err conftest.$ac_objext \
10942     conftest$ac_exeext conftest.$ac_ext
10943 fi
10944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10945 $as_echo "$ac_cv_func_alloca_works" >&6; }
10946
10947 if test $ac_cv_func_alloca_works = yes; then
10948
10949 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10950
10951 else
10952   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10953 # that cause trouble.  Some versions do not even contain alloca or
10954 # contain a buggy version.  If you still want to use their alloca,
10955 # use ar to extract alloca.o from them instead of compiling alloca.c.
10956
10957 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10958
10959 $as_echo "#define C_ALLOCA 1" >>confdefs.h
10960
10961
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10963 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10964 if test "${ac_cv_os_cray+set}" = set; then :
10965   $as_echo_n "(cached) " >&6
10966 else
10967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10968 /* end confdefs.h.  */
10969 #if defined CRAY && ! defined CRAY2
10970 webecray
10971 #else
10972 wenotbecray
10973 #endif
10974
10975 _ACEOF
10976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10977   $EGREP "webecray" >/dev/null 2>&1; then :
10978   ac_cv_os_cray=yes
10979 else
10980   ac_cv_os_cray=no
10981 fi
10982 rm -f conftest*
10983
10984 fi
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10986 $as_echo "$ac_cv_os_cray" >&6; }
10987 if test $ac_cv_os_cray = yes; then
10988   for ac_func in _getb67 GETB67 getb67; do
10989     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10990 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10991 eval as_val=\$$as_ac_var
10992    if test "x$as_val" = x""yes; then :
10993
10994 cat >>confdefs.h <<_ACEOF
10995 #define CRAY_STACKSEG_END $ac_func
10996 _ACEOF
10997
10998     break
10999 fi
11000
11001   done
11002 fi
11003
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
11005 $as_echo_n "checking stack direction for C alloca... " >&6; }
11006 if test "${ac_cv_c_stack_direction+set}" = set; then :
11007   $as_echo_n "(cached) " >&6
11008 else
11009   if test "$cross_compiling" = yes; then :
11010   ac_cv_c_stack_direction=0
11011 else
11012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11013 /* end confdefs.h.  */
11014 $ac_includes_default
11015 int
11016 find_stack_direction ()
11017 {
11018   static char *addr = 0;
11019   auto char dummy;
11020   if (addr == 0)
11021     {
11022       addr = &dummy;
11023       return find_stack_direction ();
11024     }
11025   else
11026     return (&dummy > addr) ? 1 : -1;
11027 }
11028
11029 int
11030 main ()
11031 {
11032   return find_stack_direction () < 0;
11033 }
11034 _ACEOF
11035 if ac_fn_c_try_run "$LINENO"; then :
11036   ac_cv_c_stack_direction=1
11037 else
11038   ac_cv_c_stack_direction=-1
11039 fi
11040 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11041   conftest.$ac_objext conftest.beam conftest.$ac_ext
11042 fi
11043
11044 fi
11045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
11046 $as_echo "$ac_cv_c_stack_direction" >&6; }
11047 cat >>confdefs.h <<_ACEOF
11048 #define STACK_DIRECTION $ac_cv_c_stack_direction
11049 _ACEOF
11050
11051
11052 fi
11053
11054
11055
11056   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11057 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11058 if test "${am_cv_langinfo_codeset+set}" = set; then :
11059   $as_echo_n "(cached) " >&6
11060 else
11061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11062 /* end confdefs.h.  */
11063 #include <langinfo.h>
11064 int
11065 main ()
11066 {
11067 char* cs = nl_langinfo(CODESET);
11068   ;
11069   return 0;
11070 }
11071 _ACEOF
11072 if ac_fn_c_try_link "$LINENO"; then :
11073   am_cv_langinfo_codeset=yes
11074 else
11075   am_cv_langinfo_codeset=no
11076 fi
11077 rm -f core conftest.err conftest.$ac_objext \
11078     conftest$ac_exeext conftest.$ac_ext
11079
11080 fi
11081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11082 $as_echo "$am_cv_langinfo_codeset" >&6; }
11083   if test $am_cv_langinfo_codeset = yes; then
11084
11085 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
11086
11087   fi
11088
11089
11090   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
11091 do :
11092   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11093 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11094 eval as_val=\$$as_ac_Header
11095    if test "x$as_val" = x""yes; then :
11096   cat >>confdefs.h <<_ACEOF
11097 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11098 _ACEOF
11099
11100 fi
11101
11102 done
11103
11104
11105   for ac_func in fdwalk getrlimit pipe pipe2 socketpair
11106 do :
11107   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11108 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11109 eval as_val=\$$as_ac_var
11110    if test "x$as_val" = x""yes; then :
11111   cat >>confdefs.h <<_ACEOF
11112 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11113 _ACEOF
11114
11115 fi
11116 done
11117
11118
11119   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11120 if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11121   ac_have_decl=1
11122 else
11123   ac_have_decl=0
11124 fi
11125
11126 cat >>confdefs.h <<_ACEOF
11127 #define HAVE_DECL_STRERROR $ac_have_decl
11128 _ACEOF
11129 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11130 if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11131   ac_have_decl=1
11132 else
11133   ac_have_decl=0
11134 fi
11135
11136 cat >>confdefs.h <<_ACEOF
11137 #define HAVE_DECL_STRSTR $ac_have_decl
11138 _ACEOF
11139
11140
11141     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11142 $as_echo_n "checking for sigsetjmp... " >&6; }
11143 if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
11144   $as_echo_n "(cached) " >&6
11145 else
11146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11147 /* end confdefs.h.  */
11148
11149 #include <setjmp.h>
11150
11151 int
11152 main ()
11153 {
11154 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
11155   ;
11156   return 0;
11157 }
11158 _ACEOF
11159 if ac_fn_c_try_compile "$LINENO"; then :
11160   gdb_cv_func_sigsetjmp=yes
11161 else
11162   gdb_cv_func_sigsetjmp=no
11163 fi
11164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11165 fi
11166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
11167 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
11168 if test $gdb_cv_func_sigsetjmp = yes; then
11169
11170 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
11171
11172 fi
11173
11174
11175 # Check the return and argument types of ptrace.  No canned test for
11176 # this, so roll our own.
11177 gdb_ptrace_headers='
11178 #include <sys/types.h>
11179 #if HAVE_SYS_PTRACE_H
11180 # include <sys/ptrace.h>
11181 #endif
11182 #if HAVE_UNISTD_H
11183 # include <unistd.h>
11184 #endif
11185 '
11186 # There is no point in checking if we don't have a prototype.
11187 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
11188 "
11189 if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
11190   ac_have_decl=1
11191 else
11192   ac_have_decl=0
11193 fi
11194
11195 cat >>confdefs.h <<_ACEOF
11196 #define HAVE_DECL_PTRACE $ac_have_decl
11197 _ACEOF
11198 if test $ac_have_decl = 1; then :
11199
11200 else
11201
11202   : ${gdb_cv_func_ptrace_ret='int'}
11203   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11204
11205 fi
11206
11207 # Check return type.  Varargs (used on GNU/Linux) conflict with the
11208 # empty argument list, so check for that explicitly.
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11210 $as_echo_n "checking return type of ptrace... " >&6; }
11211 if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11212   $as_echo_n "(cached) " >&6
11213 else
11214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11215 /* end confdefs.h.  */
11216 $gdb_ptrace_headers
11217 int
11218 main ()
11219 {
11220 extern long ptrace (enum __ptrace_request, ...);
11221   ;
11222   return 0;
11223 }
11224 _ACEOF
11225 if ac_fn_c_try_compile "$LINENO"; then :
11226   gdb_cv_func_ptrace_ret='long'
11227 else
11228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11229 /* end confdefs.h.  */
11230 $gdb_ptrace_headers
11231 int
11232 main ()
11233 {
11234 extern int ptrace ();
11235   ;
11236   return 0;
11237 }
11238 _ACEOF
11239 if ac_fn_c_try_compile "$LINENO"; then :
11240   gdb_cv_func_ptrace_ret='int'
11241 else
11242   gdb_cv_func_ptrace_ret='long'
11243 fi
11244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11245 fi
11246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11247 fi
11248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11249 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
11250
11251 cat >>confdefs.h <<_ACEOF
11252 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
11253 _ACEOF
11254
11255 # Check argument types.
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11257 $as_echo_n "checking types of arguments for ptrace... " >&6; }
11258 if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11259   $as_echo_n "(cached) " >&6
11260 else
11261
11262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11263 /* end confdefs.h.  */
11264 $gdb_ptrace_headers
11265 int
11266 main ()
11267 {
11268 extern long ptrace (enum __ptrace_request, ...);
11269   ;
11270   return 0;
11271 }
11272 _ACEOF
11273 if ac_fn_c_try_compile "$LINENO"; then :
11274   gdb_cv_func_ptrace_args='int,int,long,long'
11275 else
11276
11277 for gdb_arg1 in 'int' 'long'; do
11278  for gdb_arg2 in 'pid_t' 'int' 'long'; do
11279   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
11280    for gdb_arg4 in 'int' 'long' 'void *'; do
11281      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11282 /* end confdefs.h.  */
11283 $gdb_ptrace_headers
11284 int
11285 main ()
11286 {
11287
11288 extern $gdb_cv_func_ptrace_ret
11289   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11290
11291   ;
11292   return 0;
11293 }
11294 _ACEOF
11295 if ac_fn_c_try_compile "$LINENO"; then :
11296   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11297     break 4;
11298 fi
11299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11300     for gdb_arg5 in 'int *' 'int' 'long'; do
11301      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11302 /* end confdefs.h.  */
11303 $gdb_ptrace_headers
11304 int
11305 main ()
11306 {
11307
11308 extern $gdb_cv_func_ptrace_ret
11309   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11310
11311   ;
11312   return 0;
11313 }
11314 _ACEOF
11315 if ac_fn_c_try_compile "$LINENO"; then :
11316
11317 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11318     break 5;
11319 fi
11320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11321     done
11322    done
11323   done
11324  done
11325 done
11326 # Provide a safe default value.
11327 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11328
11329 fi
11330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11331 fi
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11333 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
11334 ac_save_IFS=$IFS; IFS=','
11335 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11336 IFS=$ac_save_IFS
11337 shift
11338
11339 cat >>confdefs.h <<_ACEOF
11340 #define PTRACE_TYPE_ARG3 $3
11341 _ACEOF
11342
11343
11344 cat >>confdefs.h <<_ACEOF
11345 #define PTRACE_TYPE_ARG4 $4
11346 _ACEOF
11347
11348 if test -n "$5"; then
11349
11350 cat >>confdefs.h <<_ACEOF
11351 #define PTRACE_TYPE_ARG5 $5
11352 _ACEOF
11353
11354 fi
11355
11356 if test "$cross_compiling" = no; then
11357   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11358 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11359 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11360   $as_echo_n "(cached) " >&6
11361 else
11362   if test "$cross_compiling" = yes; then :
11363   as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
11364 else
11365   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11366 /* end confdefs.h.  */
11367 $ac_includes_default
11368 int
11369 main ()
11370 {
11371 /* If this system has a BSD-style setpgrp which takes arguments,
11372   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11373   exit successfully. */
11374   return setpgrp (1,1) != -1;
11375   ;
11376   return 0;
11377 }
11378 _ACEOF
11379 if ac_fn_c_try_run "$LINENO"; then :
11380   ac_cv_func_setpgrp_void=no
11381 else
11382   ac_cv_func_setpgrp_void=yes
11383 fi
11384 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11385   conftest.$ac_objext conftest.beam conftest.$ac_ext
11386 fi
11387
11388 fi
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11390 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
11391 if test $ac_cv_func_setpgrp_void = yes; then
11392
11393 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
11394
11395 fi
11396
11397 else
11398   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11399 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11400 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11401   $as_echo_n "(cached) " >&6
11402 else
11403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11404 /* end confdefs.h.  */
11405
11406 #include <unistd.h>
11407
11408 int
11409 main ()
11410 {
11411
11412   if (setpgrp(1,1) == -1)
11413     exit (0);
11414   else
11415     exit (1);
11416
11417   ;
11418   return 0;
11419 }
11420 _ACEOF
11421 if ac_fn_c_try_compile "$LINENO"; then :
11422   ac_cv_func_setpgrp_void=no
11423 else
11424   ac_cv_func_setpgrp_void=yes
11425 fi
11426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11427 fi
11428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11429 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
11430 if test $ac_cv_func_setpgrp_void = yes; then
11431   $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
11432
11433 fi
11434 fi
11435
11436 # Assume we'll default to using the included libiberty regex.
11437 gdb_use_included_regex=yes
11438
11439 # However, if the system regex is GNU regex, then default to *not*
11440 # using the included regex.
11441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11442 $as_echo_n "checking for GNU regex... " >&6; }
11443 if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11444   $as_echo_n "(cached) " >&6
11445 else
11446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11447 /* end confdefs.h.  */
11448 #include <gnu-versions.h>
11449 int
11450 main ()
11451 {
11452 #define REGEX_INTERFACE_VERSION 1
11453 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11454 # error "Version mismatch"
11455 #endif
11456   ;
11457   return 0;
11458 }
11459 _ACEOF
11460 if ac_fn_c_try_compile "$LINENO"; then :
11461   gdb_cv_have_gnu_regex=yes
11462 else
11463   gdb_cv_have_gnu_regex=no
11464 fi
11465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11466 fi
11467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11468 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
11469 if test $gdb_cv_have_gnu_regex = yes; then
11470   gdb_use_included_regex=no
11471 fi
11472
11473
11474 # Check whether --with-included-regex was given.
11475 if test "${with_included_regex+set}" = set; then :
11476   withval=$with_included_regex; gdb_with_regex=$withval
11477 else
11478   gdb_with_regex=$gdb_use_included_regex
11479 fi
11480
11481 if test "$gdb_with_regex" = yes; then
11482
11483 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11484
11485 fi
11486
11487 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11488 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11489 #include <sys/proc.h>
11490
11491 "
11492 if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
11493
11494 cat >>confdefs.h <<_ACEOF
11495 #define HAVE_STRUCT_THREAD_TD_PCB 1
11496 _ACEOF
11497
11498
11499 fi
11500
11501
11502 # See if <sys/lwp.h> defines `struct lwp`.
11503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11504 $as_echo_n "checking for struct lwp... " >&6; }
11505 if test "${gdb_cv_struct_lwp+set}" = set; then :
11506   $as_echo_n "(cached) " >&6
11507 else
11508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11509 /* end confdefs.h.  */
11510 #include <sys/param.h>
11511 #include <sys/lwp.h>
11512 int
11513 main ()
11514 {
11515 struct lwp l;
11516   ;
11517   return 0;
11518 }
11519 _ACEOF
11520 if ac_fn_c_try_compile "$LINENO"; then :
11521   gdb_cv_struct_lwp=yes
11522 else
11523   gdb_cv_struct_lwp=no
11524 fi
11525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11526 fi
11527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11528 $as_echo "$gdb_cv_struct_lwp" >&6; }
11529 if test $gdb_cv_struct_lwp = yes; then
11530
11531 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
11532
11533 fi
11534
11535 # See if <machine/reg.h> degines `struct reg'.
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11537 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11538 if test "${gdb_cv_struct_reg+set}" = set; then :
11539   $as_echo_n "(cached) " >&6
11540 else
11541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11542 /* end confdefs.h.  */
11543 #include <sys/types.h>
11544 #include <machine/reg.h>
11545 int
11546 main ()
11547 {
11548 struct reg r;
11549   ;
11550   return 0;
11551 }
11552 _ACEOF
11553 if ac_fn_c_try_compile "$LINENO"; then :
11554   gdb_cv_struct_reg=yes
11555 else
11556   gdb_cv_struct_reg=no
11557 fi
11558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11559 fi
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11561 $as_echo "$gdb_cv_struct_reg" >&6; }
11562 if test $gdb_cv_struct_reg = yes; then
11563
11564 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
11565
11566 fi
11567
11568 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11569 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
11570 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11571 "
11572 if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
11573
11574 cat >>confdefs.h <<_ACEOF
11575 #define HAVE_STRUCT_REG_R_FS 1
11576 _ACEOF
11577
11578
11579 fi
11580 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11581 "
11582 if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
11583
11584 cat >>confdefs.h <<_ACEOF
11585 #define HAVE_STRUCT_REG_R_GS 1
11586 _ACEOF
11587
11588
11589 fi
11590
11591
11592 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
11593 # Older amd64 Linux's don't have the fs_base and gs_base members of
11594 # `struct user_regs_struct'.
11595 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>
11596 "
11597 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
11598
11599 cat >>confdefs.h <<_ACEOF
11600 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
11601 _ACEOF
11602
11603
11604 fi
11605 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>
11606 "
11607 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
11608
11609 cat >>confdefs.h <<_ACEOF
11610 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
11611 _ACEOF
11612
11613
11614 fi
11615
11616
11617 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
11618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11619 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11620 if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11621   $as_echo_n "(cached) " >&6
11622 else
11623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11624 /* end confdefs.h.  */
11625 #include <sys/ptrace.h>
11626 int
11627 main ()
11628 {
11629 PTRACE_GETREGS;
11630   ;
11631   return 0;
11632 }
11633 _ACEOF
11634 if ac_fn_c_try_compile "$LINENO"; then :
11635   gdb_cv_have_ptrace_getregs=yes
11636 else
11637   gdb_cv_have_ptrace_getregs=no
11638 fi
11639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11640 fi
11641
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11643 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
11644 if test $gdb_cv_have_ptrace_getregs = yes; then
11645
11646 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
11647
11648 fi
11649
11650 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
11651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11652 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11653 if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11654   $as_echo_n "(cached) " >&6
11655 else
11656   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11657 /* end confdefs.h.  */
11658 #include <sys/ptrace.h>
11659 int
11660 main ()
11661 {
11662 PTRACE_GETFPXREGS;
11663   ;
11664   return 0;
11665 }
11666 _ACEOF
11667 if ac_fn_c_try_compile "$LINENO"; then :
11668   gdb_cv_have_ptrace_getfpxregs=yes
11669 else
11670   gdb_cv_have_ptrace_getfpxregs=no
11671 fi
11672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11673 fi
11674
11675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11676 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
11677 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
11678
11679 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
11680
11681 fi
11682
11683 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11685 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
11686 if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11687   $as_echo_n "(cached) " >&6
11688 else
11689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11690 /* end confdefs.h.  */
11691 #include <sys/types.h>
11692 #include <sys/ptrace.h>
11693 int
11694 main ()
11695 {
11696 PT_GETDBREGS;
11697   ;
11698   return 0;
11699 }
11700 _ACEOF
11701 if ac_fn_c_try_compile "$LINENO"; then :
11702   gdb_cv_have_pt_getdbregs=yes
11703 else
11704   gdb_cv_have_pt_getdbregs=no
11705 fi
11706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11707 fi
11708
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11710 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
11711 if test $gdb_cv_have_pt_getdbregs = yes; then
11712
11713 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
11714
11715 fi
11716
11717 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11719 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11720 if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11721   $as_echo_n "(cached) " >&6
11722 else
11723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11724 /* end confdefs.h.  */
11725 #include <sys/types.h>
11726 #include <sys/ptrace.h>
11727 int
11728 main ()
11729 {
11730 PT_GETXMMREGS;
11731   ;
11732   return 0;
11733 }
11734 _ACEOF
11735 if ac_fn_c_try_compile "$LINENO"; then :
11736   gdb_cv_have_pt_getxmmregs=yes
11737 else
11738   gdb_cv_have_pt_getxmmregs=no
11739 fi
11740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11741 fi
11742
11743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11744 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
11745 if test $gdb_cv_have_pt_getxmmregs = yes; then
11746
11747 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
11748
11749 fi
11750
11751 # Detect which type of /proc is in use, such as for Solaris.
11752
11753 if test "${target}" = "${host}"; then
11754   case "${host}" in
11755   *-*-sysv4.2* | *-*-sysv5* )
11756
11757 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
11758
11759       ;;
11760   *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
11761
11762 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
11763
11764       ;;
11765   mips-sgi-irix5*)
11766       # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
11767
11768 $as_echo "#define _KMEMUSER 1" >>confdefs.h
11769
11770       ;;
11771   esac
11772 fi
11773
11774 if test "$ac_cv_header_sys_procfs_h" = yes; then
11775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11776 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11777  if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11778   $as_echo_n "(cached) " >&6
11779 else
11780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781 /* end confdefs.h.  */
11782
11783 #define _SYSCALL32
11784 /* Needed for new procfs interface on sparc-solaris.  */
11785 #define _STRUCTURED_PROC 1
11786 #include <sys/procfs.h>
11787 int
11788 main ()
11789 {
11790 gregset_t avar
11791   ;
11792   return 0;
11793 }
11794 _ACEOF
11795 if ac_fn_c_try_compile "$LINENO"; then :
11796   bfd_cv_have_sys_procfs_type_gregset_t=yes
11797 else
11798   bfd_cv_have_sys_procfs_type_gregset_t=no
11799
11800 fi
11801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11802 fi
11803
11804  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
11805
11806 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
11807
11808  fi
11809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11810 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
11811
11812   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11813 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11814  if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11815   $as_echo_n "(cached) " >&6
11816 else
11817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11818 /* end confdefs.h.  */
11819
11820 #define _SYSCALL32
11821 /* Needed for new procfs interface on sparc-solaris.  */
11822 #define _STRUCTURED_PROC 1
11823 #include <sys/procfs.h>
11824 int
11825 main ()
11826 {
11827 fpregset_t avar
11828   ;
11829   return 0;
11830 }
11831 _ACEOF
11832 if ac_fn_c_try_compile "$LINENO"; then :
11833   bfd_cv_have_sys_procfs_type_fpregset_t=yes
11834 else
11835   bfd_cv_have_sys_procfs_type_fpregset_t=no
11836
11837 fi
11838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11839 fi
11840
11841  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
11842
11843 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
11844
11845  fi
11846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11847 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
11848
11849   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11850 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11851  if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11852   $as_echo_n "(cached) " >&6
11853 else
11854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11855 /* end confdefs.h.  */
11856
11857 #define _SYSCALL32
11858 /* Needed for new procfs interface on sparc-solaris.  */
11859 #define _STRUCTURED_PROC 1
11860 #include <sys/procfs.h>
11861 int
11862 main ()
11863 {
11864 prgregset_t avar
11865   ;
11866   return 0;
11867 }
11868 _ACEOF
11869 if ac_fn_c_try_compile "$LINENO"; then :
11870   bfd_cv_have_sys_procfs_type_prgregset_t=yes
11871 else
11872   bfd_cv_have_sys_procfs_type_prgregset_t=no
11873
11874 fi
11875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11876 fi
11877
11878  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
11879
11880 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
11881
11882  fi
11883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11884 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
11885
11886   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11887 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11888  if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11889   $as_echo_n "(cached) " >&6
11890 else
11891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11892 /* end confdefs.h.  */
11893
11894 #define _SYSCALL32
11895 /* Needed for new procfs interface on sparc-solaris.  */
11896 #define _STRUCTURED_PROC 1
11897 #include <sys/procfs.h>
11898 int
11899 main ()
11900 {
11901 prfpregset_t avar
11902   ;
11903   return 0;
11904 }
11905 _ACEOF
11906 if ac_fn_c_try_compile "$LINENO"; then :
11907   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
11908 else
11909   bfd_cv_have_sys_procfs_type_prfpregset_t=no
11910
11911 fi
11912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11913 fi
11914
11915  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
11916
11917 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
11918
11919  fi
11920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11921 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
11922
11923   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11924 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11925  if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11926   $as_echo_n "(cached) " >&6
11927 else
11928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11929 /* end confdefs.h.  */
11930
11931 #define _SYSCALL32
11932 /* Needed for new procfs interface on sparc-solaris.  */
11933 #define _STRUCTURED_PROC 1
11934 #include <sys/procfs.h>
11935 int
11936 main ()
11937 {
11938 prgregset32_t avar
11939   ;
11940   return 0;
11941 }
11942 _ACEOF
11943 if ac_fn_c_try_compile "$LINENO"; then :
11944   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
11945 else
11946   bfd_cv_have_sys_procfs_type_prgregset32_t=no
11947
11948 fi
11949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11950 fi
11951
11952  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
11953
11954 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
11955
11956  fi
11957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11958 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
11959
11960   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11961 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11962  if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11963   $as_echo_n "(cached) " >&6
11964 else
11965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11966 /* end confdefs.h.  */
11967
11968 #define _SYSCALL32
11969 /* Needed for new procfs interface on sparc-solaris.  */
11970 #define _STRUCTURED_PROC 1
11971 #include <sys/procfs.h>
11972 int
11973 main ()
11974 {
11975 lwpid_t avar
11976   ;
11977   return 0;
11978 }
11979 _ACEOF
11980 if ac_fn_c_try_compile "$LINENO"; then :
11981   bfd_cv_have_sys_procfs_type_lwpid_t=yes
11982 else
11983   bfd_cv_have_sys_procfs_type_lwpid_t=no
11984
11985 fi
11986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11987 fi
11988
11989  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
11990
11991 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
11992
11993  fi
11994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11995 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
11996
11997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11998 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11999  if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
12000   $as_echo_n "(cached) " >&6
12001 else
12002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12003 /* end confdefs.h.  */
12004
12005 #define _SYSCALL32
12006 /* Needed for new procfs interface on sparc-solaris.  */
12007 #define _STRUCTURED_PROC 1
12008 #include <sys/procfs.h>
12009 int
12010 main ()
12011 {
12012 psaddr_t avar
12013   ;
12014   return 0;
12015 }
12016 _ACEOF
12017 if ac_fn_c_try_compile "$LINENO"; then :
12018   bfd_cv_have_sys_procfs_type_psaddr_t=yes
12019 else
12020   bfd_cv_have_sys_procfs_type_psaddr_t=no
12021
12022 fi
12023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12024 fi
12025
12026  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
12027
12028 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
12029
12030  fi
12031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
12032 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
12033
12034   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
12035 $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
12036  if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
12037   $as_echo_n "(cached) " >&6
12038 else
12039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12040 /* end confdefs.h.  */
12041
12042 #define _SYSCALL32
12043 /* Needed for new procfs interface on sparc-solaris.  */
12044 #define _STRUCTURED_PROC 1
12045 #include <sys/procfs.h>
12046 int
12047 main ()
12048 {
12049 prsysent_t avar
12050   ;
12051   return 0;
12052 }
12053 _ACEOF
12054 if ac_fn_c_try_compile "$LINENO"; then :
12055   bfd_cv_have_sys_procfs_type_prsysent_t=yes
12056 else
12057   bfd_cv_have_sys_procfs_type_prsysent_t=no
12058
12059 fi
12060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12061 fi
12062
12063  if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
12064
12065 $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
12066
12067  fi
12068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
12069 $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
12070
12071   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
12072 $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
12073  if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
12074   $as_echo_n "(cached) " >&6
12075 else
12076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12077 /* end confdefs.h.  */
12078
12079 #define _SYSCALL32
12080 /* Needed for new procfs interface on sparc-solaris.  */
12081 #define _STRUCTURED_PROC 1
12082 #include <sys/procfs.h>
12083 int
12084 main ()
12085 {
12086 pr_sigset_t avar
12087   ;
12088   return 0;
12089 }
12090 _ACEOF
12091 if ac_fn_c_try_compile "$LINENO"; then :
12092   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
12093 else
12094   bfd_cv_have_sys_procfs_type_pr_sigset_t=no
12095
12096 fi
12097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12098 fi
12099
12100  if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
12101
12102 $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
12103
12104  fi
12105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
12106 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
12107
12108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
12109 $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
12110  if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
12111   $as_echo_n "(cached) " >&6
12112 else
12113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12114 /* end confdefs.h.  */
12115
12116 #define _SYSCALL32
12117 /* Needed for new procfs interface on sparc-solaris.  */
12118 #define _STRUCTURED_PROC 1
12119 #include <sys/procfs.h>
12120 int
12121 main ()
12122 {
12123 pr_sigaction64_t avar
12124   ;
12125   return 0;
12126 }
12127 _ACEOF
12128 if ac_fn_c_try_compile "$LINENO"; then :
12129   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
12130 else
12131   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
12132
12133 fi
12134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12135 fi
12136
12137  if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
12138
12139 $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
12140
12141  fi
12142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
12143 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
12144
12145   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
12146 $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
12147  if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
12148   $as_echo_n "(cached) " >&6
12149 else
12150   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12151 /* end confdefs.h.  */
12152
12153 #define _SYSCALL32
12154 /* Needed for new procfs interface on sparc-solaris.  */
12155 #define _STRUCTURED_PROC 1
12156 #include <sys/procfs.h>
12157 int
12158 main ()
12159 {
12160 pr_siginfo64_t avar
12161   ;
12162   return 0;
12163 }
12164 _ACEOF
12165 if ac_fn_c_try_compile "$LINENO"; then :
12166   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
12167 else
12168   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
12169
12170 fi
12171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12172 fi
12173
12174  if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
12175
12176 $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
12177
12178  fi
12179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
12180 $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
12181
12182
12183
12184
12185
12186   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
12187     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
12188 $as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
12189     if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
12190   $as_echo_n "(cached) " >&6
12191 else
12192   if test "$cross_compiling" = yes; then :
12193   gdb_cv_prfpregset_t_broken=yes
12194 else
12195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12196 /* end confdefs.h.  */
12197 #include <sys/procfs.h>
12198        int main ()
12199        {
12200          if (sizeof (prfpregset_t) == sizeof (void *))
12201            return 1;
12202          return 0;
12203        }
12204 _ACEOF
12205 if ac_fn_c_try_run "$LINENO"; then :
12206   gdb_cv_prfpregset_t_broken=no
12207 else
12208   gdb_cv_prfpregset_t_broken=yes
12209 fi
12210 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12211   conftest.$ac_objext conftest.beam conftest.$ac_ext
12212 fi
12213
12214 fi
12215
12216     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12217 $as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
12218     if test $gdb_cv_prfpregset_t_broken = yes; then
12219
12220 $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
12221
12222     fi
12223   fi
12224 fi
12225
12226 # Check if the compiler supports the `long long' type.
12227
12228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12229 $as_echo_n "checking for long long support in compiler... " >&6; }
12230 if test "${gdb_cv_c_long_long+set}" = set; then :
12231   $as_echo_n "(cached) " >&6
12232 else
12233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12234 /* end confdefs.h.  */
12235 extern long long foo;
12236 int
12237 main ()
12238 {
12239 switch (foo & 2) { case 0: return 1; }
12240   ;
12241   return 0;
12242 }
12243 _ACEOF
12244 if ac_fn_c_try_compile "$LINENO"; then :
12245   gdb_cv_c_long_long=yes
12246 else
12247   gdb_cv_c_long_long=no
12248 fi
12249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12250 fi
12251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12252 $as_echo "$gdb_cv_c_long_long" >&6; }
12253 if test $gdb_cv_c_long_long != yes; then
12254   # libdecnumber requires long long.
12255   as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
12256 fi
12257
12258 # Check if the compiler and runtime support printing long longs.
12259
12260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12261 $as_echo_n "checking for long long support in printf... " >&6; }
12262 if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12263   $as_echo_n "(cached) " >&6
12264 else
12265   if test "$cross_compiling" = yes; then :
12266   gdb_cv_printf_has_long_long=no
12267 else
12268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12269 /* end confdefs.h.  */
12270 $ac_includes_default
12271 int
12272 main ()
12273 {
12274 char buf[32];
12275   long long l = 0;
12276   l = (l << 16) + 0x0123;
12277   l = (l << 16) + 0x4567;
12278   l = (l << 16) + 0x89ab;
12279   l = (l << 16) + 0xcdef;
12280   sprintf (buf, "0x%016llx", l);
12281   return (strcmp ("0x0123456789abcdef", buf));
12282   ;
12283   return 0;
12284 }
12285 _ACEOF
12286 if ac_fn_c_try_run "$LINENO"; then :
12287   gdb_cv_printf_has_long_long=yes
12288 else
12289   gdb_cv_printf_has_long_long=no
12290 fi
12291 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12292   conftest.$ac_objext conftest.beam conftest.$ac_ext
12293 fi
12294
12295 fi
12296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12297 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
12298 if test $gdb_cv_printf_has_long_long = yes; then
12299
12300 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
12301
12302 fi
12303
12304 # Check if the compiler and runtime support printing decfloats.
12305
12306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12307 $as_echo_n "checking for decfloat support in printf... " >&6; }
12308 if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12309   $as_echo_n "(cached) " >&6
12310 else
12311   if test "$cross_compiling" = yes; then :
12312   gdb_cv_printf_has_decfloat=no
12313 else
12314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12315 /* end confdefs.h.  */
12316 $ac_includes_default
12317 int
12318 main ()
12319 {
12320 char buf[64];
12321   _Decimal32 d32 = 1.2345df;
12322   _Decimal64 d64 = 1.2345dd;
12323   _Decimal128 d128 = 1.2345dl;
12324   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12325   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12326   ;
12327   return 0;
12328 }
12329 _ACEOF
12330 if ac_fn_c_try_run "$LINENO"; then :
12331   gdb_cv_printf_has_decfloat=yes
12332 else
12333   gdb_cv_printf_has_decfloat=no
12334 fi
12335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12336   conftest.$ac_objext conftest.beam conftest.$ac_ext
12337 fi
12338
12339 fi
12340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12341 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
12342 if test $gdb_cv_printf_has_decfloat = yes; then
12343
12344 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
12345
12346 fi
12347
12348 # Check if the compiler supports the `long double' type.  We can't use
12349 # AC_C_LONG_DOUBLE because that one does additional checks on the
12350 # constants defined in <float.h> that fail on some systems,
12351 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
12352
12353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12354 $as_echo_n "checking for long double support in compiler... " >&6; }
12355 if test "${gdb_cv_c_long_double+set}" = set; then :
12356   $as_echo_n "(cached) " >&6
12357 else
12358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12359 /* end confdefs.h.  */
12360 long double foo;
12361 _ACEOF
12362 if ac_fn_c_try_compile "$LINENO"; then :
12363   gdb_cv_c_long_double=yes
12364 else
12365   gdb_cv_c_long_double=no
12366 fi
12367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12368 fi
12369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12370 $as_echo "$gdb_cv_c_long_double" >&6; }
12371 if test $gdb_cv_c_long_double = yes; then
12372
12373 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
12374
12375 fi
12376
12377 # Check if the compiler and runtime support printing long doubles.
12378
12379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12380 $as_echo_n "checking for long double support in printf... " >&6; }
12381 if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12382   $as_echo_n "(cached) " >&6
12383 else
12384   if test "$cross_compiling" = yes; then :
12385   gdb_cv_printf_has_long_double=no
12386 else
12387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12388 /* end confdefs.h.  */
12389 $ac_includes_default
12390 int
12391 main ()
12392 {
12393 char buf[16];
12394   long double f = 3.141592653;
12395   sprintf (buf, "%Lg", f);
12396   return (strncmp ("3.14159", buf, 7));
12397   ;
12398   return 0;
12399 }
12400 _ACEOF
12401 if ac_fn_c_try_run "$LINENO"; then :
12402   gdb_cv_printf_has_long_double=yes
12403 else
12404   gdb_cv_printf_has_long_double=no
12405 fi
12406 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12407   conftest.$ac_objext conftest.beam conftest.$ac_ext
12408 fi
12409
12410 fi
12411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12412 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
12413 if test $gdb_cv_printf_has_long_double = yes; then
12414
12415 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
12416
12417 fi
12418
12419 # Check if the compiler and runtime support scanning long doubles.
12420
12421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12422 $as_echo_n "checking for long double support in scanf... " >&6; }
12423 if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12424   $as_echo_n "(cached) " >&6
12425 else
12426   if test "$cross_compiling" = yes; then :
12427   gdb_cv_scanf_has_long_double=no
12428 else
12429   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12430 /* end confdefs.h.  */
12431 #include <stdio.h>
12432 int
12433 main ()
12434 {
12435 char *buf = "3.141592653";
12436   long double f = 0;
12437   sscanf (buf, "%Lg", &f);
12438   return !(f > 3.14159 && f < 3.14160);
12439   ;
12440   return 0;
12441 }
12442 _ACEOF
12443 if ac_fn_c_try_run "$LINENO"; then :
12444   gdb_cv_scanf_has_long_double=yes
12445 else
12446   gdb_cv_scanf_has_long_double=no
12447 fi
12448 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12449   conftest.$ac_objext conftest.beam conftest.$ac_ext
12450 fi
12451
12452 fi
12453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12454 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
12455 if test $gdb_cv_scanf_has_long_double = yes; then
12456
12457 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
12458
12459 fi
12460
12461 case ${host_os} in
12462 aix*)
12463   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12464 $as_echo_n "checking for -bbigtoc option... " >&6; }
12465 if test "${gdb_cv_bigtoc+set}" = set; then :
12466   $as_echo_n "(cached) " >&6
12467 else
12468
12469     SAVE_LDFLAGS=$LDFLAGS
12470
12471     case $GCC in
12472     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12473     *) gdb_cv_bigtoc=-bbigtoc ;;
12474     esac
12475
12476     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
12477     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12478 /* end confdefs.h.  */
12479
12480 int
12481 main ()
12482 {
12483 int i;
12484   ;
12485   return 0;
12486 }
12487 _ACEOF
12488 if ac_fn_c_try_link "$LINENO"; then :
12489
12490 else
12491   gdb_cv_bigtoc=
12492 fi
12493 rm -f core conftest.err conftest.$ac_objext \
12494     conftest$ac_exeext conftest.$ac_ext
12495     LDFLAGS="${SAVE_LDFLAGS}"
12496
12497 fi
12498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12499 $as_echo "$gdb_cv_bigtoc" >&6; }
12500   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12501   ;;
12502 esac
12503
12504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
12505 $as_echo_n "checking for the dynamic export flag... " >&6; }
12506 dynamic_list=false
12507 if test "${gdb_native}" = yes; then
12508    # The dynamically loaded libthread_db needs access to symbols in the gdb
12509    # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
12510    # may not be supported there.
12511    old_LDFLAGS="$LDFLAGS"
12512    # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
12513    RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
12514    LDFLAGS="$LDFLAGS $RDYNAMIC"
12515    if test "${have_libpython}" = no; then
12516      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517 /* end confdefs.h.  */
12518
12519 int
12520 main ()
12521 {
12522
12523   ;
12524   return 0;
12525 }
12526 _ACEOF
12527 if ac_fn_c_try_link "$LINENO"; then :
12528   dynamic_list=true
12529 fi
12530 rm -f core conftest.err conftest.$ac_objext \
12531     conftest$ac_exeext conftest.$ac_ext
12532    else
12533      # Workaround http://bugs.python.org/issue4434 where static
12534      # libpythonX.Y.a would get its symbols required for
12535      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
12536      # Problem does not happen for the recommended libpythonX.Y.so linkage.
12537      old_CFLAGS="$CFLAGS"
12538      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
12539      old_LIBS="$LIBS"
12540      LIBS="$LIBS $PYTHON_LIBS"
12541      if test "$cross_compiling" = yes; then :
12542   true
12543 else
12544   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12545 /* end confdefs.h.  */
12546 #include "${have_libpython}/Python.h"
12547 int
12548 main ()
12549 {
12550 int err;
12551           Py_Initialize ();
12552           err = PyRun_SimpleString ("import itertools\n");
12553           Py_Finalize ();
12554           return err == 0 ? 0 : 1;
12555   ;
12556   return 0;
12557 }
12558 _ACEOF
12559 if ac_fn_c_try_run "$LINENO"; then :
12560   dynamic_list=true
12561 fi
12562 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12563   conftest.$ac_objext conftest.beam conftest.$ac_ext
12564 fi
12565
12566      LIBS="$old_LIBS"
12567      CFLAGS="$old_CFLAGS"
12568    fi
12569    LDFLAGS="$old_LDFLAGS"
12570 fi
12571 if $dynamic_list; then
12572   found="-Wl,--dynamic-list"
12573   RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
12574 else
12575   found="-rdynamic"
12576   RDYNAMIC="-rdynamic"
12577 fi
12578
12579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
12580 $as_echo "$found" >&6; }
12581
12582
12583 if test ${build} = ${host} -a ${host} = ${target} ; then
12584    case ${host_os} in
12585    solaris*)
12586       # See if thread_db library is around for Solaris thread debugging.
12587       # Note that we must explicitly test for version 1 of the library
12588       # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12589       # the same API.
12590       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12591 $as_echo_n "checking for Solaris thread debugging library... " >&6; }
12592       if test -f /usr/lib/libthread_db.so.1 ; then
12593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12594 $as_echo "yes" >&6; }
12595
12596 $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
12597
12598          CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
12599          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
12600          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12601 $as_echo_n "checking for dlopen in -ldl... " >&6; }
12602 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12603   $as_echo_n "(cached) " >&6
12604 else
12605   ac_check_lib_save_LIBS=$LIBS
12606 LIBS="-ldl  $LIBS"
12607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12608 /* end confdefs.h.  */
12609
12610 /* Override any GCC internal prototype to avoid an error.
12611    Use char because int might match the return type of a GCC
12612    builtin and then its argument prototype would still apply.  */
12613 #ifdef __cplusplus
12614 extern "C"
12615 #endif
12616 char dlopen ();
12617 int
12618 main ()
12619 {
12620 return dlopen ();
12621   ;
12622   return 0;
12623 }
12624 _ACEOF
12625 if ac_fn_c_try_link "$LINENO"; then :
12626   ac_cv_lib_dl_dlopen=yes
12627 else
12628   ac_cv_lib_dl_dlopen=no
12629 fi
12630 rm -f core conftest.err conftest.$ac_objext \
12631     conftest$ac_exeext conftest.$ac_ext
12632 LIBS=$ac_check_lib_save_LIBS
12633 fi
12634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12635 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12636 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
12637   cat >>confdefs.h <<_ACEOF
12638 #define HAVE_LIBDL 1
12639 _ACEOF
12640
12641   LIBS="-ldl $LIBS"
12642
12643 fi
12644
12645          CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
12646          # Sun randomly tweaked the prototypes in <proc_service.h>
12647          # at one point.
12648          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12649 $as_echo_n "checking if <proc_service.h> is old... " >&6; }
12650          if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12651   $as_echo_n "(cached) " >&6
12652 else
12653
12654             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12655 /* end confdefs.h.  */
12656
12657                 #include <proc_service.h>
12658                 ps_err_e ps_pdwrite
12659                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
12660
12661 int
12662 main ()
12663 {
12664
12665   ;
12666   return 0;
12667 }
12668 _ACEOF
12669 if ac_fn_c_try_compile "$LINENO"; then :
12670   gdb_cv_proc_service_is_old=no
12671 else
12672   gdb_cv_proc_service_is_old=yes
12673 fi
12674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12675
12676 fi
12677
12678          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12679 $as_echo "$gdb_cv_proc_service_is_old" >&6; }
12680          if test $gdb_cv_proc_service_is_old = yes; then
12681
12682 $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
12683
12684          fi
12685       else
12686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12687 $as_echo "no" >&6; }
12688       fi
12689       ;;
12690    aix*)
12691       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12692 $as_echo_n "checking for AiX thread debugging library... " >&6; }
12693       if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12694   $as_echo_n "(cached) " >&6
12695 else
12696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12697 /* end confdefs.h.  */
12698 #include <sys/pthdebug.h>
12699 int
12700 main ()
12701 {
12702 #ifndef PTHDB_VERSION_3
12703                                     #error
12704                                     #endif
12705   ;
12706   return 0;
12707 }
12708 _ACEOF
12709 if ac_fn_c_try_compile "$LINENO"; then :
12710   gdb_cv_have_aix_thread_debug=yes
12711 else
12712   gdb_cv_have_aix_thread_debug=no
12713 fi
12714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12715 fi
12716
12717       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12718 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
12719       if test $gdb_cv_have_aix_thread_debug = yes; then
12720          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
12721          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
12722          LIBS="$LIBS -lpthdebug"
12723
12724          # Older versions of AIX do not provide the declaration for
12725          # the getthrds function (it appears that it was introduced
12726          # with AIX 6.x).
12727          ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12728 "
12729 if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12730   ac_have_decl=1
12731 else
12732   ac_have_decl=0
12733 fi
12734
12735 cat >>confdefs.h <<_ACEOF
12736 #define HAVE_DECL_GETTHRDS $ac_have_decl
12737 _ACEOF
12738
12739       fi
12740       ;;
12741    esac
12742
12743 fi
12744
12745 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
12746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12747 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12748 if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12749   $as_echo_n "(cached) " >&6
12750 else
12751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12752 /* end confdefs.h.  */
12753 #include <thread_db.h>
12754 int
12755 main ()
12756 {
12757 int i = TD_NOTALLOC;
12758   ;
12759   return 0;
12760 }
12761 _ACEOF
12762 if ac_fn_c_try_compile "$LINENO"; then :
12763   gdb_cv_thread_db_h_has_td_notalloc=yes
12764 else
12765   gdb_cv_thread_db_h_has_td_notalloc=no
12766
12767 fi
12768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12769
12770 fi
12771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12772 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12774 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12775 if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12776   $as_echo_n "(cached) " >&6
12777 else
12778   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12779 /* end confdefs.h.  */
12780 #include <thread_db.h>
12781 int
12782 main ()
12783 {
12784 int i = TD_VERSION;
12785   ;
12786   return 0;
12787 }
12788 _ACEOF
12789 if ac_fn_c_try_compile "$LINENO"; then :
12790   gdb_cv_thread_db_h_has_td_version=yes
12791 else
12792   gdb_cv_thread_db_h_has_td_version=no
12793
12794 fi
12795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12796
12797 fi
12798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12799 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12801 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12802 if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12803   $as_echo_n "(cached) " >&6
12804 else
12805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12806 /* end confdefs.h.  */
12807 #include <thread_db.h>
12808 int
12809 main ()
12810 {
12811 int i = TD_NOTLS;
12812   ;
12813   return 0;
12814 }
12815 _ACEOF
12816 if ac_fn_c_try_compile "$LINENO"; then :
12817   gdb_cv_thread_db_h_has_td_notls=yes
12818 else
12819   gdb_cv_thread_db_h_has_td_notls=no
12820
12821 fi
12822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12823
12824 fi
12825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12826 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
12827 fi
12828 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
12829
12830 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
12831
12832 fi
12833 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12834
12835 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
12836
12837 fi
12838 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12839
12840 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
12841
12842 fi
12843
12844 if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
12845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12846 $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12847 if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12848   $as_echo_n "(cached) " >&6
12849 else
12850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12851 /* end confdefs.h.  */
12852 #include <sys/syscall.h>
12853 int
12854 main ()
12855 {
12856 int i = __NR_tkill;
12857   ;
12858   return 0;
12859 }
12860 _ACEOF
12861 if ac_fn_c_try_compile "$LINENO"; then :
12862   gdb_cv_sys_syscall_h_has_tkill=yes
12863 else
12864   gdb_cv_sys_syscall_h_has_tkill=no
12865
12866 fi
12867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12868
12869 fi
12870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12871 $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
12872 fi
12873 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
12874   ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
12875 if test "x$ac_cv_func_syscall" = x""yes; then :
12876
12877 $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
12878
12879
12880 fi
12881
12882 fi
12883
12884 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12885 "
12886 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12887   ac_have_decl=1
12888 else
12889   ac_have_decl=0
12890 fi
12891
12892 cat >>confdefs.h <<_ACEOF
12893 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
12894 _ACEOF
12895
12896
12897 if test "$cross_compiling" = yes; then :
12898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12899 /* end confdefs.h.  */
12900 #include <sys/personality.h>
12901 int
12902 main ()
12903 {
12904
12905 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
12906 #       define ADDR_NO_RANDOMIZE 0x0040000
12907 #      endif
12908        /* Test the flag could be set and stays set.  */
12909        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12910        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12911            return 1
12912   ;
12913   return 0;
12914 }
12915 _ACEOF
12916 if ac_fn_c_try_link "$LINENO"; then :
12917   have_personality=true
12918 else
12919   have_personality=false
12920 fi
12921 rm -f core conftest.err conftest.$ac_objext \
12922     conftest$ac_exeext conftest.$ac_ext
12923 else
12924   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12925 /* end confdefs.h.  */
12926 #include <sys/personality.h>
12927 int
12928 main ()
12929 {
12930
12931 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
12932 #       define ADDR_NO_RANDOMIZE 0x0040000
12933 #      endif
12934        /* Test the flag could be set and stays set.  */
12935        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12936        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12937            return 1
12938   ;
12939   return 0;
12940 }
12941 _ACEOF
12942 if ac_fn_c_try_run "$LINENO"; then :
12943   have_personality=true
12944 else
12945   have_personality=false
12946 fi
12947 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12948   conftest.$ac_objext conftest.beam conftest.$ac_ext
12949 fi
12950
12951 if $have_personality
12952 then
12953
12954 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
12955
12956 fi
12957
12958 case $host_os in
12959   go32* | *djgpp*)
12960     gdbinit=gdb.ini
12961     ;;
12962   *)
12963     gdbinit=.gdbinit
12964     ;;
12965 esac
12966
12967 cat >>confdefs.h <<_ACEOF
12968 #define GDBINIT "$gdbinit"
12969 _ACEOF
12970
12971
12972
12973 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12974 # except that the argument to --with-sysroot is optional.
12975 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12976 if test "x$with_sysroot" = xyes; then
12977   with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12978 fi
12979
12980 # Check whether --with-sysroot was given.
12981 if test "${with_sysroot+set}" = set; then :
12982   withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12983 else
12984   TARGET_SYSTEM_ROOT=
12985 fi
12986
12987
12988   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12989   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12990   ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12991   ac_define_dir=`eval echo $ac_define_dir`
12992
12993 cat >>confdefs.h <<_ACEOF
12994 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
12995 _ACEOF
12996
12997
12998
12999
13000   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13001      if test "x$prefix" = xNONE; then
13002         test_prefix=/usr/local
13003      else
13004         test_prefix=$prefix
13005      fi
13006   else
13007      test_prefix=$exec_prefix
13008   fi
13009   value=0
13010   case ${ac_define_dir} in
13011      "${test_prefix}"|"${test_prefix}/"*|\
13012         '${exec_prefix}'|'${exec_prefix}/'*)
13013      value=1
13014      ;;
13015   esac
13016
13017 cat >>confdefs.h <<_ACEOF
13018 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
13019 _ACEOF
13020
13021
13022
13023
13024
13025 # Check whether --with-system-gdbinit was given.
13026 if test "${with_system_gdbinit+set}" = set; then :
13027   withval=$with_system_gdbinit;
13028     SYSTEM_GDBINIT=$withval
13029 else
13030   SYSTEM_GDBINIT=
13031 fi
13032
13033
13034   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
13035   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13036   ac_define_dir=`eval echo $SYSTEM_GDBINIT`
13037   ac_define_dir=`eval echo $ac_define_dir`
13038
13039 cat >>confdefs.h <<_ACEOF
13040 #define SYSTEM_GDBINIT "$ac_define_dir"
13041 _ACEOF
13042
13043
13044
13045
13046   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13047      if test "x$prefix" = xNONE; then
13048         test_prefix=/usr/local
13049      else
13050         test_prefix=$prefix
13051      fi
13052   else
13053      test_prefix=$exec_prefix
13054   fi
13055   value=0
13056   case ${ac_define_dir} in
13057      "${test_prefix}"|"${test_prefix}/"*|\
13058         '${exec_prefix}'|'${exec_prefix}/'*)
13059      value=1
13060      ;;
13061   esac
13062
13063 cat >>confdefs.h <<_ACEOF
13064 #define SYSTEM_GDBINIT_RELOCATABLE $value
13065 _ACEOF
13066
13067
13068
13069
13070 # Check whether --enable-werror was given.
13071 if test "${enable_werror+set}" = set; then :
13072   enableval=$enable_werror; case "${enableval}" in
13073      yes | y) ERROR_ON_WARNING="yes" ;;
13074      no | n)  ERROR_ON_WARNING="no" ;;
13075      *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
13076    esac
13077 fi
13078
13079
13080 # Enable -Werror by default when using gcc.  Turn it off for releases.
13081 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
13082     ERROR_ON_WARNING=yes
13083 fi
13084
13085 WERROR_CFLAGS=""
13086 if test "${ERROR_ON_WARNING}" = yes ; then
13087     WERROR_CFLAGS="-Werror"
13088 fi
13089
13090 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
13091 -Wpointer-sign \
13092 -Wno-unused -Wunused-value -Wunused-function \
13093 -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
13094 -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
13095 -Wold-style-declaration -Wold-style-definition"
13096
13097 # Enable -Wno-format by default when using gcc on mingw since many
13098 # GCC versions complain about %I64.
13099 case "${host}" in
13100   *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
13101   *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
13102 esac
13103
13104 # Check whether --enable-build-warnings was given.
13105 if test "${enable_build_warnings+set}" = set; then :
13106   enableval=$enable_build_warnings; case "${enableval}" in
13107   yes)  ;;
13108   no)   build_warnings="-w";;
13109   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
13110         build_warnings="${build_warnings} ${t}";;
13111   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
13112         build_warnings="${t} ${build_warnings}";;
13113   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13114 esac
13115 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13116   echo "Setting compiler warning flags = $build_warnings" 6>&1
13117 fi
13118 fi
13119 # Check whether --enable-gdb-build-warnings was given.
13120 if test "${enable_gdb_build_warnings+set}" = set; then :
13121   enableval=$enable_gdb_build_warnings; case "${enableval}" in
13122   yes)  ;;
13123   no)   build_warnings="-w";;
13124   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
13125         build_warnings="${build_warnings} ${t}";;
13126   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
13127         build_warnings="${t} ${build_warnings}";;
13128   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13129 esac
13130 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13131   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13132 fi
13133 fi
13134 WARN_CFLAGS=""
13135 if test "x${build_warnings}" != x -a "x$GCC" = xyes
13136 then
13137     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13138 $as_echo_n "checking compiler warning flags... " >&6; }
13139     # Separate out the -Werror flag as some files just cannot be
13140     # compiled with it enabled.
13141     for w in ${build_warnings}; do
13142         case $w in
13143         -Werr*) WERROR_CFLAGS=-Werror ;;
13144         *) # Check that GCC accepts it
13145             saved_CFLAGS="$CFLAGS"
13146             CFLAGS="$CFLAGS $w"
13147             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13148 /* end confdefs.h.  */
13149
13150 int
13151 main ()
13152 {
13153
13154   ;
13155   return 0;
13156 }
13157 _ACEOF
13158 if ac_fn_c_try_compile "$LINENO"; then :
13159   WARN_CFLAGS="${WARN_CFLAGS} $w"
13160 fi
13161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13162             CFLAGS="$saved_CFLAGS"
13163         esac
13164     done
13165     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13166 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
13167 fi
13168
13169
13170
13171 # In the Cygwin environment, we need some additional flags.
13172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
13173 $as_echo_n "checking for cygwin... " >&6; }
13174 if test "${gdb_cv_os_cygwin+set}" = set; then :
13175   $as_echo_n "(cached) " >&6
13176 else
13177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13178 /* end confdefs.h.  */
13179
13180 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
13181 lose
13182 #endif
13183 _ACEOF
13184 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13185   $EGREP "^lose$" >/dev/null 2>&1; then :
13186   gdb_cv_os_cygwin=yes
13187 else
13188   gdb_cv_os_cygwin=no
13189 fi
13190 rm -f conftest*
13191
13192 fi
13193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
13194 $as_echo "$gdb_cv_os_cygwin" >&6; }
13195
13196
13197 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
13198 case ${host} in
13199   *go32* ) SER_HARDWIRE=ser-go32.o ;;
13200   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
13201   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
13202 esac
13203
13204
13205 # libreadline needs libuser32.a in a cygwin environment
13206 WIN32LIBS=
13207 if test x$gdb_cv_os_cygwin = xyes; then
13208     WIN32LIBS="-luser32"
13209     case "${target}" in
13210         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13211         ;;
13212     esac
13213 fi
13214
13215 # The ser-tcp.c module requires sockets.
13216 case ${host} in
13217   *mingw32*)
13218
13219 $as_echo "#define USE_WIN32API 1" >>confdefs.h
13220
13221     WIN32LIBS="$WIN32LIBS -lws2_32"
13222     ;;
13223 esac
13224
13225
13226 # Add ELF support to GDB, but only if BFD includes ELF support.
13227
13228   OLD_CFLAGS=$CFLAGS
13229   OLD_LDFLAGS=$LDFLAGS
13230   OLD_LIBS=$LIBS
13231   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13232   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13233   # always want our bfd.
13234   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13235   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13236   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13237   LIBS="-lbfd -liberty $intl $LIBS"
13238   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
13239 $as_echo_n "checking for ELF support in BFD... " >&6; }
13240 if test "${gdb_cv_var_elf+set}" = set; then :
13241   $as_echo_n "(cached) " >&6
13242 else
13243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13244 /* end confdefs.h.  */
13245 #include <stdlib.h>
13246   #include "bfd.h"
13247   #include "elf-bfd.h"
13248
13249 int
13250 main ()
13251 {
13252 return bfd_get_elf_phdr_upper_bound (NULL);
13253   ;
13254   return 0;
13255 }
13256 _ACEOF
13257 if ac_fn_c_try_link "$LINENO"; then :
13258   gdb_cv_var_elf=yes
13259 else
13260   gdb_cv_var_elf=no
13261 fi
13262 rm -f core conftest.err conftest.$ac_objext \
13263     conftest$ac_exeext conftest.$ac_ext
13264 fi
13265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13266 $as_echo "$gdb_cv_var_elf" >&6; }
13267   CFLAGS=$OLD_CFLAGS
13268   LDFLAGS=$OLD_LDFLAGS
13269   LIBS=$OLD_LIBS
13270 if test $gdb_cv_var_elf = yes; then
13271   CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
13272
13273 $as_echo "#define HAVE_ELF 1" >>confdefs.h
13274
13275   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13276   if test "$plugins" = "yes"; then
13277     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13278 $as_echo_n "checking for library containing dlopen... " >&6; }
13279 if test "${ac_cv_search_dlopen+set}" = set; then :
13280   $as_echo_n "(cached) " >&6
13281 else
13282   ac_func_search_save_LIBS=$LIBS
13283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13284 /* end confdefs.h.  */
13285
13286 /* Override any GCC internal prototype to avoid an error.
13287    Use char because int might match the return type of a GCC
13288    builtin and then its argument prototype would still apply.  */
13289 #ifdef __cplusplus
13290 extern "C"
13291 #endif
13292 char dlopen ();
13293 int
13294 main ()
13295 {
13296 return dlopen ();
13297   ;
13298   return 0;
13299 }
13300 _ACEOF
13301 for ac_lib in '' dl; do
13302   if test -z "$ac_lib"; then
13303     ac_res="none required"
13304   else
13305     ac_res=-l$ac_lib
13306     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13307   fi
13308   if ac_fn_c_try_link "$LINENO"; then :
13309   ac_cv_search_dlopen=$ac_res
13310 fi
13311 rm -f core conftest.err conftest.$ac_objext \
13312     conftest$ac_exeext
13313   if test "${ac_cv_search_dlopen+set}" = set; then :
13314   break
13315 fi
13316 done
13317 if test "${ac_cv_search_dlopen+set}" = set; then :
13318
13319 else
13320   ac_cv_search_dlopen=no
13321 fi
13322 rm conftest.$ac_ext
13323 LIBS=$ac_func_search_save_LIBS
13324 fi
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13326 $as_echo "$ac_cv_search_dlopen" >&6; }
13327 ac_res=$ac_cv_search_dlopen
13328 if test "$ac_res" != no; then :
13329   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13330
13331 fi
13332
13333   fi
13334 fi
13335
13336 # Add macho support to GDB, but only if BFD includes it.
13337
13338   OLD_CFLAGS=$CFLAGS
13339   OLD_LDFLAGS=$LDFLAGS
13340   OLD_LIBS=$LIBS
13341   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13342   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13343   # always want our bfd.
13344   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13345   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13346   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13347   LIBS="-lbfd -liberty $intl $LIBS"
13348   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
13349 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
13350 if test "${gdb_cv_var_macho+set}" = set; then :
13351   $as_echo_n "(cached) " >&6
13352 else
13353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13354 /* end confdefs.h.  */
13355 #include <stdlib.h>
13356   #include "bfd.h"
13357   #include "mach-o.h"
13358
13359 int
13360 main ()
13361 {
13362 return bfd_mach_o_lookup_command (NULL, 0, NULL);
13363   ;
13364   return 0;
13365 }
13366 _ACEOF
13367 if ac_fn_c_try_link "$LINENO"; then :
13368   gdb_cv_var_macho=yes
13369 else
13370   gdb_cv_var_macho=no
13371 fi
13372 rm -f core conftest.err conftest.$ac_objext \
13373     conftest$ac_exeext conftest.$ac_ext
13374 fi
13375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
13376 $as_echo "$gdb_cv_var_macho" >&6; }
13377   CFLAGS=$OLD_CFLAGS
13378   LDFLAGS=$OLD_LDFLAGS
13379   LIBS=$OLD_LIBS
13380 if test $gdb_cv_var_macho = yes; then
13381   CONFIG_OBS="$CONFIG_OBS machoread.o"
13382 fi
13383
13384 # Add SOM support to GDB, but only if BFD includes it.
13385
13386   OLD_CFLAGS=$CFLAGS
13387   OLD_LDFLAGS=$LDFLAGS
13388   OLD_LIBS=$LIBS
13389   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13390   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
13391   # always want our bfd.
13392   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13393   LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13394   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
13395   LIBS="-lbfd -liberty $intl $LIBS"
13396   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
13397 $as_echo_n "checking for SOM support in BFD... " >&6; }
13398 if test "${gdb_cv_var_som+set}" = set; then :
13399   $as_echo_n "(cached) " >&6
13400 else
13401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13402 /* end confdefs.h.  */
13403 #include <stdlib.h>
13404   #include "bfd.h"
13405   #include "som.h"
13406
13407 int
13408 main ()
13409 {
13410 return bfd_som_attach_aux_hdr (NULL, 0, NULL);
13411   ;
13412   return 0;
13413 }
13414 _ACEOF
13415 if ac_fn_c_try_link "$LINENO"; then :
13416   gdb_cv_var_som=yes
13417 else
13418   gdb_cv_var_som=no
13419 fi
13420 rm -f core conftest.err conftest.$ac_objext \
13421     conftest$ac_exeext conftest.$ac_ext
13422 fi
13423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
13424 $as_echo "$gdb_cv_var_som" >&6; }
13425   CFLAGS=$OLD_CFLAGS
13426   LDFLAGS=$OLD_LDFLAGS
13427   LIBS=$OLD_LIBS
13428 if test $gdb_cv_var_som = yes; then
13429   CONFIG_OBS="$CONFIG_OBS somread.o"
13430 fi
13431
13432 # Add any host-specific objects to GDB.
13433 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13434
13435 # If building on ELF, look for lzma support for embedded compressed debug info.
13436 if test $gdb_cv_var_elf = yes; then
13437
13438 # Check whether --with-lzma was given.
13439 if test "${with_lzma+set}" = set; then :
13440   withval=$with_lzma;
13441 else
13442   with_lzma=auto
13443 fi
13444
13445   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13446 $as_echo_n "checking whether to use lzma... " >&6; }
13447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13448 $as_echo "$with_lzma" >&6; }
13449
13450   if test "${with_lzma}" != no; then
13451
13452
13453
13454
13455
13456
13457
13458
13459     use_additional=yes
13460
13461   acl_save_prefix="$prefix"
13462   prefix="$acl_final_prefix"
13463   acl_save_exec_prefix="$exec_prefix"
13464   exec_prefix="$acl_final_exec_prefix"
13465
13466     eval additional_includedir=\"$includedir\"
13467     eval additional_libdir=\"$libdir\"
13468
13469   exec_prefix="$acl_save_exec_prefix"
13470   prefix="$acl_save_prefix"
13471
13472
13473 # Check whether --with-liblzma-prefix was given.
13474 if test "${with_liblzma_prefix+set}" = set; then :
13475   withval=$with_liblzma_prefix;
13476     if test "X$withval" = "Xno"; then
13477       use_additional=no
13478     else
13479       if test "X$withval" = "X"; then
13480
13481   acl_save_prefix="$prefix"
13482   prefix="$acl_final_prefix"
13483   acl_save_exec_prefix="$exec_prefix"
13484   exec_prefix="$acl_final_exec_prefix"
13485
13486           eval additional_includedir=\"$includedir\"
13487           eval additional_libdir=\"$libdir\"
13488
13489   exec_prefix="$acl_save_exec_prefix"
13490   prefix="$acl_save_prefix"
13491
13492       else
13493         additional_includedir="$withval/include"
13494         additional_libdir="$withval/lib"
13495       fi
13496     fi
13497
13498 fi
13499
13500       LIBLZMA=
13501   LTLIBLZMA=
13502   INCLZMA=
13503   rpathdirs=
13504   ltrpathdirs=
13505   names_already_handled=
13506   names_next_round='lzma '
13507   while test -n "$names_next_round"; do
13508     names_this_round="$names_next_round"
13509     names_next_round=
13510     for name in $names_this_round; do
13511       already_handled=
13512       for n in $names_already_handled; do
13513         if test "$n" = "$name"; then
13514           already_handled=yes
13515           break
13516         fi
13517       done
13518       if test -z "$already_handled"; then
13519         names_already_handled="$names_already_handled $name"
13520                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13521         eval value=\"\$HAVE_LIB$uppername\"
13522         if test -n "$value"; then
13523           if test "$value" = yes; then
13524             eval value=\"\$LIB$uppername\"
13525             test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13526             eval value=\"\$LTLIB$uppername\"
13527             test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13528           else
13529                                     :
13530           fi
13531         else
13532                               found_dir=
13533           found_la=
13534           found_so=
13535           found_a=
13536           if test $use_additional = yes; then
13537             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13538               found_dir="$additional_libdir"
13539               found_so="$additional_libdir/lib$name.$shlibext"
13540               if test -f "$additional_libdir/lib$name.la"; then
13541                 found_la="$additional_libdir/lib$name.la"
13542               fi
13543             else
13544               if test -f "$additional_libdir/lib$name.$libext"; then
13545                 found_dir="$additional_libdir"
13546                 found_a="$additional_libdir/lib$name.$libext"
13547                 if test -f "$additional_libdir/lib$name.la"; then
13548                   found_la="$additional_libdir/lib$name.la"
13549                 fi
13550               fi
13551             fi
13552           fi
13553           if test "X$found_dir" = "X"; then
13554             for x in $LDFLAGS $LTLIBLZMA; do
13555
13556   acl_save_prefix="$prefix"
13557   prefix="$acl_final_prefix"
13558   acl_save_exec_prefix="$exec_prefix"
13559   exec_prefix="$acl_final_exec_prefix"
13560   eval x=\"$x\"
13561   exec_prefix="$acl_save_exec_prefix"
13562   prefix="$acl_save_prefix"
13563
13564               case "$x" in
13565                 -L*)
13566                   dir=`echo "X$x" | sed -e 's/^X-L//'`
13567                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13568                     found_dir="$dir"
13569                     found_so="$dir/lib$name.$shlibext"
13570                     if test -f "$dir/lib$name.la"; then
13571                       found_la="$dir/lib$name.la"
13572                     fi
13573                   else
13574                     if test -f "$dir/lib$name.$libext"; then
13575                       found_dir="$dir"
13576                       found_a="$dir/lib$name.$libext"
13577                       if test -f "$dir/lib$name.la"; then
13578                         found_la="$dir/lib$name.la"
13579                       fi
13580                     fi
13581                   fi
13582                   ;;
13583               esac
13584               if test "X$found_dir" != "X"; then
13585                 break
13586               fi
13587             done
13588           fi
13589           if test "X$found_dir" != "X"; then
13590                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13591             if test "X$found_so" != "X"; then
13592                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13593                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13594               else
13595                                                                                 haveit=
13596                 for x in $ltrpathdirs; do
13597                   if test "X$x" = "X$found_dir"; then
13598                     haveit=yes
13599                     break
13600                   fi
13601                 done
13602                 if test -z "$haveit"; then
13603                   ltrpathdirs="$ltrpathdirs $found_dir"
13604                 fi
13605                                 if test "$hardcode_direct" = yes; then
13606                                                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13607                 else
13608                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13609                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13610                                                             haveit=
13611                     for x in $rpathdirs; do
13612                       if test "X$x" = "X$found_dir"; then
13613                         haveit=yes
13614                         break
13615                       fi
13616                     done
13617                     if test -z "$haveit"; then
13618                       rpathdirs="$rpathdirs $found_dir"
13619                     fi
13620                   else
13621                                                                                 haveit=
13622                     for x in $LDFLAGS $LIBLZMA; do
13623
13624   acl_save_prefix="$prefix"
13625   prefix="$acl_final_prefix"
13626   acl_save_exec_prefix="$exec_prefix"
13627   exec_prefix="$acl_final_exec_prefix"
13628   eval x=\"$x\"
13629   exec_prefix="$acl_save_exec_prefix"
13630   prefix="$acl_save_prefix"
13631
13632                       if test "X$x" = "X-L$found_dir"; then
13633                         haveit=yes
13634                         break
13635                       fi
13636                     done
13637                     if test -z "$haveit"; then
13638                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13639                     fi
13640                     if test "$hardcode_minus_L" != no; then
13641                                                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13642                     else
13643                                                                                                                                                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13644                     fi
13645                   fi
13646                 fi
13647               fi
13648             else
13649               if test "X$found_a" != "X"; then
13650                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13651               else
13652                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13653               fi
13654             fi
13655                         additional_includedir=
13656             case "$found_dir" in
13657               */lib | */lib/)
13658                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13659                 additional_includedir="$basedir/include"
13660                 ;;
13661             esac
13662             if test "X$additional_includedir" != "X"; then
13663                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
13664                 haveit=
13665                 if test "X$additional_includedir" = "X/usr/local/include"; then
13666                   if test -n "$GCC"; then
13667                     case $host_os in
13668                       linux*) haveit=yes;;
13669                     esac
13670                   fi
13671                 fi
13672                 if test -z "$haveit"; then
13673                   for x in $CPPFLAGS $INCLZMA; do
13674
13675   acl_save_prefix="$prefix"
13676   prefix="$acl_final_prefix"
13677   acl_save_exec_prefix="$exec_prefix"
13678   exec_prefix="$acl_final_exec_prefix"
13679   eval x=\"$x\"
13680   exec_prefix="$acl_save_exec_prefix"
13681   prefix="$acl_save_prefix"
13682
13683                     if test "X$x" = "X-I$additional_includedir"; then
13684                       haveit=yes
13685                       break
13686                     fi
13687                   done
13688                   if test -z "$haveit"; then
13689                     if test -d "$additional_includedir"; then
13690                                             INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13691                     fi
13692                   fi
13693                 fi
13694               fi
13695             fi
13696                         if test -n "$found_la"; then
13697                                                         save_libdir="$libdir"
13698               case "$found_la" in
13699                 */* | *\\*) . "$found_la" ;;
13700                 *) . "./$found_la" ;;
13701               esac
13702               libdir="$save_libdir"
13703                             for dep in $dependency_libs; do
13704                 case "$dep" in
13705                   -L*)
13706                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13707                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
13708                       haveit=
13709                       if test "X$additional_libdir" = "X/usr/local/lib"; then
13710                         if test -n "$GCC"; then
13711                           case $host_os in
13712                             linux*) haveit=yes;;
13713                           esac
13714                         fi
13715                       fi
13716                       if test -z "$haveit"; then
13717                         haveit=
13718                         for x in $LDFLAGS $LIBLZMA; do
13719
13720   acl_save_prefix="$prefix"
13721   prefix="$acl_final_prefix"
13722   acl_save_exec_prefix="$exec_prefix"
13723   exec_prefix="$acl_final_exec_prefix"
13724   eval x=\"$x\"
13725   exec_prefix="$acl_save_exec_prefix"
13726   prefix="$acl_save_prefix"
13727
13728                           if test "X$x" = "X-L$additional_libdir"; then
13729                             haveit=yes
13730                             break
13731                           fi
13732                         done
13733                         if test -z "$haveit"; then
13734                           if test -d "$additional_libdir"; then
13735                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13736                           fi
13737                         fi
13738                         haveit=
13739                         for x in $LDFLAGS $LTLIBLZMA; do
13740
13741   acl_save_prefix="$prefix"
13742   prefix="$acl_final_prefix"
13743   acl_save_exec_prefix="$exec_prefix"
13744   exec_prefix="$acl_final_exec_prefix"
13745   eval x=\"$x\"
13746   exec_prefix="$acl_save_exec_prefix"
13747   prefix="$acl_save_prefix"
13748
13749                           if test "X$x" = "X-L$additional_libdir"; then
13750                             haveit=yes
13751                             break
13752                           fi
13753                         done
13754                         if test -z "$haveit"; then
13755                           if test -d "$additional_libdir"; then
13756                                                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13757                           fi
13758                         fi
13759                       fi
13760                     fi
13761                     ;;
13762                   -R*)
13763                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
13764                     if test "$enable_rpath" != no; then
13765                                                                   haveit=
13766                       for x in $rpathdirs; do
13767                         if test "X$x" = "X$dir"; then
13768                           haveit=yes
13769                           break
13770                         fi
13771                       done
13772                       if test -z "$haveit"; then
13773                         rpathdirs="$rpathdirs $dir"
13774                       fi
13775                                                                   haveit=
13776                       for x in $ltrpathdirs; do
13777                         if test "X$x" = "X$dir"; then
13778                           haveit=yes
13779                           break
13780                         fi
13781                       done
13782                       if test -z "$haveit"; then
13783                         ltrpathdirs="$ltrpathdirs $dir"
13784                       fi
13785                     fi
13786                     ;;
13787                   -l*)
13788                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13789                     ;;
13790                   *.la)
13791                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13792                     ;;
13793                   *)
13794                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13795                     LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13796                     ;;
13797                 esac
13798               done
13799             fi
13800           else
13801                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13802             LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13803           fi
13804         fi
13805       fi
13806     done
13807   done
13808   if test "X$rpathdirs" != "X"; then
13809     if test -n "$hardcode_libdir_separator"; then
13810                         alldirs=
13811       for found_dir in $rpathdirs; do
13812         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13813       done
13814             acl_save_libdir="$libdir"
13815       libdir="$alldirs"
13816       eval flag=\"$hardcode_libdir_flag_spec\"
13817       libdir="$acl_save_libdir"
13818       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13819     else
13820             for found_dir in $rpathdirs; do
13821         acl_save_libdir="$libdir"
13822         libdir="$found_dir"
13823         eval flag=\"$hardcode_libdir_flag_spec\"
13824         libdir="$acl_save_libdir"
13825         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13826       done
13827     fi
13828   fi
13829   if test "X$ltrpathdirs" != "X"; then
13830             for found_dir in $ltrpathdirs; do
13831       LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13832     done
13833   fi
13834
13835
13836         ac_save_CPPFLAGS="$CPPFLAGS"
13837
13838   for element in $INCLZMA; do
13839     haveit=
13840     for x in $CPPFLAGS; do
13841
13842   acl_save_prefix="$prefix"
13843   prefix="$acl_final_prefix"
13844   acl_save_exec_prefix="$exec_prefix"
13845   exec_prefix="$acl_final_exec_prefix"
13846   eval x=\"$x\"
13847   exec_prefix="$acl_save_exec_prefix"
13848   prefix="$acl_save_prefix"
13849
13850       if test "X$x" = "X$element"; then
13851         haveit=yes
13852         break
13853       fi
13854     done
13855     if test -z "$haveit"; then
13856       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13857     fi
13858   done
13859
13860
13861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13862 $as_echo_n "checking for liblzma... " >&6; }
13863 if test "${ac_cv_liblzma+set}" = set; then :
13864   $as_echo_n "(cached) " >&6
13865 else
13866
13867     ac_save_LIBS="$LIBS"
13868     LIBS="$LIBS $LIBLZMA"
13869     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13870 /* end confdefs.h.  */
13871 #include "lzma.h"
13872 int
13873 main ()
13874 {
13875 lzma_index_iter iter;
13876                            lzma_index_iter_init (&iter, 0);
13877                            lzma_mf_is_supported (LZMA_MF_HC3);
13878   ;
13879   return 0;
13880 }
13881 _ACEOF
13882 if ac_fn_c_try_link "$LINENO"; then :
13883   ac_cv_liblzma=yes
13884 else
13885   ac_cv_liblzma=no
13886 fi
13887 rm -f core conftest.err conftest.$ac_objext \
13888     conftest$ac_exeext conftest.$ac_ext
13889     LIBS="$ac_save_LIBS"
13890
13891 fi
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13893 $as_echo "$ac_cv_liblzma" >&6; }
13894   if test "$ac_cv_liblzma" = yes; then
13895     HAVE_LIBLZMA=yes
13896
13897 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13898
13899     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13900 $as_echo_n "checking how to link with liblzma... " >&6; }
13901     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13902 $as_echo "$LIBLZMA" >&6; }
13903   else
13904     HAVE_LIBLZMA=no
13905             CPPFLAGS="$ac_save_CPPFLAGS"
13906     LIBLZMA=
13907     LTLIBLZMA=
13908   fi
13909
13910
13911
13912
13913
13914
13915     if test "$HAVE_LIBLZMA" != yes; then
13916       if test "$with_lzma" = yes; then
13917         as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
13918       fi
13919     fi
13920   fi
13921 fi
13922
13923 LIBGUI="../libgui/src/libgui.a"
13924 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13925
13926
13927
13928 WIN32LDAPP=
13929
13930
13931
13932 case "${host}" in
13933 *-*-cygwin* | *-*-mingw* )
13934     configdir="win"
13935     ;;
13936 *)
13937     configdir="unix"
13938     ;;
13939 esac
13940
13941 GDBTKLIBS=
13942 if test "${enable_gdbtk}" = "yes"; then
13943
13944     # Gdbtk must have an absolute path to srcdir in order to run
13945     # properly when not installed.
13946     here=`pwd`
13947     cd ${srcdir}
13948     GDBTK_SRC_DIR=`pwd`
13949     cd $here
13950
13951
13952     #
13953     # Ok, lets find the tcl configuration
13954     # First, look for one uninstalled.
13955     # the alternative search directory is invoked by --with-tcl
13956     #
13957
13958     if test x"${no_tcl}" = x ; then
13959         # we reset no_tcl in case something fails here
13960         no_tcl=true
13961
13962 # Check whether --with-tcl was given.
13963 if test "${with_tcl+set}" = set; then :
13964   withval=$with_tcl; with_tclconfig=${withval}
13965 fi
13966
13967         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13968 $as_echo_n "checking for Tcl configuration... " >&6; }
13969         if test "${ac_cv_c_tclconfig+set}" = set; then :
13970   $as_echo_n "(cached) " >&6
13971 else
13972
13973
13974             # First check to see if --with-tcl was specified.
13975             case "${host}" in
13976                 *-*-cygwin*) platDir="win" ;;
13977                 *) platDir="unix" ;;
13978             esac
13979             if test x"${with_tclconfig}" != x ; then
13980                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13981                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13982                 else
13983                     as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
13984                 fi
13985             fi
13986
13987             # then check for a private Tcl installation
13988             if test x"${ac_cv_c_tclconfig}" = x ; then
13989                 for i in \
13990                         ../tcl \
13991                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13992                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13993                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13994                         ../../tcl \
13995                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13996                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13997                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13998                         ../../../tcl \
13999                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14000                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
14001                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
14002                     if test -f "$i/$platDir/tclConfig.sh" ; then
14003                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14004                         break
14005                     fi
14006                 done
14007             fi
14008
14009             # on Darwin, check in Framework installation locations
14010             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
14011                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14012                         `ls -d /Library/Frameworks 2>/dev/null` \
14013                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
14014                         `ls -d /System/Library/Frameworks 2>/dev/null` \
14015                         ; do
14016                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
14017                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
14018                         break
14019                     fi
14020                 done
14021             fi
14022
14023             # check in a few common install locations
14024             if test x"${ac_cv_c_tclconfig}" = x ; then
14025                 for i in `ls -d ${libdir} 2>/dev/null` \
14026                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
14027                         `ls -d ${prefix}/lib 2>/dev/null` \
14028                         `ls -d /usr/local/lib 2>/dev/null` \
14029                         `ls -d /usr/contrib/lib 2>/dev/null` \
14030                         `ls -d /usr/lib 2>/dev/null` \
14031                         ; do
14032                     if test -f "$i/tclConfig.sh" ; then
14033                         ac_cv_c_tclconfig=`(cd $i; pwd)`
14034                         break
14035                     fi
14036                 done
14037             fi
14038
14039             # check in a few other private locations
14040             if test x"${ac_cv_c_tclconfig}" = x ; then
14041                 for i in \
14042                         ${srcdir}/../tcl \
14043                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14044                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
14045                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
14046                     if test -f "$i/$platDir/tclConfig.sh" ; then
14047                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14048                     break
14049                 fi
14050                 done
14051             fi
14052
14053 fi
14054
14055
14056         if test x"${ac_cv_c_tclconfig}" = x ; then
14057             TCL_BIN_DIR="# no Tcl configs found"
14058             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
14059 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
14060         else
14061             no_tcl=
14062             TCL_BIN_DIR=${ac_cv_c_tclconfig}
14063             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
14064 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
14065         fi
14066     fi
14067
14068
14069     # If $no_tk is nonempty, then we can't do Tk, and there is no
14070     # point to doing Tcl.
14071
14072     #
14073     # Ok, lets find the tk configuration
14074     # First, look for one uninstalled.
14075     # the alternative search directory is invoked by --with-tk
14076     #
14077
14078     if test x"${no_tk}" = x ; then
14079         # we reset no_tk in case something fails here
14080         no_tk=true
14081
14082 # Check whether --with-tk was given.
14083 if test "${with_tk+set}" = set; then :
14084   withval=$with_tk; with_tkconfig=${withval}
14085 fi
14086
14087         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
14088 $as_echo_n "checking for Tk configuration... " >&6; }
14089         if test "${ac_cv_c_tkconfig+set}" = set; then :
14090   $as_echo_n "(cached) " >&6
14091 else
14092
14093
14094             # First check to see if --with-tkconfig was specified.
14095             if test x"${with_tkconfig}" != x ; then
14096                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
14097                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
14098                 else
14099                     as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
14100                 fi
14101             fi
14102
14103             # then check for a private Tk library
14104             case "${host}" in
14105                 *-*-cygwin*) platDir="win" ;;
14106                 *) platDir="unix" ;;
14107             esac
14108             if test x"${ac_cv_c_tkconfig}" = x ; then
14109                 for i in \
14110                         ../tk \
14111                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14112                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
14113                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
14114                         ../../tk \
14115                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14116                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
14117                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
14118                         ../../../tk \
14119                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14120                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
14121                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
14122                     if test -f "$i/$platDir/tkConfig.sh" ; then
14123                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14124                         break
14125                     fi
14126                 done
14127             fi
14128
14129             # on Darwin, check in Framework installation locations
14130             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
14131                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14132                         `ls -d /Library/Frameworks 2>/dev/null` \
14133                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
14134                         `ls -d /System/Library/Frameworks 2>/dev/null` \
14135                         ; do
14136                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
14137                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
14138                         break
14139                     fi
14140                 done
14141             fi
14142
14143             # check in a few common install locations
14144             if test x"${ac_cv_c_tkconfig}" = x ; then
14145                 for i in `ls -d ${libdir} 2>/dev/null` \
14146                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
14147                         `ls -d ${prefix}/lib 2>/dev/null` \
14148                         `ls -d /usr/local/lib 2>/dev/null` \
14149                         `ls -d /usr/contrib/lib 2>/dev/null` \
14150                         `ls -d /usr/lib 2>/dev/null` \
14151                         ; do
14152                     if test -f "$i/tkConfig.sh" ; then
14153                         ac_cv_c_tkconfig=`(cd $i; pwd)`
14154                         break
14155                     fi
14156                 done
14157             fi
14158             # check in a few other private locations
14159             if test x"${ac_cv_c_tkconfig}" = x ; then
14160                 for i in \
14161                         ${srcdir}/../tk \
14162                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14163                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
14164                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
14165                     if test -f "$i/$platDir/tkConfig.sh" ; then
14166                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14167                         break
14168                     fi
14169                 done
14170             fi
14171
14172 fi
14173
14174
14175         if test x"${ac_cv_c_tkconfig}" = x ; then
14176             TK_BIN_DIR="# no Tk configs found"
14177             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
14178 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
14179         else
14180             no_tk=
14181             TK_BIN_DIR=${ac_cv_c_tkconfig}
14182             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
14183 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
14184         fi
14185     fi
14186
14187
14188     if test -z "${no_tcl}" -a -z "${no_tk}"; then
14189
14190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
14191 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
14192
14193     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
14194         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14195 $as_echo "loading" >&6; }
14196         . ${TCL_BIN_DIR}/tclConfig.sh
14197     else
14198         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
14199 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
14200     fi
14201
14202     # eval is required to do the TCL_DBGX substitution
14203     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
14204     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
14205
14206     # If the TCL_BIN_DIR is the build directory (not the install directory),
14207     # then set the common variable name to the value of the build variables.
14208     # For example, the variable TCL_LIB_SPEC will be set to the value
14209     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
14210     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
14211     # installed and uninstalled version of Tcl.
14212     if test -f "${TCL_BIN_DIR}/Makefile" ; then
14213         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
14214         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
14215         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
14216     elif test "`uname -s`" = "Darwin"; then
14217         # If Tcl was built as a framework, attempt to use the libraries
14218         # from the framework at the given location so that linking works
14219         # against Tcl.framework installed in an arbitrary location.
14220         case ${TCL_DEFS} in
14221             *TCL_FRAMEWORK*)
14222                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
14223                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
14224                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
14225                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
14226                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
14227                             break
14228                         fi
14229                     done
14230                 fi
14231                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
14232                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
14233                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
14234                 fi
14235                 ;;
14236         esac
14237     fi
14238
14239     # eval is required to do the TCL_DBGX substitution
14240     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
14241     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
14242     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
14243     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259         # Check for in-tree tcl
14260         here=`pwd`
14261         cd ${srcdir}/..
14262         topdir=`pwd`
14263         cd ${here}
14264
14265         intree="no"
14266         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
14267           intree="yes"
14268         fi
14269
14270         # Find Tcl private headers
14271         if test x"${intree}" = xno; then
14272
14273   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
14274 $as_echo_n "checking for Tcl private headers... " >&6; }
14275   private_dir=""
14276   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
14277   if test -f ${dir}/tclInt.h ; then
14278     private_dir=${dir}
14279   fi
14280
14281   if test x"${private_dir}" = x; then
14282     as_fn_error "could not find private Tcl headers" "$LINENO" 5
14283   else
14284     TCL_PRIVATE_INCLUDE="-I${private_dir}"
14285     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14286 $as_echo "${private_dir}" >&6; }
14287   fi
14288
14289           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
14290           TCL_LIBRARY="${TCL_LIB_SPEC}"
14291           TCL_DEPS=""
14292         else
14293           # If building tcl in the same src tree, private headers
14294           # are not needed, but we need to be sure to use the right
14295           # headers library
14296           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
14297           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
14298           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
14299         fi
14300
14301
14302
14303
14304
14305     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
14306 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
14307
14308     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
14309         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14310 $as_echo "loading" >&6; }
14311         . ${TK_BIN_DIR}/tkConfig.sh
14312     else
14313         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
14314 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
14315     fi
14316
14317     # eval is required to do the TK_DBGX substitution
14318     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
14319     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
14320
14321     # If the TK_BIN_DIR is the build directory (not the install directory),
14322     # then set the common variable name to the value of the build variables.
14323     # For example, the variable TK_LIB_SPEC will be set to the value
14324     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
14325     # instead of TK_BUILD_LIB_SPEC since it will work with both an
14326     # installed and uninstalled version of Tcl.
14327     if test -f "${TK_BIN_DIR}/Makefile" ; then
14328         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
14329         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
14330         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
14331     elif test "`uname -s`" = "Darwin"; then
14332         # If Tk was built as a framework, attempt to use the libraries
14333         # from the framework at the given location so that linking works
14334         # against Tk.framework installed in an arbitrary location.
14335         case ${TK_DEFS} in
14336             *TK_FRAMEWORK*)
14337                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
14338                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
14339                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
14340                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
14341                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
14342                             break
14343                         fi
14344                     done
14345                 fi
14346                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
14347                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
14348                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
14349                 fi
14350                 ;;
14351         esac
14352     fi
14353
14354     # eval is required to do the TK_DBGX substitution
14355     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
14356     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
14357     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
14358     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373         # Check for in-tree Tk
14374         intree="no"
14375         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14376           intree="yes"
14377         fi
14378
14379         # Find Tk private headers
14380         if test x"${intree}" = xno; then
14381
14382   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14383 $as_echo_n "checking for Tk private headers... " >&6; }
14384   private_dir=""
14385   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14386   if test -f ${dir}/tkInt.h; then
14387     private_dir=${dir}
14388   fi
14389
14390   if test x"${private_dir}" = x; then
14391     as_fn_error "could not find Tk private headers" "$LINENO" 5
14392   else
14393     TK_PRIVATE_INCLUDE="-I${private_dir}"
14394     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14395 $as_echo "${private_dir}" >&6; }
14396   fi
14397
14398           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14399           TK_LIBRARY=${TK_LIB_SPEC}
14400           TK_DEPS=""
14401         else
14402           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14403           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14404           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14405         fi
14406
14407
14408
14409
14410
14411         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
14412
14413         # Include some libraries that Tcl and Tk want.
14414         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14415         # Yes, the ordering seems wrong here.  But it isn't.
14416         # TK_LIBS is the list of libraries that need to be linked
14417         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
14418         # were in LIBS then any link tests after this point would
14419         # try to include things like `$(LIBGUI)', which wouldn't work.
14420         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
14421
14422         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14423         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14424         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14425         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14426         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14427         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14428         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
14429
14430         if test x$gdb_cv_os_cygwin = xyes; then
14431           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14432           WIN32LDAPP="-Wl,--subsystem,console"
14433           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
14434         fi
14435
14436         subdirs="$subdirs gdbtk"
14437
14438     fi
14439 fi
14440
14441
14442
14443
14444
14445
14446
14447
14448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14449 $as_echo_n "checking for X... " >&6; }
14450
14451
14452 # Check whether --with-x was given.
14453 if test "${with_x+set}" = set; then :
14454   withval=$with_x;
14455 fi
14456
14457 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14458 if test "x$with_x" = xno; then
14459   # The user explicitly disabled X.
14460   have_x=disabled
14461 else
14462   case $x_includes,$x_libraries in #(
14463     *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14464     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14465   $as_echo_n "(cached) " >&6
14466 else
14467   # One or both of the vars are not set, and there is no cached value.
14468 ac_x_includes=no ac_x_libraries=no
14469 rm -f -r conftest.dir
14470 if mkdir conftest.dir; then
14471   cd conftest.dir
14472   cat >Imakefile <<'_ACEOF'
14473 incroot:
14474         @echo incroot='${INCROOT}'
14475 usrlibdir:
14476         @echo usrlibdir='${USRLIBDIR}'
14477 libdir:
14478         @echo libdir='${LIBDIR}'
14479 _ACEOF
14480   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
14481     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
14482     for ac_var in incroot usrlibdir libdir; do
14483       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14484     done
14485     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
14486     for ac_extension in a so sl dylib la dll; do
14487       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14488          test -f "$ac_im_libdir/libX11.$ac_extension"; then
14489         ac_im_usrlibdir=$ac_im_libdir; break
14490       fi
14491     done
14492     # Screen out bogus values from the imake configuration.  They are
14493     # bogus both because they are the default anyway, and because
14494     # using them would break gcc on systems where it needs fixed includes.
14495     case $ac_im_incroot in
14496         /usr/include) ac_x_includes= ;;
14497         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
14498     esac
14499     case $ac_im_usrlibdir in
14500         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
14501         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
14502     esac
14503   fi
14504   cd ..
14505   rm -f -r conftest.dir
14506 fi
14507
14508 # Standard set of common directories for X headers.
14509 # Check X11 before X11Rn because it is often a symlink to the current release.
14510 ac_x_header_dirs='
14511 /usr/X11/include
14512 /usr/X11R7/include
14513 /usr/X11R6/include
14514 /usr/X11R5/include
14515 /usr/X11R4/include
14516
14517 /usr/include/X11
14518 /usr/include/X11R7
14519 /usr/include/X11R6
14520 /usr/include/X11R5
14521 /usr/include/X11R4
14522
14523 /usr/local/X11/include
14524 /usr/local/X11R7/include
14525 /usr/local/X11R6/include
14526 /usr/local/X11R5/include
14527 /usr/local/X11R4/include
14528
14529 /usr/local/include/X11
14530 /usr/local/include/X11R7
14531 /usr/local/include/X11R6
14532 /usr/local/include/X11R5
14533 /usr/local/include/X11R4
14534
14535 /usr/X386/include
14536 /usr/x386/include
14537 /usr/XFree86/include/X11
14538
14539 /usr/include
14540 /usr/local/include
14541 /usr/unsupported/include
14542 /usr/athena/include
14543 /usr/local/x11r5/include
14544 /usr/lpp/Xamples/include
14545
14546 /usr/openwin/include
14547 /usr/openwin/share/include'
14548
14549 if test "$ac_x_includes" = no; then
14550   # Guess where to find include files, by looking for Xlib.h.
14551   # First, try using that file with no special directory specified.
14552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14553 /* end confdefs.h.  */
14554 #include <X11/Xlib.h>
14555 _ACEOF
14556 if ac_fn_c_try_cpp "$LINENO"; then :
14557   # We can compile using X headers with no special include directory.
14558 ac_x_includes=
14559 else
14560   for ac_dir in $ac_x_header_dirs; do
14561   if test -r "$ac_dir/X11/Xlib.h"; then
14562     ac_x_includes=$ac_dir
14563     break
14564   fi
14565 done
14566 fi
14567 rm -f conftest.err conftest.$ac_ext
14568 fi # $ac_x_includes = no
14569
14570 if test "$ac_x_libraries" = no; then
14571   # Check for the libraries.
14572   # See if we find them without any special options.
14573   # Don't add to $LIBS permanently.
14574   ac_save_LIBS=$LIBS
14575   LIBS="-lX11 $LIBS"
14576   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14577 /* end confdefs.h.  */
14578 #include <X11/Xlib.h>
14579 int
14580 main ()
14581 {
14582 XrmInitialize ()
14583   ;
14584   return 0;
14585 }
14586 _ACEOF
14587 if ac_fn_c_try_link "$LINENO"; then :
14588   LIBS=$ac_save_LIBS
14589 # We can link X programs with no special library path.
14590 ac_x_libraries=
14591 else
14592   LIBS=$ac_save_LIBS
14593 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
14594 do
14595   # Don't even attempt the hair of trying to link an X program!
14596   for ac_extension in a so sl dylib la dll; do
14597     if test -r "$ac_dir/libX11.$ac_extension"; then
14598       ac_x_libraries=$ac_dir
14599       break 2
14600     fi
14601   done
14602 done
14603 fi
14604 rm -f core conftest.err conftest.$ac_objext \
14605     conftest$ac_exeext conftest.$ac_ext
14606 fi # $ac_x_libraries = no
14607
14608 case $ac_x_includes,$ac_x_libraries in #(
14609   no,* | *,no | *\'*)
14610     # Didn't find X, or a directory has "'" in its name.
14611     ac_cv_have_x="have_x=no";; #(
14612   *)
14613     # Record where we found X for the cache.
14614     ac_cv_have_x="have_x=yes\
14615         ac_x_includes='$ac_x_includes'\
14616         ac_x_libraries='$ac_x_libraries'"
14617 esac
14618 fi
14619 ;; #(
14620     *) have_x=yes;;
14621   esac
14622   eval "$ac_cv_have_x"
14623 fi # $with_x != no
14624
14625 if test "$have_x" != yes; then
14626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14627 $as_echo "$have_x" >&6; }
14628   no_x=yes
14629 else
14630   # If each of the values was on the command line, it overrides each guess.
14631   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14632   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14633   # Update the cache value to reflect the command line values.
14634   ac_cv_have_x="have_x=yes\
14635         ac_x_includes='$x_includes'\
14636         ac_x_libraries='$x_libraries'"
14637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14638 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
14639 fi
14640
14641
14642 # Unlike the sim directory, whether a simulator is linked is controlled by
14643 # presence of a gdb_sim definition in the target configure.tgt entry.
14644 # This code just checks for a few cases where we'd like to ignore those
14645 # definitions, even when they're present in the '.mt' file.  These cases
14646 # are when --disable-sim is specified, or if the simulator directory is
14647 # not part of the source tree.
14648 #
14649 # Check whether --enable-sim was given.
14650 if test "${enable_sim+set}" = set; then :
14651   enableval=$enable_sim; echo "enable_sim = $enable_sim";
14652  echo "enableval = ${enableval}";
14653  case "${enableval}" in
14654   yes) ignore_sim=false ;;
14655   no)  ignore_sim=true ;;
14656   *)   ignore_sim=false ;;
14657  esac
14658 else
14659   ignore_sim=false
14660 fi
14661
14662
14663 if test ! -d "${srcdir}/../sim"; then
14664   ignore_sim=true
14665 fi
14666
14667 SIM=
14668 SIM_OBS=
14669 if test "${ignore_sim}" = "false"; then
14670   if test x"${gdb_sim}" != x ; then
14671     SIM="${gdb_sim}"
14672     SIM_OBS="remote-sim.o"
14673
14674 $as_echo "#define WITH_SIM 1" >>confdefs.h
14675
14676   fi
14677 fi
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692 # List of host floatformats.
14693
14694 cat >>confdefs.h <<_ACEOF
14695 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
14696 _ACEOF
14697
14698
14699 cat >>confdefs.h <<_ACEOF
14700 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
14701 _ACEOF
14702
14703
14704 cat >>confdefs.h <<_ACEOF
14705 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
14706 _ACEOF
14707
14708
14709 # target_subdir is used by the testsuite to find the target libraries.
14710 target_subdir=
14711 if test "${host}" != "${target}"; then
14712     target_subdir="${target_alias}/"
14713 fi
14714
14715
14716 frags=
14717 if test "${gdb_native}" = "yes"; then
14718   host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14719   if test ! -f ${host_makefile_frag}; then
14720     as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
14721   fi
14722   frags="$frags $host_makefile_frag"
14723 else
14724   host_makefile_frag=/dev/null
14725 fi
14726
14727
14728
14729
14730 if test "${gdb_native}" = "yes"; then
14731 # We pick this up from the host configuration file (.mh) because we
14732 # do not have a native configuration Makefile fragment.
14733 nativefile=`sed -n '
14734 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
14735 ' ${host_makefile_frag}`
14736 fi
14737
14738
14739 if test x"${gdb_osabi}" != x ; then
14740
14741 cat >>confdefs.h <<_ACEOF
14742 #define GDB_OSABI_DEFAULT $gdb_osabi
14743 _ACEOF
14744
14745 fi
14746
14747 # Enable multi-ice-gdb-server.
14748 # Check whether --enable-multi-ice was given.
14749 if test "${enable_multi_ice+set}" = set; then :
14750   enableval=$enable_multi_ice; case $enableval in
14751     yes | no)
14752       ;;
14753     *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
14754   esac
14755 fi
14756
14757 if test "x$enable_multi_ice" = xyes; then
14758    subdirs="$subdirs multi-ice"
14759
14760 fi
14761
14762 # Check whether --enable-gdbserver was given.
14763 if test "${enable_gdbserver+set}" = set; then :
14764   enableval=$enable_gdbserver; case "${enableval}" in
14765   yes| no|auto) ;;
14766   *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14767 esac
14768 else
14769   enable_gdbserver=auto
14770 fi
14771
14772
14773 # We only build gdbserver automatically in a native configuration, and
14774 # only if the user did not explicitly disable its build.
14775 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
14776   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14777 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
14778   if test "x$build_gdbserver" = xyes; then
14779     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14780 $as_echo "yes" >&6; }
14781     subdirs="$subdirs gdbserver"
14782
14783     gdbserver_build_enabled=yes
14784   else
14785     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14786 $as_echo "no" >&6; }
14787   fi
14788 fi
14789
14790 # If the user explicitly request the gdbserver to be built, verify that
14791 # we were in fact able to enable it.
14792 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14793   as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14794 fi
14795
14796 # Check for babeltrace and babeltrace-ctf
14797
14798 # Check whether --with-babeltrace was given.
14799 if test "${with_babeltrace+set}" = set; then :
14800   withval=$with_babeltrace;
14801 else
14802   with_babeltrace=auto
14803 fi
14804
14805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14806 $as_echo_n "checking whether to use babeltrace... " >&6; }
14807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14808 $as_echo "$with_babeltrace" >&6; }
14809
14810 if test "x$with_babeltrace" = "xno"; then
14811   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14812 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14813 else
14814   # Append -Werror to CFLAGS so that configure can catch the warning
14815   # "assignment from incompatible pointer type", which is related to
14816   # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
14817   # in GDB, while babeltrace 1.0.3 is broken.
14818   # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14819   # safe to save and restore CFLAGS here.
14820   saved_CFLAGS=$CFLAGS
14821   CFLAGS="$CFLAGS -Werror"
14822
14823
14824
14825
14826
14827
14828
14829
14830     use_additional=yes
14831
14832   acl_save_prefix="$prefix"
14833   prefix="$acl_final_prefix"
14834   acl_save_exec_prefix="$exec_prefix"
14835   exec_prefix="$acl_final_exec_prefix"
14836
14837     eval additional_includedir=\"$includedir\"
14838     eval additional_libdir=\"$libdir\"
14839
14840   exec_prefix="$acl_save_exec_prefix"
14841   prefix="$acl_save_prefix"
14842
14843
14844 # Check whether --with-libbabeltrace-prefix was given.
14845 if test "${with_libbabeltrace_prefix+set}" = set; then :
14846   withval=$with_libbabeltrace_prefix;
14847     if test "X$withval" = "Xno"; then
14848       use_additional=no
14849     else
14850       if test "X$withval" = "X"; then
14851
14852   acl_save_prefix="$prefix"
14853   prefix="$acl_final_prefix"
14854   acl_save_exec_prefix="$exec_prefix"
14855   exec_prefix="$acl_final_exec_prefix"
14856
14857           eval additional_includedir=\"$includedir\"
14858           eval additional_libdir=\"$libdir\"
14859
14860   exec_prefix="$acl_save_exec_prefix"
14861   prefix="$acl_save_prefix"
14862
14863       else
14864         additional_includedir="$withval/include"
14865         additional_libdir="$withval/lib"
14866       fi
14867     fi
14868
14869 fi
14870
14871       LIBBABELTRACE=
14872   LTLIBBABELTRACE=
14873   INCBABELTRACE=
14874   rpathdirs=
14875   ltrpathdirs=
14876   names_already_handled=
14877   names_next_round='babeltrace babeltrace-ctf'
14878   while test -n "$names_next_round"; do
14879     names_this_round="$names_next_round"
14880     names_next_round=
14881     for name in $names_this_round; do
14882       already_handled=
14883       for n in $names_already_handled; do
14884         if test "$n" = "$name"; then
14885           already_handled=yes
14886           break
14887         fi
14888       done
14889       if test -z "$already_handled"; then
14890         names_already_handled="$names_already_handled $name"
14891                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14892         eval value=\"\$HAVE_LIB$uppername\"
14893         if test -n "$value"; then
14894           if test "$value" = yes; then
14895             eval value=\"\$LIB$uppername\"
14896             test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
14897             eval value=\"\$LTLIB$uppername\"
14898             test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
14899           else
14900                                     :
14901           fi
14902         else
14903                               found_dir=
14904           found_la=
14905           found_so=
14906           found_a=
14907           if test $use_additional = yes; then
14908             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14909               found_dir="$additional_libdir"
14910               found_so="$additional_libdir/lib$name.$shlibext"
14911               if test -f "$additional_libdir/lib$name.la"; then
14912                 found_la="$additional_libdir/lib$name.la"
14913               fi
14914             else
14915               if test -f "$additional_libdir/lib$name.$libext"; then
14916                 found_dir="$additional_libdir"
14917                 found_a="$additional_libdir/lib$name.$libext"
14918                 if test -f "$additional_libdir/lib$name.la"; then
14919                   found_la="$additional_libdir/lib$name.la"
14920                 fi
14921               fi
14922             fi
14923           fi
14924           if test "X$found_dir" = "X"; then
14925             for x in $LDFLAGS $LTLIBBABELTRACE; do
14926
14927   acl_save_prefix="$prefix"
14928   prefix="$acl_final_prefix"
14929   acl_save_exec_prefix="$exec_prefix"
14930   exec_prefix="$acl_final_exec_prefix"
14931   eval x=\"$x\"
14932   exec_prefix="$acl_save_exec_prefix"
14933   prefix="$acl_save_prefix"
14934
14935               case "$x" in
14936                 -L*)
14937                   dir=`echo "X$x" | sed -e 's/^X-L//'`
14938                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14939                     found_dir="$dir"
14940                     found_so="$dir/lib$name.$shlibext"
14941                     if test -f "$dir/lib$name.la"; then
14942                       found_la="$dir/lib$name.la"
14943                     fi
14944                   else
14945                     if test -f "$dir/lib$name.$libext"; then
14946                       found_dir="$dir"
14947                       found_a="$dir/lib$name.$libext"
14948                       if test -f "$dir/lib$name.la"; then
14949                         found_la="$dir/lib$name.la"
14950                       fi
14951                     fi
14952                   fi
14953                   ;;
14954               esac
14955               if test "X$found_dir" != "X"; then
14956                 break
14957               fi
14958             done
14959           fi
14960           if test "X$found_dir" != "X"; then
14961                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
14962             if test "X$found_so" != "X"; then
14963                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14964                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14965               else
14966                                                                                 haveit=
14967                 for x in $ltrpathdirs; do
14968                   if test "X$x" = "X$found_dir"; then
14969                     haveit=yes
14970                     break
14971                   fi
14972                 done
14973                 if test -z "$haveit"; then
14974                   ltrpathdirs="$ltrpathdirs $found_dir"
14975                 fi
14976                                 if test "$hardcode_direct" = yes; then
14977                                                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14978                 else
14979                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14980                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14981                                                             haveit=
14982                     for x in $rpathdirs; do
14983                       if test "X$x" = "X$found_dir"; then
14984                         haveit=yes
14985                         break
14986                       fi
14987                     done
14988                     if test -z "$haveit"; then
14989                       rpathdirs="$rpathdirs $found_dir"
14990                     fi
14991                   else
14992                                                                                 haveit=
14993                     for x in $LDFLAGS $LIBBABELTRACE; do
14994
14995   acl_save_prefix="$prefix"
14996   prefix="$acl_final_prefix"
14997   acl_save_exec_prefix="$exec_prefix"
14998   exec_prefix="$acl_final_exec_prefix"
14999   eval x=\"$x\"
15000   exec_prefix="$acl_save_exec_prefix"
15001   prefix="$acl_save_prefix"
15002
15003                       if test "X$x" = "X-L$found_dir"; then
15004                         haveit=yes
15005                         break
15006                       fi
15007                     done
15008                     if test -z "$haveit"; then
15009                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
15010                     fi
15011                     if test "$hardcode_minus_L" != no; then
15012                                                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15013                     else
15014                                                                                                                                                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15015                     fi
15016                   fi
15017                 fi
15018               fi
15019             else
15020               if test "X$found_a" != "X"; then
15021                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
15022               else
15023                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
15024               fi
15025             fi
15026                         additional_includedir=
15027             case "$found_dir" in
15028               */lib | */lib/)
15029                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15030                 additional_includedir="$basedir/include"
15031                 ;;
15032             esac
15033             if test "X$additional_includedir" != "X"; then
15034                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
15035                 haveit=
15036                 if test "X$additional_includedir" = "X/usr/local/include"; then
15037                   if test -n "$GCC"; then
15038                     case $host_os in
15039                       linux*) haveit=yes;;
15040                     esac
15041                   fi
15042                 fi
15043                 if test -z "$haveit"; then
15044                   for x in $CPPFLAGS $INCBABELTRACE; do
15045
15046   acl_save_prefix="$prefix"
15047   prefix="$acl_final_prefix"
15048   acl_save_exec_prefix="$exec_prefix"
15049   exec_prefix="$acl_final_exec_prefix"
15050   eval x=\"$x\"
15051   exec_prefix="$acl_save_exec_prefix"
15052   prefix="$acl_save_prefix"
15053
15054                     if test "X$x" = "X-I$additional_includedir"; then
15055                       haveit=yes
15056                       break
15057                     fi
15058                   done
15059                   if test -z "$haveit"; then
15060                     if test -d "$additional_includedir"; then
15061                                             INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
15062                     fi
15063                   fi
15064                 fi
15065               fi
15066             fi
15067                         if test -n "$found_la"; then
15068                                                         save_libdir="$libdir"
15069               case "$found_la" in
15070                 */* | *\\*) . "$found_la" ;;
15071                 *) . "./$found_la" ;;
15072               esac
15073               libdir="$save_libdir"
15074                             for dep in $dependency_libs; do
15075                 case "$dep" in
15076                   -L*)
15077                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15078                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
15079                       haveit=
15080                       if test "X$additional_libdir" = "X/usr/local/lib"; then
15081                         if test -n "$GCC"; then
15082                           case $host_os in
15083                             linux*) haveit=yes;;
15084                           esac
15085                         fi
15086                       fi
15087                       if test -z "$haveit"; then
15088                         haveit=
15089                         for x in $LDFLAGS $LIBBABELTRACE; do
15090
15091   acl_save_prefix="$prefix"
15092   prefix="$acl_final_prefix"
15093   acl_save_exec_prefix="$exec_prefix"
15094   exec_prefix="$acl_final_exec_prefix"
15095   eval x=\"$x\"
15096   exec_prefix="$acl_save_exec_prefix"
15097   prefix="$acl_save_prefix"
15098
15099                           if test "X$x" = "X-L$additional_libdir"; then
15100                             haveit=yes
15101                             break
15102                           fi
15103                         done
15104                         if test -z "$haveit"; then
15105                           if test -d "$additional_libdir"; then
15106                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
15107                           fi
15108                         fi
15109                         haveit=
15110                         for x in $LDFLAGS $LTLIBBABELTRACE; do
15111
15112   acl_save_prefix="$prefix"
15113   prefix="$acl_final_prefix"
15114   acl_save_exec_prefix="$exec_prefix"
15115   exec_prefix="$acl_final_exec_prefix"
15116   eval x=\"$x\"
15117   exec_prefix="$acl_save_exec_prefix"
15118   prefix="$acl_save_prefix"
15119
15120                           if test "X$x" = "X-L$additional_libdir"; then
15121                             haveit=yes
15122                             break
15123                           fi
15124                         done
15125                         if test -z "$haveit"; then
15126                           if test -d "$additional_libdir"; then
15127                                                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
15128                           fi
15129                         fi
15130                       fi
15131                     fi
15132                     ;;
15133                   -R*)
15134                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
15135                     if test "$enable_rpath" != no; then
15136                                                                   haveit=
15137                       for x in $rpathdirs; do
15138                         if test "X$x" = "X$dir"; then
15139                           haveit=yes
15140                           break
15141                         fi
15142                       done
15143                       if test -z "$haveit"; then
15144                         rpathdirs="$rpathdirs $dir"
15145                       fi
15146                                                                   haveit=
15147                       for x in $ltrpathdirs; do
15148                         if test "X$x" = "X$dir"; then
15149                           haveit=yes
15150                           break
15151                         fi
15152                       done
15153                       if test -z "$haveit"; then
15154                         ltrpathdirs="$ltrpathdirs $dir"
15155                       fi
15156                     fi
15157                     ;;
15158                   -l*)
15159                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15160                     ;;
15161                   *.la)
15162                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15163                     ;;
15164                   *)
15165                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
15166                     LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
15167                     ;;
15168                 esac
15169               done
15170             fi
15171           else
15172                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15173             LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
15174           fi
15175         fi
15176       fi
15177     done
15178   done
15179   if test "X$rpathdirs" != "X"; then
15180     if test -n "$hardcode_libdir_separator"; then
15181                         alldirs=
15182       for found_dir in $rpathdirs; do
15183         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15184       done
15185             acl_save_libdir="$libdir"
15186       libdir="$alldirs"
15187       eval flag=\"$hardcode_libdir_flag_spec\"
15188       libdir="$acl_save_libdir"
15189       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15190     else
15191             for found_dir in $rpathdirs; do
15192         acl_save_libdir="$libdir"
15193         libdir="$found_dir"
15194         eval flag=\"$hardcode_libdir_flag_spec\"
15195         libdir="$acl_save_libdir"
15196         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15197       done
15198     fi
15199   fi
15200   if test "X$ltrpathdirs" != "X"; then
15201             for found_dir in $ltrpathdirs; do
15202       LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
15203     done
15204   fi
15205
15206
15207         ac_save_CPPFLAGS="$CPPFLAGS"
15208
15209   for element in $INCBABELTRACE; do
15210     haveit=
15211     for x in $CPPFLAGS; do
15212
15213   acl_save_prefix="$prefix"
15214   prefix="$acl_final_prefix"
15215   acl_save_exec_prefix="$exec_prefix"
15216   exec_prefix="$acl_final_exec_prefix"
15217   eval x=\"$x\"
15218   exec_prefix="$acl_save_exec_prefix"
15219   prefix="$acl_save_prefix"
15220
15221       if test "X$x" = "X$element"; then
15222         haveit=yes
15223         break
15224       fi
15225     done
15226     if test -z "$haveit"; then
15227       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15228     fi
15229   done
15230
15231
15232   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
15233 $as_echo_n "checking for libbabeltrace... " >&6; }
15234 if test "${ac_cv_libbabeltrace+set}" = set; then :
15235   $as_echo_n "(cached) " >&6
15236 else
15237
15238     ac_save_LIBS="$LIBS"
15239     LIBS="$LIBS $LIBBABELTRACE"
15240     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15241 /* end confdefs.h.  */
15242 #include <babeltrace/babeltrace.h>
15243                          #include <babeltrace/ctf/events.h>
15244                          #include <babeltrace/ctf/iterator.h>
15245 int
15246 main ()
15247 {
15248 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
15249                         struct bt_ctf_event *event = NULL;
15250                         const struct bt_definition *scope;
15251
15252                         bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
15253                         scope = bt_ctf_get_top_level_scope (event,
15254                                                            BT_STREAM_EVENT_HEADER);
15255                         bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
15256
15257   ;
15258   return 0;
15259 }
15260 _ACEOF
15261 if ac_fn_c_try_link "$LINENO"; then :
15262   ac_cv_libbabeltrace=yes
15263 else
15264   ac_cv_libbabeltrace=no
15265 fi
15266 rm -f core conftest.err conftest.$ac_objext \
15267     conftest$ac_exeext conftest.$ac_ext
15268     LIBS="$ac_save_LIBS"
15269
15270 fi
15271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
15272 $as_echo "$ac_cv_libbabeltrace" >&6; }
15273   if test "$ac_cv_libbabeltrace" = yes; then
15274     HAVE_LIBBABELTRACE=yes
15275
15276 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
15277
15278     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
15279 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
15280     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
15281 $as_echo "$LIBBABELTRACE" >&6; }
15282   else
15283     HAVE_LIBBABELTRACE=no
15284             CPPFLAGS="$ac_save_CPPFLAGS"
15285     LIBBABELTRACE=
15286     LTLIBBABELTRACE=
15287   fi
15288
15289
15290
15291
15292
15293
15294   CFLAGS=$saved_CFLAGS
15295
15296   if test "$HAVE_LIBBABELTRACE" != yes; then
15297      if test "$with_babeltrace" = yes; then
15298        as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
15299      else
15300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
15301 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
15302      fi
15303   fi
15304 fi
15305
15306 # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
15307 # to an empty version.
15308
15309 files=
15310 links=
15311
15312 rm -f nm.h
15313 if test "${nativefile}" != ""; then
15314     case "${nativefile}" in
15315       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15316       * ) GDB_NM_FILE="${nativefile}"
15317     esac
15318     files="${files} ${GDB_NM_FILE}"
15319     links="${links} nm.h"
15320
15321 cat >>confdefs.h <<_ACEOF
15322 #define GDB_NM_FILE "${GDB_NM_FILE}"
15323 _ACEOF
15324
15325 fi
15326
15327
15328 ac_sources="$files"
15329 ac_dests="$links"
15330 while test -n "$ac_sources"; do
15331   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15332   set $ac_sources; ac_source=$1; shift; ac_sources=$*
15333   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15334 done
15335 ac_config_links="$ac_config_links $ac_config_links_1"
15336
15337
15338
15339
15340
15341 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
15342
15343
15344 # Undo the $ec_script escaping suitable for Makefile.
15345 transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15346 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
15347 if test "x$GDB_TRANSFORM_NAME" = x; then
15348   GDB_TRANSFORM_NAME=gdb
15349 fi
15350
15351 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
15352 if test "x$GCORE_TRANSFORM_NAME" = x; then
15353   GCORE_TRANSFORM_NAME=gcore
15354 fi
15355
15356 ac_config_files="$ac_config_files gcore"
15357
15358
15359 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
15360
15361 ac_config_commands="$ac_config_commands default"
15362
15363 cat >confcache <<\_ACEOF
15364 # This file is a shell script that caches the results of configure
15365 # tests run on this system so they can be shared between configure
15366 # scripts and configure runs, see configure's option --config-cache.
15367 # It is not useful on other systems.  If it contains results you don't
15368 # want to keep, you may remove or edit it.
15369 #
15370 # config.status only pays attention to the cache file if you give it
15371 # the --recheck option to rerun configure.
15372 #
15373 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15374 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15375 # following values.
15376
15377 _ACEOF
15378
15379 # The following way of writing the cache mishandles newlines in values,
15380 # but we know of no workaround that is simple, portable, and efficient.
15381 # So, we kill variables containing newlines.
15382 # Ultrix sh set writes to stderr and can't be redirected directly,
15383 # and sets the high bit in the cache file unless we assign to the vars.
15384 (
15385   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15386     eval ac_val=\$$ac_var
15387     case $ac_val in #(
15388     *${as_nl}*)
15389       case $ac_var in #(
15390       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15391 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15392       esac
15393       case $ac_var in #(
15394       _ | IFS | as_nl) ;; #(
15395       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15396       *) { eval $ac_var=; unset $ac_var;} ;;
15397       esac ;;
15398     esac
15399   done
15400
15401   (set) 2>&1 |
15402     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15403     *${as_nl}ac_space=\ *)
15404       # `set' does not quote correctly, so add quotes: double-quote
15405       # substitution turns \\\\ into \\, and sed turns \\ into \.
15406       sed -n \
15407         "s/'/'\\\\''/g;
15408           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15409       ;; #(
15410     *)
15411       # `set' quotes correctly as required by POSIX, so do not add quotes.
15412       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15413       ;;
15414     esac |
15415     sort
15416 ) |
15417   sed '
15418      /^ac_cv_env_/b end
15419      t clear
15420      :clear
15421      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15422      t end
15423      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15424      :end' >>confcache
15425 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15426   if test -w "$cache_file"; then
15427     test "x$cache_file" != "x/dev/null" &&
15428       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15429 $as_echo "$as_me: updating cache $cache_file" >&6;}
15430     cat confcache >$cache_file
15431   else
15432     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15433 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15434   fi
15435 fi
15436 rm -f confcache
15437
15438 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15439 # Let make expand exec_prefix.
15440 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15441
15442 DEFS=-DHAVE_CONFIG_H
15443
15444 ac_libobjs=
15445 ac_ltlibobjs=
15446 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15447   # 1. Remove the extension, and $U if already installed.
15448   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15449   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15450   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15451   #    will be set to the directory where LIBOBJS objects are built.
15452   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15453   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15454 done
15455 LIBOBJS=$ac_libobjs
15456
15457 LTLIBOBJS=$ac_ltlibobjs
15458
15459
15460 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
15461   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15462 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15463 fi
15464 if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
15465   as_fn_error "conditional \"GMAKE\" was never defined.
15466 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15467 fi
15468 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
15469   as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
15470 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15471 fi
15472 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
15473   as_fn_error "conditional \"HAVE_GUILE\" was never defined.
15474 Usually this means the macro was only invoked conditionally." "$LINENO" 5
15475 fi
15476
15477
15478 : ${CONFIG_STATUS=./config.status}
15479 ac_write_fail=0
15480 ac_clean_files_save=$ac_clean_files
15481 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15482 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15483 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15484 as_write_fail=0
15485 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15486 #! $SHELL
15487 # Generated by $as_me.
15488 # Run this file to recreate the current configuration.
15489 # Compiler output produced by configure, useful for debugging
15490 # configure, is in config.log if it exists.
15491
15492 debug=false
15493 ac_cs_recheck=false
15494 ac_cs_silent=false
15495
15496 SHELL=\${CONFIG_SHELL-$SHELL}
15497 export SHELL
15498 _ASEOF
15499 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15500 ## -------------------- ##
15501 ## M4sh Initialization. ##
15502 ## -------------------- ##
15503
15504 # Be more Bourne compatible
15505 DUALCASE=1; export DUALCASE # for MKS sh
15506 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15507   emulate sh
15508   NULLCMD=:
15509   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15510   # is contrary to our usage.  Disable this feature.
15511   alias -g '${1+"$@"}'='"$@"'
15512   setopt NO_GLOB_SUBST
15513 else
15514   case `(set -o) 2>/dev/null` in #(
15515   *posix*) :
15516     set -o posix ;; #(
15517   *) :
15518      ;;
15519 esac
15520 fi
15521
15522
15523 as_nl='
15524 '
15525 export as_nl
15526 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15527 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15528 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15529 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15530 # Prefer a ksh shell builtin over an external printf program on Solaris,
15531 # but without wasting forks for bash or zsh.
15532 if test -z "$BASH_VERSION$ZSH_VERSION" \
15533     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15534   as_echo='print -r --'
15535   as_echo_n='print -rn --'
15536 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15537   as_echo='printf %s\n'
15538   as_echo_n='printf %s'
15539 else
15540   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15541     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15542     as_echo_n='/usr/ucb/echo -n'
15543   else
15544     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15545     as_echo_n_body='eval
15546       arg=$1;
15547       case $arg in #(
15548       *"$as_nl"*)
15549         expr "X$arg" : "X\\(.*\\)$as_nl";
15550         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15551       esac;
15552       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15553     '
15554     export as_echo_n_body
15555     as_echo_n='sh -c $as_echo_n_body as_echo'
15556   fi
15557   export as_echo_body
15558   as_echo='sh -c $as_echo_body as_echo'
15559 fi
15560
15561 # The user is always right.
15562 if test "${PATH_SEPARATOR+set}" != set; then
15563   PATH_SEPARATOR=:
15564   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15565     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15566       PATH_SEPARATOR=';'
15567   }
15568 fi
15569
15570
15571 # IFS
15572 # We need space, tab and new line, in precisely that order.  Quoting is
15573 # there to prevent editors from complaining about space-tab.
15574 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15575 # splitting by setting IFS to empty value.)
15576 IFS=" ""        $as_nl"
15577
15578 # Find who we are.  Look in the path if we contain no directory separator.
15579 case $0 in #((
15580   *[\\/]* ) as_myself=$0 ;;
15581   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15582 for as_dir in $PATH
15583 do
15584   IFS=$as_save_IFS
15585   test -z "$as_dir" && as_dir=.
15586     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15587   done
15588 IFS=$as_save_IFS
15589
15590      ;;
15591 esac
15592 # We did not find ourselves, most probably we were run as `sh COMMAND'
15593 # in which case we are not to be found in the path.
15594 if test "x$as_myself" = x; then
15595   as_myself=$0
15596 fi
15597 if test ! -f "$as_myself"; then
15598   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15599   exit 1
15600 fi
15601
15602 # Unset variables that we do not need and which cause bugs (e.g. in
15603 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15604 # suppresses any "Segmentation fault" message there.  '((' could
15605 # trigger a bug in pdksh 5.2.14.
15606 for as_var in BASH_ENV ENV MAIL MAILPATH
15607 do eval test x\${$as_var+set} = xset \
15608   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15609 done
15610 PS1='$ '
15611 PS2='> '
15612 PS4='+ '
15613
15614 # NLS nuisances.
15615 LC_ALL=C
15616 export LC_ALL
15617 LANGUAGE=C
15618 export LANGUAGE
15619
15620 # CDPATH.
15621 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15622
15623
15624 # as_fn_error ERROR [LINENO LOG_FD]
15625 # ---------------------------------
15626 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15627 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15628 # script with status $?, using 1 if that was 0.
15629 as_fn_error ()
15630 {
15631   as_status=$?; test $as_status -eq 0 && as_status=1
15632   if test "$3"; then
15633     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15634     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15635   fi
15636   $as_echo "$as_me: error: $1" >&2
15637   as_fn_exit $as_status
15638 } # as_fn_error
15639
15640
15641 # as_fn_set_status STATUS
15642 # -----------------------
15643 # Set $? to STATUS, without forking.
15644 as_fn_set_status ()
15645 {
15646   return $1
15647 } # as_fn_set_status
15648
15649 # as_fn_exit STATUS
15650 # -----------------
15651 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15652 as_fn_exit ()
15653 {
15654   set +e
15655   as_fn_set_status $1
15656   exit $1
15657 } # as_fn_exit
15658
15659 # as_fn_unset VAR
15660 # ---------------
15661 # Portably unset VAR.
15662 as_fn_unset ()
15663 {
15664   { eval $1=; unset $1;}
15665 }
15666 as_unset=as_fn_unset
15667 # as_fn_append VAR VALUE
15668 # ----------------------
15669 # Append the text in VALUE to the end of the definition contained in VAR. Take
15670 # advantage of any shell optimizations that allow amortized linear growth over
15671 # repeated appends, instead of the typical quadratic growth present in naive
15672 # implementations.
15673 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15674   eval 'as_fn_append ()
15675   {
15676     eval $1+=\$2
15677   }'
15678 else
15679   as_fn_append ()
15680   {
15681     eval $1=\$$1\$2
15682   }
15683 fi # as_fn_append
15684
15685 # as_fn_arith ARG...
15686 # ------------------
15687 # Perform arithmetic evaluation on the ARGs, and store the result in the
15688 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15689 # must be portable across $(()) and expr.
15690 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15691   eval 'as_fn_arith ()
15692   {
15693     as_val=$(( $* ))
15694   }'
15695 else
15696   as_fn_arith ()
15697   {
15698     as_val=`expr "$@" || test $? -eq 1`
15699   }
15700 fi # as_fn_arith
15701
15702
15703 if expr a : '\(a\)' >/dev/null 2>&1 &&
15704    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15705   as_expr=expr
15706 else
15707   as_expr=false
15708 fi
15709
15710 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15711   as_basename=basename
15712 else
15713   as_basename=false
15714 fi
15715
15716 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15717   as_dirname=dirname
15718 else
15719   as_dirname=false
15720 fi
15721
15722 as_me=`$as_basename -- "$0" ||
15723 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15724          X"$0" : 'X\(//\)$' \| \
15725          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15726 $as_echo X/"$0" |
15727     sed '/^.*\/\([^/][^/]*\)\/*$/{
15728             s//\1/
15729             q
15730           }
15731           /^X\/\(\/\/\)$/{
15732             s//\1/
15733             q
15734           }
15735           /^X\/\(\/\).*/{
15736             s//\1/
15737             q
15738           }
15739           s/.*/./; q'`
15740
15741 # Avoid depending upon Character Ranges.
15742 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15743 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15744 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15745 as_cr_digits='0123456789'
15746 as_cr_alnum=$as_cr_Letters$as_cr_digits
15747
15748 ECHO_C= ECHO_N= ECHO_T=
15749 case `echo -n x` in #(((((
15750 -n*)
15751   case `echo 'xy\c'` in
15752   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15753   xy)  ECHO_C='\c';;
15754   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15755        ECHO_T=' ';;
15756   esac;;
15757 *)
15758   ECHO_N='-n';;
15759 esac
15760
15761 rm -f conf$$ conf$$.exe conf$$.file
15762 if test -d conf$$.dir; then
15763   rm -f conf$$.dir/conf$$.file
15764 else
15765   rm -f conf$$.dir
15766   mkdir conf$$.dir 2>/dev/null
15767 fi
15768 if (echo >conf$$.file) 2>/dev/null; then
15769   if ln -s conf$$.file conf$$ 2>/dev/null; then
15770     as_ln_s='ln -s'
15771     # ... but there are two gotchas:
15772     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15773     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15774     # In both cases, we have to default to `cp -p'.
15775     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15776       as_ln_s='cp -p'
15777   elif ln conf$$.file conf$$ 2>/dev/null; then
15778     as_ln_s=ln
15779   else
15780     as_ln_s='cp -p'
15781   fi
15782 else
15783   as_ln_s='cp -p'
15784 fi
15785 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15786 rmdir conf$$.dir 2>/dev/null
15787
15788
15789 # as_fn_mkdir_p
15790 # -------------
15791 # Create "$as_dir" as a directory, including parents if necessary.
15792 as_fn_mkdir_p ()
15793 {
15794
15795   case $as_dir in #(
15796   -*) as_dir=./$as_dir;;
15797   esac
15798   test -d "$as_dir" || eval $as_mkdir_p || {
15799     as_dirs=
15800     while :; do
15801       case $as_dir in #(
15802       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15803       *) as_qdir=$as_dir;;
15804       esac
15805       as_dirs="'$as_qdir' $as_dirs"
15806       as_dir=`$as_dirname -- "$as_dir" ||
15807 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15808          X"$as_dir" : 'X\(//\)[^/]' \| \
15809          X"$as_dir" : 'X\(//\)$' \| \
15810          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15811 $as_echo X"$as_dir" |
15812     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15813             s//\1/
15814             q
15815           }
15816           /^X\(\/\/\)[^/].*/{
15817             s//\1/
15818             q
15819           }
15820           /^X\(\/\/\)$/{
15821             s//\1/
15822             q
15823           }
15824           /^X\(\/\).*/{
15825             s//\1/
15826             q
15827           }
15828           s/.*/./; q'`
15829       test -d "$as_dir" && break
15830     done
15831     test -z "$as_dirs" || eval "mkdir $as_dirs"
15832   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15833
15834
15835 } # as_fn_mkdir_p
15836 if mkdir -p . 2>/dev/null; then
15837   as_mkdir_p='mkdir -p "$as_dir"'
15838 else
15839   test -d ./-p && rmdir ./-p
15840   as_mkdir_p=false
15841 fi
15842
15843 if test -x / >/dev/null 2>&1; then
15844   as_test_x='test -x'
15845 else
15846   if ls -dL / >/dev/null 2>&1; then
15847     as_ls_L_option=L
15848   else
15849     as_ls_L_option=
15850   fi
15851   as_test_x='
15852     eval sh -c '\''
15853       if test -d "$1"; then
15854         test -d "$1/.";
15855       else
15856         case $1 in #(
15857         -*)set "./$1";;
15858         esac;
15859         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15860         ???[sx]*):;;*)false;;esac;fi
15861     '\'' sh
15862   '
15863 fi
15864 as_executable_p=$as_test_x
15865
15866 # Sed expression to map a string onto a valid CPP name.
15867 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15868
15869 # Sed expression to map a string onto a valid variable name.
15870 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15871
15872
15873 exec 6>&1
15874 ## ----------------------------------- ##
15875 ## Main body of $CONFIG_STATUS script. ##
15876 ## ----------------------------------- ##
15877 _ASEOF
15878 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15879
15880 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15881 # Save the log message, to keep $0 and so on meaningful, and to
15882 # report actual input values of CONFIG_FILES etc. instead of their
15883 # values after options handling.
15884 ac_log="
15885 This file was extended by $as_me, which was
15886 generated by GNU Autoconf 2.64.  Invocation command line was
15887
15888   CONFIG_FILES    = $CONFIG_FILES
15889   CONFIG_HEADERS  = $CONFIG_HEADERS
15890   CONFIG_LINKS    = $CONFIG_LINKS
15891   CONFIG_COMMANDS = $CONFIG_COMMANDS
15892   $ $0 $@
15893
15894 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15895 "
15896
15897 _ACEOF
15898
15899 case $ac_config_files in *"
15900 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15901 esac
15902
15903 case $ac_config_headers in *"
15904 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15905 esac
15906
15907
15908 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15909 # Files that config.status was made for.
15910 config_files="$ac_config_files"
15911 config_headers="$ac_config_headers"
15912 config_links="$ac_config_links"
15913 config_commands="$ac_config_commands"
15914
15915 _ACEOF
15916
15917 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15918 ac_cs_usage="\
15919 \`$as_me' instantiates files and other configuration actions
15920 from templates according to the current configuration.  Unless the files
15921 and actions are specified as TAGs, all are instantiated by default.
15922
15923 Usage: $0 [OPTION]... [TAG]...
15924
15925   -h, --help       print this help, then exit
15926   -V, --version    print version number and configuration settings, then exit
15927   -q, --quiet, --silent
15928                    do not print progress messages
15929   -d, --debug      don't remove temporary files
15930       --recheck    update $as_me by reconfiguring in the same conditions
15931       --file=FILE[:TEMPLATE]
15932                    instantiate the configuration file FILE
15933       --header=FILE[:TEMPLATE]
15934                    instantiate the configuration header FILE
15935
15936 Configuration files:
15937 $config_files
15938
15939 Configuration headers:
15940 $config_headers
15941
15942 Configuration links:
15943 $config_links
15944
15945 Configuration commands:
15946 $config_commands
15947
15948 Report bugs to the package provider."
15949
15950 _ACEOF
15951 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15952 ac_cs_version="\\
15953 config.status
15954 configured by $0, generated by GNU Autoconf 2.64,
15955   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
15956
15957 Copyright (C) 2009 Free Software Foundation, Inc.
15958 This config.status script is free software; the Free Software Foundation
15959 gives unlimited permission to copy, distribute and modify it."
15960
15961 ac_pwd='$ac_pwd'
15962 srcdir='$srcdir'
15963 INSTALL='$INSTALL'
15964 AWK='$AWK'
15965 test -n "\$AWK" || AWK=awk
15966 _ACEOF
15967
15968 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15969 # The default lists apply if the user does not specify any file.
15970 ac_need_defaults=:
15971 while test $# != 0
15972 do
15973   case $1 in
15974   --*=*)
15975     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15976     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15977     ac_shift=:
15978     ;;
15979   *)
15980     ac_option=$1
15981     ac_optarg=$2
15982     ac_shift=shift
15983     ;;
15984   esac
15985
15986   case $ac_option in
15987   # Handling of the options.
15988   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15989     ac_cs_recheck=: ;;
15990   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15991     $as_echo "$ac_cs_version"; exit ;;
15992   --debug | --debu | --deb | --de | --d | -d )
15993     debug=: ;;
15994   --file | --fil | --fi | --f )
15995     $ac_shift
15996     case $ac_optarg in
15997     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15998     esac
15999     as_fn_append CONFIG_FILES " '$ac_optarg'"
16000     ac_need_defaults=false;;
16001   --header | --heade | --head | --hea )
16002     $ac_shift
16003     case $ac_optarg in
16004     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16005     esac
16006     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16007     ac_need_defaults=false;;
16008   --he | --h)
16009     # Conflict between --help and --header
16010     as_fn_error "ambiguous option: \`$1'
16011 Try \`$0 --help' for more information.";;
16012   --help | --hel | -h )
16013     $as_echo "$ac_cs_usage"; exit ;;
16014   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16015   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16016     ac_cs_silent=: ;;
16017
16018   # This is an error.
16019   -*) as_fn_error "unrecognized option: \`$1'
16020 Try \`$0 --help' for more information." ;;
16021
16022   *) as_fn_append ac_config_targets " $1"
16023      ac_need_defaults=false ;;
16024
16025   esac
16026   shift
16027 done
16028
16029 ac_configure_extra_args=
16030
16031 if $ac_cs_silent; then
16032   exec 6>/dev/null
16033   ac_configure_extra_args="$ac_configure_extra_args --silent"
16034 fi
16035
16036 _ACEOF
16037 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16038 if \$ac_cs_recheck; then
16039   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16040   shift
16041   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16042   CONFIG_SHELL='$SHELL'
16043   export CONFIG_SHELL
16044   exec "\$@"
16045 fi
16046
16047 _ACEOF
16048 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16049 exec 5>>config.log
16050 {
16051   echo
16052   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16053 ## Running $as_me. ##
16054 _ASBOX
16055   $as_echo "$ac_log"
16056 } >&5
16057
16058 _ACEOF
16059 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16060 #
16061 # INIT-COMMANDS
16062 #
16063 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
16064
16065 _ACEOF
16066
16067 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16068
16069 # Handling of arguments.
16070 for ac_config_target in $ac_config_targets
16071 do
16072   case $ac_config_target in
16073     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16074     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
16075     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
16076     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
16077     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
16078     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16079     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
16080     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
16081     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
16082     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16083
16084   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16085   esac
16086 done
16087
16088
16089 # If the user did not use the arguments to specify the items to instantiate,
16090 # then the envvar interface is used.  Set only those that are not.
16091 # We use the long form for the default assignment because of an extremely
16092 # bizarre bug on SunOS 4.1.3.
16093 if $ac_need_defaults; then
16094   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16095   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16096   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16097   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16098 fi
16099
16100 # Have a temporary directory for convenience.  Make it in the build tree
16101 # simply because there is no reason against having it here, and in addition,
16102 # creating and moving files from /tmp can sometimes cause problems.
16103 # Hook for its removal unless debugging.
16104 # Note that there is a small window in which the directory will not be cleaned:
16105 # after its creation but before its name has been assigned to `$tmp'.
16106 $debug ||
16107 {
16108   tmp=
16109   trap 'exit_status=$?
16110   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16111 ' 0
16112   trap 'as_fn_exit 1' 1 2 13 15
16113 }
16114 # Create a (secure) tmp directory for tmp files.
16115
16116 {
16117   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16118   test -n "$tmp" && test -d "$tmp"
16119 }  ||
16120 {
16121   tmp=./conf$$-$RANDOM
16122   (umask 077 && mkdir "$tmp")
16123 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16124
16125 # Set up the scripts for CONFIG_FILES section.
16126 # No need to generate them if there are no CONFIG_FILES.
16127 # This happens for instance with `./config.status config.h'.
16128 if test -n "$CONFIG_FILES"; then
16129
16130 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16131   ac_cs_awk_getline=:
16132   ac_cs_awk_pipe_init=
16133   ac_cs_awk_read_file='
16134       while ((getline aline < (F[key])) > 0)
16135         print(aline)
16136       close(F[key])'
16137   ac_cs_awk_pipe_fini=
16138 else
16139   ac_cs_awk_getline=false
16140   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16141   ac_cs_awk_read_file='
16142       print "|#_!!_#|"
16143       print "cat " F[key] " &&"
16144       '$ac_cs_awk_pipe_init
16145   # The final `:' finishes the AND list.
16146   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16147 fi
16148 ac_cr=`echo X | tr X '\015'`
16149 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16150 # But we know of no other shell where ac_cr would be empty at this
16151 # point, so we can use a bashism as a fallback.
16152 if test "x$ac_cr" = x; then
16153   eval ac_cr=\$\'\\r\'
16154 fi
16155 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16156 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16157   ac_cs_awk_cr='\r'
16158 else
16159   ac_cs_awk_cr=$ac_cr
16160 fi
16161
16162 echo 'BEGIN {' >"$tmp/subs1.awk" &&
16163 _ACEOF
16164
16165 # Create commands to substitute file output variables.
16166 {
16167   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16168   echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16169   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16170   echo "_ACAWK" &&
16171   echo "_ACEOF"
16172 } >conf$$files.sh &&
16173 . ./conf$$files.sh ||
16174   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16175 rm -f conf$$files.sh
16176
16177 {
16178   echo "cat >conf$$subs.awk <<_ACEOF" &&
16179   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16180   echo "_ACEOF"
16181 } >conf$$subs.sh ||
16182   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16183 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16184 ac_delim='%!_!# '
16185 for ac_last_try in false false false false false :; do
16186   . ./conf$$subs.sh ||
16187     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16188
16189   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16190   if test $ac_delim_n = $ac_delim_num; then
16191     break
16192   elif $ac_last_try; then
16193     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16194   else
16195     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16196   fi
16197 done
16198 rm -f conf$$subs.sh
16199
16200 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16201 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16202 _ACEOF
16203 sed -n '
16204 h
16205 s/^/S["/; s/!.*/"]=/
16206 p
16207 g
16208 s/^[^!]*!//
16209 :repl
16210 t repl
16211 s/'"$ac_delim"'$//
16212 t delim
16213 :nl
16214 h
16215 s/\(.\{148\}\).*/\1/
16216 t more1
16217 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16218 p
16219 n
16220 b repl
16221 :more1
16222 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16223 p
16224 g
16225 s/.\{148\}//
16226 t nl
16227 :delim
16228 h
16229 s/\(.\{148\}\).*/\1/
16230 t more2
16231 s/["\\]/\\&/g; s/^/"/; s/$/"/
16232 p
16233 b
16234 :more2
16235 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16236 p
16237 g
16238 s/.\{148\}//
16239 t delim
16240 ' <conf$$subs.awk | sed '
16241 /^[^""]/{
16242   N
16243   s/\n//
16244 }
16245 ' >>$CONFIG_STATUS || ac_write_fail=1
16246 rm -f conf$$subs.awk
16247 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16248 _ACAWK
16249 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16250   for (key in S) S_is_set[key] = 1
16251   FS = "\a"
16252   \$ac_cs_awk_pipe_init
16253 }
16254 {
16255   line = $ 0
16256   nfields = split(line, field, "@")
16257   substed = 0
16258   len = length(field[1])
16259   for (i = 2; i < nfields; i++) {
16260     key = field[i]
16261     keylen = length(key)
16262     if (S_is_set[key]) {
16263       value = S[key]
16264       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16265       len += length(value) + length(field[++i])
16266       substed = 1
16267     } else
16268       len += 1 + keylen
16269   }
16270   if (nfields == 3 && !substed) {
16271     key = field[2]
16272     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
16273       \$ac_cs_awk_read_file
16274       next
16275     }
16276   }
16277   print line
16278 }
16279 \$ac_cs_awk_pipe_fini
16280 _ACAWK
16281 _ACEOF
16282 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16283 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16284   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16285 else
16286   cat
16287 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16288   || as_fn_error "could not setup config files machinery" "$LINENO" 5
16289 _ACEOF
16290
16291 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16292 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16293 # trailing colons and then remove the whole line if VPATH becomes empty
16294 # (actually we leave an empty line to preserve line numbers).
16295 if test "x$srcdir" = x.; then
16296   ac_vpsub='/^[  ]*VPATH[        ]*=/{
16297 s/:*\$(srcdir):*/:/
16298 s/:*\${srcdir}:*/:/
16299 s/:*@srcdir@:*/:/
16300 s/^\([^=]*=[     ]*\):*/\1/
16301 s/:*$//
16302 s/^[^=]*=[       ]*$//
16303 }'
16304 fi
16305
16306 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16307 fi # test -n "$CONFIG_FILES"
16308
16309 # Set up the scripts for CONFIG_HEADERS section.
16310 # No need to generate them if there are no CONFIG_HEADERS.
16311 # This happens for instance with `./config.status Makefile'.
16312 if test -n "$CONFIG_HEADERS"; then
16313 cat >"$tmp/defines.awk" <<\_ACAWK ||
16314 BEGIN {
16315 _ACEOF
16316
16317 # Transform confdefs.h into an awk script `defines.awk', embedded as
16318 # here-document in config.status, that substitutes the proper values into
16319 # config.h.in to produce config.h.
16320
16321 # Create a delimiter string that does not exist in confdefs.h, to ease
16322 # handling of long lines.
16323 ac_delim='%!_!# '
16324 for ac_last_try in false false :; do
16325   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16326   if test -z "$ac_t"; then
16327     break
16328   elif $ac_last_try; then
16329     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16330   else
16331     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16332   fi
16333 done
16334
16335 # For the awk script, D is an array of macro values keyed by name,
16336 # likewise P contains macro parameters if any.  Preserve backslash
16337 # newline sequences.
16338
16339 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16340 sed -n '
16341 s/.\{148\}/&'"$ac_delim"'/g
16342 t rset
16343 :rset
16344 s/^[     ]*#[    ]*define[       ][      ]*/ /
16345 t def
16346 d
16347 :def
16348 s/\\$//
16349 t bsnl
16350 s/["\\]/\\&/g
16351 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16352 D["\1"]=" \3"/p
16353 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16354 d
16355 :bsnl
16356 s/["\\]/\\&/g
16357 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16358 D["\1"]=" \3\\\\\\n"\\/p
16359 t cont
16360 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16361 t cont
16362 d
16363 :cont
16364 n
16365 s/.\{148\}/&'"$ac_delim"'/g
16366 t clear
16367 :clear
16368 s/\\$//
16369 t bsnlc
16370 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16371 d
16372 :bsnlc
16373 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16374 b cont
16375 ' <confdefs.h | sed '
16376 s/'"$ac_delim"'/"\\\
16377 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16378
16379 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16380   for (key in D) D_is_set[key] = 1
16381   FS = "\a"
16382 }
16383 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16384   line = \$ 0
16385   split(line, arg, " ")
16386   if (arg[1] == "#") {
16387     defundef = arg[2]
16388     mac1 = arg[3]
16389   } else {
16390     defundef = substr(arg[1], 2)
16391     mac1 = arg[2]
16392   }
16393   split(mac1, mac2, "(") #)
16394   macro = mac2[1]
16395   prefix = substr(line, 1, index(line, defundef) - 1)
16396   if (D_is_set[macro]) {
16397     # Preserve the white space surrounding the "#".
16398     print prefix "define", macro P[macro] D[macro]
16399     next
16400   } else {
16401     # Replace #undef with comments.  This is necessary, for example,
16402     # in the case of _POSIX_SOURCE, which is predefined and required
16403     # on some systems where configure will not decide to define it.
16404     if (defundef == "undef") {
16405       print "/*", prefix defundef, macro, "*/"
16406       next
16407     }
16408   }
16409 }
16410 { print }
16411 _ACAWK
16412 _ACEOF
16413 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16414   as_fn_error "could not setup config headers machinery" "$LINENO" 5
16415 fi # test -n "$CONFIG_HEADERS"
16416
16417
16418 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16419 shift
16420 for ac_tag
16421 do
16422   case $ac_tag in
16423   :[FHLC]) ac_mode=$ac_tag; continue;;
16424   esac
16425   case $ac_mode$ac_tag in
16426   :[FHL]*:*);;
16427   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16428   :[FH]-) ac_tag=-:-;;
16429   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16430   esac
16431   ac_save_IFS=$IFS
16432   IFS=:
16433   set x $ac_tag
16434   IFS=$ac_save_IFS
16435   shift
16436   ac_file=$1
16437   shift
16438
16439   case $ac_mode in
16440   :L) ac_source=$1;;
16441   :[FH])
16442     ac_file_inputs=
16443     for ac_f
16444     do
16445       case $ac_f in
16446       -) ac_f="$tmp/stdin";;
16447       *) # Look for the file first in the build tree, then in the source tree
16448          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16449          # because $ac_f cannot contain `:'.
16450          test -f "$ac_f" ||
16451            case $ac_f in
16452            [\\/$]*) false;;
16453            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16454            esac ||
16455            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16456       esac
16457       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16458       as_fn_append ac_file_inputs " '$ac_f'"
16459     done
16460
16461     # Let's still pretend it is `configure' which instantiates (i.e., don't
16462     # use $as_me), people would be surprised to read:
16463     #    /* config.h.  Generated by config.status.  */
16464     configure_input='Generated from '`
16465           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16466         `' by configure.'
16467     if test x"$ac_file" != x-; then
16468       configure_input="$ac_file.  $configure_input"
16469       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16470 $as_echo "$as_me: creating $ac_file" >&6;}
16471     fi
16472     # Neutralize special characters interpreted by sed in replacement strings.
16473     case $configure_input in #(
16474     *\&* | *\|* | *\\* )
16475        ac_sed_conf_input=`$as_echo "$configure_input" |
16476        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16477     *) ac_sed_conf_input=$configure_input;;
16478     esac
16479
16480     case $ac_tag in
16481     *:-:* | *:-) cat >"$tmp/stdin" \
16482       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16483     esac
16484     ;;
16485   esac
16486
16487   ac_dir=`$as_dirname -- "$ac_file" ||
16488 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16489          X"$ac_file" : 'X\(//\)[^/]' \| \
16490          X"$ac_file" : 'X\(//\)$' \| \
16491          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16492 $as_echo X"$ac_file" |
16493     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16494             s//\1/
16495             q
16496           }
16497           /^X\(\/\/\)[^/].*/{
16498             s//\1/
16499             q
16500           }
16501           /^X\(\/\/\)$/{
16502             s//\1/
16503             q
16504           }
16505           /^X\(\/\).*/{
16506             s//\1/
16507             q
16508           }
16509           s/.*/./; q'`
16510   as_dir="$ac_dir"; as_fn_mkdir_p
16511   ac_builddir=.
16512
16513 case "$ac_dir" in
16514 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16515 *)
16516   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16517   # A ".." for each directory in $ac_dir_suffix.
16518   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16519   case $ac_top_builddir_sub in
16520   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16521   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16522   esac ;;
16523 esac
16524 ac_abs_top_builddir=$ac_pwd
16525 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16526 # for backward compatibility:
16527 ac_top_builddir=$ac_top_build_prefix
16528
16529 case $srcdir in
16530   .)  # We are building in place.
16531     ac_srcdir=.
16532     ac_top_srcdir=$ac_top_builddir_sub
16533     ac_abs_top_srcdir=$ac_pwd ;;
16534   [\\/]* | ?:[\\/]* )  # Absolute name.
16535     ac_srcdir=$srcdir$ac_dir_suffix;
16536     ac_top_srcdir=$srcdir
16537     ac_abs_top_srcdir=$srcdir ;;
16538   *) # Relative name.
16539     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16540     ac_top_srcdir=$ac_top_build_prefix$srcdir
16541     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16542 esac
16543 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16544
16545
16546   case $ac_mode in
16547   :F)
16548   #
16549   # CONFIG_FILE
16550   #
16551
16552   case $INSTALL in
16553   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16554   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16555   esac
16556 _ACEOF
16557
16558 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16559 # If the template does not know about datarootdir, expand it.
16560 # FIXME: This hack should be removed a few years after 2.60.
16561 ac_datarootdir_hack=; ac_datarootdir_seen=
16562 ac_sed_dataroot='
16563 /datarootdir/ {
16564   p
16565   q
16566 }
16567 /@datadir@/p
16568 /@docdir@/p
16569 /@infodir@/p
16570 /@localedir@/p
16571 /@mandir@/p'
16572 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16573 *datarootdir*) ac_datarootdir_seen=yes;;
16574 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16575   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16576 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16577 _ACEOF
16578 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16579   ac_datarootdir_hack='
16580   s&@datadir@&$datadir&g
16581   s&@docdir@&$docdir&g
16582   s&@infodir@&$infodir&g
16583   s&@localedir@&$localedir&g
16584   s&@mandir@&$mandir&g
16585   s&\\\${datarootdir}&$datarootdir&g' ;;
16586 esac
16587 _ACEOF
16588
16589 # Neutralize VPATH when `$srcdir' = `.'.
16590 # Shell code in configure.ac might set extrasub.
16591 # FIXME: do we really want to maintain this feature?
16592 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16593 ac_sed_extra="$ac_vpsub
16594 $extrasub
16595 _ACEOF
16596 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16597 :t
16598 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16599 s|@configure_input@|$ac_sed_conf_input|;t t
16600 s&@top_builddir@&$ac_top_builddir_sub&;t t
16601 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16602 s&@srcdir@&$ac_srcdir&;t t
16603 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16604 s&@top_srcdir@&$ac_top_srcdir&;t t
16605 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16606 s&@builddir@&$ac_builddir&;t t
16607 s&@abs_builddir@&$ac_abs_builddir&;t t
16608 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16609 s&@INSTALL@&$ac_INSTALL&;t t
16610 $ac_datarootdir_hack
16611 "
16612 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16613 if $ac_cs_awk_getline; then
16614   $AWK -f "$tmp/subs.awk"
16615 else
16616   $AWK -f "$tmp/subs.awk" | $SHELL
16617 fi >$tmp/out \
16618   || as_fn_error "could not create $ac_file" "$LINENO" 5
16619
16620 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16621   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16622   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16623   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16624 which seems to be undefined.  Please make sure it is defined." >&5
16625 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16626 which seems to be undefined.  Please make sure it is defined." >&2;}
16627
16628   rm -f "$tmp/stdin"
16629   case $ac_file in
16630   -) cat "$tmp/out" && rm -f "$tmp/out";;
16631   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16632   esac \
16633   || as_fn_error "could not create $ac_file" "$LINENO" 5
16634  ;;
16635   :H)
16636   #
16637   # CONFIG_HEADER
16638   #
16639   if test x"$ac_file" != x-; then
16640     {
16641       $as_echo "/* $configure_input  */" \
16642       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16643     } >"$tmp/config.h" \
16644       || as_fn_error "could not create $ac_file" "$LINENO" 5
16645     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16646       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16647 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16648     else
16649       rm -f "$ac_file"
16650       mv "$tmp/config.h" "$ac_file" \
16651         || as_fn_error "could not create $ac_file" "$LINENO" 5
16652     fi
16653   else
16654     $as_echo "/* $configure_input  */" \
16655       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16656       || as_fn_error "could not create -" "$LINENO" 5
16657   fi
16658  ;;
16659   :L)
16660   #
16661   # CONFIG_LINK
16662   #
16663
16664   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16665     :
16666   else
16667     # Prefer the file from the source tree if names are identical.
16668     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16669       ac_source=$srcdir/$ac_source
16670     fi
16671
16672     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16673 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16674
16675     if test ! -r "$ac_source"; then
16676       as_fn_error "$ac_source: file not found" "$LINENO" 5
16677     fi
16678     rm -f "$ac_file"
16679
16680     # Try a relative symlink, then a hard link, then a copy.
16681     case $srcdir in
16682     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16683         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16684     esac
16685     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16686       ln "$ac_source" "$ac_file" 2>/dev/null ||
16687       cp -p "$ac_source" "$ac_file" ||
16688       as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16689   fi
16690  ;;
16691   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16692 $as_echo "$as_me: executing $ac_file commands" >&6;}
16693  ;;
16694   esac
16695
16696
16697   case $ac_file$ac_mode in
16698     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
16699     "gcore":F) chmod +x gcore ;;
16700     "default":C)
16701 case x$CONFIG_HEADERS in
16702 xconfig.h:config.in)
16703 echo > stamp-h ;;
16704 esac
16705  ;;
16706
16707   esac
16708 done # for ac_tag
16709
16710
16711 as_fn_exit 0
16712 _ACEOF
16713 ac_clean_files=$ac_clean_files_save
16714
16715 test $ac_write_fail = 0 ||
16716   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16717
16718
16719 # configure is writing to config.log, and then calls config.status.
16720 # config.status does its own redirection, appending to config.log.
16721 # Unfortunately, on DOS this fails, as config.log is still kept open
16722 # by configure, so config.status won't be able to write to it; its
16723 # output is simply discarded.  So we exec the FD to /dev/null,
16724 # effectively closing config.log, so it can be properly (re)opened and
16725 # appended to by config.status.  When coming back to configure, we
16726 # need to make the FD available again.
16727 if test "$no_create" != yes; then
16728   ac_cs_success=:
16729   ac_config_status_args=
16730   test "$silent" = yes &&
16731     ac_config_status_args="$ac_config_status_args --quiet"
16732   exec 5>/dev/null
16733   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16734   exec 5>>config.log
16735   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16736   # would make configure fail if this is the last instruction.
16737   $ac_cs_success || as_fn_exit $?
16738 fi
16739
16740 #
16741 # CONFIG_SUBDIRS section.
16742 #
16743 if test "$no_recursion" != yes; then
16744
16745   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16746   # so they do not pile up.
16747   ac_sub_configure_args=
16748   ac_prev=
16749   eval "set x $ac_configure_args"
16750   shift
16751   for ac_arg
16752   do
16753     if test -n "$ac_prev"; then
16754       ac_prev=
16755       continue
16756     fi
16757     case $ac_arg in
16758     -cache-file | --cache-file | --cache-fil | --cache-fi \
16759     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16760       ac_prev=cache_file ;;
16761     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
16762     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16763     | --c=*)
16764       ;;
16765     --config-cache | -C)
16766       ;;
16767     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16768       ac_prev=srcdir ;;
16769     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16770       ;;
16771     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16772       ac_prev=prefix ;;
16773     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16774       ;;
16775     --disable-option-checking)
16776       ;;
16777     *)
16778       case $ac_arg in
16779       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
16780       esac
16781       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
16782     esac
16783   done
16784
16785   # Always prepend --prefix to ensure using the same prefix
16786   # in subdir configurations.
16787   ac_arg="--prefix=$prefix"
16788   case $ac_arg in
16789   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
16790   esac
16791   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16792
16793   # Pass --silent
16794   if test "$silent" = yes; then
16795     ac_sub_configure_args="--silent $ac_sub_configure_args"
16796   fi
16797
16798   # Always prepend --disable-option-checking to silence warnings, since
16799   # different subdirs can have different --enable and --with options.
16800   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
16801
16802   ac_popdir=`pwd`
16803   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
16804
16805     # Do not complain, so a configure script can configure whichever
16806     # parts of a large source tree are present.
16807     test -d "$srcdir/$ac_dir" || continue
16808
16809     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16810     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16811     $as_echo "$ac_msg" >&6
16812     as_dir="$ac_dir"; as_fn_mkdir_p
16813     ac_builddir=.
16814
16815 case "$ac_dir" in
16816 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16817 *)
16818   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16819   # A ".." for each directory in $ac_dir_suffix.
16820   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16821   case $ac_top_builddir_sub in
16822   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16823   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16824   esac ;;
16825 esac
16826 ac_abs_top_builddir=$ac_pwd
16827 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16828 # for backward compatibility:
16829 ac_top_builddir=$ac_top_build_prefix
16830
16831 case $srcdir in
16832   .)  # We are building in place.
16833     ac_srcdir=.
16834     ac_top_srcdir=$ac_top_builddir_sub
16835     ac_abs_top_srcdir=$ac_pwd ;;
16836   [\\/]* | ?:[\\/]* )  # Absolute name.
16837     ac_srcdir=$srcdir$ac_dir_suffix;
16838     ac_top_srcdir=$srcdir
16839     ac_abs_top_srcdir=$srcdir ;;
16840   *) # Relative name.
16841     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16842     ac_top_srcdir=$ac_top_build_prefix$srcdir
16843     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16844 esac
16845 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16846
16847
16848     cd "$ac_dir"
16849
16850     # Check for guested configure; otherwise get Cygnus style configure.
16851     if test -f "$ac_srcdir/configure.gnu"; then
16852       ac_sub_configure=$ac_srcdir/configure.gnu
16853     elif test -f "$ac_srcdir/configure"; then
16854       ac_sub_configure=$ac_srcdir/configure
16855     elif test -f "$ac_srcdir/configure.in"; then
16856       # This should be Cygnus configure.
16857       ac_sub_configure=$ac_aux_dir/configure
16858     else
16859       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16860 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
16861       ac_sub_configure=
16862     fi
16863
16864     # The recursion is here.
16865     if test -n "$ac_sub_configure"; then
16866       # Make the cache file name correct relative to the subdirectory.
16867       case $cache_file in
16868       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
16869       *) # Relative name.
16870         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
16871       esac
16872
16873       { $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
16874 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
16875       # The eval makes quoting arguments work.
16876       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16877            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
16878         as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
16879     fi
16880
16881     cd "$ac_popdir"
16882   done
16883 fi
16884 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16885   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16886 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16887 fi
16888
16889
16890 exit 0