Remove IRIX 5 <sys/proc.h> _KMEMUSER workaround
[external/binutils.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.64.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7 # Foundation, Inc.
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18   emulate sh
19   NULLCMD=:
20   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23   setopt NO_GLOB_SUBST
24 else
25   case `(set -o) 2>/dev/null` in #(
26   *posix*) :
27     set -o posix ;; #(
28   *) :
29      ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45   as_echo='print -r --'
46   as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48   as_echo='printf %s\n'
49   as_echo_n='printf %s'
50 else
51   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53     as_echo_n='/usr/ucb/echo -n'
54   else
55     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56     as_echo_n_body='eval
57       arg=$1;
58       case $arg in #(
59       *"$as_nl"*)
60         expr "X$arg" : "X\\(.*\\)$as_nl";
61         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62       esac;
63       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64     '
65     export as_echo_n_body
66     as_echo_n='sh -c $as_echo_n_body as_echo'
67   fi
68   export as_echo_body
69   as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74   PATH_SEPARATOR=:
75   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77       PATH_SEPARATOR=';'
78   }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order.  Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" ""        $as_nl"
88
89 # Find who we are.  Look in the path if we contain no directory separator.
90 case $0 in #((
91   *[\\/]* ) as_myself=$0 ;;
92   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93 for as_dir in $PATH
94 do
95   IFS=$as_save_IFS
96   test -z "$as_dir" && as_dir=.
97     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98   done
99 IFS=$as_save_IFS
100
101      ;;
102 esac
103 # We did not find ourselves, most probably we were run as `sh COMMAND'
104 # in which case we are not to be found in the path.
105 if test "x$as_myself" = x; then
106   as_myself=$0
107 fi
108 if test ! -f "$as_myself"; then
109   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110   exit 1
111 fi
112
113 # Unset variables that we do not need and which cause bugs (e.g. in
114 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
115 # suppresses any "Segmentation fault" message there.  '((' could
116 # trigger a bug in pdksh 5.2.14.
117 for as_var in BASH_ENV ENV MAIL MAILPATH
118 do eval test x\${$as_var+set} = xset \
119   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120 done
121 PS1='$ '
122 PS2='> '
123 PS4='+ '
124
125 # NLS nuisances.
126 LC_ALL=C
127 export LC_ALL
128 LANGUAGE=C
129 export LANGUAGE
130
131 # CDPATH.
132 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134 if test "x$CONFIG_SHELL" = x; then
135   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136   emulate sh
137   NULLCMD=:
138   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139   # is contrary to our usage.  Disable this feature.
140   alias -g '\${1+\"\$@\"}'='\"\$@\"'
141   setopt NO_GLOB_SUBST
142 else
143   case \`(set -o) 2>/dev/null\` in #(
144   *posix*) :
145     set -o posix ;; #(
146   *) :
147      ;;
148 esac
149 fi
150 "
151   as_required="as_fn_return () { (exit \$1); }
152 as_fn_success () { as_fn_return 0; }
153 as_fn_failure () { as_fn_return 1; }
154 as_fn_ret_success () { return 0; }
155 as_fn_ret_failure () { return 1; }
156
157 exitcode=0
158 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164 else
165   exitcode=1; echo positional parameters were not saved.
166 fi
167 test x\$exitcode = x0 || exit 1"
168   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172 test \$(( 1 + 1 )) = 2 || exit 1"
173   if (eval "$as_required") 2>/dev/null; then :
174   as_have_required=yes
175 else
176   as_have_required=no
177 fi
178   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180 else
181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182 as_found=false
183 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
184 do
185   IFS=$as_save_IFS
186   test -z "$as_dir" && as_dir=.
187   as_found=:
188   case $as_dir in #(
189          /*)
190            for as_base in sh bash ksh sh5; do
191              # Try only shells that exist, to save several forks.
192              as_shell=$as_dir/$as_base
193              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195   CONFIG_SHELL=$as_shell as_have_required=yes
196                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197   break 2
198 fi
199 fi
200            done;;
201        esac
202   as_found=false
203 done
204 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206   CONFIG_SHELL=$SHELL as_have_required=yes
207 fi; }
208 IFS=$as_save_IFS
209
210
211       if test "x$CONFIG_SHELL" != x; then :
212   # We cannot yet assume a decent shell, so we have to provide a
213         # neutralization value for shells without unset; and this also
214         # works around shells that cannot unset nonexistent variables.
215         BASH_ENV=/dev/null
216         ENV=/dev/null
217         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218         export CONFIG_SHELL
219         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220 fi
221
222     if test x$as_have_required = xno; then :
223   $as_echo "$0: This script requires a shell more modern than all"
224   $as_echo "$0: the shells that I found on your system."
225   if test x${ZSH_VERSION+set} = xset ; then
226     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
228   else
229     $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230 $0: including any error possibly output before this
231 $0: message. Then install a modern shell, or manually run
232 $0: the script under such a shell if you do have one."
233   fi
234   exit 1
235 fi
236 fi
237 fi
238 SHELL=${CONFIG_SHELL-/bin/sh}
239 export SHELL
240 # Unset more variables known to interfere with behavior of common tools.
241 CLICOLOR_FORCE= GREP_OPTIONS=
242 unset CLICOLOR_FORCE GREP_OPTIONS
243
244 ## --------------------- ##
245 ## M4sh Shell Functions. ##
246 ## --------------------- ##
247 # as_fn_unset VAR
248 # ---------------
249 # Portably unset VAR.
250 as_fn_unset ()
251 {
252   { eval $1=; unset $1;}
253 }
254 as_unset=as_fn_unset
255
256 # as_fn_set_status STATUS
257 # -----------------------
258 # Set $? to STATUS, without forking.
259 as_fn_set_status ()
260 {
261   return $1
262 } # as_fn_set_status
263
264 # as_fn_exit STATUS
265 # -----------------
266 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267 as_fn_exit ()
268 {
269   set +e
270   as_fn_set_status $1
271   exit $1
272 } # as_fn_exit
273
274 # as_fn_mkdir_p
275 # -------------
276 # Create "$as_dir" as a directory, including parents if necessary.
277 as_fn_mkdir_p ()
278 {
279
280   case $as_dir in #(
281   -*) as_dir=./$as_dir;;
282   esac
283   test -d "$as_dir" || eval $as_mkdir_p || {
284     as_dirs=
285     while :; do
286       case $as_dir in #(
287       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288       *) as_qdir=$as_dir;;
289       esac
290       as_dirs="'$as_qdir' $as_dirs"
291       as_dir=`$as_dirname -- "$as_dir" ||
292 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293          X"$as_dir" : 'X\(//\)[^/]' \| \
294          X"$as_dir" : 'X\(//\)$' \| \
295          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296 $as_echo X"$as_dir" |
297     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298             s//\1/
299             q
300           }
301           /^X\(\/\/\)[^/].*/{
302             s//\1/
303             q
304           }
305           /^X\(\/\/\)$/{
306             s//\1/
307             q
308           }
309           /^X\(\/\).*/{
310             s//\1/
311             q
312           }
313           s/.*/./; q'`
314       test -d "$as_dir" && break
315     done
316     test -z "$as_dirs" || eval "mkdir $as_dirs"
317   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320 } # as_fn_mkdir_p
321 # as_fn_append VAR VALUE
322 # ----------------------
323 # Append the text in VALUE to the end of the definition contained in VAR. Take
324 # advantage of any shell optimizations that allow amortized linear growth over
325 # repeated appends, instead of the typical quadratic growth present in naive
326 # implementations.
327 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328   eval 'as_fn_append ()
329   {
330     eval $1+=\$2
331   }'
332 else
333   as_fn_append ()
334   {
335     eval $1=\$$1\$2
336   }
337 fi # as_fn_append
338
339 # as_fn_arith ARG...
340 # ------------------
341 # Perform arithmetic evaluation on the ARGs, and store the result in the
342 # global $as_val. Take advantage of shells that can avoid forks. The arguments
343 # must be portable across $(()) and expr.
344 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345   eval 'as_fn_arith ()
346   {
347     as_val=$(( $* ))
348   }'
349 else
350   as_fn_arith ()
351   {
352     as_val=`expr "$@" || test $? -eq 1`
353   }
354 fi # as_fn_arith
355
356
357 # as_fn_error ERROR [LINENO LOG_FD]
358 # ---------------------------------
359 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361 # script with status $?, using 1 if that was 0.
362 as_fn_error ()
363 {
364   as_status=$?; test $as_status -eq 0 && as_status=1
365   if test "$3"; then
366     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368   fi
369   $as_echo "$as_me: error: $1" >&2
370   as_fn_exit $as_status
371 } # as_fn_error
372
373 if expr a : '\(a\)' >/dev/null 2>&1 &&
374    test "X`expr 00001 : '.*\(...\)'`" = X001; then
375   as_expr=expr
376 else
377   as_expr=false
378 fi
379
380 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
381   as_basename=basename
382 else
383   as_basename=false
384 fi
385
386 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387   as_dirname=dirname
388 else
389   as_dirname=false
390 fi
391
392 as_me=`$as_basename -- "$0" ||
393 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394          X"$0" : 'X\(//\)$' \| \
395          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396 $as_echo X/"$0" |
397     sed '/^.*\/\([^/][^/]*\)\/*$/{
398             s//\1/
399             q
400           }
401           /^X\/\(\/\/\)$/{
402             s//\1/
403             q
404           }
405           /^X\/\(\/\).*/{
406             s//\1/
407             q
408           }
409           s/.*/./; q'`
410
411 # Avoid depending upon Character Ranges.
412 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415 as_cr_digits='0123456789'
416 as_cr_alnum=$as_cr_Letters$as_cr_digits
417
418
419   as_lineno_1=$LINENO as_lineno_1a=$LINENO
420   as_lineno_2=$LINENO as_lineno_2a=$LINENO
421   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
424   sed -n '
425     p
426     /[$]LINENO/=
427   ' <$as_myself |
428     sed '
429       s/[$]LINENO.*/&-/
430       t lineno
431       b
432       :lineno
433       N
434       :loop
435       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
436       t loop
437       s/-\n.*//
438     ' >$as_me.lineno &&
439   chmod +x "$as_me.lineno" ||
440     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
441
442   # Don't try to exec as it changes $[0], causing all sort of problems
443   # (the dirname of $[0] is not the place where we might find the
444   # original and so on.  Autoconf is especially sensitive to this).
445   . "./$as_me.lineno"
446   # Exit status is that of the last command.
447   exit
448 }
449
450 ECHO_C= ECHO_N= ECHO_T=
451 case `echo -n x` in #(((((
452 -n*)
453   case `echo 'xy\c'` in
454   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
455   xy)  ECHO_C='\c';;
456   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
457        ECHO_T=' ';;
458   esac;;
459 *)
460   ECHO_N='-n';;
461 esac
462
463 rm -f conf$$ conf$$.exe conf$$.file
464 if test -d conf$$.dir; then
465   rm -f conf$$.dir/conf$$.file
466 else
467   rm -f conf$$.dir
468   mkdir conf$$.dir 2>/dev/null
469 fi
470 if (echo >conf$$.file) 2>/dev/null; then
471   if ln -s conf$$.file conf$$ 2>/dev/null; then
472     as_ln_s='ln -s'
473     # ... but there are two gotchas:
474     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476     # In both cases, we have to default to `cp -p'.
477     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478       as_ln_s='cp -p'
479   elif ln conf$$.file conf$$ 2>/dev/null; then
480     as_ln_s=ln
481   else
482     as_ln_s='cp -p'
483   fi
484 else
485   as_ln_s='cp -p'
486 fi
487 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488 rmdir conf$$.dir 2>/dev/null
489
490 if mkdir -p . 2>/dev/null; then
491   as_mkdir_p='mkdir -p "$as_dir"'
492 else
493   test -d ./-p && rmdir ./-p
494   as_mkdir_p=false
495 fi
496
497 if test -x / >/dev/null 2>&1; then
498   as_test_x='test -x'
499 else
500   if ls -dL / >/dev/null 2>&1; then
501     as_ls_L_option=L
502   else
503     as_ls_L_option=
504   fi
505   as_test_x='
506     eval sh -c '\''
507       if test -d "$1"; then
508         test -d "$1/.";
509       else
510         case $1 in #(
511         -*)set "./$1";;
512         esac;
513         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514         ???[sx]*):;;*)false;;esac;fi
515     '\'' sh
516   '
517 fi
518 as_executable_p=$as_test_x
519
520 # Sed expression to map a string onto a valid CPP name.
521 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523 # Sed expression to map a string onto a valid variable name.
524 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
527 exec 7<&0 </dev/null 6>&1
528
529 # Name of the host.
530 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531 # so uname gets run too.
532 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
534 #
535 # Initializations.
536 #
537 ac_default_prefix=/usr/local
538 ac_clean_files=
539 ac_config_libobj_dir=.
540 LIBOBJS=
541 cross_compiling=no
542 subdirs=
543 MFLAGS=
544 MAKEFLAGS=
545
546 # Identity of this package.
547 PACKAGE_NAME=
548 PACKAGE_TARNAME=
549 PACKAGE_VERSION=
550 PACKAGE_STRING=
551 PACKAGE_BUGREPORT=
552 PACKAGE_URL=
553
554 ac_unique_file="main.c"
555 # Factoring default headers for most tests.
556 ac_includes_default="\
557 #include <stdio.h>
558 #ifdef HAVE_SYS_TYPES_H
559 # include <sys/types.h>
560 #endif
561 #ifdef HAVE_SYS_STAT_H
562 # include <sys/stat.h>
563 #endif
564 #ifdef STDC_HEADERS
565 # include <stdlib.h>
566 # include <stddef.h>
567 #else
568 # ifdef HAVE_STDLIB_H
569 #  include <stdlib.h>
570 # endif
571 #endif
572 #ifdef HAVE_STRING_H
573 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
574 #  include <memory.h>
575 # endif
576 # include <string.h>
577 #endif
578 #ifdef HAVE_STRINGS_H
579 # include <strings.h>
580 #endif
581 #ifdef HAVE_INTTYPES_H
582 # include <inttypes.h>
583 #endif
584 #ifdef HAVE_STDINT_H
585 # include <stdint.h>
586 #endif
587 #ifdef HAVE_UNISTD_H
588 # include <unistd.h>
589 #endif"
590
591 enable_option_checking=no
592 ac_subst_vars='LTLIBOBJS
593 LIBOBJS
594 GCORE_TRANSFORM_NAME
595 GDB_TRANSFORM_NAME
596 XSLTPROC
597 GDB_NM_FILE
598 LTLIBBABELTRACE
599 LIBBABELTRACE
600 HAVE_LIBBABELTRACE
601 frags
602 target_subdir
603 CONFIG_UNINSTALL
604 CONFIG_INSTALL
605 CONFIG_CLEAN
606 CONFIG_ALL
607 CONFIG_SRCS
608 CONFIG_DEPS
609 CONFIG_OBS
610 PROFILE_CFLAGS
611 ENABLE_CFLAGS
612 SIM_OBS
613 SIM
614 XMKMF
615 GDBTK_SRC_DIR
616 GDBTK_CFLAGS
617 GDBTKLIBS
618 X_LIBS
619 X_LDFLAGS
620 X_CFLAGS
621 TK_XINCLUDES
622 TK_DEPS
623 TK_LIBRARY
624 TK_INCLUDE
625 TK_STUB_LIB_SPEC
626 TK_STUB_LIB_FLAG
627 TK_STUB_LIB_FILE
628 TK_LIB_SPEC
629 TK_LIB_FLAG
630 TK_LIB_FILE
631 TK_SRC_DIR
632 TK_BIN_DIR
633 TK_VERSION
634 TCL_DEPS
635 TCL_LIBRARY
636 TCL_INCLUDE
637 TCL_STUB_LIB_SPEC
638 TCL_STUB_LIB_FLAG
639 TCL_STUB_LIB_FILE
640 TCL_LIB_SPEC
641 TCL_LIB_FLAG
642 TCL_LIB_FILE
643 TCL_SRC_DIR
644 TCL_BIN_DIR
645 TCL_PATCH_LEVEL
646 TCL_VERSION
647 WIN32LDAPP
648 GUI_CFLAGS_X
649 LIBGUI
650 LTLIBLZMA
651 LIBLZMA
652 HAVE_LIBLZMA
653 WIN32LIBS
654 SER_HARDWIRE
655 WERROR_CFLAGS
656 WARN_CFLAGS
657 SYSTEM_GDBINIT
658 TARGET_SYSTEM_ROOT
659 CONFIG_LDFLAGS
660 RDYNAMIC
661 ALLOCA
662 LTLIBIPT
663 LIBIPT
664 HAVE_LIBIPT
665 HAVE_GUILE_FALSE
666 HAVE_GUILE_TRUE
667 GUILE_LIBS
668 GUILE_CPPFLAGS
669 GUILD_TARGET_FLAG
670 GUILD
671 pkg_config_prog_path
672 HAVE_PYTHON_FALSE
673 HAVE_PYTHON_TRUE
674 PYTHON_LIBS
675 PYTHON_CPPFLAGS
676 PYTHON_CFLAGS
677 python_prog_path
678 LTLIBEXPAT
679 LIBEXPAT
680 HAVE_LIBEXPAT
681 JIT_READER_DIR
682 TARGET_PTR
683 READLINE_TEXI_INCFLAG
684 READLINE_CFLAGS
685 READLINE_DEPS
686 READLINE
687 LTLIBICONV
688 LIBICONV
689 zlibinc
690 zlibdir
691 MIG
692 WINDRES
693 DLLTOOL
694 AR
695 YFLAGS
696 YACC
697 RANLIB
698 LN_S
699 INSTALL_DATA
700 INSTALL_SCRIPT
701 INSTALL_PROGRAM
702 AWK
703 REPORT_BUGS_TEXI
704 REPORT_BUGS_TO
705 PKGVERSION
706 HAVE_NATIVE_GCORE_TARGET
707 TARGET_OBS
708 subdirs
709 GDB_DATADIR
710 DEBUGDIR
711 MAKEINFO_EXTRA_FLAGS
712 MAKEINFOFLAGS
713 MAKEINFO
714 PACKAGE
715 GNULIB_STDINT_H
716 CATOBJEXT
717 GENCAT
718 INSTOBJEXT
719 DATADIRNAME
720 CATALOGS
721 POSUB
722 GMSGFMT
723 XGETTEXT
724 INCINTL
725 LIBINTL_DEP
726 LIBINTL
727 USE_NLS
728 SET_MAKE
729 GMAKE_FALSE
730 GMAKE_TRUE
731 MAKE
732 CCDEPMODE
733 DEPDIR
734 am__leading_dot
735 CXX_DIALECT
736 HAVE_CXX11
737 INSTALL_STRIP_PROGRAM
738 STRIP
739 install_sh
740 target_os
741 target_vendor
742 target_cpu
743 target
744 host_os
745 host_vendor
746 host_cpu
747 host
748 build_os
749 build_vendor
750 build_cpu
751 build
752 EGREP
753 GREP
754 CPP
755 ac_ct_CXX
756 CXXFLAGS
757 CXX
758 OBJEXT
759 EXEEXT
760 ac_ct_CC
761 CPPFLAGS
762 LDFLAGS
763 CFLAGS
764 CC
765 MAINT
766 MAINTAINER_MODE_FALSE
767 MAINTAINER_MODE_TRUE
768 target_alias
769 host_alias
770 build_alias
771 LIBS
772 ECHO_T
773 ECHO_N
774 ECHO_C
775 DEFS
776 mandir
777 localedir
778 libdir
779 psdir
780 pdfdir
781 dvidir
782 htmldir
783 infodir
784 docdir
785 oldincludedir
786 includedir
787 localstatedir
788 sharedstatedir
789 sysconfdir
790 datadir
791 datarootdir
792 libexecdir
793 sbindir
794 bindir
795 program_transform_name
796 prefix
797 exec_prefix
798 PACKAGE_URL
799 PACKAGE_BUGREPORT
800 PACKAGE_STRING
801 PACKAGE_VERSION
802 PACKAGE_TARNAME
803 PACKAGE_NAME
804 PATH_SEPARATOR
805 SHELL'
806 ac_subst_files='host_makefile_frag'
807 ac_user_opts='
808 enable_option_checking
809 enable_maintainer_mode
810 enable_plugins
811 enable_largefile
812 with_separate_debug_dir
813 with_gdb_datadir
814 with_relocated_sources
815 with_auto_load_dir
816 with_auto_load_safe_path
817 enable_targets
818 enable_64_bit_bfd
819 enable_gdbcli
820 enable_gdbmi
821 enable_tui
822 enable_gdbtk
823 with_libunwind_ia64
824 with_curses
825 enable_profiling
826 with_pkgversion
827 with_bugurl
828 with_system_zlib
829 with_gnu_ld
830 enable_rpath
831 with_libiconv_prefix
832 with_iconv_bin
833 with_system_readline
834 with_jit_reader_dir
835 with_expat
836 with_libexpat_prefix
837 with_python
838 with_guile
839 enable_libmcheck
840 with_intel_pt
841 with_libipt_prefix
842 with_included_regex
843 with_sysroot
844 with_system_gdbinit
845 enable_werror
846 enable_build_warnings
847 enable_gdb_build_warnings
848 with_lzma
849 with_liblzma_prefix
850 with_tcl
851 with_tk
852 with_x
853 enable_sim
854 enable_multi_ice
855 enable_gdbserver
856 with_babeltrace
857 with_libbabeltrace_prefix
858 '
859       ac_precious_vars='build_alias
860 host_alias
861 target_alias
862 CC
863 CFLAGS
864 LDFLAGS
865 LIBS
866 CPPFLAGS
867 CXX
868 CXXFLAGS
869 CCC
870 CPP
871 MAKEINFO
872 MAKEINFOFLAGS
873 YACC
874 YFLAGS
875 XMKMF'
876 ac_subdirs_all='testsuite
877 gdbtk
878 multi-ice
879 gdbserver'
880
881 # Initialize some variables set by options.
882 ac_init_help=
883 ac_init_version=false
884 ac_unrecognized_opts=
885 ac_unrecognized_sep=
886 # The variables have the same names as the options, with
887 # dashes changed to underlines.
888 cache_file=/dev/null
889 exec_prefix=NONE
890 no_create=
891 no_recursion=
892 prefix=NONE
893 program_prefix=NONE
894 program_suffix=NONE
895 program_transform_name=s,x,x,
896 silent=
897 site=
898 srcdir=
899 verbose=
900 x_includes=NONE
901 x_libraries=NONE
902
903 # Installation directory options.
904 # These are left unexpanded so users can "make install exec_prefix=/foo"
905 # and all the variables that are supposed to be based on exec_prefix
906 # by default will actually change.
907 # Use braces instead of parens because sh, perl, etc. also accept them.
908 # (The list follows the same order as the GNU Coding Standards.)
909 bindir='${exec_prefix}/bin'
910 sbindir='${exec_prefix}/sbin'
911 libexecdir='${exec_prefix}/libexec'
912 datarootdir='${prefix}/share'
913 datadir='${datarootdir}'
914 sysconfdir='${prefix}/etc'
915 sharedstatedir='${prefix}/com'
916 localstatedir='${prefix}/var'
917 includedir='${prefix}/include'
918 oldincludedir='/usr/include'
919 docdir='${datarootdir}/doc/${PACKAGE}'
920 infodir='${datarootdir}/info'
921 htmldir='${docdir}'
922 dvidir='${docdir}'
923 pdfdir='${docdir}'
924 psdir='${docdir}'
925 libdir='${exec_prefix}/lib'
926 localedir='${datarootdir}/locale'
927 mandir='${datarootdir}/man'
928
929 ac_prev=
930 ac_dashdash=
931 for ac_option
932 do
933   # If the previous option needs an argument, assign it.
934   if test -n "$ac_prev"; then
935     eval $ac_prev=\$ac_option
936     ac_prev=
937     continue
938   fi
939
940   case $ac_option in
941   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
942   *)    ac_optarg=yes ;;
943   esac
944
945   # Accept the important Cygnus configure options, so we can diagnose typos.
946
947   case $ac_dashdash$ac_option in
948   --)
949     ac_dashdash=yes ;;
950
951   -bindir | --bindir | --bindi | --bind | --bin | --bi)
952     ac_prev=bindir ;;
953   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
954     bindir=$ac_optarg ;;
955
956   -build | --build | --buil | --bui | --bu)
957     ac_prev=build_alias ;;
958   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
959     build_alias=$ac_optarg ;;
960
961   -cache-file | --cache-file | --cache-fil | --cache-fi \
962   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
963     ac_prev=cache_file ;;
964   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
965   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
966     cache_file=$ac_optarg ;;
967
968   --config-cache | -C)
969     cache_file=config.cache ;;
970
971   -datadir | --datadir | --datadi | --datad)
972     ac_prev=datadir ;;
973   -datadir=* | --datadir=* | --datadi=* | --datad=*)
974     datadir=$ac_optarg ;;
975
976   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
977   | --dataroo | --dataro | --datar)
978     ac_prev=datarootdir ;;
979   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
980   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
981     datarootdir=$ac_optarg ;;
982
983   -disable-* | --disable-*)
984     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
985     # Reject names that are not valid shell variable names.
986     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
987       as_fn_error "invalid feature name: $ac_useropt"
988     ac_useropt_orig=$ac_useropt
989     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990     case $ac_user_opts in
991       *"
992 "enable_$ac_useropt"
993 "*) ;;
994       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
995          ac_unrecognized_sep=', ';;
996     esac
997     eval enable_$ac_useropt=no ;;
998
999   -docdir | --docdir | --docdi | --doc | --do)
1000     ac_prev=docdir ;;
1001   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1002     docdir=$ac_optarg ;;
1003
1004   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1005     ac_prev=dvidir ;;
1006   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1007     dvidir=$ac_optarg ;;
1008
1009   -enable-* | --enable-*)
1010     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1011     # Reject names that are not valid shell variable names.
1012     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1013       as_fn_error "invalid feature name: $ac_useropt"
1014     ac_useropt_orig=$ac_useropt
1015     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1016     case $ac_user_opts in
1017       *"
1018 "enable_$ac_useropt"
1019 "*) ;;
1020       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1021          ac_unrecognized_sep=', ';;
1022     esac
1023     eval enable_$ac_useropt=\$ac_optarg ;;
1024
1025   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1026   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1027   | --exec | --exe | --ex)
1028     ac_prev=exec_prefix ;;
1029   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1030   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1031   | --exec=* | --exe=* | --ex=*)
1032     exec_prefix=$ac_optarg ;;
1033
1034   -gas | --gas | --ga | --g)
1035     # Obsolete; use --with-gas.
1036     with_gas=yes ;;
1037
1038   -help | --help | --hel | --he | -h)
1039     ac_init_help=long ;;
1040   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1041     ac_init_help=recursive ;;
1042   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1043     ac_init_help=short ;;
1044
1045   -host | --host | --hos | --ho)
1046     ac_prev=host_alias ;;
1047   -host=* | --host=* | --hos=* | --ho=*)
1048     host_alias=$ac_optarg ;;
1049
1050   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1051     ac_prev=htmldir ;;
1052   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1053   | --ht=*)
1054     htmldir=$ac_optarg ;;
1055
1056   -includedir | --includedir | --includedi | --included | --include \
1057   | --includ | --inclu | --incl | --inc)
1058     ac_prev=includedir ;;
1059   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1060   | --includ=* | --inclu=* | --incl=* | --inc=*)
1061     includedir=$ac_optarg ;;
1062
1063   -infodir | --infodir | --infodi | --infod | --info | --inf)
1064     ac_prev=infodir ;;
1065   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1066     infodir=$ac_optarg ;;
1067
1068   -libdir | --libdir | --libdi | --libd)
1069     ac_prev=libdir ;;
1070   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1071     libdir=$ac_optarg ;;
1072
1073   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1074   | --libexe | --libex | --libe)
1075     ac_prev=libexecdir ;;
1076   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1077   | --libexe=* | --libex=* | --libe=*)
1078     libexecdir=$ac_optarg ;;
1079
1080   -localedir | --localedir | --localedi | --localed | --locale)
1081     ac_prev=localedir ;;
1082   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1083     localedir=$ac_optarg ;;
1084
1085   -localstatedir | --localstatedir | --localstatedi | --localstated \
1086   | --localstate | --localstat | --localsta | --localst | --locals)
1087     ac_prev=localstatedir ;;
1088   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1089   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1090     localstatedir=$ac_optarg ;;
1091
1092   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1093     ac_prev=mandir ;;
1094   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1095     mandir=$ac_optarg ;;
1096
1097   -nfp | --nfp | --nf)
1098     # Obsolete; use --without-fp.
1099     with_fp=no ;;
1100
1101   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1102   | --no-cr | --no-c | -n)
1103     no_create=yes ;;
1104
1105   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1106   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1107     no_recursion=yes ;;
1108
1109   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1110   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1111   | --oldin | --oldi | --old | --ol | --o)
1112     ac_prev=oldincludedir ;;
1113   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1114   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1115   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1116     oldincludedir=$ac_optarg ;;
1117
1118   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1119     ac_prev=prefix ;;
1120   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1121     prefix=$ac_optarg ;;
1122
1123   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1124   | --program-pre | --program-pr | --program-p)
1125     ac_prev=program_prefix ;;
1126   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1127   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1128     program_prefix=$ac_optarg ;;
1129
1130   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1131   | --program-suf | --program-su | --program-s)
1132     ac_prev=program_suffix ;;
1133   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1134   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1135     program_suffix=$ac_optarg ;;
1136
1137   -program-transform-name | --program-transform-name \
1138   | --program-transform-nam | --program-transform-na \
1139   | --program-transform-n | --program-transform- \
1140   | --program-transform | --program-transfor \
1141   | --program-transfo | --program-transf \
1142   | --program-trans | --program-tran \
1143   | --progr-tra | --program-tr | --program-t)
1144     ac_prev=program_transform_name ;;
1145   -program-transform-name=* | --program-transform-name=* \
1146   | --program-transform-nam=* | --program-transform-na=* \
1147   | --program-transform-n=* | --program-transform-=* \
1148   | --program-transform=* | --program-transfor=* \
1149   | --program-transfo=* | --program-transf=* \
1150   | --program-trans=* | --program-tran=* \
1151   | --progr-tra=* | --program-tr=* | --program-t=*)
1152     program_transform_name=$ac_optarg ;;
1153
1154   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1155     ac_prev=pdfdir ;;
1156   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1157     pdfdir=$ac_optarg ;;
1158
1159   -psdir | --psdir | --psdi | --psd | --ps)
1160     ac_prev=psdir ;;
1161   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1162     psdir=$ac_optarg ;;
1163
1164   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1165   | -silent | --silent | --silen | --sile | --sil)
1166     silent=yes ;;
1167
1168   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1169     ac_prev=sbindir ;;
1170   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1171   | --sbi=* | --sb=*)
1172     sbindir=$ac_optarg ;;
1173
1174   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1175   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1176   | --sharedst | --shareds | --shared | --share | --shar \
1177   | --sha | --sh)
1178     ac_prev=sharedstatedir ;;
1179   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1180   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1181   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1182   | --sha=* | --sh=*)
1183     sharedstatedir=$ac_optarg ;;
1184
1185   -site | --site | --sit)
1186     ac_prev=site ;;
1187   -site=* | --site=* | --sit=*)
1188     site=$ac_optarg ;;
1189
1190   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1191     ac_prev=srcdir ;;
1192   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1193     srcdir=$ac_optarg ;;
1194
1195   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1196   | --syscon | --sysco | --sysc | --sys | --sy)
1197     ac_prev=sysconfdir ;;
1198   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1199   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1200     sysconfdir=$ac_optarg ;;
1201
1202   -target | --target | --targe | --targ | --tar | --ta | --t)
1203     ac_prev=target_alias ;;
1204   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1205     target_alias=$ac_optarg ;;
1206
1207   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1208     verbose=yes ;;
1209
1210   -version | --version | --versio | --versi | --vers | -V)
1211     ac_init_version=: ;;
1212
1213   -with-* | --with-*)
1214     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1215     # Reject names that are not valid shell variable names.
1216     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1217       as_fn_error "invalid package name: $ac_useropt"
1218     ac_useropt_orig=$ac_useropt
1219     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220     case $ac_user_opts in
1221       *"
1222 "with_$ac_useropt"
1223 "*) ;;
1224       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1225          ac_unrecognized_sep=', ';;
1226     esac
1227     eval with_$ac_useropt=\$ac_optarg ;;
1228
1229   -without-* | --without-*)
1230     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1231     # Reject names that are not valid shell variable names.
1232     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1233       as_fn_error "invalid package name: $ac_useropt"
1234     ac_useropt_orig=$ac_useropt
1235     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1236     case $ac_user_opts in
1237       *"
1238 "with_$ac_useropt"
1239 "*) ;;
1240       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1241          ac_unrecognized_sep=', ';;
1242     esac
1243     eval with_$ac_useropt=no ;;
1244
1245   --x)
1246     # Obsolete; use --with-x.
1247     with_x=yes ;;
1248
1249   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1250   | --x-incl | --x-inc | --x-in | --x-i)
1251     ac_prev=x_includes ;;
1252   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1253   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1254     x_includes=$ac_optarg ;;
1255
1256   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1257   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1258     ac_prev=x_libraries ;;
1259   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1260   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1261     x_libraries=$ac_optarg ;;
1262
1263   -*) as_fn_error "unrecognized option: \`$ac_option'
1264 Try \`$0 --help' for more information."
1265     ;;
1266
1267   *=*)
1268     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1269     # Reject names that are not valid shell variable names.
1270     case $ac_envvar in #(
1271       '' | [0-9]* | *[!_$as_cr_alnum]* )
1272       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1273     esac
1274     eval $ac_envvar=\$ac_optarg
1275     export $ac_envvar ;;
1276
1277   *)
1278     # FIXME: should be removed in autoconf 3.0.
1279     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1280     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1281       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1282     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1283     ;;
1284
1285   esac
1286 done
1287
1288 if test -n "$ac_prev"; then
1289   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1290   as_fn_error "missing argument to $ac_option"
1291 fi
1292
1293 if test -n "$ac_unrecognized_opts"; then
1294   case $enable_option_checking in
1295     no) ;;
1296     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1297     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1298   esac
1299 fi
1300
1301 # Check all directory arguments for consistency.
1302 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1303                 datadir sysconfdir sharedstatedir localstatedir includedir \
1304                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1305                 libdir localedir mandir
1306 do
1307   eval ac_val=\$$ac_var
1308   # Remove trailing slashes.
1309   case $ac_val in
1310     */ )
1311       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1312       eval $ac_var=\$ac_val;;
1313   esac
1314   # Be sure to have absolute directory names.
1315   case $ac_val in
1316     [\\/$]* | ?:[\\/]* )  continue;;
1317     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1318   esac
1319   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1320 done
1321
1322 # There might be people who depend on the old broken behavior: `$host'
1323 # used to hold the argument of --host etc.
1324 # FIXME: To remove some day.
1325 build=$build_alias
1326 host=$host_alias
1327 target=$target_alias
1328
1329 # FIXME: To remove some day.
1330 if test "x$host_alias" != x; then
1331   if test "x$build_alias" = x; then
1332     cross_compiling=maybe
1333     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1334     If a cross compiler is detected then cross compile mode will be used." >&2
1335   elif test "x$build_alias" != "x$host_alias"; then
1336     cross_compiling=yes
1337   fi
1338 fi
1339
1340 ac_tool_prefix=
1341 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1342
1343 test "$silent" = yes && exec 6>/dev/null
1344
1345
1346 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1347 ac_ls_di=`ls -di .` &&
1348 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1349   as_fn_error "working directory cannot be determined"
1350 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1351   as_fn_error "pwd does not report name of working directory"
1352
1353
1354 # Find the source files, if location was not specified.
1355 if test -z "$srcdir"; then
1356   ac_srcdir_defaulted=yes
1357   # Try the directory containing this script, then the parent directory.
1358   ac_confdir=`$as_dirname -- "$as_myself" ||
1359 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1360          X"$as_myself" : 'X\(//\)[^/]' \| \
1361          X"$as_myself" : 'X\(//\)$' \| \
1362          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1363 $as_echo X"$as_myself" |
1364     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1365             s//\1/
1366             q
1367           }
1368           /^X\(\/\/\)[^/].*/{
1369             s//\1/
1370             q
1371           }
1372           /^X\(\/\/\)$/{
1373             s//\1/
1374             q
1375           }
1376           /^X\(\/\).*/{
1377             s//\1/
1378             q
1379           }
1380           s/.*/./; q'`
1381   srcdir=$ac_confdir
1382   if test ! -r "$srcdir/$ac_unique_file"; then
1383     srcdir=..
1384   fi
1385 else
1386   ac_srcdir_defaulted=no
1387 fi
1388 if test ! -r "$srcdir/$ac_unique_file"; then
1389   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1390   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1391 fi
1392 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1393 ac_abs_confdir=`(
1394         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1395         pwd)`
1396 # When building in place, set srcdir=.
1397 if test "$ac_abs_confdir" = "$ac_pwd"; then
1398   srcdir=.
1399 fi
1400 # Remove unnecessary trailing slashes from srcdir.
1401 # Double slashes in file names in object file debugging info
1402 # mess up M-x gdb in Emacs.
1403 case $srcdir in
1404 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1405 esac
1406 for ac_var in $ac_precious_vars; do
1407   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1408   eval ac_env_${ac_var}_value=\$${ac_var}
1409   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1410   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1411 done
1412
1413 #
1414 # Report the --help message.
1415 #
1416 if test "$ac_init_help" = "long"; then
1417   # Omit some internal or obsolete options to make the list less imposing.
1418   # This message is too long to be a string in the A/UX 3.1 sh.
1419   cat <<_ACEOF
1420 \`configure' configures this package to adapt to many kinds of systems.
1421
1422 Usage: $0 [OPTION]... [VAR=VALUE]...
1423
1424 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1425 VAR=VALUE.  See below for descriptions of some of the useful variables.
1426
1427 Defaults for the options are specified in brackets.
1428
1429 Configuration:
1430   -h, --help              display this help and exit
1431       --help=short        display options specific to this package
1432       --help=recursive    display the short help of all the included packages
1433   -V, --version           display version information and exit
1434   -q, --quiet, --silent   do not print \`checking...' messages
1435       --cache-file=FILE   cache test results in FILE [disabled]
1436   -C, --config-cache      alias for \`--cache-file=config.cache'
1437   -n, --no-create         do not create output files
1438       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1439
1440 Installation directories:
1441   --prefix=PREFIX         install architecture-independent files in PREFIX
1442                           [$ac_default_prefix]
1443   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1444                           [PREFIX]
1445
1446 By default, \`make install' will install all the files in
1447 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1448 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1449 for instance \`--prefix=\$HOME'.
1450
1451 For better control, use the options below.
1452
1453 Fine tuning of the installation directories:
1454   --bindir=DIR            user executables [EPREFIX/bin]
1455   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1456   --libexecdir=DIR        program executables [EPREFIX/libexec]
1457   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1458   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1459   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1460   --libdir=DIR            object code libraries [EPREFIX/lib]
1461   --includedir=DIR        C header files [PREFIX/include]
1462   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1463   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1464   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1465   --infodir=DIR           info documentation [DATAROOTDIR/info]
1466   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1467   --mandir=DIR            man documentation [DATAROOTDIR/man]
1468   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1469   --htmldir=DIR           html documentation [DOCDIR]
1470   --dvidir=DIR            dvi documentation [DOCDIR]
1471   --pdfdir=DIR            pdf documentation [DOCDIR]
1472   --psdir=DIR             ps documentation [DOCDIR]
1473 _ACEOF
1474
1475   cat <<\_ACEOF
1476
1477 Program names:
1478   --program-prefix=PREFIX            prepend PREFIX to installed program names
1479   --program-suffix=SUFFIX            append SUFFIX to installed program names
1480   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1481
1482 X features:
1483   --x-includes=DIR    X include files are in DIR
1484   --x-libraries=DIR   X library files are in DIR
1485
1486 System types:
1487   --build=BUILD     configure for building on BUILD [guessed]
1488   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1489   --target=TARGET   configure for building compilers for TARGET [HOST]
1490 _ACEOF
1491 fi
1492
1493 if test -n "$ac_init_help"; then
1494
1495   cat <<\_ACEOF
1496
1497 Optional Features:
1498   --disable-option-checking  ignore unrecognized --enable/--with options
1499   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1500   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1501   --enable-maintainer-mode  enable make rules and dependencies not useful
1502                           (and sometimes confusing) to the casual installer
1503   --enable-plugins        Enable support for plugins
1504   --disable-largefile     omit support for large files
1505   --enable-targets=TARGETS
1506                           alternative target configurations
1507   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
1508   --disable-gdbcli        disable command-line interface (CLI)
1509   --disable-gdbmi         disable machine-interface (MI)
1510   --enable-tui            enable full-screen terminal user interface (TUI)
1511   --enable-gdbtk          enable gdbtk graphical user interface (GUI)
1512   --enable-profiling      enable profiling of GDB
1513   --disable-rpath         do not hardcode runtime library paths
1514   --enable-libmcheck      Try linking with -lmcheck if available
1515   --enable-werror         treat compile warnings as errors
1516   --enable-build-warnings enable build-time compiler warnings if gcc is used
1517   --enable-gdb-build-warnings
1518                           enable GDB specific build-time compiler warnings if
1519                           gcc is used
1520   --enable-sim            link gdb with simulator
1521   --enable-multi-ice      build the multi-ice-gdb-server
1522   --enable-gdbserver      automatically build gdbserver (yes/no/auto, default
1523                           is auto)
1524
1525 Optional Packages:
1526   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1527   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1528   --with-separate-debug-dir=PATH
1529                           look for global separate debug info in this path
1530                           [LIBDIR/debug]
1531   --with-gdb-datadir=PATH look for global separate data files in this path
1532                           [DATADIR/gdb]
1533   --with-relocated-sources=PATH
1534                           automatically relocate this path for source files
1535   --with-auto-load-dir=PATH
1536                           directories from which to load auto-loaded scripts
1537                           [$debugdir:$datadir/auto-load]
1538   --with-auto-load-safe-path=PATH
1539                           directories safe to hold auto-loaded files
1540                           [--with-auto-load-dir]
1541   --without-auto-load-safe-path
1542                           do not restrict auto-loaded files locations
1543   --with-libunwind-ia64   use libunwind frame unwinding for ia64 targets
1544   --with-curses           use the curses library instead of the termcap
1545                           library
1546   --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
1547   --with-bugurl=URL       Direct users to URL to report a bug
1548   --with-system-zlib      use installed libz
1549   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1550   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
1551   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
1552   --with-iconv-bin=PATH   specify where to find the iconv program
1553   --with-system-readline  use installed readline library
1554   --with-jit-reader-dir=PATH
1555                           directory to load the JIT readers from
1556   --with-expat            include expat support (auto/yes/no)
1557   --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
1558   --without-libexpat-prefix     don't search for libexpat in includedir and libdir
1559   --with-python[=PYTHON]  include python support
1560                           (auto/yes/no/<python-program>)
1561   --with-guile[=GUILE]    include guile support
1562                           (auto/yes/no/<guile-version>/<pkg-config-program>)
1563   --with-intel-pt         include Intel Processor Trace support (auto/yes/no)
1564   --with-libipt-prefix[=DIR]  search for libipt in DIR/include and DIR/lib
1565   --without-libipt-prefix     don't search for libipt in includedir and libdir
1566   --without-included-regex
1567                           don't use included regex; this is the default on
1568                           systems with version 2 of the GNU C library (use
1569                           with caution on other system)
1570   --with-sysroot[=DIR]    search for usr/lib et al within DIR
1571   --with-system-gdbinit=PATH
1572                           automatically load a system-wide gdbinit file
1573   --with-lzma             support lzma compression (auto/yes/no)
1574   --with-liblzma-prefix[=DIR]  search for liblzma in DIR/include and DIR/lib
1575   --without-liblzma-prefix     don't search for liblzma in includedir and libdir
1576   --with-tcl              directory containing tcl configuration (tclConfig.sh)
1577   --with-tk               directory containing tk configuration (tkConfig.sh)
1578   --with-x                use the X Window System
1579   --with-babeltrace       include babeltrace support (auto/yes/no)
1580   --with-libbabeltrace-prefix[=DIR]  search for libbabeltrace in DIR/include and DIR/lib
1581   --without-libbabeltrace-prefix     don't search for libbabeltrace in includedir and libdir
1582
1583 Some influential environment variables:
1584   CC          C compiler command
1585   CFLAGS      C compiler flags
1586   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1587               nonstandard directory <lib dir>
1588   LIBS        libraries to pass to the linker, e.g. -l<library>
1589   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1590               you have headers in a nonstandard directory <include dir>
1591   CXX         C++ compiler command
1592   CXXFLAGS    C++ compiler flags
1593   CPP         C preprocessor
1594   MAKEINFO    Parent configure detects if it is of sufficient version.
1595   MAKEINFOFLAGS
1596               Parameters for MAKEINFO.
1597   YACC        The `Yet Another C Compiler' implementation to use. Defaults to
1598               the first program found out of: `bison -y', `byacc', `yacc'.
1599   YFLAGS      The list of arguments that will be passed by default to $YACC.
1600               This script will default YFLAGS to the empty string to avoid a
1601               default value of `-d' given by some make applications.
1602   XMKMF       Path to xmkmf, Makefile generator for X Window System
1603
1604 Use these variables to override the choices made by `configure' or to help
1605 it to find libraries and programs with nonstandard names/locations.
1606
1607 Report bugs to the package provider.
1608 _ACEOF
1609 ac_status=$?
1610 fi
1611
1612 if test "$ac_init_help" = "recursive"; then
1613   # If there are subdirs, report their specific --help.
1614   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1615     test -d "$ac_dir" ||
1616       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1617       continue
1618     ac_builddir=.
1619
1620 case "$ac_dir" in
1621 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1622 *)
1623   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1624   # A ".." for each directory in $ac_dir_suffix.
1625   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1626   case $ac_top_builddir_sub in
1627   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1628   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1629   esac ;;
1630 esac
1631 ac_abs_top_builddir=$ac_pwd
1632 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1633 # for backward compatibility:
1634 ac_top_builddir=$ac_top_build_prefix
1635
1636 case $srcdir in
1637   .)  # We are building in place.
1638     ac_srcdir=.
1639     ac_top_srcdir=$ac_top_builddir_sub
1640     ac_abs_top_srcdir=$ac_pwd ;;
1641   [\\/]* | ?:[\\/]* )  # Absolute name.
1642     ac_srcdir=$srcdir$ac_dir_suffix;
1643     ac_top_srcdir=$srcdir
1644     ac_abs_top_srcdir=$srcdir ;;
1645   *) # Relative name.
1646     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1647     ac_top_srcdir=$ac_top_build_prefix$srcdir
1648     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1649 esac
1650 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1651
1652     cd "$ac_dir" || { ac_status=$?; continue; }
1653     # Check for guested configure.
1654     if test -f "$ac_srcdir/configure.gnu"; then
1655       echo &&
1656       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1657     elif test -f "$ac_srcdir/configure"; then
1658       echo &&
1659       $SHELL "$ac_srcdir/configure" --help=recursive
1660     else
1661       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1662     fi || ac_status=$?
1663     cd "$ac_pwd" || { ac_status=$?; break; }
1664   done
1665 fi
1666
1667 test -n "$ac_init_help" && exit $ac_status
1668 if $ac_init_version; then
1669   cat <<\_ACEOF
1670 configure
1671 generated by GNU Autoconf 2.64
1672
1673 Copyright (C) 2009 Free Software Foundation, Inc.
1674 This configure script is free software; the Free Software Foundation
1675 gives unlimited permission to copy, distribute and modify it.
1676 _ACEOF
1677   exit
1678 fi
1679
1680 ## ------------------------ ##
1681 ## Autoconf initialization. ##
1682 ## ------------------------ ##
1683
1684 # ac_fn_c_try_compile LINENO
1685 # --------------------------
1686 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1687 ac_fn_c_try_compile ()
1688 {
1689   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690   rm -f conftest.$ac_objext
1691   if { { ac_try="$ac_compile"
1692 case "(($ac_try" in
1693   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694   *) ac_try_echo=$ac_try;;
1695 esac
1696 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697 $as_echo "$ac_try_echo"; } >&5
1698   (eval "$ac_compile") 2>conftest.err
1699   ac_status=$?
1700   if test -s conftest.err; then
1701     grep -v '^ *+' conftest.err >conftest.er1
1702     cat conftest.er1 >&5
1703     mv -f conftest.er1 conftest.err
1704   fi
1705   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706   test $ac_status = 0; } && {
1707          test -z "$ac_c_werror_flag" ||
1708          test ! -s conftest.err
1709        } && test -s conftest.$ac_objext; then :
1710   ac_retval=0
1711 else
1712   $as_echo "$as_me: failed program was:" >&5
1713 sed 's/^/| /' conftest.$ac_ext >&5
1714
1715         ac_retval=1
1716 fi
1717   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1718   return $ac_retval
1719
1720 } # ac_fn_c_try_compile
1721
1722 # ac_fn_cxx_try_compile LINENO
1723 # ----------------------------
1724 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1725 ac_fn_cxx_try_compile ()
1726 {
1727   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728   rm -f conftest.$ac_objext
1729   if { { ac_try="$ac_compile"
1730 case "(($ac_try" in
1731   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732   *) ac_try_echo=$ac_try;;
1733 esac
1734 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735 $as_echo "$ac_try_echo"; } >&5
1736   (eval "$ac_compile") 2>conftest.err
1737   ac_status=$?
1738   if test -s conftest.err; then
1739     grep -v '^ *+' conftest.err >conftest.er1
1740     cat conftest.er1 >&5
1741     mv -f conftest.er1 conftest.err
1742   fi
1743   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744   test $ac_status = 0; } && {
1745          test -z "$ac_cxx_werror_flag" ||
1746          test ! -s conftest.err
1747        } && test -s conftest.$ac_objext; then :
1748   ac_retval=0
1749 else
1750   $as_echo "$as_me: failed program was:" >&5
1751 sed 's/^/| /' conftest.$ac_ext >&5
1752
1753         ac_retval=1
1754 fi
1755   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1756   return $ac_retval
1757
1758 } # ac_fn_cxx_try_compile
1759
1760 # ac_fn_c_try_cpp LINENO
1761 # ----------------------
1762 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1763 ac_fn_c_try_cpp ()
1764 {
1765   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766   if { { ac_try="$ac_cpp conftest.$ac_ext"
1767 case "(($ac_try" in
1768   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1769   *) ac_try_echo=$ac_try;;
1770 esac
1771 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1772 $as_echo "$ac_try_echo"; } >&5
1773   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1774   ac_status=$?
1775   if test -s conftest.err; then
1776     grep -v '^ *+' conftest.err >conftest.er1
1777     cat conftest.er1 >&5
1778     mv -f conftest.er1 conftest.err
1779   fi
1780   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1781   test $ac_status = 0; } >/dev/null && {
1782          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1783          test ! -s conftest.err
1784        }; then :
1785   ac_retval=0
1786 else
1787   $as_echo "$as_me: failed program was:" >&5
1788 sed 's/^/| /' conftest.$ac_ext >&5
1789
1790     ac_retval=1
1791 fi
1792   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1793   return $ac_retval
1794
1795 } # ac_fn_c_try_cpp
1796
1797 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1798 # -------------------------------------------------------
1799 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1800 # the include files in INCLUDES and setting the cache variable VAR
1801 # accordingly.
1802 ac_fn_c_check_header_mongrel ()
1803 {
1804   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1806   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1807 $as_echo_n "checking for $2... " >&6; }
1808 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1809   $as_echo_n "(cached) " >&6
1810 fi
1811 eval ac_res=\$$3
1812                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1813 $as_echo "$ac_res" >&6; }
1814 else
1815   # Is the header compilable?
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1817 $as_echo_n "checking $2 usability... " >&6; }
1818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819 /* end confdefs.h.  */
1820 $4
1821 #include <$2>
1822 _ACEOF
1823 if ac_fn_c_try_compile "$LINENO"; then :
1824   ac_header_compiler=yes
1825 else
1826   ac_header_compiler=no
1827 fi
1828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1830 $as_echo "$ac_header_compiler" >&6; }
1831
1832 # Is the header present?
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1834 $as_echo_n "checking $2 presence... " >&6; }
1835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836 /* end confdefs.h.  */
1837 #include <$2>
1838 _ACEOF
1839 if ac_fn_c_try_cpp "$LINENO"; then :
1840   ac_header_preproc=yes
1841 else
1842   ac_header_preproc=no
1843 fi
1844 rm -f conftest.err conftest.$ac_ext
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1846 $as_echo "$ac_header_preproc" >&6; }
1847
1848 # So?  What about this header?
1849 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1850   yes:no: )
1851     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1852 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1853     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1854 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1855     ;;
1856   no:yes:* )
1857     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1858 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1859     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1860 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1861     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1862 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1863     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1864 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1865     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1866 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1867     ;;
1868 esac
1869   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1870 $as_echo_n "checking for $2... " >&6; }
1871 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1872   $as_echo_n "(cached) " >&6
1873 else
1874   eval "$3=\$ac_header_compiler"
1875 fi
1876 eval ac_res=\$$3
1877                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878 $as_echo "$ac_res" >&6; }
1879 fi
1880   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1881
1882 } # ac_fn_c_check_header_mongrel
1883
1884 # ac_fn_c_try_run LINENO
1885 # ----------------------
1886 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1887 # that executables *can* be run.
1888 ac_fn_c_try_run ()
1889 {
1890   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1891   if { { ac_try="$ac_link"
1892 case "(($ac_try" in
1893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1894   *) ac_try_echo=$ac_try;;
1895 esac
1896 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1897 $as_echo "$ac_try_echo"; } >&5
1898   (eval "$ac_link") 2>&5
1899   ac_status=$?
1900   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1901   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1902   { { case "(($ac_try" in
1903   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1904   *) ac_try_echo=$ac_try;;
1905 esac
1906 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1907 $as_echo "$ac_try_echo"; } >&5
1908   (eval "$ac_try") 2>&5
1909   ac_status=$?
1910   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1911   test $ac_status = 0; }; }; then :
1912   ac_retval=0
1913 else
1914   $as_echo "$as_me: program exited with status $ac_status" >&5
1915        $as_echo "$as_me: failed program was:" >&5
1916 sed 's/^/| /' conftest.$ac_ext >&5
1917
1918        ac_retval=$ac_status
1919 fi
1920   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1921   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1922   return $ac_retval
1923
1924 } # ac_fn_c_try_run
1925
1926 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1927 # -------------------------------------------------------
1928 # Tests whether HEADER exists and can be compiled using the include files in
1929 # INCLUDES, setting the cache variable VAR accordingly.
1930 ac_fn_c_check_header_compile ()
1931 {
1932   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934 $as_echo_n "checking for $2... " >&6; }
1935 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1936   $as_echo_n "(cached) " >&6
1937 else
1938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939 /* end confdefs.h.  */
1940 $4
1941 #include <$2>
1942 _ACEOF
1943 if ac_fn_c_try_compile "$LINENO"; then :
1944   eval "$3=yes"
1945 else
1946   eval "$3=no"
1947 fi
1948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1949 fi
1950 eval ac_res=\$$3
1951                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1952 $as_echo "$ac_res" >&6; }
1953   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1954
1955 } # ac_fn_c_check_header_compile
1956
1957 # ac_fn_c_try_link LINENO
1958 # -----------------------
1959 # Try to link conftest.$ac_ext, and return whether this succeeded.
1960 ac_fn_c_try_link ()
1961 {
1962   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963   rm -f conftest.$ac_objext conftest$ac_exeext
1964   if { { ac_try="$ac_link"
1965 case "(($ac_try" in
1966   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967   *) ac_try_echo=$ac_try;;
1968 esac
1969 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970 $as_echo "$ac_try_echo"; } >&5
1971   (eval "$ac_link") 2>conftest.err
1972   ac_status=$?
1973   if test -s conftest.err; then
1974     grep -v '^ *+' conftest.err >conftest.er1
1975     cat conftest.er1 >&5
1976     mv -f conftest.er1 conftest.err
1977   fi
1978   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979   test $ac_status = 0; } && {
1980          test -z "$ac_c_werror_flag" ||
1981          test ! -s conftest.err
1982        } && test -s conftest$ac_exeext && {
1983          test "$cross_compiling" = yes ||
1984          $as_test_x conftest$ac_exeext
1985        }; then :
1986   ac_retval=0
1987 else
1988   $as_echo "$as_me: failed program was:" >&5
1989 sed 's/^/| /' conftest.$ac_ext >&5
1990
1991         ac_retval=1
1992 fi
1993   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1994   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1995   # interfere with the next link command; also delete a directory that is
1996   # left behind by Apple's compiler.  We do this before executing the actions.
1997   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1998   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1999   return $ac_retval
2000
2001 } # ac_fn_c_try_link
2002
2003 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2004 # --------------------------------------------
2005 # Tries to find the compile-time value of EXPR in a program that includes
2006 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2007 # computed
2008 ac_fn_c_compute_int ()
2009 {
2010   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011   if test "$cross_compiling" = yes; then
2012     # Depending upon the size, compute the lo and hi bounds.
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014 /* end confdefs.h.  */
2015 $4
2016 int
2017 main ()
2018 {
2019 static int test_array [1 - 2 * !(($2) >= 0)];
2020 test_array [0] = 0
2021
2022   ;
2023   return 0;
2024 }
2025 _ACEOF
2026 if ac_fn_c_try_compile "$LINENO"; then :
2027   ac_lo=0 ac_mid=0
2028   while :; do
2029     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030 /* end confdefs.h.  */
2031 $4
2032 int
2033 main ()
2034 {
2035 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2036 test_array [0] = 0
2037
2038   ;
2039   return 0;
2040 }
2041 _ACEOF
2042 if ac_fn_c_try_compile "$LINENO"; then :
2043   ac_hi=$ac_mid; break
2044 else
2045   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2046                         if test $ac_lo -le $ac_mid; then
2047                           ac_lo= ac_hi=
2048                           break
2049                         fi
2050                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2051 fi
2052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053   done
2054 else
2055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056 /* end confdefs.h.  */
2057 $4
2058 int
2059 main ()
2060 {
2061 static int test_array [1 - 2 * !(($2) < 0)];
2062 test_array [0] = 0
2063
2064   ;
2065   return 0;
2066 }
2067 _ACEOF
2068 if ac_fn_c_try_compile "$LINENO"; then :
2069   ac_hi=-1 ac_mid=-1
2070   while :; do
2071     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072 /* end confdefs.h.  */
2073 $4
2074 int
2075 main ()
2076 {
2077 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2078 test_array [0] = 0
2079
2080   ;
2081   return 0;
2082 }
2083 _ACEOF
2084 if ac_fn_c_try_compile "$LINENO"; then :
2085   ac_lo=$ac_mid; break
2086 else
2087   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2088                         if test $ac_mid -le $ac_hi; then
2089                           ac_lo= ac_hi=
2090                           break
2091                         fi
2092                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2093 fi
2094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095   done
2096 else
2097   ac_lo= ac_hi=
2098 fi
2099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100 fi
2101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102 # Binary search between lo and hi bounds.
2103 while test "x$ac_lo" != "x$ac_hi"; do
2104   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106 /* end confdefs.h.  */
2107 $4
2108 int
2109 main ()
2110 {
2111 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2112 test_array [0] = 0
2113
2114   ;
2115   return 0;
2116 }
2117 _ACEOF
2118 if ac_fn_c_try_compile "$LINENO"; then :
2119   ac_hi=$ac_mid
2120 else
2121   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2122 fi
2123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124 done
2125 case $ac_lo in #((
2126 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2127 '') ac_retval=1 ;;
2128 esac
2129   else
2130     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131 /* end confdefs.h.  */
2132 $4
2133 static long int longval () { return $2; }
2134 static unsigned long int ulongval () { return $2; }
2135 #include <stdio.h>
2136 #include <stdlib.h>
2137 int
2138 main ()
2139 {
2140
2141   FILE *f = fopen ("conftest.val", "w");
2142   if (! f)
2143     return 1;
2144   if (($2) < 0)
2145     {
2146       long int i = longval ();
2147       if (i != ($2))
2148         return 1;
2149       fprintf (f, "%ld", i);
2150     }
2151   else
2152     {
2153       unsigned long int i = ulongval ();
2154       if (i != ($2))
2155         return 1;
2156       fprintf (f, "%lu", i);
2157     }
2158   /* Do not output a trailing newline, as this causes \r\n confusion
2159      on some platforms.  */
2160   return ferror (f) || fclose (f) != 0;
2161
2162   ;
2163   return 0;
2164 }
2165 _ACEOF
2166 if ac_fn_c_try_run "$LINENO"; then :
2167   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2168 else
2169   ac_retval=1
2170 fi
2171 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2172   conftest.$ac_objext conftest.beam conftest.$ac_ext
2173 rm -f conftest.val
2174
2175   fi
2176   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2177   return $ac_retval
2178
2179 } # ac_fn_c_compute_int
2180
2181 # ac_fn_c_check_func LINENO FUNC VAR
2182 # ----------------------------------
2183 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2184 ac_fn_c_check_func ()
2185 {
2186   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2188 $as_echo_n "checking for $2... " >&6; }
2189 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2190   $as_echo_n "(cached) " >&6
2191 else
2192   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193 /* end confdefs.h.  */
2194 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2195    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2196 #define $2 innocuous_$2
2197
2198 /* System header to define __stub macros and hopefully few prototypes,
2199     which can conflict with char $2 (); below.
2200     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2201     <limits.h> exists even on freestanding compilers.  */
2202
2203 #ifdef __STDC__
2204 # include <limits.h>
2205 #else
2206 # include <assert.h>
2207 #endif
2208
2209 #undef $2
2210
2211 /* Override any GCC internal prototype to avoid an error.
2212    Use char because int might match the return type of a GCC
2213    builtin and then its argument prototype would still apply.  */
2214 #ifdef __cplusplus
2215 extern "C"
2216 #endif
2217 char $2 ();
2218 /* The GNU C library defines this for functions which it implements
2219     to always fail with ENOSYS.  Some functions are actually named
2220     something starting with __ and the normal name is an alias.  */
2221 #if defined __stub_$2 || defined __stub___$2
2222 choke me
2223 #endif
2224
2225 int
2226 main ()
2227 {
2228 return $2 ();
2229   ;
2230   return 0;
2231 }
2232 _ACEOF
2233 if ac_fn_c_try_link "$LINENO"; then :
2234   eval "$3=yes"
2235 else
2236   eval "$3=no"
2237 fi
2238 rm -f core conftest.err conftest.$ac_objext \
2239     conftest$ac_exeext conftest.$ac_ext
2240 fi
2241 eval ac_res=\$$3
2242                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243 $as_echo "$ac_res" >&6; }
2244   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2245
2246 } # ac_fn_c_check_func
2247
2248 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2249 # -------------------------------------------
2250 # Tests whether TYPE exists after having included INCLUDES, setting cache
2251 # variable VAR accordingly.
2252 ac_fn_c_check_type ()
2253 {
2254   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2256 $as_echo_n "checking for $2... " >&6; }
2257 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2258   $as_echo_n "(cached) " >&6
2259 else
2260   eval "$3=no"
2261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262 /* end confdefs.h.  */
2263 $4
2264 int
2265 main ()
2266 {
2267 if (sizeof ($2))
2268          return 0;
2269   ;
2270   return 0;
2271 }
2272 _ACEOF
2273 if ac_fn_c_try_compile "$LINENO"; then :
2274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275 /* end confdefs.h.  */
2276 $4
2277 int
2278 main ()
2279 {
2280 if (sizeof (($2)))
2281             return 0;
2282   ;
2283   return 0;
2284 }
2285 _ACEOF
2286 if ac_fn_c_try_compile "$LINENO"; then :
2287
2288 else
2289   eval "$3=yes"
2290 fi
2291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292 fi
2293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294 fi
2295 eval ac_res=\$$3
2296                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297 $as_echo "$ac_res" >&6; }
2298   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2299
2300 } # ac_fn_c_check_type
2301
2302 # ac_fn_c_check_decl LINENO SYMBOL VAR
2303 # ------------------------------------
2304 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2305 ac_fn_c_check_decl ()
2306 {
2307   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2308   as_decl_name=`echo $2|sed 's/ *(.*//'`
2309   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2310   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2311 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2312 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2313   $as_echo_n "(cached) " >&6
2314 else
2315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h.  */
2317 $4
2318 int
2319 main ()
2320 {
2321 #ifndef $as_decl_name
2322 #ifdef __cplusplus
2323   (void) $as_decl_use;
2324 #else
2325   (void) $as_decl_name;
2326 #endif
2327 #endif
2328
2329   ;
2330   return 0;
2331 }
2332 _ACEOF
2333 if ac_fn_c_try_compile "$LINENO"; then :
2334   eval "$3=yes"
2335 else
2336   eval "$3=no"
2337 fi
2338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339 fi
2340 eval ac_res=\$$3
2341                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2342 $as_echo "$ac_res" >&6; }
2343   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2344
2345 } # ac_fn_c_check_decl
2346
2347 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2348 # ----------------------------------------------------
2349 # Tries to find if the field MEMBER exists in type AGGR, after including
2350 # INCLUDES, setting cache variable VAR accordingly.
2351 ac_fn_c_check_member ()
2352 {
2353   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2355 $as_echo_n "checking for $2.$3... " >&6; }
2356 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2357   $as_echo_n "(cached) " >&6
2358 else
2359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360 /* end confdefs.h.  */
2361 $5
2362 int
2363 main ()
2364 {
2365 static $2 ac_aggr;
2366 if (ac_aggr.$3)
2367 return 0;
2368   ;
2369   return 0;
2370 }
2371 _ACEOF
2372 if ac_fn_c_try_compile "$LINENO"; then :
2373   eval "$4=yes"
2374 else
2375   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376 /* end confdefs.h.  */
2377 $5
2378 int
2379 main ()
2380 {
2381 static $2 ac_aggr;
2382 if (sizeof ac_aggr.$3)
2383 return 0;
2384   ;
2385   return 0;
2386 }
2387 _ACEOF
2388 if ac_fn_c_try_compile "$LINENO"; then :
2389   eval "$4=yes"
2390 else
2391   eval "$4=no"
2392 fi
2393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394 fi
2395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396 fi
2397 eval ac_res=\$$4
2398                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2399 $as_echo "$ac_res" >&6; }
2400   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2401
2402 } # ac_fn_c_check_member
2403 cat >config.log <<_ACEOF
2404 This file contains any messages produced by compilers while
2405 running configure, to aid debugging if configure makes a mistake.
2406
2407 It was created by $as_me, which was
2408 generated by GNU Autoconf 2.64.  Invocation command line was
2409
2410   $ $0 $@
2411
2412 _ACEOF
2413 exec 5>>config.log
2414 {
2415 cat <<_ASUNAME
2416 ## --------- ##
2417 ## Platform. ##
2418 ## --------- ##
2419
2420 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2421 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2422 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2423 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2424 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2425
2426 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2427 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2428
2429 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2430 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2431 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2432 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2433 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2434 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2435 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2436
2437 _ASUNAME
2438
2439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2440 for as_dir in $PATH
2441 do
2442   IFS=$as_save_IFS
2443   test -z "$as_dir" && as_dir=.
2444     $as_echo "PATH: $as_dir"
2445   done
2446 IFS=$as_save_IFS
2447
2448 } >&5
2449
2450 cat >&5 <<_ACEOF
2451
2452
2453 ## ----------- ##
2454 ## Core tests. ##
2455 ## ----------- ##
2456
2457 _ACEOF
2458
2459
2460 # Keep a trace of the command line.
2461 # Strip out --no-create and --no-recursion so they do not pile up.
2462 # Strip out --silent because we don't want to record it for future runs.
2463 # Also quote any args containing shell meta-characters.
2464 # Make two passes to allow for proper duplicate-argument suppression.
2465 ac_configure_args=
2466 ac_configure_args0=
2467 ac_configure_args1=
2468 ac_must_keep_next=false
2469 for ac_pass in 1 2
2470 do
2471   for ac_arg
2472   do
2473     case $ac_arg in
2474     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2475     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2476     | -silent | --silent | --silen | --sile | --sil)
2477       continue ;;
2478     *\'*)
2479       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2480     esac
2481     case $ac_pass in
2482     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2483     2)
2484       as_fn_append ac_configure_args1 " '$ac_arg'"
2485       if test $ac_must_keep_next = true; then
2486         ac_must_keep_next=false # Got value, back to normal.
2487       else
2488         case $ac_arg in
2489           *=* | --config-cache | -C | -disable-* | --disable-* \
2490           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2491           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2492           | -with-* | --with-* | -without-* | --without-* | --x)
2493             case "$ac_configure_args0 " in
2494               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2495             esac
2496             ;;
2497           -* ) ac_must_keep_next=true ;;
2498         esac
2499       fi
2500       as_fn_append ac_configure_args " '$ac_arg'"
2501       ;;
2502     esac
2503   done
2504 done
2505 { ac_configure_args0=; unset ac_configure_args0;}
2506 { ac_configure_args1=; unset ac_configure_args1;}
2507
2508 # When interrupted or exit'd, cleanup temporary files, and complete
2509 # config.log.  We remove comments because anyway the quotes in there
2510 # would cause problems or look ugly.
2511 # WARNING: Use '\'' to represent an apostrophe within the trap.
2512 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2513 trap 'exit_status=$?
2514   # Save into config.log some information that might help in debugging.
2515   {
2516     echo
2517
2518     cat <<\_ASBOX
2519 ## ---------------- ##
2520 ## Cache variables. ##
2521 ## ---------------- ##
2522 _ASBOX
2523     echo
2524     # The following way of writing the cache mishandles newlines in values,
2525 (
2526   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2527     eval ac_val=\$$ac_var
2528     case $ac_val in #(
2529     *${as_nl}*)
2530       case $ac_var in #(
2531       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2532 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2533       esac
2534       case $ac_var in #(
2535       _ | IFS | as_nl) ;; #(
2536       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2537       *) { eval $ac_var=; unset $ac_var;} ;;
2538       esac ;;
2539     esac
2540   done
2541   (set) 2>&1 |
2542     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2543     *${as_nl}ac_space=\ *)
2544       sed -n \
2545         "s/'\''/'\''\\\\'\'''\''/g;
2546           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2547       ;; #(
2548     *)
2549       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2550       ;;
2551     esac |
2552     sort
2553 )
2554     echo
2555
2556     cat <<\_ASBOX
2557 ## ----------------- ##
2558 ## Output variables. ##
2559 ## ----------------- ##
2560 _ASBOX
2561     echo
2562     for ac_var in $ac_subst_vars
2563     do
2564       eval ac_val=\$$ac_var
2565       case $ac_val in
2566       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2567       esac
2568       $as_echo "$ac_var='\''$ac_val'\''"
2569     done | sort
2570     echo
2571
2572     if test -n "$ac_subst_files"; then
2573       cat <<\_ASBOX
2574 ## ------------------- ##
2575 ## File substitutions. ##
2576 ## ------------------- ##
2577 _ASBOX
2578       echo
2579       for ac_var in $ac_subst_files
2580       do
2581         eval ac_val=\$$ac_var
2582         case $ac_val in
2583         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2584         esac
2585         $as_echo "$ac_var='\''$ac_val'\''"
2586       done | sort
2587       echo
2588     fi
2589
2590     if test -s confdefs.h; then
2591       cat <<\_ASBOX
2592 ## ----------- ##
2593 ## confdefs.h. ##
2594 ## ----------- ##
2595 _ASBOX
2596       echo
2597       cat confdefs.h
2598       echo
2599     fi
2600     test "$ac_signal" != 0 &&
2601       $as_echo "$as_me: caught signal $ac_signal"
2602     $as_echo "$as_me: exit $exit_status"
2603   } >&5
2604   rm -f core *.core core.conftest.* &&
2605     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2606     exit $exit_status
2607 ' 0
2608 for ac_signal in 1 2 13 15; do
2609   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2610 done
2611 ac_signal=0
2612
2613 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2614 rm -f -r conftest* confdefs.h
2615
2616 $as_echo "/* confdefs.h */" > confdefs.h
2617
2618 # Predefined preprocessor variables.
2619
2620 cat >>confdefs.h <<_ACEOF
2621 #define PACKAGE_NAME "$PACKAGE_NAME"
2622 _ACEOF
2623
2624 cat >>confdefs.h <<_ACEOF
2625 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2626 _ACEOF
2627
2628 cat >>confdefs.h <<_ACEOF
2629 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2630 _ACEOF
2631
2632 cat >>confdefs.h <<_ACEOF
2633 #define PACKAGE_STRING "$PACKAGE_STRING"
2634 _ACEOF
2635
2636 cat >>confdefs.h <<_ACEOF
2637 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2638 _ACEOF
2639
2640 cat >>confdefs.h <<_ACEOF
2641 #define PACKAGE_URL "$PACKAGE_URL"
2642 _ACEOF
2643
2644
2645 # Let the site file select an alternate cache file if it wants to.
2646 # Prefer an explicitly selected file to automatically selected ones.
2647 ac_site_file1=NONE
2648 ac_site_file2=NONE
2649 if test -n "$CONFIG_SITE"; then
2650   ac_site_file1=$CONFIG_SITE
2651 elif test "x$prefix" != xNONE; then
2652   ac_site_file1=$prefix/share/config.site
2653   ac_site_file2=$prefix/etc/config.site
2654 else
2655   ac_site_file1=$ac_default_prefix/share/config.site
2656   ac_site_file2=$ac_default_prefix/etc/config.site
2657 fi
2658 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2659 do
2660   test "x$ac_site_file" = xNONE && continue
2661   if test -r "$ac_site_file"; then
2662     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2663 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2664     sed 's/^/| /' "$ac_site_file" >&5
2665     . "$ac_site_file"
2666   fi
2667 done
2668
2669 if test -r "$cache_file"; then
2670   # Some versions of bash will fail to source /dev/null (special
2671   # files actually), so we avoid doing that.
2672   if test -f "$cache_file"; then
2673     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2674 $as_echo "$as_me: loading cache $cache_file" >&6;}
2675     case $cache_file in
2676       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2677       *)                      . "./$cache_file";;
2678     esac
2679   fi
2680 else
2681   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2682 $as_echo "$as_me: creating cache $cache_file" >&6;}
2683   >$cache_file
2684 fi
2685
2686 # Check that the precious variables saved in the cache have kept the same
2687 # value.
2688 ac_cache_corrupted=false
2689 for ac_var in $ac_precious_vars; do
2690   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2691   eval ac_new_set=\$ac_env_${ac_var}_set
2692   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2693   eval ac_new_val=\$ac_env_${ac_var}_value
2694   case $ac_old_set,$ac_new_set in
2695     set,)
2696       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2697 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2698       ac_cache_corrupted=: ;;
2699     ,set)
2700       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2701 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2702       ac_cache_corrupted=: ;;
2703     ,);;
2704     *)
2705       if test "x$ac_old_val" != "x$ac_new_val"; then
2706         # differences in whitespace do not lead to failure.
2707         ac_old_val_w=`echo x $ac_old_val`
2708         ac_new_val_w=`echo x $ac_new_val`
2709         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2710           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2711 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2712           ac_cache_corrupted=:
2713         else
2714           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2715 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2716           eval $ac_var=\$ac_old_val
2717         fi
2718         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2719 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2720         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2721 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2722       fi;;
2723   esac
2724   # Pass precious variables to config.status.
2725   if test "$ac_new_set" = set; then
2726     case $ac_new_val in
2727     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2728     *) ac_arg=$ac_var=$ac_new_val ;;
2729     esac
2730     case " $ac_configure_args " in
2731       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2732       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2733     esac
2734   fi
2735 done
2736 if $ac_cache_corrupted; then
2737   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2738 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2739   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2740 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2741   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2742 fi
2743 ## -------------------- ##
2744 ## Main body of script. ##
2745 ## -------------------- ##
2746
2747 ac_ext=c
2748 ac_cpp='$CPP $CPPFLAGS'
2749 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2750 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2751 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2752
2753
2754
2755
2756
2757 ac_config_headers="$ac_config_headers config.h:config.in"
2758
2759
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2761 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2762     # Check whether --enable-maintainer-mode was given.
2763 if test "${enable_maintainer_mode+set}" = set; then :
2764   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2765 else
2766   USE_MAINTAINER_MODE=no
2767 fi
2768
2769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2770 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2771    if test $USE_MAINTAINER_MODE = yes; then
2772   MAINTAINER_MODE_TRUE=
2773   MAINTAINER_MODE_FALSE='#'
2774 else
2775   MAINTAINER_MODE_TRUE='#'
2776   MAINTAINER_MODE_FALSE=
2777 fi
2778
2779   MAINT=$MAINTAINER_MODE_TRUE
2780
2781
2782
2783 # Set the 'development' global.
2784 . $srcdir/../bfd/development.sh
2785
2786 ac_ext=c
2787 ac_cpp='$CPP $CPPFLAGS'
2788 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2789 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2791 if test -n "$ac_tool_prefix"; then
2792   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2793 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2795 $as_echo_n "checking for $ac_word... " >&6; }
2796 if test "${ac_cv_prog_CC+set}" = set; then :
2797   $as_echo_n "(cached) " >&6
2798 else
2799   if test -n "$CC"; then
2800   ac_cv_prog_CC="$CC" # Let the user override the test.
2801 else
2802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2803 for as_dir in $PATH
2804 do
2805   IFS=$as_save_IFS
2806   test -z "$as_dir" && as_dir=.
2807     for ac_exec_ext in '' $ac_executable_extensions; do
2808   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2809     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2811     break 2
2812   fi
2813 done
2814   done
2815 IFS=$as_save_IFS
2816
2817 fi
2818 fi
2819 CC=$ac_cv_prog_CC
2820 if test -n "$CC"; then
2821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2822 $as_echo "$CC" >&6; }
2823 else
2824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2825 $as_echo "no" >&6; }
2826 fi
2827
2828
2829 fi
2830 if test -z "$ac_cv_prog_CC"; then
2831   ac_ct_CC=$CC
2832   # Extract the first word of "gcc", so it can be a program name with args.
2833 set dummy gcc; ac_word=$2
2834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2835 $as_echo_n "checking for $ac_word... " >&6; }
2836 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2837   $as_echo_n "(cached) " >&6
2838 else
2839   if test -n "$ac_ct_CC"; then
2840   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2841 else
2842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2843 for as_dir in $PATH
2844 do
2845   IFS=$as_save_IFS
2846   test -z "$as_dir" && as_dir=.
2847     for ac_exec_ext in '' $ac_executable_extensions; do
2848   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2849     ac_cv_prog_ac_ct_CC="gcc"
2850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2851     break 2
2852   fi
2853 done
2854   done
2855 IFS=$as_save_IFS
2856
2857 fi
2858 fi
2859 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2860 if test -n "$ac_ct_CC"; then
2861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2862 $as_echo "$ac_ct_CC" >&6; }
2863 else
2864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2865 $as_echo "no" >&6; }
2866 fi
2867
2868   if test "x$ac_ct_CC" = x; then
2869     CC=""
2870   else
2871     case $cross_compiling:$ac_tool_warned in
2872 yes:)
2873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2874 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2875 ac_tool_warned=yes ;;
2876 esac
2877     CC=$ac_ct_CC
2878   fi
2879 else
2880   CC="$ac_cv_prog_CC"
2881 fi
2882
2883 if test -z "$CC"; then
2884           if test -n "$ac_tool_prefix"; then
2885     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2886 set dummy ${ac_tool_prefix}cc; ac_word=$2
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2888 $as_echo_n "checking for $ac_word... " >&6; }
2889 if test "${ac_cv_prog_CC+set}" = set; then :
2890   $as_echo_n "(cached) " >&6
2891 else
2892   if test -n "$CC"; then
2893   ac_cv_prog_CC="$CC" # Let the user override the test.
2894 else
2895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2896 for as_dir in $PATH
2897 do
2898   IFS=$as_save_IFS
2899   test -z "$as_dir" && as_dir=.
2900     for ac_exec_ext in '' $ac_executable_extensions; do
2901   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2902     ac_cv_prog_CC="${ac_tool_prefix}cc"
2903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2904     break 2
2905   fi
2906 done
2907   done
2908 IFS=$as_save_IFS
2909
2910 fi
2911 fi
2912 CC=$ac_cv_prog_CC
2913 if test -n "$CC"; then
2914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2915 $as_echo "$CC" >&6; }
2916 else
2917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2918 $as_echo "no" >&6; }
2919 fi
2920
2921
2922   fi
2923 fi
2924 if test -z "$CC"; then
2925   # Extract the first word of "cc", so it can be a program name with args.
2926 set dummy cc; ac_word=$2
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2928 $as_echo_n "checking for $ac_word... " >&6; }
2929 if test "${ac_cv_prog_CC+set}" = set; then :
2930   $as_echo_n "(cached) " >&6
2931 else
2932   if test -n "$CC"; then
2933   ac_cv_prog_CC="$CC" # Let the user override the test.
2934 else
2935   ac_prog_rejected=no
2936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2937 for as_dir in $PATH
2938 do
2939   IFS=$as_save_IFS
2940   test -z "$as_dir" && as_dir=.
2941     for ac_exec_ext in '' $ac_executable_extensions; do
2942   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2943     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2944        ac_prog_rejected=yes
2945        continue
2946      fi
2947     ac_cv_prog_CC="cc"
2948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2949     break 2
2950   fi
2951 done
2952   done
2953 IFS=$as_save_IFS
2954
2955 if test $ac_prog_rejected = yes; then
2956   # We found a bogon in the path, so make sure we never use it.
2957   set dummy $ac_cv_prog_CC
2958   shift
2959   if test $# != 0; then
2960     # We chose a different compiler from the bogus one.
2961     # However, it has the same basename, so the bogon will be chosen
2962     # first if we set CC to just the basename; use the full file name.
2963     shift
2964     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2965   fi
2966 fi
2967 fi
2968 fi
2969 CC=$ac_cv_prog_CC
2970 if test -n "$CC"; then
2971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2972 $as_echo "$CC" >&6; }
2973 else
2974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2975 $as_echo "no" >&6; }
2976 fi
2977
2978
2979 fi
2980 if test -z "$CC"; then
2981   if test -n "$ac_tool_prefix"; then
2982   for ac_prog in cl.exe
2983   do
2984     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2985 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2987 $as_echo_n "checking for $ac_word... " >&6; }
2988 if test "${ac_cv_prog_CC+set}" = set; then :
2989   $as_echo_n "(cached) " >&6
2990 else
2991   if test -n "$CC"; then
2992   ac_cv_prog_CC="$CC" # Let the user override the test.
2993 else
2994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2995 for as_dir in $PATH
2996 do
2997   IFS=$as_save_IFS
2998   test -z "$as_dir" && as_dir=.
2999     for ac_exec_ext in '' $ac_executable_extensions; do
3000   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3001     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3002     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3003     break 2
3004   fi
3005 done
3006   done
3007 IFS=$as_save_IFS
3008
3009 fi
3010 fi
3011 CC=$ac_cv_prog_CC
3012 if test -n "$CC"; then
3013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3014 $as_echo "$CC" >&6; }
3015 else
3016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3017 $as_echo "no" >&6; }
3018 fi
3019
3020
3021     test -n "$CC" && break
3022   done
3023 fi
3024 if test -z "$CC"; then
3025   ac_ct_CC=$CC
3026   for ac_prog in cl.exe
3027 do
3028   # Extract the first word of "$ac_prog", so it can be a program name with args.
3029 set dummy $ac_prog; ac_word=$2
3030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3031 $as_echo_n "checking for $ac_word... " >&6; }
3032 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3033   $as_echo_n "(cached) " >&6
3034 else
3035   if test -n "$ac_ct_CC"; then
3036   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3037 else
3038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3039 for as_dir in $PATH
3040 do
3041   IFS=$as_save_IFS
3042   test -z "$as_dir" && as_dir=.
3043     for ac_exec_ext in '' $ac_executable_extensions; do
3044   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3045     ac_cv_prog_ac_ct_CC="$ac_prog"
3046     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3047     break 2
3048   fi
3049 done
3050   done
3051 IFS=$as_save_IFS
3052
3053 fi
3054 fi
3055 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3056 if test -n "$ac_ct_CC"; then
3057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3058 $as_echo "$ac_ct_CC" >&6; }
3059 else
3060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3061 $as_echo "no" >&6; }
3062 fi
3063
3064
3065   test -n "$ac_ct_CC" && break
3066 done
3067
3068   if test "x$ac_ct_CC" = x; then
3069     CC=""
3070   else
3071     case $cross_compiling:$ac_tool_warned in
3072 yes:)
3073 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3074 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3075 ac_tool_warned=yes ;;
3076 esac
3077     CC=$ac_ct_CC
3078   fi
3079 fi
3080
3081 fi
3082
3083
3084 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3085 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3086 as_fn_error "no acceptable C compiler found in \$PATH
3087 See \`config.log' for more details." "$LINENO" 5; }
3088
3089 # Provide some information about the compiler.
3090 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3091 set X $ac_compile
3092 ac_compiler=$2
3093 for ac_option in --version -v -V -qversion; do
3094   { { ac_try="$ac_compiler $ac_option >&5"
3095 case "(($ac_try" in
3096   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3097   *) ac_try_echo=$ac_try;;
3098 esac
3099 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3100 $as_echo "$ac_try_echo"; } >&5
3101   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3102   ac_status=$?
3103   if test -s conftest.err; then
3104     sed '10a\
3105 ... rest of stderr output deleted ...
3106          10q' conftest.err >conftest.er1
3107     cat conftest.er1 >&5
3108     rm -f conftest.er1 conftest.err
3109   fi
3110   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3111   test $ac_status = 0; }
3112 done
3113
3114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3115 /* end confdefs.h.  */
3116
3117 int
3118 main ()
3119 {
3120
3121   ;
3122   return 0;
3123 }
3124 _ACEOF
3125 ac_clean_files_save=$ac_clean_files
3126 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3127 # Try to create an executable without -o first, disregard a.out.
3128 # It will help us diagnose broken compilers, and finding out an intuition
3129 # of exeext.
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3131 $as_echo_n "checking for C compiler default output file name... " >&6; }
3132 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3133
3134 # The possible output files:
3135 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3136
3137 ac_rmfiles=
3138 for ac_file in $ac_files
3139 do
3140   case $ac_file in
3141     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3142     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3143   esac
3144 done
3145 rm -f $ac_rmfiles
3146
3147 if { { ac_try="$ac_link_default"
3148 case "(($ac_try" in
3149   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3150   *) ac_try_echo=$ac_try;;
3151 esac
3152 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3153 $as_echo "$ac_try_echo"; } >&5
3154   (eval "$ac_link_default") 2>&5
3155   ac_status=$?
3156   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3157   test $ac_status = 0; }; then :
3158   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3159 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3160 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3161 # so that the user can short-circuit this test for compilers unknown to
3162 # Autoconf.
3163 for ac_file in $ac_files ''
3164 do
3165   test -f "$ac_file" || continue
3166   case $ac_file in
3167     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3168         ;;
3169     [ab].out )
3170         # We found the default executable, but exeext='' is most
3171         # certainly right.
3172         break;;
3173     *.* )
3174         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3175         then :; else
3176            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3177         fi
3178         # We set ac_cv_exeext here because the later test for it is not
3179         # safe: cross compilers may not add the suffix if given an `-o'
3180         # argument, so we may need to know it at that point already.
3181         # Even if this section looks crufty: it has the advantage of
3182         # actually working.
3183         break;;
3184     * )
3185         break;;
3186   esac
3187 done
3188 test "$ac_cv_exeext" = no && ac_cv_exeext=
3189
3190 else
3191   ac_file=''
3192 fi
3193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3194 $as_echo "$ac_file" >&6; }
3195 if test -z "$ac_file"; then :
3196   $as_echo "$as_me: failed program was:" >&5
3197 sed 's/^/| /' conftest.$ac_ext >&5
3198
3199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3200 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3201 { as_fn_set_status 77
3202 as_fn_error "C compiler cannot create executables
3203 See \`config.log' for more details." "$LINENO" 5; }; }
3204 fi
3205 ac_exeext=$ac_cv_exeext
3206
3207 # Check that the compiler produces executables we can run.  If not, either
3208 # the compiler is broken, or we cross compile.
3209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3210 $as_echo_n "checking whether the C compiler works... " >&6; }
3211 # If not cross compiling, check that we can run a simple program.
3212 if test "$cross_compiling" != yes; then
3213   if { ac_try='./$ac_file'
3214   { { case "(($ac_try" in
3215   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3216   *) ac_try_echo=$ac_try;;
3217 esac
3218 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3219 $as_echo "$ac_try_echo"; } >&5
3220   (eval "$ac_try") 2>&5
3221   ac_status=$?
3222   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3223   test $ac_status = 0; }; }; then
3224     cross_compiling=no
3225   else
3226     if test "$cross_compiling" = maybe; then
3227         cross_compiling=yes
3228     else
3229         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3230 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3231 as_fn_error "cannot run C compiled programs.
3232 If you meant to cross compile, use \`--host'.
3233 See \`config.log' for more details." "$LINENO" 5; }
3234     fi
3235   fi
3236 fi
3237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3238 $as_echo "yes" >&6; }
3239
3240 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3241 ac_clean_files=$ac_clean_files_save
3242 # Check that the compiler produces executables we can run.  If not, either
3243 # the compiler is broken, or we cross compile.
3244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3245 $as_echo_n "checking whether we are cross compiling... " >&6; }
3246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3247 $as_echo "$cross_compiling" >&6; }
3248
3249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3250 $as_echo_n "checking for suffix of executables... " >&6; }
3251 if { { ac_try="$ac_link"
3252 case "(($ac_try" in
3253   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3254   *) ac_try_echo=$ac_try;;
3255 esac
3256 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3257 $as_echo "$ac_try_echo"; } >&5
3258   (eval "$ac_link") 2>&5
3259   ac_status=$?
3260   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3261   test $ac_status = 0; }; then :
3262   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3263 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3264 # work properly (i.e., refer to `conftest.exe'), while it won't with
3265 # `rm'.
3266 for ac_file in conftest.exe conftest conftest.*; do
3267   test -f "$ac_file" || continue
3268   case $ac_file in
3269     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3270     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3271           break;;
3272     * ) break;;
3273   esac
3274 done
3275 else
3276   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3277 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3278 as_fn_error "cannot compute suffix of executables: cannot compile and link
3279 See \`config.log' for more details." "$LINENO" 5; }
3280 fi
3281 rm -f conftest$ac_cv_exeext
3282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3283 $as_echo "$ac_cv_exeext" >&6; }
3284
3285 rm -f conftest.$ac_ext
3286 EXEEXT=$ac_cv_exeext
3287 ac_exeext=$EXEEXT
3288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3289 $as_echo_n "checking for suffix of object files... " >&6; }
3290 if test "${ac_cv_objext+set}" = set; then :
3291   $as_echo_n "(cached) " >&6
3292 else
3293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3294 /* end confdefs.h.  */
3295
3296 int
3297 main ()
3298 {
3299
3300   ;
3301   return 0;
3302 }
3303 _ACEOF
3304 rm -f conftest.o conftest.obj
3305 if { { ac_try="$ac_compile"
3306 case "(($ac_try" in
3307   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3308   *) ac_try_echo=$ac_try;;
3309 esac
3310 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3311 $as_echo "$ac_try_echo"; } >&5
3312   (eval "$ac_compile") 2>&5
3313   ac_status=$?
3314   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3315   test $ac_status = 0; }; then :
3316   for ac_file in conftest.o conftest.obj conftest.*; do
3317   test -f "$ac_file" || continue;
3318   case $ac_file in
3319     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3320     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3321        break;;
3322   esac
3323 done
3324 else
3325   $as_echo "$as_me: failed program was:" >&5
3326 sed 's/^/| /' conftest.$ac_ext >&5
3327
3328 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3329 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3330 as_fn_error "cannot compute suffix of object files: cannot compile
3331 See \`config.log' for more details." "$LINENO" 5; }
3332 fi
3333 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3334 fi
3335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3336 $as_echo "$ac_cv_objext" >&6; }
3337 OBJEXT=$ac_cv_objext
3338 ac_objext=$OBJEXT
3339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3340 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3341 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3342   $as_echo_n "(cached) " >&6
3343 else
3344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3345 /* end confdefs.h.  */
3346
3347 int
3348 main ()
3349 {
3350 #ifndef __GNUC__
3351        choke me
3352 #endif
3353
3354   ;
3355   return 0;
3356 }
3357 _ACEOF
3358 if ac_fn_c_try_compile "$LINENO"; then :
3359   ac_compiler_gnu=yes
3360 else
3361   ac_compiler_gnu=no
3362 fi
3363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3364 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3365
3366 fi
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3368 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3369 if test $ac_compiler_gnu = yes; then
3370   GCC=yes
3371 else
3372   GCC=
3373 fi
3374 ac_test_CFLAGS=${CFLAGS+set}
3375 ac_save_CFLAGS=$CFLAGS
3376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3377 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3378 if test "${ac_cv_prog_cc_g+set}" = set; then :
3379   $as_echo_n "(cached) " >&6
3380 else
3381   ac_save_c_werror_flag=$ac_c_werror_flag
3382    ac_c_werror_flag=yes
3383    ac_cv_prog_cc_g=no
3384    CFLAGS="-g"
3385    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3386 /* end confdefs.h.  */
3387
3388 int
3389 main ()
3390 {
3391
3392   ;
3393   return 0;
3394 }
3395 _ACEOF
3396 if ac_fn_c_try_compile "$LINENO"; then :
3397   ac_cv_prog_cc_g=yes
3398 else
3399   CFLAGS=""
3400       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3401 /* end confdefs.h.  */
3402
3403 int
3404 main ()
3405 {
3406
3407   ;
3408   return 0;
3409 }
3410 _ACEOF
3411 if ac_fn_c_try_compile "$LINENO"; then :
3412
3413 else
3414   ac_c_werror_flag=$ac_save_c_werror_flag
3415          CFLAGS="-g"
3416          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3417 /* end confdefs.h.  */
3418
3419 int
3420 main ()
3421 {
3422
3423   ;
3424   return 0;
3425 }
3426 _ACEOF
3427 if ac_fn_c_try_compile "$LINENO"; then :
3428   ac_cv_prog_cc_g=yes
3429 fi
3430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3431 fi
3432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3433 fi
3434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3435    ac_c_werror_flag=$ac_save_c_werror_flag
3436 fi
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3438 $as_echo "$ac_cv_prog_cc_g" >&6; }
3439 if test "$ac_test_CFLAGS" = set; then
3440   CFLAGS=$ac_save_CFLAGS
3441 elif test $ac_cv_prog_cc_g = yes; then
3442   if test "$GCC" = yes; then
3443     CFLAGS="-g -O2"
3444   else
3445     CFLAGS="-g"
3446   fi
3447 else
3448   if test "$GCC" = yes; then
3449     CFLAGS="-O2"
3450   else
3451     CFLAGS=
3452   fi
3453 fi
3454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3455 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3456 if test "${ac_cv_prog_cc_c89+set}" = set; then :
3457   $as_echo_n "(cached) " >&6
3458 else
3459   ac_cv_prog_cc_c89=no
3460 ac_save_CC=$CC
3461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3462 /* end confdefs.h.  */
3463 #include <stdarg.h>
3464 #include <stdio.h>
3465 #include <sys/types.h>
3466 #include <sys/stat.h>
3467 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3468 struct buf { int x; };
3469 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3470 static char *e (p, i)
3471      char **p;
3472      int i;
3473 {
3474   return p[i];
3475 }
3476 static char *f (char * (*g) (char **, int), char **p, ...)
3477 {
3478   char *s;
3479   va_list v;
3480   va_start (v,p);
3481   s = g (p, va_arg (v,int));
3482   va_end (v);
3483   return s;
3484 }
3485
3486 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3487    function prototypes and stuff, but not '\xHH' hex character constants.
3488    These don't provoke an error unfortunately, instead are silently treated
3489    as 'x'.  The following induces an error, until -std is added to get
3490    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3491    array size at least.  It's necessary to write '\x00'==0 to get something
3492    that's true only with -std.  */
3493 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3494
3495 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3496    inside strings and character constants.  */
3497 #define FOO(x) 'x'
3498 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3499
3500 int test (int i, double x);
3501 struct s1 {int (*f) (int a);};
3502 struct s2 {int (*f) (double a);};
3503 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3504 int argc;
3505 char **argv;
3506 int
3507 main ()
3508 {
3509 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3510   ;
3511   return 0;
3512 }
3513 _ACEOF
3514 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3515         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3516 do
3517   CC="$ac_save_CC $ac_arg"
3518   if ac_fn_c_try_compile "$LINENO"; then :
3519   ac_cv_prog_cc_c89=$ac_arg
3520 fi
3521 rm -f core conftest.err conftest.$ac_objext
3522   test "x$ac_cv_prog_cc_c89" != "xno" && break
3523 done
3524 rm -f conftest.$ac_ext
3525 CC=$ac_save_CC
3526
3527 fi
3528 # AC_CACHE_VAL
3529 case "x$ac_cv_prog_cc_c89" in
3530   x)
3531     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3532 $as_echo "none needed" >&6; } ;;
3533   xno)
3534     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3535 $as_echo "unsupported" >&6; } ;;
3536   *)
3537     CC="$CC $ac_cv_prog_cc_c89"
3538     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3539 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3540 esac
3541 if test "x$ac_cv_prog_cc_c89" != xno; then :
3542
3543 fi
3544
3545 ac_ext=c
3546 ac_cpp='$CPP $CPPFLAGS'
3547 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3548 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3549 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3550
3551 ac_ext=cpp
3552 ac_cpp='$CXXCPP $CPPFLAGS'
3553 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3554 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3555 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3556 if test -z "$CXX"; then
3557   if test -n "$CCC"; then
3558     CXX=$CCC
3559   else
3560     if test -n "$ac_tool_prefix"; then
3561   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3562   do
3563     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3564 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3566 $as_echo_n "checking for $ac_word... " >&6; }
3567 if test "${ac_cv_prog_CXX+set}" = set; then :
3568   $as_echo_n "(cached) " >&6
3569 else
3570   if test -n "$CXX"; then
3571   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3572 else
3573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3574 for as_dir in $PATH
3575 do
3576   IFS=$as_save_IFS
3577   test -z "$as_dir" && as_dir=.
3578     for ac_exec_ext in '' $ac_executable_extensions; do
3579   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3580     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3582     break 2
3583   fi
3584 done
3585   done
3586 IFS=$as_save_IFS
3587
3588 fi
3589 fi
3590 CXX=$ac_cv_prog_CXX
3591 if test -n "$CXX"; then
3592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3593 $as_echo "$CXX" >&6; }
3594 else
3595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3596 $as_echo "no" >&6; }
3597 fi
3598
3599
3600     test -n "$CXX" && break
3601   done
3602 fi
3603 if test -z "$CXX"; then
3604   ac_ct_CXX=$CXX
3605   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3606 do
3607   # Extract the first word of "$ac_prog", so it can be a program name with args.
3608 set dummy $ac_prog; ac_word=$2
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3610 $as_echo_n "checking for $ac_word... " >&6; }
3611 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3612   $as_echo_n "(cached) " >&6
3613 else
3614   if test -n "$ac_ct_CXX"; then
3615   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3616 else
3617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3618 for as_dir in $PATH
3619 do
3620   IFS=$as_save_IFS
3621   test -z "$as_dir" && as_dir=.
3622     for ac_exec_ext in '' $ac_executable_extensions; do
3623   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3624     ac_cv_prog_ac_ct_CXX="$ac_prog"
3625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3626     break 2
3627   fi
3628 done
3629   done
3630 IFS=$as_save_IFS
3631
3632 fi
3633 fi
3634 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3635 if test -n "$ac_ct_CXX"; then
3636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3637 $as_echo "$ac_ct_CXX" >&6; }
3638 else
3639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3640 $as_echo "no" >&6; }
3641 fi
3642
3643
3644   test -n "$ac_ct_CXX" && break
3645 done
3646
3647   if test "x$ac_ct_CXX" = x; then
3648     CXX="g++"
3649   else
3650     case $cross_compiling:$ac_tool_warned in
3651 yes:)
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3653 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3654 ac_tool_warned=yes ;;
3655 esac
3656     CXX=$ac_ct_CXX
3657   fi
3658 fi
3659
3660   fi
3661 fi
3662 # Provide some information about the compiler.
3663 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3664 set X $ac_compile
3665 ac_compiler=$2
3666 for ac_option in --version -v -V -qversion; do
3667   { { ac_try="$ac_compiler $ac_option >&5"
3668 case "(($ac_try" in
3669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3670   *) ac_try_echo=$ac_try;;
3671 esac
3672 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3673 $as_echo "$ac_try_echo"; } >&5
3674   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3675   ac_status=$?
3676   if test -s conftest.err; then
3677     sed '10a\
3678 ... rest of stderr output deleted ...
3679          10q' conftest.err >conftest.er1
3680     cat conftest.er1 >&5
3681     rm -f conftest.er1 conftest.err
3682   fi
3683   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3684   test $ac_status = 0; }
3685 done
3686
3687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3688 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3689 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3690   $as_echo_n "(cached) " >&6
3691 else
3692   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3693 /* end confdefs.h.  */
3694
3695 int
3696 main ()
3697 {
3698 #ifndef __GNUC__
3699        choke me
3700 #endif
3701
3702   ;
3703   return 0;
3704 }
3705 _ACEOF
3706 if ac_fn_cxx_try_compile "$LINENO"; then :
3707   ac_compiler_gnu=yes
3708 else
3709   ac_compiler_gnu=no
3710 fi
3711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3712 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3713
3714 fi
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3716 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3717 if test $ac_compiler_gnu = yes; then
3718   GXX=yes
3719 else
3720   GXX=
3721 fi
3722 ac_test_CXXFLAGS=${CXXFLAGS+set}
3723 ac_save_CXXFLAGS=$CXXFLAGS
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3725 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3726 if test "${ac_cv_prog_cxx_g+set}" = set; then :
3727   $as_echo_n "(cached) " >&6
3728 else
3729   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3730    ac_cxx_werror_flag=yes
3731    ac_cv_prog_cxx_g=no
3732    CXXFLAGS="-g"
3733    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3734 /* end confdefs.h.  */
3735
3736 int
3737 main ()
3738 {
3739
3740   ;
3741   return 0;
3742 }
3743 _ACEOF
3744 if ac_fn_cxx_try_compile "$LINENO"; then :
3745   ac_cv_prog_cxx_g=yes
3746 else
3747   CXXFLAGS=""
3748       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3749 /* end confdefs.h.  */
3750
3751 int
3752 main ()
3753 {
3754
3755   ;
3756   return 0;
3757 }
3758 _ACEOF
3759 if ac_fn_cxx_try_compile "$LINENO"; then :
3760
3761 else
3762   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3763          CXXFLAGS="-g"
3764          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3765 /* end confdefs.h.  */
3766
3767 int
3768 main ()
3769 {
3770
3771   ;
3772   return 0;
3773 }
3774 _ACEOF
3775 if ac_fn_cxx_try_compile "$LINENO"; then :
3776   ac_cv_prog_cxx_g=yes
3777 fi
3778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3779 fi
3780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3781 fi
3782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3783    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3784 fi
3785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3786 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3787 if test "$ac_test_CXXFLAGS" = set; then
3788   CXXFLAGS=$ac_save_CXXFLAGS
3789 elif test $ac_cv_prog_cxx_g = yes; then
3790   if test "$GXX" = yes; then
3791     CXXFLAGS="-g -O2"
3792   else
3793     CXXFLAGS="-g"
3794   fi
3795 else
3796   if test "$GXX" = yes; then
3797     CXXFLAGS="-O2"
3798   else
3799     CXXFLAGS=
3800   fi
3801 fi
3802 ac_ext=c
3803 ac_cpp='$CPP $CPPFLAGS'
3804 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3805 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3806 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3807
3808
3809
3810 ac_ext=c
3811 ac_cpp='$CPP $CPPFLAGS'
3812 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3813 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3814 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3816 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3817 # On Suns, sometimes $CPP names a directory.
3818 if test -n "$CPP" && test -d "$CPP"; then
3819   CPP=
3820 fi
3821 if test -z "$CPP"; then
3822   if test "${ac_cv_prog_CPP+set}" = set; then :
3823   $as_echo_n "(cached) " >&6
3824 else
3825       # Double quotes because CPP needs to be expanded
3826     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3827     do
3828       ac_preproc_ok=false
3829 for ac_c_preproc_warn_flag in '' yes
3830 do
3831   # Use a header file that comes with gcc, so configuring glibc
3832   # with a fresh cross-compiler works.
3833   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3834   # <limits.h> exists even on freestanding compilers.
3835   # On the NeXT, cc -E runs the code through the compiler's parser,
3836   # not just through cpp. "Syntax error" is here to catch this case.
3837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3838 /* end confdefs.h.  */
3839 #ifdef __STDC__
3840 # include <limits.h>
3841 #else
3842 # include <assert.h>
3843 #endif
3844                      Syntax error
3845 _ACEOF
3846 if ac_fn_c_try_cpp "$LINENO"; then :
3847
3848 else
3849   # Broken: fails on valid input.
3850 continue
3851 fi
3852 rm -f conftest.err conftest.$ac_ext
3853
3854   # OK, works on sane cases.  Now check whether nonexistent headers
3855   # can be detected and how.
3856   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3857 /* end confdefs.h.  */
3858 #include <ac_nonexistent.h>
3859 _ACEOF
3860 if ac_fn_c_try_cpp "$LINENO"; then :
3861   # Broken: success on invalid input.
3862 continue
3863 else
3864   # Passes both tests.
3865 ac_preproc_ok=:
3866 break
3867 fi
3868 rm -f conftest.err conftest.$ac_ext
3869
3870 done
3871 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3872 rm -f conftest.err conftest.$ac_ext
3873 if $ac_preproc_ok; then :
3874   break
3875 fi
3876
3877     done
3878     ac_cv_prog_CPP=$CPP
3879
3880 fi
3881   CPP=$ac_cv_prog_CPP
3882 else
3883   ac_cv_prog_CPP=$CPP
3884 fi
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3886 $as_echo "$CPP" >&6; }
3887 ac_preproc_ok=false
3888 for ac_c_preproc_warn_flag in '' yes
3889 do
3890   # Use a header file that comes with gcc, so configuring glibc
3891   # with a fresh cross-compiler works.
3892   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3893   # <limits.h> exists even on freestanding compilers.
3894   # On the NeXT, cc -E runs the code through the compiler's parser,
3895   # not just through cpp. "Syntax error" is here to catch this case.
3896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3897 /* end confdefs.h.  */
3898 #ifdef __STDC__
3899 # include <limits.h>
3900 #else
3901 # include <assert.h>
3902 #endif
3903                      Syntax error
3904 _ACEOF
3905 if ac_fn_c_try_cpp "$LINENO"; then :
3906
3907 else
3908   # Broken: fails on valid input.
3909 continue
3910 fi
3911 rm -f conftest.err conftest.$ac_ext
3912
3913   # OK, works on sane cases.  Now check whether nonexistent headers
3914   # can be detected and how.
3915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3916 /* end confdefs.h.  */
3917 #include <ac_nonexistent.h>
3918 _ACEOF
3919 if ac_fn_c_try_cpp "$LINENO"; then :
3920   # Broken: success on invalid input.
3921 continue
3922 else
3923   # Passes both tests.
3924 ac_preproc_ok=:
3925 break
3926 fi
3927 rm -f conftest.err conftest.$ac_ext
3928
3929 done
3930 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3931 rm -f conftest.err conftest.$ac_ext
3932 if $ac_preproc_ok; then :
3933
3934 else
3935   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3936 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3937 as_fn_error "C preprocessor \"$CPP\" fails sanity check
3938 See \`config.log' for more details." "$LINENO" 5; }
3939 fi
3940
3941 ac_ext=c
3942 ac_cpp='$CPP $CPPFLAGS'
3943 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3944 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3945 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3946
3947
3948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3949 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3950 if test "${ac_cv_path_GREP+set}" = set; then :
3951   $as_echo_n "(cached) " >&6
3952 else
3953   if test -z "$GREP"; then
3954   ac_path_GREP_found=false
3955   # Loop through the user's path and test for each of PROGNAME-LIST
3956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3957 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3958 do
3959   IFS=$as_save_IFS
3960   test -z "$as_dir" && as_dir=.
3961     for ac_prog in grep ggrep; do
3962     for ac_exec_ext in '' $ac_executable_extensions; do
3963       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3964       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3965 # Check for GNU ac_path_GREP and select it if it is found.
3966   # Check for GNU $ac_path_GREP
3967 case `"$ac_path_GREP" --version 2>&1` in
3968 *GNU*)
3969   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3970 *)
3971   ac_count=0
3972   $as_echo_n 0123456789 >"conftest.in"
3973   while :
3974   do
3975     cat "conftest.in" "conftest.in" >"conftest.tmp"
3976     mv "conftest.tmp" "conftest.in"
3977     cp "conftest.in" "conftest.nl"
3978     $as_echo 'GREP' >> "conftest.nl"
3979     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3980     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3981     as_fn_arith $ac_count + 1 && ac_count=$as_val
3982     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3983       # Best one so far, save it but keep looking for a better one
3984       ac_cv_path_GREP="$ac_path_GREP"
3985       ac_path_GREP_max=$ac_count
3986     fi
3987     # 10*(2^10) chars as input seems more than enough
3988     test $ac_count -gt 10 && break
3989   done
3990   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3991 esac
3992
3993       $ac_path_GREP_found && break 3
3994     done
3995   done
3996   done
3997 IFS=$as_save_IFS
3998   if test -z "$ac_cv_path_GREP"; then
3999     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4000   fi
4001 else
4002   ac_cv_path_GREP=$GREP
4003 fi
4004
4005 fi
4006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4007 $as_echo "$ac_cv_path_GREP" >&6; }
4008  GREP="$ac_cv_path_GREP"
4009
4010
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4012 $as_echo_n "checking for egrep... " >&6; }
4013 if test "${ac_cv_path_EGREP+set}" = set; then :
4014   $as_echo_n "(cached) " >&6
4015 else
4016   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4017    then ac_cv_path_EGREP="$GREP -E"
4018    else
4019      if test -z "$EGREP"; then
4020   ac_path_EGREP_found=false
4021   # Loop through the user's path and test for each of PROGNAME-LIST
4022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4023 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4024 do
4025   IFS=$as_save_IFS
4026   test -z "$as_dir" && as_dir=.
4027     for ac_prog in egrep; do
4028     for ac_exec_ext in '' $ac_executable_extensions; do
4029       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4030       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4031 # Check for GNU ac_path_EGREP and select it if it is found.
4032   # Check for GNU $ac_path_EGREP
4033 case `"$ac_path_EGREP" --version 2>&1` in
4034 *GNU*)
4035   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4036 *)
4037   ac_count=0
4038   $as_echo_n 0123456789 >"conftest.in"
4039   while :
4040   do
4041     cat "conftest.in" "conftest.in" >"conftest.tmp"
4042     mv "conftest.tmp" "conftest.in"
4043     cp "conftest.in" "conftest.nl"
4044     $as_echo 'EGREP' >> "conftest.nl"
4045     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4046     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4047     as_fn_arith $ac_count + 1 && ac_count=$as_val
4048     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4049       # Best one so far, save it but keep looking for a better one
4050       ac_cv_path_EGREP="$ac_path_EGREP"
4051       ac_path_EGREP_max=$ac_count
4052     fi
4053     # 10*(2^10) chars as input seems more than enough
4054     test $ac_count -gt 10 && break
4055   done
4056   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4057 esac
4058
4059       $ac_path_EGREP_found && break 3
4060     done
4061   done
4062   done
4063 IFS=$as_save_IFS
4064   if test -z "$ac_cv_path_EGREP"; then
4065     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4066   fi
4067 else
4068   ac_cv_path_EGREP=$EGREP
4069 fi
4070
4071    fi
4072 fi
4073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4074 $as_echo "$ac_cv_path_EGREP" >&6; }
4075  EGREP="$ac_cv_path_EGREP"
4076
4077
4078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4079 $as_echo_n "checking for ANSI C header files... " >&6; }
4080 if test "${ac_cv_header_stdc+set}" = set; then :
4081   $as_echo_n "(cached) " >&6
4082 else
4083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4084 /* end confdefs.h.  */
4085 #include <stdlib.h>
4086 #include <stdarg.h>
4087 #include <string.h>
4088 #include <float.h>
4089
4090 int
4091 main ()
4092 {
4093
4094   ;
4095   return 0;
4096 }
4097 _ACEOF
4098 if ac_fn_c_try_compile "$LINENO"; then :
4099   ac_cv_header_stdc=yes
4100 else
4101   ac_cv_header_stdc=no
4102 fi
4103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4104
4105 if test $ac_cv_header_stdc = yes; then
4106   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4108 /* end confdefs.h.  */
4109 #include <string.h>
4110
4111 _ACEOF
4112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4113   $EGREP "memchr" >/dev/null 2>&1; then :
4114
4115 else
4116   ac_cv_header_stdc=no
4117 fi
4118 rm -f conftest*
4119
4120 fi
4121
4122 if test $ac_cv_header_stdc = yes; then
4123   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4125 /* end confdefs.h.  */
4126 #include <stdlib.h>
4127
4128 _ACEOF
4129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4130   $EGREP "free" >/dev/null 2>&1; then :
4131
4132 else
4133   ac_cv_header_stdc=no
4134 fi
4135 rm -f conftest*
4136
4137 fi
4138
4139 if test $ac_cv_header_stdc = yes; then
4140   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4141   if test "$cross_compiling" = yes; then :
4142   :
4143 else
4144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4145 /* end confdefs.h.  */
4146 #include <ctype.h>
4147 #include <stdlib.h>
4148 #if ((' ' & 0x0FF) == 0x020)
4149 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4150 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4151 #else
4152 # define ISLOWER(c) \
4153                    (('a' <= (c) && (c) <= 'i') \
4154                      || ('j' <= (c) && (c) <= 'r') \
4155                      || ('s' <= (c) && (c) <= 'z'))
4156 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4157 #endif
4158
4159 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4160 int
4161 main ()
4162 {
4163   int i;
4164   for (i = 0; i < 256; i++)
4165     if (XOR (islower (i), ISLOWER (i))
4166         || toupper (i) != TOUPPER (i))
4167       return 2;
4168   return 0;
4169 }
4170 _ACEOF
4171 if ac_fn_c_try_run "$LINENO"; then :
4172
4173 else
4174   ac_cv_header_stdc=no
4175 fi
4176 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4177   conftest.$ac_objext conftest.beam conftest.$ac_ext
4178 fi
4179
4180 fi
4181 fi
4182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4183 $as_echo "$ac_cv_header_stdc" >&6; }
4184 if test $ac_cv_header_stdc = yes; then
4185
4186 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4187
4188 fi
4189
4190 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4191 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4192                   inttypes.h stdint.h unistd.h
4193 do :
4194   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4195 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4196 "
4197 eval as_val=\$$as_ac_Header
4198    if test "x$as_val" = x""yes; then :
4199   cat >>confdefs.h <<_ACEOF
4200 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4201 _ACEOF
4202
4203 fi
4204
4205 done
4206
4207
4208
4209   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4210 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4211   MINIX=yes
4212 else
4213   MINIX=
4214 fi
4215
4216
4217   if test "$MINIX" = yes; then
4218
4219 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4220
4221
4222 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4223
4224
4225 $as_echo "#define _MINIX 1" >>confdefs.h
4226
4227   fi
4228
4229
4230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4231 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4232 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4233   $as_echo_n "(cached) " >&6
4234 else
4235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4236 /* end confdefs.h.  */
4237
4238 #         define __EXTENSIONS__ 1
4239           $ac_includes_default
4240 int
4241 main ()
4242 {
4243
4244   ;
4245   return 0;
4246 }
4247 _ACEOF
4248 if ac_fn_c_try_compile "$LINENO"; then :
4249   ac_cv_safe_to_define___extensions__=yes
4250 else
4251   ac_cv_safe_to_define___extensions__=no
4252 fi
4253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254 fi
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4256 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4257   test $ac_cv_safe_to_define___extensions__ = yes &&
4258     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4259
4260   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4261
4262   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4263
4264   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4265
4266   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4267
4268
4269 ac_aux_dir=
4270 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4271   for ac_t in install-sh install.sh shtool; do
4272     if test -f "$ac_dir/$ac_t"; then
4273       ac_aux_dir=$ac_dir
4274       ac_install_sh="$ac_aux_dir/$ac_t -c"
4275       break 2
4276     fi
4277   done
4278 done
4279 if test -z "$ac_aux_dir"; then
4280   as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4281 fi
4282
4283 # These three variables are undocumented and unsupported,
4284 # and are intended to be withdrawn in a future Autoconf release.
4285 # They can cause serious problems if a builder's source tree is in a directory
4286 # whose full name contains unusual characters.
4287 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4288 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4289 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4290
4291
4292 # Make sure we can run config.sub.
4293 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4294   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4295
4296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4297 $as_echo_n "checking build system type... " >&6; }
4298 if test "${ac_cv_build+set}" = set; then :
4299   $as_echo_n "(cached) " >&6
4300 else
4301   ac_build_alias=$build_alias
4302 test "x$ac_build_alias" = x &&
4303   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4304 test "x$ac_build_alias" = x &&
4305   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4306 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4307   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4308
4309 fi
4310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4311 $as_echo "$ac_cv_build" >&6; }
4312 case $ac_cv_build in
4313 *-*-*) ;;
4314 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4315 esac
4316 build=$ac_cv_build
4317 ac_save_IFS=$IFS; IFS='-'
4318 set x $ac_cv_build
4319 shift
4320 build_cpu=$1
4321 build_vendor=$2
4322 shift; shift
4323 # Remember, the first character of IFS is used to create $*,
4324 # except with old shells:
4325 build_os=$*
4326 IFS=$ac_save_IFS
4327 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4328
4329
4330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4331 $as_echo_n "checking host system type... " >&6; }
4332 if test "${ac_cv_host+set}" = set; then :
4333   $as_echo_n "(cached) " >&6
4334 else
4335   if test "x$host_alias" = x; then
4336   ac_cv_host=$ac_cv_build
4337 else
4338   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4339     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4340 fi
4341
4342 fi
4343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4344 $as_echo "$ac_cv_host" >&6; }
4345 case $ac_cv_host in
4346 *-*-*) ;;
4347 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4348 esac
4349 host=$ac_cv_host
4350 ac_save_IFS=$IFS; IFS='-'
4351 set x $ac_cv_host
4352 shift
4353 host_cpu=$1
4354 host_vendor=$2
4355 shift; shift
4356 # Remember, the first character of IFS is used to create $*,
4357 # except with old shells:
4358 host_os=$*
4359 IFS=$ac_save_IFS
4360 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4361
4362
4363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4364 $as_echo_n "checking target system type... " >&6; }
4365 if test "${ac_cv_target+set}" = set; then :
4366   $as_echo_n "(cached) " >&6
4367 else
4368   if test "x$target_alias" = x; then
4369   ac_cv_target=$ac_cv_host
4370 else
4371   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4372     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4373 fi
4374
4375 fi
4376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4377 $as_echo "$ac_cv_target" >&6; }
4378 case $ac_cv_target in
4379 *-*-*) ;;
4380 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4381 esac
4382 target=$ac_cv_target
4383 ac_save_IFS=$IFS; IFS='-'
4384 set x $ac_cv_target
4385 shift
4386 target_cpu=$1
4387 target_vendor=$2
4388 shift; shift
4389 # Remember, the first character of IFS is used to create $*,
4390 # except with old shells:
4391 target_os=$*
4392 IFS=$ac_save_IFS
4393 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4394
4395
4396 # The aliases save the names the user supplied, while $host etc.
4397 # will get canonicalized.
4398 test -n "$target_alias" &&
4399   test "$program_prefix$program_suffix$program_transform_name" = \
4400     NONENONEs,x,x, &&
4401   program_prefix=${target_alias}-
4402
4403 # The tests for host and target for $enable_largefile require
4404 # canonical names.
4405
4406
4407
4408 # As the $enable_largefile decision depends on --enable-plugins we must set it
4409 # even in directories otherwise not depending on the $plugins option.
4410
4411
4412   maybe_plugins=no
4413   for ac_header in dlfcn.h
4414 do :
4415   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4416 "
4417 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4418   cat >>confdefs.h <<_ACEOF
4419 #define HAVE_DLFCN_H 1
4420 _ACEOF
4421  maybe_plugins=yes
4422 fi
4423
4424 done
4425
4426   for ac_header in windows.h
4427 do :
4428   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4429 "
4430 if test "x$ac_cv_header_windows_h" = x""yes; then :
4431   cat >>confdefs.h <<_ACEOF
4432 #define HAVE_WINDOWS_H 1
4433 _ACEOF
4434  maybe_plugins=yes
4435 fi
4436
4437 done
4438
4439
4440   # Check whether --enable-plugins was given.
4441 if test "${enable_plugins+set}" = set; then :
4442   enableval=$enable_plugins; case "${enableval}" in
4443       no) plugins=no ;;
4444       *) plugins=yes
4445          if test "$maybe_plugins" != "yes" ; then
4446            as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4447          fi ;;
4448      esac
4449 else
4450   plugins=$maybe_plugins
4451
4452 fi
4453
4454   if test "$plugins" = "yes"; then
4455     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4456 $as_echo_n "checking for library containing dlopen... " >&6; }
4457 if test "${ac_cv_search_dlopen+set}" = set; then :
4458   $as_echo_n "(cached) " >&6
4459 else
4460   ac_func_search_save_LIBS=$LIBS
4461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4462 /* end confdefs.h.  */
4463
4464 /* Override any GCC internal prototype to avoid an error.
4465    Use char because int might match the return type of a GCC
4466    builtin and then its argument prototype would still apply.  */
4467 #ifdef __cplusplus
4468 extern "C"
4469 #endif
4470 char dlopen ();
4471 int
4472 main ()
4473 {
4474 return dlopen ();
4475   ;
4476   return 0;
4477 }
4478 _ACEOF
4479 for ac_lib in '' dl; do
4480   if test -z "$ac_lib"; then
4481     ac_res="none required"
4482   else
4483     ac_res=-l$ac_lib
4484     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4485   fi
4486   if ac_fn_c_try_link "$LINENO"; then :
4487   ac_cv_search_dlopen=$ac_res
4488 fi
4489 rm -f core conftest.err conftest.$ac_objext \
4490     conftest$ac_exeext
4491   if test "${ac_cv_search_dlopen+set}" = set; then :
4492   break
4493 fi
4494 done
4495 if test "${ac_cv_search_dlopen+set}" = set; then :
4496
4497 else
4498   ac_cv_search_dlopen=no
4499 fi
4500 rm conftest.$ac_ext
4501 LIBS=$ac_func_search_save_LIBS
4502 fi
4503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4504 $as_echo "$ac_cv_search_dlopen" >&6; }
4505 ac_res=$ac_cv_search_dlopen
4506 if test "$ac_res" != no; then :
4507   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4508
4509 fi
4510
4511   fi
4512
4513
4514 case "${host}" in
4515   sparc-*-solaris*|i[3-7]86-*-solaris*)
4516     # On native 32bit sparc and ia32 solaris, large-file and procfs support
4517     # are mutually exclusive; and without procfs support, the bfd/ elf module
4518     # cannot provide certain routines such as elfcore_write_prpsinfo
4519     # or elfcore_write_prstatus.  So unless the user explicitly requested
4520     # large-file support through the --enable-largefile switch, disable
4521     # large-file support in favor of procfs support.
4522     test "${target}" = "${host}" -a "x$plugins" = xno \
4523       && : ${enable_largefile="no"}
4524     ;;
4525 esac
4526
4527 # Check whether --enable-largefile was given.
4528 if test "${enable_largefile+set}" = set; then :
4529   enableval=$enable_largefile;
4530 fi
4531
4532 if test "$enable_largefile" != no; then
4533
4534   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4535 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4536 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4537   $as_echo_n "(cached) " >&6
4538 else
4539   ac_cv_sys_largefile_CC=no
4540      if test "$GCC" != yes; then
4541        ac_save_CC=$CC
4542        while :; do
4543          # IRIX 6.2 and later do not support large files by default,
4544          # so use the C compiler's -n32 option if that helps.
4545          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4546 /* end confdefs.h.  */
4547 #include <sys/types.h>
4548  /* Check that off_t can represent 2**63 - 1 correctly.
4549     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4550     since some C++ compilers masquerading as C compilers
4551     incorrectly reject 9223372036854775807.  */
4552 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4553   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4554                        && LARGE_OFF_T % 2147483647 == 1)
4555                       ? 1 : -1];
4556 int
4557 main ()
4558 {
4559
4560   ;
4561   return 0;
4562 }
4563 _ACEOF
4564          if ac_fn_c_try_compile "$LINENO"; then :
4565   break
4566 fi
4567 rm -f core conftest.err conftest.$ac_objext
4568          CC="$CC -n32"
4569          if ac_fn_c_try_compile "$LINENO"; then :
4570   ac_cv_sys_largefile_CC=' -n32'; break
4571 fi
4572 rm -f core conftest.err conftest.$ac_objext
4573          break
4574        done
4575        CC=$ac_save_CC
4576        rm -f conftest.$ac_ext
4577     fi
4578 fi
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4580 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4581   if test "$ac_cv_sys_largefile_CC" != no; then
4582     CC=$CC$ac_cv_sys_largefile_CC
4583   fi
4584
4585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4586 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4587 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4588   $as_echo_n "(cached) " >&6
4589 else
4590   while :; do
4591   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4592 /* end confdefs.h.  */
4593 #include <sys/types.h>
4594  /* Check that off_t can represent 2**63 - 1 correctly.
4595     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4596     since some C++ compilers masquerading as C compilers
4597     incorrectly reject 9223372036854775807.  */
4598 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4599   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4600                        && LARGE_OFF_T % 2147483647 == 1)
4601                       ? 1 : -1];
4602 int
4603 main ()
4604 {
4605
4606   ;
4607   return 0;
4608 }
4609 _ACEOF
4610 if ac_fn_c_try_compile "$LINENO"; then :
4611   ac_cv_sys_file_offset_bits=no; break
4612 fi
4613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4614   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615 /* end confdefs.h.  */
4616 #define _FILE_OFFSET_BITS 64
4617 #include <sys/types.h>
4618  /* Check that off_t can represent 2**63 - 1 correctly.
4619     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4620     since some C++ compilers masquerading as C compilers
4621     incorrectly reject 9223372036854775807.  */
4622 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4623   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4624                        && LARGE_OFF_T % 2147483647 == 1)
4625                       ? 1 : -1];
4626 int
4627 main ()
4628 {
4629
4630   ;
4631   return 0;
4632 }
4633 _ACEOF
4634 if ac_fn_c_try_compile "$LINENO"; then :
4635   ac_cv_sys_file_offset_bits=64; break
4636 fi
4637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4638   ac_cv_sys_file_offset_bits=unknown
4639   break
4640 done
4641 fi
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4643 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4644 case $ac_cv_sys_file_offset_bits in #(
4645   no | unknown) ;;
4646   *)
4647 cat >>confdefs.h <<_ACEOF
4648 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4649 _ACEOF
4650 ;;
4651 esac
4652 rm -rf conftest*
4653   if test $ac_cv_sys_file_offset_bits = unknown; then
4654     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4655 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4656 if test "${ac_cv_sys_large_files+set}" = set; then :
4657   $as_echo_n "(cached) " >&6
4658 else
4659   while :; do
4660   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4661 /* end confdefs.h.  */
4662 #include <sys/types.h>
4663  /* Check that off_t can represent 2**63 - 1 correctly.
4664     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4665     since some C++ compilers masquerading as C compilers
4666     incorrectly reject 9223372036854775807.  */
4667 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4668   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4669                        && LARGE_OFF_T % 2147483647 == 1)
4670                       ? 1 : -1];
4671 int
4672 main ()
4673 {
4674
4675   ;
4676   return 0;
4677 }
4678 _ACEOF
4679 if ac_fn_c_try_compile "$LINENO"; then :
4680   ac_cv_sys_large_files=no; break
4681 fi
4682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4683   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4684 /* end confdefs.h.  */
4685 #define _LARGE_FILES 1
4686 #include <sys/types.h>
4687  /* Check that off_t can represent 2**63 - 1 correctly.
4688     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4689     since some C++ compilers masquerading as C compilers
4690     incorrectly reject 9223372036854775807.  */
4691 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4692   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4693                        && LARGE_OFF_T % 2147483647 == 1)
4694                       ? 1 : -1];
4695 int
4696 main ()
4697 {
4698
4699   ;
4700   return 0;
4701 }
4702 _ACEOF
4703 if ac_fn_c_try_compile "$LINENO"; then :
4704   ac_cv_sys_large_files=1; break
4705 fi
4706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4707   ac_cv_sys_large_files=unknown
4708   break
4709 done
4710 fi
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4712 $as_echo "$ac_cv_sys_large_files" >&6; }
4713 case $ac_cv_sys_large_files in #(
4714   no | unknown) ;;
4715   *)
4716 cat >>confdefs.h <<_ACEOF
4717 #define _LARGE_FILES $ac_cv_sys_large_files
4718 _ACEOF
4719 ;;
4720 esac
4721 rm -rf conftest*
4722   fi
4723 fi
4724
4725
4726
4727
4728
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4730 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4731 if test "${am_cv_prog_cc_stdc+set}" = set; then :
4732   $as_echo_n "(cached) " >&6
4733 else
4734   am_cv_prog_cc_stdc=no
4735 ac_save_CC="$CC"
4736 # Don't try gcc -ansi; that turns off useful extensions and
4737 # breaks some systems' header files.
4738 # AIX                   -qlanglvl=ansi
4739 # Ultrix and OSF/1      -std1
4740 # HP-UX 10.20 and later -Ae
4741 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4742 # SVR4                  -Xc -D__EXTENSIONS__
4743 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4744 do
4745   CC="$ac_save_CC $ac_arg"
4746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4747 /* end confdefs.h.  */
4748 #include <stdarg.h>
4749 #include <stdio.h>
4750 #include <sys/types.h>
4751 #include <sys/stat.h>
4752 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4753 struct buf { int x; };
4754 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4755 static char *e (p, i)
4756      char **p;
4757      int i;
4758 {
4759   return p[i];
4760 }
4761 static char *f (char * (*g) (char **, int), char **p, ...)
4762 {
4763   char *s;
4764   va_list v;
4765   va_start (v,p);
4766   s = g (p, va_arg (v,int));
4767   va_end (v);
4768   return s;
4769 }
4770 int test (int i, double x);
4771 struct s1 {int (*f) (int a);};
4772 struct s2 {int (*f) (double a);};
4773 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4774 int argc;
4775 char **argv;
4776
4777 int
4778 main ()
4779 {
4780
4781 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4782
4783   ;
4784   return 0;
4785 }
4786 _ACEOF
4787 if ac_fn_c_try_compile "$LINENO"; then :
4788   am_cv_prog_cc_stdc="$ac_arg"; break
4789 fi
4790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4791 done
4792 CC="$ac_save_CC"
4793
4794 fi
4795
4796 if test -z "$am_cv_prog_cc_stdc"; then
4797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4798 $as_echo "none needed" >&6; }
4799 else
4800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4801 $as_echo "$am_cv_prog_cc_stdc" >&6; }
4802 fi
4803 case "x$am_cv_prog_cc_stdc" in
4804   x|xno) ;;
4805   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4806 esac
4807
4808 # expand $ac_aux_dir to an absolute path
4809 am_aux_dir=`cd $ac_aux_dir && pwd`
4810
4811 if test x"${install_sh}" != xset; then
4812   case $am_aux_dir in
4813   *\ * | *\     *)
4814     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4815   *)
4816     install_sh="\${SHELL} $am_aux_dir/install-sh"
4817   esac
4818 fi
4819
4820 # Installed binaries are usually stripped using `strip' when the user
4821 # run `make install-strip'.  However `strip' might not be the right
4822 # tool to use in cross-compilation environments, therefore Automake
4823 # will honor the `STRIP' environment variable to overrule this program.
4824 if test "$cross_compiling" != no; then
4825   if test -n "$ac_tool_prefix"; then
4826   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4827 set dummy ${ac_tool_prefix}strip; ac_word=$2
4828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4829 $as_echo_n "checking for $ac_word... " >&6; }
4830 if test "${ac_cv_prog_STRIP+set}" = set; then :
4831   $as_echo_n "(cached) " >&6
4832 else
4833   if test -n "$STRIP"; then
4834   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4835 else
4836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4837 for as_dir in $PATH
4838 do
4839   IFS=$as_save_IFS
4840   test -z "$as_dir" && as_dir=.
4841     for ac_exec_ext in '' $ac_executable_extensions; do
4842   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4843     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4845     break 2
4846   fi
4847 done
4848   done
4849 IFS=$as_save_IFS
4850
4851 fi
4852 fi
4853 STRIP=$ac_cv_prog_STRIP
4854 if test -n "$STRIP"; then
4855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4856 $as_echo "$STRIP" >&6; }
4857 else
4858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859 $as_echo "no" >&6; }
4860 fi
4861
4862
4863 fi
4864 if test -z "$ac_cv_prog_STRIP"; then
4865   ac_ct_STRIP=$STRIP
4866   # Extract the first word of "strip", so it can be a program name with args.
4867 set dummy strip; ac_word=$2
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4869 $as_echo_n "checking for $ac_word... " >&6; }
4870 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4871   $as_echo_n "(cached) " >&6
4872 else
4873   if test -n "$ac_ct_STRIP"; then
4874   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4875 else
4876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4877 for as_dir in $PATH
4878 do
4879   IFS=$as_save_IFS
4880   test -z "$as_dir" && as_dir=.
4881     for ac_exec_ext in '' $ac_executable_extensions; do
4882   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4883     ac_cv_prog_ac_ct_STRIP="strip"
4884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4885     break 2
4886   fi
4887 done
4888   done
4889 IFS=$as_save_IFS
4890
4891 fi
4892 fi
4893 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4894 if test -n "$ac_ct_STRIP"; then
4895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4896 $as_echo "$ac_ct_STRIP" >&6; }
4897 else
4898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4899 $as_echo "no" >&6; }
4900 fi
4901
4902   if test "x$ac_ct_STRIP" = x; then
4903     STRIP=":"
4904   else
4905     case $cross_compiling:$ac_tool_warned in
4906 yes:)
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4908 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4909 ac_tool_warned=yes ;;
4910 esac
4911     STRIP=$ac_ct_STRIP
4912   fi
4913 else
4914   STRIP="$ac_cv_prog_STRIP"
4915 fi
4916
4917 fi
4918 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4919
4920
4921 ac_aux_dir=
4922 for ac_dir in .. "$srcdir"/..; do
4923   for ac_t in install-sh install.sh shtool; do
4924     if test -f "$ac_dir/$ac_t"; then
4925       ac_aux_dir=$ac_dir
4926       ac_install_sh="$ac_aux_dir/$ac_t -c"
4927       break 2
4928     fi
4929   done
4930 done
4931 if test -z "$ac_aux_dir"; then
4932   as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
4933 fi
4934
4935 # These three variables are undocumented and unsupported,
4936 # and are intended to be withdrawn in a future Autoconf release.
4937 # They can cause serious problems if a builder's source tree is in a directory
4938 # whose full name contains unusual characters.
4939 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4940 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4941 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4942
4943
4944
4945 test "$program_prefix" != NONE &&
4946   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4947 # Use a double $ so make ignores it.
4948 test "$program_suffix" != NONE &&
4949   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4950 # Double any \ or $.
4951 # By default was `s,x,x', remove it if useless.
4952 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4953 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4954
4955
4956 # We require a C++11 compiler.  Check if one is available, and if
4957 # necessary, set CXX_DIALECT to some -std=xxx switch.
4958
4959       ax_cxx_compile_cxx11_required=true
4960   ac_ext=cpp
4961 ac_cpp='$CXXCPP $CPPFLAGS'
4962 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4963 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4964 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4965   CXX_DIALECT=""
4966   ac_success=no
4967   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4968 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
4969 if test "${ax_cv_cxx_compile_cxx11+set}" = set; then :
4970   $as_echo_n "(cached) " >&6
4971 else
4972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4973 /* end confdefs.h.  */
4974
4975
4976 // If the compiler admits that it is not ready for C++11, why torture it?
4977 // Hopefully, this will speed up the test.
4978
4979 #ifndef __cplusplus
4980
4981 #error "This is not a C++ compiler"
4982
4983 #elif __cplusplus < 201103L
4984
4985 #error "This is not a C++11 compiler"
4986
4987 #else
4988
4989 namespace cxx11
4990 {
4991
4992   namespace test_static_assert
4993   {
4994
4995     template <typename T>
4996     struct check
4997     {
4998       static_assert(sizeof(int) <= sizeof(T), "not big enough");
4999     };
5000
5001   }
5002
5003   namespace test_final_override
5004   {
5005
5006     struct Base
5007     {
5008       virtual void f() {}
5009     };
5010
5011     struct Derived : public Base
5012     {
5013       virtual void f() override {}
5014     };
5015
5016   }
5017
5018   namespace test_double_right_angle_brackets
5019   {
5020
5021     template < typename T >
5022     struct check {};
5023
5024     typedef check<void> single_type;
5025     typedef check<check<void>> double_type;
5026     typedef check<check<check<void>>> triple_type;
5027     typedef check<check<check<check<void>>>> quadruple_type;
5028
5029   }
5030
5031   namespace test_decltype
5032   {
5033
5034     int
5035     f()
5036     {
5037       int a = 1;
5038       decltype(a) b = 2;
5039       return a + b;
5040     }
5041
5042   }
5043
5044   namespace test_type_deduction
5045   {
5046
5047     template < typename T1, typename T2 >
5048     struct is_same
5049     {
5050       static const bool value = false;
5051     };
5052
5053     template < typename T >
5054     struct is_same<T, T>
5055     {
5056       static const bool value = true;
5057     };
5058
5059     template < typename T1, typename T2 >
5060     auto
5061     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5062     {
5063       return a1 + a2;
5064     }
5065
5066     int
5067     test(const int c, volatile int v)
5068     {
5069       static_assert(is_same<int, decltype(0)>::value == true, "");
5070       static_assert(is_same<int, decltype(c)>::value == false, "");
5071       static_assert(is_same<int, decltype(v)>::value == false, "");
5072       auto ac = c;
5073       auto av = v;
5074       auto sumi = ac + av + 'x';
5075       auto sumf = ac + av + 1.0;
5076       static_assert(is_same<int, decltype(ac)>::value == true, "");
5077       static_assert(is_same<int, decltype(av)>::value == true, "");
5078       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5079       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5080       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5081       return (sumf > 0.0) ? sumi : add(c, v);
5082     }
5083
5084   }
5085
5086   namespace test_noexcept
5087   {
5088
5089     int f() { return 0; }
5090     int g() noexcept { return 0; }
5091
5092     static_assert(noexcept(f()) == false, "");
5093     static_assert(noexcept(g()) == true, "");
5094
5095   }
5096
5097   namespace test_constexpr
5098   {
5099
5100     template < typename CharT >
5101     unsigned long constexpr
5102     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5103     {
5104       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5105     }
5106
5107     template < typename CharT >
5108     unsigned long constexpr
5109     strlen_c(const CharT *const s) noexcept
5110     {
5111       return strlen_c_r(s, 0UL);
5112     }
5113
5114     static_assert(strlen_c("") == 0UL, "");
5115     static_assert(strlen_c("1") == 1UL, "");
5116     static_assert(strlen_c("example") == 7UL, "");
5117     static_assert(strlen_c("another\0example") == 7UL, "");
5118
5119   }
5120
5121   namespace test_rvalue_references
5122   {
5123
5124     template < int N >
5125     struct answer
5126     {
5127       static constexpr int value = N;
5128     };
5129
5130     answer<1> f(int&)       { return answer<1>(); }
5131     answer<2> f(const int&) { return answer<2>(); }
5132     answer<3> f(int&&)      { return answer<3>(); }
5133
5134     void
5135     test()
5136     {
5137       int i = 0;
5138       const int c = 0;
5139       static_assert(decltype(f(i))::value == 1, "");
5140       static_assert(decltype(f(c))::value == 2, "");
5141       static_assert(decltype(f(0))::value == 3, "");
5142     }
5143
5144   }
5145
5146   namespace test_uniform_initialization
5147   {
5148
5149     struct test
5150     {
5151       static const int zero {};
5152       static const int one {1};
5153     };
5154
5155     static_assert(test::zero == 0, "");
5156     static_assert(test::one == 1, "");
5157
5158   }
5159
5160   namespace test_lambdas
5161   {
5162
5163     void
5164     test1()
5165     {
5166       auto lambda1 = [](){};
5167       auto lambda2 = lambda1;
5168       lambda1();
5169       lambda2();
5170     }
5171
5172     int
5173     test2()
5174     {
5175       auto a = [](int i, int j){ return i + j; }(1, 2);
5176       auto b = []() -> int { return '0'; }();
5177       auto c = [=](){ return a + b; }();
5178       auto d = [&](){ return c; }();
5179       auto e = [a, &b](int x) mutable {
5180         const auto identity = [](int y){ return y; };
5181         for (auto i = 0; i < a; ++i)
5182           a += b--;
5183         return x + identity(a + b);
5184       }(0);
5185       return a + b + c + d + e;
5186     }
5187
5188     int
5189     test3()
5190     {
5191       const auto nullary = [](){ return 0; };
5192       const auto unary = [](int x){ return x; };
5193       using nullary_t = decltype(nullary);
5194       using unary_t = decltype(unary);
5195       const auto higher1st = [](nullary_t f){ return f(); };
5196       const auto higher2nd = [unary](nullary_t f1){
5197         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5198       };
5199       return higher1st(nullary) + higher2nd(nullary)(unary);
5200     }
5201
5202   }
5203
5204   namespace test_variadic_templates
5205   {
5206
5207     template <int...>
5208     struct sum;
5209
5210     template <int N0, int... N1toN>
5211     struct sum<N0, N1toN...>
5212     {
5213       static constexpr auto value = N0 + sum<N1toN...>::value;
5214     };
5215
5216     template <>
5217     struct sum<>
5218     {
5219       static constexpr auto value = 0;
5220     };
5221
5222     static_assert(sum<>::value == 0, "");
5223     static_assert(sum<1>::value == 1, "");
5224     static_assert(sum<23>::value == 23, "");
5225     static_assert(sum<1, 2>::value == 3, "");
5226     static_assert(sum<5, 5, 11>::value == 21, "");
5227     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5228
5229   }
5230
5231   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5232   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5233   // because of this.
5234   namespace test_template_alias_sfinae
5235   {
5236
5237     struct foo {};
5238
5239     template<typename T>
5240     using member = typename T::member_type;
5241
5242     template<typename T>
5243     void func(...) {}
5244
5245     template<typename T>
5246     void func(member<T>*) {}
5247
5248     void test();
5249
5250     void test() { func<foo>(0); }
5251
5252   }
5253
5254 }  // namespace cxx11
5255
5256 #endif  // __cplusplus >= 201103L
5257
5258
5259
5260 _ACEOF
5261 if ac_fn_cxx_try_compile "$LINENO"; then :
5262   ax_cv_cxx_compile_cxx11=yes
5263 else
5264   ax_cv_cxx_compile_cxx11=no
5265 fi
5266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5267 fi
5268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5269 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5270   if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5271     ac_success=yes
5272   fi
5273
5274     if test x$ac_success = xno; then
5275     for switch in -std=gnu++11 -std=gnu++0x; do
5276       cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5277       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5278 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5279 if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5280   $as_echo_n "(cached) " >&6
5281 else
5282   ac_save_CXX="$CXX"
5283          CXX="$CXX $switch"
5284          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5285 /* end confdefs.h.  */
5286
5287
5288 // If the compiler admits that it is not ready for C++11, why torture it?
5289 // Hopefully, this will speed up the test.
5290
5291 #ifndef __cplusplus
5292
5293 #error "This is not a C++ compiler"
5294
5295 #elif __cplusplus < 201103L
5296
5297 #error "This is not a C++11 compiler"
5298
5299 #else
5300
5301 namespace cxx11
5302 {
5303
5304   namespace test_static_assert
5305   {
5306
5307     template <typename T>
5308     struct check
5309     {
5310       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5311     };
5312
5313   }
5314
5315   namespace test_final_override
5316   {
5317
5318     struct Base
5319     {
5320       virtual void f() {}
5321     };
5322
5323     struct Derived : public Base
5324     {
5325       virtual void f() override {}
5326     };
5327
5328   }
5329
5330   namespace test_double_right_angle_brackets
5331   {
5332
5333     template < typename T >
5334     struct check {};
5335
5336     typedef check<void> single_type;
5337     typedef check<check<void>> double_type;
5338     typedef check<check<check<void>>> triple_type;
5339     typedef check<check<check<check<void>>>> quadruple_type;
5340
5341   }
5342
5343   namespace test_decltype
5344   {
5345
5346     int
5347     f()
5348     {
5349       int a = 1;
5350       decltype(a) b = 2;
5351       return a + b;
5352     }
5353
5354   }
5355
5356   namespace test_type_deduction
5357   {
5358
5359     template < typename T1, typename T2 >
5360     struct is_same
5361     {
5362       static const bool value = false;
5363     };
5364
5365     template < typename T >
5366     struct is_same<T, T>
5367     {
5368       static const bool value = true;
5369     };
5370
5371     template < typename T1, typename T2 >
5372     auto
5373     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5374     {
5375       return a1 + a2;
5376     }
5377
5378     int
5379     test(const int c, volatile int v)
5380     {
5381       static_assert(is_same<int, decltype(0)>::value == true, "");
5382       static_assert(is_same<int, decltype(c)>::value == false, "");
5383       static_assert(is_same<int, decltype(v)>::value == false, "");
5384       auto ac = c;
5385       auto av = v;
5386       auto sumi = ac + av + 'x';
5387       auto sumf = ac + av + 1.0;
5388       static_assert(is_same<int, decltype(ac)>::value == true, "");
5389       static_assert(is_same<int, decltype(av)>::value == true, "");
5390       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5391       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5392       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5393       return (sumf > 0.0) ? sumi : add(c, v);
5394     }
5395
5396   }
5397
5398   namespace test_noexcept
5399   {
5400
5401     int f() { return 0; }
5402     int g() noexcept { return 0; }
5403
5404     static_assert(noexcept(f()) == false, "");
5405     static_assert(noexcept(g()) == true, "");
5406
5407   }
5408
5409   namespace test_constexpr
5410   {
5411
5412     template < typename CharT >
5413     unsigned long constexpr
5414     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5415     {
5416       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5417     }
5418
5419     template < typename CharT >
5420     unsigned long constexpr
5421     strlen_c(const CharT *const s) noexcept
5422     {
5423       return strlen_c_r(s, 0UL);
5424     }
5425
5426     static_assert(strlen_c("") == 0UL, "");
5427     static_assert(strlen_c("1") == 1UL, "");
5428     static_assert(strlen_c("example") == 7UL, "");
5429     static_assert(strlen_c("another\0example") == 7UL, "");
5430
5431   }
5432
5433   namespace test_rvalue_references
5434   {
5435
5436     template < int N >
5437     struct answer
5438     {
5439       static constexpr int value = N;
5440     };
5441
5442     answer<1> f(int&)       { return answer<1>(); }
5443     answer<2> f(const int&) { return answer<2>(); }
5444     answer<3> f(int&&)      { return answer<3>(); }
5445
5446     void
5447     test()
5448     {
5449       int i = 0;
5450       const int c = 0;
5451       static_assert(decltype(f(i))::value == 1, "");
5452       static_assert(decltype(f(c))::value == 2, "");
5453       static_assert(decltype(f(0))::value == 3, "");
5454     }
5455
5456   }
5457
5458   namespace test_uniform_initialization
5459   {
5460
5461     struct test
5462     {
5463       static const int zero {};
5464       static const int one {1};
5465     };
5466
5467     static_assert(test::zero == 0, "");
5468     static_assert(test::one == 1, "");
5469
5470   }
5471
5472   namespace test_lambdas
5473   {
5474
5475     void
5476     test1()
5477     {
5478       auto lambda1 = [](){};
5479       auto lambda2 = lambda1;
5480       lambda1();
5481       lambda2();
5482     }
5483
5484     int
5485     test2()
5486     {
5487       auto a = [](int i, int j){ return i + j; }(1, 2);
5488       auto b = []() -> int { return '0'; }();
5489       auto c = [=](){ return a + b; }();
5490       auto d = [&](){ return c; }();
5491       auto e = [a, &b](int x) mutable {
5492         const auto identity = [](int y){ return y; };
5493         for (auto i = 0; i < a; ++i)
5494           a += b--;
5495         return x + identity(a + b);
5496       }(0);
5497       return a + b + c + d + e;
5498     }
5499
5500     int
5501     test3()
5502     {
5503       const auto nullary = [](){ return 0; };
5504       const auto unary = [](int x){ return x; };
5505       using nullary_t = decltype(nullary);
5506       using unary_t = decltype(unary);
5507       const auto higher1st = [](nullary_t f){ return f(); };
5508       const auto higher2nd = [unary](nullary_t f1){
5509         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5510       };
5511       return higher1st(nullary) + higher2nd(nullary)(unary);
5512     }
5513
5514   }
5515
5516   namespace test_variadic_templates
5517   {
5518
5519     template <int...>
5520     struct sum;
5521
5522     template <int N0, int... N1toN>
5523     struct sum<N0, N1toN...>
5524     {
5525       static constexpr auto value = N0 + sum<N1toN...>::value;
5526     };
5527
5528     template <>
5529     struct sum<>
5530     {
5531       static constexpr auto value = 0;
5532     };
5533
5534     static_assert(sum<>::value == 0, "");
5535     static_assert(sum<1>::value == 1, "");
5536     static_assert(sum<23>::value == 23, "");
5537     static_assert(sum<1, 2>::value == 3, "");
5538     static_assert(sum<5, 5, 11>::value == 21, "");
5539     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5540
5541   }
5542
5543   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5544   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5545   // because of this.
5546   namespace test_template_alias_sfinae
5547   {
5548
5549     struct foo {};
5550
5551     template<typename T>
5552     using member = typename T::member_type;
5553
5554     template<typename T>
5555     void func(...) {}
5556
5557     template<typename T>
5558     void func(member<T>*) {}
5559
5560     void test();
5561
5562     void test() { func<foo>(0); }
5563
5564   }
5565
5566 }  // namespace cxx11
5567
5568 #endif  // __cplusplus >= 201103L
5569
5570
5571
5572 _ACEOF
5573 if ac_fn_cxx_try_compile "$LINENO"; then :
5574   eval $cachevar=yes
5575 else
5576   eval $cachevar=no
5577 fi
5578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5579          CXX="$ac_save_CXX"
5580 fi
5581 eval ac_res=\$$cachevar
5582                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5583 $as_echo "$ac_res" >&6; }
5584       if eval test x\$$cachevar = xyes; then
5585         CXX_DIALECT="$switch"
5586         ac_success=yes
5587         break
5588       fi
5589     done
5590   fi
5591
5592     if test x$ac_success = xno; then
5593                 for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
5594       cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5595       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5596 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5597 if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5598   $as_echo_n "(cached) " >&6
5599 else
5600   ac_save_CXX="$CXX"
5601          CXX="$CXX $switch"
5602          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5603 /* end confdefs.h.  */
5604
5605
5606 // If the compiler admits that it is not ready for C++11, why torture it?
5607 // Hopefully, this will speed up the test.
5608
5609 #ifndef __cplusplus
5610
5611 #error "This is not a C++ compiler"
5612
5613 #elif __cplusplus < 201103L
5614
5615 #error "This is not a C++11 compiler"
5616
5617 #else
5618
5619 namespace cxx11
5620 {
5621
5622   namespace test_static_assert
5623   {
5624
5625     template <typename T>
5626     struct check
5627     {
5628       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5629     };
5630
5631   }
5632
5633   namespace test_final_override
5634   {
5635
5636     struct Base
5637     {
5638       virtual void f() {}
5639     };
5640
5641     struct Derived : public Base
5642     {
5643       virtual void f() override {}
5644     };
5645
5646   }
5647
5648   namespace test_double_right_angle_brackets
5649   {
5650
5651     template < typename T >
5652     struct check {};
5653
5654     typedef check<void> single_type;
5655     typedef check<check<void>> double_type;
5656     typedef check<check<check<void>>> triple_type;
5657     typedef check<check<check<check<void>>>> quadruple_type;
5658
5659   }
5660
5661   namespace test_decltype
5662   {
5663
5664     int
5665     f()
5666     {
5667       int a = 1;
5668       decltype(a) b = 2;
5669       return a + b;
5670     }
5671
5672   }
5673
5674   namespace test_type_deduction
5675   {
5676
5677     template < typename T1, typename T2 >
5678     struct is_same
5679     {
5680       static const bool value = false;
5681     };
5682
5683     template < typename T >
5684     struct is_same<T, T>
5685     {
5686       static const bool value = true;
5687     };
5688
5689     template < typename T1, typename T2 >
5690     auto
5691     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5692     {
5693       return a1 + a2;
5694     }
5695
5696     int
5697     test(const int c, volatile int v)
5698     {
5699       static_assert(is_same<int, decltype(0)>::value == true, "");
5700       static_assert(is_same<int, decltype(c)>::value == false, "");
5701       static_assert(is_same<int, decltype(v)>::value == false, "");
5702       auto ac = c;
5703       auto av = v;
5704       auto sumi = ac + av + 'x';
5705       auto sumf = ac + av + 1.0;
5706       static_assert(is_same<int, decltype(ac)>::value == true, "");
5707       static_assert(is_same<int, decltype(av)>::value == true, "");
5708       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5709       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5710       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5711       return (sumf > 0.0) ? sumi : add(c, v);
5712     }
5713
5714   }
5715
5716   namespace test_noexcept
5717   {
5718
5719     int f() { return 0; }
5720     int g() noexcept { return 0; }
5721
5722     static_assert(noexcept(f()) == false, "");
5723     static_assert(noexcept(g()) == true, "");
5724
5725   }
5726
5727   namespace test_constexpr
5728   {
5729
5730     template < typename CharT >
5731     unsigned long constexpr
5732     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5733     {
5734       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5735     }
5736
5737     template < typename CharT >
5738     unsigned long constexpr
5739     strlen_c(const CharT *const s) noexcept
5740     {
5741       return strlen_c_r(s, 0UL);
5742     }
5743
5744     static_assert(strlen_c("") == 0UL, "");
5745     static_assert(strlen_c("1") == 1UL, "");
5746     static_assert(strlen_c("example") == 7UL, "");
5747     static_assert(strlen_c("another\0example") == 7UL, "");
5748
5749   }
5750
5751   namespace test_rvalue_references
5752   {
5753
5754     template < int N >
5755     struct answer
5756     {
5757       static constexpr int value = N;
5758     };
5759
5760     answer<1> f(int&)       { return answer<1>(); }
5761     answer<2> f(const int&) { return answer<2>(); }
5762     answer<3> f(int&&)      { return answer<3>(); }
5763
5764     void
5765     test()
5766     {
5767       int i = 0;
5768       const int c = 0;
5769       static_assert(decltype(f(i))::value == 1, "");
5770       static_assert(decltype(f(c))::value == 2, "");
5771       static_assert(decltype(f(0))::value == 3, "");
5772     }
5773
5774   }
5775
5776   namespace test_uniform_initialization
5777   {
5778
5779     struct test
5780     {
5781       static const int zero {};
5782       static const int one {1};
5783     };
5784
5785     static_assert(test::zero == 0, "");
5786     static_assert(test::one == 1, "");
5787
5788   }
5789
5790   namespace test_lambdas
5791   {
5792
5793     void
5794     test1()
5795     {
5796       auto lambda1 = [](){};
5797       auto lambda2 = lambda1;
5798       lambda1();
5799       lambda2();
5800     }
5801
5802     int
5803     test2()
5804     {
5805       auto a = [](int i, int j){ return i + j; }(1, 2);
5806       auto b = []() -> int { return '0'; }();
5807       auto c = [=](){ return a + b; }();
5808       auto d = [&](){ return c; }();
5809       auto e = [a, &b](int x) mutable {
5810         const auto identity = [](int y){ return y; };
5811         for (auto i = 0; i < a; ++i)
5812           a += b--;
5813         return x + identity(a + b);
5814       }(0);
5815       return a + b + c + d + e;
5816     }
5817
5818     int
5819     test3()
5820     {
5821       const auto nullary = [](){ return 0; };
5822       const auto unary = [](int x){ return x; };
5823       using nullary_t = decltype(nullary);
5824       using unary_t = decltype(unary);
5825       const auto higher1st = [](nullary_t f){ return f(); };
5826       const auto higher2nd = [unary](nullary_t f1){
5827         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5828       };
5829       return higher1st(nullary) + higher2nd(nullary)(unary);
5830     }
5831
5832   }
5833
5834   namespace test_variadic_templates
5835   {
5836
5837     template <int...>
5838     struct sum;
5839
5840     template <int N0, int... N1toN>
5841     struct sum<N0, N1toN...>
5842     {
5843       static constexpr auto value = N0 + sum<N1toN...>::value;
5844     };
5845
5846     template <>
5847     struct sum<>
5848     {
5849       static constexpr auto value = 0;
5850     };
5851
5852     static_assert(sum<>::value == 0, "");
5853     static_assert(sum<1>::value == 1, "");
5854     static_assert(sum<23>::value == 23, "");
5855     static_assert(sum<1, 2>::value == 3, "");
5856     static_assert(sum<5, 5, 11>::value == 21, "");
5857     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5858
5859   }
5860
5861   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5862   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5863   // because of this.
5864   namespace test_template_alias_sfinae
5865   {
5866
5867     struct foo {};
5868
5869     template<typename T>
5870     using member = typename T::member_type;
5871
5872     template<typename T>
5873     void func(...) {}
5874
5875     template<typename T>
5876     void func(member<T>*) {}
5877
5878     void test();
5879
5880     void test() { func<foo>(0); }
5881
5882   }
5883
5884 }  // namespace cxx11
5885
5886 #endif  // __cplusplus >= 201103L
5887
5888
5889
5890 _ACEOF
5891 if ac_fn_cxx_try_compile "$LINENO"; then :
5892   eval $cachevar=yes
5893 else
5894   eval $cachevar=no
5895 fi
5896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5897          CXX="$ac_save_CXX"
5898 fi
5899 eval ac_res=\$$cachevar
5900                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5901 $as_echo "$ac_res" >&6; }
5902       if eval test x\$$cachevar = xyes; then
5903         CXX_DIALECT="$switch"
5904         ac_success=yes
5905         break
5906       fi
5907     done
5908   fi
5909   ac_ext=c
5910 ac_cpp='$CPP $CPPFLAGS'
5911 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5912 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5913 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5914
5915   if test x$ax_cxx_compile_cxx11_required = xtrue; then
5916     if test x$ac_success = xno; then
5917       as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5918     fi
5919   fi
5920   if test x$ac_success = xno; then
5921     HAVE_CXX11=0
5922     { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5923 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5924   else
5925     HAVE_CXX11=1
5926
5927 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
5928
5929   fi
5930
5931
5932
5933
5934 # Dependency checking.
5935 rm -rf .tst 2>/dev/null
5936 mkdir .tst 2>/dev/null
5937 if test -d .tst; then
5938   am__leading_dot=.
5939 else
5940   am__leading_dot=_
5941 fi
5942 rmdir .tst 2>/dev/null
5943
5944 DEPDIR="${am__leading_dot}deps"
5945
5946 ac_config_commands="$ac_config_commands depdir"
5947
5948
5949 depcc="$CC"   am_compiler_list=
5950
5951 am_depcomp=$ac_aux_dir/depcomp
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5953 $as_echo_n "checking dependency style of $depcc... " >&6; }
5954 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5955   $as_echo_n "(cached) " >&6
5956 else
5957   if test -f "$am_depcomp"; then
5958   # We make a subdir and do the tests there.  Otherwise we can end up
5959   # making bogus files that we don't know about and never remove.  For
5960   # instance it was reported that on HP-UX the gcc test will end up
5961   # making a dummy file named `D' -- because `-MD' means `put the output
5962   # in D'.
5963   mkdir conftest.dir
5964   # Copy depcomp to subdir because otherwise we won't find it if we're
5965   # using a relative directory.
5966   cp "$am_depcomp" conftest.dir
5967   cd conftest.dir
5968   # We will build objects and dependencies in a subdirectory because
5969   # it helps to detect inapplicable dependency modes.  For instance
5970   # both Tru64's cc and ICC support -MD to output dependencies as a
5971   # side effect of compilation, but ICC will put the dependencies in
5972   # the current directory while Tru64 will put them in the object
5973   # directory.
5974   mkdir sub
5975
5976   am_cv_CC_dependencies_compiler_type=none
5977   if test "$am_compiler_list" = ""; then
5978      am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5979   fi
5980   for depmode in $am_compiler_list; do
5981     if test $depmode = none; then break; fi
5982
5983     $as_echo "$as_me:$LINENO: trying $depmode" >&5
5984     # Setup a source with many dependencies, because some compilers
5985     # like to wrap large dependency lists on column 80 (with \), and
5986     # we should not choose a depcomp mode which is confused by this.
5987     #
5988     # We need to recreate these files for each test, as the compiler may
5989     # overwrite some of them when testing with obscure command lines.
5990     # This happens at least with the AIX C compiler.
5991     : > sub/conftest.c
5992     for i in 1 2 3 4 5 6; do
5993       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5994       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5995       # Solaris 8's {/usr,}/bin/sh.
5996       touch sub/conftst$i.h
5997     done
5998     echo "include sub/conftest.Po" > confmf
5999
6000     # We check with `-c' and `-o' for the sake of the "dashmstdout"
6001     # mode.  It turns out that the SunPro C++ compiler does not properly
6002     # handle `-M -o', and we need to detect this.
6003     depcmd="depmode=$depmode \
6004        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6005        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6006        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6007     echo "| $depcmd" | sed -e 's/  */ /g' >&5
6008     if env $depcmd > conftest.err 2>&1 &&
6009        grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6010        grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6011        ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6012       # icc doesn't choke on unknown options, it will just issue warnings
6013       # or remarks (even with -Werror).  So we grep stderr for any message
6014       # that says an option was ignored or not supported.
6015       # When given -MP, icc 7.0 and 7.1 complain thusly:
6016       #   icc: Command line warning: ignoring option '-M'; no argument required
6017       # The diagnosis changed in icc 8.0:
6018       #   icc: Command line remark: option '-MP' not supported
6019       if (grep 'ignoring option' conftest.err ||
6020           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6021         am_cv_CC_dependencies_compiler_type=$depmode
6022         $as_echo "$as_me:$LINENO: success" >&5
6023         break
6024       fi
6025     fi
6026     $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6027     sed -e 's/^/| /' < conftest.err >&5
6028   done
6029
6030   cd ..
6031   rm -rf conftest.dir
6032 else
6033   am_cv_CC_dependencies_compiler_type=none
6034 fi
6035
6036 fi
6037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6038 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6039 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6040 then as_fn_error "no usable dependency style found" "$LINENO" 5
6041 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6042
6043 fi
6044
6045
6046 # Check for the 'make' the user wants to use.
6047 for ac_prog in make
6048 do
6049   # Extract the first word of "$ac_prog", so it can be a program name with args.
6050 set dummy $ac_prog; ac_word=$2
6051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6052 $as_echo_n "checking for $ac_word... " >&6; }
6053 if test "${ac_cv_prog_MAKE+set}" = set; then :
6054   $as_echo_n "(cached) " >&6
6055 else
6056   if test -n "$MAKE"; then
6057   ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
6058 else
6059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6060 for as_dir in $PATH
6061 do
6062   IFS=$as_save_IFS
6063   test -z "$as_dir" && as_dir=.
6064     for ac_exec_ext in '' $ac_executable_extensions; do
6065   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6066     ac_cv_prog_MAKE="$ac_prog"
6067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6068     break 2
6069   fi
6070 done
6071   done
6072 IFS=$as_save_IFS
6073
6074 fi
6075 fi
6076 MAKE=$ac_cv_prog_MAKE
6077 if test -n "$MAKE"; then
6078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
6079 $as_echo "$MAKE" >&6; }
6080 else
6081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082 $as_echo "no" >&6; }
6083 fi
6084
6085
6086   test -n "$MAKE" && break
6087 done
6088
6089 MAKE_IS_GNU=
6090 case "`$MAKE --version 2>&1 | sed 1q`" in
6091   *GNU*)
6092     MAKE_IS_GNU=yes
6093     ;;
6094 esac
6095  if test "$MAKE_IS_GNU" = yes; then
6096   GMAKE_TRUE=
6097   GMAKE_FALSE='#'
6098 else
6099   GMAKE_TRUE='#'
6100   GMAKE_FALSE=
6101 fi
6102
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6104 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6105 set x ${MAKE-make}
6106 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6107 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
6108   $as_echo_n "(cached) " >&6
6109 else
6110   cat >conftest.make <<\_ACEOF
6111 SHELL = /bin/sh
6112 all:
6113         @echo '@@@%%%=$(MAKE)=@@@%%%'
6114 _ACEOF
6115 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6116 case `${MAKE-make} -f conftest.make 2>/dev/null` in
6117   *@@@%%%=?*=@@@%%%*)
6118     eval ac_cv_prog_make_${ac_make}_set=yes;;
6119   *)
6120     eval ac_cv_prog_make_${ac_make}_set=no;;
6121 esac
6122 rm -f conftest.make
6123 fi
6124 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
6125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6126 $as_echo "yes" >&6; }
6127   SET_MAKE=
6128 else
6129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6130 $as_echo "no" >&6; }
6131   SET_MAKE="MAKE=${MAKE-make}"
6132 fi
6133
6134
6135 gnulib_extra_configure_args=
6136 # If large-file support is disabled, make sure gnulib does the same.
6137 if test "$enable_largefile" = no; then
6138 gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6139 fi
6140
6141 # Configure gnulib.  We need to build gnulib under some other
6142 # directory not "gnulib", to avoid the problem of both GDB and
6143 # GDBserver wanting to build it in the same directory, when building
6144 # in the source dir.
6145
6146   in_src="gnulib"
6147   in_build="build-gnulib"
6148   in_extra_args="$gnulib_extra_configure_args"
6149
6150   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6151   # so they do not pile up.
6152   ac_sub_configure_args=
6153   ac_prev=
6154   eval "set x $ac_configure_args"
6155   shift
6156   for ac_arg
6157   do
6158     if test -n "$ac_prev"; then
6159       ac_prev=
6160       continue
6161     fi
6162     case $ac_arg in
6163     -cache-file | --cache-file | --cache-fil | --cache-fi \
6164     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6165       ac_prev=cache_file ;;
6166     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6167     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6168     | --c=*)
6169       ;;
6170     --config-cache | -C)
6171       ;;
6172     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6173       ac_prev=srcdir ;;
6174     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6175       ;;
6176     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6177       ac_prev=prefix ;;
6178     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6179       ;;
6180     --disable-option-checking)
6181       ;;
6182     *)
6183       case $ac_arg in
6184       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6185       esac
6186       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6187     esac
6188   done
6189
6190   # Always prepend --prefix to ensure using the same prefix
6191   # in subdir configurations.
6192   ac_arg="--prefix=$prefix"
6193   case $ac_arg in
6194   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6195   esac
6196   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6197
6198   # Pass --silent
6199   if test "$silent" = yes; then
6200     ac_sub_configure_args="--silent $ac_sub_configure_args"
6201   fi
6202
6203   # Always prepend --disable-option-checking to silence warnings, since
6204   # different subdirs can have different --enable and --with options.
6205   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6206
6207   ac_popdir=`pwd`
6208   ac_dir=$in_build
6209
6210   ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6211   $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6212   $as_echo "$ac_msg" >&6
6213   as_dir="$ac_dir"; as_fn_mkdir_p
6214
6215   case $srcdir in
6216   [\\/]* | ?:[\\/]* )
6217     ac_srcdir=$srcdir/$in_src ;;
6218   *) # Relative name.
6219     ac_srcdir=../$srcdir/$in_src ;;
6220   esac
6221
6222   cd "$ac_dir"
6223
6224   ac_sub_configure=$ac_srcdir/configure
6225
6226   # Make the cache file name correct relative to the subdirectory.
6227   case $cache_file in
6228   [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6229   *) # Relative name.
6230     ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6231   esac
6232
6233   if test -n "$in_extra_args"; then
6234     # Add the extra args at the end.
6235     ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6236   fi
6237
6238   { $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
6239 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6240   # The eval makes quoting arguments work.
6241   eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6242        --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6243     as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6244
6245   cd "$ac_popdir"
6246
6247
6248
6249 CONFIG_OBS=
6250 CONFIG_DEPS=
6251 CONFIG_SRCS=
6252 ENABLE_CFLAGS=
6253
6254 CONFIG_ALL=
6255 CONFIG_CLEAN=
6256 CONFIG_INSTALL=
6257 CONFIG_UNINSTALL=
6258
6259 # If we haven't got the data from the intl directory,
6260 # assume NLS is disabled.
6261 USE_NLS=no
6262 LIBINTL=
6263 LIBINTL_DEP=
6264 INCINTL=
6265 XGETTEXT=
6266 GMSGFMT=
6267 POSUB=
6268
6269 if test -f  ../intl/config.intl; then
6270   .  ../intl/config.intl
6271 fi
6272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6273 $as_echo_n "checking whether NLS is requested... " >&6; }
6274 if test x"$USE_NLS" != xyes; then
6275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6276 $as_echo "no" >&6; }
6277 else
6278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6279 $as_echo "yes" >&6; }
6280
6281 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6282
6283
6284   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6285 $as_echo_n "checking for catalogs to be installed... " >&6; }
6286   # Look for .po and .gmo files in the source directory.
6287   CATALOGS=
6288   XLINGUAS=
6289   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6290     # If there aren't any .gmo files the shell will give us the
6291     # literal string "../path/to/srcdir/po/*.gmo" which has to be
6292     # weeded out.
6293     case "$cat" in *\**)
6294       continue;;
6295     esac
6296     # The quadruple backslash is collapsed to a double backslash
6297     # by the backticks, then collapsed again by the double quotes,
6298     # leaving us with one backslash in the sed expression (right
6299     # before the dot that mustn't act as a wildcard).
6300     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6301     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6302     # The user is allowed to set LINGUAS to a list of languages to
6303     # install catalogs for.  If it's empty that means "all of them."
6304     if test "x$LINGUAS" = x; then
6305       CATALOGS="$CATALOGS $cat"
6306       XLINGUAS="$XLINGUAS $lang"
6307     else
6308       case "$LINGUAS" in *$lang*)
6309         CATALOGS="$CATALOGS $cat"
6310         XLINGUAS="$XLINGUAS $lang"
6311         ;;
6312       esac
6313     fi
6314   done
6315   LINGUAS="$XLINGUAS"
6316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6317 $as_echo "$LINGUAS" >&6; }
6318
6319
6320     DATADIRNAME=share
6321
6322   INSTOBJEXT=.mo
6323
6324   GENCAT=gencat
6325
6326   CATOBJEXT=.gmo
6327
6328 fi
6329
6330 localedir='${datadir}/locale'
6331
6332
6333 if test x"$USE_NLS" = xyes; then
6334    CONFIG_ALL="$CONFIG_ALL all-po"
6335    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6336    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6337    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6338 fi
6339
6340 GNULIB=build-gnulib/import
6341
6342 # For Makefile dependencies.
6343 GNULIB_STDINT_H=
6344 if test x"$STDINT_H" != x; then
6345   GNULIB_STDINT_H=$GNULIB/$STDINT_H
6346 fi
6347
6348
6349 PACKAGE=gdb
6350
6351 cat >>confdefs.h <<_ACEOF
6352 #define PACKAGE "$PACKAGE"
6353 _ACEOF
6354
6355
6356
6357 # We never need to detect it in this sub-configure.
6358 # But preserve it for config.status --recheck.
6359
6360
6361
6362 MAKEINFO_EXTRA_FLAGS=""
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6364 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6365 if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
6366   $as_echo_n "(cached) " >&6
6367 else
6368   echo '@clicksequence{a @click{} b}' >conftest.texinfo
6369   if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6370     gdb_cv_have_makeinfo_click=yes
6371   else
6372     gdb_cv_have_makeinfo_click=no
6373   fi
6374 fi
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6376 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6377 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6378   MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6379 fi
6380
6381
6382
6383
6384 # Check whether --with-separate-debug-dir was given.
6385 if test "${with_separate_debug_dir+set}" = set; then :
6386   withval=$with_separate_debug_dir;
6387     DEBUGDIR=$withval
6388 else
6389   DEBUGDIR=${libdir}/debug
6390 fi
6391
6392
6393   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6394   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6395   ac_define_dir=`eval echo $DEBUGDIR`
6396   ac_define_dir=`eval echo $ac_define_dir`
6397
6398 cat >>confdefs.h <<_ACEOF
6399 #define DEBUGDIR "$ac_define_dir"
6400 _ACEOF
6401
6402
6403
6404
6405   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6406      if test "x$prefix" = xNONE; then
6407         test_prefix=/usr/local
6408      else
6409         test_prefix=$prefix
6410      fi
6411   else
6412      test_prefix=$exec_prefix
6413   fi
6414   value=0
6415   case ${ac_define_dir} in
6416      "${test_prefix}"|"${test_prefix}/"*|\
6417         '${exec_prefix}'|'${exec_prefix}/'*)
6418      value=1
6419      ;;
6420   esac
6421
6422 cat >>confdefs.h <<_ACEOF
6423 #define DEBUGDIR_RELOCATABLE $value
6424 _ACEOF
6425
6426
6427
6428
6429 # We can't pass paths as command line arguments.
6430 # Mingw32 tries to be clever and will convert the paths for us.
6431 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6432 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6433 # This breaks GDB's relocatable path conversions since paths passed in
6434 # config.h would not get so translated, the path prefixes no longer match.
6435
6436   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6437   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6438   ac_define_dir=`eval echo $bindir`
6439   ac_define_dir=`eval echo $ac_define_dir`
6440
6441 cat >>confdefs.h <<_ACEOF
6442 #define BINDIR "$ac_define_dir"
6443 _ACEOF
6444
6445
6446
6447 # GDB's datadir relocation
6448
6449
6450
6451 # Check whether --with-gdb-datadir was given.
6452 if test "${with_gdb_datadir+set}" = set; then :
6453   withval=$with_gdb_datadir;
6454     GDB_DATADIR=$withval
6455 else
6456   GDB_DATADIR=${datadir}/gdb
6457 fi
6458
6459
6460   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6461   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6462   ac_define_dir=`eval echo $GDB_DATADIR`
6463   ac_define_dir=`eval echo $ac_define_dir`
6464
6465 cat >>confdefs.h <<_ACEOF
6466 #define GDB_DATADIR "$ac_define_dir"
6467 _ACEOF
6468
6469
6470
6471
6472   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6473      if test "x$prefix" = xNONE; then
6474         test_prefix=/usr/local
6475      else
6476         test_prefix=$prefix
6477      fi
6478   else
6479      test_prefix=$exec_prefix
6480   fi
6481   value=0
6482   case ${ac_define_dir} in
6483      "${test_prefix}"|"${test_prefix}/"*|\
6484         '${exec_prefix}'|'${exec_prefix}/'*)
6485      value=1
6486      ;;
6487   esac
6488
6489 cat >>confdefs.h <<_ACEOF
6490 #define GDB_DATADIR_RELOCATABLE $value
6491 _ACEOF
6492
6493
6494
6495
6496
6497 # Check whether --with-relocated-sources was given.
6498 if test "${with_relocated_sources+set}" = set; then :
6499   withval=$with_relocated_sources; reloc_srcdir="${withval}"
6500
6501   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6502   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6503   ac_define_dir=`eval echo $reloc_srcdir`
6504   ac_define_dir=`eval echo $ac_define_dir`
6505
6506 cat >>confdefs.h <<_ACEOF
6507 #define RELOC_SRCDIR "$ac_define_dir"
6508 _ACEOF
6509
6510
6511
6512 fi
6513
6514
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6516 $as_echo_n "checking for default auto-load directory... " >&6; }
6517
6518 # Check whether --with-auto-load-dir was given.
6519 if test "${with_auto_load_dir+set}" = set; then :
6520   withval=$with_auto_load_dir;
6521 else
6522   with_auto_load_dir='$debugdir:$datadir/auto-load'
6523 fi
6524
6525 escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6526
6527   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6528   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6529   ac_define_dir=`eval echo $escape_dir`
6530   ac_define_dir=`eval echo $ac_define_dir`
6531
6532 cat >>confdefs.h <<_ACEOF
6533 #define AUTO_LOAD_DIR "$ac_define_dir"
6534 _ACEOF
6535
6536
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6538 $as_echo "$with_auto_load_dir" >&6; }
6539
6540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6541 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6542
6543 # Check whether --with-auto-load-safe-path was given.
6544 if test "${with_auto_load_safe_path+set}" = set; then :
6545   withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6546      with_auto_load_safe_path="/"
6547      fi
6548 else
6549   with_auto_load_safe_path="$with_auto_load_dir"
6550 fi
6551
6552 escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6553
6554   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6555   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6556   ac_define_dir=`eval echo $escape_dir`
6557   ac_define_dir=`eval echo $ac_define_dir`
6558
6559 cat >>confdefs.h <<_ACEOF
6560 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6561 _ACEOF
6562
6563
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6565 $as_echo "$with_auto_load_safe_path" >&6; }
6566
6567
6568
6569 subdirs="$subdirs testsuite"
6570
6571
6572 # Check whether to support alternative target configurations
6573 # Check whether --enable-targets was given.
6574 if test "${enable_targets+set}" = set; then :
6575   enableval=$enable_targets; case "${enableval}" in
6576   yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
6577             ;;
6578   no)       enable_targets= ;;
6579   *)        enable_targets=$enableval ;;
6580 esac
6581 fi
6582
6583
6584 # Check whether to enable 64-bit support on 32-bit hosts
6585 # Check whether --enable-64-bit-bfd was given.
6586 if test "${enable_64_bit_bfd+set}" = set; then :
6587   enableval=$enable_64_bit_bfd; case "${enableval}" in
6588   yes)  want64=true  ;;
6589   no)   want64=false ;;
6590   *)    as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6591 esac
6592 else
6593   want64=false
6594 fi
6595
6596 # Provide defaults for some variables set by the per-host and per-target
6597 # configuration.
6598 gdb_host_obs=posix-hdep.o
6599
6600 if test "${target}" = "${host}"; then
6601   gdb_native=yes
6602 else
6603   gdb_native=no
6604 fi
6605
6606 . $srcdir/configure.host
6607
6608 # Add in the common host objects.
6609 . $srcdir/common/common.host
6610 gdb_host_obs="$gdb_host_obs $common_host_obs"
6611
6612 # Accumulate some settings from configure.tgt over all enabled targets
6613
6614 TARGET_OBS=
6615 all_targets=
6616 HAVE_NATIVE_GCORE_TARGET=
6617
6618 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6619 do
6620   if test "$targ_alias" = "all"; then
6621     all_targets=true
6622   else
6623     # Canonicalize the secondary target names.
6624     result=`$ac_config_sub $targ_alias 2>/dev/null`
6625     if test -n "$result"; then
6626         targ=$result
6627     else
6628         targ=$targ_alias
6629     fi
6630
6631     . ${srcdir}/configure.tgt
6632
6633     if test -z "${gdb_target_obs}"; then :
6634   as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
6635 fi
6636
6637     # Target-specific object files
6638     for i in ${gdb_target_obs}; do
6639         case " $TARGET_OBS " in
6640         *" ${i} "*) ;;
6641         *)
6642           TARGET_OBS="$TARGET_OBS ${i}"
6643           ;;
6644         esac
6645     done
6646
6647     # Check whether this target needs 64-bit CORE_ADDR
6648     if test x${want64} = xfalse; then
6649       . ${srcdir}/../bfd/config.bfd
6650     fi
6651
6652     # Check whether this target is native and supports gcore.
6653     if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6654        && $gdb_have_gcore; then
6655       HAVE_NATIVE_GCORE_TARGET=1
6656     fi
6657   fi
6658 done
6659
6660 if test x${all_targets} = xtrue; then
6661
6662   # We want all 64-bit targets if we either:
6663   #  - run on a 64-bit host  or
6664   #  - already require 64-bit support for some other target  or
6665   #  - the --enable-64-bit-bfd option was supplied
6666   # Otherwise we only support all 32-bit targets.
6667   #
6668   # NOTE: This test must be in sync with the corresponding
6669   #       tests in BFD!
6670
6671   if test x${want64} = xfalse; then
6672     # The cast to long int works around a bug in the HP C Compiler
6673 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6674 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6675 # This bug is HP SR number 8606223364.
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6677 $as_echo_n "checking size of long... " >&6; }
6678 if test "${ac_cv_sizeof_long+set}" = set; then :
6679   $as_echo_n "(cached) " >&6
6680 else
6681   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
6682
6683 else
6684   if test "$ac_cv_type_long" = yes; then
6685      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6686 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6687 { as_fn_set_status 77
6688 as_fn_error "cannot compute sizeof (long)
6689 See \`config.log' for more details." "$LINENO" 5; }; }
6690    else
6691      ac_cv_sizeof_long=0
6692    fi
6693 fi
6694
6695 fi
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6697 $as_echo "$ac_cv_sizeof_long" >&6; }
6698
6699
6700
6701 cat >>confdefs.h <<_ACEOF
6702 #define SIZEOF_LONG $ac_cv_sizeof_long
6703 _ACEOF
6704
6705
6706     if test "x${ac_cv_sizeof_long}" = "x8"; then
6707       want64=true
6708     fi
6709   fi
6710   if test x${want64} = xtrue; then
6711     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6712   else
6713     TARGET_OBS='$(ALL_TARGET_OBS)'
6714   fi
6715 fi
6716
6717
6718
6719
6720 # For other settings, only the main target counts.
6721 gdb_sim=
6722 gdb_osabi=
6723 build_gdbserver=
6724 targ=$target; . ${srcdir}/configure.tgt
6725
6726 # Fetch the default architecture and default target vector from BFD.
6727 targ=$target; . $srcdir/../bfd/config.bfd
6728
6729 # We only want the first architecture, so strip off the others if
6730 # there is more than one.
6731 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6732
6733 if test "x$targ_archs" != x; then
6734
6735 cat >>confdefs.h <<_ACEOF
6736 #define DEFAULT_BFD_ARCH $targ_archs
6737 _ACEOF
6738
6739 fi
6740 if test "x$targ_defvec" != x; then
6741
6742 cat >>confdefs.h <<_ACEOF
6743 #define DEFAULT_BFD_VEC $targ_defvec
6744 _ACEOF
6745
6746 fi
6747
6748 # The CLI cannot be disabled yet, but may be in the future.
6749
6750 # Enable CLI.
6751 # Check whether --enable-gdbcli was given.
6752 if test "${enable_gdbcli+set}" = set; then :
6753   enableval=$enable_gdbcli; case $enableval in
6754     yes)
6755       ;;
6756     no)
6757       as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
6758     *)
6759       as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
6760   esac
6761 else
6762   enable_gdbcli=yes
6763 fi
6764
6765 if test x"$enable_gdbcli" = xyes; then
6766   if test -d $srcdir/cli; then
6767     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6768     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6769     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6770     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6771   fi
6772 fi
6773
6774 # Enable MI.
6775 # Check whether --enable-gdbmi was given.
6776 if test "${enable_gdbmi+set}" = set; then :
6777   enableval=$enable_gdbmi; case $enableval in
6778     yes | no)
6779       ;;
6780     *)
6781       as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6782   esac
6783 else
6784   enable_gdbmi=yes
6785 fi
6786
6787 if test x"$enable_gdbmi" = xyes; then
6788   if test -d $srcdir/mi; then
6789     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6790     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6791     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6792     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6793   fi
6794 fi
6795
6796 # Enable TUI.
6797 # Check whether --enable-tui was given.
6798 if test "${enable_tui+set}" = set; then :
6799   enableval=$enable_tui; case $enableval in
6800     yes | no | auto)
6801       ;;
6802     *)
6803       as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6804   esac
6805 else
6806   enable_tui=auto
6807 fi
6808
6809
6810 # Enable gdbtk.
6811 # Check whether --enable-gdbtk was given.
6812 if test "${enable_gdbtk+set}" = set; then :
6813   enableval=$enable_gdbtk; case $enableval in
6814     yes | no)
6815       ;;
6816     *)
6817       as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6818   esac
6819 else
6820   if test -d $srcdir/gdbtk; then
6821     enable_gdbtk=yes
6822   else
6823     enable_gdbtk=no
6824   fi
6825 fi
6826
6827 # We unconditionally disable gdbtk tests on selected platforms.
6828 case $host_os in
6829   go32* | windows*)
6830     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6831 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6832     enable_gdbtk=no ;;
6833 esac
6834
6835 # Libunwind support for ia64.
6836
6837
6838 # Check whether --with-libunwind-ia64 was given.
6839 if test "${with_libunwind_ia64+set}" = set; then :
6840   withval=$with_libunwind_ia64;
6841 else
6842   with_libunwind_ia64=auto
6843 fi
6844
6845
6846 # Backward compatibility option.
6847 if test "${with_libunwind+set}" = set; then
6848   if test x"$with_libunwind_ia64" != xauto; then
6849     as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6850   fi
6851   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6852 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6853   with_libunwind_ia64="$with_libunwind"
6854 fi
6855
6856 case "$with_libunwind_ia64" in
6857   yes | no)
6858     ;;
6859   auto)
6860     for ac_header in libunwind-ia64.h
6861 do :
6862   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6863 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
6864   cat >>confdefs.h <<_ACEOF
6865 #define HAVE_LIBUNWIND_IA64_H 1
6866 _ACEOF
6867
6868 fi
6869
6870 done
6871
6872     with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6873     ;;
6874   *)
6875     as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6876     ;;
6877 esac
6878
6879 if test x"$with_libunwind_ia64" = xyes; then
6880   for ac_header in libunwind-ia64.h
6881 do :
6882   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6883 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
6884   cat >>confdefs.h <<_ACEOF
6885 #define HAVE_LIBUNWIND_IA64_H 1
6886 _ACEOF
6887
6888 fi
6889
6890 done
6891
6892   if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6893     as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6894   fi
6895   CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6896   CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6897   CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6898 fi
6899
6900 opt_curses=no
6901
6902 # Check whether --with-curses was given.
6903 if test "${with_curses+set}" = set; then :
6904   withval=$with_curses; opt_curses=$withval
6905 fi
6906
6907
6908 prefer_curses=no
6909 if test "$opt_curses" = "yes"; then
6910   prefer_curses=yes
6911 fi
6912
6913 # Profiling support.
6914 # Check whether --enable-profiling was given.
6915 if test "${enable_profiling+set}" = set; then :
6916   enableval=$enable_profiling; case $enableval in
6917     yes | no)
6918       ;;
6919     *)
6920       as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6921   esac
6922 else
6923   enable_profiling=no
6924 fi
6925
6926
6927 for ac_func in monstartup _mcleanup
6928 do :
6929   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6930 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6931 eval as_val=\$$as_ac_var
6932    if test "x$as_val" = x""yes; then :
6933   cat >>confdefs.h <<_ACEOF
6934 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6935 _ACEOF
6936
6937 fi
6938 done
6939
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6941 $as_echo_n "checking for _etext... " >&6; }
6942 if test "${ac_cv_var__etext+set}" = set; then :
6943   $as_echo_n "(cached) " >&6
6944 else
6945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6946 /* end confdefs.h.  */
6947 #include <stdlib.h>
6948 extern char _etext;
6949
6950 int
6951 main ()
6952 {
6953 free (&_etext);
6954   ;
6955   return 0;
6956 }
6957 _ACEOF
6958 if ac_fn_c_try_link "$LINENO"; then :
6959   ac_cv_var__etext=yes
6960 else
6961   ac_cv_var__etext=no
6962 fi
6963 rm -f core conftest.err conftest.$ac_objext \
6964     conftest$ac_exeext conftest.$ac_ext
6965 fi
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6967 $as_echo "$ac_cv_var__etext" >&6; }
6968 if test $ac_cv_var__etext = yes; then
6969
6970 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
6971
6972 fi
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6974 $as_echo_n "checking for etext... " >&6; }
6975 if test "${ac_cv_var_etext+set}" = set; then :
6976   $as_echo_n "(cached) " >&6
6977 else
6978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6979 /* end confdefs.h.  */
6980 #include <stdlib.h>
6981 extern char etext;
6982
6983 int
6984 main ()
6985 {
6986 free (&etext);
6987   ;
6988   return 0;
6989 }
6990 _ACEOF
6991 if ac_fn_c_try_link "$LINENO"; then :
6992   ac_cv_var_etext=yes
6993 else
6994   ac_cv_var_etext=no
6995 fi
6996 rm -f core conftest.err conftest.$ac_objext \
6997     conftest$ac_exeext conftest.$ac_ext
6998 fi
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7000 $as_echo "$ac_cv_var_etext" >&6; }
7001 if test $ac_cv_var_etext = yes; then
7002
7003 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7004
7005 fi
7006 if test "$enable_profiling" = yes ; then
7007   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
7008     as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7009   fi
7010   PROFILE_CFLAGS=-pg
7011   OLD_CFLAGS="$CFLAGS"
7012   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7013
7014   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7015 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7016 if test "${ac_cv_cc_supports_pg+set}" = set; then :
7017   $as_echo_n "(cached) " >&6
7018 else
7019   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7020 /* end confdefs.h.  */
7021
7022 int
7023 main ()
7024 {
7025 int x;
7026   ;
7027   return 0;
7028 }
7029 _ACEOF
7030 if ac_fn_c_try_compile "$LINENO"; then :
7031   ac_cv_cc_supports_pg=yes
7032 else
7033   ac_cv_cc_supports_pg=no
7034 fi
7035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7036 fi
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7038 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7039
7040   if test $ac_cv_cc_supports_pg = no; then
7041     as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7042   fi
7043
7044   CFLAGS="$OLD_CFLAGS"
7045 fi
7046
7047
7048
7049 # Check whether --with-pkgversion was given.
7050 if test "${with_pkgversion+set}" = set; then :
7051   withval=$with_pkgversion; case "$withval" in
7052       yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
7053       no)  PKGVERSION= ;;
7054       *)   PKGVERSION="($withval) " ;;
7055      esac
7056 else
7057   PKGVERSION="(GDB) "
7058
7059 fi
7060
7061
7062
7063
7064
7065 # Check whether --with-bugurl was given.
7066 if test "${with_bugurl+set}" = set; then :
7067   withval=$with_bugurl; case "$withval" in
7068       yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
7069       no)  BUGURL=
7070            ;;
7071       *)   BUGURL="$withval"
7072            ;;
7073      esac
7074 else
7075   BUGURL="http://www.gnu.org/software/gdb/bugs/"
7076
7077 fi
7078
7079   case ${BUGURL} in
7080   "")
7081     REPORT_BUGS_TO=
7082     REPORT_BUGS_TEXI=
7083     ;;
7084   *)
7085     REPORT_BUGS_TO="<$BUGURL>"
7086     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7087     ;;
7088   esac;
7089
7090
7091
7092
7093 cat >>confdefs.h <<_ACEOF
7094 #define PKGVERSION "$PKGVERSION"
7095 _ACEOF
7096
7097
7098 cat >>confdefs.h <<_ACEOF
7099 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7100 _ACEOF
7101
7102
7103 # --------------------- #
7104 # Checks for programs.  #
7105 # --------------------- #
7106
7107 for ac_prog in gawk mawk nawk awk
7108 do
7109   # Extract the first word of "$ac_prog", so it can be a program name with args.
7110 set dummy $ac_prog; ac_word=$2
7111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7112 $as_echo_n "checking for $ac_word... " >&6; }
7113 if test "${ac_cv_prog_AWK+set}" = set; then :
7114   $as_echo_n "(cached) " >&6
7115 else
7116   if test -n "$AWK"; then
7117   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7118 else
7119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7120 for as_dir in $PATH
7121 do
7122   IFS=$as_save_IFS
7123   test -z "$as_dir" && as_dir=.
7124     for ac_exec_ext in '' $ac_executable_extensions; do
7125   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7126     ac_cv_prog_AWK="$ac_prog"
7127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7128     break 2
7129   fi
7130 done
7131   done
7132 IFS=$as_save_IFS
7133
7134 fi
7135 fi
7136 AWK=$ac_cv_prog_AWK
7137 if test -n "$AWK"; then
7138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7139 $as_echo "$AWK" >&6; }
7140 else
7141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7142 $as_echo "no" >&6; }
7143 fi
7144
7145
7146   test -n "$AWK" && break
7147 done
7148
7149 # Find a good install program.  We prefer a C program (faster),
7150 # so one script is as good as another.  But avoid the broken or
7151 # incompatible versions:
7152 # SysV /etc/install, /usr/sbin/install
7153 # SunOS /usr/etc/install
7154 # IRIX /sbin/install
7155 # AIX /bin/install
7156 # AmigaOS /C/install, which installs bootblocks on floppy discs
7157 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7158 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7159 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7160 # OS/2's system install, which has a completely different semantic
7161 # ./install, which can be erroneously created by make from ./install.sh.
7162 # Reject install programs that cannot install multiple files.
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7164 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7165 if test -z "$INSTALL"; then
7166 if test "${ac_cv_path_install+set}" = set; then :
7167   $as_echo_n "(cached) " >&6
7168 else
7169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7170 for as_dir in $PATH
7171 do
7172   IFS=$as_save_IFS
7173   test -z "$as_dir" && as_dir=.
7174     # Account for people who put trailing slashes in PATH elements.
7175 case $as_dir/ in #((
7176   ./ | .// | /[cC]/* | \
7177   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7178   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7179   /usr/ucb/* ) ;;
7180   *)
7181     # OSF1 and SCO ODT 3.0 have their own names for install.
7182     # Don't use installbsd from OSF since it installs stuff as root
7183     # by default.
7184     for ac_prog in ginstall scoinst install; do
7185       for ac_exec_ext in '' $ac_executable_extensions; do
7186         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
7187           if test $ac_prog = install &&
7188             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7189             # AIX install.  It has an incompatible calling convention.
7190             :
7191           elif test $ac_prog = install &&
7192             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7193             # program-specific install script used by HP pwplus--don't use.
7194             :
7195           else
7196             rm -rf conftest.one conftest.two conftest.dir
7197             echo one > conftest.one
7198             echo two > conftest.two
7199             mkdir conftest.dir
7200             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7201               test -s conftest.one && test -s conftest.two &&
7202               test -s conftest.dir/conftest.one &&
7203               test -s conftest.dir/conftest.two
7204             then
7205               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7206               break 3
7207             fi
7208           fi
7209         fi
7210       done
7211     done
7212     ;;
7213 esac
7214
7215   done
7216 IFS=$as_save_IFS
7217
7218 rm -rf conftest.one conftest.two conftest.dir
7219
7220 fi
7221   if test "${ac_cv_path_install+set}" = set; then
7222     INSTALL=$ac_cv_path_install
7223   else
7224     # As a last resort, use the slow shell script.  Don't cache a
7225     # value for INSTALL within a source directory, because that will
7226     # break other packages using the cache if that directory is
7227     # removed, or if the value is a relative name.
7228     INSTALL=$ac_install_sh
7229   fi
7230 fi
7231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7232 $as_echo "$INSTALL" >&6; }
7233
7234 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7235 # It thinks the first close brace ends the variable substitution.
7236 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7237
7238 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7239
7240 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7241
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7243 $as_echo_n "checking whether ln -s works... " >&6; }
7244 LN_S=$as_ln_s
7245 if test "$LN_S" = "ln -s"; then
7246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7247 $as_echo "yes" >&6; }
7248 else
7249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7250 $as_echo "no, using $LN_S" >&6; }
7251 fi
7252
7253 if test -n "$ac_tool_prefix"; then
7254   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7255 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7257 $as_echo_n "checking for $ac_word... " >&6; }
7258 if test "${ac_cv_prog_RANLIB+set}" = set; then :
7259   $as_echo_n "(cached) " >&6
7260 else
7261   if test -n "$RANLIB"; then
7262   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7263 else
7264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7265 for as_dir in $PATH
7266 do
7267   IFS=$as_save_IFS
7268   test -z "$as_dir" && as_dir=.
7269     for ac_exec_ext in '' $ac_executable_extensions; do
7270   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7271     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7273     break 2
7274   fi
7275 done
7276   done
7277 IFS=$as_save_IFS
7278
7279 fi
7280 fi
7281 RANLIB=$ac_cv_prog_RANLIB
7282 if test -n "$RANLIB"; then
7283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7284 $as_echo "$RANLIB" >&6; }
7285 else
7286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7287 $as_echo "no" >&6; }
7288 fi
7289
7290
7291 fi
7292 if test -z "$ac_cv_prog_RANLIB"; then
7293   ac_ct_RANLIB=$RANLIB
7294   # Extract the first word of "ranlib", so it can be a program name with args.
7295 set dummy ranlib; ac_word=$2
7296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7297 $as_echo_n "checking for $ac_word... " >&6; }
7298 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7299   $as_echo_n "(cached) " >&6
7300 else
7301   if test -n "$ac_ct_RANLIB"; then
7302   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7303 else
7304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7305 for as_dir in $PATH
7306 do
7307   IFS=$as_save_IFS
7308   test -z "$as_dir" && as_dir=.
7309     for ac_exec_ext in '' $ac_executable_extensions; do
7310   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7311     ac_cv_prog_ac_ct_RANLIB="ranlib"
7312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7313     break 2
7314   fi
7315 done
7316   done
7317 IFS=$as_save_IFS
7318
7319 fi
7320 fi
7321 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7322 if test -n "$ac_ct_RANLIB"; then
7323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7324 $as_echo "$ac_ct_RANLIB" >&6; }
7325 else
7326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7327 $as_echo "no" >&6; }
7328 fi
7329
7330   if test "x$ac_ct_RANLIB" = x; then
7331     RANLIB=":"
7332   else
7333     case $cross_compiling:$ac_tool_warned in
7334 yes:)
7335 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7336 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7337 ac_tool_warned=yes ;;
7338 esac
7339     RANLIB=$ac_ct_RANLIB
7340   fi
7341 else
7342   RANLIB="$ac_cv_prog_RANLIB"
7343 fi
7344
7345 for ac_prog in 'bison -y' byacc
7346 do
7347   # Extract the first word of "$ac_prog", so it can be a program name with args.
7348 set dummy $ac_prog; ac_word=$2
7349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7350 $as_echo_n "checking for $ac_word... " >&6; }
7351 if test "${ac_cv_prog_YACC+set}" = set; then :
7352   $as_echo_n "(cached) " >&6
7353 else
7354   if test -n "$YACC"; then
7355   ac_cv_prog_YACC="$YACC" # Let the user override the test.
7356 else
7357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7358 for as_dir in $PATH
7359 do
7360   IFS=$as_save_IFS
7361   test -z "$as_dir" && as_dir=.
7362     for ac_exec_ext in '' $ac_executable_extensions; do
7363   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7364     ac_cv_prog_YACC="$ac_prog"
7365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7366     break 2
7367   fi
7368 done
7369   done
7370 IFS=$as_save_IFS
7371
7372 fi
7373 fi
7374 YACC=$ac_cv_prog_YACC
7375 if test -n "$YACC"; then
7376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7377 $as_echo "$YACC" >&6; }
7378 else
7379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7380 $as_echo "no" >&6; }
7381 fi
7382
7383
7384   test -n "$YACC" && break
7385 done
7386 test -n "$YACC" || YACC="yacc"
7387
7388
7389 if test -n "$ac_tool_prefix"; then
7390   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7391 set dummy ${ac_tool_prefix}ar; ac_word=$2
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7393 $as_echo_n "checking for $ac_word... " >&6; }
7394 if test "${ac_cv_prog_AR+set}" = set; then :
7395   $as_echo_n "(cached) " >&6
7396 else
7397   if test -n "$AR"; then
7398   ac_cv_prog_AR="$AR" # Let the user override the test.
7399 else
7400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7401 for as_dir in $PATH
7402 do
7403   IFS=$as_save_IFS
7404   test -z "$as_dir" && as_dir=.
7405     for ac_exec_ext in '' $ac_executable_extensions; do
7406   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7407     ac_cv_prog_AR="${ac_tool_prefix}ar"
7408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7409     break 2
7410   fi
7411 done
7412   done
7413 IFS=$as_save_IFS
7414
7415 fi
7416 fi
7417 AR=$ac_cv_prog_AR
7418 if test -n "$AR"; then
7419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7420 $as_echo "$AR" >&6; }
7421 else
7422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7423 $as_echo "no" >&6; }
7424 fi
7425
7426
7427 fi
7428 if test -z "$ac_cv_prog_AR"; then
7429   ac_ct_AR=$AR
7430   # Extract the first word of "ar", so it can be a program name with args.
7431 set dummy ar; ac_word=$2
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7433 $as_echo_n "checking for $ac_word... " >&6; }
7434 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7435   $as_echo_n "(cached) " >&6
7436 else
7437   if test -n "$ac_ct_AR"; then
7438   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7439 else
7440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7441 for as_dir in $PATH
7442 do
7443   IFS=$as_save_IFS
7444   test -z "$as_dir" && as_dir=.
7445     for ac_exec_ext in '' $ac_executable_extensions; do
7446   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7447     ac_cv_prog_ac_ct_AR="ar"
7448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7449     break 2
7450   fi
7451 done
7452   done
7453 IFS=$as_save_IFS
7454
7455 fi
7456 fi
7457 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7458 if test -n "$ac_ct_AR"; then
7459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7460 $as_echo "$ac_ct_AR" >&6; }
7461 else
7462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7463 $as_echo "no" >&6; }
7464 fi
7465
7466   if test "x$ac_ct_AR" = x; then
7467     AR=""
7468   else
7469     case $cross_compiling:$ac_tool_warned in
7470 yes:)
7471 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7472 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7473 ac_tool_warned=yes ;;
7474 esac
7475     AR=$ac_ct_AR
7476   fi
7477 else
7478   AR="$ac_cv_prog_AR"
7479 fi
7480
7481 if test -n "$ac_tool_prefix"; then
7482   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7483 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7485 $as_echo_n "checking for $ac_word... " >&6; }
7486 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7487   $as_echo_n "(cached) " >&6
7488 else
7489   if test -n "$DLLTOOL"; then
7490   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7491 else
7492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7493 for as_dir in $PATH
7494 do
7495   IFS=$as_save_IFS
7496   test -z "$as_dir" && as_dir=.
7497     for ac_exec_ext in '' $ac_executable_extensions; do
7498   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7499     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7501     break 2
7502   fi
7503 done
7504   done
7505 IFS=$as_save_IFS
7506
7507 fi
7508 fi
7509 DLLTOOL=$ac_cv_prog_DLLTOOL
7510 if test -n "$DLLTOOL"; then
7511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7512 $as_echo "$DLLTOOL" >&6; }
7513 else
7514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7515 $as_echo "no" >&6; }
7516 fi
7517
7518
7519 fi
7520 if test -z "$ac_cv_prog_DLLTOOL"; then
7521   ac_ct_DLLTOOL=$DLLTOOL
7522   # Extract the first word of "dlltool", so it can be a program name with args.
7523 set dummy dlltool; ac_word=$2
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7525 $as_echo_n "checking for $ac_word... " >&6; }
7526 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7527   $as_echo_n "(cached) " >&6
7528 else
7529   if test -n "$ac_ct_DLLTOOL"; then
7530   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7531 else
7532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7533 for as_dir in $PATH
7534 do
7535   IFS=$as_save_IFS
7536   test -z "$as_dir" && as_dir=.
7537     for ac_exec_ext in '' $ac_executable_extensions; do
7538   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7539     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7541     break 2
7542   fi
7543 done
7544   done
7545 IFS=$as_save_IFS
7546
7547 fi
7548 fi
7549 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7550 if test -n "$ac_ct_DLLTOOL"; then
7551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7552 $as_echo "$ac_ct_DLLTOOL" >&6; }
7553 else
7554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7555 $as_echo "no" >&6; }
7556 fi
7557
7558   if test "x$ac_ct_DLLTOOL" = x; then
7559     DLLTOOL=""
7560   else
7561     case $cross_compiling:$ac_tool_warned in
7562 yes:)
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7564 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7565 ac_tool_warned=yes ;;
7566 esac
7567     DLLTOOL=$ac_ct_DLLTOOL
7568   fi
7569 else
7570   DLLTOOL="$ac_cv_prog_DLLTOOL"
7571 fi
7572
7573 if test -n "$ac_tool_prefix"; then
7574   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7575 set dummy ${ac_tool_prefix}windres; ac_word=$2
7576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7577 $as_echo_n "checking for $ac_word... " >&6; }
7578 if test "${ac_cv_prog_WINDRES+set}" = set; then :
7579   $as_echo_n "(cached) " >&6
7580 else
7581   if test -n "$WINDRES"; then
7582   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7583 else
7584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7585 for as_dir in $PATH
7586 do
7587   IFS=$as_save_IFS
7588   test -z "$as_dir" && as_dir=.
7589     for ac_exec_ext in '' $ac_executable_extensions; do
7590   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7591     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7593     break 2
7594   fi
7595 done
7596   done
7597 IFS=$as_save_IFS
7598
7599 fi
7600 fi
7601 WINDRES=$ac_cv_prog_WINDRES
7602 if test -n "$WINDRES"; then
7603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7604 $as_echo "$WINDRES" >&6; }
7605 else
7606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7607 $as_echo "no" >&6; }
7608 fi
7609
7610
7611 fi
7612 if test -z "$ac_cv_prog_WINDRES"; then
7613   ac_ct_WINDRES=$WINDRES
7614   # Extract the first word of "windres", so it can be a program name with args.
7615 set dummy windres; ac_word=$2
7616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7617 $as_echo_n "checking for $ac_word... " >&6; }
7618 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7619   $as_echo_n "(cached) " >&6
7620 else
7621   if test -n "$ac_ct_WINDRES"; then
7622   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7623 else
7624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7625 for as_dir in $PATH
7626 do
7627   IFS=$as_save_IFS
7628   test -z "$as_dir" && as_dir=.
7629     for ac_exec_ext in '' $ac_executable_extensions; do
7630   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7631     ac_cv_prog_ac_ct_WINDRES="windres"
7632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7633     break 2
7634   fi
7635 done
7636   done
7637 IFS=$as_save_IFS
7638
7639 fi
7640 fi
7641 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7642 if test -n "$ac_ct_WINDRES"; then
7643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7644 $as_echo "$ac_ct_WINDRES" >&6; }
7645 else
7646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7647 $as_echo "no" >&6; }
7648 fi
7649
7650   if test "x$ac_ct_WINDRES" = x; then
7651     WINDRES=""
7652   else
7653     case $cross_compiling:$ac_tool_warned in
7654 yes:)
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7656 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7657 ac_tool_warned=yes ;;
7658 esac
7659     WINDRES=$ac_ct_WINDRES
7660   fi
7661 else
7662   WINDRES="$ac_cv_prog_WINDRES"
7663 fi
7664
7665
7666 case $host_os in
7667   gnu*)
7668     # Needed for GNU Hurd hosts.
7669     if test -n "$ac_tool_prefix"; then
7670   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7671 set dummy ${ac_tool_prefix}mig; ac_word=$2
7672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673 $as_echo_n "checking for $ac_word... " >&6; }
7674 if test "${ac_cv_prog_MIG+set}" = set; then :
7675   $as_echo_n "(cached) " >&6
7676 else
7677   if test -n "$MIG"; then
7678   ac_cv_prog_MIG="$MIG" # Let the user override the test.
7679 else
7680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7681 for as_dir in $PATH
7682 do
7683   IFS=$as_save_IFS
7684   test -z "$as_dir" && as_dir=.
7685     for ac_exec_ext in '' $ac_executable_extensions; do
7686   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7687     ac_cv_prog_MIG="${ac_tool_prefix}mig"
7688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7689     break 2
7690   fi
7691 done
7692   done
7693 IFS=$as_save_IFS
7694
7695 fi
7696 fi
7697 MIG=$ac_cv_prog_MIG
7698 if test -n "$MIG"; then
7699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7700 $as_echo "$MIG" >&6; }
7701 else
7702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7703 $as_echo "no" >&6; }
7704 fi
7705
7706
7707 fi
7708 if test -z "$ac_cv_prog_MIG"; then
7709   ac_ct_MIG=$MIG
7710   # Extract the first word of "mig", so it can be a program name with args.
7711 set dummy mig; ac_word=$2
7712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7713 $as_echo_n "checking for $ac_word... " >&6; }
7714 if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7715   $as_echo_n "(cached) " >&6
7716 else
7717   if test -n "$ac_ct_MIG"; then
7718   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7719 else
7720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721 for as_dir in $PATH
7722 do
7723   IFS=$as_save_IFS
7724   test -z "$as_dir" && as_dir=.
7725     for ac_exec_ext in '' $ac_executable_extensions; do
7726   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7727     ac_cv_prog_ac_ct_MIG="mig"
7728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7729     break 2
7730   fi
7731 done
7732   done
7733 IFS=$as_save_IFS
7734
7735 fi
7736 fi
7737 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7738 if test -n "$ac_ct_MIG"; then
7739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7740 $as_echo "$ac_ct_MIG" >&6; }
7741 else
7742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7743 $as_echo "no" >&6; }
7744 fi
7745
7746   if test "x$ac_ct_MIG" = x; then
7747     MIG=""
7748   else
7749     case $cross_compiling:$ac_tool_warned in
7750 yes:)
7751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7752 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7753 ac_tool_warned=yes ;;
7754 esac
7755     MIG=$ac_ct_MIG
7756   fi
7757 else
7758   MIG="$ac_cv_prog_MIG"
7759 fi
7760
7761     if test x"$MIG" = x; then
7762       as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
7763     fi
7764     ;;
7765 esac
7766
7767 # ---------------------- #
7768 # Checks for libraries.  #
7769 # ---------------------- #
7770
7771 # We might need to link with -lm; most simulators need it.
7772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7773 $as_echo_n "checking for main in -lm... " >&6; }
7774 if test "${ac_cv_lib_m_main+set}" = set; then :
7775   $as_echo_n "(cached) " >&6
7776 else
7777   ac_check_lib_save_LIBS=$LIBS
7778 LIBS="-lm  $LIBS"
7779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7780 /* end confdefs.h.  */
7781
7782
7783 int
7784 main ()
7785 {
7786 return main ();
7787   ;
7788   return 0;
7789 }
7790 _ACEOF
7791 if ac_fn_c_try_link "$LINENO"; then :
7792   ac_cv_lib_m_main=yes
7793 else
7794   ac_cv_lib_m_main=no
7795 fi
7796 rm -f core conftest.err conftest.$ac_objext \
7797     conftest$ac_exeext conftest.$ac_ext
7798 LIBS=$ac_check_lib_save_LIBS
7799 fi
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7801 $as_echo "$ac_cv_lib_m_main" >&6; }
7802 if test "x$ac_cv_lib_m_main" = x""yes; then :
7803   cat >>confdefs.h <<_ACEOF
7804 #define HAVE_LIBM 1
7805 _ACEOF
7806
7807   LIBS="-lm $LIBS"
7808
7809 fi
7810
7811
7812 # We need to link with -lw to get `wctype' on Solaris before Solaris
7813 # 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
7814 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
7815 # is known to have this problem).  Therefore we avoid libw if we can.
7816 ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
7817 if test "x$ac_cv_func_wctype" = x""yes; then :
7818
7819 else
7820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
7821 $as_echo_n "checking for wctype in -lw... " >&6; }
7822 if test "${ac_cv_lib_w_wctype+set}" = set; then :
7823   $as_echo_n "(cached) " >&6
7824 else
7825   ac_check_lib_save_LIBS=$LIBS
7826 LIBS="-lw  $LIBS"
7827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7828 /* end confdefs.h.  */
7829
7830 /* Override any GCC internal prototype to avoid an error.
7831    Use char because int might match the return type of a GCC
7832    builtin and then its argument prototype would still apply.  */
7833 #ifdef __cplusplus
7834 extern "C"
7835 #endif
7836 char wctype ();
7837 int
7838 main ()
7839 {
7840 return wctype ();
7841   ;
7842   return 0;
7843 }
7844 _ACEOF
7845 if ac_fn_c_try_link "$LINENO"; then :
7846   ac_cv_lib_w_wctype=yes
7847 else
7848   ac_cv_lib_w_wctype=no
7849 fi
7850 rm -f core conftest.err conftest.$ac_objext \
7851     conftest$ac_exeext conftest.$ac_ext
7852 LIBS=$ac_check_lib_save_LIBS
7853 fi
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
7855 $as_echo "$ac_cv_lib_w_wctype" >&6; }
7856 if test "x$ac_cv_lib_w_wctype" = x""yes; then :
7857   cat >>confdefs.h <<_ACEOF
7858 #define HAVE_LIBW 1
7859 _ACEOF
7860
7861   LIBS="-lw $LIBS"
7862
7863 fi
7864
7865 fi
7866
7867
7868 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7870 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7871 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7872   $as_echo_n "(cached) " >&6
7873 else
7874   ac_func_search_save_LIBS=$LIBS
7875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7876 /* end confdefs.h.  */
7877
7878 /* Override any GCC internal prototype to avoid an error.
7879    Use char because int might match the return type of a GCC
7880    builtin and then its argument prototype would still apply.  */
7881 #ifdef __cplusplus
7882 extern "C"
7883 #endif
7884 char gethostbyname ();
7885 int
7886 main ()
7887 {
7888 return gethostbyname ();
7889   ;
7890   return 0;
7891 }
7892 _ACEOF
7893 for ac_lib in '' nsl; do
7894   if test -z "$ac_lib"; then
7895     ac_res="none required"
7896   else
7897     ac_res=-l$ac_lib
7898     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7899   fi
7900   if ac_fn_c_try_link "$LINENO"; then :
7901   ac_cv_search_gethostbyname=$ac_res
7902 fi
7903 rm -f core conftest.err conftest.$ac_objext \
7904     conftest$ac_exeext
7905   if test "${ac_cv_search_gethostbyname+set}" = set; then :
7906   break
7907 fi
7908 done
7909 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7910
7911 else
7912   ac_cv_search_gethostbyname=no
7913 fi
7914 rm conftest.$ac_ext
7915 LIBS=$ac_func_search_save_LIBS
7916 fi
7917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7918 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7919 ac_res=$ac_cv_search_gethostbyname
7920 if test "$ac_res" != no; then :
7921   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7922
7923 fi
7924
7925
7926 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7928 $as_echo_n "checking for library containing socketpair... " >&6; }
7929 if test "${ac_cv_search_socketpair+set}" = set; then :
7930   $as_echo_n "(cached) " >&6
7931 else
7932   ac_func_search_save_LIBS=$LIBS
7933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7934 /* end confdefs.h.  */
7935
7936 /* Override any GCC internal prototype to avoid an error.
7937    Use char because int might match the return type of a GCC
7938    builtin and then its argument prototype would still apply.  */
7939 #ifdef __cplusplus
7940 extern "C"
7941 #endif
7942 char socketpair ();
7943 int
7944 main ()
7945 {
7946 return socketpair ();
7947   ;
7948   return 0;
7949 }
7950 _ACEOF
7951 for ac_lib in '' socket; do
7952   if test -z "$ac_lib"; then
7953     ac_res="none required"
7954   else
7955     ac_res=-l$ac_lib
7956     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7957   fi
7958   if ac_fn_c_try_link "$LINENO"; then :
7959   ac_cv_search_socketpair=$ac_res
7960 fi
7961 rm -f core conftest.err conftest.$ac_objext \
7962     conftest$ac_exeext
7963   if test "${ac_cv_search_socketpair+set}" = set; then :
7964   break
7965 fi
7966 done
7967 if test "${ac_cv_search_socketpair+set}" = set; then :
7968
7969 else
7970   ac_cv_search_socketpair=no
7971 fi
7972 rm conftest.$ac_ext
7973 LIBS=$ac_func_search_save_LIBS
7974 fi
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7976 $as_echo "$ac_cv_search_socketpair" >&6; }
7977 ac_res=$ac_cv_search_socketpair
7978 if test "$ac_res" != no; then :
7979   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7980
7981 fi
7982
7983
7984 # Link in zlib if we can.  This allows us to read compressed debug sections.
7985
7986   # Use the system's zlib library.
7987   zlibdir="-L\$(top_builddir)/../zlib"
7988   zlibinc="-I\$(top_srcdir)/../zlib"
7989
7990 # Check whether --with-system-zlib was given.
7991 if test "${with_system_zlib+set}" = set; then :
7992   withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7993     zlibdir=
7994     zlibinc=
7995   fi
7996
7997 fi
7998
7999
8000
8001
8002
8003 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
8004 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
8005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
8006 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
8007 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
8008   $as_echo_n "(cached) " >&6
8009 else
8010   ac_func_search_save_LIBS=$LIBS
8011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8012 /* end confdefs.h.  */
8013
8014 /* Override any GCC internal prototype to avoid an error.
8015    Use char because int might match the return type of a GCC
8016    builtin and then its argument prototype would still apply.  */
8017 #ifdef __cplusplus
8018 extern "C"
8019 #endif
8020 char kinfo_getvmmap ();
8021 int
8022 main ()
8023 {
8024 return kinfo_getvmmap ();
8025   ;
8026   return 0;
8027 }
8028 _ACEOF
8029 for ac_lib in '' util util-freebsd; do
8030   if test -z "$ac_lib"; then
8031     ac_res="none required"
8032   else
8033     ac_res=-l$ac_lib
8034     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8035   fi
8036   if ac_fn_c_try_link "$LINENO"; then :
8037   ac_cv_search_kinfo_getvmmap=$ac_res
8038 fi
8039 rm -f core conftest.err conftest.$ac_objext \
8040     conftest$ac_exeext
8041   if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
8042   break
8043 fi
8044 done
8045 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
8046
8047 else
8048   ac_cv_search_kinfo_getvmmap=no
8049 fi
8050 rm conftest.$ac_ext
8051 LIBS=$ac_func_search_save_LIBS
8052 fi
8053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8054 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8055 ac_res=$ac_cv_search_kinfo_getvmmap
8056 if test "$ac_res" != no; then :
8057   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8058
8059 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8060
8061 fi
8062
8063
8064
8065       if test "X$prefix" = "XNONE"; then
8066     acl_final_prefix="$ac_default_prefix"
8067   else
8068     acl_final_prefix="$prefix"
8069   fi
8070   if test "X$exec_prefix" = "XNONE"; then
8071     acl_final_exec_prefix='${prefix}'
8072   else
8073     acl_final_exec_prefix="$exec_prefix"
8074   fi
8075   acl_save_prefix="$prefix"
8076   prefix="$acl_final_prefix"
8077   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8078   prefix="$acl_save_prefix"
8079
8080
8081 # Check whether --with-gnu-ld was given.
8082 if test "${with_gnu_ld+set}" = set; then :
8083   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8084 else
8085   with_gnu_ld=no
8086 fi
8087
8088 # Prepare PATH_SEPARATOR.
8089 # The user is always right.
8090 if test "${PATH_SEPARATOR+set}" != set; then
8091   echo "#! /bin/sh" >conf$$.sh
8092   echo  "exit 0"   >>conf$$.sh
8093   chmod +x conf$$.sh
8094   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8095     PATH_SEPARATOR=';'
8096   else
8097     PATH_SEPARATOR=:
8098   fi
8099   rm -f conf$$.sh
8100 fi
8101 ac_prog=ld
8102 if test "$GCC" = yes; then
8103   # Check if gcc -print-prog-name=ld gives a path.
8104   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8105 $as_echo_n "checking for ld used by GCC... " >&6; }
8106   case $host in
8107   *-*-mingw*)
8108     # gcc leaves a trailing carriage return which upsets mingw
8109     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8110   *)
8111     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8112   esac
8113   case $ac_prog in
8114     # Accept absolute paths.
8115     [\\/]* | [A-Za-z]:[\\/]*)
8116       re_direlt='/[^/][^/]*/\.\./'
8117       # Canonicalize the path of ld
8118       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8119       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8120         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8121       done
8122       test -z "$LD" && LD="$ac_prog"
8123       ;;
8124   "")
8125     # If it fails, then pretend we aren't using GCC.
8126     ac_prog=ld
8127     ;;
8128   *)
8129     # If it is relative, then search for the first ld in PATH.
8130     with_gnu_ld=unknown
8131     ;;
8132   esac
8133 elif test "$with_gnu_ld" = yes; then
8134   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8135 $as_echo_n "checking for GNU ld... " >&6; }
8136 else
8137   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8138 $as_echo_n "checking for non-GNU ld... " >&6; }
8139 fi
8140 if test "${acl_cv_path_LD+set}" = set; then :
8141   $as_echo_n "(cached) " >&6
8142 else
8143   if test -z "$LD"; then
8144   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8145   for ac_dir in $PATH; do
8146     test -z "$ac_dir" && ac_dir=.
8147     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8148       acl_cv_path_LD="$ac_dir/$ac_prog"
8149       # Check to see if the program is GNU ld.  I'd rather use --version,
8150       # but apparently some GNU ld's only accept -v.
8151       # Break only if it was the GNU/non-GNU ld that we prefer.
8152       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8153         test "$with_gnu_ld" != no && break
8154       else
8155         test "$with_gnu_ld" != yes && break
8156       fi
8157     fi
8158   done
8159   IFS="$ac_save_ifs"
8160 else
8161   acl_cv_path_LD="$LD" # Let the user override the test with a path.
8162 fi
8163 fi
8164
8165 LD="$acl_cv_path_LD"
8166 if test -n "$LD"; then
8167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8168 $as_echo "$LD" >&6; }
8169 else
8170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8171 $as_echo "no" >&6; }
8172 fi
8173 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8175 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8176 if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8177   $as_echo_n "(cached) " >&6
8178 else
8179   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8180 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8181   acl_cv_prog_gnu_ld=yes
8182 else
8183   acl_cv_prog_gnu_ld=no
8184 fi
8185 fi
8186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8187 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8188 with_gnu_ld=$acl_cv_prog_gnu_ld
8189
8190
8191
8192                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8193 $as_echo_n "checking for shared library run path origin... " >&6; }
8194 if test "${acl_cv_rpath+set}" = set; then :
8195   $as_echo_n "(cached) " >&6
8196 else
8197
8198     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8199     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8200     . ./conftest.sh
8201     rm -f ./conftest.sh
8202     acl_cv_rpath=done
8203
8204 fi
8205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8206 $as_echo "$acl_cv_rpath" >&6; }
8207   wl="$acl_cv_wl"
8208   libext="$acl_cv_libext"
8209   shlibext="$acl_cv_shlibext"
8210   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8211   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8212   hardcode_direct="$acl_cv_hardcode_direct"
8213   hardcode_minus_L="$acl_cv_hardcode_minus_L"
8214     # Check whether --enable-rpath was given.
8215 if test "${enable_rpath+set}" = set; then :
8216   enableval=$enable_rpath; :
8217 else
8218   enable_rpath=yes
8219 fi
8220
8221
8222
8223
8224
8225
8226
8227
8228     use_additional=yes
8229
8230   acl_save_prefix="$prefix"
8231   prefix="$acl_final_prefix"
8232   acl_save_exec_prefix="$exec_prefix"
8233   exec_prefix="$acl_final_exec_prefix"
8234
8235     eval additional_includedir=\"$includedir\"
8236     eval additional_libdir=\"$libdir\"
8237
8238   exec_prefix="$acl_save_exec_prefix"
8239   prefix="$acl_save_prefix"
8240
8241
8242 # Check whether --with-libiconv-prefix was given.
8243 if test "${with_libiconv_prefix+set}" = set; then :
8244   withval=$with_libiconv_prefix;
8245     if test "X$withval" = "Xno"; then
8246       use_additional=no
8247     else
8248       if test "X$withval" = "X"; then
8249
8250   acl_save_prefix="$prefix"
8251   prefix="$acl_final_prefix"
8252   acl_save_exec_prefix="$exec_prefix"
8253   exec_prefix="$acl_final_exec_prefix"
8254
8255           eval additional_includedir=\"$includedir\"
8256           eval additional_libdir=\"$libdir\"
8257
8258   exec_prefix="$acl_save_exec_prefix"
8259   prefix="$acl_save_prefix"
8260
8261       else
8262         additional_includedir="$withval/include"
8263         additional_libdir="$withval/lib"
8264       fi
8265     fi
8266
8267 fi
8268
8269       LIBICONV=
8270   LTLIBICONV=
8271   INCICONV=
8272   rpathdirs=
8273   ltrpathdirs=
8274   names_already_handled=
8275   names_next_round='iconv '
8276   while test -n "$names_next_round"; do
8277     names_this_round="$names_next_round"
8278     names_next_round=
8279     for name in $names_this_round; do
8280       already_handled=
8281       for n in $names_already_handled; do
8282         if test "$n" = "$name"; then
8283           already_handled=yes
8284           break
8285         fi
8286       done
8287       if test -z "$already_handled"; then
8288         names_already_handled="$names_already_handled $name"
8289                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8290         eval value=\"\$HAVE_LIB$uppername\"
8291         if test -n "$value"; then
8292           if test "$value" = yes; then
8293             eval value=\"\$LIB$uppername\"
8294             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8295             eval value=\"\$LTLIB$uppername\"
8296             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8297           else
8298                                     :
8299           fi
8300         else
8301                               found_dir=
8302           found_la=
8303           found_so=
8304           found_a=
8305           if test $use_additional = yes; then
8306             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8307               found_dir="$additional_libdir"
8308               found_so="$additional_libdir/lib$name.$shlibext"
8309               if test -f "$additional_libdir/lib$name.la"; then
8310                 found_la="$additional_libdir/lib$name.la"
8311               fi
8312             else
8313               if test -f "$additional_libdir/lib$name.$libext"; then
8314                 found_dir="$additional_libdir"
8315                 found_a="$additional_libdir/lib$name.$libext"
8316                 if test -f "$additional_libdir/lib$name.la"; then
8317                   found_la="$additional_libdir/lib$name.la"
8318                 fi
8319               fi
8320             fi
8321           fi
8322           if test "X$found_dir" = "X"; then
8323             for x in $LDFLAGS $LTLIBICONV; do
8324
8325   acl_save_prefix="$prefix"
8326   prefix="$acl_final_prefix"
8327   acl_save_exec_prefix="$exec_prefix"
8328   exec_prefix="$acl_final_exec_prefix"
8329   eval x=\"$x\"
8330   exec_prefix="$acl_save_exec_prefix"
8331   prefix="$acl_save_prefix"
8332
8333               case "$x" in
8334                 -L*)
8335                   dir=`echo "X$x" | sed -e 's/^X-L//'`
8336                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8337                     found_dir="$dir"
8338                     found_so="$dir/lib$name.$shlibext"
8339                     if test -f "$dir/lib$name.la"; then
8340                       found_la="$dir/lib$name.la"
8341                     fi
8342                   else
8343                     if test -f "$dir/lib$name.$libext"; then
8344                       found_dir="$dir"
8345                       found_a="$dir/lib$name.$libext"
8346                       if test -f "$dir/lib$name.la"; then
8347                         found_la="$dir/lib$name.la"
8348                       fi
8349                     fi
8350                   fi
8351                   ;;
8352               esac
8353               if test "X$found_dir" != "X"; then
8354                 break
8355               fi
8356             done
8357           fi
8358           if test "X$found_dir" != "X"; then
8359                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8360             if test "X$found_so" != "X"; then
8361                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8362                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8363               else
8364                                                                                 haveit=
8365                 for x in $ltrpathdirs; do
8366                   if test "X$x" = "X$found_dir"; then
8367                     haveit=yes
8368                     break
8369                   fi
8370                 done
8371                 if test -z "$haveit"; then
8372                   ltrpathdirs="$ltrpathdirs $found_dir"
8373                 fi
8374                                 if test "$hardcode_direct" = yes; then
8375                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8376                 else
8377                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8378                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8379                                                             haveit=
8380                     for x in $rpathdirs; do
8381                       if test "X$x" = "X$found_dir"; then
8382                         haveit=yes
8383                         break
8384                       fi
8385                     done
8386                     if test -z "$haveit"; then
8387                       rpathdirs="$rpathdirs $found_dir"
8388                     fi
8389                   else
8390                                                                                 haveit=
8391                     for x in $LDFLAGS $LIBICONV; do
8392
8393   acl_save_prefix="$prefix"
8394   prefix="$acl_final_prefix"
8395   acl_save_exec_prefix="$exec_prefix"
8396   exec_prefix="$acl_final_exec_prefix"
8397   eval x=\"$x\"
8398   exec_prefix="$acl_save_exec_prefix"
8399   prefix="$acl_save_prefix"
8400
8401                       if test "X$x" = "X-L$found_dir"; then
8402                         haveit=yes
8403                         break
8404                       fi
8405                     done
8406                     if test -z "$haveit"; then
8407                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8408                     fi
8409                     if test "$hardcode_minus_L" != no; then
8410                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8411                     else
8412                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8413                     fi
8414                   fi
8415                 fi
8416               fi
8417             else
8418               if test "X$found_a" != "X"; then
8419                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8420               else
8421                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8422               fi
8423             fi
8424                         additional_includedir=
8425             case "$found_dir" in
8426               */lib | */lib/)
8427                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8428                 additional_includedir="$basedir/include"
8429                 ;;
8430             esac
8431             if test "X$additional_includedir" != "X"; then
8432                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
8433                 haveit=
8434                 if test "X$additional_includedir" = "X/usr/local/include"; then
8435                   if test -n "$GCC"; then
8436                     case $host_os in
8437                       linux*) haveit=yes;;
8438                     esac
8439                   fi
8440                 fi
8441                 if test -z "$haveit"; then
8442                   for x in $CPPFLAGS $INCICONV; do
8443
8444   acl_save_prefix="$prefix"
8445   prefix="$acl_final_prefix"
8446   acl_save_exec_prefix="$exec_prefix"
8447   exec_prefix="$acl_final_exec_prefix"
8448   eval x=\"$x\"
8449   exec_prefix="$acl_save_exec_prefix"
8450   prefix="$acl_save_prefix"
8451
8452                     if test "X$x" = "X-I$additional_includedir"; then
8453                       haveit=yes
8454                       break
8455                     fi
8456                   done
8457                   if test -z "$haveit"; then
8458                     if test -d "$additional_includedir"; then
8459                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8460                     fi
8461                   fi
8462                 fi
8463               fi
8464             fi
8465                         if test -n "$found_la"; then
8466                                                         save_libdir="$libdir"
8467               case "$found_la" in
8468                 */* | *\\*) . "$found_la" ;;
8469                 *) . "./$found_la" ;;
8470               esac
8471               libdir="$save_libdir"
8472                             for dep in $dependency_libs; do
8473                 case "$dep" in
8474                   -L*)
8475                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8476                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
8477                       haveit=
8478                       if test "X$additional_libdir" = "X/usr/local/lib"; then
8479                         if test -n "$GCC"; then
8480                           case $host_os in
8481                             linux*) haveit=yes;;
8482                           esac
8483                         fi
8484                       fi
8485                       if test -z "$haveit"; then
8486                         haveit=
8487                         for x in $LDFLAGS $LIBICONV; do
8488
8489   acl_save_prefix="$prefix"
8490   prefix="$acl_final_prefix"
8491   acl_save_exec_prefix="$exec_prefix"
8492   exec_prefix="$acl_final_exec_prefix"
8493   eval x=\"$x\"
8494   exec_prefix="$acl_save_exec_prefix"
8495   prefix="$acl_save_prefix"
8496
8497                           if test "X$x" = "X-L$additional_libdir"; then
8498                             haveit=yes
8499                             break
8500                           fi
8501                         done
8502                         if test -z "$haveit"; then
8503                           if test -d "$additional_libdir"; then
8504                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8505                           fi
8506                         fi
8507                         haveit=
8508                         for x in $LDFLAGS $LTLIBICONV; do
8509
8510   acl_save_prefix="$prefix"
8511   prefix="$acl_final_prefix"
8512   acl_save_exec_prefix="$exec_prefix"
8513   exec_prefix="$acl_final_exec_prefix"
8514   eval x=\"$x\"
8515   exec_prefix="$acl_save_exec_prefix"
8516   prefix="$acl_save_prefix"
8517
8518                           if test "X$x" = "X-L$additional_libdir"; then
8519                             haveit=yes
8520                             break
8521                           fi
8522                         done
8523                         if test -z "$haveit"; then
8524                           if test -d "$additional_libdir"; then
8525                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8526                           fi
8527                         fi
8528                       fi
8529                     fi
8530                     ;;
8531                   -R*)
8532                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
8533                     if test "$enable_rpath" != no; then
8534                                                                   haveit=
8535                       for x in $rpathdirs; do
8536                         if test "X$x" = "X$dir"; then
8537                           haveit=yes
8538                           break
8539                         fi
8540                       done
8541                       if test -z "$haveit"; then
8542                         rpathdirs="$rpathdirs $dir"
8543                       fi
8544                                                                   haveit=
8545                       for x in $ltrpathdirs; do
8546                         if test "X$x" = "X$dir"; then
8547                           haveit=yes
8548                           break
8549                         fi
8550                       done
8551                       if test -z "$haveit"; then
8552                         ltrpathdirs="$ltrpathdirs $dir"
8553                       fi
8554                     fi
8555                     ;;
8556                   -l*)
8557                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8558                     ;;
8559                   *.la)
8560                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8561                     ;;
8562                   *)
8563                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8564                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8565                     ;;
8566                 esac
8567               done
8568             fi
8569           else
8570                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8571             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8572           fi
8573         fi
8574       fi
8575     done
8576   done
8577   if test "X$rpathdirs" != "X"; then
8578     if test -n "$hardcode_libdir_separator"; then
8579                         alldirs=
8580       for found_dir in $rpathdirs; do
8581         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8582       done
8583             acl_save_libdir="$libdir"
8584       libdir="$alldirs"
8585       eval flag=\"$hardcode_libdir_flag_spec\"
8586       libdir="$acl_save_libdir"
8587       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8588     else
8589             for found_dir in $rpathdirs; do
8590         acl_save_libdir="$libdir"
8591         libdir="$found_dir"
8592         eval flag=\"$hardcode_libdir_flag_spec\"
8593         libdir="$acl_save_libdir"
8594         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8595       done
8596     fi
8597   fi
8598   if test "X$ltrpathdirs" != "X"; then
8599             for found_dir in $ltrpathdirs; do
8600       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8601     done
8602   fi
8603
8604
8605
8606
8607
8608
8609
8610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8611 $as_echo_n "checking for iconv... " >&6; }
8612 if test "${am_cv_func_iconv+set}" = set; then :
8613   $as_echo_n "(cached) " >&6
8614 else
8615
8616     am_cv_func_iconv="no, consider installing GNU libiconv"
8617     am_cv_lib_iconv=no
8618                     am_save_CPPFLAGS="$CPPFLAGS"
8619     CPPFLAGS="$CPPFLAGS $INCICONV"
8620     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8621 /* end confdefs.h.  */
8622 #include <stdlib.h>
8623 #include <iconv.h>
8624 int
8625 main ()
8626 {
8627 iconv_t cd = iconv_open("","");
8628        iconv(cd,NULL,NULL,NULL,NULL);
8629        iconv_close(cd);
8630   ;
8631   return 0;
8632 }
8633 _ACEOF
8634 if ac_fn_c_try_link "$LINENO"; then :
8635   am_cv_func_iconv=yes
8636 fi
8637 rm -f core conftest.err conftest.$ac_objext \
8638     conftest$ac_exeext conftest.$ac_ext
8639     CPPFLAGS="$am_save_CPPFLAGS"
8640
8641     if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8642       for _libs in .libs _libs; do
8643         am_save_CPPFLAGS="$CPPFLAGS"
8644         am_save_LIBS="$LIBS"
8645         CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8646         LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8647         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8648 /* end confdefs.h.  */
8649 #include <stdlib.h>
8650 #include <iconv.h>
8651 int
8652 main ()
8653 {
8654 iconv_t cd = iconv_open("","");
8655            iconv(cd,NULL,NULL,NULL,NULL);
8656            iconv_close(cd);
8657   ;
8658   return 0;
8659 }
8660 _ACEOF
8661 if ac_fn_c_try_link "$LINENO"; then :
8662   INCICONV="-I../libiconv/include"
8663           LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8664           LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8665           am_cv_lib_iconv=yes
8666           am_cv_func_iconv=yes
8667 fi
8668 rm -f core conftest.err conftest.$ac_objext \
8669     conftest$ac_exeext conftest.$ac_ext
8670         CPPFLAGS="$am_save_CPPFLAGS"
8671         LIBS="$am_save_LIBS"
8672         if test "$am_cv_func_iconv" = "yes"; then
8673           break
8674         fi
8675       done
8676     fi
8677
8678     if test "$am_cv_func_iconv" != yes; then
8679       am_save_CPPFLAGS="$CPPFLAGS"
8680       am_save_LIBS="$LIBS"
8681       CPPFLAGS="$LIBS $INCICONV"
8682       LIBS="$LIBS $LIBICONV"
8683       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8684 /* end confdefs.h.  */
8685 #include <stdlib.h>
8686 #include <iconv.h>
8687 int
8688 main ()
8689 {
8690 iconv_t cd = iconv_open("","");
8691          iconv(cd,NULL,NULL,NULL,NULL);
8692          iconv_close(cd);
8693   ;
8694   return 0;
8695 }
8696 _ACEOF
8697 if ac_fn_c_try_link "$LINENO"; then :
8698   am_cv_lib_iconv=yes
8699         am_cv_func_iconv=yes
8700 fi
8701 rm -f core conftest.err conftest.$ac_objext \
8702     conftest$ac_exeext conftest.$ac_ext
8703       CPPFLAGS="$am_save_CPPFLAGS"
8704       LIBS="$am_save_LIBS"
8705     fi
8706
8707 fi
8708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8709 $as_echo "$am_cv_func_iconv" >&6; }
8710   if test "$am_cv_func_iconv" = yes; then
8711
8712 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8713
8714   fi
8715   if test "$am_cv_lib_iconv" = yes; then
8716
8717   for element in $INCICONV; do
8718     haveit=
8719     for x in $CPPFLAGS; do
8720
8721   acl_save_prefix="$prefix"
8722   prefix="$acl_final_prefix"
8723   acl_save_exec_prefix="$exec_prefix"
8724   exec_prefix="$acl_final_exec_prefix"
8725   eval x=\"$x\"
8726   exec_prefix="$acl_save_exec_prefix"
8727   prefix="$acl_save_prefix"
8728
8729       if test "X$x" = "X$element"; then
8730         haveit=yes
8731         break
8732       fi
8733     done
8734     if test -z "$haveit"; then
8735       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8736     fi
8737   done
8738
8739     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8740 $as_echo_n "checking how to link with libiconv... " >&6; }
8741     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8742 $as_echo "$LIBICONV" >&6; }
8743   else
8744     LIBICONV=
8745     LTLIBICONV=
8746   fi
8747
8748
8749
8750   if test "$am_cv_func_iconv" = yes; then
8751     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8752 $as_echo_n "checking for iconv declaration... " >&6; }
8753     if test "${am_cv_proto_iconv+set}" = set; then :
8754   $as_echo_n "(cached) " >&6
8755 else
8756
8757       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8758 /* end confdefs.h.  */
8759
8760 #include <stdlib.h>
8761 #include <iconv.h>
8762 extern
8763 #ifdef __cplusplus
8764 "C"
8765 #endif
8766 #if defined(__STDC__) || defined(__cplusplus)
8767 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8768 #else
8769 size_t iconv();
8770 #endif
8771
8772 int
8773 main ()
8774 {
8775
8776   ;
8777   return 0;
8778 }
8779 _ACEOF
8780 if ac_fn_c_try_compile "$LINENO"; then :
8781   am_cv_proto_iconv_arg1=""
8782 else
8783   am_cv_proto_iconv_arg1="const"
8784 fi
8785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8786       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);"
8787 fi
8788
8789     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8790     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8791          }$am_cv_proto_iconv" >&5
8792 $as_echo "${ac_t:-
8793          }$am_cv_proto_iconv" >&6; }
8794
8795 cat >>confdefs.h <<_ACEOF
8796 #define ICONV_CONST $am_cv_proto_iconv_arg1
8797 _ACEOF
8798
8799   fi
8800
8801
8802 # GDB may fork/exec the iconv program to get the list of supported character
8803 # sets.  Allow the user to specify where to find it.
8804 # There are several factors affecting the choice of option name:
8805 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8806 #   the build-time location of libiconv files.
8807 # - The program we need to find is iconv, which comes with glibc.  The user
8808 #   doesn't necessarily have libiconv installed.  Therefore naming this
8809 #   --with-libiconv-foo feels wrong.
8810 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8811 #   defined to work on directories not files (though it really doesn't know
8812 #   the difference).
8813 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8814 #   with --with-libiconv-prefix.
8815 # Putting these together is why the option name is --with-iconv-bin.
8816
8817
8818 # Check whether --with-iconv-bin was given.
8819 if test "${with_iconv_bin+set}" = set; then :
8820   withval=$with_iconv_bin; iconv_bin="${withval}"
8821
8822 cat >>confdefs.h <<_ACEOF
8823 #define ICONV_BIN "${iconv_bin}"
8824 _ACEOF
8825
8826
8827   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8828      if test "x$prefix" = xNONE; then
8829         test_prefix=/usr/local
8830      else
8831         test_prefix=$prefix
8832      fi
8833   else
8834      test_prefix=$exec_prefix
8835   fi
8836   value=0
8837   case ${iconv_bin} in
8838      "${test_prefix}"|"${test_prefix}/"*|\
8839         '${exec_prefix}'|'${exec_prefix}/'*)
8840      value=1
8841      ;;
8842   esac
8843
8844 cat >>confdefs.h <<_ACEOF
8845 #define ICONV_BIN_RELOCATABLE $value
8846 _ACEOF
8847
8848
8849
8850 fi
8851
8852
8853 # For the TUI, we need enhanced curses functionality.
8854 if test x"$enable_tui" != xno; then
8855   prefer_curses=yes
8856 fi
8857
8858 curses_found=no
8859 if test x"$prefer_curses" = xyes; then
8860   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8861   # curses library because the latter might not provide all the
8862   # functionality we need.  However, this leads to problems on systems
8863   # where the linker searches /usr/local/lib, but the compiler doesn't
8864   # search /usr/local/include, if ncurses is installed in /usr/local.  A
8865   # default installation of ncurses on alpha*-dec-osf* will lead to such
8866   # a situation.
8867   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8868 $as_echo_n "checking for library containing waddstr... " >&6; }
8869 if test "${ac_cv_search_waddstr+set}" = set; then :
8870   $as_echo_n "(cached) " >&6
8871 else
8872   ac_func_search_save_LIBS=$LIBS
8873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8874 /* end confdefs.h.  */
8875
8876 /* Override any GCC internal prototype to avoid an error.
8877    Use char because int might match the return type of a GCC
8878    builtin and then its argument prototype would still apply.  */
8879 #ifdef __cplusplus
8880 extern "C"
8881 #endif
8882 char waddstr ();
8883 int
8884 main ()
8885 {
8886 return waddstr ();
8887   ;
8888   return 0;
8889 }
8890 _ACEOF
8891 for ac_lib in '' ncurses cursesX curses; do
8892   if test -z "$ac_lib"; then
8893     ac_res="none required"
8894   else
8895     ac_res=-l$ac_lib
8896     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8897   fi
8898   if ac_fn_c_try_link "$LINENO"; then :
8899   ac_cv_search_waddstr=$ac_res
8900 fi
8901 rm -f core conftest.err conftest.$ac_objext \
8902     conftest$ac_exeext
8903   if test "${ac_cv_search_waddstr+set}" = set; then :
8904   break
8905 fi
8906 done
8907 if test "${ac_cv_search_waddstr+set}" = set; then :
8908
8909 else
8910   ac_cv_search_waddstr=no
8911 fi
8912 rm conftest.$ac_ext
8913 LIBS=$ac_func_search_save_LIBS
8914 fi
8915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8916 $as_echo "$ac_cv_search_waddstr" >&6; }
8917 ac_res=$ac_cv_search_waddstr
8918 if test "$ac_res" != no; then :
8919   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8920
8921 fi
8922
8923
8924   if test "$ac_cv_search_waddstr" != no; then
8925     curses_found=yes
8926   fi
8927 fi
8928
8929 # Check whether we should enable the TUI, but only do so if we really
8930 # can.
8931 if test x"$enable_tui" != xno; then
8932   if test -d $srcdir/tui; then
8933     if test "$curses_found" != no; then
8934       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8935       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8936       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8937       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8938     else
8939       if test x"$enable_tui" = xyes; then
8940         as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
8941       else
8942         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8943 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8944       fi
8945     fi
8946   fi
8947 fi
8948
8949 # Since GDB uses Readline, we need termcap functionality.  In many
8950 # cases this will be provided by the curses library, but some systems
8951 # have a seperate termcap library, or no curses library at all.
8952
8953 case $host_os in
8954   cygwin*)
8955     if test -d $srcdir/libtermcap; then
8956       LIBS="../libtermcap/libtermcap.a $LIBS"
8957       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8958     fi ;;
8959   go32* | *djgpp*)
8960     ac_cv_search_tgetent="none required"
8961     ;;
8962 esac
8963
8964 # These are the libraries checked by Readline.
8965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8966 $as_echo_n "checking for library containing tgetent... " >&6; }
8967 if test "${ac_cv_search_tgetent+set}" = set; then :
8968   $as_echo_n "(cached) " >&6
8969 else
8970   ac_func_search_save_LIBS=$LIBS
8971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8972 /* end confdefs.h.  */
8973
8974 /* Override any GCC internal prototype to avoid an error.
8975    Use char because int might match the return type of a GCC
8976    builtin and then its argument prototype would still apply.  */
8977 #ifdef __cplusplus
8978 extern "C"
8979 #endif
8980 char tgetent ();
8981 int
8982 main ()
8983 {
8984 return tgetent ();
8985   ;
8986   return 0;
8987 }
8988 _ACEOF
8989 for ac_lib in '' termcap tinfo curses ncurses; do
8990   if test -z "$ac_lib"; then
8991     ac_res="none required"
8992   else
8993     ac_res=-l$ac_lib
8994     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8995   fi
8996   if ac_fn_c_try_link "$LINENO"; then :
8997   ac_cv_search_tgetent=$ac_res
8998 fi
8999 rm -f core conftest.err conftest.$ac_objext \
9000     conftest$ac_exeext
9001   if test "${ac_cv_search_tgetent+set}" = set; then :
9002   break
9003 fi
9004 done
9005 if test "${ac_cv_search_tgetent+set}" = set; then :
9006
9007 else
9008   ac_cv_search_tgetent=no
9009 fi
9010 rm conftest.$ac_ext
9011 LIBS=$ac_func_search_save_LIBS
9012 fi
9013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9014 $as_echo "$ac_cv_search_tgetent" >&6; }
9015 ac_res=$ac_cv_search_tgetent
9016 if test "$ac_res" != no; then :
9017   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9018
9019 fi
9020
9021
9022 if test "$ac_cv_search_tgetent" = no; then
9023   CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9024 fi
9025
9026
9027 # Check whether --with-system-readline was given.
9028 if test "${with_system_readline+set}" = set; then :
9029   withval=$with_system_readline;
9030 fi
9031
9032
9033 if test "$with_system_readline" = yes; then
9034   READLINE=-lreadline
9035   READLINE_DEPS=
9036   READLINE_CFLAGS=
9037   READLINE_TEXI_INCFLAG=
9038 else
9039   READLINE='$(READLINE_DIR)/libreadline.a'
9040   READLINE_DEPS='$(READLINE)'
9041   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9042   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9043 fi
9044
9045
9046
9047
9048
9049 # Generate jit-reader.h
9050
9051 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9052 TARGET_PTR=
9053
9054 # The cast to long int works around a bug in the HP C Compiler
9055 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9056 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9057 # This bug is HP SR number 8606223364.
9058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9059 $as_echo_n "checking size of unsigned long long... " >&6; }
9060 if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
9061   $as_echo_n "(cached) " >&6
9062 else
9063   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
9064
9065 else
9066   if test "$ac_cv_type_unsigned_long_long" = yes; then
9067      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9068 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9069 { as_fn_set_status 77
9070 as_fn_error "cannot compute sizeof (unsigned long long)
9071 See \`config.log' for more details." "$LINENO" 5; }; }
9072    else
9073      ac_cv_sizeof_unsigned_long_long=0
9074    fi
9075 fi
9076
9077 fi
9078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9079 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9080
9081
9082
9083 cat >>confdefs.h <<_ACEOF
9084 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9085 _ACEOF
9086
9087
9088 # The cast to long int works around a bug in the HP C Compiler
9089 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9090 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9091 # This bug is HP SR number 8606223364.
9092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9093 $as_echo_n "checking size of unsigned long... " >&6; }
9094 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
9095   $as_echo_n "(cached) " >&6
9096 else
9097   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
9098
9099 else
9100   if test "$ac_cv_type_unsigned_long" = yes; then
9101      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9102 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9103 { as_fn_set_status 77
9104 as_fn_error "cannot compute sizeof (unsigned long)
9105 See \`config.log' for more details." "$LINENO" 5; }; }
9106    else
9107      ac_cv_sizeof_unsigned_long=0
9108    fi
9109 fi
9110
9111 fi
9112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9113 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9114
9115
9116
9117 cat >>confdefs.h <<_ACEOF
9118 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9119 _ACEOF
9120
9121
9122 # The cast to long int works around a bug in the HP C Compiler
9123 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9124 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9125 # This bug is HP SR number 8606223364.
9126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9127 $as_echo_n "checking size of unsigned __int128... " >&6; }
9128 if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
9129   $as_echo_n "(cached) " >&6
9130 else
9131   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
9132
9133 else
9134   if test "$ac_cv_type_unsigned___int128" = yes; then
9135      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9136 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9137 { as_fn_set_status 77
9138 as_fn_error "cannot compute sizeof (unsigned __int128)
9139 See \`config.log' for more details." "$LINENO" 5; }; }
9140    else
9141      ac_cv_sizeof_unsigned___int128=0
9142    fi
9143 fi
9144
9145 fi
9146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9147 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9148
9149
9150
9151 cat >>confdefs.h <<_ACEOF
9152 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9153 _ACEOF
9154
9155
9156
9157 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9158   TARGET_PTR="unsigned long"
9159 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9160   TARGET_PTR="unsigned long long"
9161 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9162   TARGET_PTR="unsigned __int128"
9163 else
9164   TARGET_PTR="unsigned long"
9165 fi
9166
9167
9168 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9169
9170
9171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9172 $as_echo_n "checking for library containing dlopen... " >&6; }
9173 if test "${ac_cv_search_dlopen+set}" = set; then :
9174   $as_echo_n "(cached) " >&6
9175 else
9176   ac_func_search_save_LIBS=$LIBS
9177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9178 /* end confdefs.h.  */
9179
9180 /* Override any GCC internal prototype to avoid an error.
9181    Use char because int might match the return type of a GCC
9182    builtin and then its argument prototype would still apply.  */
9183 #ifdef __cplusplus
9184 extern "C"
9185 #endif
9186 char dlopen ();
9187 int
9188 main ()
9189 {
9190 return dlopen ();
9191   ;
9192   return 0;
9193 }
9194 _ACEOF
9195 for ac_lib in '' dl; do
9196   if test -z "$ac_lib"; then
9197     ac_res="none required"
9198   else
9199     ac_res=-l$ac_lib
9200     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9201   fi
9202   if ac_fn_c_try_link "$LINENO"; then :
9203   ac_cv_search_dlopen=$ac_res
9204 fi
9205 rm -f core conftest.err conftest.$ac_objext \
9206     conftest$ac_exeext
9207   if test "${ac_cv_search_dlopen+set}" = set; then :
9208   break
9209 fi
9210 done
9211 if test "${ac_cv_search_dlopen+set}" = set; then :
9212
9213 else
9214   ac_cv_search_dlopen=no
9215 fi
9216 rm conftest.$ac_ext
9217 LIBS=$ac_func_search_save_LIBS
9218 fi
9219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9220 $as_echo "$ac_cv_search_dlopen" >&6; }
9221 ac_res=$ac_cv_search_dlopen
9222 if test "$ac_res" != no; then :
9223   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9224
9225 fi
9226
9227
9228
9229
9230 # Check whether --with-jit-reader-dir was given.
9231 if test "${with_jit_reader_dir+set}" = set; then :
9232   withval=$with_jit_reader_dir;
9233     JIT_READER_DIR=$withval
9234 else
9235   JIT_READER_DIR=${libdir}/gdb
9236 fi
9237
9238
9239   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9240   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9241   ac_define_dir=`eval echo $JIT_READER_DIR`
9242   ac_define_dir=`eval echo $ac_define_dir`
9243
9244 cat >>confdefs.h <<_ACEOF
9245 #define JIT_READER_DIR "$ac_define_dir"
9246 _ACEOF
9247
9248
9249
9250
9251   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9252      if test "x$prefix" = xNONE; then
9253         test_prefix=/usr/local
9254      else
9255         test_prefix=$prefix
9256      fi
9257   else
9258      test_prefix=$exec_prefix
9259   fi
9260   value=0
9261   case ${ac_define_dir} in
9262      "${test_prefix}"|"${test_prefix}/"*|\
9263         '${exec_prefix}'|'${exec_prefix}/'*)
9264      value=1
9265      ;;
9266   esac
9267
9268 cat >>confdefs.h <<_ACEOF
9269 #define JIT_READER_DIR_RELOCATABLE $value
9270 _ACEOF
9271
9272
9273
9274
9275
9276 # Check whether --with-expat was given.
9277 if test "${with_expat+set}" = set; then :
9278   withval=$with_expat;
9279 else
9280   with_expat=auto
9281 fi
9282
9283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9284 $as_echo_n "checking whether to use expat... " >&6; }
9285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9286 $as_echo "$with_expat" >&6; }
9287
9288 if test "${with_expat}" = no; then
9289   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9290 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9291   HAVE_LIBEXPAT=no
9292 else
9293
9294
9295
9296
9297
9298
9299
9300
9301     use_additional=yes
9302
9303   acl_save_prefix="$prefix"
9304   prefix="$acl_final_prefix"
9305   acl_save_exec_prefix="$exec_prefix"
9306   exec_prefix="$acl_final_exec_prefix"
9307
9308     eval additional_includedir=\"$includedir\"
9309     eval additional_libdir=\"$libdir\"
9310
9311   exec_prefix="$acl_save_exec_prefix"
9312   prefix="$acl_save_prefix"
9313
9314
9315 # Check whether --with-libexpat-prefix was given.
9316 if test "${with_libexpat_prefix+set}" = set; then :
9317   withval=$with_libexpat_prefix;
9318     if test "X$withval" = "Xno"; then
9319       use_additional=no
9320     else
9321       if test "X$withval" = "X"; then
9322
9323   acl_save_prefix="$prefix"
9324   prefix="$acl_final_prefix"
9325   acl_save_exec_prefix="$exec_prefix"
9326   exec_prefix="$acl_final_exec_prefix"
9327
9328           eval additional_includedir=\"$includedir\"
9329           eval additional_libdir=\"$libdir\"
9330
9331   exec_prefix="$acl_save_exec_prefix"
9332   prefix="$acl_save_prefix"
9333
9334       else
9335         additional_includedir="$withval/include"
9336         additional_libdir="$withval/lib"
9337       fi
9338     fi
9339
9340 fi
9341
9342       LIBEXPAT=
9343   LTLIBEXPAT=
9344   INCEXPAT=
9345   rpathdirs=
9346   ltrpathdirs=
9347   names_already_handled=
9348   names_next_round='expat '
9349   while test -n "$names_next_round"; do
9350     names_this_round="$names_next_round"
9351     names_next_round=
9352     for name in $names_this_round; do
9353       already_handled=
9354       for n in $names_already_handled; do
9355         if test "$n" = "$name"; then
9356           already_handled=yes
9357           break
9358         fi
9359       done
9360       if test -z "$already_handled"; then
9361         names_already_handled="$names_already_handled $name"
9362                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9363         eval value=\"\$HAVE_LIB$uppername\"
9364         if test -n "$value"; then
9365           if test "$value" = yes; then
9366             eval value=\"\$LIB$uppername\"
9367             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9368             eval value=\"\$LTLIB$uppername\"
9369             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9370           else
9371                                     :
9372           fi
9373         else
9374                               found_dir=
9375           found_la=
9376           found_so=
9377           found_a=
9378           if test $use_additional = yes; then
9379             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9380               found_dir="$additional_libdir"
9381               found_so="$additional_libdir/lib$name.$shlibext"
9382               if test -f "$additional_libdir/lib$name.la"; then
9383                 found_la="$additional_libdir/lib$name.la"
9384               fi
9385             else
9386               if test -f "$additional_libdir/lib$name.$libext"; then
9387                 found_dir="$additional_libdir"
9388                 found_a="$additional_libdir/lib$name.$libext"
9389                 if test -f "$additional_libdir/lib$name.la"; then
9390                   found_la="$additional_libdir/lib$name.la"
9391                 fi
9392               fi
9393             fi
9394           fi
9395           if test "X$found_dir" = "X"; then
9396             for x in $LDFLAGS $LTLIBEXPAT; do
9397
9398   acl_save_prefix="$prefix"
9399   prefix="$acl_final_prefix"
9400   acl_save_exec_prefix="$exec_prefix"
9401   exec_prefix="$acl_final_exec_prefix"
9402   eval x=\"$x\"
9403   exec_prefix="$acl_save_exec_prefix"
9404   prefix="$acl_save_prefix"
9405
9406               case "$x" in
9407                 -L*)
9408                   dir=`echo "X$x" | sed -e 's/^X-L//'`
9409                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9410                     found_dir="$dir"
9411                     found_so="$dir/lib$name.$shlibext"
9412                     if test -f "$dir/lib$name.la"; then
9413                       found_la="$dir/lib$name.la"
9414                     fi
9415                   else
9416                     if test -f "$dir/lib$name.$libext"; then
9417                       found_dir="$dir"
9418                       found_a="$dir/lib$name.$libext"
9419                       if test -f "$dir/lib$name.la"; then
9420                         found_la="$dir/lib$name.la"
9421                       fi
9422                     fi
9423                   fi
9424                   ;;
9425               esac
9426               if test "X$found_dir" != "X"; then
9427                 break
9428               fi
9429             done
9430           fi
9431           if test "X$found_dir" != "X"; then
9432                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9433             if test "X$found_so" != "X"; then
9434                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9435                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9436               else
9437                                                                                 haveit=
9438                 for x in $ltrpathdirs; do
9439                   if test "X$x" = "X$found_dir"; then
9440                     haveit=yes
9441                     break
9442                   fi
9443                 done
9444                 if test -z "$haveit"; then
9445                   ltrpathdirs="$ltrpathdirs $found_dir"
9446                 fi
9447                                 if test "$hardcode_direct" = yes; then
9448                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9449                 else
9450                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9451                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9452                                                             haveit=
9453                     for x in $rpathdirs; do
9454                       if test "X$x" = "X$found_dir"; then
9455                         haveit=yes
9456                         break
9457                       fi
9458                     done
9459                     if test -z "$haveit"; then
9460                       rpathdirs="$rpathdirs $found_dir"
9461                     fi
9462                   else
9463                                                                                 haveit=
9464                     for x in $LDFLAGS $LIBEXPAT; do
9465
9466   acl_save_prefix="$prefix"
9467   prefix="$acl_final_prefix"
9468   acl_save_exec_prefix="$exec_prefix"
9469   exec_prefix="$acl_final_exec_prefix"
9470   eval x=\"$x\"
9471   exec_prefix="$acl_save_exec_prefix"
9472   prefix="$acl_save_prefix"
9473
9474                       if test "X$x" = "X-L$found_dir"; then
9475                         haveit=yes
9476                         break
9477                       fi
9478                     done
9479                     if test -z "$haveit"; then
9480                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9481                     fi
9482                     if test "$hardcode_minus_L" != no; then
9483                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9484                     else
9485                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9486                     fi
9487                   fi
9488                 fi
9489               fi
9490             else
9491               if test "X$found_a" != "X"; then
9492                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9493               else
9494                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9495               fi
9496             fi
9497                         additional_includedir=
9498             case "$found_dir" in
9499               */lib | */lib/)
9500                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9501                 additional_includedir="$basedir/include"
9502                 ;;
9503             esac
9504             if test "X$additional_includedir" != "X"; then
9505                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
9506                 haveit=
9507                 if test "X$additional_includedir" = "X/usr/local/include"; then
9508                   if test -n "$GCC"; then
9509                     case $host_os in
9510                       linux*) haveit=yes;;
9511                     esac
9512                   fi
9513                 fi
9514                 if test -z "$haveit"; then
9515                   for x in $CPPFLAGS $INCEXPAT; do
9516
9517   acl_save_prefix="$prefix"
9518   prefix="$acl_final_prefix"
9519   acl_save_exec_prefix="$exec_prefix"
9520   exec_prefix="$acl_final_exec_prefix"
9521   eval x=\"$x\"
9522   exec_prefix="$acl_save_exec_prefix"
9523   prefix="$acl_save_prefix"
9524
9525                     if test "X$x" = "X-I$additional_includedir"; then
9526                       haveit=yes
9527                       break
9528                     fi
9529                   done
9530                   if test -z "$haveit"; then
9531                     if test -d "$additional_includedir"; then
9532                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9533                     fi
9534                   fi
9535                 fi
9536               fi
9537             fi
9538                         if test -n "$found_la"; then
9539                                                         save_libdir="$libdir"
9540               case "$found_la" in
9541                 */* | *\\*) . "$found_la" ;;
9542                 *) . "./$found_la" ;;
9543               esac
9544               libdir="$save_libdir"
9545                             for dep in $dependency_libs; do
9546                 case "$dep" in
9547                   -L*)
9548                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9549                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
9550                       haveit=
9551                       if test "X$additional_libdir" = "X/usr/local/lib"; then
9552                         if test -n "$GCC"; then
9553                           case $host_os in
9554                             linux*) haveit=yes;;
9555                           esac
9556                         fi
9557                       fi
9558                       if test -z "$haveit"; then
9559                         haveit=
9560                         for x in $LDFLAGS $LIBEXPAT; do
9561
9562   acl_save_prefix="$prefix"
9563   prefix="$acl_final_prefix"
9564   acl_save_exec_prefix="$exec_prefix"
9565   exec_prefix="$acl_final_exec_prefix"
9566   eval x=\"$x\"
9567   exec_prefix="$acl_save_exec_prefix"
9568   prefix="$acl_save_prefix"
9569
9570                           if test "X$x" = "X-L$additional_libdir"; then
9571                             haveit=yes
9572                             break
9573                           fi
9574                         done
9575                         if test -z "$haveit"; then
9576                           if test -d "$additional_libdir"; then
9577                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9578                           fi
9579                         fi
9580                         haveit=
9581                         for x in $LDFLAGS $LTLIBEXPAT; do
9582
9583   acl_save_prefix="$prefix"
9584   prefix="$acl_final_prefix"
9585   acl_save_exec_prefix="$exec_prefix"
9586   exec_prefix="$acl_final_exec_prefix"
9587   eval x=\"$x\"
9588   exec_prefix="$acl_save_exec_prefix"
9589   prefix="$acl_save_prefix"
9590
9591                           if test "X$x" = "X-L$additional_libdir"; then
9592                             haveit=yes
9593                             break
9594                           fi
9595                         done
9596                         if test -z "$haveit"; then
9597                           if test -d "$additional_libdir"; then
9598                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9599                           fi
9600                         fi
9601                       fi
9602                     fi
9603                     ;;
9604                   -R*)
9605                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
9606                     if test "$enable_rpath" != no; then
9607                                                                   haveit=
9608                       for x in $rpathdirs; do
9609                         if test "X$x" = "X$dir"; then
9610                           haveit=yes
9611                           break
9612                         fi
9613                       done
9614                       if test -z "$haveit"; then
9615                         rpathdirs="$rpathdirs $dir"
9616                       fi
9617                                                                   haveit=
9618                       for x in $ltrpathdirs; do
9619                         if test "X$x" = "X$dir"; then
9620                           haveit=yes
9621                           break
9622                         fi
9623                       done
9624                       if test -z "$haveit"; then
9625                         ltrpathdirs="$ltrpathdirs $dir"
9626                       fi
9627                     fi
9628                     ;;
9629                   -l*)
9630                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9631                     ;;
9632                   *.la)
9633                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9634                     ;;
9635                   *)
9636                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9637                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9638                     ;;
9639                 esac
9640               done
9641             fi
9642           else
9643                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9644             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9645           fi
9646         fi
9647       fi
9648     done
9649   done
9650   if test "X$rpathdirs" != "X"; then
9651     if test -n "$hardcode_libdir_separator"; then
9652                         alldirs=
9653       for found_dir in $rpathdirs; do
9654         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9655       done
9656             acl_save_libdir="$libdir"
9657       libdir="$alldirs"
9658       eval flag=\"$hardcode_libdir_flag_spec\"
9659       libdir="$acl_save_libdir"
9660       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9661     else
9662             for found_dir in $rpathdirs; do
9663         acl_save_libdir="$libdir"
9664         libdir="$found_dir"
9665         eval flag=\"$hardcode_libdir_flag_spec\"
9666         libdir="$acl_save_libdir"
9667         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9668       done
9669     fi
9670   fi
9671   if test "X$ltrpathdirs" != "X"; then
9672             for found_dir in $ltrpathdirs; do
9673       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9674     done
9675   fi
9676
9677
9678         ac_save_CPPFLAGS="$CPPFLAGS"
9679
9680   for element in $INCEXPAT; do
9681     haveit=
9682     for x in $CPPFLAGS; do
9683
9684   acl_save_prefix="$prefix"
9685   prefix="$acl_final_prefix"
9686   acl_save_exec_prefix="$exec_prefix"
9687   exec_prefix="$acl_final_exec_prefix"
9688   eval x=\"$x\"
9689   exec_prefix="$acl_save_exec_prefix"
9690   prefix="$acl_save_prefix"
9691
9692       if test "X$x" = "X$element"; then
9693         haveit=yes
9694         break
9695       fi
9696     done
9697     if test -z "$haveit"; then
9698       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9699     fi
9700   done
9701
9702
9703   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9704 $as_echo_n "checking for libexpat... " >&6; }
9705 if test "${ac_cv_libexpat+set}" = set; then :
9706   $as_echo_n "(cached) " >&6
9707 else
9708
9709     ac_save_LIBS="$LIBS"
9710     LIBS="$LIBS $LIBEXPAT"
9711     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9712 /* end confdefs.h.  */
9713 #include "expat.h"
9714 int
9715 main ()
9716 {
9717 XML_Parser p = XML_ParserCreate (0);
9718   ;
9719   return 0;
9720 }
9721 _ACEOF
9722 if ac_fn_c_try_link "$LINENO"; then :
9723   ac_cv_libexpat=yes
9724 else
9725   ac_cv_libexpat=no
9726 fi
9727 rm -f core conftest.err conftest.$ac_objext \
9728     conftest$ac_exeext conftest.$ac_ext
9729     LIBS="$ac_save_LIBS"
9730
9731 fi
9732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9733 $as_echo "$ac_cv_libexpat" >&6; }
9734   if test "$ac_cv_libexpat" = yes; then
9735     HAVE_LIBEXPAT=yes
9736
9737 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9738
9739     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9740 $as_echo_n "checking how to link with libexpat... " >&6; }
9741     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9742 $as_echo "$LIBEXPAT" >&6; }
9743   else
9744     HAVE_LIBEXPAT=no
9745             CPPFLAGS="$ac_save_CPPFLAGS"
9746     LIBEXPAT=
9747     LTLIBEXPAT=
9748   fi
9749
9750
9751
9752
9753
9754
9755   if test "$HAVE_LIBEXPAT" != yes; then
9756     if test "$with_expat" = yes; then
9757       as_fn_error "expat is missing or unusable" "$LINENO" 5
9758     else
9759       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9760 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9761     fi
9762   else
9763     save_LIBS=$LIBS
9764     LIBS="$LIBS $LIBEXPAT"
9765     for ac_func in XML_StopParser
9766 do :
9767   ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9768 if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
9769   cat >>confdefs.h <<_ACEOF
9770 #define HAVE_XML_STOPPARSER 1
9771 _ACEOF
9772
9773 fi
9774 done
9775
9776     LIBS=$save_LIBS
9777   fi
9778 fi
9779
9780 # --------------------- #
9781 # Check for libpython.  #
9782 # --------------------- #
9783
9784
9785
9786
9787
9788
9789 # Check whether --with-python was given.
9790 if test "${with_python+set}" = set; then :
9791   withval=$with_python;
9792 else
9793   with_python=auto
9794 fi
9795
9796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
9797 $as_echo_n "checking whether to use python... " >&6; }
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
9799 $as_echo "$with_python" >&6; }
9800
9801 if test "${with_python}" = no; then
9802   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
9803 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
9804   have_libpython=no
9805 else
9806   case "${with_python}" in
9807   [\\/]* | ?:[\\/]*)
9808     if test -d ${with_python}; then
9809       # Assume the python binary is ${with_python}/bin/python.
9810       python_prog="${with_python}/bin/python"
9811       python_prefix=
9812       # If python does not exit ${with_python}/bin, then try in
9813       # ${with_python}.  On Windows/MinGW, this is where the Python
9814       # executable is.
9815       if test ! -x "${python_prog}"; then
9816         python_prog="${with_python}/python"
9817         python_prefix=
9818       fi
9819       if test ! -x "${python_prog}"; then
9820         # Fall back to gdb 7.0/7.1 behaviour.
9821         python_prog=missing
9822         python_prefix=${with_python}
9823       fi
9824     elif test -x "${with_python}"; then
9825       # While we can't run python compiled for $host (unless host == build),
9826       # the user could write a script that provides the needed information,
9827       # so we support that.
9828       python_prog=${with_python}
9829       python_prefix=
9830     else
9831       as_fn_error "invalid value for --with-python" "$LINENO" 5
9832     fi
9833     ;;
9834   */*)
9835     # Disallow --with-python=foo/bar.
9836     as_fn_error "invalid value for --with-python" "$LINENO" 5
9837     ;;
9838   *)
9839     # The user has either specified auto, yes, or the name of the python
9840     # program assumed to be in $PATH.
9841     python_prefix=
9842     case "${with_python}" in
9843     yes | auto)
9844       if test ${build} = ${host}; then
9845         # Extract the first word of "python", so it can be a program name with args.
9846 set dummy python; ac_word=$2
9847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9848 $as_echo_n "checking for $ac_word... " >&6; }
9849 if test "${ac_cv_path_python_prog_path+set}" = set; then :
9850   $as_echo_n "(cached) " >&6
9851 else
9852   case $python_prog_path in
9853   [\\/]* | ?:[\\/]*)
9854   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9855   ;;
9856   *)
9857   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9858 for as_dir in $PATH
9859 do
9860   IFS=$as_save_IFS
9861   test -z "$as_dir" && as_dir=.
9862     for ac_exec_ext in '' $ac_executable_extensions; do
9863   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9864     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9866     break 2
9867   fi
9868 done
9869   done
9870 IFS=$as_save_IFS
9871
9872   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9873   ;;
9874 esac
9875 fi
9876 python_prog_path=$ac_cv_path_python_prog_path
9877 if test -n "$python_prog_path"; then
9878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9879 $as_echo "$python_prog_path" >&6; }
9880 else
9881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9882 $as_echo "no" >&6; }
9883 fi
9884
9885
9886         if test "${python_prog_path}" = missing; then
9887           python_prog=missing
9888         else
9889           python_prog=${python_prog_path}
9890         fi
9891       else
9892         # Not much we can do except assume the cross-compiler will find the
9893         # right files.
9894         python_prog=missing
9895       fi
9896       ;;
9897     *)
9898       # While we can't run python compiled for $host (unless host == build),
9899       # the user could write a script that provides the needed information,
9900       # so we support that.
9901       python_prog="${with_python}"
9902       # Extract the first word of "${python_prog}", so it can be a program name with args.
9903 set dummy ${python_prog}; ac_word=$2
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9905 $as_echo_n "checking for $ac_word... " >&6; }
9906 if test "${ac_cv_path_python_prog_path+set}" = set; then :
9907   $as_echo_n "(cached) " >&6
9908 else
9909   case $python_prog_path in
9910   [\\/]* | ?:[\\/]*)
9911   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9912   ;;
9913   *)
9914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9915 for as_dir in $PATH
9916 do
9917   IFS=$as_save_IFS
9918   test -z "$as_dir" && as_dir=.
9919     for ac_exec_ext in '' $ac_executable_extensions; do
9920   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9921     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9922     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9923     break 2
9924   fi
9925 done
9926   done
9927 IFS=$as_save_IFS
9928
9929   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9930   ;;
9931 esac
9932 fi
9933 python_prog_path=$ac_cv_path_python_prog_path
9934 if test -n "$python_prog_path"; then
9935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9936 $as_echo "$python_prog_path" >&6; }
9937 else
9938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9939 $as_echo "no" >&6; }
9940 fi
9941
9942
9943       if test "${python_prog_path}" = missing; then
9944         as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9945       fi
9946       ;;
9947     esac
9948   esac
9949
9950   if test "${python_prog}" != missing; then
9951     # We have a python program to use, but it may be too old.
9952     # Don't flag an error for --with-python=auto (the default).
9953     have_python_config=yes
9954     python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9955     if test $? != 0; then
9956       have_python_config=failed
9957       if test "${with_python}" != auto; then
9958         as_fn_error "failure running python-config --includes" "$LINENO" 5
9959       fi
9960     fi
9961     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9962     if test $? != 0; then
9963       have_python_config=failed
9964       if test "${with_python}" != auto; then
9965         as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9966       fi
9967     fi
9968     python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9969     if test $? != 0; then
9970       have_python_config=failed
9971       if test "${with_python}" != auto; then
9972         as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9973       fi
9974     fi
9975   else
9976     # We do not have a python executable we can use to determine where
9977     # to find the Python headers and libs.  We cannot guess the include
9978     # path from the python_prefix either, because that include path
9979     # depends on the Python version.  So, there is nothing much we can
9980     # do except assume that the compiler will be able to find those files.
9981     python_includes=
9982     python_libs=
9983     have_python_config=no
9984   fi
9985
9986   # If we have python-config, only try the configuration it provides.
9987   # Otherwise fallback on the old way of trying different versions of
9988   # python in turn.
9989
9990   have_libpython=no
9991   if test "${have_python_config}" = yes; then
9992     # Determine the Python version by extracting "-lpython<version>"
9993     # part of the python_libs. <version> is usually X.Y with X and Y
9994     # being decimal numbers, but can also be XY (seen on Windows).
9995     #
9996     # The extraction is performed using sed with a regular expression.
9997     # Initially, the regexp used was using the '?' quantifier to make
9998     # the dot in the version number optional.  Unfortunately, this
9999     # does not work with non-GNU versions of sed because, because of
10000     # what looks like a limitation (the '?' quantifier does not work
10001     # with back-references).  We work around this limitation by using
10002     # the '*' quantifier instead.  It means that, in theory, we might
10003     # match unexpected version strings such as "-lpython2..7", but
10004     # this seems unlikely in practice.  And even if that happens,
10005     # an error will be triggered later on, when checking that version
10006     # number.
10007     python_version=`echo " ${python_libs} " \
10008                          | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
10009     case "${python_version}" in
10010     python*)
10011
10012   version=${python_version}
10013
10014   new_CPPFLAGS=${python_includes}
10015   new_LIBS=${python_libs}
10016   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10017 $as_echo_n "checking for ${version}... " >&6; }
10018   save_CPPFLAGS=$CPPFLAGS
10019   save_LIBS=$LIBS
10020   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10021   LIBS="$LIBS $new_LIBS"
10022   found_usable_python=no
10023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10024 /* end confdefs.h.  */
10025 #include "Python.h"
10026 int
10027 main ()
10028 {
10029 Py_Initialize ();
10030   ;
10031   return 0;
10032 }
10033 _ACEOF
10034 if ac_fn_c_try_link "$LINENO"; then :
10035   have_libpython=${version}
10036                   found_usable_python=yes
10037                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10038                   PYTHON_LIBS=$new_LIBS
10039 fi
10040 rm -f core conftest.err conftest.$ac_objext \
10041     conftest$ac_exeext conftest.$ac_ext
10042   CPPFLAGS=$save_CPPFLAGS
10043   LIBS=$save_LIBS
10044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10045 $as_echo "${found_usable_python}" >&6; }
10046
10047       ;;
10048     *)
10049       as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
10050       ;;
10051     esac
10052   elif test "${have_python_config}" != failed; then
10053     if test "${have_libpython}" = no; then
10054
10055   version=python2.7
10056
10057   new_CPPFLAGS=${python_includes}
10058   new_LIBS="${python_libs} -lpython2.7"
10059   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10060 $as_echo_n "checking for ${version}... " >&6; }
10061   save_CPPFLAGS=$CPPFLAGS
10062   save_LIBS=$LIBS
10063   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10064   LIBS="$LIBS $new_LIBS"
10065   found_usable_python=no
10066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10067 /* end confdefs.h.  */
10068 #include "Python.h"
10069 int
10070 main ()
10071 {
10072 Py_Initialize ();
10073   ;
10074   return 0;
10075 }
10076 _ACEOF
10077 if ac_fn_c_try_link "$LINENO"; then :
10078   have_libpython=${version}
10079                   found_usable_python=yes
10080                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10081                   PYTHON_LIBS=$new_LIBS
10082 fi
10083 rm -f core conftest.err conftest.$ac_objext \
10084     conftest$ac_exeext conftest.$ac_ext
10085   CPPFLAGS=$save_CPPFLAGS
10086   LIBS=$save_LIBS
10087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10088 $as_echo "${found_usable_python}" >&6; }
10089
10090     fi
10091     if test "${have_libpython}" = no; then
10092
10093   version=python2.6
10094
10095   new_CPPFLAGS=${python_includes}
10096   new_LIBS="${python_libs} -lpython2.6"
10097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10098 $as_echo_n "checking for ${version}... " >&6; }
10099   save_CPPFLAGS=$CPPFLAGS
10100   save_LIBS=$LIBS
10101   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10102   LIBS="$LIBS $new_LIBS"
10103   found_usable_python=no
10104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10105 /* end confdefs.h.  */
10106 #include "Python.h"
10107 int
10108 main ()
10109 {
10110 Py_Initialize ();
10111   ;
10112   return 0;
10113 }
10114 _ACEOF
10115 if ac_fn_c_try_link "$LINENO"; then :
10116   have_libpython=${version}
10117                   found_usable_python=yes
10118                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10119                   PYTHON_LIBS=$new_LIBS
10120 fi
10121 rm -f core conftest.err conftest.$ac_objext \
10122     conftest$ac_exeext conftest.$ac_ext
10123   CPPFLAGS=$save_CPPFLAGS
10124   LIBS=$save_LIBS
10125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10126 $as_echo "${found_usable_python}" >&6; }
10127
10128     fi
10129     if test ${have_libpython} = no; then
10130
10131   version=python2.5
10132
10133   new_CPPFLAGS=${python_includes}
10134   new_LIBS="${python_libs} -lpython2.5"
10135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10136 $as_echo_n "checking for ${version}... " >&6; }
10137   save_CPPFLAGS=$CPPFLAGS
10138   save_LIBS=$LIBS
10139   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10140   LIBS="$LIBS $new_LIBS"
10141   found_usable_python=no
10142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10143 /* end confdefs.h.  */
10144 #include "Python.h"
10145 int
10146 main ()
10147 {
10148 Py_Initialize ();
10149   ;
10150   return 0;
10151 }
10152 _ACEOF
10153 if ac_fn_c_try_link "$LINENO"; then :
10154   have_libpython=${version}
10155                   found_usable_python=yes
10156                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10157                   PYTHON_LIBS=$new_LIBS
10158 fi
10159 rm -f core conftest.err conftest.$ac_objext \
10160     conftest$ac_exeext conftest.$ac_ext
10161   CPPFLAGS=$save_CPPFLAGS
10162   LIBS=$save_LIBS
10163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10164 $as_echo "${found_usable_python}" >&6; }
10165
10166     fi
10167     if test ${have_libpython} = no; then
10168
10169   version=python2.4
10170
10171   new_CPPFLAGS=${python_includes}
10172   new_LIBS="${python_libs} -lpython2.4"
10173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10174 $as_echo_n "checking for ${version}... " >&6; }
10175   save_CPPFLAGS=$CPPFLAGS
10176   save_LIBS=$LIBS
10177   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10178   LIBS="$LIBS $new_LIBS"
10179   found_usable_python=no
10180   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10181 /* end confdefs.h.  */
10182 #include "Python.h"
10183 int
10184 main ()
10185 {
10186 Py_Initialize ();
10187   ;
10188   return 0;
10189 }
10190 _ACEOF
10191 if ac_fn_c_try_link "$LINENO"; then :
10192   have_libpython=${version}
10193                   found_usable_python=yes
10194                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10195                   PYTHON_LIBS=$new_LIBS
10196 fi
10197 rm -f core conftest.err conftest.$ac_objext \
10198     conftest$ac_exeext conftest.$ac_ext
10199   CPPFLAGS=$save_CPPFLAGS
10200   LIBS=$save_LIBS
10201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10202 $as_echo "${found_usable_python}" >&6; }
10203
10204     fi
10205   fi
10206   if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
10207
10208 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10209
10210   elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
10211
10212 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10213
10214   elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
10215
10216 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10217
10218   elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
10219
10220 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10221
10222   fi
10223
10224   if test "${have_libpython}" = no; then
10225     case "${with_python}" in
10226     yes)
10227       as_fn_error "python is missing or unusable" "$LINENO" 5
10228       ;;
10229     auto)
10230       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10231 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10232       ;;
10233     *)
10234       as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10235       ;;
10236     esac
10237   else
10238     if test -n "${python_prefix}"; then
10239
10240 cat >>confdefs.h <<_ACEOF
10241 #define WITH_PYTHON_PATH "${python_prefix}"
10242 _ACEOF
10243
10244
10245   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10246      if test "x$prefix" = xNONE; then
10247         test_prefix=/usr/local
10248      else
10249         test_prefix=$prefix
10250      fi
10251   else
10252      test_prefix=$exec_prefix
10253   fi
10254   value=0
10255   case ${python_prefix} in
10256      "${test_prefix}"|"${test_prefix}/"*|\
10257         '${exec_prefix}'|'${exec_prefix}/'*)
10258      value=1
10259      ;;
10260   esac
10261
10262 cat >>confdefs.h <<_ACEOF
10263 #define PYTHON_PATH_RELOCATABLE $value
10264 _ACEOF
10265
10266
10267     fi
10268   fi
10269 fi
10270
10271 if test "${have_libpython}" != no; then
10272
10273 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10274
10275   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10276   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10277   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10278   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10279   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10280
10281   # Flags needed to compile Python code (taken from python-config --cflags).
10282   # We cannot call python-config directly because it will output whatever was
10283   # used when compiling the Python interpreter itself, including flags which
10284   # would make the python-related objects be compiled differently from the
10285   # rest of GDB (e.g., -O2 and -fPIC).
10286   if test "${GCC}" = yes; then
10287     tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10288   fi
10289
10290   if test "x${tentative_python_cflags}" != x; then
10291     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10292 $as_echo_n "checking compiler flags for python code... " >&6; }
10293     for flag in ${tentative_python_cflags}; do
10294       # Check that the compiler accepts it
10295       saved_CFLAGS="$CFLAGS"
10296       CFLAGS="$CFLAGS $flag"
10297       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10298 /* end confdefs.h.  */
10299
10300 int
10301 main ()
10302 {
10303
10304   ;
10305   return 0;
10306 }
10307 _ACEOF
10308 if ac_fn_c_try_compile "$LINENO"; then :
10309   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10310 fi
10311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10312       CFLAGS="$saved_CFLAGS"
10313     done
10314     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10315 $as_echo "${PYTHON_CFLAGS}" >&6; }
10316   fi
10317
10318   # On x64 Windows, Python's include headers, and pyconfig.h in
10319   # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10320   # version of Windows.  Unfortunately, MS_WIN64 is only defined if
10321   # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
10322   # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10323   # The issue was reported to the Python community, but still isn't
10324   # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10325
10326   case "$gdb_host" in
10327     mingw64)
10328            if test "${GCC}" = yes; then
10329              CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10330            fi
10331            ;;
10332   esac
10333
10334   # Note that "python -m threading" cannot be used to check for
10335   # threading support due to a bug in Python 2.7.3
10336   # (http://bugs.python.org/issue15567).
10337   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10338 $as_echo_n "checking whether python supports threads... " >&6; }
10339   saved_CPPFLAGS="${CPPFLAGS}"
10340   CPPFLAGS="${PYTHON_CPPFLAGS}"
10341   # Note that the test is reversed so that python_has_threads=yes on
10342   # unexpected failures.
10343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344 /* end confdefs.h.  */
10345
10346 #include <Python.h>
10347 #ifdef WITH_THREAD
10348 # error
10349 #endif
10350
10351 _ACEOF
10352 if ac_fn_c_try_cpp "$LINENO"; then :
10353   python_has_threads=no
10354 else
10355   python_has_threads=yes
10356 fi
10357 rm -f conftest.err conftest.$ac_ext
10358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10359 $as_echo "${python_has_threads}" >&6; }
10360   CPPFLAGS="${saved_CPPFLAGS}"
10361 else
10362   # Even if Python support is not compiled in, we need to have this file
10363   # included so that the "python" command, et.al., still exists.
10364   CONFIG_OBS="$CONFIG_OBS python.o"
10365   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10366 fi
10367
10368 # Work around Python http://bugs.python.org/issue10112.  See also
10369 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10370 # no effect.  Note that the only test after this that uses Python is
10371 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10372 # run without -export-dynamic too.
10373 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10374
10375
10376
10377
10378  if test "${have_libpython}" != no; then
10379   HAVE_PYTHON_TRUE=
10380   HAVE_PYTHON_FALSE='#'
10381 else
10382   HAVE_PYTHON_TRUE='#'
10383   HAVE_PYTHON_FALSE=
10384 fi
10385
10386
10387 # -------------------- #
10388 # Check for libguile.  #
10389 # -------------------- #
10390
10391
10392
10393
10394
10395
10396 # Check whether --with-guile was given.
10397 if test "${with_guile+set}" = set; then :
10398   withval=$with_guile;
10399 else
10400   with_guile=auto
10401 fi
10402
10403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10404 $as_echo_n "checking whether to use guile... " >&6; }
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10406 $as_echo "$with_guile" >&6; }
10407
10408 # Extract the first word of "pkg-config", so it can be a program name with args.
10409 set dummy pkg-config; ac_word=$2
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411 $as_echo_n "checking for $ac_word... " >&6; }
10412 if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
10413   $as_echo_n "(cached) " >&6
10414 else
10415   case $pkg_config_prog_path in
10416   [\\/]* | ?:[\\/]*)
10417   ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10418   ;;
10419   *)
10420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421 for as_dir in $PATH
10422 do
10423   IFS=$as_save_IFS
10424   test -z "$as_dir" && as_dir=.
10425     for ac_exec_ext in '' $ac_executable_extensions; do
10426   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10427     ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429     break 2
10430   fi
10431 done
10432   done
10433 IFS=$as_save_IFS
10434
10435   test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10436   ;;
10437 esac
10438 fi
10439 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10440 if test -n "$pkg_config_prog_path"; then
10441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10442 $as_echo "$pkg_config_prog_path" >&6; }
10443 else
10444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445 $as_echo "no" >&6; }
10446 fi
10447
10448
10449
10450 try_guile_versions="guile-2.2 guile-2.0"
10451 have_libguile=no
10452 case "${with_guile}" in
10453 no)
10454   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10455 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10456   ;;
10457 auto)
10458   if test "${pkg_config_prog_path}" = "missing"; then
10459     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10460 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10461   else
10462
10463   pkg_config=${pkg_config_prog_path}
10464   guile_version_list=${try_guile_versions}
10465   flag_errors=no
10466
10467   found_usable_guile=checking
10468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10469 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10470   for guile_version in ${guile_version_list}; do
10471     ${pkg_config} --exists ${guile_version} 2>/dev/null
10472     if test $? != 0; then
10473       continue
10474     fi
10475             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10476     if test $? != 0; then
10477       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10478     fi
10479     new_LIBS=`${pkg_config} --libs ${guile_version}`
10480     if test $? != 0; then
10481       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10482     fi
10483         found_usable_guile=${guile_version}
10484     break
10485   done
10486   if test "${found_usable_guile}" = "checking"; then
10487     if test "${flag_errors}" = "yes"; then
10488       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10489     else
10490       found_usable_guile=no
10491     fi
10492   fi
10493       if test "${found_usable_guile}" != no; then
10494     save_CPPFLAGS=$CPPFLAGS
10495     save_LIBS=$LIBS
10496     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10497     LIBS="$LIBS $new_LIBS"
10498     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10499 /* end confdefs.h.  */
10500 #include "libguile.h"
10501 int
10502 main ()
10503 {
10504 scm_init_guile ();
10505   ;
10506   return 0;
10507 }
10508 _ACEOF
10509 if ac_fn_c_try_link "$LINENO"; then :
10510   have_libguile=yes
10511                     GUILE_CPPFLAGS=$new_CPPFLAGS
10512                     GUILE_LIBS=$new_LIBS
10513 else
10514   found_usable_guile=no
10515 fi
10516 rm -f core conftest.err conftest.$ac_objext \
10517     conftest$ac_exeext conftest.$ac_ext
10518         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10519 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10520
10521 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10522
10523
10524 fi
10525
10526     CPPFLAGS=$save_CPPFLAGS
10527     LIBS=$save_LIBS
10528     if test "${found_usable_guile}" = no; then
10529       if test "${flag_errors}" = yes; then
10530         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10531 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10532 as_fn_error "linking guile version ${guile_version} test program failed
10533 See \`config.log' for more details." "$LINENO" 5; }
10534       fi
10535     fi
10536   fi
10537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10538 $as_echo "${found_usable_guile}" >&6; }
10539
10540   fi
10541   ;;
10542 yes)
10543   if test "${pkg_config_prog_path}" = "missing"; then
10544     as_fn_error "pkg-config not found" "$LINENO" 5
10545   fi
10546
10547   pkg_config=${pkg_config_prog_path}
10548   guile_version_list=${try_guile_versions}
10549   flag_errors=yes
10550
10551   found_usable_guile=checking
10552   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10553 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10554   for guile_version in ${guile_version_list}; do
10555     ${pkg_config} --exists ${guile_version} 2>/dev/null
10556     if test $? != 0; then
10557       continue
10558     fi
10559             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10560     if test $? != 0; then
10561       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10562     fi
10563     new_LIBS=`${pkg_config} --libs ${guile_version}`
10564     if test $? != 0; then
10565       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10566     fi
10567         found_usable_guile=${guile_version}
10568     break
10569   done
10570   if test "${found_usable_guile}" = "checking"; then
10571     if test "${flag_errors}" = "yes"; then
10572       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10573     else
10574       found_usable_guile=no
10575     fi
10576   fi
10577       if test "${found_usable_guile}" != no; then
10578     save_CPPFLAGS=$CPPFLAGS
10579     save_LIBS=$LIBS
10580     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10581     LIBS="$LIBS $new_LIBS"
10582     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10583 /* end confdefs.h.  */
10584 #include "libguile.h"
10585 int
10586 main ()
10587 {
10588 scm_init_guile ();
10589   ;
10590   return 0;
10591 }
10592 _ACEOF
10593 if ac_fn_c_try_link "$LINENO"; then :
10594   have_libguile=yes
10595                     GUILE_CPPFLAGS=$new_CPPFLAGS
10596                     GUILE_LIBS=$new_LIBS
10597 else
10598   found_usable_guile=no
10599 fi
10600 rm -f core conftest.err conftest.$ac_objext \
10601     conftest$ac_exeext conftest.$ac_ext
10602         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10603 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10604
10605 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10606
10607
10608 fi
10609
10610     CPPFLAGS=$save_CPPFLAGS
10611     LIBS=$save_LIBS
10612     if test "${found_usable_guile}" = no; then
10613       if test "${flag_errors}" = yes; then
10614         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10615 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10616 as_fn_error "linking guile version ${guile_version} test program failed
10617 See \`config.log' for more details." "$LINENO" 5; }
10618       fi
10619     fi
10620   fi
10621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10622 $as_echo "${found_usable_guile}" >&6; }
10623
10624   ;;
10625 [\\/]* | ?:[\\/]*)
10626   if test -x "${with_guile}"; then
10627
10628   pkg_config=${with_guile}
10629   guile_version_list=${try_guile_versions}
10630   flag_errors=yes
10631
10632   found_usable_guile=checking
10633   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10634 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10635   for guile_version in ${guile_version_list}; do
10636     ${pkg_config} --exists ${guile_version} 2>/dev/null
10637     if test $? != 0; then
10638       continue
10639     fi
10640             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10641     if test $? != 0; then
10642       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10643     fi
10644     new_LIBS=`${pkg_config} --libs ${guile_version}`
10645     if test $? != 0; then
10646       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10647     fi
10648         found_usable_guile=${guile_version}
10649     break
10650   done
10651   if test "${found_usable_guile}" = "checking"; then
10652     if test "${flag_errors}" = "yes"; then
10653       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10654     else
10655       found_usable_guile=no
10656     fi
10657   fi
10658       if test "${found_usable_guile}" != no; then
10659     save_CPPFLAGS=$CPPFLAGS
10660     save_LIBS=$LIBS
10661     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10662     LIBS="$LIBS $new_LIBS"
10663     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10664 /* end confdefs.h.  */
10665 #include "libguile.h"
10666 int
10667 main ()
10668 {
10669 scm_init_guile ();
10670   ;
10671   return 0;
10672 }
10673 _ACEOF
10674 if ac_fn_c_try_link "$LINENO"; then :
10675   have_libguile=yes
10676                     GUILE_CPPFLAGS=$new_CPPFLAGS
10677                     GUILE_LIBS=$new_LIBS
10678 else
10679   found_usable_guile=no
10680 fi
10681 rm -f core conftest.err conftest.$ac_objext \
10682     conftest$ac_exeext conftest.$ac_ext
10683         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10684 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10685
10686 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10687
10688
10689 fi
10690
10691     CPPFLAGS=$save_CPPFLAGS
10692     LIBS=$save_LIBS
10693     if test "${found_usable_guile}" = no; then
10694       if test "${flag_errors}" = yes; then
10695         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10696 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10697 as_fn_error "linking guile version ${guile_version} test program failed
10698 See \`config.log' for more details." "$LINENO" 5; }
10699       fi
10700     fi
10701   fi
10702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10703 $as_echo "${found_usable_guile}" >&6; }
10704
10705   else
10706     as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
10707   fi
10708   ;;
10709 "" | */*)
10710   # Disallow --with=guile="" and --with-guile=foo/bar.
10711   as_fn_error "invalid value for --with-guile" "$LINENO" 5
10712   ;;
10713 *)
10714   # A space separate list of guile versions to try, in order.
10715   if test "${pkg_config_prog_path}" = "missing"; then
10716     as_fn_error "pkg-config not found" "$LINENO" 5
10717   fi
10718
10719   pkg_config=${pkg_config_prog_path}
10720   guile_version_list=${with_guile}
10721   flag_errors=yes
10722
10723   found_usable_guile=checking
10724   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10725 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10726   for guile_version in ${guile_version_list}; do
10727     ${pkg_config} --exists ${guile_version} 2>/dev/null
10728     if test $? != 0; then
10729       continue
10730     fi
10731             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10732     if test $? != 0; then
10733       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10734     fi
10735     new_LIBS=`${pkg_config} --libs ${guile_version}`
10736     if test $? != 0; then
10737       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10738     fi
10739         found_usable_guile=${guile_version}
10740     break
10741   done
10742   if test "${found_usable_guile}" = "checking"; then
10743     if test "${flag_errors}" = "yes"; then
10744       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10745     else
10746       found_usable_guile=no
10747     fi
10748   fi
10749       if test "${found_usable_guile}" != no; then
10750     save_CPPFLAGS=$CPPFLAGS
10751     save_LIBS=$LIBS
10752     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10753     LIBS="$LIBS $new_LIBS"
10754     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10755 /* end confdefs.h.  */
10756 #include "libguile.h"
10757 int
10758 main ()
10759 {
10760 scm_init_guile ();
10761   ;
10762   return 0;
10763 }
10764 _ACEOF
10765 if ac_fn_c_try_link "$LINENO"; then :
10766   have_libguile=yes
10767                     GUILE_CPPFLAGS=$new_CPPFLAGS
10768                     GUILE_LIBS=$new_LIBS
10769 else
10770   found_usable_guile=no
10771 fi
10772 rm -f core conftest.err conftest.$ac_objext \
10773     conftest$ac_exeext conftest.$ac_ext
10774         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10775 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10776
10777 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10778
10779
10780 fi
10781
10782     CPPFLAGS=$save_CPPFLAGS
10783     LIBS=$save_LIBS
10784     if test "${found_usable_guile}" = no; then
10785       if test "${flag_errors}" = yes; then
10786         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10787 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10788 as_fn_error "linking guile version ${guile_version} test program failed
10789 See \`config.log' for more details." "$LINENO" 5; }
10790       fi
10791     fi
10792   fi
10793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10794 $as_echo "${found_usable_guile}" >&6; }
10795
10796   ;;
10797 esac
10798
10799 if test "${have_libguile}" != no; then
10800     case "${with_guile}" in
10801   [\\/]* | ?:[\\/]*)
10802
10803   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10804 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10805 if test "${ac_cv_guild_program_name+set}" = set; then :
10806   $as_echo_n "(cached) " >&6
10807 else
10808   ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
10809
10810      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10811      # the 'guild' and 'bindir' variables.  In that case, try to guess
10812      # what the program name is, at the risk of getting it wrong if
10813      # Guile was configured with '--program-suffix' or similar.
10814      if test "x$ac_cv_guild_program_name" = "x"; then
10815        guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
10816        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10817      fi
10818
10819 fi
10820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10821 $as_echo "$ac_cv_guild_program_name" >&6; }
10822
10823   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10824     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10825   fi
10826
10827   GUILD="$ac_cv_guild_program_name"
10828
10829
10830     ;;
10831   *)
10832
10833   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10834 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10835 if test "${ac_cv_guild_program_name+set}" = set; then :
10836   $as_echo_n "(cached) " >&6
10837 else
10838   ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
10839
10840      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10841      # the 'guild' and 'bindir' variables.  In that case, try to guess
10842      # what the program name is, at the risk of getting it wrong if
10843      # Guile was configured with '--program-suffix' or similar.
10844      if test "x$ac_cv_guild_program_name" = "x"; then
10845        guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
10846        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10847      fi
10848
10849 fi
10850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10851 $as_echo "$ac_cv_guild_program_name" >&6; }
10852
10853   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10854     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10855   fi
10856
10857   GUILD="$ac_cv_guild_program_name"
10858
10859
10860     ;;
10861   esac
10862
10863
10864   if test "$cross_compiling" = no; then
10865     GUILD_TARGET_FLAG=
10866   else
10867     GUILD_TARGET_FLAG="--target=$host"
10868   fi
10869
10870
10871
10872
10873   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
10874 $as_echo_n "checking whether guild supports this host... " >&6; }
10875 if test "${ac_cv_guild_ok+set}" = set; then :
10876   $as_echo_n "(cached) " >&6
10877 else
10878   echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
10879      if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
10880        ac_cv_guild_ok=yes
10881      else
10882        ac_cv_guild_ok=no
10883      fi
10884 fi
10885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
10886 $as_echo "$ac_cv_guild_ok" >&6; }
10887
10888     if test "$ac_cv_guild_ok" = no; then
10889     have_libguile=no
10890     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
10891 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
10892   fi
10893 fi
10894
10895 if test "${have_libguile}" != no; then
10896
10897 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
10898
10899   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
10900   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
10901   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
10902   CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
10903   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
10904
10905     save_LIBS="$LIBS"
10906   save_CPPFLAGS="$CPPFLAGS"
10907   LIBS="$GUILE_LIBS"
10908   CPPFLAGS="$GUILE_CPPFLAGS"
10909   for ac_func in scm_new_smob
10910 do :
10911   ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
10912 if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
10913   cat >>confdefs.h <<_ACEOF
10914 #define HAVE_SCM_NEW_SMOB 1
10915 _ACEOF
10916
10917 fi
10918 done
10919
10920   LIBS="$save_LIBS"
10921   CPPFLAGS="$save_CPPFLAGS"
10922 else
10923   # Even if Guile support is not compiled in, we need to have these files
10924   # included.
10925   CONFIG_OBS="$CONFIG_OBS guile.o"
10926   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10927 fi
10928
10929
10930  if test "${have_libguile}" != no; then
10931   HAVE_GUILE_TRUE=
10932   HAVE_GUILE_FALSE='#'
10933 else
10934   HAVE_GUILE_TRUE='#'
10935   HAVE_GUILE_FALSE=
10936 fi
10937
10938
10939 # --------------------- #
10940 # Check for libmcheck.  #
10941 # --------------------- #
10942
10943 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
10944 # but turn it off if Python is enabled with threads, since -lmcheck is
10945 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10946 # and for releases.
10947 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10948    && $development; then
10949   libmcheck_default=yes
10950 else
10951   libmcheck_default=no
10952 fi
10953
10954   # Check whether --enable-libmcheck was given.
10955 if test "${enable_libmcheck+set}" = set; then :
10956   enableval=$enable_libmcheck; case "${enableval}" in
10957       yes | y) ENABLE_LIBMCHECK="yes" ;;
10958       no | n)  ENABLE_LIBMCHECK="no" ;;
10959       *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10960     esac
10961 fi
10962
10963
10964   if test -z "${ENABLE_LIBMCHECK}"; then
10965     ENABLE_LIBMCHECK=${libmcheck_default}
10966   fi
10967
10968   if test "$ENABLE_LIBMCHECK" = "yes" ; then
10969     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
10970 $as_echo_n "checking for main in -lmcheck... " >&6; }
10971 if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10972   $as_echo_n "(cached) " >&6
10973 else
10974   ac_check_lib_save_LIBS=$LIBS
10975 LIBS="-lmcheck  $LIBS"
10976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10977 /* end confdefs.h.  */
10978
10979
10980 int
10981 main ()
10982 {
10983 return main ();
10984   ;
10985   return 0;
10986 }
10987 _ACEOF
10988 if ac_fn_c_try_link "$LINENO"; then :
10989   ac_cv_lib_mcheck_main=yes
10990 else
10991   ac_cv_lib_mcheck_main=no
10992 fi
10993 rm -f core conftest.err conftest.$ac_objext \
10994     conftest$ac_exeext conftest.$ac_ext
10995 LIBS=$ac_check_lib_save_LIBS
10996 fi
10997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10998 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
10999 if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
11000   cat >>confdefs.h <<_ACEOF
11001 #define HAVE_LIBMCHECK 1
11002 _ACEOF
11003
11004   LIBS="-lmcheck $LIBS"
11005
11006 fi
11007
11008   fi
11009
11010
11011 if test "$ENABLE_LIBMCHECK" = "yes" \
11012         -a "${have_libpython}" != "no" \
11013         -a "${python_has_threads}" = "yes" ; then
11014   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11015 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
11016 fi
11017
11018
11019 # Check whether --with-intel_pt was given.
11020 if test "${with_intel_pt+set}" = set; then :
11021   withval=$with_intel_pt;
11022 else
11023   with_intel_pt=auto
11024 fi
11025
11026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11027 $as_echo_n "checking whether to use intel pt... " >&6; }
11028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11029 $as_echo "$with_intel_pt" >&6; }
11030
11031 if test "${with_intel_pt}" = no; then
11032   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11033 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
11034   HAVE_LIBIPT=no
11035 else
11036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11037 /* end confdefs.h.  */
11038
11039 #include <linux/perf_event.h>
11040 #ifndef PERF_ATTR_SIZE_VER5
11041 # error
11042 #endif
11043
11044 _ACEOF
11045 if ac_fn_c_try_cpp "$LINENO"; then :
11046   perf_event=yes
11047 else
11048   perf_event=no
11049 fi
11050 rm -f conftest.err conftest.$ac_ext
11051   if test "$perf_event" != yes; then
11052     if test "$with_intel_pt" = yes; then
11053       as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
11054     else
11055       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11056 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11057     fi
11058   fi
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068     use_additional=yes
11069
11070   acl_save_prefix="$prefix"
11071   prefix="$acl_final_prefix"
11072   acl_save_exec_prefix="$exec_prefix"
11073   exec_prefix="$acl_final_exec_prefix"
11074
11075     eval additional_includedir=\"$includedir\"
11076     eval additional_libdir=\"$libdir\"
11077
11078   exec_prefix="$acl_save_exec_prefix"
11079   prefix="$acl_save_prefix"
11080
11081
11082 # Check whether --with-libipt-prefix was given.
11083 if test "${with_libipt_prefix+set}" = set; then :
11084   withval=$with_libipt_prefix;
11085     if test "X$withval" = "Xno"; then
11086       use_additional=no
11087     else
11088       if test "X$withval" = "X"; then
11089
11090   acl_save_prefix="$prefix"
11091   prefix="$acl_final_prefix"
11092   acl_save_exec_prefix="$exec_prefix"
11093   exec_prefix="$acl_final_exec_prefix"
11094
11095           eval additional_includedir=\"$includedir\"
11096           eval additional_libdir=\"$libdir\"
11097
11098   exec_prefix="$acl_save_exec_prefix"
11099   prefix="$acl_save_prefix"
11100
11101       else
11102         additional_includedir="$withval/include"
11103         additional_libdir="$withval/lib"
11104       fi
11105     fi
11106
11107 fi
11108
11109       LIBIPT=
11110   LTLIBIPT=
11111   INCIPT=
11112   rpathdirs=
11113   ltrpathdirs=
11114   names_already_handled=
11115   names_next_round='ipt '
11116   while test -n "$names_next_round"; do
11117     names_this_round="$names_next_round"
11118     names_next_round=
11119     for name in $names_this_round; do
11120       already_handled=
11121       for n in $names_already_handled; do
11122         if test "$n" = "$name"; then
11123           already_handled=yes
11124           break
11125         fi
11126       done
11127       if test -z "$already_handled"; then
11128         names_already_handled="$names_already_handled $name"
11129                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11130         eval value=\"\$HAVE_LIB$uppername\"
11131         if test -n "$value"; then
11132           if test "$value" = yes; then
11133             eval value=\"\$LIB$uppername\"
11134             test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11135             eval value=\"\$LTLIB$uppername\"
11136             test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11137           else
11138                                     :
11139           fi
11140         else
11141                               found_dir=
11142           found_la=
11143           found_so=
11144           found_a=
11145           if test $use_additional = yes; then
11146             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11147               found_dir="$additional_libdir"
11148               found_so="$additional_libdir/lib$name.$shlibext"
11149               if test -f "$additional_libdir/lib$name.la"; then
11150                 found_la="$additional_libdir/lib$name.la"
11151               fi
11152             else
11153               if test -f "$additional_libdir/lib$name.$libext"; then
11154                 found_dir="$additional_libdir"
11155                 found_a="$additional_libdir/lib$name.$libext"
11156                 if test -f "$additional_libdir/lib$name.la"; then
11157                   found_la="$additional_libdir/lib$name.la"
11158                 fi
11159               fi
11160             fi
11161           fi
11162           if test "X$found_dir" = "X"; then
11163             for x in $LDFLAGS $LTLIBIPT; do
11164
11165   acl_save_prefix="$prefix"
11166   prefix="$acl_final_prefix"
11167   acl_save_exec_prefix="$exec_prefix"
11168   exec_prefix="$acl_final_exec_prefix"
11169   eval x=\"$x\"
11170   exec_prefix="$acl_save_exec_prefix"
11171   prefix="$acl_save_prefix"
11172
11173               case "$x" in
11174                 -L*)
11175                   dir=`echo "X$x" | sed -e 's/^X-L//'`
11176                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11177                     found_dir="$dir"
11178                     found_so="$dir/lib$name.$shlibext"
11179                     if test -f "$dir/lib$name.la"; then
11180                       found_la="$dir/lib$name.la"
11181                     fi
11182                   else
11183                     if test -f "$dir/lib$name.$libext"; then
11184                       found_dir="$dir"
11185                       found_a="$dir/lib$name.$libext"
11186                       if test -f "$dir/lib$name.la"; then
11187                         found_la="$dir/lib$name.la"
11188                       fi
11189                     fi
11190                   fi
11191                   ;;
11192               esac
11193               if test "X$found_dir" != "X"; then
11194                 break
11195               fi
11196             done
11197           fi
11198           if test "X$found_dir" != "X"; then
11199                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11200             if test "X$found_so" != "X"; then
11201                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11202                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11203               else
11204                                                                                 haveit=
11205                 for x in $ltrpathdirs; do
11206                   if test "X$x" = "X$found_dir"; then
11207                     haveit=yes
11208                     break
11209                   fi
11210                 done
11211                 if test -z "$haveit"; then
11212                   ltrpathdirs="$ltrpathdirs $found_dir"
11213                 fi
11214                                 if test "$hardcode_direct" = yes; then
11215                                                       LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11216                 else
11217                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11218                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11219                                                             haveit=
11220                     for x in $rpathdirs; do
11221                       if test "X$x" = "X$found_dir"; then
11222                         haveit=yes
11223                         break
11224                       fi
11225                     done
11226                     if test -z "$haveit"; then
11227                       rpathdirs="$rpathdirs $found_dir"
11228                     fi
11229                   else
11230                                                                                 haveit=
11231                     for x in $LDFLAGS $LIBIPT; do
11232
11233   acl_save_prefix="$prefix"
11234   prefix="$acl_final_prefix"
11235   acl_save_exec_prefix="$exec_prefix"
11236   exec_prefix="$acl_final_exec_prefix"
11237   eval x=\"$x\"
11238   exec_prefix="$acl_save_exec_prefix"
11239   prefix="$acl_save_prefix"
11240
11241                       if test "X$x" = "X-L$found_dir"; then
11242                         haveit=yes
11243                         break
11244                       fi
11245                     done
11246                     if test -z "$haveit"; then
11247                       LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11248                     fi
11249                     if test "$hardcode_minus_L" != no; then
11250                                                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11251                     else
11252                                                                                                                                                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11253                     fi
11254                   fi
11255                 fi
11256               fi
11257             else
11258               if test "X$found_a" != "X"; then
11259                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11260               else
11261                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11262               fi
11263             fi
11264                         additional_includedir=
11265             case "$found_dir" in
11266               */lib | */lib/)
11267                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11268                 additional_includedir="$basedir/include"
11269                 ;;
11270             esac
11271             if test "X$additional_includedir" != "X"; then
11272                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
11273                 haveit=
11274                 if test "X$additional_includedir" = "X/usr/local/include"; then
11275                   if test -n "$GCC"; then
11276                     case $host_os in
11277                       linux*) haveit=yes;;
11278                     esac
11279                   fi
11280                 fi
11281                 if test -z "$haveit"; then
11282                   for x in $CPPFLAGS $INCIPT; do
11283
11284   acl_save_prefix="$prefix"
11285   prefix="$acl_final_prefix"
11286   acl_save_exec_prefix="$exec_prefix"
11287   exec_prefix="$acl_final_exec_prefix"
11288   eval x=\"$x\"
11289   exec_prefix="$acl_save_exec_prefix"
11290   prefix="$acl_save_prefix"
11291
11292                     if test "X$x" = "X-I$additional_includedir"; then
11293                       haveit=yes
11294                       break
11295                     fi
11296                   done
11297                   if test -z "$haveit"; then
11298                     if test -d "$additional_includedir"; then
11299                                             INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11300                     fi
11301                   fi
11302                 fi
11303               fi
11304             fi
11305                         if test -n "$found_la"; then
11306                                                         save_libdir="$libdir"
11307               case "$found_la" in
11308                 */* | *\\*) . "$found_la" ;;
11309                 *) . "./$found_la" ;;
11310               esac
11311               libdir="$save_libdir"
11312                             for dep in $dependency_libs; do
11313                 case "$dep" in
11314                   -L*)
11315                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11316                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
11317                       haveit=
11318                       if test "X$additional_libdir" = "X/usr/local/lib"; then
11319                         if test -n "$GCC"; then
11320                           case $host_os in
11321                             linux*) haveit=yes;;
11322                           esac
11323                         fi
11324                       fi
11325                       if test -z "$haveit"; then
11326                         haveit=
11327                         for x in $LDFLAGS $LIBIPT; do
11328
11329   acl_save_prefix="$prefix"
11330   prefix="$acl_final_prefix"
11331   acl_save_exec_prefix="$exec_prefix"
11332   exec_prefix="$acl_final_exec_prefix"
11333   eval x=\"$x\"
11334   exec_prefix="$acl_save_exec_prefix"
11335   prefix="$acl_save_prefix"
11336
11337                           if test "X$x" = "X-L$additional_libdir"; then
11338                             haveit=yes
11339                             break
11340                           fi
11341                         done
11342                         if test -z "$haveit"; then
11343                           if test -d "$additional_libdir"; then
11344                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11345                           fi
11346                         fi
11347                         haveit=
11348                         for x in $LDFLAGS $LTLIBIPT; do
11349
11350   acl_save_prefix="$prefix"
11351   prefix="$acl_final_prefix"
11352   acl_save_exec_prefix="$exec_prefix"
11353   exec_prefix="$acl_final_exec_prefix"
11354   eval x=\"$x\"
11355   exec_prefix="$acl_save_exec_prefix"
11356   prefix="$acl_save_prefix"
11357
11358                           if test "X$x" = "X-L$additional_libdir"; then
11359                             haveit=yes
11360                             break
11361                           fi
11362                         done
11363                         if test -z "$haveit"; then
11364                           if test -d "$additional_libdir"; then
11365                                                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11366                           fi
11367                         fi
11368                       fi
11369                     fi
11370                     ;;
11371                   -R*)
11372                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
11373                     if test "$enable_rpath" != no; then
11374                                                                   haveit=
11375                       for x in $rpathdirs; do
11376                         if test "X$x" = "X$dir"; then
11377                           haveit=yes
11378                           break
11379                         fi
11380                       done
11381                       if test -z "$haveit"; then
11382                         rpathdirs="$rpathdirs $dir"
11383                       fi
11384                                                                   haveit=
11385                       for x in $ltrpathdirs; do
11386                         if test "X$x" = "X$dir"; then
11387                           haveit=yes
11388                           break
11389                         fi
11390                       done
11391                       if test -z "$haveit"; then
11392                         ltrpathdirs="$ltrpathdirs $dir"
11393                       fi
11394                     fi
11395                     ;;
11396                   -l*)
11397                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11398                     ;;
11399                   *.la)
11400                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11401                     ;;
11402                   *)
11403                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11404                     LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11405                     ;;
11406                 esac
11407               done
11408             fi
11409           else
11410                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11411             LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11412           fi
11413         fi
11414       fi
11415     done
11416   done
11417   if test "X$rpathdirs" != "X"; then
11418     if test -n "$hardcode_libdir_separator"; then
11419                         alldirs=
11420       for found_dir in $rpathdirs; do
11421         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11422       done
11423             acl_save_libdir="$libdir"
11424       libdir="$alldirs"
11425       eval flag=\"$hardcode_libdir_flag_spec\"
11426       libdir="$acl_save_libdir"
11427       LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11428     else
11429             for found_dir in $rpathdirs; do
11430         acl_save_libdir="$libdir"
11431         libdir="$found_dir"
11432         eval flag=\"$hardcode_libdir_flag_spec\"
11433         libdir="$acl_save_libdir"
11434         LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11435       done
11436     fi
11437   fi
11438   if test "X$ltrpathdirs" != "X"; then
11439             for found_dir in $ltrpathdirs; do
11440       LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11441     done
11442   fi
11443
11444
11445         ac_save_CPPFLAGS="$CPPFLAGS"
11446
11447   for element in $INCIPT; do
11448     haveit=
11449     for x in $CPPFLAGS; do
11450
11451   acl_save_prefix="$prefix"
11452   prefix="$acl_final_prefix"
11453   acl_save_exec_prefix="$exec_prefix"
11454   exec_prefix="$acl_final_exec_prefix"
11455   eval x=\"$x\"
11456   exec_prefix="$acl_save_exec_prefix"
11457   prefix="$acl_save_prefix"
11458
11459       if test "X$x" = "X$element"; then
11460         haveit=yes
11461         break
11462       fi
11463     done
11464     if test -z "$haveit"; then
11465       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11466     fi
11467   done
11468
11469
11470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11471 $as_echo_n "checking for libipt... " >&6; }
11472 if test "${ac_cv_libipt+set}" = set; then :
11473   $as_echo_n "(cached) " >&6
11474 else
11475
11476     ac_save_LIBS="$LIBS"
11477     LIBS="$LIBS $LIBIPT"
11478     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11479 /* end confdefs.h.  */
11480 #include "intel-pt.h"
11481 int
11482 main ()
11483 {
11484 pt_insn_alloc_decoder (0);
11485   ;
11486   return 0;
11487 }
11488 _ACEOF
11489 if ac_fn_c_try_link "$LINENO"; then :
11490   ac_cv_libipt=yes
11491 else
11492   ac_cv_libipt=no
11493 fi
11494 rm -f core conftest.err conftest.$ac_objext \
11495     conftest$ac_exeext conftest.$ac_ext
11496     LIBS="$ac_save_LIBS"
11497
11498 fi
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11500 $as_echo "$ac_cv_libipt" >&6; }
11501   if test "$ac_cv_libipt" = yes; then
11502     HAVE_LIBIPT=yes
11503
11504 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11505
11506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11507 $as_echo_n "checking how to link with libipt... " >&6; }
11508     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11509 $as_echo "$LIBIPT" >&6; }
11510   else
11511     HAVE_LIBIPT=no
11512             CPPFLAGS="$ac_save_CPPFLAGS"
11513     LIBIPT=
11514     LTLIBIPT=
11515   fi
11516
11517
11518
11519
11520
11521
11522   if test "$HAVE_LIBIPT" != yes; then
11523     if test "$with_intel_pt" = yes; then
11524       as_fn_error "libipt is missing or unusable" "$LINENO" 5
11525     else
11526       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11527 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11528     fi
11529   fi
11530 fi
11531
11532 # ------------------------- #
11533 # Checks for header files.  #
11534 # ------------------------- #
11535
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11537 $as_echo_n "checking for ANSI C header files... " >&6; }
11538 if test "${ac_cv_header_stdc+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 <stdlib.h>
11544 #include <stdarg.h>
11545 #include <string.h>
11546 #include <float.h>
11547
11548 int
11549 main ()
11550 {
11551
11552   ;
11553   return 0;
11554 }
11555 _ACEOF
11556 if ac_fn_c_try_compile "$LINENO"; then :
11557   ac_cv_header_stdc=yes
11558 else
11559   ac_cv_header_stdc=no
11560 fi
11561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11562
11563 if test $ac_cv_header_stdc = yes; then
11564   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11566 /* end confdefs.h.  */
11567 #include <string.h>
11568
11569 _ACEOF
11570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11571   $EGREP "memchr" >/dev/null 2>&1; then :
11572
11573 else
11574   ac_cv_header_stdc=no
11575 fi
11576 rm -f conftest*
11577
11578 fi
11579
11580 if test $ac_cv_header_stdc = yes; then
11581   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11582   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11583 /* end confdefs.h.  */
11584 #include <stdlib.h>
11585
11586 _ACEOF
11587 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11588   $EGREP "free" >/dev/null 2>&1; then :
11589
11590 else
11591   ac_cv_header_stdc=no
11592 fi
11593 rm -f conftest*
11594
11595 fi
11596
11597 if test $ac_cv_header_stdc = yes; then
11598   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11599   if test "$cross_compiling" = yes; then :
11600   :
11601 else
11602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11603 /* end confdefs.h.  */
11604 #include <ctype.h>
11605 #include <stdlib.h>
11606 #if ((' ' & 0x0FF) == 0x020)
11607 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11608 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11609 #else
11610 # define ISLOWER(c) \
11611                    (('a' <= (c) && (c) <= 'i') \
11612                      || ('j' <= (c) && (c) <= 'r') \
11613                      || ('s' <= (c) && (c) <= 'z'))
11614 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11615 #endif
11616
11617 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11618 int
11619 main ()
11620 {
11621   int i;
11622   for (i = 0; i < 256; i++)
11623     if (XOR (islower (i), ISLOWER (i))
11624         || toupper (i) != TOUPPER (i))
11625       return 2;
11626   return 0;
11627 }
11628 _ACEOF
11629 if ac_fn_c_try_run "$LINENO"; then :
11630
11631 else
11632   ac_cv_header_stdc=no
11633 fi
11634 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11635   conftest.$ac_objext conftest.beam conftest.$ac_ext
11636 fi
11637
11638 fi
11639 fi
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11641 $as_echo "$ac_cv_header_stdc" >&6; }
11642 if test $ac_cv_header_stdc = yes; then
11643
11644 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11645
11646 fi
11647
11648 # elf_hp.h is for HP/UX 64-bit shared library support.
11649 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11650                   thread_db.h \
11651                   sys/fault.h \
11652                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11653                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11654                   sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11655                   termios.h termio.h \
11656                   sgtty.h elf_hp.h \
11657                   dlfcn.h
11658 do :
11659   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11660 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11661 eval as_val=\$$as_ac_Header
11662    if test "x$as_val" = x""yes; then :
11663   cat >>confdefs.h <<_ACEOF
11664 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11665 _ACEOF
11666
11667 fi
11668
11669 done
11670
11671 for ac_header in sys/proc.h
11672 do :
11673   ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11674 # include <sys/param.h>
11675 #endif
11676
11677 "
11678 if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
11679   cat >>confdefs.h <<_ACEOF
11680 #define HAVE_SYS_PROC_H 1
11681 _ACEOF
11682
11683 fi
11684
11685 done
11686
11687 for ac_header in sys/user.h
11688 do :
11689   ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11690 # include <sys/param.h>
11691 #endif
11692
11693 "
11694 if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11695   cat >>confdefs.h <<_ACEOF
11696 #define HAVE_SYS_USER_H 1
11697 _ACEOF
11698
11699 fi
11700
11701 done
11702
11703
11704 # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11705 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11706 # think that we don't have <curses.h> if we're using GCC.
11707 case $host_os in
11708   solaris2.[789])
11709     if test "$GCC" = yes; then
11710
11711 $as_echo "#define _MSE_INT_H 1" >>confdefs.h
11712
11713     fi ;;
11714 esac
11715 for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11716 do :
11717   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11718 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11719 eval as_val=\$$as_ac_Header
11720    if test "x$as_val" = x""yes; then :
11721   cat >>confdefs.h <<_ACEOF
11722 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11723 _ACEOF
11724
11725 fi
11726
11727 done
11728
11729 for ac_header in term.h
11730 do :
11731   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11732 # include <curses.h>
11733 #endif
11734
11735 "
11736 if test "x$ac_cv_header_term_h" = x""yes; then :
11737   cat >>confdefs.h <<_ACEOF
11738 #define HAVE_TERM_H 1
11739 _ACEOF
11740
11741 fi
11742
11743 done
11744
11745
11746 # ------------------------- #
11747 # Checks for declarations.  #
11748 # ------------------------- #
11749
11750
11751   # Check for presence and size of long long.
11752   ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11753 if test "x$ac_cv_type_long_long" = x""yes; then :
11754
11755 cat >>confdefs.h <<_ACEOF
11756 #define HAVE_LONG_LONG 1
11757 _ACEOF
11758
11759 # The cast to long int works around a bug in the HP C Compiler
11760 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11761 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11762 # This bug is HP SR number 8606223364.
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11764 $as_echo_n "checking size of long long... " >&6; }
11765 if test "${ac_cv_sizeof_long_long+set}" = set; then :
11766   $as_echo_n "(cached) " >&6
11767 else
11768   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
11769
11770 else
11771   if test "$ac_cv_type_long_long" = yes; then
11772      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11773 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11774 { as_fn_set_status 77
11775 as_fn_error "cannot compute sizeof (long long)
11776 See \`config.log' for more details." "$LINENO" 5; }; }
11777    else
11778      ac_cv_sizeof_long_long=0
11779    fi
11780 fi
11781
11782 fi
11783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11784 $as_echo "$ac_cv_sizeof_long_long" >&6; }
11785
11786
11787
11788 cat >>confdefs.h <<_ACEOF
11789 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11790 _ACEOF
11791
11792
11793 fi
11794
11795
11796   ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
11797 if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
11798   ac_have_decl=1
11799 else
11800   ac_have_decl=0
11801 fi
11802
11803 cat >>confdefs.h <<_ACEOF
11804 #define HAVE_DECL_BASENAME $ac_have_decl
11805 _ACEOF
11806 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11807 if test "x$ac_cv_have_decl_ffs" = x""yes; then :
11808   ac_have_decl=1
11809 else
11810   ac_have_decl=0
11811 fi
11812
11813 cat >>confdefs.h <<_ACEOF
11814 #define HAVE_DECL_FFS $ac_have_decl
11815 _ACEOF
11816 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11817 if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
11818   ac_have_decl=1
11819 else
11820   ac_have_decl=0
11821 fi
11822
11823 cat >>confdefs.h <<_ACEOF
11824 #define HAVE_DECL_ASPRINTF $ac_have_decl
11825 _ACEOF
11826 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11827 if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
11828   ac_have_decl=1
11829 else
11830   ac_have_decl=0
11831 fi
11832
11833 cat >>confdefs.h <<_ACEOF
11834 #define HAVE_DECL_VASPRINTF $ac_have_decl
11835 _ACEOF
11836 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11837 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11838   ac_have_decl=1
11839 else
11840   ac_have_decl=0
11841 fi
11842
11843 cat >>confdefs.h <<_ACEOF
11844 #define HAVE_DECL_SNPRINTF $ac_have_decl
11845 _ACEOF
11846 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11847 if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11848   ac_have_decl=1
11849 else
11850   ac_have_decl=0
11851 fi
11852
11853 cat >>confdefs.h <<_ACEOF
11854 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11855 _ACEOF
11856
11857   ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11858 if test "x$ac_cv_have_decl_strtol" = x""yes; then :
11859   ac_have_decl=1
11860 else
11861   ac_have_decl=0
11862 fi
11863
11864 cat >>confdefs.h <<_ACEOF
11865 #define HAVE_DECL_STRTOL $ac_have_decl
11866 _ACEOF
11867 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11868 if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
11869   ac_have_decl=1
11870 else
11871   ac_have_decl=0
11872 fi
11873
11874 cat >>confdefs.h <<_ACEOF
11875 #define HAVE_DECL_STRTOUL $ac_have_decl
11876 _ACEOF
11877 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11878 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
11879   ac_have_decl=1
11880 else
11881   ac_have_decl=0
11882 fi
11883
11884 cat >>confdefs.h <<_ACEOF
11885 #define HAVE_DECL_STRTOLL $ac_have_decl
11886 _ACEOF
11887 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11888 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
11889   ac_have_decl=1
11890 else
11891   ac_have_decl=0
11892 fi
11893
11894 cat >>confdefs.h <<_ACEOF
11895 #define HAVE_DECL_STRTOULL $ac_have_decl
11896 _ACEOF
11897
11898   ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11899 if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
11900   ac_have_decl=1
11901 else
11902   ac_have_decl=0
11903 fi
11904
11905 cat >>confdefs.h <<_ACEOF
11906 #define HAVE_DECL_STRVERSCMP $ac_have_decl
11907 _ACEOF
11908
11909
11910
11911 ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11912 if test "x$ac_cv_have_decl_free" = x""yes; then :
11913   ac_have_decl=1
11914 else
11915   ac_have_decl=0
11916 fi
11917
11918 cat >>confdefs.h <<_ACEOF
11919 #define HAVE_DECL_FREE $ac_have_decl
11920 _ACEOF
11921 ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11922 if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11923   ac_have_decl=1
11924 else
11925   ac_have_decl=0
11926 fi
11927
11928 cat >>confdefs.h <<_ACEOF
11929 #define HAVE_DECL_MALLOC $ac_have_decl
11930 _ACEOF
11931 ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11932 if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11933   ac_have_decl=1
11934 else
11935   ac_have_decl=0
11936 fi
11937
11938 cat >>confdefs.h <<_ACEOF
11939 #define HAVE_DECL_REALLOC $ac_have_decl
11940 _ACEOF
11941 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11942 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11943   ac_have_decl=1
11944 else
11945   ac_have_decl=0
11946 fi
11947
11948 cat >>confdefs.h <<_ACEOF
11949 #define HAVE_DECL_SNPRINTF $ac_have_decl
11950 _ACEOF
11951
11952
11953   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11954 $as_echo_n "checking for LC_MESSAGES... " >&6; }
11955 if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11956   $as_echo_n "(cached) " >&6
11957 else
11958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11959 /* end confdefs.h.  */
11960 #include <locale.h>
11961 int
11962 main ()
11963 {
11964 return LC_MESSAGES
11965   ;
11966   return 0;
11967 }
11968 _ACEOF
11969 if ac_fn_c_try_link "$LINENO"; then :
11970   am_cv_val_LC_MESSAGES=yes
11971 else
11972   am_cv_val_LC_MESSAGES=no
11973 fi
11974 rm -f core conftest.err conftest.$ac_objext \
11975     conftest$ac_exeext conftest.$ac_ext
11976 fi
11977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11978 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11979   if test $am_cv_val_LC_MESSAGES = yes; then
11980
11981 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11982
11983   fi
11984
11985
11986 # ----------------------- #
11987 # Checks for structures.  #
11988 # ----------------------- #
11989
11990 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11991 if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11992
11993 cat >>confdefs.h <<_ACEOF
11994 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
11995 _ACEOF
11996
11997
11998 fi
11999 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
12000 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
12001
12002 cat >>confdefs.h <<_ACEOF
12003 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12004 _ACEOF
12005
12006
12007 fi
12008
12009
12010 # ------------------ #
12011 # Checks for types.  #
12012 # ------------------ #
12013
12014 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12015 #include <sys/socket.h>
12016
12017 "
12018 if test "x$ac_cv_type_socklen_t" = x""yes; then :
12019
12020 cat >>confdefs.h <<_ACEOF
12021 #define HAVE_SOCKLEN_T 1
12022 _ACEOF
12023
12024
12025 fi
12026
12027
12028 # ------------------------------------- #
12029 # Checks for compiler characteristics.  #
12030 # ------------------------------------- #
12031
12032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12033 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12034 if test "${ac_cv_c_const+set}" = set; then :
12035   $as_echo_n "(cached) " >&6
12036 else
12037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12038 /* end confdefs.h.  */
12039
12040 int
12041 main ()
12042 {
12043 /* FIXME: Include the comments suggested by Paul. */
12044 #ifndef __cplusplus
12045   /* Ultrix mips cc rejects this.  */
12046   typedef int charset[2];
12047   const charset cs;
12048   /* SunOS 4.1.1 cc rejects this.  */
12049   char const *const *pcpcc;
12050   char **ppc;
12051   /* NEC SVR4.0.2 mips cc rejects this.  */
12052   struct point {int x, y;};
12053   static struct point const zero = {0,0};
12054   /* AIX XL C 1.02.0.0 rejects this.
12055      It does not let you subtract one const X* pointer from another in
12056      an arm of an if-expression whose if-part is not a constant
12057      expression */
12058   const char *g = "string";
12059   pcpcc = &g + (g ? g-g : 0);
12060   /* HPUX 7.0 cc rejects these. */
12061   ++pcpcc;
12062   ppc = (char**) pcpcc;
12063   pcpcc = (char const *const *) ppc;
12064   { /* SCO 3.2v4 cc rejects this.  */
12065     char *t;
12066     char const *s = 0 ? (char *) 0 : (char const *) 0;
12067
12068     *t++ = 0;
12069     if (s) return 0;
12070   }
12071   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12072     int x[] = {25, 17};
12073     const int *foo = &x[0];
12074     ++foo;
12075   }
12076   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12077     typedef const int *iptr;
12078     iptr p = 0;
12079     ++p;
12080   }
12081   { /* AIX XL C 1.02.0.0 rejects this saying
12082        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12083     struct s { int j; const int *ap[3]; };
12084     struct s *b; b->j = 5;
12085   }
12086   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12087     const int foo = 10;
12088     if (!foo) return 0;
12089   }
12090   return !cs[0] && !zero.x;
12091 #endif
12092
12093   ;
12094   return 0;
12095 }
12096 _ACEOF
12097 if ac_fn_c_try_compile "$LINENO"; then :
12098   ac_cv_c_const=yes
12099 else
12100   ac_cv_c_const=no
12101 fi
12102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12103 fi
12104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12105 $as_echo "$ac_cv_c_const" >&6; }
12106 if test $ac_cv_c_const = no; then
12107
12108 $as_echo "#define const /**/" >>confdefs.h
12109
12110 fi
12111
12112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12113 $as_echo_n "checking for inline... " >&6; }
12114 if test "${ac_cv_c_inline+set}" = set; then :
12115   $as_echo_n "(cached) " >&6
12116 else
12117   ac_cv_c_inline=no
12118 for ac_kw in inline __inline__ __inline; do
12119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12120 /* end confdefs.h.  */
12121 #ifndef __cplusplus
12122 typedef int foo_t;
12123 static $ac_kw foo_t static_foo () {return 0; }
12124 $ac_kw foo_t foo () {return 0; }
12125 #endif
12126
12127 _ACEOF
12128 if ac_fn_c_try_compile "$LINENO"; then :
12129   ac_cv_c_inline=$ac_kw
12130 fi
12131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12132   test "$ac_cv_c_inline" != no && break
12133 done
12134
12135 fi
12136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12137 $as_echo "$ac_cv_c_inline" >&6; }
12138
12139 case $ac_cv_c_inline in
12140   inline | yes) ;;
12141   *)
12142     case $ac_cv_c_inline in
12143       no) ac_val=;;
12144       *) ac_val=$ac_cv_c_inline;;
12145     esac
12146     cat >>confdefs.h <<_ACEOF
12147 #ifndef __cplusplus
12148 #define inline $ac_val
12149 #endif
12150 _ACEOF
12151     ;;
12152 esac
12153
12154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12155 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12156 if test "${ac_cv_c_bigendian+set}" = set; then :
12157   $as_echo_n "(cached) " >&6
12158 else
12159   ac_cv_c_bigendian=unknown
12160     # See if we're dealing with a universal compiler.
12161     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12162 /* end confdefs.h.  */
12163 #ifndef __APPLE_CC__
12164                not a universal capable compiler
12165              #endif
12166              typedef int dummy;
12167
12168 _ACEOF
12169 if ac_fn_c_try_compile "$LINENO"; then :
12170
12171         # Check for potential -arch flags.  It is not universal unless
12172         # there are at least two -arch flags with different values.
12173         ac_arch=
12174         ac_prev=
12175         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12176          if test -n "$ac_prev"; then
12177            case $ac_word in
12178              i?86 | x86_64 | ppc | ppc64)
12179                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12180                  ac_arch=$ac_word
12181                else
12182                  ac_cv_c_bigendian=universal
12183                  break
12184                fi
12185                ;;
12186            esac
12187            ac_prev=
12188          elif test "x$ac_word" = "x-arch"; then
12189            ac_prev=arch
12190          fi
12191        done
12192 fi
12193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12194     if test $ac_cv_c_bigendian = unknown; then
12195       # See if sys/param.h defines the BYTE_ORDER macro.
12196       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12197 /* end confdefs.h.  */
12198 #include <sys/types.h>
12199              #include <sys/param.h>
12200
12201 int
12202 main ()
12203 {
12204 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12205                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12206                      && LITTLE_ENDIAN)
12207               bogus endian macros
12208              #endif
12209
12210   ;
12211   return 0;
12212 }
12213 _ACEOF
12214 if ac_fn_c_try_compile "$LINENO"; then :
12215   # It does; now see whether it defined to BIG_ENDIAN or not.
12216          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12217 /* end confdefs.h.  */
12218 #include <sys/types.h>
12219                 #include <sys/param.h>
12220
12221 int
12222 main ()
12223 {
12224 #if BYTE_ORDER != BIG_ENDIAN
12225                  not big endian
12226                 #endif
12227
12228   ;
12229   return 0;
12230 }
12231 _ACEOF
12232 if ac_fn_c_try_compile "$LINENO"; then :
12233   ac_cv_c_bigendian=yes
12234 else
12235   ac_cv_c_bigendian=no
12236 fi
12237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12238 fi
12239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12240     fi
12241     if test $ac_cv_c_bigendian = unknown; then
12242       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12243       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12244 /* end confdefs.h.  */
12245 #include <limits.h>
12246
12247 int
12248 main ()
12249 {
12250 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12251               bogus endian macros
12252              #endif
12253
12254   ;
12255   return 0;
12256 }
12257 _ACEOF
12258 if ac_fn_c_try_compile "$LINENO"; then :
12259   # It does; now see whether it defined to _BIG_ENDIAN or not.
12260          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12261 /* end confdefs.h.  */
12262 #include <limits.h>
12263
12264 int
12265 main ()
12266 {
12267 #ifndef _BIG_ENDIAN
12268                  not big endian
12269                 #endif
12270
12271   ;
12272   return 0;
12273 }
12274 _ACEOF
12275 if ac_fn_c_try_compile "$LINENO"; then :
12276   ac_cv_c_bigendian=yes
12277 else
12278   ac_cv_c_bigendian=no
12279 fi
12280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12281 fi
12282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12283     fi
12284     if test $ac_cv_c_bigendian = unknown; then
12285       # Compile a test program.
12286       if test "$cross_compiling" = yes; then :
12287   # Try to guess by grepping values from an object file.
12288          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12289 /* end confdefs.h.  */
12290 short int ascii_mm[] =
12291                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12292                 short int ascii_ii[] =
12293                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12294                 int use_ascii (int i) {
12295                   return ascii_mm[i] + ascii_ii[i];
12296                 }
12297                 short int ebcdic_ii[] =
12298                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12299                 short int ebcdic_mm[] =
12300                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12301                 int use_ebcdic (int i) {
12302                   return ebcdic_mm[i] + ebcdic_ii[i];
12303                 }
12304                 extern int foo;
12305
12306 int
12307 main ()
12308 {
12309 return use_ascii (foo) == use_ebcdic (foo);
12310   ;
12311   return 0;
12312 }
12313 _ACEOF
12314 if ac_fn_c_try_compile "$LINENO"; then :
12315   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12316               ac_cv_c_bigendian=yes
12317             fi
12318             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12319               if test "$ac_cv_c_bigendian" = unknown; then
12320                 ac_cv_c_bigendian=no
12321               else
12322                 # finding both strings is unlikely to happen, but who knows?
12323                 ac_cv_c_bigendian=unknown
12324               fi
12325             fi
12326 fi
12327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12328 else
12329   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12330 /* end confdefs.h.  */
12331 $ac_includes_default
12332 int
12333 main ()
12334 {
12335
12336              /* Are we little or big endian?  From Harbison&Steele.  */
12337              union
12338              {
12339                long int l;
12340                char c[sizeof (long int)];
12341              } u;
12342              u.l = 1;
12343              return u.c[sizeof (long int) - 1] == 1;
12344
12345   ;
12346   return 0;
12347 }
12348 _ACEOF
12349 if ac_fn_c_try_run "$LINENO"; then :
12350   ac_cv_c_bigendian=no
12351 else
12352   ac_cv_c_bigendian=yes
12353 fi
12354 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12355   conftest.$ac_objext conftest.beam conftest.$ac_ext
12356 fi
12357
12358     fi
12359 fi
12360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12361 $as_echo "$ac_cv_c_bigendian" >&6; }
12362  case $ac_cv_c_bigendian in #(
12363    yes)
12364      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12365 ;; #(
12366    no)
12367       ;; #(
12368    universal)
12369
12370 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12371
12372      ;; #(
12373    *)
12374      as_fn_error "unknown endianness
12375  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12376  esac
12377
12378
12379 # ------------------------------ #
12380 # Checks for library functions.  #
12381 # ------------------------------ #
12382
12383 for ac_header in stdlib.h unistd.h
12384 do :
12385   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12386 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12387 eval as_val=\$$as_ac_Header
12388    if test "x$as_val" = x""yes; then :
12389   cat >>confdefs.h <<_ACEOF
12390 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12391 _ACEOF
12392
12393 fi
12394
12395 done
12396
12397 for ac_func in getpagesize
12398 do :
12399   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12400 if test "x$ac_cv_func_getpagesize" = x""yes; then :
12401   cat >>confdefs.h <<_ACEOF
12402 #define HAVE_GETPAGESIZE 1
12403 _ACEOF
12404
12405 fi
12406 done
12407
12408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12409 $as_echo_n "checking for working mmap... " >&6; }
12410 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12411   $as_echo_n "(cached) " >&6
12412 else
12413   if test "$cross_compiling" = yes; then :
12414   ac_cv_func_mmap_fixed_mapped=no
12415 else
12416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12417 /* end confdefs.h.  */
12418 $ac_includes_default
12419 /* malloc might have been renamed as rpl_malloc. */
12420 #undef malloc
12421
12422 /* Thanks to Mike Haertel and Jim Avera for this test.
12423    Here is a matrix of mmap possibilities:
12424         mmap private not fixed
12425         mmap private fixed at somewhere currently unmapped
12426         mmap private fixed at somewhere already mapped
12427         mmap shared not fixed
12428         mmap shared fixed at somewhere currently unmapped
12429         mmap shared fixed at somewhere already mapped
12430    For private mappings, we should verify that changes cannot be read()
12431    back from the file, nor mmap's back from the file at a different
12432    address.  (There have been systems where private was not correctly
12433    implemented like the infamous i386 svr4.0, and systems where the
12434    VM page cache was not coherent with the file system buffer cache
12435    like early versions of FreeBSD and possibly contemporary NetBSD.)
12436    For shared mappings, we should conversely verify that changes get
12437    propagated back to all the places they're supposed to be.
12438
12439    Grep wants private fixed already mapped.
12440    The main things grep needs to know about mmap are:
12441    * does it exist and is it safe to write into the mmap'd area
12442    * how to use it (BSD variants)  */
12443
12444 #include <fcntl.h>
12445 #include <sys/mman.h>
12446
12447 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12448 char *malloc ();
12449 #endif
12450
12451 /* This mess was copied from the GNU getpagesize.h.  */
12452 #ifndef HAVE_GETPAGESIZE
12453 /* Assume that all systems that can run configure have sys/param.h.  */
12454 # ifndef HAVE_SYS_PARAM_H
12455 #  define HAVE_SYS_PARAM_H 1
12456 # endif
12457
12458 # ifdef _SC_PAGESIZE
12459 #  define getpagesize() sysconf(_SC_PAGESIZE)
12460 # else /* no _SC_PAGESIZE */
12461 #  ifdef HAVE_SYS_PARAM_H
12462 #   include <sys/param.h>
12463 #   ifdef EXEC_PAGESIZE
12464 #    define getpagesize() EXEC_PAGESIZE
12465 #   else /* no EXEC_PAGESIZE */
12466 #    ifdef NBPG
12467 #     define getpagesize() NBPG * CLSIZE
12468 #     ifndef CLSIZE
12469 #      define CLSIZE 1
12470 #     endif /* no CLSIZE */
12471 #    else /* no NBPG */
12472 #     ifdef NBPC
12473 #      define getpagesize() NBPC
12474 #     else /* no NBPC */
12475 #      ifdef PAGESIZE
12476 #       define getpagesize() PAGESIZE
12477 #      endif /* PAGESIZE */
12478 #     endif /* no NBPC */
12479 #    endif /* no NBPG */
12480 #   endif /* no EXEC_PAGESIZE */
12481 #  else /* no HAVE_SYS_PARAM_H */
12482 #   define getpagesize() 8192   /* punt totally */
12483 #  endif /* no HAVE_SYS_PARAM_H */
12484 # endif /* no _SC_PAGESIZE */
12485
12486 #endif /* no HAVE_GETPAGESIZE */
12487
12488 int
12489 main ()
12490 {
12491   char *data, *data2, *data3;
12492   int i, pagesize;
12493   int fd;
12494
12495   pagesize = getpagesize ();
12496
12497   /* First, make a file with some known garbage in it. */
12498   data = (char *) malloc (pagesize);
12499   if (!data)
12500     return 1;
12501   for (i = 0; i < pagesize; ++i)
12502     *(data + i) = rand ();
12503   umask (0);
12504   fd = creat ("conftest.mmap", 0600);
12505   if (fd < 0)
12506     return 1;
12507   if (write (fd, data, pagesize) != pagesize)
12508     return 1;
12509   close (fd);
12510
12511   /* Next, try to mmap the file at a fixed address which already has
12512      something else allocated at it.  If we can, also make sure that
12513      we see the same garbage.  */
12514   fd = open ("conftest.mmap", O_RDWR);
12515   if (fd < 0)
12516     return 1;
12517   data2 = (char *) malloc (2 * pagesize);
12518   if (!data2)
12519     return 1;
12520   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
12521   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12522                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
12523     return 1;
12524   for (i = 0; i < pagesize; ++i)
12525     if (*(data + i) != *(data2 + i))
12526       return 1;
12527
12528   /* Finally, make sure that changes to the mapped area do not
12529      percolate back to the file as seen by read().  (This is a bug on
12530      some variants of i386 svr4.0.)  */
12531   for (i = 0; i < pagesize; ++i)
12532     *(data2 + i) = *(data2 + i) + 1;
12533   data3 = (char *) malloc (pagesize);
12534   if (!data3)
12535     return 1;
12536   if (read (fd, data3, pagesize) != pagesize)
12537     return 1;
12538   for (i = 0; i < pagesize; ++i)
12539     if (*(data + i) != *(data3 + i))
12540       return 1;
12541   close (fd);
12542   return 0;
12543 }
12544 _ACEOF
12545 if ac_fn_c_try_run "$LINENO"; then :
12546   ac_cv_func_mmap_fixed_mapped=yes
12547 else
12548   ac_cv_func_mmap_fixed_mapped=no
12549 fi
12550 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12551   conftest.$ac_objext conftest.beam conftest.$ac_ext
12552 fi
12553
12554 fi
12555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12556 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
12557 if test $ac_cv_func_mmap_fixed_mapped = yes; then
12558
12559 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
12560
12561 fi
12562 rm -f conftest.mmap
12563
12564 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12565 if test "x$ac_cv_type_pid_t" = x""yes; then :
12566
12567 else
12568
12569 cat >>confdefs.h <<_ACEOF
12570 #define pid_t int
12571 _ACEOF
12572
12573 fi
12574
12575 for ac_header in vfork.h
12576 do :
12577   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12578 if test "x$ac_cv_header_vfork_h" = x""yes; then :
12579   cat >>confdefs.h <<_ACEOF
12580 #define HAVE_VFORK_H 1
12581 _ACEOF
12582
12583 fi
12584
12585 done
12586
12587 for ac_func in fork vfork
12588 do :
12589   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12590 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12591 eval as_val=\$$as_ac_var
12592    if test "x$as_val" = x""yes; then :
12593   cat >>confdefs.h <<_ACEOF
12594 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12595 _ACEOF
12596
12597 fi
12598 done
12599
12600 if test "x$ac_cv_func_fork" = xyes; then
12601   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12602 $as_echo_n "checking for working fork... " >&6; }
12603 if test "${ac_cv_func_fork_works+set}" = set; then :
12604   $as_echo_n "(cached) " >&6
12605 else
12606   if test "$cross_compiling" = yes; then :
12607   ac_cv_func_fork_works=cross
12608 else
12609   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12610 /* end confdefs.h.  */
12611 $ac_includes_default
12612 int
12613 main ()
12614 {
12615
12616           /* By Ruediger Kuhlmann. */
12617           return fork () < 0;
12618
12619   ;
12620   return 0;
12621 }
12622 _ACEOF
12623 if ac_fn_c_try_run "$LINENO"; then :
12624   ac_cv_func_fork_works=yes
12625 else
12626   ac_cv_func_fork_works=no
12627 fi
12628 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12629   conftest.$ac_objext conftest.beam conftest.$ac_ext
12630 fi
12631
12632 fi
12633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12634 $as_echo "$ac_cv_func_fork_works" >&6; }
12635
12636 else
12637   ac_cv_func_fork_works=$ac_cv_func_fork
12638 fi
12639 if test "x$ac_cv_func_fork_works" = xcross; then
12640   case $host in
12641     *-*-amigaos* | *-*-msdosdjgpp*)
12642       # Override, as these systems have only a dummy fork() stub
12643       ac_cv_func_fork_works=no
12644       ;;
12645     *)
12646       ac_cv_func_fork_works=yes
12647       ;;
12648   esac
12649   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12650 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
12651 fi
12652 ac_cv_func_vfork_works=$ac_cv_func_vfork
12653 if test "x$ac_cv_func_vfork" = xyes; then
12654   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12655 $as_echo_n "checking for working vfork... " >&6; }
12656 if test "${ac_cv_func_vfork_works+set}" = set; then :
12657   $as_echo_n "(cached) " >&6
12658 else
12659   if test "$cross_compiling" = yes; then :
12660   ac_cv_func_vfork_works=cross
12661 else
12662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12663 /* end confdefs.h.  */
12664 /* Thanks to Paul Eggert for this test.  */
12665 $ac_includes_default
12666 #include <sys/wait.h>
12667 #ifdef HAVE_VFORK_H
12668 # include <vfork.h>
12669 #endif
12670 /* On some sparc systems, changes by the child to local and incoming
12671    argument registers are propagated back to the parent.  The compiler
12672    is told about this with #include <vfork.h>, but some compilers
12673    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
12674    static variable whose address is put into a register that is
12675    clobbered by the vfork.  */
12676 static void
12677 #ifdef __cplusplus
12678 sparc_address_test (int arg)
12679 # else
12680 sparc_address_test (arg) int arg;
12681 #endif
12682 {
12683   static pid_t child;
12684   if (!child) {
12685     child = vfork ();
12686     if (child < 0) {
12687       perror ("vfork");
12688       _exit(2);
12689     }
12690     if (!child) {
12691       arg = getpid();
12692       write(-1, "", 0);
12693       _exit (arg);
12694     }
12695   }
12696 }
12697
12698 int
12699 main ()
12700 {
12701   pid_t parent = getpid ();
12702   pid_t child;
12703
12704   sparc_address_test (0);
12705
12706   child = vfork ();
12707
12708   if (child == 0) {
12709     /* Here is another test for sparc vfork register problems.  This
12710        test uses lots of local variables, at least as many local
12711        variables as main has allocated so far including compiler
12712        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
12713        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
12714        reuse the register of parent for one of the local variables,
12715        since it will think that parent can't possibly be used any more
12716        in this routine.  Assigning to the local variable will thus
12717        munge parent in the parent process.  */
12718     pid_t
12719       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12720       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12721     /* Convince the compiler that p..p7 are live; otherwise, it might
12722        use the same hardware register for all 8 local variables.  */
12723     if (p != p1 || p != p2 || p != p3 || p != p4
12724         || p != p5 || p != p6 || p != p7)
12725       _exit(1);
12726
12727     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12728        from child file descriptors.  If the child closes a descriptor
12729        before it execs or exits, this munges the parent's descriptor
12730        as well.  Test for this by closing stdout in the child.  */
12731     _exit(close(fileno(stdout)) != 0);
12732   } else {
12733     int status;
12734     struct stat st;
12735
12736     while (wait(&status) != child)
12737       ;
12738     return (
12739          /* Was there some problem with vforking?  */
12740          child < 0
12741
12742          /* Did the child fail?  (This shouldn't happen.)  */
12743          || status
12744
12745          /* Did the vfork/compiler bug occur?  */
12746          || parent != getpid()
12747
12748          /* Did the file descriptor bug occur?  */
12749          || fstat(fileno(stdout), &st) != 0
12750          );
12751   }
12752 }
12753 _ACEOF
12754 if ac_fn_c_try_run "$LINENO"; then :
12755   ac_cv_func_vfork_works=yes
12756 else
12757   ac_cv_func_vfork_works=no
12758 fi
12759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12760   conftest.$ac_objext conftest.beam conftest.$ac_ext
12761 fi
12762
12763 fi
12764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12765 $as_echo "$ac_cv_func_vfork_works" >&6; }
12766
12767 fi;
12768 if test "x$ac_cv_func_fork_works" = xcross; then
12769   ac_cv_func_vfork_works=$ac_cv_func_vfork
12770   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12771 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
12772 fi
12773
12774 if test "x$ac_cv_func_vfork_works" = xyes; then
12775
12776 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
12777
12778 else
12779
12780 $as_echo "#define vfork fork" >>confdefs.h
12781
12782 fi
12783 if test "x$ac_cv_func_fork_works" = xyes; then
12784
12785 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
12786
12787 fi
12788
12789 for ac_func in getauxval getrusage getuid getgid \
12790                 pipe poll pread pread64 pwrite resize_term \
12791                 sbrk setpgid setpgrp setsid \
12792                 sigaction sigprocmask sigsetmask socketpair \
12793                 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12794                 setrlimit getrlimit posix_madvise waitpid \
12795                 ptrace64 sigaltstack mkdtemp setns
12796 do :
12797   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12798 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12799 eval as_val=\$$as_ac_var
12800    if test "x$as_val" = x""yes; then :
12801   cat >>confdefs.h <<_ACEOF
12802 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12803 _ACEOF
12804
12805 fi
12806 done
12807
12808
12809   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12810 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12811 if test "${am_cv_langinfo_codeset+set}" = set; then :
12812   $as_echo_n "(cached) " >&6
12813 else
12814   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12815 /* end confdefs.h.  */
12816 #include <langinfo.h>
12817 int
12818 main ()
12819 {
12820 char* cs = nl_langinfo(CODESET);
12821   ;
12822   return 0;
12823 }
12824 _ACEOF
12825 if ac_fn_c_try_link "$LINENO"; then :
12826   am_cv_langinfo_codeset=yes
12827 else
12828   am_cv_langinfo_codeset=no
12829 fi
12830 rm -f core conftest.err conftest.$ac_objext \
12831     conftest$ac_exeext conftest.$ac_ext
12832
12833 fi
12834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12835 $as_echo "$am_cv_langinfo_codeset" >&6; }
12836   if test $am_cv_langinfo_codeset = yes; then
12837
12838 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12839
12840   fi
12841
12842
12843   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12844 $as_echo_n "checking for ANSI C header files... " >&6; }
12845 if test "${ac_cv_header_stdc+set}" = set; then :
12846   $as_echo_n "(cached) " >&6
12847 else
12848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12849 /* end confdefs.h.  */
12850 #include <stdlib.h>
12851 #include <stdarg.h>
12852 #include <string.h>
12853 #include <float.h>
12854
12855 int
12856 main ()
12857 {
12858
12859   ;
12860   return 0;
12861 }
12862 _ACEOF
12863 if ac_fn_c_try_compile "$LINENO"; then :
12864   ac_cv_header_stdc=yes
12865 else
12866   ac_cv_header_stdc=no
12867 fi
12868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12869
12870 if test $ac_cv_header_stdc = yes; then
12871   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12873 /* end confdefs.h.  */
12874 #include <string.h>
12875
12876 _ACEOF
12877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12878   $EGREP "memchr" >/dev/null 2>&1; then :
12879
12880 else
12881   ac_cv_header_stdc=no
12882 fi
12883 rm -f conftest*
12884
12885 fi
12886
12887 if test $ac_cv_header_stdc = yes; then
12888   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12890 /* end confdefs.h.  */
12891 #include <stdlib.h>
12892
12893 _ACEOF
12894 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12895   $EGREP "free" >/dev/null 2>&1; then :
12896
12897 else
12898   ac_cv_header_stdc=no
12899 fi
12900 rm -f conftest*
12901
12902 fi
12903
12904 if test $ac_cv_header_stdc = yes; then
12905   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12906   if test "$cross_compiling" = yes; then :
12907   :
12908 else
12909   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12910 /* end confdefs.h.  */
12911 #include <ctype.h>
12912 #include <stdlib.h>
12913 #if ((' ' & 0x0FF) == 0x020)
12914 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12915 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12916 #else
12917 # define ISLOWER(c) \
12918                    (('a' <= (c) && (c) <= 'i') \
12919                      || ('j' <= (c) && (c) <= 'r') \
12920                      || ('s' <= (c) && (c) <= 'z'))
12921 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12922 #endif
12923
12924 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12925 int
12926 main ()
12927 {
12928   int i;
12929   for (i = 0; i < 256; i++)
12930     if (XOR (islower (i), ISLOWER (i))
12931         || toupper (i) != TOUPPER (i))
12932       return 2;
12933   return 0;
12934 }
12935 _ACEOF
12936 if ac_fn_c_try_run "$LINENO"; then :
12937
12938 else
12939   ac_cv_header_stdc=no
12940 fi
12941 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12942   conftest.$ac_objext conftest.beam conftest.$ac_ext
12943 fi
12944
12945 fi
12946 fi
12947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12948 $as_echo "$ac_cv_header_stdc" >&6; }
12949 if test $ac_cv_header_stdc = yes; then
12950
12951 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12952
12953 fi
12954
12955   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12956 # for constant arguments.  Useless!
12957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12958 $as_echo_n "checking for working alloca.h... " >&6; }
12959 if test "${ac_cv_working_alloca_h+set}" = set; then :
12960   $as_echo_n "(cached) " >&6
12961 else
12962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12963 /* end confdefs.h.  */
12964 #include <alloca.h>
12965 int
12966 main ()
12967 {
12968 char *p = (char *) alloca (2 * sizeof (int));
12969                           if (p) return 0;
12970   ;
12971   return 0;
12972 }
12973 _ACEOF
12974 if ac_fn_c_try_link "$LINENO"; then :
12975   ac_cv_working_alloca_h=yes
12976 else
12977   ac_cv_working_alloca_h=no
12978 fi
12979 rm -f core conftest.err conftest.$ac_objext \
12980     conftest$ac_exeext conftest.$ac_ext
12981 fi
12982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12983 $as_echo "$ac_cv_working_alloca_h" >&6; }
12984 if test $ac_cv_working_alloca_h = yes; then
12985
12986 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12987
12988 fi
12989
12990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12991 $as_echo_n "checking for alloca... " >&6; }
12992 if test "${ac_cv_func_alloca_works+set}" = set; then :
12993   $as_echo_n "(cached) " >&6
12994 else
12995   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12996 /* end confdefs.h.  */
12997 #ifdef __GNUC__
12998 # define alloca __builtin_alloca
12999 #else
13000 # ifdef _MSC_VER
13001 #  include <malloc.h>
13002 #  define alloca _alloca
13003 # else
13004 #  ifdef HAVE_ALLOCA_H
13005 #   include <alloca.h>
13006 #  else
13007 #   ifdef _AIX
13008  #pragma alloca
13009 #   else
13010 #    ifndef alloca /* predefined by HP cc +Olibcalls */
13011 char *alloca ();
13012 #    endif
13013 #   endif
13014 #  endif
13015 # endif
13016 #endif
13017
13018 int
13019 main ()
13020 {
13021 char *p = (char *) alloca (1);
13022                                     if (p) return 0;
13023   ;
13024   return 0;
13025 }
13026 _ACEOF
13027 if ac_fn_c_try_link "$LINENO"; then :
13028   ac_cv_func_alloca_works=yes
13029 else
13030   ac_cv_func_alloca_works=no
13031 fi
13032 rm -f core conftest.err conftest.$ac_objext \
13033     conftest$ac_exeext conftest.$ac_ext
13034 fi
13035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13036 $as_echo "$ac_cv_func_alloca_works" >&6; }
13037
13038 if test $ac_cv_func_alloca_works = yes; then
13039
13040 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13041
13042 else
13043   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13044 # that cause trouble.  Some versions do not even contain alloca or
13045 # contain a buggy version.  If you still want to use their alloca,
13046 # use ar to extract alloca.o from them instead of compiling alloca.c.
13047
13048 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13049
13050 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13051
13052
13053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13054 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13055 if test "${ac_cv_os_cray+set}" = set; then :
13056   $as_echo_n "(cached) " >&6
13057 else
13058   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13059 /* end confdefs.h.  */
13060 #if defined CRAY && ! defined CRAY2
13061 webecray
13062 #else
13063 wenotbecray
13064 #endif
13065
13066 _ACEOF
13067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13068   $EGREP "webecray" >/dev/null 2>&1; then :
13069   ac_cv_os_cray=yes
13070 else
13071   ac_cv_os_cray=no
13072 fi
13073 rm -f conftest*
13074
13075 fi
13076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13077 $as_echo "$ac_cv_os_cray" >&6; }
13078 if test $ac_cv_os_cray = yes; then
13079   for ac_func in _getb67 GETB67 getb67; do
13080     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13081 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13082 eval as_val=\$$as_ac_var
13083    if test "x$as_val" = x""yes; then :
13084
13085 cat >>confdefs.h <<_ACEOF
13086 #define CRAY_STACKSEG_END $ac_func
13087 _ACEOF
13088
13089     break
13090 fi
13091
13092   done
13093 fi
13094
13095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13096 $as_echo_n "checking stack direction for C alloca... " >&6; }
13097 if test "${ac_cv_c_stack_direction+set}" = set; then :
13098   $as_echo_n "(cached) " >&6
13099 else
13100   if test "$cross_compiling" = yes; then :
13101   ac_cv_c_stack_direction=0
13102 else
13103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13104 /* end confdefs.h.  */
13105 $ac_includes_default
13106 int
13107 find_stack_direction ()
13108 {
13109   static char *addr = 0;
13110   auto char dummy;
13111   if (addr == 0)
13112     {
13113       addr = &dummy;
13114       return find_stack_direction ();
13115     }
13116   else
13117     return (&dummy > addr) ? 1 : -1;
13118 }
13119
13120 int
13121 main ()
13122 {
13123   return find_stack_direction () < 0;
13124 }
13125 _ACEOF
13126 if ac_fn_c_try_run "$LINENO"; then :
13127   ac_cv_c_stack_direction=1
13128 else
13129   ac_cv_c_stack_direction=-1
13130 fi
13131 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13132   conftest.$ac_objext conftest.beam conftest.$ac_ext
13133 fi
13134
13135 fi
13136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13137 $as_echo "$ac_cv_c_stack_direction" >&6; }
13138 cat >>confdefs.h <<_ACEOF
13139 #define STACK_DIRECTION $ac_cv_c_stack_direction
13140 _ACEOF
13141
13142
13143 fi
13144
13145
13146
13147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13148 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13149 if test "${am_cv_langinfo_codeset+set}" = set; then :
13150   $as_echo_n "(cached) " >&6
13151 else
13152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13153 /* end confdefs.h.  */
13154 #include <langinfo.h>
13155 int
13156 main ()
13157 {
13158 char* cs = nl_langinfo(CODESET);
13159   ;
13160   return 0;
13161 }
13162 _ACEOF
13163 if ac_fn_c_try_link "$LINENO"; then :
13164   am_cv_langinfo_codeset=yes
13165 else
13166   am_cv_langinfo_codeset=no
13167 fi
13168 rm -f core conftest.err conftest.$ac_objext \
13169     conftest$ac_exeext conftest.$ac_ext
13170
13171 fi
13172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13173 $as_echo "$am_cv_langinfo_codeset" >&6; }
13174   if test $am_cv_langinfo_codeset = yes; then
13175
13176 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13177
13178   fi
13179
13180
13181   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
13182 do :
13183   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13184 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13185 eval as_val=\$$as_ac_Header
13186    if test "x$as_val" = x""yes; then :
13187   cat >>confdefs.h <<_ACEOF
13188 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13189 _ACEOF
13190
13191 fi
13192
13193 done
13194
13195
13196   for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
13197 do :
13198   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13199 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13200 eval as_val=\$$as_ac_var
13201    if test "x$as_val" = x""yes; then :
13202   cat >>confdefs.h <<_ACEOF
13203 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13204 _ACEOF
13205
13206 fi
13207 done
13208
13209
13210   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13211 if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13212   ac_have_decl=1
13213 else
13214   ac_have_decl=0
13215 fi
13216
13217 cat >>confdefs.h <<_ACEOF
13218 #define HAVE_DECL_STRERROR $ac_have_decl
13219 _ACEOF
13220 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13221 if test "x$ac_cv_have_decl_strstr" = x""yes; then :
13222   ac_have_decl=1
13223 else
13224   ac_have_decl=0
13225 fi
13226
13227 cat >>confdefs.h <<_ACEOF
13228 #define HAVE_DECL_STRSTR $ac_have_decl
13229 _ACEOF
13230
13231
13232     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13233 $as_echo_n "checking for sigsetjmp... " >&6; }
13234 if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13235   $as_echo_n "(cached) " >&6
13236 else
13237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13238 /* end confdefs.h.  */
13239
13240 #include <setjmp.h>
13241
13242 int
13243 main ()
13244 {
13245 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13246   ;
13247   return 0;
13248 }
13249 _ACEOF
13250 if ac_fn_c_try_compile "$LINENO"; then :
13251   gdb_cv_func_sigsetjmp=yes
13252 else
13253   gdb_cv_func_sigsetjmp=no
13254 fi
13255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13256 fi
13257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13258 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13259 if test $gdb_cv_func_sigsetjmp = yes; then
13260
13261 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13262
13263 fi
13264
13265
13266 # Check the return and argument types of ptrace.
13267
13268
13269 for ac_header in sys/ptrace.h ptrace.h
13270 do :
13271   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13272 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13273 eval as_val=\$$as_ac_Header
13274    if test "x$as_val" = x""yes; then :
13275   cat >>confdefs.h <<_ACEOF
13276 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13277 _ACEOF
13278
13279 fi
13280
13281 done
13282
13283
13284 gdb_ptrace_headers='
13285 #include <sys/types.h>
13286 #if HAVE_SYS_PTRACE_H
13287 # include <sys/ptrace.h>
13288 #endif
13289 #if HAVE_UNISTD_H
13290 # include <unistd.h>
13291 #endif
13292 '
13293 # There is no point in checking if we don't have a prototype.
13294 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
13295 "
13296 if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
13297   ac_have_decl=1
13298 else
13299   ac_have_decl=0
13300 fi
13301
13302 cat >>confdefs.h <<_ACEOF
13303 #define HAVE_DECL_PTRACE $ac_have_decl
13304 _ACEOF
13305 if test $ac_have_decl = 1; then :
13306
13307 else
13308
13309   : ${gdb_cv_func_ptrace_ret='int'}
13310   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13311
13312 fi
13313
13314 # Check return type.  Varargs (used on GNU/Linux) conflict with the
13315 # empty argument list, so check for that explicitly.
13316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13317 $as_echo_n "checking return type of ptrace... " >&6; }
13318 if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
13319   $as_echo_n "(cached) " >&6
13320 else
13321   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13322 /* end confdefs.h.  */
13323 $gdb_ptrace_headers
13324 int
13325 main ()
13326 {
13327 extern long ptrace (enum __ptrace_request, ...);
13328   ;
13329   return 0;
13330 }
13331 _ACEOF
13332 if ac_fn_c_try_compile "$LINENO"; then :
13333   gdb_cv_func_ptrace_ret='long'
13334 else
13335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13336 /* end confdefs.h.  */
13337 $gdb_ptrace_headers
13338 int
13339 main ()
13340 {
13341 extern int ptrace ();
13342   ;
13343   return 0;
13344 }
13345 _ACEOF
13346 if ac_fn_c_try_compile "$LINENO"; then :
13347   gdb_cv_func_ptrace_ret='int'
13348 else
13349   gdb_cv_func_ptrace_ret='long'
13350 fi
13351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13352 fi
13353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13354 fi
13355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13356 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13357
13358 cat >>confdefs.h <<_ACEOF
13359 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13360 _ACEOF
13361
13362 # Check argument types.
13363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13364 $as_echo_n "checking types of arguments for ptrace... " >&6; }
13365 if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13366   $as_echo_n "(cached) " >&6
13367 else
13368
13369   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13370 /* end confdefs.h.  */
13371 $gdb_ptrace_headers
13372 int
13373 main ()
13374 {
13375 extern long ptrace (enum __ptrace_request, ...);
13376   ;
13377   return 0;
13378 }
13379 _ACEOF
13380 if ac_fn_c_try_compile "$LINENO"; then :
13381   gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
13382 else
13383
13384 for gdb_arg1 in 'int' 'long'; do
13385  for gdb_arg2 in 'pid_t' 'int' 'long'; do
13386   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13387    for gdb_arg4 in 'int' 'long' 'void *'; do
13388      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13389 /* end confdefs.h.  */
13390 $gdb_ptrace_headers
13391 int
13392 main ()
13393 {
13394
13395 extern $gdb_cv_func_ptrace_ret
13396   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13397
13398   ;
13399   return 0;
13400 }
13401 _ACEOF
13402 if ac_fn_c_try_compile "$LINENO"; then :
13403   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13404     break 4;
13405 fi
13406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13407     for gdb_arg5 in 'int *' 'int' 'long'; do
13408      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13409 /* end confdefs.h.  */
13410 $gdb_ptrace_headers
13411 int
13412 main ()
13413 {
13414
13415 extern $gdb_cv_func_ptrace_ret
13416   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13417
13418   ;
13419   return 0;
13420 }
13421 _ACEOF
13422 if ac_fn_c_try_compile "$LINENO"; then :
13423
13424 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13425     break 5;
13426 fi
13427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13428     done
13429    done
13430   done
13431  done
13432 done
13433 # Provide a safe default value.
13434 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13435
13436 fi
13437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13438 fi
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13440 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
13441 ac_save_IFS=$IFS; IFS=','
13442 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13443 IFS=$ac_save_IFS
13444 shift
13445
13446 cat >>confdefs.h <<_ACEOF
13447 #define PTRACE_TYPE_ARG1 $1
13448 _ACEOF
13449
13450
13451 cat >>confdefs.h <<_ACEOF
13452 #define PTRACE_TYPE_ARG3 $3
13453 _ACEOF
13454
13455
13456 cat >>confdefs.h <<_ACEOF
13457 #define PTRACE_TYPE_ARG4 $4
13458 _ACEOF
13459
13460 if test -n "$5"; then
13461
13462 cat >>confdefs.h <<_ACEOF
13463 #define PTRACE_TYPE_ARG5 $5
13464 _ACEOF
13465
13466 fi
13467
13468
13469 if test "$cross_compiling" = no; then
13470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13471 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13472 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13473   $as_echo_n "(cached) " >&6
13474 else
13475   if test "$cross_compiling" = yes; then :
13476   as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
13477 else
13478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13479 /* end confdefs.h.  */
13480 $ac_includes_default
13481 int
13482 main ()
13483 {
13484 /* If this system has a BSD-style setpgrp which takes arguments,
13485   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13486   exit successfully. */
13487   return setpgrp (1,1) != -1;
13488   ;
13489   return 0;
13490 }
13491 _ACEOF
13492 if ac_fn_c_try_run "$LINENO"; then :
13493   ac_cv_func_setpgrp_void=no
13494 else
13495   ac_cv_func_setpgrp_void=yes
13496 fi
13497 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13498   conftest.$ac_objext conftest.beam conftest.$ac_ext
13499 fi
13500
13501 fi
13502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13503 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
13504 if test $ac_cv_func_setpgrp_void = yes; then
13505
13506 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
13507
13508 fi
13509
13510 else
13511   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13512 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13513 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13514   $as_echo_n "(cached) " >&6
13515 else
13516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13517 /* end confdefs.h.  */
13518
13519 #include <unistd.h>
13520
13521 int
13522 main ()
13523 {
13524
13525   if (setpgrp(1,1) == -1)
13526     exit (0);
13527   else
13528     exit (1);
13529
13530   ;
13531   return 0;
13532 }
13533 _ACEOF
13534 if ac_fn_c_try_compile "$LINENO"; then :
13535   ac_cv_func_setpgrp_void=no
13536 else
13537   ac_cv_func_setpgrp_void=yes
13538 fi
13539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13540 fi
13541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13542 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
13543 if test $ac_cv_func_setpgrp_void = yes; then
13544   $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
13545
13546 fi
13547 fi
13548
13549 # Assume we'll default to using the included libiberty regex.
13550 gdb_use_included_regex=yes
13551
13552 # However, if the system regex is GNU regex, then default to *not*
13553 # using the included regex.
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13555 $as_echo_n "checking for GNU regex... " >&6; }
13556 if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13557   $as_echo_n "(cached) " >&6
13558 else
13559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13560 /* end confdefs.h.  */
13561 #include <gnu-versions.h>
13562 int
13563 main ()
13564 {
13565 #define REGEX_INTERFACE_VERSION 1
13566 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13567 # error "Version mismatch"
13568 #endif
13569   ;
13570   return 0;
13571 }
13572 _ACEOF
13573 if ac_fn_c_try_compile "$LINENO"; then :
13574   gdb_cv_have_gnu_regex=yes
13575 else
13576   gdb_cv_have_gnu_regex=no
13577 fi
13578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13579 fi
13580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13581 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
13582 if test $gdb_cv_have_gnu_regex = yes; then
13583   gdb_use_included_regex=no
13584 fi
13585
13586
13587 # Check whether --with-included-regex was given.
13588 if test "${with_included_regex+set}" = set; then :
13589   withval=$with_included_regex; gdb_with_regex=$withval
13590 else
13591   gdb_with_regex=$gdb_use_included_regex
13592 fi
13593
13594 if test "$gdb_with_regex" = yes; then
13595
13596 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13597
13598 fi
13599
13600 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13601 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13602 #include <sys/proc.h>
13603
13604 "
13605 if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
13606
13607 cat >>confdefs.h <<_ACEOF
13608 #define HAVE_STRUCT_THREAD_TD_PCB 1
13609 _ACEOF
13610
13611
13612 fi
13613
13614
13615 # See if <sys/lwp.h> defines `struct lwp`.
13616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13617 $as_echo_n "checking for struct lwp... " >&6; }
13618 if test "${gdb_cv_struct_lwp+set}" = set; then :
13619   $as_echo_n "(cached) " >&6
13620 else
13621   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13622 /* end confdefs.h.  */
13623 #include <sys/param.h>
13624 #include <sys/lwp.h>
13625 int
13626 main ()
13627 {
13628 struct lwp l;
13629   ;
13630   return 0;
13631 }
13632 _ACEOF
13633 if ac_fn_c_try_compile "$LINENO"; then :
13634   gdb_cv_struct_lwp=yes
13635 else
13636   gdb_cv_struct_lwp=no
13637 fi
13638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13639 fi
13640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13641 $as_echo "$gdb_cv_struct_lwp" >&6; }
13642 if test $gdb_cv_struct_lwp = yes; then
13643
13644 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
13645
13646 fi
13647
13648 # See if <machine/reg.h> degines `struct reg'.
13649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13650 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13651 if test "${gdb_cv_struct_reg+set}" = set; then :
13652   $as_echo_n "(cached) " >&6
13653 else
13654   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13655 /* end confdefs.h.  */
13656 #include <sys/types.h>
13657 #include <machine/reg.h>
13658 int
13659 main ()
13660 {
13661 struct reg r;
13662   ;
13663   return 0;
13664 }
13665 _ACEOF
13666 if ac_fn_c_try_compile "$LINENO"; then :
13667   gdb_cv_struct_reg=yes
13668 else
13669   gdb_cv_struct_reg=no
13670 fi
13671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13672 fi
13673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13674 $as_echo "$gdb_cv_struct_reg" >&6; }
13675 if test $gdb_cv_struct_reg = yes; then
13676
13677 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
13678
13679 fi
13680
13681 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13682 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
13683 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
13684 #include <machine/reg.h>
13685 "
13686 if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
13687
13688 cat >>confdefs.h <<_ACEOF
13689 #define HAVE_STRUCT_REG_R_FS 1
13690 _ACEOF
13691
13692
13693 fi
13694 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
13695 #include <machine/reg.h>
13696 "
13697 if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
13698
13699 cat >>confdefs.h <<_ACEOF
13700 #define HAVE_STRUCT_REG_R_GS 1
13701 _ACEOF
13702
13703
13704 fi
13705
13706
13707 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
13708 # Older amd64 Linux's don't have the fs_base and gs_base members of
13709 # `struct user_regs_struct'.
13710 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>
13711 "
13712 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
13713
13714 cat >>confdefs.h <<_ACEOF
13715 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
13716 _ACEOF
13717
13718
13719 fi
13720 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>
13721 "
13722 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
13723
13724 cat >>confdefs.h <<_ACEOF
13725 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
13726 _ACEOF
13727
13728
13729 fi
13730
13731
13732 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
13733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13734 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13735 if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13736   $as_echo_n "(cached) " >&6
13737 else
13738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13739 /* end confdefs.h.  */
13740 #include <sys/ptrace.h>
13741 int
13742 main ()
13743 {
13744 PTRACE_GETREGS;
13745   ;
13746   return 0;
13747 }
13748 _ACEOF
13749 if ac_fn_c_try_compile "$LINENO"; then :
13750   gdb_cv_have_ptrace_getregs=yes
13751 else
13752   gdb_cv_have_ptrace_getregs=no
13753 fi
13754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13755 fi
13756
13757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13758 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
13759 if test $gdb_cv_have_ptrace_getregs = yes; then
13760
13761 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
13762
13763 fi
13764
13765 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
13766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13767 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13768 if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13769   $as_echo_n "(cached) " >&6
13770 else
13771   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13772 /* end confdefs.h.  */
13773 #include <sys/ptrace.h>
13774 int
13775 main ()
13776 {
13777 PTRACE_GETFPXREGS;
13778   ;
13779   return 0;
13780 }
13781 _ACEOF
13782 if ac_fn_c_try_compile "$LINENO"; then :
13783   gdb_cv_have_ptrace_getfpxregs=yes
13784 else
13785   gdb_cv_have_ptrace_getfpxregs=no
13786 fi
13787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13788 fi
13789
13790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13791 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
13792 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
13793
13794 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
13795
13796 fi
13797
13798 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
13799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13800 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
13801 if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13802   $as_echo_n "(cached) " >&6
13803 else
13804   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13805 /* end confdefs.h.  */
13806 #include <sys/types.h>
13807 #include <sys/ptrace.h>
13808 int
13809 main ()
13810 {
13811 PT_GETDBREGS;
13812   ;
13813   return 0;
13814 }
13815 _ACEOF
13816 if ac_fn_c_try_compile "$LINENO"; then :
13817   gdb_cv_have_pt_getdbregs=yes
13818 else
13819   gdb_cv_have_pt_getdbregs=no
13820 fi
13821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13822 fi
13823
13824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13825 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
13826 if test $gdb_cv_have_pt_getdbregs = yes; then
13827
13828 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
13829
13830 fi
13831
13832 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
13833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13834 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13835 if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13836   $as_echo_n "(cached) " >&6
13837 else
13838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13839 /* end confdefs.h.  */
13840 #include <sys/types.h>
13841 #include <sys/ptrace.h>
13842 int
13843 main ()
13844 {
13845 PT_GETXMMREGS;
13846   ;
13847   return 0;
13848 }
13849 _ACEOF
13850 if ac_fn_c_try_compile "$LINENO"; then :
13851   gdb_cv_have_pt_getxmmregs=yes
13852 else
13853   gdb_cv_have_pt_getxmmregs=no
13854 fi
13855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13856 fi
13857
13858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13859 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
13860 if test $gdb_cv_have_pt_getxmmregs = yes; then
13861
13862 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
13863
13864 fi
13865
13866 # See if <sys/ptrace.h> supports LWP names on FreeBSD
13867 # Older FreeBSD versions don't have the pl_tdname member of
13868 # `struct ptrace_lwpinfo'.
13869 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
13870 "
13871 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
13872
13873 cat >>confdefs.h <<_ACEOF
13874 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
13875 _ACEOF
13876
13877
13878 fi
13879
13880
13881 # See if <sys/ptrace.h> supports syscall fields on FreeBSD.  The
13882 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
13883 # FreeBSD 10.3.
13884 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
13885 "
13886 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
13887
13888 cat >>confdefs.h <<_ACEOF
13889 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
13890 _ACEOF
13891
13892
13893 fi
13894
13895
13896 # Detect which type of /proc is in use, such as for Solaris.
13897
13898 if test "${target}" = "${host}"; then
13899   case "${host}" in
13900   *-*-sysv4.2* | *-*-sysv5* )
13901
13902 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
13903
13904       ;;
13905   *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
13906
13907 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
13908
13909       ;;
13910   esac
13911 fi
13912
13913 if test "$ac_cv_header_sys_procfs_h" = yes; then
13914   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13915 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13916  if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13917   $as_echo_n "(cached) " >&6
13918 else
13919   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13920 /* end confdefs.h.  */
13921
13922 #define _SYSCALL32
13923 /* Needed for new procfs interface on sparc-solaris.  */
13924 #define _STRUCTURED_PROC 1
13925 #include <sys/procfs.h>
13926 int
13927 main ()
13928 {
13929 gregset_t avar
13930   ;
13931   return 0;
13932 }
13933 _ACEOF
13934 if ac_fn_c_try_compile "$LINENO"; then :
13935   bfd_cv_have_sys_procfs_type_gregset_t=yes
13936 else
13937   bfd_cv_have_sys_procfs_type_gregset_t=no
13938
13939 fi
13940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13941 fi
13942
13943  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
13944
13945 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
13946
13947  fi
13948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13949 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
13950
13951   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13952 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13953  if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13954   $as_echo_n "(cached) " >&6
13955 else
13956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13957 /* end confdefs.h.  */
13958
13959 #define _SYSCALL32
13960 /* Needed for new procfs interface on sparc-solaris.  */
13961 #define _STRUCTURED_PROC 1
13962 #include <sys/procfs.h>
13963 int
13964 main ()
13965 {
13966 fpregset_t avar
13967   ;
13968   return 0;
13969 }
13970 _ACEOF
13971 if ac_fn_c_try_compile "$LINENO"; then :
13972   bfd_cv_have_sys_procfs_type_fpregset_t=yes
13973 else
13974   bfd_cv_have_sys_procfs_type_fpregset_t=no
13975
13976 fi
13977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13978 fi
13979
13980  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
13981
13982 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
13983
13984  fi
13985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13986 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
13987
13988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13989 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13990  if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13991   $as_echo_n "(cached) " >&6
13992 else
13993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13994 /* end confdefs.h.  */
13995
13996 #define _SYSCALL32
13997 /* Needed for new procfs interface on sparc-solaris.  */
13998 #define _STRUCTURED_PROC 1
13999 #include <sys/procfs.h>
14000 int
14001 main ()
14002 {
14003 prgregset_t avar
14004   ;
14005   return 0;
14006 }
14007 _ACEOF
14008 if ac_fn_c_try_compile "$LINENO"; then :
14009   bfd_cv_have_sys_procfs_type_prgregset_t=yes
14010 else
14011   bfd_cv_have_sys_procfs_type_prgregset_t=no
14012
14013 fi
14014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14015 fi
14016
14017  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14018
14019 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14020
14021  fi
14022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14023 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14024
14025   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14026 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14027  if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
14028   $as_echo_n "(cached) " >&6
14029 else
14030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14031 /* end confdefs.h.  */
14032
14033 #define _SYSCALL32
14034 /* Needed for new procfs interface on sparc-solaris.  */
14035 #define _STRUCTURED_PROC 1
14036 #include <sys/procfs.h>
14037 int
14038 main ()
14039 {
14040 prfpregset_t avar
14041   ;
14042   return 0;
14043 }
14044 _ACEOF
14045 if ac_fn_c_try_compile "$LINENO"; then :
14046   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14047 else
14048   bfd_cv_have_sys_procfs_type_prfpregset_t=no
14049
14050 fi
14051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14052 fi
14053
14054  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14055
14056 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14057
14058  fi
14059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14060 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14061
14062   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14063 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14064  if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
14065   $as_echo_n "(cached) " >&6
14066 else
14067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14068 /* end confdefs.h.  */
14069
14070 #define _SYSCALL32
14071 /* Needed for new procfs interface on sparc-solaris.  */
14072 #define _STRUCTURED_PROC 1
14073 #include <sys/procfs.h>
14074 int
14075 main ()
14076 {
14077 prgregset32_t avar
14078   ;
14079   return 0;
14080 }
14081 _ACEOF
14082 if ac_fn_c_try_compile "$LINENO"; then :
14083   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14084 else
14085   bfd_cv_have_sys_procfs_type_prgregset32_t=no
14086
14087 fi
14088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14089 fi
14090
14091  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14092
14093 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14094
14095  fi
14096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14097 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14098
14099   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14100 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14101  if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
14102   $as_echo_n "(cached) " >&6
14103 else
14104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14105 /* end confdefs.h.  */
14106
14107 #define _SYSCALL32
14108 /* Needed for new procfs interface on sparc-solaris.  */
14109 #define _STRUCTURED_PROC 1
14110 #include <sys/procfs.h>
14111 int
14112 main ()
14113 {
14114 lwpid_t avar
14115   ;
14116   return 0;
14117 }
14118 _ACEOF
14119 if ac_fn_c_try_compile "$LINENO"; then :
14120   bfd_cv_have_sys_procfs_type_lwpid_t=yes
14121 else
14122   bfd_cv_have_sys_procfs_type_lwpid_t=no
14123
14124 fi
14125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14126 fi
14127
14128  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14129
14130 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14131
14132  fi
14133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14134 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14135
14136   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14137 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14138  if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
14139   $as_echo_n "(cached) " >&6
14140 else
14141   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14142 /* end confdefs.h.  */
14143
14144 #define _SYSCALL32
14145 /* Needed for new procfs interface on sparc-solaris.  */
14146 #define _STRUCTURED_PROC 1
14147 #include <sys/procfs.h>
14148 int
14149 main ()
14150 {
14151 psaddr_t avar
14152   ;
14153   return 0;
14154 }
14155 _ACEOF
14156 if ac_fn_c_try_compile "$LINENO"; then :
14157   bfd_cv_have_sys_procfs_type_psaddr_t=yes
14158 else
14159   bfd_cv_have_sys_procfs_type_psaddr_t=no
14160
14161 fi
14162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14163 fi
14164
14165  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14166
14167 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14168
14169  fi
14170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14171 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14172
14173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
14174 $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
14175  if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
14176   $as_echo_n "(cached) " >&6
14177 else
14178   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14179 /* end confdefs.h.  */
14180
14181 #define _SYSCALL32
14182 /* Needed for new procfs interface on sparc-solaris.  */
14183 #define _STRUCTURED_PROC 1
14184 #include <sys/procfs.h>
14185 int
14186 main ()
14187 {
14188 prsysent_t avar
14189   ;
14190   return 0;
14191 }
14192 _ACEOF
14193 if ac_fn_c_try_compile "$LINENO"; then :
14194   bfd_cv_have_sys_procfs_type_prsysent_t=yes
14195 else
14196   bfd_cv_have_sys_procfs_type_prsysent_t=no
14197
14198 fi
14199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14200 fi
14201
14202  if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
14203
14204 $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
14205
14206  fi
14207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
14208 $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
14209
14210   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
14211 $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
14212  if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
14213   $as_echo_n "(cached) " >&6
14214 else
14215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14216 /* end confdefs.h.  */
14217
14218 #define _SYSCALL32
14219 /* Needed for new procfs interface on sparc-solaris.  */
14220 #define _STRUCTURED_PROC 1
14221 #include <sys/procfs.h>
14222 int
14223 main ()
14224 {
14225 pr_sigset_t avar
14226   ;
14227   return 0;
14228 }
14229 _ACEOF
14230 if ac_fn_c_try_compile "$LINENO"; then :
14231   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
14232 else
14233   bfd_cv_have_sys_procfs_type_pr_sigset_t=no
14234
14235 fi
14236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14237 fi
14238
14239  if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
14240
14241 $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
14242
14243  fi
14244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
14245 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
14246
14247   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
14248 $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
14249  if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
14250   $as_echo_n "(cached) " >&6
14251 else
14252   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14253 /* end confdefs.h.  */
14254
14255 #define _SYSCALL32
14256 /* Needed for new procfs interface on sparc-solaris.  */
14257 #define _STRUCTURED_PROC 1
14258 #include <sys/procfs.h>
14259 int
14260 main ()
14261 {
14262 pr_sigaction64_t avar
14263   ;
14264   return 0;
14265 }
14266 _ACEOF
14267 if ac_fn_c_try_compile "$LINENO"; then :
14268   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
14269 else
14270   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
14271
14272 fi
14273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14274 fi
14275
14276  if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
14277
14278 $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
14279
14280  fi
14281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14282 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
14283
14284   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14285 $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14286  if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14287   $as_echo_n "(cached) " >&6
14288 else
14289   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14290 /* end confdefs.h.  */
14291
14292 #define _SYSCALL32
14293 /* Needed for new procfs interface on sparc-solaris.  */
14294 #define _STRUCTURED_PROC 1
14295 #include <sys/procfs.h>
14296 int
14297 main ()
14298 {
14299 pr_siginfo64_t avar
14300   ;
14301   return 0;
14302 }
14303 _ACEOF
14304 if ac_fn_c_try_compile "$LINENO"; then :
14305   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14306 else
14307   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
14308
14309 fi
14310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14311 fi
14312
14313  if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
14314
14315 $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
14316
14317  fi
14318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14319 $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
14320
14321
14322
14323
14324
14325   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14326     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14327 $as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14328     if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14329   $as_echo_n "(cached) " >&6
14330 else
14331   if test "$cross_compiling" = yes; then :
14332   gdb_cv_prfpregset_t_broken=yes
14333 else
14334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14335 /* end confdefs.h.  */
14336 #include <sys/procfs.h>
14337        int main ()
14338        {
14339          if (sizeof (prfpregset_t) == sizeof (void *))
14340            return 1;
14341          return 0;
14342        }
14343 _ACEOF
14344 if ac_fn_c_try_run "$LINENO"; then :
14345   gdb_cv_prfpregset_t_broken=no
14346 else
14347   gdb_cv_prfpregset_t_broken=yes
14348 fi
14349 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14350   conftest.$ac_objext conftest.beam conftest.$ac_ext
14351 fi
14352
14353 fi
14354
14355     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14356 $as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
14357     if test $gdb_cv_prfpregset_t_broken = yes; then
14358
14359 $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
14360
14361     fi
14362   fi
14363 fi
14364
14365 # Check if the compiler supports the `long long' type.
14366
14367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14368 $as_echo_n "checking for long long support in compiler... " >&6; }
14369 if test "${gdb_cv_c_long_long+set}" = set; then :
14370   $as_echo_n "(cached) " >&6
14371 else
14372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14373 /* end confdefs.h.  */
14374 extern long long foo;
14375 int
14376 main ()
14377 {
14378 switch (foo & 2) { case 0: return 1; }
14379   ;
14380   return 0;
14381 }
14382 _ACEOF
14383 if ac_fn_c_try_compile "$LINENO"; then :
14384   gdb_cv_c_long_long=yes
14385 else
14386   gdb_cv_c_long_long=no
14387 fi
14388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14389 fi
14390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14391 $as_echo "$gdb_cv_c_long_long" >&6; }
14392 if test $gdb_cv_c_long_long != yes; then
14393   # libdecnumber requires long long.
14394   as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
14395 fi
14396
14397 # Check if the compiler and runtime support printing long longs.
14398
14399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14400 $as_echo_n "checking for long long support in printf... " >&6; }
14401 if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14402   $as_echo_n "(cached) " >&6
14403 else
14404   if test "$cross_compiling" = yes; then :
14405   gdb_cv_printf_has_long_long=no
14406 else
14407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14408 /* end confdefs.h.  */
14409 $ac_includes_default
14410 int
14411 main ()
14412 {
14413 char buf[32];
14414   long long l = 0;
14415   l = (l << 16) + 0x0123;
14416   l = (l << 16) + 0x4567;
14417   l = (l << 16) + 0x89ab;
14418   l = (l << 16) + 0xcdef;
14419   sprintf (buf, "0x%016llx", l);
14420   return (strcmp ("0x0123456789abcdef", buf));
14421   ;
14422   return 0;
14423 }
14424 _ACEOF
14425 if ac_fn_c_try_run "$LINENO"; then :
14426   gdb_cv_printf_has_long_long=yes
14427 else
14428   gdb_cv_printf_has_long_long=no
14429 fi
14430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14431   conftest.$ac_objext conftest.beam conftest.$ac_ext
14432 fi
14433
14434 fi
14435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14436 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
14437 if test $gdb_cv_printf_has_long_long = yes; then
14438
14439 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
14440
14441 fi
14442
14443 # Check if the compiler and runtime support printing decfloats.
14444
14445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14446 $as_echo_n "checking for decfloat support in printf... " >&6; }
14447 if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14448   $as_echo_n "(cached) " >&6
14449 else
14450   if test "$cross_compiling" = yes; then :
14451   gdb_cv_printf_has_decfloat=no
14452 else
14453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14454 /* end confdefs.h.  */
14455 $ac_includes_default
14456 int
14457 main ()
14458 {
14459 char buf[64];
14460   _Decimal32 d32 = 1.2345df;
14461   _Decimal64 d64 = 1.2345dd;
14462   _Decimal128 d128 = 1.2345dl;
14463   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14464   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14465   ;
14466   return 0;
14467 }
14468 _ACEOF
14469 if ac_fn_c_try_run "$LINENO"; then :
14470   gdb_cv_printf_has_decfloat=yes
14471 else
14472   gdb_cv_printf_has_decfloat=no
14473 fi
14474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14475   conftest.$ac_objext conftest.beam conftest.$ac_ext
14476 fi
14477
14478 fi
14479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14480 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
14481 if test $gdb_cv_printf_has_decfloat = yes; then
14482
14483 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
14484
14485 fi
14486
14487 # Check if the compiler supports the `long double' type.  We can't use
14488 # AC_C_LONG_DOUBLE because that one does additional checks on the
14489 # constants defined in <float.h> that fail on some systems,
14490 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
14491
14492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14493 $as_echo_n "checking for long double support in compiler... " >&6; }
14494 if test "${gdb_cv_c_long_double+set}" = set; then :
14495   $as_echo_n "(cached) " >&6
14496 else
14497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14498 /* end confdefs.h.  */
14499 long double foo;
14500 _ACEOF
14501 if ac_fn_c_try_compile "$LINENO"; then :
14502   gdb_cv_c_long_double=yes
14503 else
14504   gdb_cv_c_long_double=no
14505 fi
14506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14507 fi
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14509 $as_echo "$gdb_cv_c_long_double" >&6; }
14510 if test $gdb_cv_c_long_double = yes; then
14511
14512 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
14513
14514 fi
14515
14516 # Check if the compiler and runtime support printing long doubles.
14517
14518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14519 $as_echo_n "checking for long double support in printf... " >&6; }
14520 if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14521   $as_echo_n "(cached) " >&6
14522 else
14523   if test "$cross_compiling" = yes; then :
14524   gdb_cv_printf_has_long_double=no
14525 else
14526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14527 /* end confdefs.h.  */
14528 $ac_includes_default
14529 int
14530 main ()
14531 {
14532 char buf[16];
14533   long double f = 3.141592653;
14534   sprintf (buf, "%Lg", f);
14535   return (strncmp ("3.14159", buf, 7));
14536   ;
14537   return 0;
14538 }
14539 _ACEOF
14540 if ac_fn_c_try_run "$LINENO"; then :
14541   gdb_cv_printf_has_long_double=yes
14542 else
14543   gdb_cv_printf_has_long_double=no
14544 fi
14545 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14546   conftest.$ac_objext conftest.beam conftest.$ac_ext
14547 fi
14548
14549 fi
14550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14551 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
14552 if test $gdb_cv_printf_has_long_double = yes; then
14553
14554 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
14555
14556 fi
14557
14558 # Check if the compiler and runtime support scanning long doubles.
14559
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14561 $as_echo_n "checking for long double support in scanf... " >&6; }
14562 if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14563   $as_echo_n "(cached) " >&6
14564 else
14565   if test "$cross_compiling" = yes; then :
14566   gdb_cv_scanf_has_long_double=no
14567 else
14568   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14569 /* end confdefs.h.  */
14570 #include <stdio.h>
14571 int
14572 main ()
14573 {
14574 char *buf = "3.141592653";
14575   long double f = 0;
14576   sscanf (buf, "%Lg", &f);
14577   return !(f > 3.14159 && f < 3.14160);
14578   ;
14579   return 0;
14580 }
14581 _ACEOF
14582 if ac_fn_c_try_run "$LINENO"; then :
14583   gdb_cv_scanf_has_long_double=yes
14584 else
14585   gdb_cv_scanf_has_long_double=no
14586 fi
14587 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14588   conftest.$ac_objext conftest.beam conftest.$ac_ext
14589 fi
14590
14591 fi
14592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14593 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
14594 if test $gdb_cv_scanf_has_long_double = yes; then
14595
14596 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
14597
14598 fi
14599
14600 case ${host_os} in
14601 aix*)
14602   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14603 $as_echo_n "checking for -bbigtoc option... " >&6; }
14604 if test "${gdb_cv_bigtoc+set}" = set; then :
14605   $as_echo_n "(cached) " >&6
14606 else
14607
14608     SAVE_LDFLAGS=$LDFLAGS
14609
14610     case $GCC in
14611     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14612     *) gdb_cv_bigtoc=-bbigtoc ;;
14613     esac
14614
14615     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
14616     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14617 /* end confdefs.h.  */
14618
14619 int
14620 main ()
14621 {
14622 int i;
14623   ;
14624   return 0;
14625 }
14626 _ACEOF
14627 if ac_fn_c_try_link "$LINENO"; then :
14628
14629 else
14630   gdb_cv_bigtoc=
14631 fi
14632 rm -f core conftest.err conftest.$ac_objext \
14633     conftest$ac_exeext conftest.$ac_ext
14634     LDFLAGS="${SAVE_LDFLAGS}"
14635
14636 fi
14637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14638 $as_echo "$gdb_cv_bigtoc" >&6; }
14639   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14640   ;;
14641 esac
14642
14643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
14644 $as_echo_n "checking for the dynamic export flag... " >&6; }
14645 dynamic_list=false
14646 if test "${gdb_native}" = yes; then
14647    # The dynamically loaded libthread_db needs access to symbols in the gdb
14648    # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
14649    # may not be supported there.
14650    old_LDFLAGS="$LDFLAGS"
14651    # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14652    RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14653    LDFLAGS="$LDFLAGS $RDYNAMIC"
14654    if test "${have_libpython}" = no; then
14655      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14656 /* end confdefs.h.  */
14657
14658 int
14659 main ()
14660 {
14661
14662   ;
14663   return 0;
14664 }
14665 _ACEOF
14666 if ac_fn_c_try_link "$LINENO"; then :
14667   dynamic_list=true
14668 fi
14669 rm -f core conftest.err conftest.$ac_objext \
14670     conftest$ac_exeext conftest.$ac_ext
14671    else
14672      # Workaround http://bugs.python.org/issue4434 where static
14673      # libpythonX.Y.a would get its symbols required for
14674      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14675      # Problem does not happen for the recommended libpythonX.Y.so linkage.
14676
14677      # Note the workaround for Python
14678      # http://bugs.python.org/issue10112 earlier has removed
14679      # -export-dynamic from PYTHON_LIBS.  That's exactly what we want
14680      # here too, as otherwise it'd make this -Wl,--dynamic-list test
14681      # always pass.
14682      old_CFLAGS="$CFLAGS"
14683      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14684      old_LIBS="$LIBS"
14685      LIBS="$LIBS $PYTHON_LIBS"
14686      old_CPPFLAGS="$CPPFLAGS"
14687      CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
14688      if test "$cross_compiling" = yes; then :
14689   true
14690 else
14691   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14692 /* end confdefs.h.  */
14693 #include "Python.h"
14694 int
14695 main ()
14696 {
14697 int err;
14698           Py_Initialize ();
14699           err = PyRun_SimpleString ("import itertools\n");
14700           Py_Finalize ();
14701           return err == 0 ? 0 : 1;
14702   ;
14703   return 0;
14704 }
14705 _ACEOF
14706 if ac_fn_c_try_run "$LINENO"; then :
14707   dynamic_list=true
14708 fi
14709 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14710   conftest.$ac_objext conftest.beam conftest.$ac_ext
14711 fi
14712
14713      LIBS="$old_LIBS"
14714      CFLAGS="$old_CFLAGS"
14715      CPPFLAGS="$old_CPPFLAGS"
14716    fi
14717    LDFLAGS="$old_LDFLAGS"
14718 fi
14719 if $dynamic_list; then
14720   found="-Wl,--dynamic-list"
14721   RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
14722 else
14723   found="-rdynamic"
14724   RDYNAMIC="-rdynamic"
14725 fi
14726
14727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
14728 $as_echo "$found" >&6; }
14729
14730
14731 if test ${build} = ${host} -a ${host} = ${target} ; then
14732    case ${host_os} in
14733    solaris*)
14734       # See if thread_db library is around for Solaris thread debugging.
14735       # Note that we must explicitly test for version 1 of the library
14736       # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14737       # the same API.
14738       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14739 $as_echo_n "checking for Solaris thread debugging library... " >&6; }
14740       if test -f /usr/lib/libthread_db.so.1 ; then
14741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14742 $as_echo "yes" >&6; }
14743
14744 $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
14745
14746          CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
14747          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
14748          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14749 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14750 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14751   $as_echo_n "(cached) " >&6
14752 else
14753   ac_check_lib_save_LIBS=$LIBS
14754 LIBS="-ldl  $LIBS"
14755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14756 /* end confdefs.h.  */
14757
14758 /* Override any GCC internal prototype to avoid an error.
14759    Use char because int might match the return type of a GCC
14760    builtin and then its argument prototype would still apply.  */
14761 #ifdef __cplusplus
14762 extern "C"
14763 #endif
14764 char dlopen ();
14765 int
14766 main ()
14767 {
14768 return dlopen ();
14769   ;
14770   return 0;
14771 }
14772 _ACEOF
14773 if ac_fn_c_try_link "$LINENO"; then :
14774   ac_cv_lib_dl_dlopen=yes
14775 else
14776   ac_cv_lib_dl_dlopen=no
14777 fi
14778 rm -f core conftest.err conftest.$ac_objext \
14779     conftest$ac_exeext conftest.$ac_ext
14780 LIBS=$ac_check_lib_save_LIBS
14781 fi
14782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14783 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14784 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
14785   cat >>confdefs.h <<_ACEOF
14786 #define HAVE_LIBDL 1
14787 _ACEOF
14788
14789   LIBS="-ldl $LIBS"
14790
14791 fi
14792
14793          CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
14794          # Sun randomly tweaked the prototypes in <proc_service.h>
14795          # at one point.
14796          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14797 $as_echo_n "checking if <proc_service.h> is old... " >&6; }
14798          if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14799   $as_echo_n "(cached) " >&6
14800 else
14801
14802             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14803 /* end confdefs.h.  */
14804
14805                 #include <proc_service.h>
14806                 ps_err_e ps_pdwrite
14807                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
14808
14809 int
14810 main ()
14811 {
14812
14813   ;
14814   return 0;
14815 }
14816 _ACEOF
14817 if ac_fn_c_try_compile "$LINENO"; then :
14818   gdb_cv_proc_service_is_old=no
14819 else
14820   gdb_cv_proc_service_is_old=yes
14821 fi
14822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14823
14824 fi
14825
14826          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14827 $as_echo "$gdb_cv_proc_service_is_old" >&6; }
14828          if test $gdb_cv_proc_service_is_old = yes; then
14829
14830 $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
14831
14832          fi
14833       else
14834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14835 $as_echo "no" >&6; }
14836       fi
14837       ;;
14838    aix*)
14839       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14840 $as_echo_n "checking for AiX thread debugging library... " >&6; }
14841       if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14842   $as_echo_n "(cached) " >&6
14843 else
14844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14845 /* end confdefs.h.  */
14846 #include <sys/pthdebug.h>
14847 int
14848 main ()
14849 {
14850 #ifndef PTHDB_VERSION_3
14851                                     #error
14852                                     #endif
14853   ;
14854   return 0;
14855 }
14856 _ACEOF
14857 if ac_fn_c_try_compile "$LINENO"; then :
14858   gdb_cv_have_aix_thread_debug=yes
14859 else
14860   gdb_cv_have_aix_thread_debug=no
14861 fi
14862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14863 fi
14864
14865       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14866 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
14867       if test $gdb_cv_have_aix_thread_debug = yes; then
14868          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
14869          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
14870          LIBS="$LIBS -lpthdebug"
14871
14872          # Older versions of AIX do not provide the declaration for
14873          # the getthrds function (it appears that it was introduced
14874          # with AIX 6.x).
14875          ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14876 "
14877 if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14878   ac_have_decl=1
14879 else
14880   ac_have_decl=0
14881 fi
14882
14883 cat >>confdefs.h <<_ACEOF
14884 #define HAVE_DECL_GETTHRDS $ac_have_decl
14885 _ACEOF
14886
14887       fi
14888       ;;
14889    esac
14890
14891 fi
14892
14893 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
14894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14895 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14896 if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14897   $as_echo_n "(cached) " >&6
14898 else
14899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14900 /* end confdefs.h.  */
14901 #include <thread_db.h>
14902 int
14903 main ()
14904 {
14905 int i = TD_NOTALLOC;
14906   ;
14907   return 0;
14908 }
14909 _ACEOF
14910 if ac_fn_c_try_compile "$LINENO"; then :
14911   gdb_cv_thread_db_h_has_td_notalloc=yes
14912 else
14913   gdb_cv_thread_db_h_has_td_notalloc=no
14914
14915 fi
14916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14917
14918 fi
14919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14920 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14922 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14923 if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14924   $as_echo_n "(cached) " >&6
14925 else
14926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14927 /* end confdefs.h.  */
14928 #include <thread_db.h>
14929 int
14930 main ()
14931 {
14932 int i = TD_VERSION;
14933   ;
14934   return 0;
14935 }
14936 _ACEOF
14937 if ac_fn_c_try_compile "$LINENO"; then :
14938   gdb_cv_thread_db_h_has_td_version=yes
14939 else
14940   gdb_cv_thread_db_h_has_td_version=no
14941
14942 fi
14943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14944
14945 fi
14946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14947 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14949 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14950 if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14951   $as_echo_n "(cached) " >&6
14952 else
14953   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14954 /* end confdefs.h.  */
14955 #include <thread_db.h>
14956 int
14957 main ()
14958 {
14959 int i = TD_NOTLS;
14960   ;
14961   return 0;
14962 }
14963 _ACEOF
14964 if ac_fn_c_try_compile "$LINENO"; then :
14965   gdb_cv_thread_db_h_has_td_notls=yes
14966 else
14967   gdb_cv_thread_db_h_has_td_notls=no
14968
14969 fi
14970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14971
14972 fi
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14974 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
14975 fi
14976 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
14977
14978 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
14979
14980 fi
14981 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14982
14983 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
14984
14985 fi
14986 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14987
14988 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
14989
14990 fi
14991
14992 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14993 "
14994 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14995   ac_have_decl=1
14996 else
14997   ac_have_decl=0
14998 fi
14999
15000 cat >>confdefs.h <<_ACEOF
15001 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
15002 _ACEOF
15003
15004
15005 if test "$cross_compiling" = yes; then :
15006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15007 /* end confdefs.h.  */
15008 #include <sys/personality.h>
15009 int
15010 main ()
15011 {
15012
15013 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
15014 #       define ADDR_NO_RANDOMIZE 0x0040000
15015 #      endif
15016        /* Test the flag could be set and stays set.  */
15017        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15018        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15019            return 1
15020   ;
15021   return 0;
15022 }
15023 _ACEOF
15024 if ac_fn_c_try_link "$LINENO"; then :
15025   have_personality=true
15026 else
15027   have_personality=false
15028 fi
15029 rm -f core conftest.err conftest.$ac_objext \
15030     conftest$ac_exeext conftest.$ac_ext
15031 else
15032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15033 /* end confdefs.h.  */
15034 #include <sys/personality.h>
15035 int
15036 main ()
15037 {
15038
15039 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
15040 #       define ADDR_NO_RANDOMIZE 0x0040000
15041 #      endif
15042        /* Test the flag could be set and stays set.  */
15043        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15044        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15045            return 1
15046   ;
15047   return 0;
15048 }
15049 _ACEOF
15050 if ac_fn_c_try_run "$LINENO"; then :
15051   have_personality=true
15052 else
15053   have_personality=false
15054 fi
15055 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15056   conftest.$ac_objext conftest.beam conftest.$ac_ext
15057 fi
15058
15059 if $have_personality
15060 then
15061
15062 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
15063
15064 fi
15065
15066 case $host_os in
15067   go32* | *djgpp*)
15068     gdbinit=gdb.ini
15069     ;;
15070   *)
15071     gdbinit=.gdbinit
15072     ;;
15073 esac
15074
15075 cat >>confdefs.h <<_ACEOF
15076 #define GDBINIT "$gdbinit"
15077 _ACEOF
15078
15079
15080
15081 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15082 # except that the argument to --with-sysroot is optional.
15083 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15084 if test "x$with_sysroot" = xyes; then
15085   with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15086 fi
15087
15088 # Check whether --with-sysroot was given.
15089 if test "${with_sysroot+set}" = set; then :
15090   withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15091 else
15092   TARGET_SYSTEM_ROOT=
15093 fi
15094
15095
15096   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15097   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15098   ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15099   ac_define_dir=`eval echo $ac_define_dir`
15100
15101 cat >>confdefs.h <<_ACEOF
15102 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
15103 _ACEOF
15104
15105
15106
15107
15108   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15109      if test "x$prefix" = xNONE; then
15110         test_prefix=/usr/local
15111      else
15112         test_prefix=$prefix
15113      fi
15114   else
15115      test_prefix=$exec_prefix
15116   fi
15117   value=0
15118   case ${ac_define_dir} in
15119      "${test_prefix}"|"${test_prefix}/"*|\
15120         '${exec_prefix}'|'${exec_prefix}/'*)
15121      value=1
15122      ;;
15123   esac
15124
15125 cat >>confdefs.h <<_ACEOF
15126 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15127 _ACEOF
15128
15129
15130
15131
15132
15133 # Check whether --with-system-gdbinit was given.
15134 if test "${with_system_gdbinit+set}" = set; then :
15135   withval=$with_system_gdbinit;
15136     SYSTEM_GDBINIT=$withval
15137 else
15138   SYSTEM_GDBINIT=
15139 fi
15140
15141
15142   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15143   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15144   ac_define_dir=`eval echo $SYSTEM_GDBINIT`
15145   ac_define_dir=`eval echo $ac_define_dir`
15146
15147 cat >>confdefs.h <<_ACEOF
15148 #define SYSTEM_GDBINIT "$ac_define_dir"
15149 _ACEOF
15150
15151
15152
15153
15154   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15155      if test "x$prefix" = xNONE; then
15156         test_prefix=/usr/local
15157      else
15158         test_prefix=$prefix
15159      fi
15160   else
15161      test_prefix=$exec_prefix
15162   fi
15163   value=0
15164   case ${ac_define_dir} in
15165      "${test_prefix}"|"${test_prefix}/"*|\
15166         '${exec_prefix}'|'${exec_prefix}/'*)
15167      value=1
15168      ;;
15169   esac
15170
15171 cat >>confdefs.h <<_ACEOF
15172 #define SYSTEM_GDBINIT_RELOCATABLE $value
15173 _ACEOF
15174
15175
15176
15177
15178
15179 # Check whether --enable-werror was given.
15180 if test "${enable_werror+set}" = set; then :
15181   enableval=$enable_werror; case "${enableval}" in
15182      yes | y) ERROR_ON_WARNING="yes" ;;
15183      no | n)  ERROR_ON_WARNING="no" ;;
15184      *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
15185    esac
15186 fi
15187
15188
15189 # Enable -Werror by default when using gcc.  Turn it off for releases.
15190 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
15191     ERROR_ON_WARNING=yes
15192 fi
15193
15194 WERROR_CFLAGS=""
15195 if test "${ERROR_ON_WARNING}" = yes ; then
15196     WERROR_CFLAGS="-Werror"
15197 fi
15198
15199 # The options we'll try to enable.
15200 build_warnings="-Wall -Wpointer-arith \
15201 -Wno-unused -Wunused-value -Wunused-function \
15202 -Wno-switch -Wno-char-subscripts \
15203 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
15204 -Wno-sign-compare -Wno-write-strings -Wno-narrowing"
15205
15206 # Enable -Wno-format by default when using gcc on mingw since many
15207 # GCC versions complain about %I64.
15208 case "${host}" in
15209   *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
15210   *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
15211 esac
15212
15213 # Check whether --enable-build-warnings was given.
15214 if test "${enable_build_warnings+set}" = set; then :
15215   enableval=$enable_build_warnings; case "${enableval}" in
15216   yes)  ;;
15217   no)   build_warnings="-w";;
15218   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15219         build_warnings="${build_warnings} ${t}";;
15220   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15221         build_warnings="${t} ${build_warnings}";;
15222   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15223 esac
15224 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15225   echo "Setting compiler warning flags = $build_warnings" 6>&1
15226 fi
15227 fi
15228 # Check whether --enable-gdb-build-warnings was given.
15229 if test "${enable_gdb_build_warnings+set}" = set; then :
15230   enableval=$enable_gdb_build_warnings; case "${enableval}" in
15231   yes)  ;;
15232   no)   build_warnings="-w";;
15233   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15234         build_warnings="${build_warnings} ${t}";;
15235   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15236         build_warnings="${t} ${build_warnings}";;
15237   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15238 esac
15239 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15240   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15241 fi
15242 fi
15243
15244 # The set of warnings supported by a C++ compiler is not the same as
15245 # of the C compiler.
15246 ac_ext=cpp
15247 ac_cpp='$CXXCPP $CPPFLAGS'
15248 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15249 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15250 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15251
15252
15253 WARN_CFLAGS=""
15254 if test "x${build_warnings}" != x -a "x$GCC" = xyes
15255 then
15256     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15257 $as_echo_n "checking compiler warning flags... " >&6; }
15258     # Separate out the -Werror flag as some files just cannot be
15259     # compiled with it enabled.
15260     for w in ${build_warnings}; do
15261         # GCC does not complain about -Wno-unknown-warning.  Invert
15262         # and test -Wunknown-warning instead.
15263         case $w in
15264         -Wno-*)
15265                 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15266         *)
15267                 wtest=$w ;;
15268         esac
15269
15270         case $w in
15271         -Werr*) WERROR_CFLAGS=-Werror ;;
15272         *)
15273             # Check whether GCC accepts it.
15274             saved_CFLAGS="$CFLAGS"
15275             CFLAGS="$CFLAGS $wtest"
15276             saved_CXXFLAGS="$CXXFLAGS"
15277             CXXFLAGS="$CXXFLAGS $wtest"
15278             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15279 /* end confdefs.h.  */
15280
15281 int
15282 main ()
15283 {
15284
15285   ;
15286   return 0;
15287 }
15288 _ACEOF
15289 if ac_fn_cxx_try_compile "$LINENO"; then :
15290   WARN_CFLAGS="${WARN_CFLAGS} $w"
15291 fi
15292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15293             CFLAGS="$saved_CFLAGS"
15294             CXXFLAGS="$saved_CXXFLAGS"
15295         esac
15296     done
15297     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15298 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
15299 fi
15300
15301
15302
15303 ac_ext=c
15304 ac_cpp='$CPP $CPPFLAGS'
15305 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15306 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15307 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15308
15309
15310
15311 # In the Cygwin environment, we need some additional flags.
15312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15313 $as_echo_n "checking for cygwin... " >&6; }
15314 if test "${gdb_cv_os_cygwin+set}" = set; then :
15315   $as_echo_n "(cached) " >&6
15316 else
15317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15318 /* end confdefs.h.  */
15319
15320 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
15321 lose
15322 #endif
15323 _ACEOF
15324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15325   $EGREP "^lose$" >/dev/null 2>&1; then :
15326   gdb_cv_os_cygwin=yes
15327 else
15328   gdb_cv_os_cygwin=no
15329 fi
15330 rm -f conftest*
15331
15332 fi
15333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15334 $as_echo "$gdb_cv_os_cygwin" >&6; }
15335
15336
15337 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
15338 case ${host} in
15339   *go32* ) SER_HARDWIRE=ser-go32.o ;;
15340   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
15341   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
15342 esac
15343
15344
15345 # libreadline needs libuser32.a in a cygwin environment
15346 WIN32LIBS=
15347 if test x$gdb_cv_os_cygwin = xyes; then
15348     WIN32LIBS="-luser32"
15349     case "${target}" in
15350         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15351         ;;
15352     esac
15353 fi
15354
15355 # The ser-tcp.c module requires sockets.
15356 case ${host} in
15357   *mingw32*)
15358
15359 $as_echo "#define USE_WIN32API 1" >>confdefs.h
15360
15361     WIN32LIBS="$WIN32LIBS -lws2_32"
15362     ;;
15363 esac
15364
15365
15366 # Add ELF support to GDB, but only if BFD includes ELF support.
15367
15368   OLD_CFLAGS=$CFLAGS
15369   OLD_LDFLAGS=$LDFLAGS
15370   OLD_LIBS=$LIBS
15371   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15372   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15373   # always want our bfd.
15374   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15375   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15376   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15377   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15378   LIBS="-lbfd -liberty -lz $intl $LIBS"
15379   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15380 $as_echo_n "checking for ELF support in BFD... " >&6; }
15381 if test "${gdb_cv_var_elf+set}" = set; then :
15382   $as_echo_n "(cached) " >&6
15383 else
15384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15385 /* end confdefs.h.  */
15386 #include <stdlib.h>
15387   #include "bfd.h"
15388   #include "elf-bfd.h"
15389
15390 int
15391 main ()
15392 {
15393 return bfd_get_elf_phdr_upper_bound (NULL);
15394   ;
15395   return 0;
15396 }
15397 _ACEOF
15398 if ac_fn_c_try_link "$LINENO"; then :
15399   gdb_cv_var_elf=yes
15400 else
15401   gdb_cv_var_elf=no
15402 fi
15403 rm -f core conftest.err conftest.$ac_objext \
15404     conftest$ac_exeext conftest.$ac_ext
15405 fi
15406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15407 $as_echo "$gdb_cv_var_elf" >&6; }
15408   CFLAGS=$OLD_CFLAGS
15409   LDFLAGS=$OLD_LDFLAGS
15410   LIBS=$OLD_LIBS
15411 if test $gdb_cv_var_elf = yes; then
15412   CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
15413
15414 $as_echo "#define HAVE_ELF 1" >>confdefs.h
15415
15416   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15417   if test "$plugins" = "yes"; then
15418     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15419 $as_echo_n "checking for library containing dlopen... " >&6; }
15420 if test "${ac_cv_search_dlopen+set}" = set; then :
15421   $as_echo_n "(cached) " >&6
15422 else
15423   ac_func_search_save_LIBS=$LIBS
15424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15425 /* end confdefs.h.  */
15426
15427 /* Override any GCC internal prototype to avoid an error.
15428    Use char because int might match the return type of a GCC
15429    builtin and then its argument prototype would still apply.  */
15430 #ifdef __cplusplus
15431 extern "C"
15432 #endif
15433 char dlopen ();
15434 int
15435 main ()
15436 {
15437 return dlopen ();
15438   ;
15439   return 0;
15440 }
15441 _ACEOF
15442 for ac_lib in '' dl; do
15443   if test -z "$ac_lib"; then
15444     ac_res="none required"
15445   else
15446     ac_res=-l$ac_lib
15447     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15448   fi
15449   if ac_fn_c_try_link "$LINENO"; then :
15450   ac_cv_search_dlopen=$ac_res
15451 fi
15452 rm -f core conftest.err conftest.$ac_objext \
15453     conftest$ac_exeext
15454   if test "${ac_cv_search_dlopen+set}" = set; then :
15455   break
15456 fi
15457 done
15458 if test "${ac_cv_search_dlopen+set}" = set; then :
15459
15460 else
15461   ac_cv_search_dlopen=no
15462 fi
15463 rm conftest.$ac_ext
15464 LIBS=$ac_func_search_save_LIBS
15465 fi
15466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15467 $as_echo "$ac_cv_search_dlopen" >&6; }
15468 ac_res=$ac_cv_search_dlopen
15469 if test "$ac_res" != no; then :
15470   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15471
15472 fi
15473
15474   fi
15475 fi
15476
15477 # Add macho support to GDB, but only if BFD includes it.
15478
15479   OLD_CFLAGS=$CFLAGS
15480   OLD_LDFLAGS=$LDFLAGS
15481   OLD_LIBS=$LIBS
15482   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15483   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15484   # always want our bfd.
15485   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15486   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15487   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15488   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15489   LIBS="-lbfd -liberty -lz $intl $LIBS"
15490   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15491 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
15492 if test "${gdb_cv_var_macho+set}" = set; then :
15493   $as_echo_n "(cached) " >&6
15494 else
15495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15496 /* end confdefs.h.  */
15497 #include <stdlib.h>
15498   #include "bfd.h"
15499   #include "mach-o.h"
15500
15501 int
15502 main ()
15503 {
15504 return bfd_mach_o_lookup_command (NULL, 0, NULL);
15505   ;
15506   return 0;
15507 }
15508 _ACEOF
15509 if ac_fn_c_try_link "$LINENO"; then :
15510   gdb_cv_var_macho=yes
15511 else
15512   gdb_cv_var_macho=no
15513 fi
15514 rm -f core conftest.err conftest.$ac_objext \
15515     conftest$ac_exeext conftest.$ac_ext
15516 fi
15517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15518 $as_echo "$gdb_cv_var_macho" >&6; }
15519   CFLAGS=$OLD_CFLAGS
15520   LDFLAGS=$OLD_LDFLAGS
15521   LIBS=$OLD_LIBS
15522 if test $gdb_cv_var_macho = yes; then
15523   CONFIG_OBS="$CONFIG_OBS machoread.o"
15524 fi
15525
15526 # Add any host-specific objects to GDB.
15527 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15528
15529 # If building on ELF, look for lzma support for embedded compressed debug info.
15530 if test $gdb_cv_var_elf = yes; then
15531
15532 # Check whether --with-lzma was given.
15533 if test "${with_lzma+set}" = set; then :
15534   withval=$with_lzma;
15535 else
15536   with_lzma=auto
15537 fi
15538
15539   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15540 $as_echo_n "checking whether to use lzma... " >&6; }
15541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15542 $as_echo "$with_lzma" >&6; }
15543
15544   if test "${with_lzma}" != no; then
15545
15546
15547
15548
15549
15550
15551
15552
15553     use_additional=yes
15554
15555   acl_save_prefix="$prefix"
15556   prefix="$acl_final_prefix"
15557   acl_save_exec_prefix="$exec_prefix"
15558   exec_prefix="$acl_final_exec_prefix"
15559
15560     eval additional_includedir=\"$includedir\"
15561     eval additional_libdir=\"$libdir\"
15562
15563   exec_prefix="$acl_save_exec_prefix"
15564   prefix="$acl_save_prefix"
15565
15566
15567 # Check whether --with-liblzma-prefix was given.
15568 if test "${with_liblzma_prefix+set}" = set; then :
15569   withval=$with_liblzma_prefix;
15570     if test "X$withval" = "Xno"; then
15571       use_additional=no
15572     else
15573       if test "X$withval" = "X"; then
15574
15575   acl_save_prefix="$prefix"
15576   prefix="$acl_final_prefix"
15577   acl_save_exec_prefix="$exec_prefix"
15578   exec_prefix="$acl_final_exec_prefix"
15579
15580           eval additional_includedir=\"$includedir\"
15581           eval additional_libdir=\"$libdir\"
15582
15583   exec_prefix="$acl_save_exec_prefix"
15584   prefix="$acl_save_prefix"
15585
15586       else
15587         additional_includedir="$withval/include"
15588         additional_libdir="$withval/lib"
15589       fi
15590     fi
15591
15592 fi
15593
15594       LIBLZMA=
15595   LTLIBLZMA=
15596   INCLZMA=
15597   rpathdirs=
15598   ltrpathdirs=
15599   names_already_handled=
15600   names_next_round='lzma '
15601   while test -n "$names_next_round"; do
15602     names_this_round="$names_next_round"
15603     names_next_round=
15604     for name in $names_this_round; do
15605       already_handled=
15606       for n in $names_already_handled; do
15607         if test "$n" = "$name"; then
15608           already_handled=yes
15609           break
15610         fi
15611       done
15612       if test -z "$already_handled"; then
15613         names_already_handled="$names_already_handled $name"
15614                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15615         eval value=\"\$HAVE_LIB$uppername\"
15616         if test -n "$value"; then
15617           if test "$value" = yes; then
15618             eval value=\"\$LIB$uppername\"
15619             test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15620             eval value=\"\$LTLIB$uppername\"
15621             test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15622           else
15623                                     :
15624           fi
15625         else
15626                               found_dir=
15627           found_la=
15628           found_so=
15629           found_a=
15630           if test $use_additional = yes; then
15631             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15632               found_dir="$additional_libdir"
15633               found_so="$additional_libdir/lib$name.$shlibext"
15634               if test -f "$additional_libdir/lib$name.la"; then
15635                 found_la="$additional_libdir/lib$name.la"
15636               fi
15637             else
15638               if test -f "$additional_libdir/lib$name.$libext"; then
15639                 found_dir="$additional_libdir"
15640                 found_a="$additional_libdir/lib$name.$libext"
15641                 if test -f "$additional_libdir/lib$name.la"; then
15642                   found_la="$additional_libdir/lib$name.la"
15643                 fi
15644               fi
15645             fi
15646           fi
15647           if test "X$found_dir" = "X"; then
15648             for x in $LDFLAGS $LTLIBLZMA; do
15649
15650   acl_save_prefix="$prefix"
15651   prefix="$acl_final_prefix"
15652   acl_save_exec_prefix="$exec_prefix"
15653   exec_prefix="$acl_final_exec_prefix"
15654   eval x=\"$x\"
15655   exec_prefix="$acl_save_exec_prefix"
15656   prefix="$acl_save_prefix"
15657
15658               case "$x" in
15659                 -L*)
15660                   dir=`echo "X$x" | sed -e 's/^X-L//'`
15661                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15662                     found_dir="$dir"
15663                     found_so="$dir/lib$name.$shlibext"
15664                     if test -f "$dir/lib$name.la"; then
15665                       found_la="$dir/lib$name.la"
15666                     fi
15667                   else
15668                     if test -f "$dir/lib$name.$libext"; then
15669                       found_dir="$dir"
15670                       found_a="$dir/lib$name.$libext"
15671                       if test -f "$dir/lib$name.la"; then
15672                         found_la="$dir/lib$name.la"
15673                       fi
15674                     fi
15675                   fi
15676                   ;;
15677               esac
15678               if test "X$found_dir" != "X"; then
15679                 break
15680               fi
15681             done
15682           fi
15683           if test "X$found_dir" != "X"; then
15684                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15685             if test "X$found_so" != "X"; then
15686                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15687                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15688               else
15689                                                                                 haveit=
15690                 for x in $ltrpathdirs; do
15691                   if test "X$x" = "X$found_dir"; then
15692                     haveit=yes
15693                     break
15694                   fi
15695                 done
15696                 if test -z "$haveit"; then
15697                   ltrpathdirs="$ltrpathdirs $found_dir"
15698                 fi
15699                                 if test "$hardcode_direct" = yes; then
15700                                                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15701                 else
15702                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15703                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15704                                                             haveit=
15705                     for x in $rpathdirs; do
15706                       if test "X$x" = "X$found_dir"; then
15707                         haveit=yes
15708                         break
15709                       fi
15710                     done
15711                     if test -z "$haveit"; then
15712                       rpathdirs="$rpathdirs $found_dir"
15713                     fi
15714                   else
15715                                                                                 haveit=
15716                     for x in $LDFLAGS $LIBLZMA; do
15717
15718   acl_save_prefix="$prefix"
15719   prefix="$acl_final_prefix"
15720   acl_save_exec_prefix="$exec_prefix"
15721   exec_prefix="$acl_final_exec_prefix"
15722   eval x=\"$x\"
15723   exec_prefix="$acl_save_exec_prefix"
15724   prefix="$acl_save_prefix"
15725
15726                       if test "X$x" = "X-L$found_dir"; then
15727                         haveit=yes
15728                         break
15729                       fi
15730                     done
15731                     if test -z "$haveit"; then
15732                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15733                     fi
15734                     if test "$hardcode_minus_L" != no; then
15735                                                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15736                     else
15737                                                                                                                                                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15738                     fi
15739                   fi
15740                 fi
15741               fi
15742             else
15743               if test "X$found_a" != "X"; then
15744                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15745               else
15746                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15747               fi
15748             fi
15749                         additional_includedir=
15750             case "$found_dir" in
15751               */lib | */lib/)
15752                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15753                 additional_includedir="$basedir/include"
15754                 ;;
15755             esac
15756             if test "X$additional_includedir" != "X"; then
15757                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
15758                 haveit=
15759                 if test "X$additional_includedir" = "X/usr/local/include"; then
15760                   if test -n "$GCC"; then
15761                     case $host_os in
15762                       linux*) haveit=yes;;
15763                     esac
15764                   fi
15765                 fi
15766                 if test -z "$haveit"; then
15767                   for x in $CPPFLAGS $INCLZMA; do
15768
15769   acl_save_prefix="$prefix"
15770   prefix="$acl_final_prefix"
15771   acl_save_exec_prefix="$exec_prefix"
15772   exec_prefix="$acl_final_exec_prefix"
15773   eval x=\"$x\"
15774   exec_prefix="$acl_save_exec_prefix"
15775   prefix="$acl_save_prefix"
15776
15777                     if test "X$x" = "X-I$additional_includedir"; then
15778                       haveit=yes
15779                       break
15780                     fi
15781                   done
15782                   if test -z "$haveit"; then
15783                     if test -d "$additional_includedir"; then
15784                                             INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15785                     fi
15786                   fi
15787                 fi
15788               fi
15789             fi
15790                         if test -n "$found_la"; then
15791                                                         save_libdir="$libdir"
15792               case "$found_la" in
15793                 */* | *\\*) . "$found_la" ;;
15794                 *) . "./$found_la" ;;
15795               esac
15796               libdir="$save_libdir"
15797                             for dep in $dependency_libs; do
15798                 case "$dep" in
15799                   -L*)
15800                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15801                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
15802                       haveit=
15803                       if test "X$additional_libdir" = "X/usr/local/lib"; then
15804                         if test -n "$GCC"; then
15805                           case $host_os in
15806                             linux*) haveit=yes;;
15807                           esac
15808                         fi
15809                       fi
15810                       if test -z "$haveit"; then
15811                         haveit=
15812                         for x in $LDFLAGS $LIBLZMA; do
15813
15814   acl_save_prefix="$prefix"
15815   prefix="$acl_final_prefix"
15816   acl_save_exec_prefix="$exec_prefix"
15817   exec_prefix="$acl_final_exec_prefix"
15818   eval x=\"$x\"
15819   exec_prefix="$acl_save_exec_prefix"
15820   prefix="$acl_save_prefix"
15821
15822                           if test "X$x" = "X-L$additional_libdir"; then
15823                             haveit=yes
15824                             break
15825                           fi
15826                         done
15827                         if test -z "$haveit"; then
15828                           if test -d "$additional_libdir"; then
15829                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
15830                           fi
15831                         fi
15832                         haveit=
15833                         for x in $LDFLAGS $LTLIBLZMA; do
15834
15835   acl_save_prefix="$prefix"
15836   prefix="$acl_final_prefix"
15837   acl_save_exec_prefix="$exec_prefix"
15838   exec_prefix="$acl_final_exec_prefix"
15839   eval x=\"$x\"
15840   exec_prefix="$acl_save_exec_prefix"
15841   prefix="$acl_save_prefix"
15842
15843                           if test "X$x" = "X-L$additional_libdir"; then
15844                             haveit=yes
15845                             break
15846                           fi
15847                         done
15848                         if test -z "$haveit"; then
15849                           if test -d "$additional_libdir"; then
15850                                                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
15851                           fi
15852                         fi
15853                       fi
15854                     fi
15855                     ;;
15856                   -R*)
15857                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
15858                     if test "$enable_rpath" != no; then
15859                                                                   haveit=
15860                       for x in $rpathdirs; do
15861                         if test "X$x" = "X$dir"; then
15862                           haveit=yes
15863                           break
15864                         fi
15865                       done
15866                       if test -z "$haveit"; then
15867                         rpathdirs="$rpathdirs $dir"
15868                       fi
15869                                                                   haveit=
15870                       for x in $ltrpathdirs; do
15871                         if test "X$x" = "X$dir"; then
15872                           haveit=yes
15873                           break
15874                         fi
15875                       done
15876                       if test -z "$haveit"; then
15877                         ltrpathdirs="$ltrpathdirs $dir"
15878                       fi
15879                     fi
15880                     ;;
15881                   -l*)
15882                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15883                     ;;
15884                   *.la)
15885                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15886                     ;;
15887                   *)
15888                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
15889                     LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
15890                     ;;
15891                 esac
15892               done
15893             fi
15894           else
15895                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15896             LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
15897           fi
15898         fi
15899       fi
15900     done
15901   done
15902   if test "X$rpathdirs" != "X"; then
15903     if test -n "$hardcode_libdir_separator"; then
15904                         alldirs=
15905       for found_dir in $rpathdirs; do
15906         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15907       done
15908             acl_save_libdir="$libdir"
15909       libdir="$alldirs"
15910       eval flag=\"$hardcode_libdir_flag_spec\"
15911       libdir="$acl_save_libdir"
15912       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15913     else
15914             for found_dir in $rpathdirs; do
15915         acl_save_libdir="$libdir"
15916         libdir="$found_dir"
15917         eval flag=\"$hardcode_libdir_flag_spec\"
15918         libdir="$acl_save_libdir"
15919         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15920       done
15921     fi
15922   fi
15923   if test "X$ltrpathdirs" != "X"; then
15924             for found_dir in $ltrpathdirs; do
15925       LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15926     done
15927   fi
15928
15929
15930         ac_save_CPPFLAGS="$CPPFLAGS"
15931
15932   for element in $INCLZMA; do
15933     haveit=
15934     for x in $CPPFLAGS; do
15935
15936   acl_save_prefix="$prefix"
15937   prefix="$acl_final_prefix"
15938   acl_save_exec_prefix="$exec_prefix"
15939   exec_prefix="$acl_final_exec_prefix"
15940   eval x=\"$x\"
15941   exec_prefix="$acl_save_exec_prefix"
15942   prefix="$acl_save_prefix"
15943
15944       if test "X$x" = "X$element"; then
15945         haveit=yes
15946         break
15947       fi
15948     done
15949     if test -z "$haveit"; then
15950       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15951     fi
15952   done
15953
15954
15955   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15956 $as_echo_n "checking for liblzma... " >&6; }
15957 if test "${ac_cv_liblzma+set}" = set; then :
15958   $as_echo_n "(cached) " >&6
15959 else
15960
15961     ac_save_LIBS="$LIBS"
15962     LIBS="$LIBS $LIBLZMA"
15963     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15964 /* end confdefs.h.  */
15965 #include "lzma.h"
15966 int
15967 main ()
15968 {
15969 lzma_index_iter iter;
15970                            lzma_index_iter_init (&iter, 0);
15971                            lzma_mf_is_supported (LZMA_MF_HC3);
15972   ;
15973   return 0;
15974 }
15975 _ACEOF
15976 if ac_fn_c_try_link "$LINENO"; then :
15977   ac_cv_liblzma=yes
15978 else
15979   ac_cv_liblzma=no
15980 fi
15981 rm -f core conftest.err conftest.$ac_objext \
15982     conftest$ac_exeext conftest.$ac_ext
15983     LIBS="$ac_save_LIBS"
15984
15985 fi
15986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15987 $as_echo "$ac_cv_liblzma" >&6; }
15988   if test "$ac_cv_liblzma" = yes; then
15989     HAVE_LIBLZMA=yes
15990
15991 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15992
15993     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15994 $as_echo_n "checking how to link with liblzma... " >&6; }
15995     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15996 $as_echo "$LIBLZMA" >&6; }
15997   else
15998     HAVE_LIBLZMA=no
15999             CPPFLAGS="$ac_save_CPPFLAGS"
16000     LIBLZMA=
16001     LTLIBLZMA=
16002   fi
16003
16004
16005
16006
16007
16008
16009     if test "$HAVE_LIBLZMA" != yes; then
16010       if test "$with_lzma" = yes; then
16011         as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
16012       fi
16013     fi
16014   fi
16015 fi
16016
16017 LIBGUI="../libgui/src/libgui.a"
16018 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16019
16020
16021
16022 WIN32LDAPP=
16023
16024
16025
16026 case "${host}" in
16027 *-*-cygwin* | *-*-mingw* )
16028     configdir="win"
16029     ;;
16030 *)
16031     configdir="unix"
16032     ;;
16033 esac
16034
16035 GDBTKLIBS=
16036 if test "${enable_gdbtk}" = "yes"; then
16037
16038     # Gdbtk must have an absolute path to srcdir in order to run
16039     # properly when not installed.
16040     here=`pwd`
16041     cd ${srcdir}
16042     GDBTK_SRC_DIR=`pwd`
16043     cd $here
16044
16045
16046     #
16047     # Ok, lets find the tcl configuration
16048     # First, look for one uninstalled.
16049     # the alternative search directory is invoked by --with-tcl
16050     #
16051
16052     if test x"${no_tcl}" = x ; then
16053         # we reset no_tcl in case something fails here
16054         no_tcl=true
16055
16056 # Check whether --with-tcl was given.
16057 if test "${with_tcl+set}" = set; then :
16058   withval=$with_tcl; with_tclconfig=${withval}
16059 fi
16060
16061         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16062 $as_echo_n "checking for Tcl configuration... " >&6; }
16063         if test "${ac_cv_c_tclconfig+set}" = set; then :
16064   $as_echo_n "(cached) " >&6
16065 else
16066
16067
16068             # First check to see if --with-tcl was specified.
16069             case "${host}" in
16070                 *-*-cygwin*) platDir="win" ;;
16071                 *) platDir="unix" ;;
16072             esac
16073             if test x"${with_tclconfig}" != x ; then
16074                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16075                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16076                 else
16077                     as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
16078                 fi
16079             fi
16080
16081             # then check for a private Tcl installation
16082             if test x"${ac_cv_c_tclconfig}" = x ; then
16083                 for i in \
16084                         ../tcl \
16085                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16086                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16087                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16088                         ../../tcl \
16089                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16090                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16091                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16092                         ../../../tcl \
16093                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16094                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16095                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16096                     if test -f "$i/$platDir/tclConfig.sh" ; then
16097                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16098                         break
16099                     fi
16100                 done
16101             fi
16102
16103             # on Darwin, check in Framework installation locations
16104             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16105                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16106                         `ls -d /Library/Frameworks 2>/dev/null` \
16107                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16108                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16109                         ; do
16110                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16111                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16112                         break
16113                     fi
16114                 done
16115             fi
16116
16117             # check in a few common install locations
16118             if test x"${ac_cv_c_tclconfig}" = x ; then
16119                 for i in `ls -d ${libdir} 2>/dev/null` \
16120                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16121                         `ls -d ${prefix}/lib 2>/dev/null` \
16122                         `ls -d /usr/local/lib 2>/dev/null` \
16123                         `ls -d /usr/contrib/lib 2>/dev/null` \
16124                         `ls -d /usr/lib 2>/dev/null` \
16125                         ; do
16126                     if test -f "$i/tclConfig.sh" ; then
16127                         ac_cv_c_tclconfig=`(cd $i; pwd)`
16128                         break
16129                     fi
16130                 done
16131             fi
16132
16133             # check in a few other private locations
16134             if test x"${ac_cv_c_tclconfig}" = x ; then
16135                 for i in \
16136                         ${srcdir}/../tcl \
16137                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16138                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16139                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16140                     if test -f "$i/$platDir/tclConfig.sh" ; then
16141                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16142                     break
16143                 fi
16144                 done
16145             fi
16146
16147 fi
16148
16149
16150         if test x"${ac_cv_c_tclconfig}" = x ; then
16151             TCL_BIN_DIR="# no Tcl configs found"
16152             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16153 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
16154         else
16155             no_tcl=
16156             TCL_BIN_DIR=${ac_cv_c_tclconfig}
16157             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16158 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16159         fi
16160     fi
16161
16162
16163     # If $no_tk is nonempty, then we can't do Tk, and there is no
16164     # point to doing Tcl.
16165
16166     #
16167     # Ok, lets find the tk configuration
16168     # First, look for one uninstalled.
16169     # the alternative search directory is invoked by --with-tk
16170     #
16171
16172     if test x"${no_tk}" = x ; then
16173         # we reset no_tk in case something fails here
16174         no_tk=true
16175
16176 # Check whether --with-tk was given.
16177 if test "${with_tk+set}" = set; then :
16178   withval=$with_tk; with_tkconfig=${withval}
16179 fi
16180
16181         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16182 $as_echo_n "checking for Tk configuration... " >&6; }
16183         if test "${ac_cv_c_tkconfig+set}" = set; then :
16184   $as_echo_n "(cached) " >&6
16185 else
16186
16187
16188             # First check to see if --with-tkconfig was specified.
16189             if test x"${with_tkconfig}" != x ; then
16190                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16191                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16192                 else
16193                     as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
16194                 fi
16195             fi
16196
16197             # then check for a private Tk library
16198             case "${host}" in
16199                 *-*-cygwin*) platDir="win" ;;
16200                 *) platDir="unix" ;;
16201             esac
16202             if test x"${ac_cv_c_tkconfig}" = x ; then
16203                 for i in \
16204                         ../tk \
16205                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16206                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16207                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16208                         ../../tk \
16209                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16210                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16211                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16212                         ../../../tk \
16213                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16214                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16215                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16216                     if test -f "$i/$platDir/tkConfig.sh" ; then
16217                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16218                         break
16219                     fi
16220                 done
16221             fi
16222
16223             # on Darwin, check in Framework installation locations
16224             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16225                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16226                         `ls -d /Library/Frameworks 2>/dev/null` \
16227                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16228                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16229                         ; do
16230                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
16231                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16232                         break
16233                     fi
16234                 done
16235             fi
16236
16237             # check in a few common install locations
16238             if test x"${ac_cv_c_tkconfig}" = x ; then
16239                 for i in `ls -d ${libdir} 2>/dev/null` \
16240                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16241                         `ls -d ${prefix}/lib 2>/dev/null` \
16242                         `ls -d /usr/local/lib 2>/dev/null` \
16243                         `ls -d /usr/contrib/lib 2>/dev/null` \
16244                         `ls -d /usr/lib 2>/dev/null` \
16245                         ; do
16246                     if test -f "$i/tkConfig.sh" ; then
16247                         ac_cv_c_tkconfig=`(cd $i; pwd)`
16248                         break
16249                     fi
16250                 done
16251             fi
16252             # check in a few other private locations
16253             if test x"${ac_cv_c_tkconfig}" = x ; then
16254                 for i in \
16255                         ${srcdir}/../tk \
16256                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16257                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16258                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16259                     if test -f "$i/$platDir/tkConfig.sh" ; then
16260                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16261                         break
16262                     fi
16263                 done
16264             fi
16265
16266 fi
16267
16268
16269         if test x"${ac_cv_c_tkconfig}" = x ; then
16270             TK_BIN_DIR="# no Tk configs found"
16271             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16272 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
16273         else
16274             no_tk=
16275             TK_BIN_DIR=${ac_cv_c_tkconfig}
16276             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16277 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16278         fi
16279     fi
16280
16281
16282     if test -z "${no_tcl}" -a -z "${no_tk}"; then
16283
16284     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16285 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
16286
16287     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
16288         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16289 $as_echo "loading" >&6; }
16290         . ${TCL_BIN_DIR}/tclConfig.sh
16291     else
16292         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16293 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16294     fi
16295
16296     # eval is required to do the TCL_DBGX substitution
16297     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16298     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16299
16300     # If the TCL_BIN_DIR is the build directory (not the install directory),
16301     # then set the common variable name to the value of the build variables.
16302     # For example, the variable TCL_LIB_SPEC will be set to the value
16303     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16304     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16305     # installed and uninstalled version of Tcl.
16306     if test -f "${TCL_BIN_DIR}/Makefile" ; then
16307         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16308         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16309         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16310     elif test "`uname -s`" = "Darwin"; then
16311         # If Tcl was built as a framework, attempt to use the libraries
16312         # from the framework at the given location so that linking works
16313         # against Tcl.framework installed in an arbitrary location.
16314         case ${TCL_DEFS} in
16315             *TCL_FRAMEWORK*)
16316                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16317                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16318                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16319                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16320                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16321                             break
16322                         fi
16323                     done
16324                 fi
16325                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16326                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16327                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16328                 fi
16329                 ;;
16330         esac
16331     fi
16332
16333     # eval is required to do the TCL_DBGX substitution
16334     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16335     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16336     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16337     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353         # Check for in-tree tcl
16354         here=`pwd`
16355         cd ${srcdir}/..
16356         topdir=`pwd`
16357         cd ${here}
16358
16359         intree="no"
16360         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16361           intree="yes"
16362         fi
16363
16364         # Find Tcl private headers
16365         if test x"${intree}" = xno; then
16366
16367   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16368 $as_echo_n "checking for Tcl private headers... " >&6; }
16369   private_dir=""
16370   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16371   if test -f ${dir}/tclInt.h ; then
16372     private_dir=${dir}
16373   fi
16374
16375   if test x"${private_dir}" = x; then
16376     as_fn_error "could not find private Tcl headers" "$LINENO" 5
16377   else
16378     TCL_PRIVATE_INCLUDE="-I${private_dir}"
16379     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16380 $as_echo "${private_dir}" >&6; }
16381   fi
16382
16383           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16384           TCL_LIBRARY="${TCL_LIB_SPEC}"
16385           TCL_DEPS=""
16386         else
16387           # If building tcl in the same src tree, private headers
16388           # are not needed, but we need to be sure to use the right
16389           # headers library
16390           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16391           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16392           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16393         fi
16394
16395
16396
16397
16398
16399     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16400 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
16401
16402     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
16403         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16404 $as_echo "loading" >&6; }
16405         . ${TK_BIN_DIR}/tkConfig.sh
16406     else
16407         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16408 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16409     fi
16410
16411     # eval is required to do the TK_DBGX substitution
16412     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16413     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16414
16415     # If the TK_BIN_DIR is the build directory (not the install directory),
16416     # then set the common variable name to the value of the build variables.
16417     # For example, the variable TK_LIB_SPEC will be set to the value
16418     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16419     # instead of TK_BUILD_LIB_SPEC since it will work with both an
16420     # installed and uninstalled version of Tcl.
16421     if test -f "${TK_BIN_DIR}/Makefile" ; then
16422         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16423         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16424         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16425     elif test "`uname -s`" = "Darwin"; then
16426         # If Tk was built as a framework, attempt to use the libraries
16427         # from the framework at the given location so that linking works
16428         # against Tk.framework installed in an arbitrary location.
16429         case ${TK_DEFS} in
16430             *TK_FRAMEWORK*)
16431                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
16432                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
16433                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16434                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16435                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16436                             break
16437                         fi
16438                     done
16439                 fi
16440                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
16441                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16442                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16443                 fi
16444                 ;;
16445         esac
16446     fi
16447
16448     # eval is required to do the TK_DBGX substitution
16449     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16450     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16451     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16452     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467         # Check for in-tree Tk
16468         intree="no"
16469         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16470           intree="yes"
16471         fi
16472
16473         # Find Tk private headers
16474         if test x"${intree}" = xno; then
16475
16476   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16477 $as_echo_n "checking for Tk private headers... " >&6; }
16478   private_dir=""
16479   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16480   if test -f ${dir}/tkInt.h; then
16481     private_dir=${dir}
16482   fi
16483
16484   if test x"${private_dir}" = x; then
16485     as_fn_error "could not find Tk private headers" "$LINENO" 5
16486   else
16487     TK_PRIVATE_INCLUDE="-I${private_dir}"
16488     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16489 $as_echo "${private_dir}" >&6; }
16490   fi
16491
16492           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16493           TK_LIBRARY=${TK_LIB_SPEC}
16494           TK_DEPS=""
16495         else
16496           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16497           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16498           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16499         fi
16500
16501
16502
16503
16504
16505         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
16506
16507         # Include some libraries that Tcl and Tk want.
16508         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16509         # Yes, the ordering seems wrong here.  But it isn't.
16510         # TK_LIBS is the list of libraries that need to be linked
16511         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
16512         # were in LIBS then any link tests after this point would
16513         # try to include things like `$(LIBGUI)', which wouldn't work.
16514         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
16515
16516         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16517         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16518         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16519         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16520         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16521         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16522         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
16523
16524         if test x$gdb_cv_os_cygwin = xyes; then
16525           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16526           WIN32LDAPP="-Wl,--subsystem,console"
16527           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
16528         fi
16529
16530         subdirs="$subdirs gdbtk"
16531
16532     fi
16533 fi
16534
16535
16536
16537
16538
16539
16540
16541
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16543 $as_echo_n "checking for X... " >&6; }
16544
16545
16546 # Check whether --with-x was given.
16547 if test "${with_x+set}" = set; then :
16548   withval=$with_x;
16549 fi
16550
16551 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16552 if test "x$with_x" = xno; then
16553   # The user explicitly disabled X.
16554   have_x=disabled
16555 else
16556   case $x_includes,$x_libraries in #(
16557     *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
16558     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
16559   $as_echo_n "(cached) " >&6
16560 else
16561   # One or both of the vars are not set, and there is no cached value.
16562 ac_x_includes=no ac_x_libraries=no
16563 rm -f -r conftest.dir
16564 if mkdir conftest.dir; then
16565   cd conftest.dir
16566   cat >Imakefile <<'_ACEOF'
16567 incroot:
16568         @echo incroot='${INCROOT}'
16569 usrlibdir:
16570         @echo usrlibdir='${USRLIBDIR}'
16571 libdir:
16572         @echo libdir='${LIBDIR}'
16573 _ACEOF
16574   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
16575     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
16576     for ac_var in incroot usrlibdir libdir; do
16577       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16578     done
16579     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
16580     for ac_extension in a so sl dylib la dll; do
16581       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16582          test -f "$ac_im_libdir/libX11.$ac_extension"; then
16583         ac_im_usrlibdir=$ac_im_libdir; break
16584       fi
16585     done
16586     # Screen out bogus values from the imake configuration.  They are
16587     # bogus both because they are the default anyway, and because
16588     # using them would break gcc on systems where it needs fixed includes.
16589     case $ac_im_incroot in
16590         /usr/include) ac_x_includes= ;;
16591         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
16592     esac
16593     case $ac_im_usrlibdir in
16594         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
16595         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
16596     esac
16597   fi
16598   cd ..
16599   rm -f -r conftest.dir
16600 fi
16601
16602 # Standard set of common directories for X headers.
16603 # Check X11 before X11Rn because it is often a symlink to the current release.
16604 ac_x_header_dirs='
16605 /usr/X11/include
16606 /usr/X11R7/include
16607 /usr/X11R6/include
16608 /usr/X11R5/include
16609 /usr/X11R4/include
16610
16611 /usr/include/X11
16612 /usr/include/X11R7
16613 /usr/include/X11R6
16614 /usr/include/X11R5
16615 /usr/include/X11R4
16616
16617 /usr/local/X11/include
16618 /usr/local/X11R7/include
16619 /usr/local/X11R6/include
16620 /usr/local/X11R5/include
16621 /usr/local/X11R4/include
16622
16623 /usr/local/include/X11
16624 /usr/local/include/X11R7
16625 /usr/local/include/X11R6
16626 /usr/local/include/X11R5
16627 /usr/local/include/X11R4
16628
16629 /usr/X386/include
16630 /usr/x386/include
16631 /usr/XFree86/include/X11
16632
16633 /usr/include
16634 /usr/local/include
16635 /usr/unsupported/include
16636 /usr/athena/include
16637 /usr/local/x11r5/include
16638 /usr/lpp/Xamples/include
16639
16640 /usr/openwin/include
16641 /usr/openwin/share/include'
16642
16643 if test "$ac_x_includes" = no; then
16644   # Guess where to find include files, by looking for Xlib.h.
16645   # First, try using that file with no special directory specified.
16646   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16647 /* end confdefs.h.  */
16648 #include <X11/Xlib.h>
16649 _ACEOF
16650 if ac_fn_c_try_cpp "$LINENO"; then :
16651   # We can compile using X headers with no special include directory.
16652 ac_x_includes=
16653 else
16654   for ac_dir in $ac_x_header_dirs; do
16655   if test -r "$ac_dir/X11/Xlib.h"; then
16656     ac_x_includes=$ac_dir
16657     break
16658   fi
16659 done
16660 fi
16661 rm -f conftest.err conftest.$ac_ext
16662 fi # $ac_x_includes = no
16663
16664 if test "$ac_x_libraries" = no; then
16665   # Check for the libraries.
16666   # See if we find them without any special options.
16667   # Don't add to $LIBS permanently.
16668   ac_save_LIBS=$LIBS
16669   LIBS="-lX11 $LIBS"
16670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16671 /* end confdefs.h.  */
16672 #include <X11/Xlib.h>
16673 int
16674 main ()
16675 {
16676 XrmInitialize ()
16677   ;
16678   return 0;
16679 }
16680 _ACEOF
16681 if ac_fn_c_try_link "$LINENO"; then :
16682   LIBS=$ac_save_LIBS
16683 # We can link X programs with no special library path.
16684 ac_x_libraries=
16685 else
16686   LIBS=$ac_save_LIBS
16687 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
16688 do
16689   # Don't even attempt the hair of trying to link an X program!
16690   for ac_extension in a so sl dylib la dll; do
16691     if test -r "$ac_dir/libX11.$ac_extension"; then
16692       ac_x_libraries=$ac_dir
16693       break 2
16694     fi
16695   done
16696 done
16697 fi
16698 rm -f core conftest.err conftest.$ac_objext \
16699     conftest$ac_exeext conftest.$ac_ext
16700 fi # $ac_x_libraries = no
16701
16702 case $ac_x_includes,$ac_x_libraries in #(
16703   no,* | *,no | *\'*)
16704     # Didn't find X, or a directory has "'" in its name.
16705     ac_cv_have_x="have_x=no";; #(
16706   *)
16707     # Record where we found X for the cache.
16708     ac_cv_have_x="have_x=yes\
16709         ac_x_includes='$ac_x_includes'\
16710         ac_x_libraries='$ac_x_libraries'"
16711 esac
16712 fi
16713 ;; #(
16714     *) have_x=yes;;
16715   esac
16716   eval "$ac_cv_have_x"
16717 fi # $with_x != no
16718
16719 if test "$have_x" != yes; then
16720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16721 $as_echo "$have_x" >&6; }
16722   no_x=yes
16723 else
16724   # If each of the values was on the command line, it overrides each guess.
16725   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16726   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16727   # Update the cache value to reflect the command line values.
16728   ac_cv_have_x="have_x=yes\
16729         ac_x_includes='$x_includes'\
16730         ac_x_libraries='$x_libraries'"
16731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16732 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
16733 fi
16734
16735
16736 # Unlike the sim directory, whether a simulator is linked is controlled by
16737 # presence of a gdb_sim definition in the target configure.tgt entry.
16738 # This code just checks for a few cases where we'd like to ignore those
16739 # definitions, even when they're present in the '.mt' file.  These cases
16740 # are when --disable-sim is specified, or if the simulator directory is
16741 # not part of the source tree.
16742 #
16743 # Check whether --enable-sim was given.
16744 if test "${enable_sim+set}" = set; then :
16745   enableval=$enable_sim; echo "enable_sim = $enable_sim";
16746  echo "enableval = ${enableval}";
16747  case "${enableval}" in
16748   yes) ignore_sim=false ;;
16749   no)  ignore_sim=true ;;
16750   *)   ignore_sim=false ;;
16751  esac
16752 else
16753   ignore_sim=false
16754 fi
16755
16756
16757 if test ! -d "${srcdir}/../sim"; then
16758   ignore_sim=true
16759 fi
16760
16761 SIM=
16762 SIM_OBS=
16763 if test "${ignore_sim}" = "false"; then
16764   if test x"${gdb_sim}" != x ; then
16765     SIM="${gdb_sim}"
16766     SIM_OBS="remote-sim.o"
16767
16768 $as_echo "#define WITH_SIM 1" >>confdefs.h
16769
16770
16771     # Some tdep code should only be compiled in when the ppc sim is
16772     # built.  PR sim/13418.
16773     case $target in
16774       powerpc*-*-*)
16775
16776 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16777
16778         ;;
16779     esac
16780   fi
16781 fi
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796 # List of host floatformats.
16797
16798 cat >>confdefs.h <<_ACEOF
16799 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
16800 _ACEOF
16801
16802
16803 cat >>confdefs.h <<_ACEOF
16804 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
16805 _ACEOF
16806
16807
16808 cat >>confdefs.h <<_ACEOF
16809 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
16810 _ACEOF
16811
16812
16813 # target_subdir is used by the testsuite to find the target libraries.
16814 target_subdir=
16815 if test "${host}" != "${target}"; then
16816     target_subdir="${target_alias}/"
16817 fi
16818
16819
16820 frags=
16821 if test "${gdb_native}" = "yes"; then
16822   host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
16823   if test ! -f ${host_makefile_frag}; then
16824     as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
16825   fi
16826   frags="$frags $host_makefile_frag"
16827 else
16828   host_makefile_frag=/dev/null
16829 fi
16830
16831
16832
16833
16834 if test "${gdb_native}" = "yes"; then
16835 # We pick this up from the host configuration file (.mh) because we
16836 # do not have a native configuration Makefile fragment.
16837 nativefile=`sed -n '
16838 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
16839 ' ${host_makefile_frag}`
16840 fi
16841
16842
16843 if test x"${gdb_osabi}" != x ; then
16844
16845 cat >>confdefs.h <<_ACEOF
16846 #define GDB_OSABI_DEFAULT $gdb_osabi
16847 _ACEOF
16848
16849 fi
16850
16851 # Enable multi-ice-gdb-server.
16852 # Check whether --enable-multi-ice was given.
16853 if test "${enable_multi_ice+set}" = set; then :
16854   enableval=$enable_multi_ice; case $enableval in
16855     yes | no)
16856       ;;
16857     *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
16858   esac
16859 fi
16860
16861 if test "x$enable_multi_ice" = xyes; then
16862    subdirs="$subdirs multi-ice"
16863
16864 fi
16865
16866 # Check whether --enable-gdbserver was given.
16867 if test "${enable_gdbserver+set}" = set; then :
16868   enableval=$enable_gdbserver; case "${enableval}" in
16869   yes| no|auto) ;;
16870   *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16871 esac
16872 else
16873   enable_gdbserver=auto
16874 fi
16875
16876
16877 # We only build gdbserver automatically in a native configuration, and
16878 # only if the user did not explicitly disable its build.
16879 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
16880   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16881 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
16882   if test "x$build_gdbserver" = xyes; then
16883     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16884 $as_echo "yes" >&6; }
16885     subdirs="$subdirs gdbserver"
16886
16887     gdbserver_build_enabled=yes
16888   else
16889     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16890 $as_echo "no" >&6; }
16891   fi
16892 fi
16893
16894 # If the user explicitly request the gdbserver to be built, verify that
16895 # we were in fact able to enable it.
16896 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16897   as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16898 fi
16899
16900 # Check for babeltrace and babeltrace-ctf
16901
16902 # Check whether --with-babeltrace was given.
16903 if test "${with_babeltrace+set}" = set; then :
16904   withval=$with_babeltrace;
16905 else
16906   with_babeltrace=auto
16907 fi
16908
16909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
16910 $as_echo_n "checking whether to use babeltrace... " >&6; }
16911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
16912 $as_echo "$with_babeltrace" >&6; }
16913
16914 if test "x$with_babeltrace" = "xno"; then
16915   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
16916 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
16917 else
16918   # Append -Werror to CFLAGS so that configure can catch the warning
16919   # "assignment from incompatible pointer type", which is related to
16920   # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
16921   # in GDB, while babeltrace 1.0.3 is broken.
16922   # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16923   # safe to save and restore CFLAGS here.
16924   saved_CFLAGS=$CFLAGS
16925   CFLAGS="$CFLAGS -Werror"
16926
16927
16928
16929
16930
16931
16932
16933
16934     use_additional=yes
16935
16936   acl_save_prefix="$prefix"
16937   prefix="$acl_final_prefix"
16938   acl_save_exec_prefix="$exec_prefix"
16939   exec_prefix="$acl_final_exec_prefix"
16940
16941     eval additional_includedir=\"$includedir\"
16942     eval additional_libdir=\"$libdir\"
16943
16944   exec_prefix="$acl_save_exec_prefix"
16945   prefix="$acl_save_prefix"
16946
16947
16948 # Check whether --with-libbabeltrace-prefix was given.
16949 if test "${with_libbabeltrace_prefix+set}" = set; then :
16950   withval=$with_libbabeltrace_prefix;
16951     if test "X$withval" = "Xno"; then
16952       use_additional=no
16953     else
16954       if test "X$withval" = "X"; then
16955
16956   acl_save_prefix="$prefix"
16957   prefix="$acl_final_prefix"
16958   acl_save_exec_prefix="$exec_prefix"
16959   exec_prefix="$acl_final_exec_prefix"
16960
16961           eval additional_includedir=\"$includedir\"
16962           eval additional_libdir=\"$libdir\"
16963
16964   exec_prefix="$acl_save_exec_prefix"
16965   prefix="$acl_save_prefix"
16966
16967       else
16968         additional_includedir="$withval/include"
16969         additional_libdir="$withval/lib"
16970       fi
16971     fi
16972
16973 fi
16974
16975       LIBBABELTRACE=
16976   LTLIBBABELTRACE=
16977   INCBABELTRACE=
16978   rpathdirs=
16979   ltrpathdirs=
16980   names_already_handled=
16981   names_next_round='babeltrace babeltrace-ctf'
16982   while test -n "$names_next_round"; do
16983     names_this_round="$names_next_round"
16984     names_next_round=
16985     for name in $names_this_round; do
16986       already_handled=
16987       for n in $names_already_handled; do
16988         if test "$n" = "$name"; then
16989           already_handled=yes
16990           break
16991         fi
16992       done
16993       if test -z "$already_handled"; then
16994         names_already_handled="$names_already_handled $name"
16995                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16996         eval value=\"\$HAVE_LIB$uppername\"
16997         if test -n "$value"; then
16998           if test "$value" = yes; then
16999             eval value=\"\$LIB$uppername\"
17000             test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17001             eval value=\"\$LTLIB$uppername\"
17002             test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17003           else
17004                                     :
17005           fi
17006         else
17007                               found_dir=
17008           found_la=
17009           found_so=
17010           found_a=
17011           if test $use_additional = yes; then
17012             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17013               found_dir="$additional_libdir"
17014               found_so="$additional_libdir/lib$name.$shlibext"
17015               if test -f "$additional_libdir/lib$name.la"; then
17016                 found_la="$additional_libdir/lib$name.la"
17017               fi
17018             else
17019               if test -f "$additional_libdir/lib$name.$libext"; then
17020                 found_dir="$additional_libdir"
17021                 found_a="$additional_libdir/lib$name.$libext"
17022                 if test -f "$additional_libdir/lib$name.la"; then
17023                   found_la="$additional_libdir/lib$name.la"
17024                 fi
17025               fi
17026             fi
17027           fi
17028           if test "X$found_dir" = "X"; then
17029             for x in $LDFLAGS $LTLIBBABELTRACE; do
17030
17031   acl_save_prefix="$prefix"
17032   prefix="$acl_final_prefix"
17033   acl_save_exec_prefix="$exec_prefix"
17034   exec_prefix="$acl_final_exec_prefix"
17035   eval x=\"$x\"
17036   exec_prefix="$acl_save_exec_prefix"
17037   prefix="$acl_save_prefix"
17038
17039               case "$x" in
17040                 -L*)
17041                   dir=`echo "X$x" | sed -e 's/^X-L//'`
17042                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17043                     found_dir="$dir"
17044                     found_so="$dir/lib$name.$shlibext"
17045                     if test -f "$dir/lib$name.la"; then
17046                       found_la="$dir/lib$name.la"
17047                     fi
17048                   else
17049                     if test -f "$dir/lib$name.$libext"; then
17050                       found_dir="$dir"
17051                       found_a="$dir/lib$name.$libext"
17052                       if test -f "$dir/lib$name.la"; then
17053                         found_la="$dir/lib$name.la"
17054                       fi
17055                     fi
17056                   fi
17057                   ;;
17058               esac
17059               if test "X$found_dir" != "X"; then
17060                 break
17061               fi
17062             done
17063           fi
17064           if test "X$found_dir" != "X"; then
17065                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17066             if test "X$found_so" != "X"; then
17067                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17068                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17069               else
17070                                                                                 haveit=
17071                 for x in $ltrpathdirs; do
17072                   if test "X$x" = "X$found_dir"; then
17073                     haveit=yes
17074                     break
17075                   fi
17076                 done
17077                 if test -z "$haveit"; then
17078                   ltrpathdirs="$ltrpathdirs $found_dir"
17079                 fi
17080                                 if test "$hardcode_direct" = yes; then
17081                                                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17082                 else
17083                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17084                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17085                                                             haveit=
17086                     for x in $rpathdirs; do
17087                       if test "X$x" = "X$found_dir"; then
17088                         haveit=yes
17089                         break
17090                       fi
17091                     done
17092                     if test -z "$haveit"; then
17093                       rpathdirs="$rpathdirs $found_dir"
17094                     fi
17095                   else
17096                                                                                 haveit=
17097                     for x in $LDFLAGS $LIBBABELTRACE; do
17098
17099   acl_save_prefix="$prefix"
17100   prefix="$acl_final_prefix"
17101   acl_save_exec_prefix="$exec_prefix"
17102   exec_prefix="$acl_final_exec_prefix"
17103   eval x=\"$x\"
17104   exec_prefix="$acl_save_exec_prefix"
17105   prefix="$acl_save_prefix"
17106
17107                       if test "X$x" = "X-L$found_dir"; then
17108                         haveit=yes
17109                         break
17110                       fi
17111                     done
17112                     if test -z "$haveit"; then
17113                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17114                     fi
17115                     if test "$hardcode_minus_L" != no; then
17116                                                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17117                     else
17118                                                                                                                                                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17119                     fi
17120                   fi
17121                 fi
17122               fi
17123             else
17124               if test "X$found_a" != "X"; then
17125                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17126               else
17127                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17128               fi
17129             fi
17130                         additional_includedir=
17131             case "$found_dir" in
17132               */lib | */lib/)
17133                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17134                 additional_includedir="$basedir/include"
17135                 ;;
17136             esac
17137             if test "X$additional_includedir" != "X"; then
17138                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
17139                 haveit=
17140                 if test "X$additional_includedir" = "X/usr/local/include"; then
17141                   if test -n "$GCC"; then
17142                     case $host_os in
17143                       linux*) haveit=yes;;
17144                     esac
17145                   fi
17146                 fi
17147                 if test -z "$haveit"; then
17148                   for x in $CPPFLAGS $INCBABELTRACE; do
17149
17150   acl_save_prefix="$prefix"
17151   prefix="$acl_final_prefix"
17152   acl_save_exec_prefix="$exec_prefix"
17153   exec_prefix="$acl_final_exec_prefix"
17154   eval x=\"$x\"
17155   exec_prefix="$acl_save_exec_prefix"
17156   prefix="$acl_save_prefix"
17157
17158                     if test "X$x" = "X-I$additional_includedir"; then
17159                       haveit=yes
17160                       break
17161                     fi
17162                   done
17163                   if test -z "$haveit"; then
17164                     if test -d "$additional_includedir"; then
17165                                             INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17166                     fi
17167                   fi
17168                 fi
17169               fi
17170             fi
17171                         if test -n "$found_la"; then
17172                                                         save_libdir="$libdir"
17173               case "$found_la" in
17174                 */* | *\\*) . "$found_la" ;;
17175                 *) . "./$found_la" ;;
17176               esac
17177               libdir="$save_libdir"
17178                             for dep in $dependency_libs; do
17179                 case "$dep" in
17180                   -L*)
17181                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17182                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
17183                       haveit=
17184                       if test "X$additional_libdir" = "X/usr/local/lib"; then
17185                         if test -n "$GCC"; then
17186                           case $host_os in
17187                             linux*) haveit=yes;;
17188                           esac
17189                         fi
17190                       fi
17191                       if test -z "$haveit"; then
17192                         haveit=
17193                         for x in $LDFLAGS $LIBBABELTRACE; do
17194
17195   acl_save_prefix="$prefix"
17196   prefix="$acl_final_prefix"
17197   acl_save_exec_prefix="$exec_prefix"
17198   exec_prefix="$acl_final_exec_prefix"
17199   eval x=\"$x\"
17200   exec_prefix="$acl_save_exec_prefix"
17201   prefix="$acl_save_prefix"
17202
17203                           if test "X$x" = "X-L$additional_libdir"; then
17204                             haveit=yes
17205                             break
17206                           fi
17207                         done
17208                         if test -z "$haveit"; then
17209                           if test -d "$additional_libdir"; then
17210                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17211                           fi
17212                         fi
17213                         haveit=
17214                         for x in $LDFLAGS $LTLIBBABELTRACE; do
17215
17216   acl_save_prefix="$prefix"
17217   prefix="$acl_final_prefix"
17218   acl_save_exec_prefix="$exec_prefix"
17219   exec_prefix="$acl_final_exec_prefix"
17220   eval x=\"$x\"
17221   exec_prefix="$acl_save_exec_prefix"
17222   prefix="$acl_save_prefix"
17223
17224                           if test "X$x" = "X-L$additional_libdir"; then
17225                             haveit=yes
17226                             break
17227                           fi
17228                         done
17229                         if test -z "$haveit"; then
17230                           if test -d "$additional_libdir"; then
17231                                                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17232                           fi
17233                         fi
17234                       fi
17235                     fi
17236                     ;;
17237                   -R*)
17238                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
17239                     if test "$enable_rpath" != no; then
17240                                                                   haveit=
17241                       for x in $rpathdirs; do
17242                         if test "X$x" = "X$dir"; then
17243                           haveit=yes
17244                           break
17245                         fi
17246                       done
17247                       if test -z "$haveit"; then
17248                         rpathdirs="$rpathdirs $dir"
17249                       fi
17250                                                                   haveit=
17251                       for x in $ltrpathdirs; do
17252                         if test "X$x" = "X$dir"; then
17253                           haveit=yes
17254                           break
17255                         fi
17256                       done
17257                       if test -z "$haveit"; then
17258                         ltrpathdirs="$ltrpathdirs $dir"
17259                       fi
17260                     fi
17261                     ;;
17262                   -l*)
17263                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17264                     ;;
17265                   *.la)
17266                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17267                     ;;
17268                   *)
17269                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17270                     LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17271                     ;;
17272                 esac
17273               done
17274             fi
17275           else
17276                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17277             LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17278           fi
17279         fi
17280       fi
17281     done
17282   done
17283   if test "X$rpathdirs" != "X"; then
17284     if test -n "$hardcode_libdir_separator"; then
17285                         alldirs=
17286       for found_dir in $rpathdirs; do
17287         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17288       done
17289             acl_save_libdir="$libdir"
17290       libdir="$alldirs"
17291       eval flag=\"$hardcode_libdir_flag_spec\"
17292       libdir="$acl_save_libdir"
17293       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17294     else
17295             for found_dir in $rpathdirs; do
17296         acl_save_libdir="$libdir"
17297         libdir="$found_dir"
17298         eval flag=\"$hardcode_libdir_flag_spec\"
17299         libdir="$acl_save_libdir"
17300         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17301       done
17302     fi
17303   fi
17304   if test "X$ltrpathdirs" != "X"; then
17305             for found_dir in $ltrpathdirs; do
17306       LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17307     done
17308   fi
17309
17310
17311         ac_save_CPPFLAGS="$CPPFLAGS"
17312
17313   for element in $INCBABELTRACE; do
17314     haveit=
17315     for x in $CPPFLAGS; do
17316
17317   acl_save_prefix="$prefix"
17318   prefix="$acl_final_prefix"
17319   acl_save_exec_prefix="$exec_prefix"
17320   exec_prefix="$acl_final_exec_prefix"
17321   eval x=\"$x\"
17322   exec_prefix="$acl_save_exec_prefix"
17323   prefix="$acl_save_prefix"
17324
17325       if test "X$x" = "X$element"; then
17326         haveit=yes
17327         break
17328       fi
17329     done
17330     if test -z "$haveit"; then
17331       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17332     fi
17333   done
17334
17335
17336   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17337 $as_echo_n "checking for libbabeltrace... " >&6; }
17338 if test "${ac_cv_libbabeltrace+set}" = set; then :
17339   $as_echo_n "(cached) " >&6
17340 else
17341
17342     ac_save_LIBS="$LIBS"
17343     LIBS="$LIBS $LIBBABELTRACE"
17344     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345 /* end confdefs.h.  */
17346 #include <babeltrace/babeltrace.h>
17347                          #include <babeltrace/ctf/events.h>
17348                          #include <babeltrace/ctf/iterator.h>
17349 int
17350 main ()
17351 {
17352 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17353                         struct bt_ctf_event *event = NULL;
17354                         const struct bt_definition *scope;
17355
17356                         pos->type = BT_SEEK_BEGIN;
17357                         bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
17358                         scope = bt_ctf_get_top_level_scope (event,
17359                                                            BT_STREAM_EVENT_HEADER);
17360                         bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17361
17362   ;
17363   return 0;
17364 }
17365 _ACEOF
17366 if ac_fn_c_try_link "$LINENO"; then :
17367   ac_cv_libbabeltrace=yes
17368 else
17369   ac_cv_libbabeltrace=no
17370 fi
17371 rm -f core conftest.err conftest.$ac_objext \
17372     conftest$ac_exeext conftest.$ac_ext
17373     LIBS="$ac_save_LIBS"
17374
17375 fi
17376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17377 $as_echo "$ac_cv_libbabeltrace" >&6; }
17378   if test "$ac_cv_libbabeltrace" = yes; then
17379     HAVE_LIBBABELTRACE=yes
17380
17381 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17382
17383     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17384 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
17385     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17386 $as_echo "$LIBBABELTRACE" >&6; }
17387   else
17388     HAVE_LIBBABELTRACE=no
17389             CPPFLAGS="$ac_save_CPPFLAGS"
17390     LIBBABELTRACE=
17391     LTLIBBABELTRACE=
17392   fi
17393
17394
17395
17396
17397
17398
17399   CFLAGS=$saved_CFLAGS
17400
17401   if test "$HAVE_LIBBABELTRACE" != yes; then
17402      if test "$with_babeltrace" = yes; then
17403        as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
17404      else
17405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17406 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17407      fi
17408   fi
17409 fi
17410
17411 # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
17412 # to an empty version.
17413
17414 files=
17415 links=
17416
17417 rm -f nm.h
17418 if test "${nativefile}" != ""; then
17419     case "${nativefile}" in
17420       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17421       * ) GDB_NM_FILE="${nativefile}"
17422     esac
17423     files="${files} ${GDB_NM_FILE}"
17424     links="${links} nm.h"
17425
17426 cat >>confdefs.h <<_ACEOF
17427 #define GDB_NM_FILE "${GDB_NM_FILE}"
17428 _ACEOF
17429
17430 fi
17431
17432
17433 for ac_prog in xsltproc
17434 do
17435   # Extract the first word of "$ac_prog", so it can be a program name with args.
17436 set dummy $ac_prog; ac_word=$2
17437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17438 $as_echo_n "checking for $ac_word... " >&6; }
17439 if test "${ac_cv_path_XSLTPROC+set}" = set; then :
17440   $as_echo_n "(cached) " >&6
17441 else
17442   case $XSLTPROC in
17443   [\\/]* | ?:[\\/]*)
17444   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17445   ;;
17446   *)
17447   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17448 for as_dir in $PATH
17449 do
17450   IFS=$as_save_IFS
17451   test -z "$as_dir" && as_dir=.
17452     for ac_exec_ext in '' $ac_executable_extensions; do
17453   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17454     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17455     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17456     break 2
17457   fi
17458 done
17459   done
17460 IFS=$as_save_IFS
17461
17462   ;;
17463 esac
17464 fi
17465 XSLTPROC=$ac_cv_path_XSLTPROC
17466 if test -n "$XSLTPROC"; then
17467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17468 $as_echo "$XSLTPROC" >&6; }
17469 else
17470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17471 $as_echo "no" >&6; }
17472 fi
17473
17474
17475   test -n "$XSLTPROC" && break
17476 done
17477 test -n "$XSLTPROC" || XSLTPROC="missing"
17478
17479 if test "x$USE_MAINTAINER_MODE" = xyes; then
17480   if test "${XSLTPROC}" = missing; then
17481     as_fn_error "unable to find xsltproc.  maintainer-mode requires xsltproc." "$LINENO" 5
17482   fi
17483 fi
17484
17485
17486 ac_sources="$files"
17487 ac_dests="$links"
17488 while test -n "$ac_sources"; do
17489   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17490   set $ac_sources; ac_source=$1; shift; ac_sources=$*
17491   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17492 done
17493 ac_config_links="$ac_config_links $ac_config_links_1"
17494
17495
17496
17497
17498
17499 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
17500
17501
17502 if $development; then
17503
17504 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17505
17506 fi
17507
17508
17509   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17510   GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17511   if test "x$GDB_TRANSFORM_NAME" = x; then
17512      GDB_TRANSFORM_NAME=gdb
17513   fi
17514
17515
17516
17517   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17518   GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17519   if test "x$GCORE_TRANSFORM_NAME" = x; then
17520      GCORE_TRANSFORM_NAME=gcore
17521   fi
17522
17523
17524 ac_config_files="$ac_config_files gcore"
17525
17526 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
17527
17528
17529 cat >confcache <<\_ACEOF
17530 # This file is a shell script that caches the results of configure
17531 # tests run on this system so they can be shared between configure
17532 # scripts and configure runs, see configure's option --config-cache.
17533 # It is not useful on other systems.  If it contains results you don't
17534 # want to keep, you may remove or edit it.
17535 #
17536 # config.status only pays attention to the cache file if you give it
17537 # the --recheck option to rerun configure.
17538 #
17539 # `ac_cv_env_foo' variables (set or unset) will be overridden when
17540 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17541 # following values.
17542
17543 _ACEOF
17544
17545 # The following way of writing the cache mishandles newlines in values,
17546 # but we know of no workaround that is simple, portable, and efficient.
17547 # So, we kill variables containing newlines.
17548 # Ultrix sh set writes to stderr and can't be redirected directly,
17549 # and sets the high bit in the cache file unless we assign to the vars.
17550 (
17551   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17552     eval ac_val=\$$ac_var
17553     case $ac_val in #(
17554     *${as_nl}*)
17555       case $ac_var in #(
17556       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17557 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17558       esac
17559       case $ac_var in #(
17560       _ | IFS | as_nl) ;; #(
17561       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17562       *) { eval $ac_var=; unset $ac_var;} ;;
17563       esac ;;
17564     esac
17565   done
17566
17567   (set) 2>&1 |
17568     case $as_nl`(ac_space=' '; set) 2>&1` in #(
17569     *${as_nl}ac_space=\ *)
17570       # `set' does not quote correctly, so add quotes: double-quote
17571       # substitution turns \\\\ into \\, and sed turns \\ into \.
17572       sed -n \
17573         "s/'/'\\\\''/g;
17574           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17575       ;; #(
17576     *)
17577       # `set' quotes correctly as required by POSIX, so do not add quotes.
17578       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
17579       ;;
17580     esac |
17581     sort
17582 ) |
17583   sed '
17584      /^ac_cv_env_/b end
17585      t clear
17586      :clear
17587      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17588      t end
17589      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17590      :end' >>confcache
17591 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17592   if test -w "$cache_file"; then
17593     test "x$cache_file" != "x/dev/null" &&
17594       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17595 $as_echo "$as_me: updating cache $cache_file" >&6;}
17596     cat confcache >$cache_file
17597   else
17598     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17599 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
17600   fi
17601 fi
17602 rm -f confcache
17603
17604 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17605 # Let make expand exec_prefix.
17606 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17607
17608 DEFS=-DHAVE_CONFIG_H
17609
17610 ac_libobjs=
17611 ac_ltlibobjs=
17612 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17613   # 1. Remove the extension, and $U if already installed.
17614   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17615   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17616   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
17617   #    will be set to the directory where LIBOBJS objects are built.
17618   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17619   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
17620 done
17621 LIBOBJS=$ac_libobjs
17622
17623 LTLIBOBJS=$ac_ltlibobjs
17624
17625
17626 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
17627   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
17628 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17629 fi
17630 if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
17631   as_fn_error "conditional \"GMAKE\" was never defined.
17632 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17633 fi
17634 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17635   as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
17636 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17637 fi
17638 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17639   as_fn_error "conditional \"HAVE_GUILE\" was never defined.
17640 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17641 fi
17642
17643
17644 : ${CONFIG_STATUS=./config.status}
17645 ac_write_fail=0
17646 ac_clean_files_save=$ac_clean_files
17647 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17648 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17649 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17650 as_write_fail=0
17651 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
17652 #! $SHELL
17653 # Generated by $as_me.
17654 # Run this file to recreate the current configuration.
17655 # Compiler output produced by configure, useful for debugging
17656 # configure, is in config.log if it exists.
17657
17658 debug=false
17659 ac_cs_recheck=false
17660 ac_cs_silent=false
17661
17662 SHELL=\${CONFIG_SHELL-$SHELL}
17663 export SHELL
17664 _ASEOF
17665 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17666 ## -------------------- ##
17667 ## M4sh Initialization. ##
17668 ## -------------------- ##
17669
17670 # Be more Bourne compatible
17671 DUALCASE=1; export DUALCASE # for MKS sh
17672 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17673   emulate sh
17674   NULLCMD=:
17675   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
17676   # is contrary to our usage.  Disable this feature.
17677   alias -g '${1+"$@"}'='"$@"'
17678   setopt NO_GLOB_SUBST
17679 else
17680   case `(set -o) 2>/dev/null` in #(
17681   *posix*) :
17682     set -o posix ;; #(
17683   *) :
17684      ;;
17685 esac
17686 fi
17687
17688
17689 as_nl='
17690 '
17691 export as_nl
17692 # Printing a long string crashes Solaris 7 /usr/bin/printf.
17693 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17694 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17695 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17696 # Prefer a ksh shell builtin over an external printf program on Solaris,
17697 # but without wasting forks for bash or zsh.
17698 if test -z "$BASH_VERSION$ZSH_VERSION" \
17699     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17700   as_echo='print -r --'
17701   as_echo_n='print -rn --'
17702 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17703   as_echo='printf %s\n'
17704   as_echo_n='printf %s'
17705 else
17706   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17707     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17708     as_echo_n='/usr/ucb/echo -n'
17709   else
17710     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17711     as_echo_n_body='eval
17712       arg=$1;
17713       case $arg in #(
17714       *"$as_nl"*)
17715         expr "X$arg" : "X\\(.*\\)$as_nl";
17716         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17717       esac;
17718       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17719     '
17720     export as_echo_n_body
17721     as_echo_n='sh -c $as_echo_n_body as_echo'
17722   fi
17723   export as_echo_body
17724   as_echo='sh -c $as_echo_body as_echo'
17725 fi
17726
17727 # The user is always right.
17728 if test "${PATH_SEPARATOR+set}" != set; then
17729   PATH_SEPARATOR=:
17730   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17731     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17732       PATH_SEPARATOR=';'
17733   }
17734 fi
17735
17736
17737 # IFS
17738 # We need space, tab and new line, in precisely that order.  Quoting is
17739 # there to prevent editors from complaining about space-tab.
17740 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
17741 # splitting by setting IFS to empty value.)
17742 IFS=" ""        $as_nl"
17743
17744 # Find who we are.  Look in the path if we contain no directory separator.
17745 case $0 in #((
17746   *[\\/]* ) as_myself=$0 ;;
17747   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17748 for as_dir in $PATH
17749 do
17750   IFS=$as_save_IFS
17751   test -z "$as_dir" && as_dir=.
17752     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17753   done
17754 IFS=$as_save_IFS
17755
17756      ;;
17757 esac
17758 # We did not find ourselves, most probably we were run as `sh COMMAND'
17759 # in which case we are not to be found in the path.
17760 if test "x$as_myself" = x; then
17761   as_myself=$0
17762 fi
17763 if test ! -f "$as_myself"; then
17764   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17765   exit 1
17766 fi
17767
17768 # Unset variables that we do not need and which cause bugs (e.g. in
17769 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
17770 # suppresses any "Segmentation fault" message there.  '((' could
17771 # trigger a bug in pdksh 5.2.14.
17772 for as_var in BASH_ENV ENV MAIL MAILPATH
17773 do eval test x\${$as_var+set} = xset \
17774   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17775 done
17776 PS1='$ '
17777 PS2='> '
17778 PS4='+ '
17779
17780 # NLS nuisances.
17781 LC_ALL=C
17782 export LC_ALL
17783 LANGUAGE=C
17784 export LANGUAGE
17785
17786 # CDPATH.
17787 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17788
17789
17790 # as_fn_error ERROR [LINENO LOG_FD]
17791 # ---------------------------------
17792 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17793 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17794 # script with status $?, using 1 if that was 0.
17795 as_fn_error ()
17796 {
17797   as_status=$?; test $as_status -eq 0 && as_status=1
17798   if test "$3"; then
17799     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17800     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
17801   fi
17802   $as_echo "$as_me: error: $1" >&2
17803   as_fn_exit $as_status
17804 } # as_fn_error
17805
17806
17807 # as_fn_set_status STATUS
17808 # -----------------------
17809 # Set $? to STATUS, without forking.
17810 as_fn_set_status ()
17811 {
17812   return $1
17813 } # as_fn_set_status
17814
17815 # as_fn_exit STATUS
17816 # -----------------
17817 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17818 as_fn_exit ()
17819 {
17820   set +e
17821   as_fn_set_status $1
17822   exit $1
17823 } # as_fn_exit
17824
17825 # as_fn_unset VAR
17826 # ---------------
17827 # Portably unset VAR.
17828 as_fn_unset ()
17829 {
17830   { eval $1=; unset $1;}
17831 }
17832 as_unset=as_fn_unset
17833 # as_fn_append VAR VALUE
17834 # ----------------------
17835 # Append the text in VALUE to the end of the definition contained in VAR. Take
17836 # advantage of any shell optimizations that allow amortized linear growth over
17837 # repeated appends, instead of the typical quadratic growth present in naive
17838 # implementations.
17839 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17840   eval 'as_fn_append ()
17841   {
17842     eval $1+=\$2
17843   }'
17844 else
17845   as_fn_append ()
17846   {
17847     eval $1=\$$1\$2
17848   }
17849 fi # as_fn_append
17850
17851 # as_fn_arith ARG...
17852 # ------------------
17853 # Perform arithmetic evaluation on the ARGs, and store the result in the
17854 # global $as_val. Take advantage of shells that can avoid forks. The arguments
17855 # must be portable across $(()) and expr.
17856 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17857   eval 'as_fn_arith ()
17858   {
17859     as_val=$(( $* ))
17860   }'
17861 else
17862   as_fn_arith ()
17863   {
17864     as_val=`expr "$@" || test $? -eq 1`
17865   }
17866 fi # as_fn_arith
17867
17868
17869 if expr a : '\(a\)' >/dev/null 2>&1 &&
17870    test "X`expr 00001 : '.*\(...\)'`" = X001; then
17871   as_expr=expr
17872 else
17873   as_expr=false
17874 fi
17875
17876 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17877   as_basename=basename
17878 else
17879   as_basename=false
17880 fi
17881
17882 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17883   as_dirname=dirname
17884 else
17885   as_dirname=false
17886 fi
17887
17888 as_me=`$as_basename -- "$0" ||
17889 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17890          X"$0" : 'X\(//\)$' \| \
17891          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17892 $as_echo X/"$0" |
17893     sed '/^.*\/\([^/][^/]*\)\/*$/{
17894             s//\1/
17895             q
17896           }
17897           /^X\/\(\/\/\)$/{
17898             s//\1/
17899             q
17900           }
17901           /^X\/\(\/\).*/{
17902             s//\1/
17903             q
17904           }
17905           s/.*/./; q'`
17906
17907 # Avoid depending upon Character Ranges.
17908 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17909 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17910 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17911 as_cr_digits='0123456789'
17912 as_cr_alnum=$as_cr_Letters$as_cr_digits
17913
17914 ECHO_C= ECHO_N= ECHO_T=
17915 case `echo -n x` in #(((((
17916 -n*)
17917   case `echo 'xy\c'` in
17918   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
17919   xy)  ECHO_C='\c';;
17920   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
17921        ECHO_T=' ';;
17922   esac;;
17923 *)
17924   ECHO_N='-n';;
17925 esac
17926
17927 rm -f conf$$ conf$$.exe conf$$.file
17928 if test -d conf$$.dir; then
17929   rm -f conf$$.dir/conf$$.file
17930 else
17931   rm -f conf$$.dir
17932   mkdir conf$$.dir 2>/dev/null
17933 fi
17934 if (echo >conf$$.file) 2>/dev/null; then
17935   if ln -s conf$$.file conf$$ 2>/dev/null; then
17936     as_ln_s='ln -s'
17937     # ... but there are two gotchas:
17938     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17939     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17940     # In both cases, we have to default to `cp -p'.
17941     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17942       as_ln_s='cp -p'
17943   elif ln conf$$.file conf$$ 2>/dev/null; then
17944     as_ln_s=ln
17945   else
17946     as_ln_s='cp -p'
17947   fi
17948 else
17949   as_ln_s='cp -p'
17950 fi
17951 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17952 rmdir conf$$.dir 2>/dev/null
17953
17954
17955 # as_fn_mkdir_p
17956 # -------------
17957 # Create "$as_dir" as a directory, including parents if necessary.
17958 as_fn_mkdir_p ()
17959 {
17960
17961   case $as_dir in #(
17962   -*) as_dir=./$as_dir;;
17963   esac
17964   test -d "$as_dir" || eval $as_mkdir_p || {
17965     as_dirs=
17966     while :; do
17967       case $as_dir in #(
17968       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17969       *) as_qdir=$as_dir;;
17970       esac
17971       as_dirs="'$as_qdir' $as_dirs"
17972       as_dir=`$as_dirname -- "$as_dir" ||
17973 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17974          X"$as_dir" : 'X\(//\)[^/]' \| \
17975          X"$as_dir" : 'X\(//\)$' \| \
17976          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17977 $as_echo X"$as_dir" |
17978     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17979             s//\1/
17980             q
17981           }
17982           /^X\(\/\/\)[^/].*/{
17983             s//\1/
17984             q
17985           }
17986           /^X\(\/\/\)$/{
17987             s//\1/
17988             q
17989           }
17990           /^X\(\/\).*/{
17991             s//\1/
17992             q
17993           }
17994           s/.*/./; q'`
17995       test -d "$as_dir" && break
17996     done
17997     test -z "$as_dirs" || eval "mkdir $as_dirs"
17998   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17999
18000
18001 } # as_fn_mkdir_p
18002 if mkdir -p . 2>/dev/null; then
18003   as_mkdir_p='mkdir -p "$as_dir"'
18004 else
18005   test -d ./-p && rmdir ./-p
18006   as_mkdir_p=false
18007 fi
18008
18009 if test -x / >/dev/null 2>&1; then
18010   as_test_x='test -x'
18011 else
18012   if ls -dL / >/dev/null 2>&1; then
18013     as_ls_L_option=L
18014   else
18015     as_ls_L_option=
18016   fi
18017   as_test_x='
18018     eval sh -c '\''
18019       if test -d "$1"; then
18020         test -d "$1/.";
18021       else
18022         case $1 in #(
18023         -*)set "./$1";;
18024         esac;
18025         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
18026         ???[sx]*):;;*)false;;esac;fi
18027     '\'' sh
18028   '
18029 fi
18030 as_executable_p=$as_test_x
18031
18032 # Sed expression to map a string onto a valid CPP name.
18033 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18034
18035 # Sed expression to map a string onto a valid variable name.
18036 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18037
18038
18039 exec 6>&1
18040 ## ----------------------------------- ##
18041 ## Main body of $CONFIG_STATUS script. ##
18042 ## ----------------------------------- ##
18043 _ASEOF
18044 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18045
18046 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18047 # Save the log message, to keep $0 and so on meaningful, and to
18048 # report actual input values of CONFIG_FILES etc. instead of their
18049 # values after options handling.
18050 ac_log="
18051 This file was extended by $as_me, which was
18052 generated by GNU Autoconf 2.64.  Invocation command line was
18053
18054   CONFIG_FILES    = $CONFIG_FILES
18055   CONFIG_HEADERS  = $CONFIG_HEADERS
18056   CONFIG_LINKS    = $CONFIG_LINKS
18057   CONFIG_COMMANDS = $CONFIG_COMMANDS
18058   $ $0 $@
18059
18060 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18061 "
18062
18063 _ACEOF
18064
18065 case $ac_config_files in *"
18066 "*) set x $ac_config_files; shift; ac_config_files=$*;;
18067 esac
18068
18069 case $ac_config_headers in *"
18070 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18071 esac
18072
18073
18074 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18075 # Files that config.status was made for.
18076 config_files="$ac_config_files"
18077 config_headers="$ac_config_headers"
18078 config_links="$ac_config_links"
18079 config_commands="$ac_config_commands"
18080
18081 _ACEOF
18082
18083 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18084 ac_cs_usage="\
18085 \`$as_me' instantiates files and other configuration actions
18086 from templates according to the current configuration.  Unless the files
18087 and actions are specified as TAGs, all are instantiated by default.
18088
18089 Usage: $0 [OPTION]... [TAG]...
18090
18091   -h, --help       print this help, then exit
18092   -V, --version    print version number and configuration settings, then exit
18093   -q, --quiet, --silent
18094                    do not print progress messages
18095   -d, --debug      don't remove temporary files
18096       --recheck    update $as_me by reconfiguring in the same conditions
18097       --file=FILE[:TEMPLATE]
18098                    instantiate the configuration file FILE
18099       --header=FILE[:TEMPLATE]
18100                    instantiate the configuration header FILE
18101
18102 Configuration files:
18103 $config_files
18104
18105 Configuration headers:
18106 $config_headers
18107
18108 Configuration links:
18109 $config_links
18110
18111 Configuration commands:
18112 $config_commands
18113
18114 Report bugs to the package provider."
18115
18116 _ACEOF
18117 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18118 ac_cs_version="\\
18119 config.status
18120 configured by $0, generated by GNU Autoconf 2.64,
18121   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
18122
18123 Copyright (C) 2009 Free Software Foundation, Inc.
18124 This config.status script is free software; the Free Software Foundation
18125 gives unlimited permission to copy, distribute and modify it."
18126
18127 ac_pwd='$ac_pwd'
18128 srcdir='$srcdir'
18129 INSTALL='$INSTALL'
18130 AWK='$AWK'
18131 test -n "\$AWK" || AWK=awk
18132 _ACEOF
18133
18134 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18135 # The default lists apply if the user does not specify any file.
18136 ac_need_defaults=:
18137 while test $# != 0
18138 do
18139   case $1 in
18140   --*=*)
18141     ac_option=`expr "X$1" : 'X\([^=]*\)='`
18142     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18143     ac_shift=:
18144     ;;
18145   *)
18146     ac_option=$1
18147     ac_optarg=$2
18148     ac_shift=shift
18149     ;;
18150   esac
18151
18152   case $ac_option in
18153   # Handling of the options.
18154   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18155     ac_cs_recheck=: ;;
18156   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18157     $as_echo "$ac_cs_version"; exit ;;
18158   --debug | --debu | --deb | --de | --d | -d )
18159     debug=: ;;
18160   --file | --fil | --fi | --f )
18161     $ac_shift
18162     case $ac_optarg in
18163     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18164     esac
18165     as_fn_append CONFIG_FILES " '$ac_optarg'"
18166     ac_need_defaults=false;;
18167   --header | --heade | --head | --hea )
18168     $ac_shift
18169     case $ac_optarg in
18170     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18171     esac
18172     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
18173     ac_need_defaults=false;;
18174   --he | --h)
18175     # Conflict between --help and --header
18176     as_fn_error "ambiguous option: \`$1'
18177 Try \`$0 --help' for more information.";;
18178   --help | --hel | -h )
18179     $as_echo "$ac_cs_usage"; exit ;;
18180   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18181   | -silent | --silent | --silen | --sile | --sil | --si | --s)
18182     ac_cs_silent=: ;;
18183
18184   # This is an error.
18185   -*) as_fn_error "unrecognized option: \`$1'
18186 Try \`$0 --help' for more information." ;;
18187
18188   *) as_fn_append ac_config_targets " $1"
18189      ac_need_defaults=false ;;
18190
18191   esac
18192   shift
18193 done
18194
18195 ac_configure_extra_args=
18196
18197 if $ac_cs_silent; then
18198   exec 6>/dev/null
18199   ac_configure_extra_args="$ac_configure_extra_args --silent"
18200 fi
18201
18202 _ACEOF
18203 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18204 if \$ac_cs_recheck; then
18205   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18206   shift
18207   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18208   CONFIG_SHELL='$SHELL'
18209   export CONFIG_SHELL
18210   exec "\$@"
18211 fi
18212
18213 _ACEOF
18214 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18215 exec 5>>config.log
18216 {
18217   echo
18218   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18219 ## Running $as_me. ##
18220 _ASBOX
18221   $as_echo "$ac_log"
18222 } >&5
18223
18224 _ACEOF
18225 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18226 #
18227 # INIT-COMMANDS
18228 #
18229 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
18230
18231 _ACEOF
18232
18233 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18234
18235 # Handling of arguments.
18236 for ac_config_target in $ac_config_targets
18237 do
18238   case $ac_config_target in
18239     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18240     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
18241     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
18242     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
18243     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
18244     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18245     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
18246     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
18247     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
18248
18249   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
18250   esac
18251 done
18252
18253
18254 # If the user did not use the arguments to specify the items to instantiate,
18255 # then the envvar interface is used.  Set only those that are not.
18256 # We use the long form for the default assignment because of an extremely
18257 # bizarre bug on SunOS 4.1.3.
18258 if $ac_need_defaults; then
18259   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18260   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18261   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18262   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18263 fi
18264
18265 # Have a temporary directory for convenience.  Make it in the build tree
18266 # simply because there is no reason against having it here, and in addition,
18267 # creating and moving files from /tmp can sometimes cause problems.
18268 # Hook for its removal unless debugging.
18269 # Note that there is a small window in which the directory will not be cleaned:
18270 # after its creation but before its name has been assigned to `$tmp'.
18271 $debug ||
18272 {
18273   tmp=
18274   trap 'exit_status=$?
18275   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
18276 ' 0
18277   trap 'as_fn_exit 1' 1 2 13 15
18278 }
18279 # Create a (secure) tmp directory for tmp files.
18280
18281 {
18282   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18283   test -n "$tmp" && test -d "$tmp"
18284 }  ||
18285 {
18286   tmp=./conf$$-$RANDOM
18287   (umask 077 && mkdir "$tmp")
18288 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
18289
18290 # Set up the scripts for CONFIG_FILES section.
18291 # No need to generate them if there are no CONFIG_FILES.
18292 # This happens for instance with `./config.status config.h'.
18293 if test -n "$CONFIG_FILES"; then
18294
18295 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18296   ac_cs_awk_getline=:
18297   ac_cs_awk_pipe_init=
18298   ac_cs_awk_read_file='
18299       while ((getline aline < (F[key])) > 0)
18300         print(aline)
18301       close(F[key])'
18302   ac_cs_awk_pipe_fini=
18303 else
18304   ac_cs_awk_getline=false
18305   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18306   ac_cs_awk_read_file='
18307       print "|#_!!_#|"
18308       print "cat " F[key] " &&"
18309       '$ac_cs_awk_pipe_init
18310   # The final `:' finishes the AND list.
18311   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18312 fi
18313 ac_cr=`echo X | tr X '\015'`
18314 # On cygwin, bash can eat \r inside `` if the user requested igncr.
18315 # But we know of no other shell where ac_cr would be empty at this
18316 # point, so we can use a bashism as a fallback.
18317 if test "x$ac_cr" = x; then
18318   eval ac_cr=\$\'\\r\'
18319 fi
18320 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18321 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18322   ac_cs_awk_cr='\r'
18323 else
18324   ac_cs_awk_cr=$ac_cr
18325 fi
18326
18327 echo 'BEGIN {' >"$tmp/subs1.awk" &&
18328 _ACEOF
18329
18330 # Create commands to substitute file output variables.
18331 {
18332   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18333   echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
18334   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18335   echo "_ACAWK" &&
18336   echo "_ACEOF"
18337 } >conf$$files.sh &&
18338 . ./conf$$files.sh ||
18339   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18340 rm -f conf$$files.sh
18341
18342 {
18343   echo "cat >conf$$subs.awk <<_ACEOF" &&
18344   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18345   echo "_ACEOF"
18346 } >conf$$subs.sh ||
18347   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18348 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
18349 ac_delim='%!_!# '
18350 for ac_last_try in false false false false false :; do
18351   . ./conf$$subs.sh ||
18352     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18353
18354   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18355   if test $ac_delim_n = $ac_delim_num; then
18356     break
18357   elif $ac_last_try; then
18358     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18359   else
18360     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18361   fi
18362 done
18363 rm -f conf$$subs.sh
18364
18365 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18366 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
18367 _ACEOF
18368 sed -n '
18369 h
18370 s/^/S["/; s/!.*/"]=/
18371 p
18372 g
18373 s/^[^!]*!//
18374 :repl
18375 t repl
18376 s/'"$ac_delim"'$//
18377 t delim
18378 :nl
18379 h
18380 s/\(.\{148\}\).*/\1/
18381 t more1
18382 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18383 p
18384 n
18385 b repl
18386 :more1
18387 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18388 p
18389 g
18390 s/.\{148\}//
18391 t nl
18392 :delim
18393 h
18394 s/\(.\{148\}\).*/\1/
18395 t more2
18396 s/["\\]/\\&/g; s/^/"/; s/$/"/
18397 p
18398 b
18399 :more2
18400 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18401 p
18402 g
18403 s/.\{148\}//
18404 t delim
18405 ' <conf$$subs.awk | sed '
18406 /^[^""]/{
18407   N
18408   s/\n//
18409 }
18410 ' >>$CONFIG_STATUS || ac_write_fail=1
18411 rm -f conf$$subs.awk
18412 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18413 _ACAWK
18414 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
18415   for (key in S) S_is_set[key] = 1
18416   FS = "\a"
18417   \$ac_cs_awk_pipe_init
18418 }
18419 {
18420   line = $ 0
18421   nfields = split(line, field, "@")
18422   substed = 0
18423   len = length(field[1])
18424   for (i = 2; i < nfields; i++) {
18425     key = field[i]
18426     keylen = length(key)
18427     if (S_is_set[key]) {
18428       value = S[key]
18429       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18430       len += length(value) + length(field[++i])
18431       substed = 1
18432     } else
18433       len += 1 + keylen
18434   }
18435   if (nfields == 3 && !substed) {
18436     key = field[2]
18437     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
18438       \$ac_cs_awk_read_file
18439       next
18440     }
18441   }
18442   print line
18443 }
18444 \$ac_cs_awk_pipe_fini
18445 _ACAWK
18446 _ACEOF
18447 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18448 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18449   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18450 else
18451   cat
18452 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
18453   || as_fn_error "could not setup config files machinery" "$LINENO" 5
18454 _ACEOF
18455
18456 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18457 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18458 # trailing colons and then remove the whole line if VPATH becomes empty
18459 # (actually we leave an empty line to preserve line numbers).
18460 if test "x$srcdir" = x.; then
18461   ac_vpsub='/^[  ]*VPATH[        ]*=/{
18462 s/:*\$(srcdir):*/:/
18463 s/:*\${srcdir}:*/:/
18464 s/:*@srcdir@:*/:/
18465 s/^\([^=]*=[     ]*\):*/\1/
18466 s/:*$//
18467 s/^[^=]*=[       ]*$//
18468 }'
18469 fi
18470
18471 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18472 fi # test -n "$CONFIG_FILES"
18473
18474 # Set up the scripts for CONFIG_HEADERS section.
18475 # No need to generate them if there are no CONFIG_HEADERS.
18476 # This happens for instance with `./config.status Makefile'.
18477 if test -n "$CONFIG_HEADERS"; then
18478 cat >"$tmp/defines.awk" <<\_ACAWK ||
18479 BEGIN {
18480 _ACEOF
18481
18482 # Transform confdefs.h into an awk script `defines.awk', embedded as
18483 # here-document in config.status, that substitutes the proper values into
18484 # config.h.in to produce config.h.
18485
18486 # Create a delimiter string that does not exist in confdefs.h, to ease
18487 # handling of long lines.
18488 ac_delim='%!_!# '
18489 for ac_last_try in false false :; do
18490   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
18491   if test -z "$ac_t"; then
18492     break
18493   elif $ac_last_try; then
18494     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
18495   else
18496     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18497   fi
18498 done
18499
18500 # For the awk script, D is an array of macro values keyed by name,
18501 # likewise P contains macro parameters if any.  Preserve backslash
18502 # newline sequences.
18503
18504 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18505 sed -n '
18506 s/.\{148\}/&'"$ac_delim"'/g
18507 t rset
18508 :rset
18509 s/^[     ]*#[    ]*define[       ][      ]*/ /
18510 t def
18511 d
18512 :def
18513 s/\\$//
18514 t bsnl
18515 s/["\\]/\\&/g
18516 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18517 D["\1"]=" \3"/p
18518 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
18519 d
18520 :bsnl
18521 s/["\\]/\\&/g
18522 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18523 D["\1"]=" \3\\\\\\n"\\/p
18524 t cont
18525 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18526 t cont
18527 d
18528 :cont
18529 n
18530 s/.\{148\}/&'"$ac_delim"'/g
18531 t clear
18532 :clear
18533 s/\\$//
18534 t bsnlc
18535 s/["\\]/\\&/g; s/^/"/; s/$/"/p
18536 d
18537 :bsnlc
18538 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18539 b cont
18540 ' <confdefs.h | sed '
18541 s/'"$ac_delim"'/"\\\
18542 "/g' >>$CONFIG_STATUS || ac_write_fail=1
18543
18544 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18545   for (key in D) D_is_set[key] = 1
18546   FS = "\a"
18547 }
18548 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18549   line = \$ 0
18550   split(line, arg, " ")
18551   if (arg[1] == "#") {
18552     defundef = arg[2]
18553     mac1 = arg[3]
18554   } else {
18555     defundef = substr(arg[1], 2)
18556     mac1 = arg[2]
18557   }
18558   split(mac1, mac2, "(") #)
18559   macro = mac2[1]
18560   prefix = substr(line, 1, index(line, defundef) - 1)
18561   if (D_is_set[macro]) {
18562     # Preserve the white space surrounding the "#".
18563     print prefix "define", macro P[macro] D[macro]
18564     next
18565   } else {
18566     # Replace #undef with comments.  This is necessary, for example,
18567     # in the case of _POSIX_SOURCE, which is predefined and required
18568     # on some systems where configure will not decide to define it.
18569     if (defundef == "undef") {
18570       print "/*", prefix defundef, macro, "*/"
18571       next
18572     }
18573   }
18574 }
18575 { print }
18576 _ACAWK
18577 _ACEOF
18578 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18579   as_fn_error "could not setup config headers machinery" "$LINENO" 5
18580 fi # test -n "$CONFIG_HEADERS"
18581
18582
18583 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
18584 shift
18585 for ac_tag
18586 do
18587   case $ac_tag in
18588   :[FHLC]) ac_mode=$ac_tag; continue;;
18589   esac
18590   case $ac_mode$ac_tag in
18591   :[FHL]*:*);;
18592   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
18593   :[FH]-) ac_tag=-:-;;
18594   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18595   esac
18596   ac_save_IFS=$IFS
18597   IFS=:
18598   set x $ac_tag
18599   IFS=$ac_save_IFS
18600   shift
18601   ac_file=$1
18602   shift
18603
18604   case $ac_mode in
18605   :L) ac_source=$1;;
18606   :[FH])
18607     ac_file_inputs=
18608     for ac_f
18609     do
18610       case $ac_f in
18611       -) ac_f="$tmp/stdin";;
18612       *) # Look for the file first in the build tree, then in the source tree
18613          # (if the path is not absolute).  The absolute path cannot be DOS-style,
18614          # because $ac_f cannot contain `:'.
18615          test -f "$ac_f" ||
18616            case $ac_f in
18617            [\\/$]*) false;;
18618            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18619            esac ||
18620            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18621       esac
18622       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18623       as_fn_append ac_file_inputs " '$ac_f'"
18624     done
18625
18626     # Let's still pretend it is `configure' which instantiates (i.e., don't
18627     # use $as_me), people would be surprised to read:
18628     #    /* config.h.  Generated by config.status.  */
18629     configure_input='Generated from '`
18630           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18631         `' by configure.'
18632     if test x"$ac_file" != x-; then
18633       configure_input="$ac_file.  $configure_input"
18634       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18635 $as_echo "$as_me: creating $ac_file" >&6;}
18636     fi
18637     # Neutralize special characters interpreted by sed in replacement strings.
18638     case $configure_input in #(
18639     *\&* | *\|* | *\\* )
18640        ac_sed_conf_input=`$as_echo "$configure_input" |
18641        sed 's/[\\\\&|]/\\\\&/g'`;; #(
18642     *) ac_sed_conf_input=$configure_input;;
18643     esac
18644
18645     case $ac_tag in
18646     *:-:* | *:-) cat >"$tmp/stdin" \
18647       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
18648     esac
18649     ;;
18650   esac
18651
18652   ac_dir=`$as_dirname -- "$ac_file" ||
18653 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18654          X"$ac_file" : 'X\(//\)[^/]' \| \
18655          X"$ac_file" : 'X\(//\)$' \| \
18656          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18657 $as_echo X"$ac_file" |
18658     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18659             s//\1/
18660             q
18661           }
18662           /^X\(\/\/\)[^/].*/{
18663             s//\1/
18664             q
18665           }
18666           /^X\(\/\/\)$/{
18667             s//\1/
18668             q
18669           }
18670           /^X\(\/\).*/{
18671             s//\1/
18672             q
18673           }
18674           s/.*/./; q'`
18675   as_dir="$ac_dir"; as_fn_mkdir_p
18676   ac_builddir=.
18677
18678 case "$ac_dir" in
18679 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18680 *)
18681   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18682   # A ".." for each directory in $ac_dir_suffix.
18683   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18684   case $ac_top_builddir_sub in
18685   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18686   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18687   esac ;;
18688 esac
18689 ac_abs_top_builddir=$ac_pwd
18690 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18691 # for backward compatibility:
18692 ac_top_builddir=$ac_top_build_prefix
18693
18694 case $srcdir in
18695   .)  # We are building in place.
18696     ac_srcdir=.
18697     ac_top_srcdir=$ac_top_builddir_sub
18698     ac_abs_top_srcdir=$ac_pwd ;;
18699   [\\/]* | ?:[\\/]* )  # Absolute name.
18700     ac_srcdir=$srcdir$ac_dir_suffix;
18701     ac_top_srcdir=$srcdir
18702     ac_abs_top_srcdir=$srcdir ;;
18703   *) # Relative name.
18704     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18705     ac_top_srcdir=$ac_top_build_prefix$srcdir
18706     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18707 esac
18708 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18709
18710
18711   case $ac_mode in
18712   :F)
18713   #
18714   # CONFIG_FILE
18715   #
18716
18717   case $INSTALL in
18718   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18719   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
18720   esac
18721 _ACEOF
18722
18723 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18724 # If the template does not know about datarootdir, expand it.
18725 # FIXME: This hack should be removed a few years after 2.60.
18726 ac_datarootdir_hack=; ac_datarootdir_seen=
18727 ac_sed_dataroot='
18728 /datarootdir/ {
18729   p
18730   q
18731 }
18732 /@datadir@/p
18733 /@docdir@/p
18734 /@infodir@/p
18735 /@localedir@/p
18736 /@mandir@/p'
18737 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18738 *datarootdir*) ac_datarootdir_seen=yes;;
18739 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18740   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18741 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18742 _ACEOF
18743 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18744   ac_datarootdir_hack='
18745   s&@datadir@&$datadir&g
18746   s&@docdir@&$docdir&g
18747   s&@infodir@&$infodir&g
18748   s&@localedir@&$localedir&g
18749   s&@mandir@&$mandir&g
18750   s&\\\${datarootdir}&$datarootdir&g' ;;
18751 esac
18752 _ACEOF
18753
18754 # Neutralize VPATH when `$srcdir' = `.'.
18755 # Shell code in configure.ac might set extrasub.
18756 # FIXME: do we really want to maintain this feature?
18757 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18758 ac_sed_extra="$ac_vpsub
18759 $extrasub
18760 _ACEOF
18761 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18762 :t
18763 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18764 s|@configure_input@|$ac_sed_conf_input|;t t
18765 s&@top_builddir@&$ac_top_builddir_sub&;t t
18766 s&@top_build_prefix@&$ac_top_build_prefix&;t t
18767 s&@srcdir@&$ac_srcdir&;t t
18768 s&@abs_srcdir@&$ac_abs_srcdir&;t t
18769 s&@top_srcdir@&$ac_top_srcdir&;t t
18770 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18771 s&@builddir@&$ac_builddir&;t t
18772 s&@abs_builddir@&$ac_abs_builddir&;t t
18773 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18774 s&@INSTALL@&$ac_INSTALL&;t t
18775 $ac_datarootdir_hack
18776 "
18777 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18778 if $ac_cs_awk_getline; then
18779   $AWK -f "$tmp/subs.awk"
18780 else
18781   $AWK -f "$tmp/subs.awk" | $SHELL
18782 fi >$tmp/out \
18783   || as_fn_error "could not create $ac_file" "$LINENO" 5
18784
18785 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18786   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18787   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18788   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18789 which seems to be undefined.  Please make sure it is defined." >&5
18790 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18791 which seems to be undefined.  Please make sure it is defined." >&2;}
18792
18793   rm -f "$tmp/stdin"
18794   case $ac_file in
18795   -) cat "$tmp/out" && rm -f "$tmp/out";;
18796   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
18797   esac \
18798   || as_fn_error "could not create $ac_file" "$LINENO" 5
18799  ;;
18800   :H)
18801   #
18802   # CONFIG_HEADER
18803   #
18804   if test x"$ac_file" != x-; then
18805     {
18806       $as_echo "/* $configure_input  */" \
18807       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
18808     } >"$tmp/config.h" \
18809       || as_fn_error "could not create $ac_file" "$LINENO" 5
18810     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
18811       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18812 $as_echo "$as_me: $ac_file is unchanged" >&6;}
18813     else
18814       rm -f "$ac_file"
18815       mv "$tmp/config.h" "$ac_file" \
18816         || as_fn_error "could not create $ac_file" "$LINENO" 5
18817     fi
18818   else
18819     $as_echo "/* $configure_input  */" \
18820       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
18821       || as_fn_error "could not create -" "$LINENO" 5
18822   fi
18823  ;;
18824   :L)
18825   #
18826   # CONFIG_LINK
18827   #
18828
18829   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18830     :
18831   else
18832     # Prefer the file from the source tree if names are identical.
18833     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18834       ac_source=$srcdir/$ac_source
18835     fi
18836
18837     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18838 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
18839
18840     if test ! -r "$ac_source"; then
18841       as_fn_error "$ac_source: file not found" "$LINENO" 5
18842     fi
18843     rm -f "$ac_file"
18844
18845     # Try a relative symlink, then a hard link, then a copy.
18846     case $srcdir in
18847     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18848         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18849     esac
18850     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18851       ln "$ac_source" "$ac_file" 2>/dev/null ||
18852       cp -p "$ac_source" "$ac_file" ||
18853       as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18854   fi
18855  ;;
18856   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18857 $as_echo "$as_me: executing $ac_file commands" >&6;}
18858  ;;
18859   esac
18860
18861
18862   case $ac_file$ac_mode in
18863     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
18864     "gcore":F) chmod +x gcore ;;
18865     "Makefile":F)
18866 case x$CONFIG_HEADERS in
18867 xconfig.h:config.in)
18868 echo > stamp-h ;;
18869 esac
18870  ;;
18871     "gdb-gdb.gdb":F)
18872 case x$CONFIG_HEADERS in
18873 xconfig.h:config.in)
18874 echo > stamp-h ;;
18875 esac
18876  ;;
18877     "doc/Makefile":F)
18878 case x$CONFIG_HEADERS in
18879 xconfig.h:config.in)
18880 echo > stamp-h ;;
18881 esac
18882  ;;
18883     "data-directory/Makefile":F)
18884 case x$CONFIG_HEADERS in
18885 xconfig.h:config.in)
18886 echo > stamp-h ;;
18887 esac
18888  ;;
18889
18890   esac
18891 done # for ac_tag
18892
18893
18894 as_fn_exit 0
18895 _ACEOF
18896 ac_clean_files=$ac_clean_files_save
18897
18898 test $ac_write_fail = 0 ||
18899   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
18900
18901
18902 # configure is writing to config.log, and then calls config.status.
18903 # config.status does its own redirection, appending to config.log.
18904 # Unfortunately, on DOS this fails, as config.log is still kept open
18905 # by configure, so config.status won't be able to write to it; its
18906 # output is simply discarded.  So we exec the FD to /dev/null,
18907 # effectively closing config.log, so it can be properly (re)opened and
18908 # appended to by config.status.  When coming back to configure, we
18909 # need to make the FD available again.
18910 if test "$no_create" != yes; then
18911   ac_cs_success=:
18912   ac_config_status_args=
18913   test "$silent" = yes &&
18914     ac_config_status_args="$ac_config_status_args --quiet"
18915   exec 5>/dev/null
18916   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18917   exec 5>>config.log
18918   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18919   # would make configure fail if this is the last instruction.
18920   $ac_cs_success || as_fn_exit $?
18921 fi
18922
18923 #
18924 # CONFIG_SUBDIRS section.
18925 #
18926 if test "$no_recursion" != yes; then
18927
18928   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
18929   # so they do not pile up.
18930   ac_sub_configure_args=
18931   ac_prev=
18932   eval "set x $ac_configure_args"
18933   shift
18934   for ac_arg
18935   do
18936     if test -n "$ac_prev"; then
18937       ac_prev=
18938       continue
18939     fi
18940     case $ac_arg in
18941     -cache-file | --cache-file | --cache-fil | --cache-fi \
18942     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
18943       ac_prev=cache_file ;;
18944     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
18945     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
18946     | --c=*)
18947       ;;
18948     --config-cache | -C)
18949       ;;
18950     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
18951       ac_prev=srcdir ;;
18952     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
18953       ;;
18954     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
18955       ac_prev=prefix ;;
18956     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
18957       ;;
18958     --disable-option-checking)
18959       ;;
18960     *)
18961       case $ac_arg in
18962       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
18963       esac
18964       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
18965     esac
18966   done
18967
18968   # Always prepend --prefix to ensure using the same prefix
18969   # in subdir configurations.
18970   ac_arg="--prefix=$prefix"
18971   case $ac_arg in
18972   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
18973   esac
18974   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18975
18976   # Pass --silent
18977   if test "$silent" = yes; then
18978     ac_sub_configure_args="--silent $ac_sub_configure_args"
18979   fi
18980
18981   # Always prepend --disable-option-checking to silence warnings, since
18982   # different subdirs can have different --enable and --with options.
18983   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
18984
18985   ac_popdir=`pwd`
18986   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
18987
18988     # Do not complain, so a configure script can configure whichever
18989     # parts of a large source tree are present.
18990     test -d "$srcdir/$ac_dir" || continue
18991
18992     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18993     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18994     $as_echo "$ac_msg" >&6
18995     as_dir="$ac_dir"; as_fn_mkdir_p
18996     ac_builddir=.
18997
18998 case "$ac_dir" in
18999 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19000 *)
19001   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19002   # A ".." for each directory in $ac_dir_suffix.
19003   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19004   case $ac_top_builddir_sub in
19005   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19006   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19007   esac ;;
19008 esac
19009 ac_abs_top_builddir=$ac_pwd
19010 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19011 # for backward compatibility:
19012 ac_top_builddir=$ac_top_build_prefix
19013
19014 case $srcdir in
19015   .)  # We are building in place.
19016     ac_srcdir=.
19017     ac_top_srcdir=$ac_top_builddir_sub
19018     ac_abs_top_srcdir=$ac_pwd ;;
19019   [\\/]* | ?:[\\/]* )  # Absolute name.
19020     ac_srcdir=$srcdir$ac_dir_suffix;
19021     ac_top_srcdir=$srcdir
19022     ac_abs_top_srcdir=$srcdir ;;
19023   *) # Relative name.
19024     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19025     ac_top_srcdir=$ac_top_build_prefix$srcdir
19026     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19027 esac
19028 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19029
19030
19031     cd "$ac_dir"
19032
19033     # Check for guested configure; otherwise get Cygnus style configure.
19034     if test -f "$ac_srcdir/configure.gnu"; then
19035       ac_sub_configure=$ac_srcdir/configure.gnu
19036     elif test -f "$ac_srcdir/configure"; then
19037       ac_sub_configure=$ac_srcdir/configure
19038     elif test -f "$ac_srcdir/configure.in"; then
19039       # This should be Cygnus configure.
19040       ac_sub_configure=$ac_aux_dir/configure
19041     else
19042       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19043 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
19044       ac_sub_configure=
19045     fi
19046
19047     # The recursion is here.
19048     if test -n "$ac_sub_configure"; then
19049       # Make the cache file name correct relative to the subdirectory.
19050       case $cache_file in
19051       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
19052       *) # Relative name.
19053         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
19054       esac
19055
19056       { $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
19057 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
19058       # The eval makes quoting arguments work.
19059       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19060            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
19061         as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
19062     fi
19063
19064     cd "$ac_popdir"
19065   done
19066 fi
19067 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19068   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19069 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19070 fi
19071