Define _KMEMUSER before including BSD kernel headers.
[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 HAVE_NATIVE_GCORE_HOST
602 NAT_GENERATED_FILES
603 XM_CLIBS
604 MH_CFLAGS
605 LOADLIBES
606 NAT_CDEPS
607 NATDEPFILES
608 NAT_FILE
609 target_subdir
610 CONFIG_UNINSTALL
611 CONFIG_INSTALL
612 CONFIG_CLEAN
613 CONFIG_ALL
614 CONFIG_SRCS
615 CONFIG_DEPS
616 CONFIG_OBS
617 PROFILE_CFLAGS
618 ENABLE_CFLAGS
619 SIM_OBS
620 SIM
621 XMKMF
622 GDBTK_SRC_DIR
623 GDBTK_CFLAGS
624 GDBTKLIBS
625 X_LIBS
626 X_LDFLAGS
627 X_CFLAGS
628 TK_XINCLUDES
629 TK_DEPS
630 TK_LIBRARY
631 TK_INCLUDE
632 TK_STUB_LIB_SPEC
633 TK_STUB_LIB_FLAG
634 TK_STUB_LIB_FILE
635 TK_LIB_SPEC
636 TK_LIB_FLAG
637 TK_LIB_FILE
638 TK_SRC_DIR
639 TK_BIN_DIR
640 TK_VERSION
641 TCL_DEPS
642 TCL_LIBRARY
643 TCL_INCLUDE
644 TCL_STUB_LIB_SPEC
645 TCL_STUB_LIB_FLAG
646 TCL_STUB_LIB_FILE
647 TCL_LIB_SPEC
648 TCL_LIB_FLAG
649 TCL_LIB_FILE
650 TCL_SRC_DIR
651 TCL_BIN_DIR
652 TCL_PATCH_LEVEL
653 TCL_VERSION
654 WIN32LDAPP
655 GUI_CFLAGS_X
656 LIBGUI
657 LTLIBLZMA
658 LIBLZMA
659 HAVE_LIBLZMA
660 WIN32LIBS
661 SER_HARDWIRE
662 WERROR_CFLAGS
663 WARN_CFLAGS
664 SYSTEM_GDBINIT
665 TARGET_SYSTEM_ROOT
666 CONFIG_LDFLAGS
667 RDYNAMIC
668 ALLOCA
669 LTLIBIPT
670 LIBIPT
671 HAVE_LIBIPT
672 HAVE_GUILE_FALSE
673 HAVE_GUILE_TRUE
674 GUILE_LIBS
675 GUILE_CPPFLAGS
676 GUILD_TARGET_FLAG
677 GUILD
678 pkg_config_prog_path
679 HAVE_PYTHON_FALSE
680 HAVE_PYTHON_TRUE
681 PYTHON_LIBS
682 PYTHON_CPPFLAGS
683 PYTHON_CFLAGS
684 python_prog_path
685 LTLIBEXPAT
686 LIBEXPAT
687 HAVE_LIBEXPAT
688 JIT_READER_DIR
689 TARGET_PTR
690 READLINE_TEXI_INCFLAG
691 READLINE_CFLAGS
692 READLINE_DEPS
693 READLINE
694 LTLIBICONV
695 LIBICONV
696 zlibinc
697 zlibdir
698 MIG
699 WINDRES
700 DLLTOOL
701 AR
702 YFLAGS
703 YACC
704 RANLIB
705 LN_S
706 INSTALL_DATA
707 INSTALL_SCRIPT
708 INSTALL_PROGRAM
709 AWK
710 REPORT_BUGS_TEXI
711 REPORT_BUGS_TO
712 PKGVERSION
713 HAVE_NATIVE_GCORE_TARGET
714 TARGET_OBS
715 subdirs
716 GDB_DATADIR
717 DEBUGDIR
718 MAKEINFO_EXTRA_FLAGS
719 MAKEINFOFLAGS
720 MAKEINFO
721 PACKAGE
722 GNULIB_STDINT_H
723 CATOBJEXT
724 GENCAT
725 INSTOBJEXT
726 DATADIRNAME
727 CATALOGS
728 POSUB
729 GMSGFMT
730 XGETTEXT
731 INCINTL
732 LIBINTL_DEP
733 LIBINTL
734 USE_NLS
735 CCDEPMODE
736 DEPDIR
737 am__leading_dot
738 CXX_DIALECT
739 HAVE_CXX11
740 INSTALL_STRIP_PROGRAM
741 STRIP
742 install_sh
743 target_os
744 target_vendor
745 target_cpu
746 target
747 host_os
748 host_vendor
749 host_cpu
750 host
751 build_os
752 build_vendor
753 build_cpu
754 build
755 EGREP
756 GREP
757 CPP
758 ac_ct_CXX
759 CXXFLAGS
760 CXX
761 OBJEXT
762 EXEEXT
763 ac_ct_CC
764 CPPFLAGS
765 LDFLAGS
766 CFLAGS
767 CC
768 MAINT
769 MAINTAINER_MODE_FALSE
770 MAINTAINER_MODE_TRUE
771 target_alias
772 host_alias
773 build_alias
774 LIBS
775 ECHO_T
776 ECHO_N
777 ECHO_C
778 DEFS
779 mandir
780 localedir
781 libdir
782 psdir
783 pdfdir
784 dvidir
785 htmldir
786 infodir
787 docdir
788 oldincludedir
789 includedir
790 localstatedir
791 sharedstatedir
792 sysconfdir
793 datadir
794 datarootdir
795 libexecdir
796 sbindir
797 bindir
798 program_transform_name
799 prefix
800 exec_prefix
801 PACKAGE_URL
802 PACKAGE_BUGREPORT
803 PACKAGE_STRING
804 PACKAGE_VERSION
805 PACKAGE_TARNAME
806 PACKAGE_NAME
807 PATH_SEPARATOR
808 SHELL'
809 ac_subst_files='nat_makefile_frag'
810 ac_user_opts='
811 enable_option_checking
812 enable_maintainer_mode
813 enable_plugins
814 enable_largefile
815 with_separate_debug_dir
816 with_gdb_datadir
817 with_relocated_sources
818 with_auto_load_dir
819 with_auto_load_safe_path
820 enable_targets
821 enable_64_bit_bfd
822 enable_gdbcli
823 enable_gdbmi
824 enable_tui
825 enable_gdbtk
826 with_libunwind_ia64
827 with_curses
828 enable_profiling
829 with_pkgversion
830 with_bugurl
831 with_system_zlib
832 with_gnu_ld
833 enable_rpath
834 with_libiconv_prefix
835 with_iconv_bin
836 with_system_readline
837 with_jit_reader_dir
838 with_expat
839 with_libexpat_prefix
840 with_python
841 with_guile
842 enable_libmcheck
843 with_intel_pt
844 with_libipt_prefix
845 with_included_regex
846 with_sysroot
847 with_system_gdbinit
848 enable_werror
849 enable_build_warnings
850 enable_gdb_build_warnings
851 with_lzma
852 with_liblzma_prefix
853 with_tcl
854 with_tk
855 with_x
856 enable_sim
857 enable_multi_ice
858 enable_gdbserver
859 with_babeltrace
860 with_libbabeltrace_prefix
861 '
862       ac_precious_vars='build_alias
863 host_alias
864 target_alias
865 CC
866 CFLAGS
867 LDFLAGS
868 LIBS
869 CPPFLAGS
870 CXX
871 CXXFLAGS
872 CCC
873 CPP
874 MAKEINFO
875 MAKEINFOFLAGS
876 YACC
877 YFLAGS
878 XMKMF'
879 ac_subdirs_all='testsuite
880 gdbtk
881 multi-ice
882 gdbserver'
883
884 # Initialize some variables set by options.
885 ac_init_help=
886 ac_init_version=false
887 ac_unrecognized_opts=
888 ac_unrecognized_sep=
889 # The variables have the same names as the options, with
890 # dashes changed to underlines.
891 cache_file=/dev/null
892 exec_prefix=NONE
893 no_create=
894 no_recursion=
895 prefix=NONE
896 program_prefix=NONE
897 program_suffix=NONE
898 program_transform_name=s,x,x,
899 silent=
900 site=
901 srcdir=
902 verbose=
903 x_includes=NONE
904 x_libraries=NONE
905
906 # Installation directory options.
907 # These are left unexpanded so users can "make install exec_prefix=/foo"
908 # and all the variables that are supposed to be based on exec_prefix
909 # by default will actually change.
910 # Use braces instead of parens because sh, perl, etc. also accept them.
911 # (The list follows the same order as the GNU Coding Standards.)
912 bindir='${exec_prefix}/bin'
913 sbindir='${exec_prefix}/sbin'
914 libexecdir='${exec_prefix}/libexec'
915 datarootdir='${prefix}/share'
916 datadir='${datarootdir}'
917 sysconfdir='${prefix}/etc'
918 sharedstatedir='${prefix}/com'
919 localstatedir='${prefix}/var'
920 includedir='${prefix}/include'
921 oldincludedir='/usr/include'
922 docdir='${datarootdir}/doc/${PACKAGE}'
923 infodir='${datarootdir}/info'
924 htmldir='${docdir}'
925 dvidir='${docdir}'
926 pdfdir='${docdir}'
927 psdir='${docdir}'
928 libdir='${exec_prefix}/lib'
929 localedir='${datarootdir}/locale'
930 mandir='${datarootdir}/man'
931
932 ac_prev=
933 ac_dashdash=
934 for ac_option
935 do
936   # If the previous option needs an argument, assign it.
937   if test -n "$ac_prev"; then
938     eval $ac_prev=\$ac_option
939     ac_prev=
940     continue
941   fi
942
943   case $ac_option in
944   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
945   *)    ac_optarg=yes ;;
946   esac
947
948   # Accept the important Cygnus configure options, so we can diagnose typos.
949
950   case $ac_dashdash$ac_option in
951   --)
952     ac_dashdash=yes ;;
953
954   -bindir | --bindir | --bindi | --bind | --bin | --bi)
955     ac_prev=bindir ;;
956   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
957     bindir=$ac_optarg ;;
958
959   -build | --build | --buil | --bui | --bu)
960     ac_prev=build_alias ;;
961   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
962     build_alias=$ac_optarg ;;
963
964   -cache-file | --cache-file | --cache-fil | --cache-fi \
965   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
966     ac_prev=cache_file ;;
967   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
968   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
969     cache_file=$ac_optarg ;;
970
971   --config-cache | -C)
972     cache_file=config.cache ;;
973
974   -datadir | --datadir | --datadi | --datad)
975     ac_prev=datadir ;;
976   -datadir=* | --datadir=* | --datadi=* | --datad=*)
977     datadir=$ac_optarg ;;
978
979   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
980   | --dataroo | --dataro | --datar)
981     ac_prev=datarootdir ;;
982   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
983   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
984     datarootdir=$ac_optarg ;;
985
986   -disable-* | --disable-*)
987     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
988     # Reject names that are not valid shell variable names.
989     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
990       as_fn_error "invalid feature name: $ac_useropt"
991     ac_useropt_orig=$ac_useropt
992     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
993     case $ac_user_opts in
994       *"
995 "enable_$ac_useropt"
996 "*) ;;
997       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
998          ac_unrecognized_sep=', ';;
999     esac
1000     eval enable_$ac_useropt=no ;;
1001
1002   -docdir | --docdir | --docdi | --doc | --do)
1003     ac_prev=docdir ;;
1004   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1005     docdir=$ac_optarg ;;
1006
1007   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1008     ac_prev=dvidir ;;
1009   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1010     dvidir=$ac_optarg ;;
1011
1012   -enable-* | --enable-*)
1013     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1014     # Reject names that are not valid shell variable names.
1015     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1016       as_fn_error "invalid feature name: $ac_useropt"
1017     ac_useropt_orig=$ac_useropt
1018     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1019     case $ac_user_opts in
1020       *"
1021 "enable_$ac_useropt"
1022 "*) ;;
1023       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1024          ac_unrecognized_sep=', ';;
1025     esac
1026     eval enable_$ac_useropt=\$ac_optarg ;;
1027
1028   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1029   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1030   | --exec | --exe | --ex)
1031     ac_prev=exec_prefix ;;
1032   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1033   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1034   | --exec=* | --exe=* | --ex=*)
1035     exec_prefix=$ac_optarg ;;
1036
1037   -gas | --gas | --ga | --g)
1038     # Obsolete; use --with-gas.
1039     with_gas=yes ;;
1040
1041   -help | --help | --hel | --he | -h)
1042     ac_init_help=long ;;
1043   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1044     ac_init_help=recursive ;;
1045   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1046     ac_init_help=short ;;
1047
1048   -host | --host | --hos | --ho)
1049     ac_prev=host_alias ;;
1050   -host=* | --host=* | --hos=* | --ho=*)
1051     host_alias=$ac_optarg ;;
1052
1053   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1054     ac_prev=htmldir ;;
1055   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1056   | --ht=*)
1057     htmldir=$ac_optarg ;;
1058
1059   -includedir | --includedir | --includedi | --included | --include \
1060   | --includ | --inclu | --incl | --inc)
1061     ac_prev=includedir ;;
1062   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1063   | --includ=* | --inclu=* | --incl=* | --inc=*)
1064     includedir=$ac_optarg ;;
1065
1066   -infodir | --infodir | --infodi | --infod | --info | --inf)
1067     ac_prev=infodir ;;
1068   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1069     infodir=$ac_optarg ;;
1070
1071   -libdir | --libdir | --libdi | --libd)
1072     ac_prev=libdir ;;
1073   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1074     libdir=$ac_optarg ;;
1075
1076   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1077   | --libexe | --libex | --libe)
1078     ac_prev=libexecdir ;;
1079   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1080   | --libexe=* | --libex=* | --libe=*)
1081     libexecdir=$ac_optarg ;;
1082
1083   -localedir | --localedir | --localedi | --localed | --locale)
1084     ac_prev=localedir ;;
1085   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1086     localedir=$ac_optarg ;;
1087
1088   -localstatedir | --localstatedir | --localstatedi | --localstated \
1089   | --localstate | --localstat | --localsta | --localst | --locals)
1090     ac_prev=localstatedir ;;
1091   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1092   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1093     localstatedir=$ac_optarg ;;
1094
1095   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1096     ac_prev=mandir ;;
1097   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1098     mandir=$ac_optarg ;;
1099
1100   -nfp | --nfp | --nf)
1101     # Obsolete; use --without-fp.
1102     with_fp=no ;;
1103
1104   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1105   | --no-cr | --no-c | -n)
1106     no_create=yes ;;
1107
1108   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1109   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1110     no_recursion=yes ;;
1111
1112   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1113   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1114   | --oldin | --oldi | --old | --ol | --o)
1115     ac_prev=oldincludedir ;;
1116   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1117   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1118   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1119     oldincludedir=$ac_optarg ;;
1120
1121   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1122     ac_prev=prefix ;;
1123   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1124     prefix=$ac_optarg ;;
1125
1126   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1127   | --program-pre | --program-pr | --program-p)
1128     ac_prev=program_prefix ;;
1129   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1130   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1131     program_prefix=$ac_optarg ;;
1132
1133   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1134   | --program-suf | --program-su | --program-s)
1135     ac_prev=program_suffix ;;
1136   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1137   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1138     program_suffix=$ac_optarg ;;
1139
1140   -program-transform-name | --program-transform-name \
1141   | --program-transform-nam | --program-transform-na \
1142   | --program-transform-n | --program-transform- \
1143   | --program-transform | --program-transfor \
1144   | --program-transfo | --program-transf \
1145   | --program-trans | --program-tran \
1146   | --progr-tra | --program-tr | --program-t)
1147     ac_prev=program_transform_name ;;
1148   -program-transform-name=* | --program-transform-name=* \
1149   | --program-transform-nam=* | --program-transform-na=* \
1150   | --program-transform-n=* | --program-transform-=* \
1151   | --program-transform=* | --program-transfor=* \
1152   | --program-transfo=* | --program-transf=* \
1153   | --program-trans=* | --program-tran=* \
1154   | --progr-tra=* | --program-tr=* | --program-t=*)
1155     program_transform_name=$ac_optarg ;;
1156
1157   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1158     ac_prev=pdfdir ;;
1159   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1160     pdfdir=$ac_optarg ;;
1161
1162   -psdir | --psdir | --psdi | --psd | --ps)
1163     ac_prev=psdir ;;
1164   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1165     psdir=$ac_optarg ;;
1166
1167   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1168   | -silent | --silent | --silen | --sile | --sil)
1169     silent=yes ;;
1170
1171   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1172     ac_prev=sbindir ;;
1173   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1174   | --sbi=* | --sb=*)
1175     sbindir=$ac_optarg ;;
1176
1177   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1178   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1179   | --sharedst | --shareds | --shared | --share | --shar \
1180   | --sha | --sh)
1181     ac_prev=sharedstatedir ;;
1182   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1183   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1184   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1185   | --sha=* | --sh=*)
1186     sharedstatedir=$ac_optarg ;;
1187
1188   -site | --site | --sit)
1189     ac_prev=site ;;
1190   -site=* | --site=* | --sit=*)
1191     site=$ac_optarg ;;
1192
1193   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1194     ac_prev=srcdir ;;
1195   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1196     srcdir=$ac_optarg ;;
1197
1198   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1199   | --syscon | --sysco | --sysc | --sys | --sy)
1200     ac_prev=sysconfdir ;;
1201   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1202   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1203     sysconfdir=$ac_optarg ;;
1204
1205   -target | --target | --targe | --targ | --tar | --ta | --t)
1206     ac_prev=target_alias ;;
1207   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1208     target_alias=$ac_optarg ;;
1209
1210   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1211     verbose=yes ;;
1212
1213   -version | --version | --versio | --versi | --vers | -V)
1214     ac_init_version=: ;;
1215
1216   -with-* | --with-*)
1217     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1218     # Reject names that are not valid shell variable names.
1219     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1220       as_fn_error "invalid package name: $ac_useropt"
1221     ac_useropt_orig=$ac_useropt
1222     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223     case $ac_user_opts in
1224       *"
1225 "with_$ac_useropt"
1226 "*) ;;
1227       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1228          ac_unrecognized_sep=', ';;
1229     esac
1230     eval with_$ac_useropt=\$ac_optarg ;;
1231
1232   -without-* | --without-*)
1233     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1234     # Reject names that are not valid shell variable names.
1235     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1236       as_fn_error "invalid package name: $ac_useropt"
1237     ac_useropt_orig=$ac_useropt
1238     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1239     case $ac_user_opts in
1240       *"
1241 "with_$ac_useropt"
1242 "*) ;;
1243       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1244          ac_unrecognized_sep=', ';;
1245     esac
1246     eval with_$ac_useropt=no ;;
1247
1248   --x)
1249     # Obsolete; use --with-x.
1250     with_x=yes ;;
1251
1252   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1253   | --x-incl | --x-inc | --x-in | --x-i)
1254     ac_prev=x_includes ;;
1255   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1256   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1257     x_includes=$ac_optarg ;;
1258
1259   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1260   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1261     ac_prev=x_libraries ;;
1262   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1263   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1264     x_libraries=$ac_optarg ;;
1265
1266   -*) as_fn_error "unrecognized option: \`$ac_option'
1267 Try \`$0 --help' for more information."
1268     ;;
1269
1270   *=*)
1271     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1272     # Reject names that are not valid shell variable names.
1273     case $ac_envvar in #(
1274       '' | [0-9]* | *[!_$as_cr_alnum]* )
1275       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1276     esac
1277     eval $ac_envvar=\$ac_optarg
1278     export $ac_envvar ;;
1279
1280   *)
1281     # FIXME: should be removed in autoconf 3.0.
1282     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1283     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1284       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1285     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1286     ;;
1287
1288   esac
1289 done
1290
1291 if test -n "$ac_prev"; then
1292   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1293   as_fn_error "missing argument to $ac_option"
1294 fi
1295
1296 if test -n "$ac_unrecognized_opts"; then
1297   case $enable_option_checking in
1298     no) ;;
1299     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1300     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1301   esac
1302 fi
1303
1304 # Check all directory arguments for consistency.
1305 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1306                 datadir sysconfdir sharedstatedir localstatedir includedir \
1307                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1308                 libdir localedir mandir
1309 do
1310   eval ac_val=\$$ac_var
1311   # Remove trailing slashes.
1312   case $ac_val in
1313     */ )
1314       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1315       eval $ac_var=\$ac_val;;
1316   esac
1317   # Be sure to have absolute directory names.
1318   case $ac_val in
1319     [\\/$]* | ?:[\\/]* )  continue;;
1320     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1321   esac
1322   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1323 done
1324
1325 # There might be people who depend on the old broken behavior: `$host'
1326 # used to hold the argument of --host etc.
1327 # FIXME: To remove some day.
1328 build=$build_alias
1329 host=$host_alias
1330 target=$target_alias
1331
1332 # FIXME: To remove some day.
1333 if test "x$host_alias" != x; then
1334   if test "x$build_alias" = x; then
1335     cross_compiling=maybe
1336     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1337     If a cross compiler is detected then cross compile mode will be used." >&2
1338   elif test "x$build_alias" != "x$host_alias"; then
1339     cross_compiling=yes
1340   fi
1341 fi
1342
1343 ac_tool_prefix=
1344 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1345
1346 test "$silent" = yes && exec 6>/dev/null
1347
1348
1349 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1350 ac_ls_di=`ls -di .` &&
1351 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1352   as_fn_error "working directory cannot be determined"
1353 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1354   as_fn_error "pwd does not report name of working directory"
1355
1356
1357 # Find the source files, if location was not specified.
1358 if test -z "$srcdir"; then
1359   ac_srcdir_defaulted=yes
1360   # Try the directory containing this script, then the parent directory.
1361   ac_confdir=`$as_dirname -- "$as_myself" ||
1362 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1363          X"$as_myself" : 'X\(//\)[^/]' \| \
1364          X"$as_myself" : 'X\(//\)$' \| \
1365          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1366 $as_echo X"$as_myself" |
1367     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1368             s//\1/
1369             q
1370           }
1371           /^X\(\/\/\)[^/].*/{
1372             s//\1/
1373             q
1374           }
1375           /^X\(\/\/\)$/{
1376             s//\1/
1377             q
1378           }
1379           /^X\(\/\).*/{
1380             s//\1/
1381             q
1382           }
1383           s/.*/./; q'`
1384   srcdir=$ac_confdir
1385   if test ! -r "$srcdir/$ac_unique_file"; then
1386     srcdir=..
1387   fi
1388 else
1389   ac_srcdir_defaulted=no
1390 fi
1391 if test ! -r "$srcdir/$ac_unique_file"; then
1392   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1393   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1394 fi
1395 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1396 ac_abs_confdir=`(
1397         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1398         pwd)`
1399 # When building in place, set srcdir=.
1400 if test "$ac_abs_confdir" = "$ac_pwd"; then
1401   srcdir=.
1402 fi
1403 # Remove unnecessary trailing slashes from srcdir.
1404 # Double slashes in file names in object file debugging info
1405 # mess up M-x gdb in Emacs.
1406 case $srcdir in
1407 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1408 esac
1409 for ac_var in $ac_precious_vars; do
1410   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1411   eval ac_env_${ac_var}_value=\$${ac_var}
1412   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1413   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1414 done
1415
1416 #
1417 # Report the --help message.
1418 #
1419 if test "$ac_init_help" = "long"; then
1420   # Omit some internal or obsolete options to make the list less imposing.
1421   # This message is too long to be a string in the A/UX 3.1 sh.
1422   cat <<_ACEOF
1423 \`configure' configures this package to adapt to many kinds of systems.
1424
1425 Usage: $0 [OPTION]... [VAR=VALUE]...
1426
1427 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1428 VAR=VALUE.  See below for descriptions of some of the useful variables.
1429
1430 Defaults for the options are specified in brackets.
1431
1432 Configuration:
1433   -h, --help              display this help and exit
1434       --help=short        display options specific to this package
1435       --help=recursive    display the short help of all the included packages
1436   -V, --version           display version information and exit
1437   -q, --quiet, --silent   do not print \`checking...' messages
1438       --cache-file=FILE   cache test results in FILE [disabled]
1439   -C, --config-cache      alias for \`--cache-file=config.cache'
1440   -n, --no-create         do not create output files
1441       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1442
1443 Installation directories:
1444   --prefix=PREFIX         install architecture-independent files in PREFIX
1445                           [$ac_default_prefix]
1446   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1447                           [PREFIX]
1448
1449 By default, \`make install' will install all the files in
1450 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1451 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1452 for instance \`--prefix=\$HOME'.
1453
1454 For better control, use the options below.
1455
1456 Fine tuning of the installation directories:
1457   --bindir=DIR            user executables [EPREFIX/bin]
1458   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1459   --libexecdir=DIR        program executables [EPREFIX/libexec]
1460   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1461   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1462   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1463   --libdir=DIR            object code libraries [EPREFIX/lib]
1464   --includedir=DIR        C header files [PREFIX/include]
1465   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1466   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1467   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1468   --infodir=DIR           info documentation [DATAROOTDIR/info]
1469   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1470   --mandir=DIR            man documentation [DATAROOTDIR/man]
1471   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1472   --htmldir=DIR           html documentation [DOCDIR]
1473   --dvidir=DIR            dvi documentation [DOCDIR]
1474   --pdfdir=DIR            pdf documentation [DOCDIR]
1475   --psdir=DIR             ps documentation [DOCDIR]
1476 _ACEOF
1477
1478   cat <<\_ACEOF
1479
1480 Program names:
1481   --program-prefix=PREFIX            prepend PREFIX to installed program names
1482   --program-suffix=SUFFIX            append SUFFIX to installed program names
1483   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1484
1485 X features:
1486   --x-includes=DIR    X include files are in DIR
1487   --x-libraries=DIR   X library files are in DIR
1488
1489 System types:
1490   --build=BUILD     configure for building on BUILD [guessed]
1491   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1492   --target=TARGET   configure for building compilers for TARGET [HOST]
1493 _ACEOF
1494 fi
1495
1496 if test -n "$ac_init_help"; then
1497
1498   cat <<\_ACEOF
1499
1500 Optional Features:
1501   --disable-option-checking  ignore unrecognized --enable/--with options
1502   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1503   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1504   --enable-maintainer-mode  enable make rules and dependencies not useful
1505                           (and sometimes confusing) to the casual installer
1506   --enable-plugins        Enable support for plugins
1507   --disable-largefile     omit support for large files
1508   --enable-targets=TARGETS
1509                           alternative target configurations
1510   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
1511   --disable-gdbcli        disable command-line interface (CLI)
1512   --disable-gdbmi         disable machine-interface (MI)
1513   --enable-tui            enable full-screen terminal user interface (TUI)
1514   --enable-gdbtk          enable gdbtk graphical user interface (GUI)
1515   --enable-profiling      enable profiling of GDB
1516   --disable-rpath         do not hardcode runtime library paths
1517   --enable-libmcheck      Try linking with -lmcheck if available
1518   --enable-werror         treat compile warnings as errors
1519   --enable-build-warnings enable build-time compiler warnings if gcc is used
1520   --enable-gdb-build-warnings
1521                           enable GDB specific build-time compiler warnings if
1522                           gcc is used
1523   --enable-sim            link gdb with simulator
1524   --enable-multi-ice      build the multi-ice-gdb-server
1525   --enable-gdbserver      automatically build gdbserver (yes/no/auto, default
1526                           is auto)
1527
1528 Optional Packages:
1529   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1530   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1531   --with-separate-debug-dir=PATH
1532                           look for global separate debug info in this path
1533                           [LIBDIR/debug]
1534   --with-gdb-datadir=PATH look for global separate data files in this path
1535                           [DATADIR/gdb]
1536   --with-relocated-sources=PATH
1537                           automatically relocate this path for source files
1538   --with-auto-load-dir=PATH
1539                           directories from which to load auto-loaded scripts
1540                           [$debugdir:$datadir/auto-load]
1541   --with-auto-load-safe-path=PATH
1542                           directories safe to hold auto-loaded files
1543                           [--with-auto-load-dir]
1544   --without-auto-load-safe-path
1545                           do not restrict auto-loaded files locations
1546   --with-libunwind-ia64   use libunwind frame unwinding for ia64 targets
1547   --with-curses           use the curses library instead of the termcap
1548                           library
1549   --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
1550   --with-bugurl=URL       Direct users to URL to report a bug
1551   --with-system-zlib      use installed libz
1552   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1553   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
1554   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
1555   --with-iconv-bin=PATH   specify where to find the iconv program
1556   --with-system-readline  use installed readline library
1557   --with-jit-reader-dir=PATH
1558                           directory to load the JIT readers from
1559   --with-expat            include expat support (auto/yes/no)
1560   --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
1561   --without-libexpat-prefix     don't search for libexpat in includedir and libdir
1562   --with-python[=PYTHON]  include python support
1563                           (auto/yes/no/<python-program>)
1564   --with-guile[=GUILE]    include guile support
1565                           (auto/yes/no/<guile-version>/<pkg-config-program>)
1566   --with-intel-pt         include Intel Processor Trace support (auto/yes/no)
1567   --with-libipt-prefix[=DIR]  search for libipt in DIR/include and DIR/lib
1568   --without-libipt-prefix     don't search for libipt in includedir and libdir
1569   --without-included-regex
1570                           don't use included regex; this is the default on
1571                           systems with version 2 of the GNU C library (use
1572                           with caution on other system)
1573   --with-sysroot[=DIR]    search for usr/lib et al within DIR
1574   --with-system-gdbinit=PATH
1575                           automatically load a system-wide gdbinit file
1576   --with-lzma             support lzma compression (auto/yes/no)
1577   --with-liblzma-prefix[=DIR]  search for liblzma in DIR/include and DIR/lib
1578   --without-liblzma-prefix     don't search for liblzma in includedir and libdir
1579   --with-tcl              directory containing tcl configuration (tclConfig.sh)
1580   --with-tk               directory containing tk configuration (tkConfig.sh)
1581   --with-x                use the X Window System
1582   --with-babeltrace       include babeltrace support (auto/yes/no)
1583   --with-libbabeltrace-prefix[=DIR]  search for libbabeltrace in DIR/include and DIR/lib
1584   --without-libbabeltrace-prefix     don't search for libbabeltrace in includedir and libdir
1585
1586 Some influential environment variables:
1587   CC          C compiler command
1588   CFLAGS      C compiler flags
1589   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1590               nonstandard directory <lib dir>
1591   LIBS        libraries to pass to the linker, e.g. -l<library>
1592   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1593               you have headers in a nonstandard directory <include dir>
1594   CXX         C++ compiler command
1595   CXXFLAGS    C++ compiler flags
1596   CPP         C preprocessor
1597   MAKEINFO    Parent configure detects if it is of sufficient version.
1598   MAKEINFOFLAGS
1599               Parameters for MAKEINFO.
1600   YACC        The `Yet Another C Compiler' implementation to use. Defaults to
1601               the first program found out of: `bison -y', `byacc', `yacc'.
1602   YFLAGS      The list of arguments that will be passed by default to $YACC.
1603               This script will default YFLAGS to the empty string to avoid a
1604               default value of `-d' given by some make applications.
1605   XMKMF       Path to xmkmf, Makefile generator for X Window System
1606
1607 Use these variables to override the choices made by `configure' or to help
1608 it to find libraries and programs with nonstandard names/locations.
1609
1610 Report bugs to the package provider.
1611 _ACEOF
1612 ac_status=$?
1613 fi
1614
1615 if test "$ac_init_help" = "recursive"; then
1616   # If there are subdirs, report their specific --help.
1617   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1618     test -d "$ac_dir" ||
1619       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1620       continue
1621     ac_builddir=.
1622
1623 case "$ac_dir" in
1624 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1625 *)
1626   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1627   # A ".." for each directory in $ac_dir_suffix.
1628   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1629   case $ac_top_builddir_sub in
1630   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1631   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1632   esac ;;
1633 esac
1634 ac_abs_top_builddir=$ac_pwd
1635 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1636 # for backward compatibility:
1637 ac_top_builddir=$ac_top_build_prefix
1638
1639 case $srcdir in
1640   .)  # We are building in place.
1641     ac_srcdir=.
1642     ac_top_srcdir=$ac_top_builddir_sub
1643     ac_abs_top_srcdir=$ac_pwd ;;
1644   [\\/]* | ?:[\\/]* )  # Absolute name.
1645     ac_srcdir=$srcdir$ac_dir_suffix;
1646     ac_top_srcdir=$srcdir
1647     ac_abs_top_srcdir=$srcdir ;;
1648   *) # Relative name.
1649     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1650     ac_top_srcdir=$ac_top_build_prefix$srcdir
1651     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1652 esac
1653 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1654
1655     cd "$ac_dir" || { ac_status=$?; continue; }
1656     # Check for guested configure.
1657     if test -f "$ac_srcdir/configure.gnu"; then
1658       echo &&
1659       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1660     elif test -f "$ac_srcdir/configure"; then
1661       echo &&
1662       $SHELL "$ac_srcdir/configure" --help=recursive
1663     else
1664       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1665     fi || ac_status=$?
1666     cd "$ac_pwd" || { ac_status=$?; break; }
1667   done
1668 fi
1669
1670 test -n "$ac_init_help" && exit $ac_status
1671 if $ac_init_version; then
1672   cat <<\_ACEOF
1673 configure
1674 generated by GNU Autoconf 2.64
1675
1676 Copyright (C) 2009 Free Software Foundation, Inc.
1677 This configure script is free software; the Free Software Foundation
1678 gives unlimited permission to copy, distribute and modify it.
1679 _ACEOF
1680   exit
1681 fi
1682
1683 ## ------------------------ ##
1684 ## Autoconf initialization. ##
1685 ## ------------------------ ##
1686
1687 # ac_fn_c_try_compile LINENO
1688 # --------------------------
1689 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1690 ac_fn_c_try_compile ()
1691 {
1692   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693   rm -f conftest.$ac_objext
1694   if { { ac_try="$ac_compile"
1695 case "(($ac_try" in
1696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697   *) ac_try_echo=$ac_try;;
1698 esac
1699 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700 $as_echo "$ac_try_echo"; } >&5
1701   (eval "$ac_compile") 2>conftest.err
1702   ac_status=$?
1703   if test -s conftest.err; then
1704     grep -v '^ *+' conftest.err >conftest.er1
1705     cat conftest.er1 >&5
1706     mv -f conftest.er1 conftest.err
1707   fi
1708   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709   test $ac_status = 0; } && {
1710          test -z "$ac_c_werror_flag" ||
1711          test ! -s conftest.err
1712        } && test -s conftest.$ac_objext; then :
1713   ac_retval=0
1714 else
1715   $as_echo "$as_me: failed program was:" >&5
1716 sed 's/^/| /' conftest.$ac_ext >&5
1717
1718         ac_retval=1
1719 fi
1720   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1721   return $ac_retval
1722
1723 } # ac_fn_c_try_compile
1724
1725 # ac_fn_cxx_try_compile LINENO
1726 # ----------------------------
1727 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1728 ac_fn_cxx_try_compile ()
1729 {
1730   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1731   rm -f conftest.$ac_objext
1732   if { { ac_try="$ac_compile"
1733 case "(($ac_try" in
1734   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1735   *) ac_try_echo=$ac_try;;
1736 esac
1737 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1738 $as_echo "$ac_try_echo"; } >&5
1739   (eval "$ac_compile") 2>conftest.err
1740   ac_status=$?
1741   if test -s conftest.err; then
1742     grep -v '^ *+' conftest.err >conftest.er1
1743     cat conftest.er1 >&5
1744     mv -f conftest.er1 conftest.err
1745   fi
1746   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1747   test $ac_status = 0; } && {
1748          test -z "$ac_cxx_werror_flag" ||
1749          test ! -s conftest.err
1750        } && test -s conftest.$ac_objext; then :
1751   ac_retval=0
1752 else
1753   $as_echo "$as_me: failed program was:" >&5
1754 sed 's/^/| /' conftest.$ac_ext >&5
1755
1756         ac_retval=1
1757 fi
1758   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1759   return $ac_retval
1760
1761 } # ac_fn_cxx_try_compile
1762
1763 # ac_fn_c_try_cpp LINENO
1764 # ----------------------
1765 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1766 ac_fn_c_try_cpp ()
1767 {
1768   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1769   if { { ac_try="$ac_cpp conftest.$ac_ext"
1770 case "(($ac_try" in
1771   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772   *) ac_try_echo=$ac_try;;
1773 esac
1774 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775 $as_echo "$ac_try_echo"; } >&5
1776   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1777   ac_status=$?
1778   if test -s conftest.err; then
1779     grep -v '^ *+' conftest.err >conftest.er1
1780     cat conftest.er1 >&5
1781     mv -f conftest.er1 conftest.err
1782   fi
1783   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784   test $ac_status = 0; } >/dev/null && {
1785          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1786          test ! -s conftest.err
1787        }; then :
1788   ac_retval=0
1789 else
1790   $as_echo "$as_me: failed program was:" >&5
1791 sed 's/^/| /' conftest.$ac_ext >&5
1792
1793     ac_retval=1
1794 fi
1795   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1796   return $ac_retval
1797
1798 } # ac_fn_c_try_cpp
1799
1800 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1801 # -------------------------------------------------------
1802 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1803 # the include files in INCLUDES and setting the cache variable VAR
1804 # accordingly.
1805 ac_fn_c_check_header_mongrel ()
1806 {
1807   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1809   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1810 $as_echo_n "checking for $2... " >&6; }
1811 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1812   $as_echo_n "(cached) " >&6
1813 fi
1814 eval ac_res=\$$3
1815                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1816 $as_echo "$ac_res" >&6; }
1817 else
1818   # Is the header compilable?
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1820 $as_echo_n "checking $2 usability... " >&6; }
1821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1822 /* end confdefs.h.  */
1823 $4
1824 #include <$2>
1825 _ACEOF
1826 if ac_fn_c_try_compile "$LINENO"; then :
1827   ac_header_compiler=yes
1828 else
1829   ac_header_compiler=no
1830 fi
1831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1833 $as_echo "$ac_header_compiler" >&6; }
1834
1835 # Is the header present?
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1837 $as_echo_n "checking $2 presence... " >&6; }
1838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839 /* end confdefs.h.  */
1840 #include <$2>
1841 _ACEOF
1842 if ac_fn_c_try_cpp "$LINENO"; then :
1843   ac_header_preproc=yes
1844 else
1845   ac_header_preproc=no
1846 fi
1847 rm -f conftest.err conftest.$ac_ext
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1849 $as_echo "$ac_header_preproc" >&6; }
1850
1851 # So?  What about this header?
1852 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1853   yes:no: )
1854     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1855 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1856     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1857 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1858     ;;
1859   no:yes:* )
1860     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1861 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1862     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1863 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1864     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1865 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1867 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1868     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1869 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1870     ;;
1871 esac
1872   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873 $as_echo_n "checking for $2... " >&6; }
1874 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1875   $as_echo_n "(cached) " >&6
1876 else
1877   eval "$3=\$ac_header_compiler"
1878 fi
1879 eval ac_res=\$$3
1880                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881 $as_echo "$ac_res" >&6; }
1882 fi
1883   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1884
1885 } # ac_fn_c_check_header_mongrel
1886
1887 # ac_fn_c_try_run LINENO
1888 # ----------------------
1889 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1890 # that executables *can* be run.
1891 ac_fn_c_try_run ()
1892 {
1893   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894   if { { ac_try="$ac_link"
1895 case "(($ac_try" in
1896   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1897   *) ac_try_echo=$ac_try;;
1898 esac
1899 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1900 $as_echo "$ac_try_echo"; } >&5
1901   (eval "$ac_link") 2>&5
1902   ac_status=$?
1903   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1904   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1905   { { case "(($ac_try" in
1906   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1907   *) ac_try_echo=$ac_try;;
1908 esac
1909 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1910 $as_echo "$ac_try_echo"; } >&5
1911   (eval "$ac_try") 2>&5
1912   ac_status=$?
1913   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1914   test $ac_status = 0; }; }; then :
1915   ac_retval=0
1916 else
1917   $as_echo "$as_me: program exited with status $ac_status" >&5
1918        $as_echo "$as_me: failed program was:" >&5
1919 sed 's/^/| /' conftest.$ac_ext >&5
1920
1921        ac_retval=$ac_status
1922 fi
1923   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1924   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1925   return $ac_retval
1926
1927 } # ac_fn_c_try_run
1928
1929 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1930 # -------------------------------------------------------
1931 # Tests whether HEADER exists and can be compiled using the include files in
1932 # INCLUDES, setting the cache variable VAR accordingly.
1933 ac_fn_c_check_header_compile ()
1934 {
1935   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1937 $as_echo_n "checking for $2... " >&6; }
1938 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1939   $as_echo_n "(cached) " >&6
1940 else
1941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942 /* end confdefs.h.  */
1943 $4
1944 #include <$2>
1945 _ACEOF
1946 if ac_fn_c_try_compile "$LINENO"; then :
1947   eval "$3=yes"
1948 else
1949   eval "$3=no"
1950 fi
1951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1952 fi
1953 eval ac_res=\$$3
1954                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1955 $as_echo "$ac_res" >&6; }
1956   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1957
1958 } # ac_fn_c_check_header_compile
1959
1960 # ac_fn_c_try_link LINENO
1961 # -----------------------
1962 # Try to link conftest.$ac_ext, and return whether this succeeded.
1963 ac_fn_c_try_link ()
1964 {
1965   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1966   rm -f conftest.$ac_objext conftest$ac_exeext
1967   if { { ac_try="$ac_link"
1968 case "(($ac_try" in
1969   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1970   *) ac_try_echo=$ac_try;;
1971 esac
1972 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1973 $as_echo "$ac_try_echo"; } >&5
1974   (eval "$ac_link") 2>conftest.err
1975   ac_status=$?
1976   if test -s conftest.err; then
1977     grep -v '^ *+' conftest.err >conftest.er1
1978     cat conftest.er1 >&5
1979     mv -f conftest.er1 conftest.err
1980   fi
1981   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1982   test $ac_status = 0; } && {
1983          test -z "$ac_c_werror_flag" ||
1984          test ! -s conftest.err
1985        } && test -s conftest$ac_exeext && {
1986          test "$cross_compiling" = yes ||
1987          $as_test_x conftest$ac_exeext
1988        }; then :
1989   ac_retval=0
1990 else
1991   $as_echo "$as_me: failed program was:" >&5
1992 sed 's/^/| /' conftest.$ac_ext >&5
1993
1994         ac_retval=1
1995 fi
1996   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1997   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1998   # interfere with the next link command; also delete a directory that is
1999   # left behind by Apple's compiler.  We do this before executing the actions.
2000   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2001   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2002   return $ac_retval
2003
2004 } # ac_fn_c_try_link
2005
2006 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2007 # --------------------------------------------
2008 # Tries to find the compile-time value of EXPR in a program that includes
2009 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2010 # computed
2011 ac_fn_c_compute_int ()
2012 {
2013   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014   if test "$cross_compiling" = yes; then
2015     # Depending upon the size, compute the lo and hi bounds.
2016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017 /* end confdefs.h.  */
2018 $4
2019 int
2020 main ()
2021 {
2022 static int test_array [1 - 2 * !(($2) >= 0)];
2023 test_array [0] = 0
2024
2025   ;
2026   return 0;
2027 }
2028 _ACEOF
2029 if ac_fn_c_try_compile "$LINENO"; then :
2030   ac_lo=0 ac_mid=0
2031   while :; do
2032     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033 /* end confdefs.h.  */
2034 $4
2035 int
2036 main ()
2037 {
2038 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2039 test_array [0] = 0
2040
2041   ;
2042   return 0;
2043 }
2044 _ACEOF
2045 if ac_fn_c_try_compile "$LINENO"; then :
2046   ac_hi=$ac_mid; break
2047 else
2048   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2049                         if test $ac_lo -le $ac_mid; then
2050                           ac_lo= ac_hi=
2051                           break
2052                         fi
2053                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2054 fi
2055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2056   done
2057 else
2058   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059 /* end confdefs.h.  */
2060 $4
2061 int
2062 main ()
2063 {
2064 static int test_array [1 - 2 * !(($2) < 0)];
2065 test_array [0] = 0
2066
2067   ;
2068   return 0;
2069 }
2070 _ACEOF
2071 if ac_fn_c_try_compile "$LINENO"; then :
2072   ac_hi=-1 ac_mid=-1
2073   while :; do
2074     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075 /* end confdefs.h.  */
2076 $4
2077 int
2078 main ()
2079 {
2080 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2081 test_array [0] = 0
2082
2083   ;
2084   return 0;
2085 }
2086 _ACEOF
2087 if ac_fn_c_try_compile "$LINENO"; then :
2088   ac_lo=$ac_mid; break
2089 else
2090   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2091                         if test $ac_mid -le $ac_hi; then
2092                           ac_lo= ac_hi=
2093                           break
2094                         fi
2095                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2096 fi
2097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098   done
2099 else
2100   ac_lo= ac_hi=
2101 fi
2102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103 fi
2104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2105 # Binary search between lo and hi bounds.
2106 while test "x$ac_lo" != "x$ac_hi"; do
2107   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2108   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109 /* end confdefs.h.  */
2110 $4
2111 int
2112 main ()
2113 {
2114 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2115 test_array [0] = 0
2116
2117   ;
2118   return 0;
2119 }
2120 _ACEOF
2121 if ac_fn_c_try_compile "$LINENO"; then :
2122   ac_hi=$ac_mid
2123 else
2124   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2125 fi
2126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127 done
2128 case $ac_lo in #((
2129 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2130 '') ac_retval=1 ;;
2131 esac
2132   else
2133     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2134 /* end confdefs.h.  */
2135 $4
2136 static long int longval () { return $2; }
2137 static unsigned long int ulongval () { return $2; }
2138 #include <stdio.h>
2139 #include <stdlib.h>
2140 int
2141 main ()
2142 {
2143
2144   FILE *f = fopen ("conftest.val", "w");
2145   if (! f)
2146     return 1;
2147   if (($2) < 0)
2148     {
2149       long int i = longval ();
2150       if (i != ($2))
2151         return 1;
2152       fprintf (f, "%ld", i);
2153     }
2154   else
2155     {
2156       unsigned long int i = ulongval ();
2157       if (i != ($2))
2158         return 1;
2159       fprintf (f, "%lu", i);
2160     }
2161   /* Do not output a trailing newline, as this causes \r\n confusion
2162      on some platforms.  */
2163   return ferror (f) || fclose (f) != 0;
2164
2165   ;
2166   return 0;
2167 }
2168 _ACEOF
2169 if ac_fn_c_try_run "$LINENO"; then :
2170   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2171 else
2172   ac_retval=1
2173 fi
2174 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2175   conftest.$ac_objext conftest.beam conftest.$ac_ext
2176 rm -f conftest.val
2177
2178   fi
2179   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2180   return $ac_retval
2181
2182 } # ac_fn_c_compute_int
2183
2184 # ac_fn_c_check_func LINENO FUNC VAR
2185 # ----------------------------------
2186 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2187 ac_fn_c_check_func ()
2188 {
2189   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2191 $as_echo_n "checking for $2... " >&6; }
2192 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2193   $as_echo_n "(cached) " >&6
2194 else
2195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2196 /* end confdefs.h.  */
2197 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2198    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2199 #define $2 innocuous_$2
2200
2201 /* System header to define __stub macros and hopefully few prototypes,
2202     which can conflict with char $2 (); below.
2203     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2204     <limits.h> exists even on freestanding compilers.  */
2205
2206 #ifdef __STDC__
2207 # include <limits.h>
2208 #else
2209 # include <assert.h>
2210 #endif
2211
2212 #undef $2
2213
2214 /* Override any GCC internal prototype to avoid an error.
2215    Use char because int might match the return type of a GCC
2216    builtin and then its argument prototype would still apply.  */
2217 #ifdef __cplusplus
2218 extern "C"
2219 #endif
2220 char $2 ();
2221 /* The GNU C library defines this for functions which it implements
2222     to always fail with ENOSYS.  Some functions are actually named
2223     something starting with __ and the normal name is an alias.  */
2224 #if defined __stub_$2 || defined __stub___$2
2225 choke me
2226 #endif
2227
2228 int
2229 main ()
2230 {
2231 return $2 ();
2232   ;
2233   return 0;
2234 }
2235 _ACEOF
2236 if ac_fn_c_try_link "$LINENO"; then :
2237   eval "$3=yes"
2238 else
2239   eval "$3=no"
2240 fi
2241 rm -f core conftest.err conftest.$ac_objext \
2242     conftest$ac_exeext conftest.$ac_ext
2243 fi
2244 eval ac_res=\$$3
2245                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2246 $as_echo "$ac_res" >&6; }
2247   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2248
2249 } # ac_fn_c_check_func
2250
2251 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2252 # ----------------------------------------------------
2253 # Tries to find if the field MEMBER exists in type AGGR, after including
2254 # INCLUDES, setting cache variable VAR accordingly.
2255 ac_fn_c_check_member ()
2256 {
2257   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2259 $as_echo_n "checking for $2.$3... " >&6; }
2260 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2261   $as_echo_n "(cached) " >&6
2262 else
2263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264 /* end confdefs.h.  */
2265 $5
2266 int
2267 main ()
2268 {
2269 static $2 ac_aggr;
2270 if (ac_aggr.$3)
2271 return 0;
2272   ;
2273   return 0;
2274 }
2275 _ACEOF
2276 if ac_fn_c_try_compile "$LINENO"; then :
2277   eval "$4=yes"
2278 else
2279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280 /* end confdefs.h.  */
2281 $5
2282 int
2283 main ()
2284 {
2285 static $2 ac_aggr;
2286 if (sizeof ac_aggr.$3)
2287 return 0;
2288   ;
2289   return 0;
2290 }
2291 _ACEOF
2292 if ac_fn_c_try_compile "$LINENO"; then :
2293   eval "$4=yes"
2294 else
2295   eval "$4=no"
2296 fi
2297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2298 fi
2299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2300 fi
2301 eval ac_res=\$$4
2302                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2303 $as_echo "$ac_res" >&6; }
2304   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2305
2306 } # ac_fn_c_check_member
2307
2308 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2309 # -------------------------------------------
2310 # Tests whether TYPE exists after having included INCLUDES, setting cache
2311 # variable VAR accordingly.
2312 ac_fn_c_check_type ()
2313 {
2314   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2315   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2316 $as_echo_n "checking for $2... " >&6; }
2317 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2318   $as_echo_n "(cached) " >&6
2319 else
2320   eval "$3=no"
2321   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322 /* end confdefs.h.  */
2323 $4
2324 int
2325 main ()
2326 {
2327 if (sizeof ($2))
2328          return 0;
2329   ;
2330   return 0;
2331 }
2332 _ACEOF
2333 if ac_fn_c_try_compile "$LINENO"; then :
2334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2335 /* end confdefs.h.  */
2336 $4
2337 int
2338 main ()
2339 {
2340 if (sizeof (($2)))
2341             return 0;
2342   ;
2343   return 0;
2344 }
2345 _ACEOF
2346 if ac_fn_c_try_compile "$LINENO"; then :
2347
2348 else
2349   eval "$3=yes"
2350 fi
2351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2352 fi
2353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354 fi
2355 eval ac_res=\$$3
2356                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2357 $as_echo "$ac_res" >&6; }
2358   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2359
2360 } # ac_fn_c_check_type
2361
2362 # ac_fn_c_check_decl LINENO SYMBOL VAR
2363 # ------------------------------------
2364 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2365 ac_fn_c_check_decl ()
2366 {
2367   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368   as_decl_name=`echo $2|sed 's/ *(.*//'`
2369   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2370   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2371 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2372 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2373   $as_echo_n "(cached) " >&6
2374 else
2375   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376 /* end confdefs.h.  */
2377 $4
2378 int
2379 main ()
2380 {
2381 #ifndef $as_decl_name
2382 #ifdef __cplusplus
2383   (void) $as_decl_use;
2384 #else
2385   (void) $as_decl_name;
2386 #endif
2387 #endif
2388
2389   ;
2390   return 0;
2391 }
2392 _ACEOF
2393 if ac_fn_c_try_compile "$LINENO"; then :
2394   eval "$3=yes"
2395 else
2396   eval "$3=no"
2397 fi
2398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2399 fi
2400 eval ac_res=\$$3
2401                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2402 $as_echo "$ac_res" >&6; }
2403   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2404
2405 } # ac_fn_c_check_decl
2406 cat >config.log <<_ACEOF
2407 This file contains any messages produced by compilers while
2408 running configure, to aid debugging if configure makes a mistake.
2409
2410 It was created by $as_me, which was
2411 generated by GNU Autoconf 2.64.  Invocation command line was
2412
2413   $ $0 $@
2414
2415 _ACEOF
2416 exec 5>>config.log
2417 {
2418 cat <<_ASUNAME
2419 ## --------- ##
2420 ## Platform. ##
2421 ## --------- ##
2422
2423 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2424 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2425 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2426 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2427 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2428
2429 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2430 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2431
2432 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2433 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2434 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2435 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2436 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2437 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2438 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2439
2440 _ASUNAME
2441
2442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443 for as_dir in $PATH
2444 do
2445   IFS=$as_save_IFS
2446   test -z "$as_dir" && as_dir=.
2447     $as_echo "PATH: $as_dir"
2448   done
2449 IFS=$as_save_IFS
2450
2451 } >&5
2452
2453 cat >&5 <<_ACEOF
2454
2455
2456 ## ----------- ##
2457 ## Core tests. ##
2458 ## ----------- ##
2459
2460 _ACEOF
2461
2462
2463 # Keep a trace of the command line.
2464 # Strip out --no-create and --no-recursion so they do not pile up.
2465 # Strip out --silent because we don't want to record it for future runs.
2466 # Also quote any args containing shell meta-characters.
2467 # Make two passes to allow for proper duplicate-argument suppression.
2468 ac_configure_args=
2469 ac_configure_args0=
2470 ac_configure_args1=
2471 ac_must_keep_next=false
2472 for ac_pass in 1 2
2473 do
2474   for ac_arg
2475   do
2476     case $ac_arg in
2477     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2478     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2479     | -silent | --silent | --silen | --sile | --sil)
2480       continue ;;
2481     *\'*)
2482       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2483     esac
2484     case $ac_pass in
2485     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2486     2)
2487       as_fn_append ac_configure_args1 " '$ac_arg'"
2488       if test $ac_must_keep_next = true; then
2489         ac_must_keep_next=false # Got value, back to normal.
2490       else
2491         case $ac_arg in
2492           *=* | --config-cache | -C | -disable-* | --disable-* \
2493           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2494           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2495           | -with-* | --with-* | -without-* | --without-* | --x)
2496             case "$ac_configure_args0 " in
2497               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2498             esac
2499             ;;
2500           -* ) ac_must_keep_next=true ;;
2501         esac
2502       fi
2503       as_fn_append ac_configure_args " '$ac_arg'"
2504       ;;
2505     esac
2506   done
2507 done
2508 { ac_configure_args0=; unset ac_configure_args0;}
2509 { ac_configure_args1=; unset ac_configure_args1;}
2510
2511 # When interrupted or exit'd, cleanup temporary files, and complete
2512 # config.log.  We remove comments because anyway the quotes in there
2513 # would cause problems or look ugly.
2514 # WARNING: Use '\'' to represent an apostrophe within the trap.
2515 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2516 trap 'exit_status=$?
2517   # Save into config.log some information that might help in debugging.
2518   {
2519     echo
2520
2521     cat <<\_ASBOX
2522 ## ---------------- ##
2523 ## Cache variables. ##
2524 ## ---------------- ##
2525 _ASBOX
2526     echo
2527     # The following way of writing the cache mishandles newlines in values,
2528 (
2529   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2530     eval ac_val=\$$ac_var
2531     case $ac_val in #(
2532     *${as_nl}*)
2533       case $ac_var in #(
2534       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2535 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2536       esac
2537       case $ac_var in #(
2538       _ | IFS | as_nl) ;; #(
2539       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2540       *) { eval $ac_var=; unset $ac_var;} ;;
2541       esac ;;
2542     esac
2543   done
2544   (set) 2>&1 |
2545     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2546     *${as_nl}ac_space=\ *)
2547       sed -n \
2548         "s/'\''/'\''\\\\'\'''\''/g;
2549           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2550       ;; #(
2551     *)
2552       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2553       ;;
2554     esac |
2555     sort
2556 )
2557     echo
2558
2559     cat <<\_ASBOX
2560 ## ----------------- ##
2561 ## Output variables. ##
2562 ## ----------------- ##
2563 _ASBOX
2564     echo
2565     for ac_var in $ac_subst_vars
2566     do
2567       eval ac_val=\$$ac_var
2568       case $ac_val in
2569       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2570       esac
2571       $as_echo "$ac_var='\''$ac_val'\''"
2572     done | sort
2573     echo
2574
2575     if test -n "$ac_subst_files"; then
2576       cat <<\_ASBOX
2577 ## ------------------- ##
2578 ## File substitutions. ##
2579 ## ------------------- ##
2580 _ASBOX
2581       echo
2582       for ac_var in $ac_subst_files
2583       do
2584         eval ac_val=\$$ac_var
2585         case $ac_val in
2586         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2587         esac
2588         $as_echo "$ac_var='\''$ac_val'\''"
2589       done | sort
2590       echo
2591     fi
2592
2593     if test -s confdefs.h; then
2594       cat <<\_ASBOX
2595 ## ----------- ##
2596 ## confdefs.h. ##
2597 ## ----------- ##
2598 _ASBOX
2599       echo
2600       cat confdefs.h
2601       echo
2602     fi
2603     test "$ac_signal" != 0 &&
2604       $as_echo "$as_me: caught signal $ac_signal"
2605     $as_echo "$as_me: exit $exit_status"
2606   } >&5
2607   rm -f core *.core core.conftest.* &&
2608     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2609     exit $exit_status
2610 ' 0
2611 for ac_signal in 1 2 13 15; do
2612   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2613 done
2614 ac_signal=0
2615
2616 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2617 rm -f -r conftest* confdefs.h
2618
2619 $as_echo "/* confdefs.h */" > confdefs.h
2620
2621 # Predefined preprocessor variables.
2622
2623 cat >>confdefs.h <<_ACEOF
2624 #define PACKAGE_NAME "$PACKAGE_NAME"
2625 _ACEOF
2626
2627 cat >>confdefs.h <<_ACEOF
2628 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2629 _ACEOF
2630
2631 cat >>confdefs.h <<_ACEOF
2632 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2633 _ACEOF
2634
2635 cat >>confdefs.h <<_ACEOF
2636 #define PACKAGE_STRING "$PACKAGE_STRING"
2637 _ACEOF
2638
2639 cat >>confdefs.h <<_ACEOF
2640 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2641 _ACEOF
2642
2643 cat >>confdefs.h <<_ACEOF
2644 #define PACKAGE_URL "$PACKAGE_URL"
2645 _ACEOF
2646
2647
2648 # Let the site file select an alternate cache file if it wants to.
2649 # Prefer an explicitly selected file to automatically selected ones.
2650 ac_site_file1=NONE
2651 ac_site_file2=NONE
2652 if test -n "$CONFIG_SITE"; then
2653   ac_site_file1=$CONFIG_SITE
2654 elif test "x$prefix" != xNONE; then
2655   ac_site_file1=$prefix/share/config.site
2656   ac_site_file2=$prefix/etc/config.site
2657 else
2658   ac_site_file1=$ac_default_prefix/share/config.site
2659   ac_site_file2=$ac_default_prefix/etc/config.site
2660 fi
2661 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2662 do
2663   test "x$ac_site_file" = xNONE && continue
2664   if test -r "$ac_site_file"; then
2665     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2666 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2667     sed 's/^/| /' "$ac_site_file" >&5
2668     . "$ac_site_file"
2669   fi
2670 done
2671
2672 if test -r "$cache_file"; then
2673   # Some versions of bash will fail to source /dev/null (special
2674   # files actually), so we avoid doing that.
2675   if test -f "$cache_file"; then
2676     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2677 $as_echo "$as_me: loading cache $cache_file" >&6;}
2678     case $cache_file in
2679       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2680       *)                      . "./$cache_file";;
2681     esac
2682   fi
2683 else
2684   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2685 $as_echo "$as_me: creating cache $cache_file" >&6;}
2686   >$cache_file
2687 fi
2688
2689 # Check that the precious variables saved in the cache have kept the same
2690 # value.
2691 ac_cache_corrupted=false
2692 for ac_var in $ac_precious_vars; do
2693   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2694   eval ac_new_set=\$ac_env_${ac_var}_set
2695   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2696   eval ac_new_val=\$ac_env_${ac_var}_value
2697   case $ac_old_set,$ac_new_set in
2698     set,)
2699       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2700 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2701       ac_cache_corrupted=: ;;
2702     ,set)
2703       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2704 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2705       ac_cache_corrupted=: ;;
2706     ,);;
2707     *)
2708       if test "x$ac_old_val" != "x$ac_new_val"; then
2709         # differences in whitespace do not lead to failure.
2710         ac_old_val_w=`echo x $ac_old_val`
2711         ac_new_val_w=`echo x $ac_new_val`
2712         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2713           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2714 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2715           ac_cache_corrupted=:
2716         else
2717           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2718 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2719           eval $ac_var=\$ac_old_val
2720         fi
2721         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2722 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2723         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2724 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2725       fi;;
2726   esac
2727   # Pass precious variables to config.status.
2728   if test "$ac_new_set" = set; then
2729     case $ac_new_val in
2730     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2731     *) ac_arg=$ac_var=$ac_new_val ;;
2732     esac
2733     case " $ac_configure_args " in
2734       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2735       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2736     esac
2737   fi
2738 done
2739 if $ac_cache_corrupted; then
2740   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2741 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2742   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2743 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2744   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2745 fi
2746 ## -------------------- ##
2747 ## Main body of script. ##
2748 ## -------------------- ##
2749
2750 ac_ext=c
2751 ac_cpp='$CPP $CPPFLAGS'
2752 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2753 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2754 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2755
2756
2757
2758
2759
2760 ac_config_headers="$ac_config_headers config.h:config.in"
2761
2762
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2764 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2765     # Check whether --enable-maintainer-mode was given.
2766 if test "${enable_maintainer_mode+set}" = set; then :
2767   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2768 else
2769   USE_MAINTAINER_MODE=no
2770 fi
2771
2772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2773 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2774    if test $USE_MAINTAINER_MODE = yes; then
2775   MAINTAINER_MODE_TRUE=
2776   MAINTAINER_MODE_FALSE='#'
2777 else
2778   MAINTAINER_MODE_TRUE='#'
2779   MAINTAINER_MODE_FALSE=
2780 fi
2781
2782   MAINT=$MAINTAINER_MODE_TRUE
2783
2784
2785
2786 # Set the 'development' global.
2787 . $srcdir/../bfd/development.sh
2788
2789 ac_ext=c
2790 ac_cpp='$CPP $CPPFLAGS'
2791 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2792 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2793 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2794 if test -n "$ac_tool_prefix"; then
2795   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2796 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2798 $as_echo_n "checking for $ac_word... " >&6; }
2799 if test "${ac_cv_prog_CC+set}" = set; then :
2800   $as_echo_n "(cached) " >&6
2801 else
2802   if test -n "$CC"; then
2803   ac_cv_prog_CC="$CC" # Let the user override the test.
2804 else
2805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2806 for as_dir in $PATH
2807 do
2808   IFS=$as_save_IFS
2809   test -z "$as_dir" && as_dir=.
2810     for ac_exec_ext in '' $ac_executable_extensions; do
2811   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2812     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2814     break 2
2815   fi
2816 done
2817   done
2818 IFS=$as_save_IFS
2819
2820 fi
2821 fi
2822 CC=$ac_cv_prog_CC
2823 if test -n "$CC"; then
2824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2825 $as_echo "$CC" >&6; }
2826 else
2827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2828 $as_echo "no" >&6; }
2829 fi
2830
2831
2832 fi
2833 if test -z "$ac_cv_prog_CC"; then
2834   ac_ct_CC=$CC
2835   # Extract the first word of "gcc", so it can be a program name with args.
2836 set dummy gcc; ac_word=$2
2837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2838 $as_echo_n "checking for $ac_word... " >&6; }
2839 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2840   $as_echo_n "(cached) " >&6
2841 else
2842   if test -n "$ac_ct_CC"; then
2843   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2844 else
2845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2846 for as_dir in $PATH
2847 do
2848   IFS=$as_save_IFS
2849   test -z "$as_dir" && as_dir=.
2850     for ac_exec_ext in '' $ac_executable_extensions; do
2851   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2852     ac_cv_prog_ac_ct_CC="gcc"
2853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2854     break 2
2855   fi
2856 done
2857   done
2858 IFS=$as_save_IFS
2859
2860 fi
2861 fi
2862 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2863 if test -n "$ac_ct_CC"; then
2864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2865 $as_echo "$ac_ct_CC" >&6; }
2866 else
2867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2868 $as_echo "no" >&6; }
2869 fi
2870
2871   if test "x$ac_ct_CC" = x; then
2872     CC=""
2873   else
2874     case $cross_compiling:$ac_tool_warned in
2875 yes:)
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2877 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2878 ac_tool_warned=yes ;;
2879 esac
2880     CC=$ac_ct_CC
2881   fi
2882 else
2883   CC="$ac_cv_prog_CC"
2884 fi
2885
2886 if test -z "$CC"; then
2887           if test -n "$ac_tool_prefix"; then
2888     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2889 set dummy ${ac_tool_prefix}cc; ac_word=$2
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2891 $as_echo_n "checking for $ac_word... " >&6; }
2892 if test "${ac_cv_prog_CC+set}" = set; then :
2893   $as_echo_n "(cached) " >&6
2894 else
2895   if test -n "$CC"; then
2896   ac_cv_prog_CC="$CC" # Let the user override the test.
2897 else
2898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2899 for as_dir in $PATH
2900 do
2901   IFS=$as_save_IFS
2902   test -z "$as_dir" && as_dir=.
2903     for ac_exec_ext in '' $ac_executable_extensions; do
2904   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2905     ac_cv_prog_CC="${ac_tool_prefix}cc"
2906     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2907     break 2
2908   fi
2909 done
2910   done
2911 IFS=$as_save_IFS
2912
2913 fi
2914 fi
2915 CC=$ac_cv_prog_CC
2916 if test -n "$CC"; then
2917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2918 $as_echo "$CC" >&6; }
2919 else
2920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2921 $as_echo "no" >&6; }
2922 fi
2923
2924
2925   fi
2926 fi
2927 if test -z "$CC"; then
2928   # Extract the first word of "cc", so it can be a program name with args.
2929 set dummy cc; ac_word=$2
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2931 $as_echo_n "checking for $ac_word... " >&6; }
2932 if test "${ac_cv_prog_CC+set}" = set; then :
2933   $as_echo_n "(cached) " >&6
2934 else
2935   if test -n "$CC"; then
2936   ac_cv_prog_CC="$CC" # Let the user override the test.
2937 else
2938   ac_prog_rejected=no
2939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2940 for as_dir in $PATH
2941 do
2942   IFS=$as_save_IFS
2943   test -z "$as_dir" && as_dir=.
2944     for ac_exec_ext in '' $ac_executable_extensions; do
2945   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2946     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2947        ac_prog_rejected=yes
2948        continue
2949      fi
2950     ac_cv_prog_CC="cc"
2951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2952     break 2
2953   fi
2954 done
2955   done
2956 IFS=$as_save_IFS
2957
2958 if test $ac_prog_rejected = yes; then
2959   # We found a bogon in the path, so make sure we never use it.
2960   set dummy $ac_cv_prog_CC
2961   shift
2962   if test $# != 0; then
2963     # We chose a different compiler from the bogus one.
2964     # However, it has the same basename, so the bogon will be chosen
2965     # first if we set CC to just the basename; use the full file name.
2966     shift
2967     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2968   fi
2969 fi
2970 fi
2971 fi
2972 CC=$ac_cv_prog_CC
2973 if test -n "$CC"; then
2974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2975 $as_echo "$CC" >&6; }
2976 else
2977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2978 $as_echo "no" >&6; }
2979 fi
2980
2981
2982 fi
2983 if test -z "$CC"; then
2984   if test -n "$ac_tool_prefix"; then
2985   for ac_prog in cl.exe
2986   do
2987     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2988 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2990 $as_echo_n "checking for $ac_word... " >&6; }
2991 if test "${ac_cv_prog_CC+set}" = set; then :
2992   $as_echo_n "(cached) " >&6
2993 else
2994   if test -n "$CC"; then
2995   ac_cv_prog_CC="$CC" # Let the user override the test.
2996 else
2997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2998 for as_dir in $PATH
2999 do
3000   IFS=$as_save_IFS
3001   test -z "$as_dir" && as_dir=.
3002     for ac_exec_ext in '' $ac_executable_extensions; do
3003   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3004     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3006     break 2
3007   fi
3008 done
3009   done
3010 IFS=$as_save_IFS
3011
3012 fi
3013 fi
3014 CC=$ac_cv_prog_CC
3015 if test -n "$CC"; then
3016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3017 $as_echo "$CC" >&6; }
3018 else
3019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020 $as_echo "no" >&6; }
3021 fi
3022
3023
3024     test -n "$CC" && break
3025   done
3026 fi
3027 if test -z "$CC"; then
3028   ac_ct_CC=$CC
3029   for ac_prog in cl.exe
3030 do
3031   # Extract the first word of "$ac_prog", so it can be a program name with args.
3032 set dummy $ac_prog; ac_word=$2
3033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3034 $as_echo_n "checking for $ac_word... " >&6; }
3035 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3036   $as_echo_n "(cached) " >&6
3037 else
3038   if test -n "$ac_ct_CC"; then
3039   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3040 else
3041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3042 for as_dir in $PATH
3043 do
3044   IFS=$as_save_IFS
3045   test -z "$as_dir" && as_dir=.
3046     for ac_exec_ext in '' $ac_executable_extensions; do
3047   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3048     ac_cv_prog_ac_ct_CC="$ac_prog"
3049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3050     break 2
3051   fi
3052 done
3053   done
3054 IFS=$as_save_IFS
3055
3056 fi
3057 fi
3058 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3059 if test -n "$ac_ct_CC"; then
3060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3061 $as_echo "$ac_ct_CC" >&6; }
3062 else
3063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064 $as_echo "no" >&6; }
3065 fi
3066
3067
3068   test -n "$ac_ct_CC" && break
3069 done
3070
3071   if test "x$ac_ct_CC" = x; then
3072     CC=""
3073   else
3074     case $cross_compiling:$ac_tool_warned in
3075 yes:)
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3077 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3078 ac_tool_warned=yes ;;
3079 esac
3080     CC=$ac_ct_CC
3081   fi
3082 fi
3083
3084 fi
3085
3086
3087 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3088 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3089 as_fn_error "no acceptable C compiler found in \$PATH
3090 See \`config.log' for more details." "$LINENO" 5; }
3091
3092 # Provide some information about the compiler.
3093 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3094 set X $ac_compile
3095 ac_compiler=$2
3096 for ac_option in --version -v -V -qversion; do
3097   { { ac_try="$ac_compiler $ac_option >&5"
3098 case "(($ac_try" in
3099   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3100   *) ac_try_echo=$ac_try;;
3101 esac
3102 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3103 $as_echo "$ac_try_echo"; } >&5
3104   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3105   ac_status=$?
3106   if test -s conftest.err; then
3107     sed '10a\
3108 ... rest of stderr output deleted ...
3109          10q' conftest.err >conftest.er1
3110     cat conftest.er1 >&5
3111     rm -f conftest.er1 conftest.err
3112   fi
3113   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3114   test $ac_status = 0; }
3115 done
3116
3117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3118 /* end confdefs.h.  */
3119
3120 int
3121 main ()
3122 {
3123
3124   ;
3125   return 0;
3126 }
3127 _ACEOF
3128 ac_clean_files_save=$ac_clean_files
3129 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3130 # Try to create an executable without -o first, disregard a.out.
3131 # It will help us diagnose broken compilers, and finding out an intuition
3132 # of exeext.
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3134 $as_echo_n "checking for C compiler default output file name... " >&6; }
3135 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3136
3137 # The possible output files:
3138 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3139
3140 ac_rmfiles=
3141 for ac_file in $ac_files
3142 do
3143   case $ac_file in
3144     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3145     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3146   esac
3147 done
3148 rm -f $ac_rmfiles
3149
3150 if { { ac_try="$ac_link_default"
3151 case "(($ac_try" in
3152   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3153   *) ac_try_echo=$ac_try;;
3154 esac
3155 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3156 $as_echo "$ac_try_echo"; } >&5
3157   (eval "$ac_link_default") 2>&5
3158   ac_status=$?
3159   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3160   test $ac_status = 0; }; then :
3161   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3162 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3163 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3164 # so that the user can short-circuit this test for compilers unknown to
3165 # Autoconf.
3166 for ac_file in $ac_files ''
3167 do
3168   test -f "$ac_file" || continue
3169   case $ac_file in
3170     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3171         ;;
3172     [ab].out )
3173         # We found the default executable, but exeext='' is most
3174         # certainly right.
3175         break;;
3176     *.* )
3177         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3178         then :; else
3179            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3180         fi
3181         # We set ac_cv_exeext here because the later test for it is not
3182         # safe: cross compilers may not add the suffix if given an `-o'
3183         # argument, so we may need to know it at that point already.
3184         # Even if this section looks crufty: it has the advantage of
3185         # actually working.
3186         break;;
3187     * )
3188         break;;
3189   esac
3190 done
3191 test "$ac_cv_exeext" = no && ac_cv_exeext=
3192
3193 else
3194   ac_file=''
3195 fi
3196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3197 $as_echo "$ac_file" >&6; }
3198 if test -z "$ac_file"; then :
3199   $as_echo "$as_me: failed program was:" >&5
3200 sed 's/^/| /' conftest.$ac_ext >&5
3201
3202 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3203 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3204 { as_fn_set_status 77
3205 as_fn_error "C compiler cannot create executables
3206 See \`config.log' for more details." "$LINENO" 5; }; }
3207 fi
3208 ac_exeext=$ac_cv_exeext
3209
3210 # Check that the compiler produces executables we can run.  If not, either
3211 # the compiler is broken, or we cross compile.
3212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3213 $as_echo_n "checking whether the C compiler works... " >&6; }
3214 # If not cross compiling, check that we can run a simple program.
3215 if test "$cross_compiling" != yes; then
3216   if { ac_try='./$ac_file'
3217   { { case "(($ac_try" in
3218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3219   *) ac_try_echo=$ac_try;;
3220 esac
3221 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3222 $as_echo "$ac_try_echo"; } >&5
3223   (eval "$ac_try") 2>&5
3224   ac_status=$?
3225   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3226   test $ac_status = 0; }; }; then
3227     cross_compiling=no
3228   else
3229     if test "$cross_compiling" = maybe; then
3230         cross_compiling=yes
3231     else
3232         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3233 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3234 as_fn_error "cannot run C compiled programs.
3235 If you meant to cross compile, use \`--host'.
3236 See \`config.log' for more details." "$LINENO" 5; }
3237     fi
3238   fi
3239 fi
3240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3241 $as_echo "yes" >&6; }
3242
3243 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3244 ac_clean_files=$ac_clean_files_save
3245 # Check that the compiler produces executables we can run.  If not, either
3246 # the compiler is broken, or we cross compile.
3247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3248 $as_echo_n "checking whether we are cross compiling... " >&6; }
3249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3250 $as_echo "$cross_compiling" >&6; }
3251
3252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3253 $as_echo_n "checking for suffix of executables... " >&6; }
3254 if { { ac_try="$ac_link"
3255 case "(($ac_try" in
3256   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3257   *) ac_try_echo=$ac_try;;
3258 esac
3259 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3260 $as_echo "$ac_try_echo"; } >&5
3261   (eval "$ac_link") 2>&5
3262   ac_status=$?
3263   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3264   test $ac_status = 0; }; then :
3265   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3266 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3267 # work properly (i.e., refer to `conftest.exe'), while it won't with
3268 # `rm'.
3269 for ac_file in conftest.exe conftest conftest.*; do
3270   test -f "$ac_file" || continue
3271   case $ac_file in
3272     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3273     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3274           break;;
3275     * ) break;;
3276   esac
3277 done
3278 else
3279   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3280 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3281 as_fn_error "cannot compute suffix of executables: cannot compile and link
3282 See \`config.log' for more details." "$LINENO" 5; }
3283 fi
3284 rm -f conftest$ac_cv_exeext
3285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3286 $as_echo "$ac_cv_exeext" >&6; }
3287
3288 rm -f conftest.$ac_ext
3289 EXEEXT=$ac_cv_exeext
3290 ac_exeext=$EXEEXT
3291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3292 $as_echo_n "checking for suffix of object files... " >&6; }
3293 if test "${ac_cv_objext+set}" = set; then :
3294   $as_echo_n "(cached) " >&6
3295 else
3296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3297 /* end confdefs.h.  */
3298
3299 int
3300 main ()
3301 {
3302
3303   ;
3304   return 0;
3305 }
3306 _ACEOF
3307 rm -f conftest.o conftest.obj
3308 if { { ac_try="$ac_compile"
3309 case "(($ac_try" in
3310   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3311   *) ac_try_echo=$ac_try;;
3312 esac
3313 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3314 $as_echo "$ac_try_echo"; } >&5
3315   (eval "$ac_compile") 2>&5
3316   ac_status=$?
3317   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3318   test $ac_status = 0; }; then :
3319   for ac_file in conftest.o conftest.obj conftest.*; do
3320   test -f "$ac_file" || continue;
3321   case $ac_file in
3322     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3323     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3324        break;;
3325   esac
3326 done
3327 else
3328   $as_echo "$as_me: failed program was:" >&5
3329 sed 's/^/| /' conftest.$ac_ext >&5
3330
3331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3332 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3333 as_fn_error "cannot compute suffix of object files: cannot compile
3334 See \`config.log' for more details." "$LINENO" 5; }
3335 fi
3336 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3337 fi
3338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3339 $as_echo "$ac_cv_objext" >&6; }
3340 OBJEXT=$ac_cv_objext
3341 ac_objext=$OBJEXT
3342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3343 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3344 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3345   $as_echo_n "(cached) " >&6
3346 else
3347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3348 /* end confdefs.h.  */
3349
3350 int
3351 main ()
3352 {
3353 #ifndef __GNUC__
3354        choke me
3355 #endif
3356
3357   ;
3358   return 0;
3359 }
3360 _ACEOF
3361 if ac_fn_c_try_compile "$LINENO"; then :
3362   ac_compiler_gnu=yes
3363 else
3364   ac_compiler_gnu=no
3365 fi
3366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3367 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3368
3369 fi
3370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3371 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3372 if test $ac_compiler_gnu = yes; then
3373   GCC=yes
3374 else
3375   GCC=
3376 fi
3377 ac_test_CFLAGS=${CFLAGS+set}
3378 ac_save_CFLAGS=$CFLAGS
3379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3380 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3381 if test "${ac_cv_prog_cc_g+set}" = set; then :
3382   $as_echo_n "(cached) " >&6
3383 else
3384   ac_save_c_werror_flag=$ac_c_werror_flag
3385    ac_c_werror_flag=yes
3386    ac_cv_prog_cc_g=no
3387    CFLAGS="-g"
3388    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3389 /* end confdefs.h.  */
3390
3391 int
3392 main ()
3393 {
3394
3395   ;
3396   return 0;
3397 }
3398 _ACEOF
3399 if ac_fn_c_try_compile "$LINENO"; then :
3400   ac_cv_prog_cc_g=yes
3401 else
3402   CFLAGS=""
3403       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3404 /* end confdefs.h.  */
3405
3406 int
3407 main ()
3408 {
3409
3410   ;
3411   return 0;
3412 }
3413 _ACEOF
3414 if ac_fn_c_try_compile "$LINENO"; then :
3415
3416 else
3417   ac_c_werror_flag=$ac_save_c_werror_flag
3418          CFLAGS="-g"
3419          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3420 /* end confdefs.h.  */
3421
3422 int
3423 main ()
3424 {
3425
3426   ;
3427   return 0;
3428 }
3429 _ACEOF
3430 if ac_fn_c_try_compile "$LINENO"; then :
3431   ac_cv_prog_cc_g=yes
3432 fi
3433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3434 fi
3435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3436 fi
3437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3438    ac_c_werror_flag=$ac_save_c_werror_flag
3439 fi
3440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3441 $as_echo "$ac_cv_prog_cc_g" >&6; }
3442 if test "$ac_test_CFLAGS" = set; then
3443   CFLAGS=$ac_save_CFLAGS
3444 elif test $ac_cv_prog_cc_g = yes; then
3445   if test "$GCC" = yes; then
3446     CFLAGS="-g -O2"
3447   else
3448     CFLAGS="-g"
3449   fi
3450 else
3451   if test "$GCC" = yes; then
3452     CFLAGS="-O2"
3453   else
3454     CFLAGS=
3455   fi
3456 fi
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3458 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3459 if test "${ac_cv_prog_cc_c89+set}" = set; then :
3460   $as_echo_n "(cached) " >&6
3461 else
3462   ac_cv_prog_cc_c89=no
3463 ac_save_CC=$CC
3464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3465 /* end confdefs.h.  */
3466 #include <stdarg.h>
3467 #include <stdio.h>
3468 #include <sys/types.h>
3469 #include <sys/stat.h>
3470 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3471 struct buf { int x; };
3472 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3473 static char *e (p, i)
3474      char **p;
3475      int i;
3476 {
3477   return p[i];
3478 }
3479 static char *f (char * (*g) (char **, int), char **p, ...)
3480 {
3481   char *s;
3482   va_list v;
3483   va_start (v,p);
3484   s = g (p, va_arg (v,int));
3485   va_end (v);
3486   return s;
3487 }
3488
3489 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3490    function prototypes and stuff, but not '\xHH' hex character constants.
3491    These don't provoke an error unfortunately, instead are silently treated
3492    as 'x'.  The following induces an error, until -std is added to get
3493    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3494    array size at least.  It's necessary to write '\x00'==0 to get something
3495    that's true only with -std.  */
3496 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3497
3498 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3499    inside strings and character constants.  */
3500 #define FOO(x) 'x'
3501 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3502
3503 int test (int i, double x);
3504 struct s1 {int (*f) (int a);};
3505 struct s2 {int (*f) (double a);};
3506 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3507 int argc;
3508 char **argv;
3509 int
3510 main ()
3511 {
3512 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3513   ;
3514   return 0;
3515 }
3516 _ACEOF
3517 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3518         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3519 do
3520   CC="$ac_save_CC $ac_arg"
3521   if ac_fn_c_try_compile "$LINENO"; then :
3522   ac_cv_prog_cc_c89=$ac_arg
3523 fi
3524 rm -f core conftest.err conftest.$ac_objext
3525   test "x$ac_cv_prog_cc_c89" != "xno" && break
3526 done
3527 rm -f conftest.$ac_ext
3528 CC=$ac_save_CC
3529
3530 fi
3531 # AC_CACHE_VAL
3532 case "x$ac_cv_prog_cc_c89" in
3533   x)
3534     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3535 $as_echo "none needed" >&6; } ;;
3536   xno)
3537     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3538 $as_echo "unsupported" >&6; } ;;
3539   *)
3540     CC="$CC $ac_cv_prog_cc_c89"
3541     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3542 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3543 esac
3544 if test "x$ac_cv_prog_cc_c89" != xno; then :
3545
3546 fi
3547
3548 ac_ext=c
3549 ac_cpp='$CPP $CPPFLAGS'
3550 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3551 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3552 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3553
3554 ac_ext=cpp
3555 ac_cpp='$CXXCPP $CPPFLAGS'
3556 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3557 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3558 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3559 if test -z "$CXX"; then
3560   if test -n "$CCC"; then
3561     CXX=$CCC
3562   else
3563     if test -n "$ac_tool_prefix"; then
3564   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3565   do
3566     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3567 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3569 $as_echo_n "checking for $ac_word... " >&6; }
3570 if test "${ac_cv_prog_CXX+set}" = set; then :
3571   $as_echo_n "(cached) " >&6
3572 else
3573   if test -n "$CXX"; then
3574   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3575 else
3576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3577 for as_dir in $PATH
3578 do
3579   IFS=$as_save_IFS
3580   test -z "$as_dir" && as_dir=.
3581     for ac_exec_ext in '' $ac_executable_extensions; do
3582   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3583     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3585     break 2
3586   fi
3587 done
3588   done
3589 IFS=$as_save_IFS
3590
3591 fi
3592 fi
3593 CXX=$ac_cv_prog_CXX
3594 if test -n "$CXX"; then
3595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3596 $as_echo "$CXX" >&6; }
3597 else
3598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3599 $as_echo "no" >&6; }
3600 fi
3601
3602
3603     test -n "$CXX" && break
3604   done
3605 fi
3606 if test -z "$CXX"; then
3607   ac_ct_CXX=$CXX
3608   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3609 do
3610   # Extract the first word of "$ac_prog", so it can be a program name with args.
3611 set dummy $ac_prog; ac_word=$2
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3613 $as_echo_n "checking for $ac_word... " >&6; }
3614 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3615   $as_echo_n "(cached) " >&6
3616 else
3617   if test -n "$ac_ct_CXX"; then
3618   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3619 else
3620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3621 for as_dir in $PATH
3622 do
3623   IFS=$as_save_IFS
3624   test -z "$as_dir" && as_dir=.
3625     for ac_exec_ext in '' $ac_executable_extensions; do
3626   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3627     ac_cv_prog_ac_ct_CXX="$ac_prog"
3628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3629     break 2
3630   fi
3631 done
3632   done
3633 IFS=$as_save_IFS
3634
3635 fi
3636 fi
3637 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3638 if test -n "$ac_ct_CXX"; then
3639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3640 $as_echo "$ac_ct_CXX" >&6; }
3641 else
3642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643 $as_echo "no" >&6; }
3644 fi
3645
3646
3647   test -n "$ac_ct_CXX" && break
3648 done
3649
3650   if test "x$ac_ct_CXX" = x; then
3651     CXX="g++"
3652   else
3653     case $cross_compiling:$ac_tool_warned in
3654 yes:)
3655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3656 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3657 ac_tool_warned=yes ;;
3658 esac
3659     CXX=$ac_ct_CXX
3660   fi
3661 fi
3662
3663   fi
3664 fi
3665 # Provide some information about the compiler.
3666 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3667 set X $ac_compile
3668 ac_compiler=$2
3669 for ac_option in --version -v -V -qversion; do
3670   { { ac_try="$ac_compiler $ac_option >&5"
3671 case "(($ac_try" in
3672   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3673   *) ac_try_echo=$ac_try;;
3674 esac
3675 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3676 $as_echo "$ac_try_echo"; } >&5
3677   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3678   ac_status=$?
3679   if test -s conftest.err; then
3680     sed '10a\
3681 ... rest of stderr output deleted ...
3682          10q' conftest.err >conftest.er1
3683     cat conftest.er1 >&5
3684     rm -f conftest.er1 conftest.err
3685   fi
3686   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3687   test $ac_status = 0; }
3688 done
3689
3690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3691 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3692 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3693   $as_echo_n "(cached) " >&6
3694 else
3695   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3696 /* end confdefs.h.  */
3697
3698 int
3699 main ()
3700 {
3701 #ifndef __GNUC__
3702        choke me
3703 #endif
3704
3705   ;
3706   return 0;
3707 }
3708 _ACEOF
3709 if ac_fn_cxx_try_compile "$LINENO"; then :
3710   ac_compiler_gnu=yes
3711 else
3712   ac_compiler_gnu=no
3713 fi
3714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3715 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3716
3717 fi
3718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3719 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3720 if test $ac_compiler_gnu = yes; then
3721   GXX=yes
3722 else
3723   GXX=
3724 fi
3725 ac_test_CXXFLAGS=${CXXFLAGS+set}
3726 ac_save_CXXFLAGS=$CXXFLAGS
3727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3728 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3729 if test "${ac_cv_prog_cxx_g+set}" = set; then :
3730   $as_echo_n "(cached) " >&6
3731 else
3732   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3733    ac_cxx_werror_flag=yes
3734    ac_cv_prog_cxx_g=no
3735    CXXFLAGS="-g"
3736    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3737 /* end confdefs.h.  */
3738
3739 int
3740 main ()
3741 {
3742
3743   ;
3744   return 0;
3745 }
3746 _ACEOF
3747 if ac_fn_cxx_try_compile "$LINENO"; then :
3748   ac_cv_prog_cxx_g=yes
3749 else
3750   CXXFLAGS=""
3751       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3752 /* end confdefs.h.  */
3753
3754 int
3755 main ()
3756 {
3757
3758   ;
3759   return 0;
3760 }
3761 _ACEOF
3762 if ac_fn_cxx_try_compile "$LINENO"; then :
3763
3764 else
3765   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3766          CXXFLAGS="-g"
3767          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3768 /* end confdefs.h.  */
3769
3770 int
3771 main ()
3772 {
3773
3774   ;
3775   return 0;
3776 }
3777 _ACEOF
3778 if ac_fn_cxx_try_compile "$LINENO"; then :
3779   ac_cv_prog_cxx_g=yes
3780 fi
3781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3782 fi
3783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3784 fi
3785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3786    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3787 fi
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3789 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3790 if test "$ac_test_CXXFLAGS" = set; then
3791   CXXFLAGS=$ac_save_CXXFLAGS
3792 elif test $ac_cv_prog_cxx_g = yes; then
3793   if test "$GXX" = yes; then
3794     CXXFLAGS="-g -O2"
3795   else
3796     CXXFLAGS="-g"
3797   fi
3798 else
3799   if test "$GXX" = yes; then
3800     CXXFLAGS="-O2"
3801   else
3802     CXXFLAGS=
3803   fi
3804 fi
3805 ac_ext=c
3806 ac_cpp='$CPP $CPPFLAGS'
3807 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3808 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3809 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3810
3811
3812
3813 ac_ext=c
3814 ac_cpp='$CPP $CPPFLAGS'
3815 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3816 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3817 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3819 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3820 # On Suns, sometimes $CPP names a directory.
3821 if test -n "$CPP" && test -d "$CPP"; then
3822   CPP=
3823 fi
3824 if test -z "$CPP"; then
3825   if test "${ac_cv_prog_CPP+set}" = set; then :
3826   $as_echo_n "(cached) " >&6
3827 else
3828       # Double quotes because CPP needs to be expanded
3829     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3830     do
3831       ac_preproc_ok=false
3832 for ac_c_preproc_warn_flag in '' yes
3833 do
3834   # Use a header file that comes with gcc, so configuring glibc
3835   # with a fresh cross-compiler works.
3836   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3837   # <limits.h> exists even on freestanding compilers.
3838   # On the NeXT, cc -E runs the code through the compiler's parser,
3839   # not just through cpp. "Syntax error" is here to catch this case.
3840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3841 /* end confdefs.h.  */
3842 #ifdef __STDC__
3843 # include <limits.h>
3844 #else
3845 # include <assert.h>
3846 #endif
3847                      Syntax error
3848 _ACEOF
3849 if ac_fn_c_try_cpp "$LINENO"; then :
3850
3851 else
3852   # Broken: fails on valid input.
3853 continue
3854 fi
3855 rm -f conftest.err conftest.$ac_ext
3856
3857   # OK, works on sane cases.  Now check whether nonexistent headers
3858   # can be detected and how.
3859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3860 /* end confdefs.h.  */
3861 #include <ac_nonexistent.h>
3862 _ACEOF
3863 if ac_fn_c_try_cpp "$LINENO"; then :
3864   # Broken: success on invalid input.
3865 continue
3866 else
3867   # Passes both tests.
3868 ac_preproc_ok=:
3869 break
3870 fi
3871 rm -f conftest.err conftest.$ac_ext
3872
3873 done
3874 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3875 rm -f conftest.err conftest.$ac_ext
3876 if $ac_preproc_ok; then :
3877   break
3878 fi
3879
3880     done
3881     ac_cv_prog_CPP=$CPP
3882
3883 fi
3884   CPP=$ac_cv_prog_CPP
3885 else
3886   ac_cv_prog_CPP=$CPP
3887 fi
3888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3889 $as_echo "$CPP" >&6; }
3890 ac_preproc_ok=false
3891 for ac_c_preproc_warn_flag in '' yes
3892 do
3893   # Use a header file that comes with gcc, so configuring glibc
3894   # with a fresh cross-compiler works.
3895   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3896   # <limits.h> exists even on freestanding compilers.
3897   # On the NeXT, cc -E runs the code through the compiler's parser,
3898   # not just through cpp. "Syntax error" is here to catch this case.
3899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3900 /* end confdefs.h.  */
3901 #ifdef __STDC__
3902 # include <limits.h>
3903 #else
3904 # include <assert.h>
3905 #endif
3906                      Syntax error
3907 _ACEOF
3908 if ac_fn_c_try_cpp "$LINENO"; then :
3909
3910 else
3911   # Broken: fails on valid input.
3912 continue
3913 fi
3914 rm -f conftest.err conftest.$ac_ext
3915
3916   # OK, works on sane cases.  Now check whether nonexistent headers
3917   # can be detected and how.
3918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3919 /* end confdefs.h.  */
3920 #include <ac_nonexistent.h>
3921 _ACEOF
3922 if ac_fn_c_try_cpp "$LINENO"; then :
3923   # Broken: success on invalid input.
3924 continue
3925 else
3926   # Passes both tests.
3927 ac_preproc_ok=:
3928 break
3929 fi
3930 rm -f conftest.err conftest.$ac_ext
3931
3932 done
3933 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3934 rm -f conftest.err conftest.$ac_ext
3935 if $ac_preproc_ok; then :
3936
3937 else
3938   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3939 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3940 as_fn_error "C preprocessor \"$CPP\" fails sanity check
3941 See \`config.log' for more details." "$LINENO" 5; }
3942 fi
3943
3944 ac_ext=c
3945 ac_cpp='$CPP $CPPFLAGS'
3946 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3947 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3948 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3949
3950
3951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3952 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3953 if test "${ac_cv_path_GREP+set}" = set; then :
3954   $as_echo_n "(cached) " >&6
3955 else
3956   if test -z "$GREP"; then
3957   ac_path_GREP_found=false
3958   # Loop through the user's path and test for each of PROGNAME-LIST
3959   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3960 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3961 do
3962   IFS=$as_save_IFS
3963   test -z "$as_dir" && as_dir=.
3964     for ac_prog in grep ggrep; do
3965     for ac_exec_ext in '' $ac_executable_extensions; do
3966       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3967       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3968 # Check for GNU ac_path_GREP and select it if it is found.
3969   # Check for GNU $ac_path_GREP
3970 case `"$ac_path_GREP" --version 2>&1` in
3971 *GNU*)
3972   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3973 *)
3974   ac_count=0
3975   $as_echo_n 0123456789 >"conftest.in"
3976   while :
3977   do
3978     cat "conftest.in" "conftest.in" >"conftest.tmp"
3979     mv "conftest.tmp" "conftest.in"
3980     cp "conftest.in" "conftest.nl"
3981     $as_echo 'GREP' >> "conftest.nl"
3982     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3983     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3984     as_fn_arith $ac_count + 1 && ac_count=$as_val
3985     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3986       # Best one so far, save it but keep looking for a better one
3987       ac_cv_path_GREP="$ac_path_GREP"
3988       ac_path_GREP_max=$ac_count
3989     fi
3990     # 10*(2^10) chars as input seems more than enough
3991     test $ac_count -gt 10 && break
3992   done
3993   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3994 esac
3995
3996       $ac_path_GREP_found && break 3
3997     done
3998   done
3999   done
4000 IFS=$as_save_IFS
4001   if test -z "$ac_cv_path_GREP"; then
4002     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4003   fi
4004 else
4005   ac_cv_path_GREP=$GREP
4006 fi
4007
4008 fi
4009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4010 $as_echo "$ac_cv_path_GREP" >&6; }
4011  GREP="$ac_cv_path_GREP"
4012
4013
4014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4015 $as_echo_n "checking for egrep... " >&6; }
4016 if test "${ac_cv_path_EGREP+set}" = set; then :
4017   $as_echo_n "(cached) " >&6
4018 else
4019   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4020    then ac_cv_path_EGREP="$GREP -E"
4021    else
4022      if test -z "$EGREP"; then
4023   ac_path_EGREP_found=false
4024   # Loop through the user's path and test for each of PROGNAME-LIST
4025   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4026 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4027 do
4028   IFS=$as_save_IFS
4029   test -z "$as_dir" && as_dir=.
4030     for ac_prog in egrep; do
4031     for ac_exec_ext in '' $ac_executable_extensions; do
4032       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4033       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4034 # Check for GNU ac_path_EGREP and select it if it is found.
4035   # Check for GNU $ac_path_EGREP
4036 case `"$ac_path_EGREP" --version 2>&1` in
4037 *GNU*)
4038   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4039 *)
4040   ac_count=0
4041   $as_echo_n 0123456789 >"conftest.in"
4042   while :
4043   do
4044     cat "conftest.in" "conftest.in" >"conftest.tmp"
4045     mv "conftest.tmp" "conftest.in"
4046     cp "conftest.in" "conftest.nl"
4047     $as_echo 'EGREP' >> "conftest.nl"
4048     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4049     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4050     as_fn_arith $ac_count + 1 && ac_count=$as_val
4051     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4052       # Best one so far, save it but keep looking for a better one
4053       ac_cv_path_EGREP="$ac_path_EGREP"
4054       ac_path_EGREP_max=$ac_count
4055     fi
4056     # 10*(2^10) chars as input seems more than enough
4057     test $ac_count -gt 10 && break
4058   done
4059   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4060 esac
4061
4062       $ac_path_EGREP_found && break 3
4063     done
4064   done
4065   done
4066 IFS=$as_save_IFS
4067   if test -z "$ac_cv_path_EGREP"; then
4068     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4069   fi
4070 else
4071   ac_cv_path_EGREP=$EGREP
4072 fi
4073
4074    fi
4075 fi
4076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4077 $as_echo "$ac_cv_path_EGREP" >&6; }
4078  EGREP="$ac_cv_path_EGREP"
4079
4080
4081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4082 $as_echo_n "checking for ANSI C header files... " >&6; }
4083 if test "${ac_cv_header_stdc+set}" = set; then :
4084   $as_echo_n "(cached) " >&6
4085 else
4086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4087 /* end confdefs.h.  */
4088 #include <stdlib.h>
4089 #include <stdarg.h>
4090 #include <string.h>
4091 #include <float.h>
4092
4093 int
4094 main ()
4095 {
4096
4097   ;
4098   return 0;
4099 }
4100 _ACEOF
4101 if ac_fn_c_try_compile "$LINENO"; then :
4102   ac_cv_header_stdc=yes
4103 else
4104   ac_cv_header_stdc=no
4105 fi
4106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4107
4108 if test $ac_cv_header_stdc = yes; then
4109   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4111 /* end confdefs.h.  */
4112 #include <string.h>
4113
4114 _ACEOF
4115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4116   $EGREP "memchr" >/dev/null 2>&1; then :
4117
4118 else
4119   ac_cv_header_stdc=no
4120 fi
4121 rm -f conftest*
4122
4123 fi
4124
4125 if test $ac_cv_header_stdc = yes; then
4126   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4128 /* end confdefs.h.  */
4129 #include <stdlib.h>
4130
4131 _ACEOF
4132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4133   $EGREP "free" >/dev/null 2>&1; then :
4134
4135 else
4136   ac_cv_header_stdc=no
4137 fi
4138 rm -f conftest*
4139
4140 fi
4141
4142 if test $ac_cv_header_stdc = yes; then
4143   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4144   if test "$cross_compiling" = yes; then :
4145   :
4146 else
4147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4148 /* end confdefs.h.  */
4149 #include <ctype.h>
4150 #include <stdlib.h>
4151 #if ((' ' & 0x0FF) == 0x020)
4152 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4153 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4154 #else
4155 # define ISLOWER(c) \
4156                    (('a' <= (c) && (c) <= 'i') \
4157                      || ('j' <= (c) && (c) <= 'r') \
4158                      || ('s' <= (c) && (c) <= 'z'))
4159 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4160 #endif
4161
4162 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4163 int
4164 main ()
4165 {
4166   int i;
4167   for (i = 0; i < 256; i++)
4168     if (XOR (islower (i), ISLOWER (i))
4169         || toupper (i) != TOUPPER (i))
4170       return 2;
4171   return 0;
4172 }
4173 _ACEOF
4174 if ac_fn_c_try_run "$LINENO"; then :
4175
4176 else
4177   ac_cv_header_stdc=no
4178 fi
4179 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4180   conftest.$ac_objext conftest.beam conftest.$ac_ext
4181 fi
4182
4183 fi
4184 fi
4185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4186 $as_echo "$ac_cv_header_stdc" >&6; }
4187 if test $ac_cv_header_stdc = yes; then
4188
4189 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4190
4191 fi
4192
4193 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4194 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4195                   inttypes.h stdint.h unistd.h
4196 do :
4197   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4198 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4199 "
4200 eval as_val=\$$as_ac_Header
4201    if test "x$as_val" = x""yes; then :
4202   cat >>confdefs.h <<_ACEOF
4203 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4204 _ACEOF
4205
4206 fi
4207
4208 done
4209
4210
4211
4212   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4213 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4214   MINIX=yes
4215 else
4216   MINIX=
4217 fi
4218
4219
4220   if test "$MINIX" = yes; then
4221
4222 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4223
4224
4225 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4226
4227
4228 $as_echo "#define _MINIX 1" >>confdefs.h
4229
4230   fi
4231
4232
4233   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4234 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4235 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4236   $as_echo_n "(cached) " >&6
4237 else
4238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4239 /* end confdefs.h.  */
4240
4241 #         define __EXTENSIONS__ 1
4242           $ac_includes_default
4243 int
4244 main ()
4245 {
4246
4247   ;
4248   return 0;
4249 }
4250 _ACEOF
4251 if ac_fn_c_try_compile "$LINENO"; then :
4252   ac_cv_safe_to_define___extensions__=yes
4253 else
4254   ac_cv_safe_to_define___extensions__=no
4255 fi
4256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4257 fi
4258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4259 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4260   test $ac_cv_safe_to_define___extensions__ = yes &&
4261     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4262
4263   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4264
4265   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4266
4267   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4268
4269   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4270
4271
4272 ac_aux_dir=
4273 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4274   for ac_t in install-sh install.sh shtool; do
4275     if test -f "$ac_dir/$ac_t"; then
4276       ac_aux_dir=$ac_dir
4277       ac_install_sh="$ac_aux_dir/$ac_t -c"
4278       break 2
4279     fi
4280   done
4281 done
4282 if test -z "$ac_aux_dir"; then
4283   as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4284 fi
4285
4286 # These three variables are undocumented and unsupported,
4287 # and are intended to be withdrawn in a future Autoconf release.
4288 # They can cause serious problems if a builder's source tree is in a directory
4289 # whose full name contains unusual characters.
4290 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4291 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4292 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4293
4294
4295 # Make sure we can run config.sub.
4296 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4297   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4298
4299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4300 $as_echo_n "checking build system type... " >&6; }
4301 if test "${ac_cv_build+set}" = set; then :
4302   $as_echo_n "(cached) " >&6
4303 else
4304   ac_build_alias=$build_alias
4305 test "x$ac_build_alias" = x &&
4306   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4307 test "x$ac_build_alias" = x &&
4308   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4309 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4310   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4311
4312 fi
4313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4314 $as_echo "$ac_cv_build" >&6; }
4315 case $ac_cv_build in
4316 *-*-*) ;;
4317 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4318 esac
4319 build=$ac_cv_build
4320 ac_save_IFS=$IFS; IFS='-'
4321 set x $ac_cv_build
4322 shift
4323 build_cpu=$1
4324 build_vendor=$2
4325 shift; shift
4326 # Remember, the first character of IFS is used to create $*,
4327 # except with old shells:
4328 build_os=$*
4329 IFS=$ac_save_IFS
4330 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4331
4332
4333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4334 $as_echo_n "checking host system type... " >&6; }
4335 if test "${ac_cv_host+set}" = set; then :
4336   $as_echo_n "(cached) " >&6
4337 else
4338   if test "x$host_alias" = x; then
4339   ac_cv_host=$ac_cv_build
4340 else
4341   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4342     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4343 fi
4344
4345 fi
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4347 $as_echo "$ac_cv_host" >&6; }
4348 case $ac_cv_host in
4349 *-*-*) ;;
4350 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4351 esac
4352 host=$ac_cv_host
4353 ac_save_IFS=$IFS; IFS='-'
4354 set x $ac_cv_host
4355 shift
4356 host_cpu=$1
4357 host_vendor=$2
4358 shift; shift
4359 # Remember, the first character of IFS is used to create $*,
4360 # except with old shells:
4361 host_os=$*
4362 IFS=$ac_save_IFS
4363 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4364
4365
4366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4367 $as_echo_n "checking target system type... " >&6; }
4368 if test "${ac_cv_target+set}" = set; then :
4369   $as_echo_n "(cached) " >&6
4370 else
4371   if test "x$target_alias" = x; then
4372   ac_cv_target=$ac_cv_host
4373 else
4374   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4375     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4376 fi
4377
4378 fi
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4380 $as_echo "$ac_cv_target" >&6; }
4381 case $ac_cv_target in
4382 *-*-*) ;;
4383 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4384 esac
4385 target=$ac_cv_target
4386 ac_save_IFS=$IFS; IFS='-'
4387 set x $ac_cv_target
4388 shift
4389 target_cpu=$1
4390 target_vendor=$2
4391 shift; shift
4392 # Remember, the first character of IFS is used to create $*,
4393 # except with old shells:
4394 target_os=$*
4395 IFS=$ac_save_IFS
4396 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4397
4398
4399 # The aliases save the names the user supplied, while $host etc.
4400 # will get canonicalized.
4401 test -n "$target_alias" &&
4402   test "$program_prefix$program_suffix$program_transform_name" = \
4403     NONENONEs,x,x, &&
4404   program_prefix=${target_alias}-
4405
4406 # The tests for host and target for $enable_largefile require
4407 # canonical names.
4408
4409
4410
4411 # As the $enable_largefile decision depends on --enable-plugins we must set it
4412 # even in directories otherwise not depending on the $plugins option.
4413
4414
4415   maybe_plugins=no
4416   for ac_header in dlfcn.h
4417 do :
4418   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4419 "
4420 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4421   cat >>confdefs.h <<_ACEOF
4422 #define HAVE_DLFCN_H 1
4423 _ACEOF
4424  maybe_plugins=yes
4425 fi
4426
4427 done
4428
4429   for ac_header in windows.h
4430 do :
4431   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4432 "
4433 if test "x$ac_cv_header_windows_h" = x""yes; then :
4434   cat >>confdefs.h <<_ACEOF
4435 #define HAVE_WINDOWS_H 1
4436 _ACEOF
4437  maybe_plugins=yes
4438 fi
4439
4440 done
4441
4442
4443   # Check whether --enable-plugins was given.
4444 if test "${enable_plugins+set}" = set; then :
4445   enableval=$enable_plugins; case "${enableval}" in
4446       no) plugins=no ;;
4447       *) plugins=yes
4448          if test "$maybe_plugins" != "yes" ; then
4449            as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4450          fi ;;
4451      esac
4452 else
4453   plugins=$maybe_plugins
4454
4455 fi
4456
4457   if test "$plugins" = "yes"; then
4458     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4459 $as_echo_n "checking for library containing dlopen... " >&6; }
4460 if test "${ac_cv_search_dlopen+set}" = set; then :
4461   $as_echo_n "(cached) " >&6
4462 else
4463   ac_func_search_save_LIBS=$LIBS
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465 /* end confdefs.h.  */
4466
4467 /* Override any GCC internal prototype to avoid an error.
4468    Use char because int might match the return type of a GCC
4469    builtin and then its argument prototype would still apply.  */
4470 #ifdef __cplusplus
4471 extern "C"
4472 #endif
4473 char dlopen ();
4474 int
4475 main ()
4476 {
4477 return dlopen ();
4478   ;
4479   return 0;
4480 }
4481 _ACEOF
4482 for ac_lib in '' dl; do
4483   if test -z "$ac_lib"; then
4484     ac_res="none required"
4485   else
4486     ac_res=-l$ac_lib
4487     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4488   fi
4489   if ac_fn_c_try_link "$LINENO"; then :
4490   ac_cv_search_dlopen=$ac_res
4491 fi
4492 rm -f core conftest.err conftest.$ac_objext \
4493     conftest$ac_exeext
4494   if test "${ac_cv_search_dlopen+set}" = set; then :
4495   break
4496 fi
4497 done
4498 if test "${ac_cv_search_dlopen+set}" = set; then :
4499
4500 else
4501   ac_cv_search_dlopen=no
4502 fi
4503 rm conftest.$ac_ext
4504 LIBS=$ac_func_search_save_LIBS
4505 fi
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4507 $as_echo "$ac_cv_search_dlopen" >&6; }
4508 ac_res=$ac_cv_search_dlopen
4509 if test "$ac_res" != no; then :
4510   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4511
4512 fi
4513
4514   fi
4515
4516
4517 case "${host}" in
4518   sparc-*-solaris*|i[3-7]86-*-solaris*)
4519     # On native 32bit sparc and ia32 solaris, large-file and procfs support
4520     # are mutually exclusive; and without procfs support, the bfd/ elf module
4521     # cannot provide certain routines such as elfcore_write_prpsinfo
4522     # or elfcore_write_prstatus.  So unless the user explicitly requested
4523     # large-file support through the --enable-largefile switch, disable
4524     # large-file support in favor of procfs support.
4525     test "${target}" = "${host}" -a "x$plugins" = xno \
4526       && : ${enable_largefile="no"}
4527     ;;
4528 esac
4529
4530 # Check whether --enable-largefile was given.
4531 if test "${enable_largefile+set}" = set; then :
4532   enableval=$enable_largefile;
4533 fi
4534
4535 if test "$enable_largefile" != no; then
4536
4537   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4538 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4539 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4540   $as_echo_n "(cached) " >&6
4541 else
4542   ac_cv_sys_largefile_CC=no
4543      if test "$GCC" != yes; then
4544        ac_save_CC=$CC
4545        while :; do
4546          # IRIX 6.2 and later do not support large files by default,
4547          # so use the C compiler's -n32 option if that helps.
4548          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4549 /* end confdefs.h.  */
4550 #include <sys/types.h>
4551  /* Check that off_t can represent 2**63 - 1 correctly.
4552     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4553     since some C++ compilers masquerading as C compilers
4554     incorrectly reject 9223372036854775807.  */
4555 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4556   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4557                        && LARGE_OFF_T % 2147483647 == 1)
4558                       ? 1 : -1];
4559 int
4560 main ()
4561 {
4562
4563   ;
4564   return 0;
4565 }
4566 _ACEOF
4567          if ac_fn_c_try_compile "$LINENO"; then :
4568   break
4569 fi
4570 rm -f core conftest.err conftest.$ac_objext
4571          CC="$CC -n32"
4572          if ac_fn_c_try_compile "$LINENO"; then :
4573   ac_cv_sys_largefile_CC=' -n32'; break
4574 fi
4575 rm -f core conftest.err conftest.$ac_objext
4576          break
4577        done
4578        CC=$ac_save_CC
4579        rm -f conftest.$ac_ext
4580     fi
4581 fi
4582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4583 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4584   if test "$ac_cv_sys_largefile_CC" != no; then
4585     CC=$CC$ac_cv_sys_largefile_CC
4586   fi
4587
4588   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4589 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4590 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4591   $as_echo_n "(cached) " >&6
4592 else
4593   while :; do
4594   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4595 /* end confdefs.h.  */
4596 #include <sys/types.h>
4597  /* Check that off_t can represent 2**63 - 1 correctly.
4598     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4599     since some C++ compilers masquerading as C compilers
4600     incorrectly reject 9223372036854775807.  */
4601 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4602   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4603                        && LARGE_OFF_T % 2147483647 == 1)
4604                       ? 1 : -1];
4605 int
4606 main ()
4607 {
4608
4609   ;
4610   return 0;
4611 }
4612 _ACEOF
4613 if ac_fn_c_try_compile "$LINENO"; then :
4614   ac_cv_sys_file_offset_bits=no; break
4615 fi
4616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4618 /* end confdefs.h.  */
4619 #define _FILE_OFFSET_BITS 64
4620 #include <sys/types.h>
4621  /* Check that off_t can represent 2**63 - 1 correctly.
4622     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4623     since some C++ compilers masquerading as C compilers
4624     incorrectly reject 9223372036854775807.  */
4625 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4626   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4627                        && LARGE_OFF_T % 2147483647 == 1)
4628                       ? 1 : -1];
4629 int
4630 main ()
4631 {
4632
4633   ;
4634   return 0;
4635 }
4636 _ACEOF
4637 if ac_fn_c_try_compile "$LINENO"; then :
4638   ac_cv_sys_file_offset_bits=64; break
4639 fi
4640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4641   ac_cv_sys_file_offset_bits=unknown
4642   break
4643 done
4644 fi
4645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4646 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4647 case $ac_cv_sys_file_offset_bits in #(
4648   no | unknown) ;;
4649   *)
4650 cat >>confdefs.h <<_ACEOF
4651 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4652 _ACEOF
4653 ;;
4654 esac
4655 rm -rf conftest*
4656   if test $ac_cv_sys_file_offset_bits = unknown; then
4657     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4658 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4659 if test "${ac_cv_sys_large_files+set}" = set; then :
4660   $as_echo_n "(cached) " >&6
4661 else
4662   while :; do
4663   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4664 /* end confdefs.h.  */
4665 #include <sys/types.h>
4666  /* Check that off_t can represent 2**63 - 1 correctly.
4667     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4668     since some C++ compilers masquerading as C compilers
4669     incorrectly reject 9223372036854775807.  */
4670 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4671   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4672                        && LARGE_OFF_T % 2147483647 == 1)
4673                       ? 1 : -1];
4674 int
4675 main ()
4676 {
4677
4678   ;
4679   return 0;
4680 }
4681 _ACEOF
4682 if ac_fn_c_try_compile "$LINENO"; then :
4683   ac_cv_sys_large_files=no; break
4684 fi
4685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687 /* end confdefs.h.  */
4688 #define _LARGE_FILES 1
4689 #include <sys/types.h>
4690  /* Check that off_t can represent 2**63 - 1 correctly.
4691     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4692     since some C++ compilers masquerading as C compilers
4693     incorrectly reject 9223372036854775807.  */
4694 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4695   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4696                        && LARGE_OFF_T % 2147483647 == 1)
4697                       ? 1 : -1];
4698 int
4699 main ()
4700 {
4701
4702   ;
4703   return 0;
4704 }
4705 _ACEOF
4706 if ac_fn_c_try_compile "$LINENO"; then :
4707   ac_cv_sys_large_files=1; break
4708 fi
4709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4710   ac_cv_sys_large_files=unknown
4711   break
4712 done
4713 fi
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4715 $as_echo "$ac_cv_sys_large_files" >&6; }
4716 case $ac_cv_sys_large_files in #(
4717   no | unknown) ;;
4718   *)
4719 cat >>confdefs.h <<_ACEOF
4720 #define _LARGE_FILES $ac_cv_sys_large_files
4721 _ACEOF
4722 ;;
4723 esac
4724 rm -rf conftest*
4725   fi
4726 fi
4727
4728
4729
4730
4731
4732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4733 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4734 if test "${am_cv_prog_cc_stdc+set}" = set; then :
4735   $as_echo_n "(cached) " >&6
4736 else
4737   am_cv_prog_cc_stdc=no
4738 ac_save_CC="$CC"
4739 # Don't try gcc -ansi; that turns off useful extensions and
4740 # breaks some systems' header files.
4741 # AIX                   -qlanglvl=ansi
4742 # Ultrix and OSF/1      -std1
4743 # HP-UX 10.20 and later -Ae
4744 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4745 # SVR4                  -Xc -D__EXTENSIONS__
4746 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4747 do
4748   CC="$ac_save_CC $ac_arg"
4749   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4750 /* end confdefs.h.  */
4751 #include <stdarg.h>
4752 #include <stdio.h>
4753 #include <sys/types.h>
4754 #include <sys/stat.h>
4755 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4756 struct buf { int x; };
4757 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4758 static char *e (p, i)
4759      char **p;
4760      int i;
4761 {
4762   return p[i];
4763 }
4764 static char *f (char * (*g) (char **, int), char **p, ...)
4765 {
4766   char *s;
4767   va_list v;
4768   va_start (v,p);
4769   s = g (p, va_arg (v,int));
4770   va_end (v);
4771   return s;
4772 }
4773 int test (int i, double x);
4774 struct s1 {int (*f) (int a);};
4775 struct s2 {int (*f) (double a);};
4776 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4777 int argc;
4778 char **argv;
4779
4780 int
4781 main ()
4782 {
4783
4784 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4785
4786   ;
4787   return 0;
4788 }
4789 _ACEOF
4790 if ac_fn_c_try_compile "$LINENO"; then :
4791   am_cv_prog_cc_stdc="$ac_arg"; break
4792 fi
4793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4794 done
4795 CC="$ac_save_CC"
4796
4797 fi
4798
4799 if test -z "$am_cv_prog_cc_stdc"; then
4800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4801 $as_echo "none needed" >&6; }
4802 else
4803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4804 $as_echo "$am_cv_prog_cc_stdc" >&6; }
4805 fi
4806 case "x$am_cv_prog_cc_stdc" in
4807   x|xno) ;;
4808   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4809 esac
4810
4811 # expand $ac_aux_dir to an absolute path
4812 am_aux_dir=`cd $ac_aux_dir && pwd`
4813
4814 if test x"${install_sh}" != xset; then
4815   case $am_aux_dir in
4816   *\ * | *\     *)
4817     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4818   *)
4819     install_sh="\${SHELL} $am_aux_dir/install-sh"
4820   esac
4821 fi
4822
4823 # Installed binaries are usually stripped using `strip' when the user
4824 # run `make install-strip'.  However `strip' might not be the right
4825 # tool to use in cross-compilation environments, therefore Automake
4826 # will honor the `STRIP' environment variable to overrule this program.
4827 if test "$cross_compiling" != no; then
4828   if test -n "$ac_tool_prefix"; then
4829   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4830 set dummy ${ac_tool_prefix}strip; ac_word=$2
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4832 $as_echo_n "checking for $ac_word... " >&6; }
4833 if test "${ac_cv_prog_STRIP+set}" = set; then :
4834   $as_echo_n "(cached) " >&6
4835 else
4836   if test -n "$STRIP"; then
4837   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4838 else
4839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4840 for as_dir in $PATH
4841 do
4842   IFS=$as_save_IFS
4843   test -z "$as_dir" && as_dir=.
4844     for ac_exec_ext in '' $ac_executable_extensions; do
4845   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4846     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4847     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4848     break 2
4849   fi
4850 done
4851   done
4852 IFS=$as_save_IFS
4853
4854 fi
4855 fi
4856 STRIP=$ac_cv_prog_STRIP
4857 if test -n "$STRIP"; then
4858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4859 $as_echo "$STRIP" >&6; }
4860 else
4861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862 $as_echo "no" >&6; }
4863 fi
4864
4865
4866 fi
4867 if test -z "$ac_cv_prog_STRIP"; then
4868   ac_ct_STRIP=$STRIP
4869   # Extract the first word of "strip", so it can be a program name with args.
4870 set dummy strip; ac_word=$2
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4872 $as_echo_n "checking for $ac_word... " >&6; }
4873 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4874   $as_echo_n "(cached) " >&6
4875 else
4876   if test -n "$ac_ct_STRIP"; then
4877   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4878 else
4879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4880 for as_dir in $PATH
4881 do
4882   IFS=$as_save_IFS
4883   test -z "$as_dir" && as_dir=.
4884     for ac_exec_ext in '' $ac_executable_extensions; do
4885   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4886     ac_cv_prog_ac_ct_STRIP="strip"
4887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4888     break 2
4889   fi
4890 done
4891   done
4892 IFS=$as_save_IFS
4893
4894 fi
4895 fi
4896 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4897 if test -n "$ac_ct_STRIP"; then
4898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4899 $as_echo "$ac_ct_STRIP" >&6; }
4900 else
4901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4902 $as_echo "no" >&6; }
4903 fi
4904
4905   if test "x$ac_ct_STRIP" = x; then
4906     STRIP=":"
4907   else
4908     case $cross_compiling:$ac_tool_warned in
4909 yes:)
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4911 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4912 ac_tool_warned=yes ;;
4913 esac
4914     STRIP=$ac_ct_STRIP
4915   fi
4916 else
4917   STRIP="$ac_cv_prog_STRIP"
4918 fi
4919
4920 fi
4921 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4922
4923
4924 ac_aux_dir=
4925 for ac_dir in .. "$srcdir"/..; do
4926   for ac_t in install-sh install.sh shtool; do
4927     if test -f "$ac_dir/$ac_t"; then
4928       ac_aux_dir=$ac_dir
4929       ac_install_sh="$ac_aux_dir/$ac_t -c"
4930       break 2
4931     fi
4932   done
4933 done
4934 if test -z "$ac_aux_dir"; then
4935   as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
4936 fi
4937
4938 # These three variables are undocumented and unsupported,
4939 # and are intended to be withdrawn in a future Autoconf release.
4940 # They can cause serious problems if a builder's source tree is in a directory
4941 # whose full name contains unusual characters.
4942 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4943 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4944 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4945
4946
4947
4948 test "$program_prefix" != NONE &&
4949   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4950 # Use a double $ so make ignores it.
4951 test "$program_suffix" != NONE &&
4952   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4953 # Double any \ or $.
4954 # By default was `s,x,x', remove it if useless.
4955 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4956 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4957
4958
4959 # We require a C++11 compiler.  Check if one is available, and if
4960 # necessary, set CXX_DIALECT to some -std=xxx switch.
4961
4962       ax_cxx_compile_cxx11_required=true
4963   ac_ext=cpp
4964 ac_cpp='$CXXCPP $CPPFLAGS'
4965 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4966 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4967 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4968   CXX_DIALECT=""
4969   ac_success=no
4970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4971 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
4972 if test "${ax_cv_cxx_compile_cxx11+set}" = set; then :
4973   $as_echo_n "(cached) " >&6
4974 else
4975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4976 /* end confdefs.h.  */
4977
4978
4979 // If the compiler admits that it is not ready for C++11, why torture it?
4980 // Hopefully, this will speed up the test.
4981
4982 #ifndef __cplusplus
4983
4984 #error "This is not a C++ compiler"
4985
4986 #elif __cplusplus < 201103L
4987
4988 #error "This is not a C++11 compiler"
4989
4990 #else
4991
4992 namespace cxx11
4993 {
4994
4995   namespace test_static_assert
4996   {
4997
4998     template <typename T>
4999     struct check
5000     {
5001       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5002     };
5003
5004   }
5005
5006   namespace test_final_override
5007   {
5008
5009     struct Base
5010     {
5011       virtual void f() {}
5012     };
5013
5014     struct Derived : public Base
5015     {
5016       virtual void f() override {}
5017     };
5018
5019   }
5020
5021   namespace test_double_right_angle_brackets
5022   {
5023
5024     template < typename T >
5025     struct check {};
5026
5027     typedef check<void> single_type;
5028     typedef check<check<void>> double_type;
5029     typedef check<check<check<void>>> triple_type;
5030     typedef check<check<check<check<void>>>> quadruple_type;
5031
5032   }
5033
5034   namespace test_decltype
5035   {
5036
5037     int
5038     f()
5039     {
5040       int a = 1;
5041       decltype(a) b = 2;
5042       return a + b;
5043     }
5044
5045   }
5046
5047   namespace test_type_deduction
5048   {
5049
5050     template < typename T1, typename T2 >
5051     struct is_same
5052     {
5053       static const bool value = false;
5054     };
5055
5056     template < typename T >
5057     struct is_same<T, T>
5058     {
5059       static const bool value = true;
5060     };
5061
5062     template < typename T1, typename T2 >
5063     auto
5064     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5065     {
5066       return a1 + a2;
5067     }
5068
5069     int
5070     test(const int c, volatile int v)
5071     {
5072       static_assert(is_same<int, decltype(0)>::value == true, "");
5073       static_assert(is_same<int, decltype(c)>::value == false, "");
5074       static_assert(is_same<int, decltype(v)>::value == false, "");
5075       auto ac = c;
5076       auto av = v;
5077       auto sumi = ac + av + 'x';
5078       auto sumf = ac + av + 1.0;
5079       static_assert(is_same<int, decltype(ac)>::value == true, "");
5080       static_assert(is_same<int, decltype(av)>::value == true, "");
5081       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5082       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5083       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5084       return (sumf > 0.0) ? sumi : add(c, v);
5085     }
5086
5087   }
5088
5089   namespace test_noexcept
5090   {
5091
5092     int f() { return 0; }
5093     int g() noexcept { return 0; }
5094
5095     static_assert(noexcept(f()) == false, "");
5096     static_assert(noexcept(g()) == true, "");
5097
5098   }
5099
5100   namespace test_constexpr
5101   {
5102
5103     template < typename CharT >
5104     unsigned long constexpr
5105     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5106     {
5107       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5108     }
5109
5110     template < typename CharT >
5111     unsigned long constexpr
5112     strlen_c(const CharT *const s) noexcept
5113     {
5114       return strlen_c_r(s, 0UL);
5115     }
5116
5117     static_assert(strlen_c("") == 0UL, "");
5118     static_assert(strlen_c("1") == 1UL, "");
5119     static_assert(strlen_c("example") == 7UL, "");
5120     static_assert(strlen_c("another\0example") == 7UL, "");
5121
5122   }
5123
5124   namespace test_rvalue_references
5125   {
5126
5127     template < int N >
5128     struct answer
5129     {
5130       static constexpr int value = N;
5131     };
5132
5133     answer<1> f(int&)       { return answer<1>(); }
5134     answer<2> f(const int&) { return answer<2>(); }
5135     answer<3> f(int&&)      { return answer<3>(); }
5136
5137     void
5138     test()
5139     {
5140       int i = 0;
5141       const int c = 0;
5142       static_assert(decltype(f(i))::value == 1, "");
5143       static_assert(decltype(f(c))::value == 2, "");
5144       static_assert(decltype(f(0))::value == 3, "");
5145     }
5146
5147   }
5148
5149   namespace test_uniform_initialization
5150   {
5151
5152     struct test
5153     {
5154       static const int zero {};
5155       static const int one {1};
5156     };
5157
5158     static_assert(test::zero == 0, "");
5159     static_assert(test::one == 1, "");
5160
5161   }
5162
5163   namespace test_lambdas
5164   {
5165
5166     void
5167     test1()
5168     {
5169       auto lambda1 = [](){};
5170       auto lambda2 = lambda1;
5171       lambda1();
5172       lambda2();
5173     }
5174
5175     int
5176     test2()
5177     {
5178       auto a = [](int i, int j){ return i + j; }(1, 2);
5179       auto b = []() -> int { return '0'; }();
5180       auto c = [=](){ return a + b; }();
5181       auto d = [&](){ return c; }();
5182       auto e = [a, &b](int x) mutable {
5183         const auto identity = [](int y){ return y; };
5184         for (auto i = 0; i < a; ++i)
5185           a += b--;
5186         return x + identity(a + b);
5187       }(0);
5188       return a + b + c + d + e;
5189     }
5190
5191     int
5192     test3()
5193     {
5194       const auto nullary = [](){ return 0; };
5195       const auto unary = [](int x){ return x; };
5196       using nullary_t = decltype(nullary);
5197       using unary_t = decltype(unary);
5198       const auto higher1st = [](nullary_t f){ return f(); };
5199       const auto higher2nd = [unary](nullary_t f1){
5200         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5201       };
5202       return higher1st(nullary) + higher2nd(nullary)(unary);
5203     }
5204
5205   }
5206
5207   namespace test_variadic_templates
5208   {
5209
5210     template <int...>
5211     struct sum;
5212
5213     template <int N0, int... N1toN>
5214     struct sum<N0, N1toN...>
5215     {
5216       static constexpr auto value = N0 + sum<N1toN...>::value;
5217     };
5218
5219     template <>
5220     struct sum<>
5221     {
5222       static constexpr auto value = 0;
5223     };
5224
5225     static_assert(sum<>::value == 0, "");
5226     static_assert(sum<1>::value == 1, "");
5227     static_assert(sum<23>::value == 23, "");
5228     static_assert(sum<1, 2>::value == 3, "");
5229     static_assert(sum<5, 5, 11>::value == 21, "");
5230     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5231
5232   }
5233
5234   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5235   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5236   // because of this.
5237   namespace test_template_alias_sfinae
5238   {
5239
5240     struct foo {};
5241
5242     template<typename T>
5243     using member = typename T::member_type;
5244
5245     template<typename T>
5246     void func(...) {}
5247
5248     template<typename T>
5249     void func(member<T>*) {}
5250
5251     void test();
5252
5253     void test() { func<foo>(0); }
5254
5255   }
5256
5257 }  // namespace cxx11
5258
5259 #endif  // __cplusplus >= 201103L
5260
5261
5262
5263 _ACEOF
5264 if ac_fn_cxx_try_compile "$LINENO"; then :
5265   ax_cv_cxx_compile_cxx11=yes
5266 else
5267   ax_cv_cxx_compile_cxx11=no
5268 fi
5269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5270 fi
5271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5272 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5273   if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5274     ac_success=yes
5275   fi
5276
5277     if test x$ac_success = xno; then
5278     for switch in -std=gnu++11 -std=gnu++0x; do
5279       cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5280       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5281 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5282 if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5283   $as_echo_n "(cached) " >&6
5284 else
5285   ac_save_CXX="$CXX"
5286          CXX="$CXX $switch"
5287          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5288 /* end confdefs.h.  */
5289
5290
5291 // If the compiler admits that it is not ready for C++11, why torture it?
5292 // Hopefully, this will speed up the test.
5293
5294 #ifndef __cplusplus
5295
5296 #error "This is not a C++ compiler"
5297
5298 #elif __cplusplus < 201103L
5299
5300 #error "This is not a C++11 compiler"
5301
5302 #else
5303
5304 namespace cxx11
5305 {
5306
5307   namespace test_static_assert
5308   {
5309
5310     template <typename T>
5311     struct check
5312     {
5313       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5314     };
5315
5316   }
5317
5318   namespace test_final_override
5319   {
5320
5321     struct Base
5322     {
5323       virtual void f() {}
5324     };
5325
5326     struct Derived : public Base
5327     {
5328       virtual void f() override {}
5329     };
5330
5331   }
5332
5333   namespace test_double_right_angle_brackets
5334   {
5335
5336     template < typename T >
5337     struct check {};
5338
5339     typedef check<void> single_type;
5340     typedef check<check<void>> double_type;
5341     typedef check<check<check<void>>> triple_type;
5342     typedef check<check<check<check<void>>>> quadruple_type;
5343
5344   }
5345
5346   namespace test_decltype
5347   {
5348
5349     int
5350     f()
5351     {
5352       int a = 1;
5353       decltype(a) b = 2;
5354       return a + b;
5355     }
5356
5357   }
5358
5359   namespace test_type_deduction
5360   {
5361
5362     template < typename T1, typename T2 >
5363     struct is_same
5364     {
5365       static const bool value = false;
5366     };
5367
5368     template < typename T >
5369     struct is_same<T, T>
5370     {
5371       static const bool value = true;
5372     };
5373
5374     template < typename T1, typename T2 >
5375     auto
5376     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5377     {
5378       return a1 + a2;
5379     }
5380
5381     int
5382     test(const int c, volatile int v)
5383     {
5384       static_assert(is_same<int, decltype(0)>::value == true, "");
5385       static_assert(is_same<int, decltype(c)>::value == false, "");
5386       static_assert(is_same<int, decltype(v)>::value == false, "");
5387       auto ac = c;
5388       auto av = v;
5389       auto sumi = ac + av + 'x';
5390       auto sumf = ac + av + 1.0;
5391       static_assert(is_same<int, decltype(ac)>::value == true, "");
5392       static_assert(is_same<int, decltype(av)>::value == true, "");
5393       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5394       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5395       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5396       return (sumf > 0.0) ? sumi : add(c, v);
5397     }
5398
5399   }
5400
5401   namespace test_noexcept
5402   {
5403
5404     int f() { return 0; }
5405     int g() noexcept { return 0; }
5406
5407     static_assert(noexcept(f()) == false, "");
5408     static_assert(noexcept(g()) == true, "");
5409
5410   }
5411
5412   namespace test_constexpr
5413   {
5414
5415     template < typename CharT >
5416     unsigned long constexpr
5417     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5418     {
5419       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5420     }
5421
5422     template < typename CharT >
5423     unsigned long constexpr
5424     strlen_c(const CharT *const s) noexcept
5425     {
5426       return strlen_c_r(s, 0UL);
5427     }
5428
5429     static_assert(strlen_c("") == 0UL, "");
5430     static_assert(strlen_c("1") == 1UL, "");
5431     static_assert(strlen_c("example") == 7UL, "");
5432     static_assert(strlen_c("another\0example") == 7UL, "");
5433
5434   }
5435
5436   namespace test_rvalue_references
5437   {
5438
5439     template < int N >
5440     struct answer
5441     {
5442       static constexpr int value = N;
5443     };
5444
5445     answer<1> f(int&)       { return answer<1>(); }
5446     answer<2> f(const int&) { return answer<2>(); }
5447     answer<3> f(int&&)      { return answer<3>(); }
5448
5449     void
5450     test()
5451     {
5452       int i = 0;
5453       const int c = 0;
5454       static_assert(decltype(f(i))::value == 1, "");
5455       static_assert(decltype(f(c))::value == 2, "");
5456       static_assert(decltype(f(0))::value == 3, "");
5457     }
5458
5459   }
5460
5461   namespace test_uniform_initialization
5462   {
5463
5464     struct test
5465     {
5466       static const int zero {};
5467       static const int one {1};
5468     };
5469
5470     static_assert(test::zero == 0, "");
5471     static_assert(test::one == 1, "");
5472
5473   }
5474
5475   namespace test_lambdas
5476   {
5477
5478     void
5479     test1()
5480     {
5481       auto lambda1 = [](){};
5482       auto lambda2 = lambda1;
5483       lambda1();
5484       lambda2();
5485     }
5486
5487     int
5488     test2()
5489     {
5490       auto a = [](int i, int j){ return i + j; }(1, 2);
5491       auto b = []() -> int { return '0'; }();
5492       auto c = [=](){ return a + b; }();
5493       auto d = [&](){ return c; }();
5494       auto e = [a, &b](int x) mutable {
5495         const auto identity = [](int y){ return y; };
5496         for (auto i = 0; i < a; ++i)
5497           a += b--;
5498         return x + identity(a + b);
5499       }(0);
5500       return a + b + c + d + e;
5501     }
5502
5503     int
5504     test3()
5505     {
5506       const auto nullary = [](){ return 0; };
5507       const auto unary = [](int x){ return x; };
5508       using nullary_t = decltype(nullary);
5509       using unary_t = decltype(unary);
5510       const auto higher1st = [](nullary_t f){ return f(); };
5511       const auto higher2nd = [unary](nullary_t f1){
5512         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5513       };
5514       return higher1st(nullary) + higher2nd(nullary)(unary);
5515     }
5516
5517   }
5518
5519   namespace test_variadic_templates
5520   {
5521
5522     template <int...>
5523     struct sum;
5524
5525     template <int N0, int... N1toN>
5526     struct sum<N0, N1toN...>
5527     {
5528       static constexpr auto value = N0 + sum<N1toN...>::value;
5529     };
5530
5531     template <>
5532     struct sum<>
5533     {
5534       static constexpr auto value = 0;
5535     };
5536
5537     static_assert(sum<>::value == 0, "");
5538     static_assert(sum<1>::value == 1, "");
5539     static_assert(sum<23>::value == 23, "");
5540     static_assert(sum<1, 2>::value == 3, "");
5541     static_assert(sum<5, 5, 11>::value == 21, "");
5542     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5543
5544   }
5545
5546   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5547   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5548   // because of this.
5549   namespace test_template_alias_sfinae
5550   {
5551
5552     struct foo {};
5553
5554     template<typename T>
5555     using member = typename T::member_type;
5556
5557     template<typename T>
5558     void func(...) {}
5559
5560     template<typename T>
5561     void func(member<T>*) {}
5562
5563     void test();
5564
5565     void test() { func<foo>(0); }
5566
5567   }
5568
5569 }  // namespace cxx11
5570
5571 #endif  // __cplusplus >= 201103L
5572
5573
5574
5575 _ACEOF
5576 if ac_fn_cxx_try_compile "$LINENO"; then :
5577   eval $cachevar=yes
5578 else
5579   eval $cachevar=no
5580 fi
5581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5582          CXX="$ac_save_CXX"
5583 fi
5584 eval ac_res=\$$cachevar
5585                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5586 $as_echo "$ac_res" >&6; }
5587       if eval test x\$$cachevar = xyes; then
5588         CXX_DIALECT="$switch"
5589         ac_success=yes
5590         break
5591       fi
5592     done
5593   fi
5594
5595     if test x$ac_success = xno; then
5596                 for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
5597       cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5598       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5599 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5600 if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5601   $as_echo_n "(cached) " >&6
5602 else
5603   ac_save_CXX="$CXX"
5604          CXX="$CXX $switch"
5605          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5606 /* end confdefs.h.  */
5607
5608
5609 // If the compiler admits that it is not ready for C++11, why torture it?
5610 // Hopefully, this will speed up the test.
5611
5612 #ifndef __cplusplus
5613
5614 #error "This is not a C++ compiler"
5615
5616 #elif __cplusplus < 201103L
5617
5618 #error "This is not a C++11 compiler"
5619
5620 #else
5621
5622 namespace cxx11
5623 {
5624
5625   namespace test_static_assert
5626   {
5627
5628     template <typename T>
5629     struct check
5630     {
5631       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5632     };
5633
5634   }
5635
5636   namespace test_final_override
5637   {
5638
5639     struct Base
5640     {
5641       virtual void f() {}
5642     };
5643
5644     struct Derived : public Base
5645     {
5646       virtual void f() override {}
5647     };
5648
5649   }
5650
5651   namespace test_double_right_angle_brackets
5652   {
5653
5654     template < typename T >
5655     struct check {};
5656
5657     typedef check<void> single_type;
5658     typedef check<check<void>> double_type;
5659     typedef check<check<check<void>>> triple_type;
5660     typedef check<check<check<check<void>>>> quadruple_type;
5661
5662   }
5663
5664   namespace test_decltype
5665   {
5666
5667     int
5668     f()
5669     {
5670       int a = 1;
5671       decltype(a) b = 2;
5672       return a + b;
5673     }
5674
5675   }
5676
5677   namespace test_type_deduction
5678   {
5679
5680     template < typename T1, typename T2 >
5681     struct is_same
5682     {
5683       static const bool value = false;
5684     };
5685
5686     template < typename T >
5687     struct is_same<T, T>
5688     {
5689       static const bool value = true;
5690     };
5691
5692     template < typename T1, typename T2 >
5693     auto
5694     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5695     {
5696       return a1 + a2;
5697     }
5698
5699     int
5700     test(const int c, volatile int v)
5701     {
5702       static_assert(is_same<int, decltype(0)>::value == true, "");
5703       static_assert(is_same<int, decltype(c)>::value == false, "");
5704       static_assert(is_same<int, decltype(v)>::value == false, "");
5705       auto ac = c;
5706       auto av = v;
5707       auto sumi = ac + av + 'x';
5708       auto sumf = ac + av + 1.0;
5709       static_assert(is_same<int, decltype(ac)>::value == true, "");
5710       static_assert(is_same<int, decltype(av)>::value == true, "");
5711       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5712       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5713       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5714       return (sumf > 0.0) ? sumi : add(c, v);
5715     }
5716
5717   }
5718
5719   namespace test_noexcept
5720   {
5721
5722     int f() { return 0; }
5723     int g() noexcept { return 0; }
5724
5725     static_assert(noexcept(f()) == false, "");
5726     static_assert(noexcept(g()) == true, "");
5727
5728   }
5729
5730   namespace test_constexpr
5731   {
5732
5733     template < typename CharT >
5734     unsigned long constexpr
5735     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5736     {
5737       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5738     }
5739
5740     template < typename CharT >
5741     unsigned long constexpr
5742     strlen_c(const CharT *const s) noexcept
5743     {
5744       return strlen_c_r(s, 0UL);
5745     }
5746
5747     static_assert(strlen_c("") == 0UL, "");
5748     static_assert(strlen_c("1") == 1UL, "");
5749     static_assert(strlen_c("example") == 7UL, "");
5750     static_assert(strlen_c("another\0example") == 7UL, "");
5751
5752   }
5753
5754   namespace test_rvalue_references
5755   {
5756
5757     template < int N >
5758     struct answer
5759     {
5760       static constexpr int value = N;
5761     };
5762
5763     answer<1> f(int&)       { return answer<1>(); }
5764     answer<2> f(const int&) { return answer<2>(); }
5765     answer<3> f(int&&)      { return answer<3>(); }
5766
5767     void
5768     test()
5769     {
5770       int i = 0;
5771       const int c = 0;
5772       static_assert(decltype(f(i))::value == 1, "");
5773       static_assert(decltype(f(c))::value == 2, "");
5774       static_assert(decltype(f(0))::value == 3, "");
5775     }
5776
5777   }
5778
5779   namespace test_uniform_initialization
5780   {
5781
5782     struct test
5783     {
5784       static const int zero {};
5785       static const int one {1};
5786     };
5787
5788     static_assert(test::zero == 0, "");
5789     static_assert(test::one == 1, "");
5790
5791   }
5792
5793   namespace test_lambdas
5794   {
5795
5796     void
5797     test1()
5798     {
5799       auto lambda1 = [](){};
5800       auto lambda2 = lambda1;
5801       lambda1();
5802       lambda2();
5803     }
5804
5805     int
5806     test2()
5807     {
5808       auto a = [](int i, int j){ return i + j; }(1, 2);
5809       auto b = []() -> int { return '0'; }();
5810       auto c = [=](){ return a + b; }();
5811       auto d = [&](){ return c; }();
5812       auto e = [a, &b](int x) mutable {
5813         const auto identity = [](int y){ return y; };
5814         for (auto i = 0; i < a; ++i)
5815           a += b--;
5816         return x + identity(a + b);
5817       }(0);
5818       return a + b + c + d + e;
5819     }
5820
5821     int
5822     test3()
5823     {
5824       const auto nullary = [](){ return 0; };
5825       const auto unary = [](int x){ return x; };
5826       using nullary_t = decltype(nullary);
5827       using unary_t = decltype(unary);
5828       const auto higher1st = [](nullary_t f){ return f(); };
5829       const auto higher2nd = [unary](nullary_t f1){
5830         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5831       };
5832       return higher1st(nullary) + higher2nd(nullary)(unary);
5833     }
5834
5835   }
5836
5837   namespace test_variadic_templates
5838   {
5839
5840     template <int...>
5841     struct sum;
5842
5843     template <int N0, int... N1toN>
5844     struct sum<N0, N1toN...>
5845     {
5846       static constexpr auto value = N0 + sum<N1toN...>::value;
5847     };
5848
5849     template <>
5850     struct sum<>
5851     {
5852       static constexpr auto value = 0;
5853     };
5854
5855     static_assert(sum<>::value == 0, "");
5856     static_assert(sum<1>::value == 1, "");
5857     static_assert(sum<23>::value == 23, "");
5858     static_assert(sum<1, 2>::value == 3, "");
5859     static_assert(sum<5, 5, 11>::value == 21, "");
5860     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5861
5862   }
5863
5864   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5865   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5866   // because of this.
5867   namespace test_template_alias_sfinae
5868   {
5869
5870     struct foo {};
5871
5872     template<typename T>
5873     using member = typename T::member_type;
5874
5875     template<typename T>
5876     void func(...) {}
5877
5878     template<typename T>
5879     void func(member<T>*) {}
5880
5881     void test();
5882
5883     void test() { func<foo>(0); }
5884
5885   }
5886
5887 }  // namespace cxx11
5888
5889 #endif  // __cplusplus >= 201103L
5890
5891
5892
5893 _ACEOF
5894 if ac_fn_cxx_try_compile "$LINENO"; then :
5895   eval $cachevar=yes
5896 else
5897   eval $cachevar=no
5898 fi
5899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5900          CXX="$ac_save_CXX"
5901 fi
5902 eval ac_res=\$$cachevar
5903                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5904 $as_echo "$ac_res" >&6; }
5905       if eval test x\$$cachevar = xyes; then
5906         CXX_DIALECT="$switch"
5907         ac_success=yes
5908         break
5909       fi
5910     done
5911   fi
5912   ac_ext=c
5913 ac_cpp='$CPP $CPPFLAGS'
5914 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5915 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5916 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5917
5918   if test x$ax_cxx_compile_cxx11_required = xtrue; then
5919     if test x$ac_success = xno; then
5920       as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5921     fi
5922   fi
5923   if test x$ac_success = xno; then
5924     HAVE_CXX11=0
5925     { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5926 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5927   else
5928     HAVE_CXX11=1
5929
5930 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
5931
5932   fi
5933
5934
5935
5936
5937 # Dependency checking.
5938 rm -rf .tst 2>/dev/null
5939 mkdir .tst 2>/dev/null
5940 if test -d .tst; then
5941   am__leading_dot=.
5942 else
5943   am__leading_dot=_
5944 fi
5945 rmdir .tst 2>/dev/null
5946
5947 DEPDIR="${am__leading_dot}deps"
5948
5949 ac_config_commands="$ac_config_commands depdir"
5950
5951
5952 depcc="$CC"   am_compiler_list=
5953
5954 am_depcomp=$ac_aux_dir/depcomp
5955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5956 $as_echo_n "checking dependency style of $depcc... " >&6; }
5957 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5958   $as_echo_n "(cached) " >&6
5959 else
5960   if test -f "$am_depcomp"; then
5961   # We make a subdir and do the tests there.  Otherwise we can end up
5962   # making bogus files that we don't know about and never remove.  For
5963   # instance it was reported that on HP-UX the gcc test will end up
5964   # making a dummy file named `D' -- because `-MD' means `put the output
5965   # in D'.
5966   mkdir conftest.dir
5967   # Copy depcomp to subdir because otherwise we won't find it if we're
5968   # using a relative directory.
5969   cp "$am_depcomp" conftest.dir
5970   cd conftest.dir
5971   # We will build objects and dependencies in a subdirectory because
5972   # it helps to detect inapplicable dependency modes.  For instance
5973   # both Tru64's cc and ICC support -MD to output dependencies as a
5974   # side effect of compilation, but ICC will put the dependencies in
5975   # the current directory while Tru64 will put them in the object
5976   # directory.
5977   mkdir sub
5978
5979   am_cv_CC_dependencies_compiler_type=none
5980   if test "$am_compiler_list" = ""; then
5981      am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5982   fi
5983   for depmode in $am_compiler_list; do
5984     if test $depmode = none; then break; fi
5985
5986     $as_echo "$as_me:$LINENO: trying $depmode" >&5
5987     # Setup a source with many dependencies, because some compilers
5988     # like to wrap large dependency lists on column 80 (with \), and
5989     # we should not choose a depcomp mode which is confused by this.
5990     #
5991     # We need to recreate these files for each test, as the compiler may
5992     # overwrite some of them when testing with obscure command lines.
5993     # This happens at least with the AIX C compiler.
5994     : > sub/conftest.c
5995     for i in 1 2 3 4 5 6; do
5996       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5997       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5998       # Solaris 8's {/usr,}/bin/sh.
5999       touch sub/conftst$i.h
6000     done
6001     echo "include sub/conftest.Po" > confmf
6002
6003     # We check with `-c' and `-o' for the sake of the "dashmstdout"
6004     # mode.  It turns out that the SunPro C++ compiler does not properly
6005     # handle `-M -o', and we need to detect this.
6006     depcmd="depmode=$depmode \
6007        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6008        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6009        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6010     echo "| $depcmd" | sed -e 's/  */ /g' >&5
6011     if env $depcmd > conftest.err 2>&1 &&
6012        grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6013        grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6014        ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6015       # icc doesn't choke on unknown options, it will just issue warnings
6016       # or remarks (even with -Werror).  So we grep stderr for any message
6017       # that says an option was ignored or not supported.
6018       # When given -MP, icc 7.0 and 7.1 complain thusly:
6019       #   icc: Command line warning: ignoring option '-M'; no argument required
6020       # The diagnosis changed in icc 8.0:
6021       #   icc: Command line remark: option '-MP' not supported
6022       if (grep 'ignoring option' conftest.err ||
6023           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6024         am_cv_CC_dependencies_compiler_type=$depmode
6025         $as_echo "$as_me:$LINENO: success" >&5
6026         break
6027       fi
6028     fi
6029     $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6030     sed -e 's/^/| /' < conftest.err >&5
6031   done
6032
6033   cd ..
6034   rm -rf conftest.dir
6035 else
6036   am_cv_CC_dependencies_compiler_type=none
6037 fi
6038
6039 fi
6040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6041 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6042 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6043 then as_fn_error "no usable dependency style found" "$LINENO" 5
6044 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6045
6046 fi
6047
6048
6049 gnulib_extra_configure_args=
6050 # If large-file support is disabled, make sure gnulib does the same.
6051 if test "$enable_largefile" = no; then
6052 gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6053 fi
6054
6055 # Configure gnulib.  We need to build gnulib under some other
6056 # directory not "gnulib", to avoid the problem of both GDB and
6057 # GDBserver wanting to build it in the same directory, when building
6058 # in the source dir.
6059
6060   in_src="gnulib"
6061   in_build="build-gnulib"
6062   in_extra_args="$gnulib_extra_configure_args"
6063
6064   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6065   # so they do not pile up.
6066   ac_sub_configure_args=
6067   ac_prev=
6068   eval "set x $ac_configure_args"
6069   shift
6070   for ac_arg
6071   do
6072     if test -n "$ac_prev"; then
6073       ac_prev=
6074       continue
6075     fi
6076     case $ac_arg in
6077     -cache-file | --cache-file | --cache-fil | --cache-fi \
6078     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6079       ac_prev=cache_file ;;
6080     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6081     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6082     | --c=*)
6083       ;;
6084     --config-cache | -C)
6085       ;;
6086     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6087       ac_prev=srcdir ;;
6088     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6089       ;;
6090     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6091       ac_prev=prefix ;;
6092     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6093       ;;
6094     --disable-option-checking)
6095       ;;
6096     *)
6097       case $ac_arg in
6098       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6099       esac
6100       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6101     esac
6102   done
6103
6104   # Always prepend --prefix to ensure using the same prefix
6105   # in subdir configurations.
6106   ac_arg="--prefix=$prefix"
6107   case $ac_arg in
6108   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6109   esac
6110   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6111
6112   # Pass --silent
6113   if test "$silent" = yes; then
6114     ac_sub_configure_args="--silent $ac_sub_configure_args"
6115   fi
6116
6117   # Always prepend --disable-option-checking to silence warnings, since
6118   # different subdirs can have different --enable and --with options.
6119   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6120
6121   ac_popdir=`pwd`
6122   ac_dir=$in_build
6123
6124   ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6125   $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6126   $as_echo "$ac_msg" >&6
6127   as_dir="$ac_dir"; as_fn_mkdir_p
6128
6129   case $srcdir in
6130   [\\/]* | ?:[\\/]* )
6131     ac_srcdir=$srcdir/$in_src ;;
6132   *) # Relative name.
6133     ac_srcdir=../$srcdir/$in_src ;;
6134   esac
6135
6136   cd "$ac_dir"
6137
6138   ac_sub_configure=$ac_srcdir/configure
6139
6140   # Make the cache file name correct relative to the subdirectory.
6141   case $cache_file in
6142   [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6143   *) # Relative name.
6144     ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6145   esac
6146
6147   if test -n "$in_extra_args"; then
6148     # Add the extra args at the end.
6149     ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6150   fi
6151
6152   { $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
6153 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6154   # The eval makes quoting arguments work.
6155   eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6156        --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6157     as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6158
6159   cd "$ac_popdir"
6160
6161
6162
6163 CONFIG_OBS=
6164 CONFIG_DEPS=
6165 CONFIG_SRCS=
6166 ENABLE_CFLAGS=
6167
6168 CONFIG_ALL=
6169 CONFIG_CLEAN=
6170 CONFIG_INSTALL=
6171 CONFIG_UNINSTALL=
6172
6173 # If we haven't got the data from the intl directory,
6174 # assume NLS is disabled.
6175 USE_NLS=no
6176 LIBINTL=
6177 LIBINTL_DEP=
6178 INCINTL=
6179 XGETTEXT=
6180 GMSGFMT=
6181 POSUB=
6182
6183 if test -f  ../intl/config.intl; then
6184   .  ../intl/config.intl
6185 fi
6186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6187 $as_echo_n "checking whether NLS is requested... " >&6; }
6188 if test x"$USE_NLS" != xyes; then
6189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6190 $as_echo "no" >&6; }
6191 else
6192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6193 $as_echo "yes" >&6; }
6194
6195 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6196
6197
6198   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6199 $as_echo_n "checking for catalogs to be installed... " >&6; }
6200   # Look for .po and .gmo files in the source directory.
6201   CATALOGS=
6202   XLINGUAS=
6203   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6204     # If there aren't any .gmo files the shell will give us the
6205     # literal string "../path/to/srcdir/po/*.gmo" which has to be
6206     # weeded out.
6207     case "$cat" in *\**)
6208       continue;;
6209     esac
6210     # The quadruple backslash is collapsed to a double backslash
6211     # by the backticks, then collapsed again by the double quotes,
6212     # leaving us with one backslash in the sed expression (right
6213     # before the dot that mustn't act as a wildcard).
6214     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6215     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6216     # The user is allowed to set LINGUAS to a list of languages to
6217     # install catalogs for.  If it's empty that means "all of them."
6218     if test "x$LINGUAS" = x; then
6219       CATALOGS="$CATALOGS $cat"
6220       XLINGUAS="$XLINGUAS $lang"
6221     else
6222       case "$LINGUAS" in *$lang*)
6223         CATALOGS="$CATALOGS $cat"
6224         XLINGUAS="$XLINGUAS $lang"
6225         ;;
6226       esac
6227     fi
6228   done
6229   LINGUAS="$XLINGUAS"
6230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6231 $as_echo "$LINGUAS" >&6; }
6232
6233
6234     DATADIRNAME=share
6235
6236   INSTOBJEXT=.mo
6237
6238   GENCAT=gencat
6239
6240   CATOBJEXT=.gmo
6241
6242 fi
6243
6244 localedir='${datadir}/locale'
6245
6246
6247 if test x"$USE_NLS" = xyes; then
6248    CONFIG_ALL="$CONFIG_ALL all-po"
6249    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6250    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6251    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6252 fi
6253
6254 GNULIB=build-gnulib/import
6255
6256 # For Makefile dependencies.
6257 GNULIB_STDINT_H=
6258 if test x"$STDINT_H" != x; then
6259   GNULIB_STDINT_H=$GNULIB/$STDINT_H
6260 fi
6261
6262
6263 PACKAGE=gdb
6264
6265 cat >>confdefs.h <<_ACEOF
6266 #define PACKAGE "$PACKAGE"
6267 _ACEOF
6268
6269
6270
6271 # We never need to detect it in this sub-configure.
6272 # But preserve it for config.status --recheck.
6273
6274
6275
6276 MAKEINFO_EXTRA_FLAGS=""
6277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6278 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6279 if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
6280   $as_echo_n "(cached) " >&6
6281 else
6282   echo '@clicksequence{a @click{} b}' >conftest.texinfo
6283   if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6284     gdb_cv_have_makeinfo_click=yes
6285   else
6286     gdb_cv_have_makeinfo_click=no
6287   fi
6288 fi
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6290 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6291 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6292   MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6293 fi
6294
6295
6296
6297
6298 # Check whether --with-separate-debug-dir was given.
6299 if test "${with_separate_debug_dir+set}" = set; then :
6300   withval=$with_separate_debug_dir;
6301     DEBUGDIR=$withval
6302 else
6303   DEBUGDIR=${libdir}/debug
6304 fi
6305
6306
6307   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6308   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6309   ac_define_dir=`eval echo $DEBUGDIR`
6310   ac_define_dir=`eval echo $ac_define_dir`
6311
6312 cat >>confdefs.h <<_ACEOF
6313 #define DEBUGDIR "$ac_define_dir"
6314 _ACEOF
6315
6316
6317
6318
6319   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6320      if test "x$prefix" = xNONE; then
6321         test_prefix=/usr/local
6322      else
6323         test_prefix=$prefix
6324      fi
6325   else
6326      test_prefix=$exec_prefix
6327   fi
6328   value=0
6329   case ${ac_define_dir} in
6330      "${test_prefix}"|"${test_prefix}/"*|\
6331         '${exec_prefix}'|'${exec_prefix}/'*)
6332      value=1
6333      ;;
6334   esac
6335
6336 cat >>confdefs.h <<_ACEOF
6337 #define DEBUGDIR_RELOCATABLE $value
6338 _ACEOF
6339
6340
6341
6342
6343 # We can't pass paths as command line arguments.
6344 # Mingw32 tries to be clever and will convert the paths for us.
6345 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6346 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6347 # This breaks GDB's relocatable path conversions since paths passed in
6348 # config.h would not get so translated, the path prefixes no longer match.
6349
6350   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6351   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6352   ac_define_dir=`eval echo $bindir`
6353   ac_define_dir=`eval echo $ac_define_dir`
6354
6355 cat >>confdefs.h <<_ACEOF
6356 #define BINDIR "$ac_define_dir"
6357 _ACEOF
6358
6359
6360
6361 # GDB's datadir relocation
6362
6363
6364
6365 # Check whether --with-gdb-datadir was given.
6366 if test "${with_gdb_datadir+set}" = set; then :
6367   withval=$with_gdb_datadir;
6368     GDB_DATADIR=$withval
6369 else
6370   GDB_DATADIR=${datadir}/gdb
6371 fi
6372
6373
6374   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6375   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6376   ac_define_dir=`eval echo $GDB_DATADIR`
6377   ac_define_dir=`eval echo $ac_define_dir`
6378
6379 cat >>confdefs.h <<_ACEOF
6380 #define GDB_DATADIR "$ac_define_dir"
6381 _ACEOF
6382
6383
6384
6385
6386   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6387      if test "x$prefix" = xNONE; then
6388         test_prefix=/usr/local
6389      else
6390         test_prefix=$prefix
6391      fi
6392   else
6393      test_prefix=$exec_prefix
6394   fi
6395   value=0
6396   case ${ac_define_dir} in
6397      "${test_prefix}"|"${test_prefix}/"*|\
6398         '${exec_prefix}'|'${exec_prefix}/'*)
6399      value=1
6400      ;;
6401   esac
6402
6403 cat >>confdefs.h <<_ACEOF
6404 #define GDB_DATADIR_RELOCATABLE $value
6405 _ACEOF
6406
6407
6408
6409
6410
6411 # Check whether --with-relocated-sources was given.
6412 if test "${with_relocated_sources+set}" = set; then :
6413   withval=$with_relocated_sources; reloc_srcdir="${withval}"
6414
6415   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6416   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6417   ac_define_dir=`eval echo $reloc_srcdir`
6418   ac_define_dir=`eval echo $ac_define_dir`
6419
6420 cat >>confdefs.h <<_ACEOF
6421 #define RELOC_SRCDIR "$ac_define_dir"
6422 _ACEOF
6423
6424
6425
6426 fi
6427
6428
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6430 $as_echo_n "checking for default auto-load directory... " >&6; }
6431
6432 # Check whether --with-auto-load-dir was given.
6433 if test "${with_auto_load_dir+set}" = set; then :
6434   withval=$with_auto_load_dir;
6435 else
6436   with_auto_load_dir='$debugdir:$datadir/auto-load'
6437 fi
6438
6439 escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6440
6441   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6442   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6443   ac_define_dir=`eval echo $escape_dir`
6444   ac_define_dir=`eval echo $ac_define_dir`
6445
6446 cat >>confdefs.h <<_ACEOF
6447 #define AUTO_LOAD_DIR "$ac_define_dir"
6448 _ACEOF
6449
6450
6451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6452 $as_echo "$with_auto_load_dir" >&6; }
6453
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6455 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6456
6457 # Check whether --with-auto-load-safe-path was given.
6458 if test "${with_auto_load_safe_path+set}" = set; then :
6459   withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6460      with_auto_load_safe_path="/"
6461      fi
6462 else
6463   with_auto_load_safe_path="$with_auto_load_dir"
6464 fi
6465
6466 escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6467
6468   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6469   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6470   ac_define_dir=`eval echo $escape_dir`
6471   ac_define_dir=`eval echo $ac_define_dir`
6472
6473 cat >>confdefs.h <<_ACEOF
6474 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6475 _ACEOF
6476
6477
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6479 $as_echo "$with_auto_load_safe_path" >&6; }
6480
6481
6482
6483 subdirs="$subdirs testsuite"
6484
6485
6486 # Check whether to support alternative target configurations
6487 # Check whether --enable-targets was given.
6488 if test "${enable_targets+set}" = set; then :
6489   enableval=$enable_targets; case "${enableval}" in
6490   yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
6491             ;;
6492   no)       enable_targets= ;;
6493   *)        enable_targets=$enableval ;;
6494 esac
6495 fi
6496
6497
6498 # Check whether to enable 64-bit support on 32-bit hosts
6499 # Check whether --enable-64-bit-bfd was given.
6500 if test "${enable_64_bit_bfd+set}" = set; then :
6501   enableval=$enable_64_bit_bfd; case "${enableval}" in
6502   yes)  want64=true  ;;
6503   no)   want64=false ;;
6504   *)    as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6505 esac
6506 else
6507   want64=false
6508 fi
6509
6510 # Provide defaults for some variables set by the per-host and per-target
6511 # configuration.
6512 gdb_host_obs=posix-hdep.o
6513
6514 if test "${target}" = "${host}"; then
6515   gdb_native=yes
6516 else
6517   gdb_native=no
6518 fi
6519
6520 . $srcdir/configure.host
6521
6522 # Add in the common host objects.
6523 . $srcdir/common/common.host
6524 gdb_host_obs="$gdb_host_obs $common_host_obs"
6525
6526 # Accumulate some settings from configure.tgt over all enabled targets
6527
6528 TARGET_OBS=
6529 all_targets=
6530 HAVE_NATIVE_GCORE_TARGET=
6531
6532 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6533 do
6534   if test "$targ_alias" = "all"; then
6535     all_targets=true
6536   else
6537     # Canonicalize the secondary target names.
6538     result=`$ac_config_sub $targ_alias 2>/dev/null`
6539     if test -n "$result"; then
6540         targ=$result
6541     else
6542         targ=$targ_alias
6543     fi
6544
6545     . ${srcdir}/configure.tgt
6546
6547     if test -z "${gdb_target_obs}"; then :
6548   as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
6549 fi
6550
6551     # Target-specific object files
6552     for i in ${gdb_target_obs}; do
6553         case " $TARGET_OBS " in
6554         *" ${i} "*) ;;
6555         *)
6556           TARGET_OBS="$TARGET_OBS ${i}"
6557           ;;
6558         esac
6559     done
6560
6561     # Check whether this target needs 64-bit CORE_ADDR
6562     if test x${want64} = xfalse; then
6563       . ${srcdir}/../bfd/config.bfd
6564     fi
6565
6566     # Check whether this target is native and supports gcore.
6567     if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6568        && $gdb_have_gcore; then
6569       HAVE_NATIVE_GCORE_TARGET=1
6570     fi
6571   fi
6572 done
6573
6574 if test x${all_targets} = xtrue; then
6575
6576   # We want all 64-bit targets if we either:
6577   #  - run on a 64-bit host  or
6578   #  - already require 64-bit support for some other target  or
6579   #  - the --enable-64-bit-bfd option was supplied
6580   # Otherwise we only support all 32-bit targets.
6581   #
6582   # NOTE: This test must be in sync with the corresponding
6583   #       tests in BFD!
6584
6585   if test x${want64} = xfalse; then
6586     # The cast to long int works around a bug in the HP C Compiler
6587 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6588 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6589 # This bug is HP SR number 8606223364.
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6591 $as_echo_n "checking size of long... " >&6; }
6592 if test "${ac_cv_sizeof_long+set}" = set; then :
6593   $as_echo_n "(cached) " >&6
6594 else
6595   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
6596
6597 else
6598   if test "$ac_cv_type_long" = yes; then
6599      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6600 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6601 { as_fn_set_status 77
6602 as_fn_error "cannot compute sizeof (long)
6603 See \`config.log' for more details." "$LINENO" 5; }; }
6604    else
6605      ac_cv_sizeof_long=0
6606    fi
6607 fi
6608
6609 fi
6610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6611 $as_echo "$ac_cv_sizeof_long" >&6; }
6612
6613
6614
6615 cat >>confdefs.h <<_ACEOF
6616 #define SIZEOF_LONG $ac_cv_sizeof_long
6617 _ACEOF
6618
6619
6620     if test "x${ac_cv_sizeof_long}" = "x8"; then
6621       want64=true
6622     fi
6623   fi
6624   if test x${want64} = xtrue; then
6625     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6626   else
6627     TARGET_OBS='$(ALL_TARGET_OBS)'
6628   fi
6629 fi
6630
6631
6632
6633
6634 # For other settings, only the main target counts.
6635 gdb_sim=
6636 gdb_osabi=
6637 build_gdbserver=
6638 targ=$target; . ${srcdir}/configure.tgt
6639
6640 # Fetch the default architecture and default target vector from BFD.
6641 targ=$target; . $srcdir/../bfd/config.bfd
6642
6643 # We only want the first architecture, so strip off the others if
6644 # there is more than one.
6645 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6646
6647 if test "x$targ_archs" != x; then
6648
6649 cat >>confdefs.h <<_ACEOF
6650 #define DEFAULT_BFD_ARCH $targ_archs
6651 _ACEOF
6652
6653 fi
6654 if test "x$targ_defvec" != x; then
6655
6656 cat >>confdefs.h <<_ACEOF
6657 #define DEFAULT_BFD_VEC $targ_defvec
6658 _ACEOF
6659
6660 fi
6661
6662 # The CLI cannot be disabled yet, but may be in the future.
6663
6664 # Enable CLI.
6665 # Check whether --enable-gdbcli was given.
6666 if test "${enable_gdbcli+set}" = set; then :
6667   enableval=$enable_gdbcli; case $enableval in
6668     yes)
6669       ;;
6670     no)
6671       as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
6672     *)
6673       as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
6674   esac
6675 else
6676   enable_gdbcli=yes
6677 fi
6678
6679 if test x"$enable_gdbcli" = xyes; then
6680   if test -d $srcdir/cli; then
6681     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6682     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6683     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6684     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6685   fi
6686 fi
6687
6688 # Enable MI.
6689 # Check whether --enable-gdbmi was given.
6690 if test "${enable_gdbmi+set}" = set; then :
6691   enableval=$enable_gdbmi; case $enableval in
6692     yes | no)
6693       ;;
6694     *)
6695       as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6696   esac
6697 else
6698   enable_gdbmi=yes
6699 fi
6700
6701 if test x"$enable_gdbmi" = xyes; then
6702   if test -d $srcdir/mi; then
6703     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6704     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6705     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6706     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6707   fi
6708 fi
6709
6710 # Enable TUI.
6711 # Check whether --enable-tui was given.
6712 if test "${enable_tui+set}" = set; then :
6713   enableval=$enable_tui; case $enableval in
6714     yes | no | auto)
6715       ;;
6716     *)
6717       as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6718   esac
6719 else
6720   enable_tui=auto
6721 fi
6722
6723
6724 # Enable gdbtk.
6725 # Check whether --enable-gdbtk was given.
6726 if test "${enable_gdbtk+set}" = set; then :
6727   enableval=$enable_gdbtk; case $enableval in
6728     yes | no)
6729       ;;
6730     *)
6731       as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6732   esac
6733 else
6734   if test -d $srcdir/gdbtk; then
6735     enable_gdbtk=yes
6736   else
6737     enable_gdbtk=no
6738   fi
6739 fi
6740
6741 # We unconditionally disable gdbtk tests on selected platforms.
6742 case $host_os in
6743   go32* | windows*)
6744     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6745 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6746     enable_gdbtk=no ;;
6747 esac
6748
6749 # Libunwind support for ia64.
6750
6751
6752 # Check whether --with-libunwind-ia64 was given.
6753 if test "${with_libunwind_ia64+set}" = set; then :
6754   withval=$with_libunwind_ia64;
6755 else
6756   with_libunwind_ia64=auto
6757 fi
6758
6759
6760 # Backward compatibility option.
6761 if test "${with_libunwind+set}" = set; then
6762   if test x"$with_libunwind_ia64" != xauto; then
6763     as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6764   fi
6765   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6766 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6767   with_libunwind_ia64="$with_libunwind"
6768 fi
6769
6770 case "$with_libunwind_ia64" in
6771   yes | no)
6772     ;;
6773   auto)
6774     for ac_header in libunwind-ia64.h
6775 do :
6776   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6777 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
6778   cat >>confdefs.h <<_ACEOF
6779 #define HAVE_LIBUNWIND_IA64_H 1
6780 _ACEOF
6781
6782 fi
6783
6784 done
6785
6786     with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6787     ;;
6788   *)
6789     as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6790     ;;
6791 esac
6792
6793 if test x"$with_libunwind_ia64" = xyes; then
6794   for ac_header in libunwind-ia64.h
6795 do :
6796   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6797 if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
6798   cat >>confdefs.h <<_ACEOF
6799 #define HAVE_LIBUNWIND_IA64_H 1
6800 _ACEOF
6801
6802 fi
6803
6804 done
6805
6806   if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6807     as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6808   fi
6809   CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6810   CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6811   CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6812 fi
6813
6814 opt_curses=no
6815
6816 # Check whether --with-curses was given.
6817 if test "${with_curses+set}" = set; then :
6818   withval=$with_curses; opt_curses=$withval
6819 fi
6820
6821
6822 prefer_curses=no
6823 if test "$opt_curses" = "yes"; then
6824   prefer_curses=yes
6825 fi
6826
6827 # Profiling support.
6828 # Check whether --enable-profiling was given.
6829 if test "${enable_profiling+set}" = set; then :
6830   enableval=$enable_profiling; case $enableval in
6831     yes | no)
6832       ;;
6833     *)
6834       as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6835   esac
6836 else
6837   enable_profiling=no
6838 fi
6839
6840
6841 for ac_func in monstartup _mcleanup
6842 do :
6843   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6844 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6845 eval as_val=\$$as_ac_var
6846    if test "x$as_val" = x""yes; then :
6847   cat >>confdefs.h <<_ACEOF
6848 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6849 _ACEOF
6850
6851 fi
6852 done
6853
6854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6855 $as_echo_n "checking for _etext... " >&6; }
6856 if test "${ac_cv_var__etext+set}" = set; then :
6857   $as_echo_n "(cached) " >&6
6858 else
6859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6860 /* end confdefs.h.  */
6861 #include <stdlib.h>
6862 extern char _etext;
6863
6864 int
6865 main ()
6866 {
6867 free (&_etext);
6868   ;
6869   return 0;
6870 }
6871 _ACEOF
6872 if ac_fn_c_try_link "$LINENO"; then :
6873   ac_cv_var__etext=yes
6874 else
6875   ac_cv_var__etext=no
6876 fi
6877 rm -f core conftest.err conftest.$ac_objext \
6878     conftest$ac_exeext conftest.$ac_ext
6879 fi
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6881 $as_echo "$ac_cv_var__etext" >&6; }
6882 if test $ac_cv_var__etext = yes; then
6883
6884 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
6885
6886 fi
6887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6888 $as_echo_n "checking for etext... " >&6; }
6889 if test "${ac_cv_var_etext+set}" = set; then :
6890   $as_echo_n "(cached) " >&6
6891 else
6892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6893 /* end confdefs.h.  */
6894 #include <stdlib.h>
6895 extern char etext;
6896
6897 int
6898 main ()
6899 {
6900 free (&etext);
6901   ;
6902   return 0;
6903 }
6904 _ACEOF
6905 if ac_fn_c_try_link "$LINENO"; then :
6906   ac_cv_var_etext=yes
6907 else
6908   ac_cv_var_etext=no
6909 fi
6910 rm -f core conftest.err conftest.$ac_objext \
6911     conftest$ac_exeext conftest.$ac_ext
6912 fi
6913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6914 $as_echo "$ac_cv_var_etext" >&6; }
6915 if test $ac_cv_var_etext = yes; then
6916
6917 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
6918
6919 fi
6920 if test "$enable_profiling" = yes ; then
6921   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
6922     as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
6923   fi
6924   PROFILE_CFLAGS=-pg
6925   OLD_CFLAGS="$CFLAGS"
6926   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
6927
6928   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6929 $as_echo_n "checking whether $CC supports -pg... " >&6; }
6930 if test "${ac_cv_cc_supports_pg+set}" = set; then :
6931   $as_echo_n "(cached) " >&6
6932 else
6933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6934 /* end confdefs.h.  */
6935
6936 int
6937 main ()
6938 {
6939 int x;
6940   ;
6941   return 0;
6942 }
6943 _ACEOF
6944 if ac_fn_c_try_compile "$LINENO"; then :
6945   ac_cv_cc_supports_pg=yes
6946 else
6947   ac_cv_cc_supports_pg=no
6948 fi
6949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6950 fi
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6952 $as_echo "$ac_cv_cc_supports_pg" >&6; }
6953
6954   if test $ac_cv_cc_supports_pg = no; then
6955     as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
6956   fi
6957
6958   CFLAGS="$OLD_CFLAGS"
6959 fi
6960
6961
6962
6963 # Check whether --with-pkgversion was given.
6964 if test "${with_pkgversion+set}" = set; then :
6965   withval=$with_pkgversion; case "$withval" in
6966       yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
6967       no)  PKGVERSION= ;;
6968       *)   PKGVERSION="($withval) " ;;
6969      esac
6970 else
6971   PKGVERSION="(GDB) "
6972
6973 fi
6974
6975
6976
6977
6978
6979 # Check whether --with-bugurl was given.
6980 if test "${with_bugurl+set}" = set; then :
6981   withval=$with_bugurl; case "$withval" in
6982       yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
6983       no)  BUGURL=
6984            ;;
6985       *)   BUGURL="$withval"
6986            ;;
6987      esac
6988 else
6989   BUGURL="http://www.gnu.org/software/gdb/bugs/"
6990
6991 fi
6992
6993   case ${BUGURL} in
6994   "")
6995     REPORT_BUGS_TO=
6996     REPORT_BUGS_TEXI=
6997     ;;
6998   *)
6999     REPORT_BUGS_TO="<$BUGURL>"
7000     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7001     ;;
7002   esac;
7003
7004
7005
7006
7007 cat >>confdefs.h <<_ACEOF
7008 #define PKGVERSION "$PKGVERSION"
7009 _ACEOF
7010
7011
7012 cat >>confdefs.h <<_ACEOF
7013 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7014 _ACEOF
7015
7016
7017 # --------------------- #
7018 # Checks for programs.  #
7019 # --------------------- #
7020
7021 for ac_prog in gawk mawk nawk awk
7022 do
7023   # Extract the first word of "$ac_prog", so it can be a program name with args.
7024 set dummy $ac_prog; ac_word=$2
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7026 $as_echo_n "checking for $ac_word... " >&6; }
7027 if test "${ac_cv_prog_AWK+set}" = set; then :
7028   $as_echo_n "(cached) " >&6
7029 else
7030   if test -n "$AWK"; then
7031   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7032 else
7033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7034 for as_dir in $PATH
7035 do
7036   IFS=$as_save_IFS
7037   test -z "$as_dir" && as_dir=.
7038     for ac_exec_ext in '' $ac_executable_extensions; do
7039   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7040     ac_cv_prog_AWK="$ac_prog"
7041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7042     break 2
7043   fi
7044 done
7045   done
7046 IFS=$as_save_IFS
7047
7048 fi
7049 fi
7050 AWK=$ac_cv_prog_AWK
7051 if test -n "$AWK"; then
7052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7053 $as_echo "$AWK" >&6; }
7054 else
7055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7056 $as_echo "no" >&6; }
7057 fi
7058
7059
7060   test -n "$AWK" && break
7061 done
7062
7063 # Find a good install program.  We prefer a C program (faster),
7064 # so one script is as good as another.  But avoid the broken or
7065 # incompatible versions:
7066 # SysV /etc/install, /usr/sbin/install
7067 # SunOS /usr/etc/install
7068 # IRIX /sbin/install
7069 # AIX /bin/install
7070 # AmigaOS /C/install, which installs bootblocks on floppy discs
7071 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7072 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7073 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7074 # OS/2's system install, which has a completely different semantic
7075 # ./install, which can be erroneously created by make from ./install.sh.
7076 # Reject install programs that cannot install multiple files.
7077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7078 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7079 if test -z "$INSTALL"; then
7080 if test "${ac_cv_path_install+set}" = set; then :
7081   $as_echo_n "(cached) " >&6
7082 else
7083   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7084 for as_dir in $PATH
7085 do
7086   IFS=$as_save_IFS
7087   test -z "$as_dir" && as_dir=.
7088     # Account for people who put trailing slashes in PATH elements.
7089 case $as_dir/ in #((
7090   ./ | .// | /[cC]/* | \
7091   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7092   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7093   /usr/ucb/* ) ;;
7094   *)
7095     # OSF1 and SCO ODT 3.0 have their own names for install.
7096     # Don't use installbsd from OSF since it installs stuff as root
7097     # by default.
7098     for ac_prog in ginstall scoinst install; do
7099       for ac_exec_ext in '' $ac_executable_extensions; do
7100         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
7101           if test $ac_prog = install &&
7102             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7103             # AIX install.  It has an incompatible calling convention.
7104             :
7105           elif test $ac_prog = install &&
7106             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7107             # program-specific install script used by HP pwplus--don't use.
7108             :
7109           else
7110             rm -rf conftest.one conftest.two conftest.dir
7111             echo one > conftest.one
7112             echo two > conftest.two
7113             mkdir conftest.dir
7114             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7115               test -s conftest.one && test -s conftest.two &&
7116               test -s conftest.dir/conftest.one &&
7117               test -s conftest.dir/conftest.two
7118             then
7119               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7120               break 3
7121             fi
7122           fi
7123         fi
7124       done
7125     done
7126     ;;
7127 esac
7128
7129   done
7130 IFS=$as_save_IFS
7131
7132 rm -rf conftest.one conftest.two conftest.dir
7133
7134 fi
7135   if test "${ac_cv_path_install+set}" = set; then
7136     INSTALL=$ac_cv_path_install
7137   else
7138     # As a last resort, use the slow shell script.  Don't cache a
7139     # value for INSTALL within a source directory, because that will
7140     # break other packages using the cache if that directory is
7141     # removed, or if the value is a relative name.
7142     INSTALL=$ac_install_sh
7143   fi
7144 fi
7145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7146 $as_echo "$INSTALL" >&6; }
7147
7148 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7149 # It thinks the first close brace ends the variable substitution.
7150 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7151
7152 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7153
7154 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7155
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7157 $as_echo_n "checking whether ln -s works... " >&6; }
7158 LN_S=$as_ln_s
7159 if test "$LN_S" = "ln -s"; then
7160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7161 $as_echo "yes" >&6; }
7162 else
7163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7164 $as_echo "no, using $LN_S" >&6; }
7165 fi
7166
7167 if test -n "$ac_tool_prefix"; then
7168   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7169 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7171 $as_echo_n "checking for $ac_word... " >&6; }
7172 if test "${ac_cv_prog_RANLIB+set}" = set; then :
7173   $as_echo_n "(cached) " >&6
7174 else
7175   if test -n "$RANLIB"; then
7176   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7177 else
7178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7179 for as_dir in $PATH
7180 do
7181   IFS=$as_save_IFS
7182   test -z "$as_dir" && as_dir=.
7183     for ac_exec_ext in '' $ac_executable_extensions; do
7184   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7185     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7187     break 2
7188   fi
7189 done
7190   done
7191 IFS=$as_save_IFS
7192
7193 fi
7194 fi
7195 RANLIB=$ac_cv_prog_RANLIB
7196 if test -n "$RANLIB"; then
7197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7198 $as_echo "$RANLIB" >&6; }
7199 else
7200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7201 $as_echo "no" >&6; }
7202 fi
7203
7204
7205 fi
7206 if test -z "$ac_cv_prog_RANLIB"; then
7207   ac_ct_RANLIB=$RANLIB
7208   # Extract the first word of "ranlib", so it can be a program name with args.
7209 set dummy ranlib; ac_word=$2
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211 $as_echo_n "checking for $ac_word... " >&6; }
7212 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7213   $as_echo_n "(cached) " >&6
7214 else
7215   if test -n "$ac_ct_RANLIB"; then
7216   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7217 else
7218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7219 for as_dir in $PATH
7220 do
7221   IFS=$as_save_IFS
7222   test -z "$as_dir" && as_dir=.
7223     for ac_exec_ext in '' $ac_executable_extensions; do
7224   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7225     ac_cv_prog_ac_ct_RANLIB="ranlib"
7226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7227     break 2
7228   fi
7229 done
7230   done
7231 IFS=$as_save_IFS
7232
7233 fi
7234 fi
7235 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7236 if test -n "$ac_ct_RANLIB"; then
7237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7238 $as_echo "$ac_ct_RANLIB" >&6; }
7239 else
7240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241 $as_echo "no" >&6; }
7242 fi
7243
7244   if test "x$ac_ct_RANLIB" = x; then
7245     RANLIB=":"
7246   else
7247     case $cross_compiling:$ac_tool_warned in
7248 yes:)
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7250 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7251 ac_tool_warned=yes ;;
7252 esac
7253     RANLIB=$ac_ct_RANLIB
7254   fi
7255 else
7256   RANLIB="$ac_cv_prog_RANLIB"
7257 fi
7258
7259 for ac_prog in 'bison -y' byacc
7260 do
7261   # Extract the first word of "$ac_prog", so it can be a program name with args.
7262 set dummy $ac_prog; ac_word=$2
7263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7264 $as_echo_n "checking for $ac_word... " >&6; }
7265 if test "${ac_cv_prog_YACC+set}" = set; then :
7266   $as_echo_n "(cached) " >&6
7267 else
7268   if test -n "$YACC"; then
7269   ac_cv_prog_YACC="$YACC" # Let the user override the test.
7270 else
7271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7272 for as_dir in $PATH
7273 do
7274   IFS=$as_save_IFS
7275   test -z "$as_dir" && as_dir=.
7276     for ac_exec_ext in '' $ac_executable_extensions; do
7277   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7278     ac_cv_prog_YACC="$ac_prog"
7279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7280     break 2
7281   fi
7282 done
7283   done
7284 IFS=$as_save_IFS
7285
7286 fi
7287 fi
7288 YACC=$ac_cv_prog_YACC
7289 if test -n "$YACC"; then
7290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7291 $as_echo "$YACC" >&6; }
7292 else
7293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7294 $as_echo "no" >&6; }
7295 fi
7296
7297
7298   test -n "$YACC" && break
7299 done
7300 test -n "$YACC" || YACC="yacc"
7301
7302
7303 if test -n "$ac_tool_prefix"; then
7304   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7305 set dummy ${ac_tool_prefix}ar; ac_word=$2
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7307 $as_echo_n "checking for $ac_word... " >&6; }
7308 if test "${ac_cv_prog_AR+set}" = set; then :
7309   $as_echo_n "(cached) " >&6
7310 else
7311   if test -n "$AR"; then
7312   ac_cv_prog_AR="$AR" # Let the user override the test.
7313 else
7314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7315 for as_dir in $PATH
7316 do
7317   IFS=$as_save_IFS
7318   test -z "$as_dir" && as_dir=.
7319     for ac_exec_ext in '' $ac_executable_extensions; do
7320   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7321     ac_cv_prog_AR="${ac_tool_prefix}ar"
7322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7323     break 2
7324   fi
7325 done
7326   done
7327 IFS=$as_save_IFS
7328
7329 fi
7330 fi
7331 AR=$ac_cv_prog_AR
7332 if test -n "$AR"; then
7333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7334 $as_echo "$AR" >&6; }
7335 else
7336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7337 $as_echo "no" >&6; }
7338 fi
7339
7340
7341 fi
7342 if test -z "$ac_cv_prog_AR"; then
7343   ac_ct_AR=$AR
7344   # Extract the first word of "ar", so it can be a program name with args.
7345 set dummy ar; ac_word=$2
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7347 $as_echo_n "checking for $ac_word... " >&6; }
7348 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7349   $as_echo_n "(cached) " >&6
7350 else
7351   if test -n "$ac_ct_AR"; then
7352   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7353 else
7354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7355 for as_dir in $PATH
7356 do
7357   IFS=$as_save_IFS
7358   test -z "$as_dir" && as_dir=.
7359     for ac_exec_ext in '' $ac_executable_extensions; do
7360   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7361     ac_cv_prog_ac_ct_AR="ar"
7362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7363     break 2
7364   fi
7365 done
7366   done
7367 IFS=$as_save_IFS
7368
7369 fi
7370 fi
7371 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7372 if test -n "$ac_ct_AR"; then
7373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7374 $as_echo "$ac_ct_AR" >&6; }
7375 else
7376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7377 $as_echo "no" >&6; }
7378 fi
7379
7380   if test "x$ac_ct_AR" = x; then
7381     AR=""
7382   else
7383     case $cross_compiling:$ac_tool_warned in
7384 yes:)
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7386 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7387 ac_tool_warned=yes ;;
7388 esac
7389     AR=$ac_ct_AR
7390   fi
7391 else
7392   AR="$ac_cv_prog_AR"
7393 fi
7394
7395 if test -n "$ac_tool_prefix"; then
7396   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7397 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7399 $as_echo_n "checking for $ac_word... " >&6; }
7400 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7401   $as_echo_n "(cached) " >&6
7402 else
7403   if test -n "$DLLTOOL"; then
7404   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7405 else
7406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7407 for as_dir in $PATH
7408 do
7409   IFS=$as_save_IFS
7410   test -z "$as_dir" && as_dir=.
7411     for ac_exec_ext in '' $ac_executable_extensions; do
7412   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7413     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7415     break 2
7416   fi
7417 done
7418   done
7419 IFS=$as_save_IFS
7420
7421 fi
7422 fi
7423 DLLTOOL=$ac_cv_prog_DLLTOOL
7424 if test -n "$DLLTOOL"; then
7425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7426 $as_echo "$DLLTOOL" >&6; }
7427 else
7428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7429 $as_echo "no" >&6; }
7430 fi
7431
7432
7433 fi
7434 if test -z "$ac_cv_prog_DLLTOOL"; then
7435   ac_ct_DLLTOOL=$DLLTOOL
7436   # Extract the first word of "dlltool", so it can be a program name with args.
7437 set dummy dlltool; ac_word=$2
7438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7439 $as_echo_n "checking for $ac_word... " >&6; }
7440 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7441   $as_echo_n "(cached) " >&6
7442 else
7443   if test -n "$ac_ct_DLLTOOL"; then
7444   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7445 else
7446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7447 for as_dir in $PATH
7448 do
7449   IFS=$as_save_IFS
7450   test -z "$as_dir" && as_dir=.
7451     for ac_exec_ext in '' $ac_executable_extensions; do
7452   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7453     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7454     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7455     break 2
7456   fi
7457 done
7458   done
7459 IFS=$as_save_IFS
7460
7461 fi
7462 fi
7463 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7464 if test -n "$ac_ct_DLLTOOL"; then
7465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7466 $as_echo "$ac_ct_DLLTOOL" >&6; }
7467 else
7468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469 $as_echo "no" >&6; }
7470 fi
7471
7472   if test "x$ac_ct_DLLTOOL" = x; then
7473     DLLTOOL=""
7474   else
7475     case $cross_compiling:$ac_tool_warned in
7476 yes:)
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7478 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7479 ac_tool_warned=yes ;;
7480 esac
7481     DLLTOOL=$ac_ct_DLLTOOL
7482   fi
7483 else
7484   DLLTOOL="$ac_cv_prog_DLLTOOL"
7485 fi
7486
7487 if test -n "$ac_tool_prefix"; then
7488   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7489 set dummy ${ac_tool_prefix}windres; ac_word=$2
7490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7491 $as_echo_n "checking for $ac_word... " >&6; }
7492 if test "${ac_cv_prog_WINDRES+set}" = set; then :
7493   $as_echo_n "(cached) " >&6
7494 else
7495   if test -n "$WINDRES"; then
7496   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7497 else
7498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7499 for as_dir in $PATH
7500 do
7501   IFS=$as_save_IFS
7502   test -z "$as_dir" && as_dir=.
7503     for ac_exec_ext in '' $ac_executable_extensions; do
7504   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7505     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7507     break 2
7508   fi
7509 done
7510   done
7511 IFS=$as_save_IFS
7512
7513 fi
7514 fi
7515 WINDRES=$ac_cv_prog_WINDRES
7516 if test -n "$WINDRES"; then
7517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7518 $as_echo "$WINDRES" >&6; }
7519 else
7520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7521 $as_echo "no" >&6; }
7522 fi
7523
7524
7525 fi
7526 if test -z "$ac_cv_prog_WINDRES"; then
7527   ac_ct_WINDRES=$WINDRES
7528   # Extract the first word of "windres", so it can be a program name with args.
7529 set dummy windres; ac_word=$2
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7531 $as_echo_n "checking for $ac_word... " >&6; }
7532 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7533   $as_echo_n "(cached) " >&6
7534 else
7535   if test -n "$ac_ct_WINDRES"; then
7536   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7537 else
7538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7539 for as_dir in $PATH
7540 do
7541   IFS=$as_save_IFS
7542   test -z "$as_dir" && as_dir=.
7543     for ac_exec_ext in '' $ac_executable_extensions; do
7544   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7545     ac_cv_prog_ac_ct_WINDRES="windres"
7546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7547     break 2
7548   fi
7549 done
7550   done
7551 IFS=$as_save_IFS
7552
7553 fi
7554 fi
7555 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7556 if test -n "$ac_ct_WINDRES"; then
7557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7558 $as_echo "$ac_ct_WINDRES" >&6; }
7559 else
7560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7561 $as_echo "no" >&6; }
7562 fi
7563
7564   if test "x$ac_ct_WINDRES" = x; then
7565     WINDRES=""
7566   else
7567     case $cross_compiling:$ac_tool_warned in
7568 yes:)
7569 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7570 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7571 ac_tool_warned=yes ;;
7572 esac
7573     WINDRES=$ac_ct_WINDRES
7574   fi
7575 else
7576   WINDRES="$ac_cv_prog_WINDRES"
7577 fi
7578
7579
7580 case $host_os in
7581   gnu*)
7582     # Needed for GNU Hurd hosts.
7583     if test -n "$ac_tool_prefix"; then
7584   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7585 set dummy ${ac_tool_prefix}mig; ac_word=$2
7586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7587 $as_echo_n "checking for $ac_word... " >&6; }
7588 if test "${ac_cv_prog_MIG+set}" = set; then :
7589   $as_echo_n "(cached) " >&6
7590 else
7591   if test -n "$MIG"; then
7592   ac_cv_prog_MIG="$MIG" # Let the user override the test.
7593 else
7594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7595 for as_dir in $PATH
7596 do
7597   IFS=$as_save_IFS
7598   test -z "$as_dir" && as_dir=.
7599     for ac_exec_ext in '' $ac_executable_extensions; do
7600   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7601     ac_cv_prog_MIG="${ac_tool_prefix}mig"
7602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7603     break 2
7604   fi
7605 done
7606   done
7607 IFS=$as_save_IFS
7608
7609 fi
7610 fi
7611 MIG=$ac_cv_prog_MIG
7612 if test -n "$MIG"; then
7613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7614 $as_echo "$MIG" >&6; }
7615 else
7616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7617 $as_echo "no" >&6; }
7618 fi
7619
7620
7621 fi
7622 if test -z "$ac_cv_prog_MIG"; then
7623   ac_ct_MIG=$MIG
7624   # Extract the first word of "mig", so it can be a program name with args.
7625 set dummy mig; ac_word=$2
7626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7627 $as_echo_n "checking for $ac_word... " >&6; }
7628 if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7629   $as_echo_n "(cached) " >&6
7630 else
7631   if test -n "$ac_ct_MIG"; then
7632   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7633 else
7634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7635 for as_dir in $PATH
7636 do
7637   IFS=$as_save_IFS
7638   test -z "$as_dir" && as_dir=.
7639     for ac_exec_ext in '' $ac_executable_extensions; do
7640   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7641     ac_cv_prog_ac_ct_MIG="mig"
7642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7643     break 2
7644   fi
7645 done
7646   done
7647 IFS=$as_save_IFS
7648
7649 fi
7650 fi
7651 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7652 if test -n "$ac_ct_MIG"; then
7653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7654 $as_echo "$ac_ct_MIG" >&6; }
7655 else
7656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7657 $as_echo "no" >&6; }
7658 fi
7659
7660   if test "x$ac_ct_MIG" = x; then
7661     MIG=""
7662   else
7663     case $cross_compiling:$ac_tool_warned in
7664 yes:)
7665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7666 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7667 ac_tool_warned=yes ;;
7668 esac
7669     MIG=$ac_ct_MIG
7670   fi
7671 else
7672   MIG="$ac_cv_prog_MIG"
7673 fi
7674
7675     if test x"$MIG" = x; then
7676       as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
7677     fi
7678     ;;
7679 esac
7680
7681 # ---------------------- #
7682 # Checks for libraries.  #
7683 # ---------------------- #
7684
7685 # We might need to link with -lm; most simulators need it.
7686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7687 $as_echo_n "checking for main in -lm... " >&6; }
7688 if test "${ac_cv_lib_m_main+set}" = set; then :
7689   $as_echo_n "(cached) " >&6
7690 else
7691   ac_check_lib_save_LIBS=$LIBS
7692 LIBS="-lm  $LIBS"
7693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7694 /* end confdefs.h.  */
7695
7696
7697 int
7698 main ()
7699 {
7700 return main ();
7701   ;
7702   return 0;
7703 }
7704 _ACEOF
7705 if ac_fn_c_try_link "$LINENO"; then :
7706   ac_cv_lib_m_main=yes
7707 else
7708   ac_cv_lib_m_main=no
7709 fi
7710 rm -f core conftest.err conftest.$ac_objext \
7711     conftest$ac_exeext conftest.$ac_ext
7712 LIBS=$ac_check_lib_save_LIBS
7713 fi
7714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7715 $as_echo "$ac_cv_lib_m_main" >&6; }
7716 if test "x$ac_cv_lib_m_main" = x""yes; then :
7717   cat >>confdefs.h <<_ACEOF
7718 #define HAVE_LIBM 1
7719 _ACEOF
7720
7721   LIBS="-lm $LIBS"
7722
7723 fi
7724
7725
7726 # We need to link with -lw to get `wctype' on Solaris before Solaris
7727 # 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
7728 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
7729 # is known to have this problem).  Therefore we avoid libw if we can.
7730 ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
7731 if test "x$ac_cv_func_wctype" = x""yes; then :
7732
7733 else
7734   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
7735 $as_echo_n "checking for wctype in -lw... " >&6; }
7736 if test "${ac_cv_lib_w_wctype+set}" = set; then :
7737   $as_echo_n "(cached) " >&6
7738 else
7739   ac_check_lib_save_LIBS=$LIBS
7740 LIBS="-lw  $LIBS"
7741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7742 /* end confdefs.h.  */
7743
7744 /* Override any GCC internal prototype to avoid an error.
7745    Use char because int might match the return type of a GCC
7746    builtin and then its argument prototype would still apply.  */
7747 #ifdef __cplusplus
7748 extern "C"
7749 #endif
7750 char wctype ();
7751 int
7752 main ()
7753 {
7754 return wctype ();
7755   ;
7756   return 0;
7757 }
7758 _ACEOF
7759 if ac_fn_c_try_link "$LINENO"; then :
7760   ac_cv_lib_w_wctype=yes
7761 else
7762   ac_cv_lib_w_wctype=no
7763 fi
7764 rm -f core conftest.err conftest.$ac_objext \
7765     conftest$ac_exeext conftest.$ac_ext
7766 LIBS=$ac_check_lib_save_LIBS
7767 fi
7768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
7769 $as_echo "$ac_cv_lib_w_wctype" >&6; }
7770 if test "x$ac_cv_lib_w_wctype" = x""yes; then :
7771   cat >>confdefs.h <<_ACEOF
7772 #define HAVE_LIBW 1
7773 _ACEOF
7774
7775   LIBS="-lw $LIBS"
7776
7777 fi
7778
7779 fi
7780
7781
7782 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7784 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7785 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7786   $as_echo_n "(cached) " >&6
7787 else
7788   ac_func_search_save_LIBS=$LIBS
7789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7790 /* end confdefs.h.  */
7791
7792 /* Override any GCC internal prototype to avoid an error.
7793    Use char because int might match the return type of a GCC
7794    builtin and then its argument prototype would still apply.  */
7795 #ifdef __cplusplus
7796 extern "C"
7797 #endif
7798 char gethostbyname ();
7799 int
7800 main ()
7801 {
7802 return gethostbyname ();
7803   ;
7804   return 0;
7805 }
7806 _ACEOF
7807 for ac_lib in '' nsl; do
7808   if test -z "$ac_lib"; then
7809     ac_res="none required"
7810   else
7811     ac_res=-l$ac_lib
7812     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7813   fi
7814   if ac_fn_c_try_link "$LINENO"; then :
7815   ac_cv_search_gethostbyname=$ac_res
7816 fi
7817 rm -f core conftest.err conftest.$ac_objext \
7818     conftest$ac_exeext
7819   if test "${ac_cv_search_gethostbyname+set}" = set; then :
7820   break
7821 fi
7822 done
7823 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7824
7825 else
7826   ac_cv_search_gethostbyname=no
7827 fi
7828 rm conftest.$ac_ext
7829 LIBS=$ac_func_search_save_LIBS
7830 fi
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7832 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7833 ac_res=$ac_cv_search_gethostbyname
7834 if test "$ac_res" != no; then :
7835   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7836
7837 fi
7838
7839
7840 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7842 $as_echo_n "checking for library containing socketpair... " >&6; }
7843 if test "${ac_cv_search_socketpair+set}" = set; then :
7844   $as_echo_n "(cached) " >&6
7845 else
7846   ac_func_search_save_LIBS=$LIBS
7847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7848 /* end confdefs.h.  */
7849
7850 /* Override any GCC internal prototype to avoid an error.
7851    Use char because int might match the return type of a GCC
7852    builtin and then its argument prototype would still apply.  */
7853 #ifdef __cplusplus
7854 extern "C"
7855 #endif
7856 char socketpair ();
7857 int
7858 main ()
7859 {
7860 return socketpair ();
7861   ;
7862   return 0;
7863 }
7864 _ACEOF
7865 for ac_lib in '' socket; do
7866   if test -z "$ac_lib"; then
7867     ac_res="none required"
7868   else
7869     ac_res=-l$ac_lib
7870     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7871   fi
7872   if ac_fn_c_try_link "$LINENO"; then :
7873   ac_cv_search_socketpair=$ac_res
7874 fi
7875 rm -f core conftest.err conftest.$ac_objext \
7876     conftest$ac_exeext
7877   if test "${ac_cv_search_socketpair+set}" = set; then :
7878   break
7879 fi
7880 done
7881 if test "${ac_cv_search_socketpair+set}" = set; then :
7882
7883 else
7884   ac_cv_search_socketpair=no
7885 fi
7886 rm conftest.$ac_ext
7887 LIBS=$ac_func_search_save_LIBS
7888 fi
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7890 $as_echo "$ac_cv_search_socketpair" >&6; }
7891 ac_res=$ac_cv_search_socketpair
7892 if test "$ac_res" != no; then :
7893   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7894
7895 fi
7896
7897
7898 # Link in zlib if we can.  This allows us to read compressed debug sections.
7899
7900   # Use the system's zlib library.
7901   zlibdir="-L\$(top_builddir)/../zlib"
7902   zlibinc="-I\$(top_srcdir)/../zlib"
7903
7904 # Check whether --with-system-zlib was given.
7905 if test "${with_system_zlib+set}" = set; then :
7906   withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7907     zlibdir=
7908     zlibinc=
7909   fi
7910
7911 fi
7912
7913
7914
7915
7916
7917 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7918 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7920 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7921 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7922   $as_echo_n "(cached) " >&6
7923 else
7924   ac_func_search_save_LIBS=$LIBS
7925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7926 /* end confdefs.h.  */
7927
7928 /* Override any GCC internal prototype to avoid an error.
7929    Use char because int might match the return type of a GCC
7930    builtin and then its argument prototype would still apply.  */
7931 #ifdef __cplusplus
7932 extern "C"
7933 #endif
7934 char kinfo_getvmmap ();
7935 int
7936 main ()
7937 {
7938 return kinfo_getvmmap ();
7939   ;
7940   return 0;
7941 }
7942 _ACEOF
7943 for ac_lib in '' util util-freebsd; do
7944   if test -z "$ac_lib"; then
7945     ac_res="none required"
7946   else
7947     ac_res=-l$ac_lib
7948     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7949   fi
7950   if ac_fn_c_try_link "$LINENO"; then :
7951   ac_cv_search_kinfo_getvmmap=$ac_res
7952 fi
7953 rm -f core conftest.err conftest.$ac_objext \
7954     conftest$ac_exeext
7955   if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7956   break
7957 fi
7958 done
7959 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7960
7961 else
7962   ac_cv_search_kinfo_getvmmap=no
7963 fi
7964 rm conftest.$ac_ext
7965 LIBS=$ac_func_search_save_LIBS
7966 fi
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7968 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7969 ac_res=$ac_cv_search_kinfo_getvmmap
7970 if test "$ac_res" != no; then :
7971   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7972
7973 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7974
7975 fi
7976
7977
7978
7979       if test "X$prefix" = "XNONE"; then
7980     acl_final_prefix="$ac_default_prefix"
7981   else
7982     acl_final_prefix="$prefix"
7983   fi
7984   if test "X$exec_prefix" = "XNONE"; then
7985     acl_final_exec_prefix='${prefix}'
7986   else
7987     acl_final_exec_prefix="$exec_prefix"
7988   fi
7989   acl_save_prefix="$prefix"
7990   prefix="$acl_final_prefix"
7991   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7992   prefix="$acl_save_prefix"
7993
7994
7995 # Check whether --with-gnu-ld was given.
7996 if test "${with_gnu_ld+set}" = set; then :
7997   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7998 else
7999   with_gnu_ld=no
8000 fi
8001
8002 # Prepare PATH_SEPARATOR.
8003 # The user is always right.
8004 if test "${PATH_SEPARATOR+set}" != set; then
8005   echo "#! /bin/sh" >conf$$.sh
8006   echo  "exit 0"   >>conf$$.sh
8007   chmod +x conf$$.sh
8008   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8009     PATH_SEPARATOR=';'
8010   else
8011     PATH_SEPARATOR=:
8012   fi
8013   rm -f conf$$.sh
8014 fi
8015 ac_prog=ld
8016 if test "$GCC" = yes; then
8017   # Check if gcc -print-prog-name=ld gives a path.
8018   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8019 $as_echo_n "checking for ld used by GCC... " >&6; }
8020   case $host in
8021   *-*-mingw*)
8022     # gcc leaves a trailing carriage return which upsets mingw
8023     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8024   *)
8025     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8026   esac
8027   case $ac_prog in
8028     # Accept absolute paths.
8029     [\\/]* | [A-Za-z]:[\\/]*)
8030       re_direlt='/[^/][^/]*/\.\./'
8031       # Canonicalize the path of ld
8032       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8033       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8034         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8035       done
8036       test -z "$LD" && LD="$ac_prog"
8037       ;;
8038   "")
8039     # If it fails, then pretend we aren't using GCC.
8040     ac_prog=ld
8041     ;;
8042   *)
8043     # If it is relative, then search for the first ld in PATH.
8044     with_gnu_ld=unknown
8045     ;;
8046   esac
8047 elif test "$with_gnu_ld" = yes; then
8048   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8049 $as_echo_n "checking for GNU ld... " >&6; }
8050 else
8051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8052 $as_echo_n "checking for non-GNU ld... " >&6; }
8053 fi
8054 if test "${acl_cv_path_LD+set}" = set; then :
8055   $as_echo_n "(cached) " >&6
8056 else
8057   if test -z "$LD"; then
8058   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8059   for ac_dir in $PATH; do
8060     test -z "$ac_dir" && ac_dir=.
8061     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8062       acl_cv_path_LD="$ac_dir/$ac_prog"
8063       # Check to see if the program is GNU ld.  I'd rather use --version,
8064       # but apparently some GNU ld's only accept -v.
8065       # Break only if it was the GNU/non-GNU ld that we prefer.
8066       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8067         test "$with_gnu_ld" != no && break
8068       else
8069         test "$with_gnu_ld" != yes && break
8070       fi
8071     fi
8072   done
8073   IFS="$ac_save_ifs"
8074 else
8075   acl_cv_path_LD="$LD" # Let the user override the test with a path.
8076 fi
8077 fi
8078
8079 LD="$acl_cv_path_LD"
8080 if test -n "$LD"; then
8081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8082 $as_echo "$LD" >&6; }
8083 else
8084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8085 $as_echo "no" >&6; }
8086 fi
8087 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8089 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8090 if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8091   $as_echo_n "(cached) " >&6
8092 else
8093   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8094 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8095   acl_cv_prog_gnu_ld=yes
8096 else
8097   acl_cv_prog_gnu_ld=no
8098 fi
8099 fi
8100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8101 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8102 with_gnu_ld=$acl_cv_prog_gnu_ld
8103
8104
8105
8106                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8107 $as_echo_n "checking for shared library run path origin... " >&6; }
8108 if test "${acl_cv_rpath+set}" = set; then :
8109   $as_echo_n "(cached) " >&6
8110 else
8111
8112     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8113     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8114     . ./conftest.sh
8115     rm -f ./conftest.sh
8116     acl_cv_rpath=done
8117
8118 fi
8119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8120 $as_echo "$acl_cv_rpath" >&6; }
8121   wl="$acl_cv_wl"
8122   libext="$acl_cv_libext"
8123   shlibext="$acl_cv_shlibext"
8124   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8125   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8126   hardcode_direct="$acl_cv_hardcode_direct"
8127   hardcode_minus_L="$acl_cv_hardcode_minus_L"
8128     # Check whether --enable-rpath was given.
8129 if test "${enable_rpath+set}" = set; then :
8130   enableval=$enable_rpath; :
8131 else
8132   enable_rpath=yes
8133 fi
8134
8135
8136
8137
8138
8139
8140
8141
8142     use_additional=yes
8143
8144   acl_save_prefix="$prefix"
8145   prefix="$acl_final_prefix"
8146   acl_save_exec_prefix="$exec_prefix"
8147   exec_prefix="$acl_final_exec_prefix"
8148
8149     eval additional_includedir=\"$includedir\"
8150     eval additional_libdir=\"$libdir\"
8151
8152   exec_prefix="$acl_save_exec_prefix"
8153   prefix="$acl_save_prefix"
8154
8155
8156 # Check whether --with-libiconv-prefix was given.
8157 if test "${with_libiconv_prefix+set}" = set; then :
8158   withval=$with_libiconv_prefix;
8159     if test "X$withval" = "Xno"; then
8160       use_additional=no
8161     else
8162       if test "X$withval" = "X"; then
8163
8164   acl_save_prefix="$prefix"
8165   prefix="$acl_final_prefix"
8166   acl_save_exec_prefix="$exec_prefix"
8167   exec_prefix="$acl_final_exec_prefix"
8168
8169           eval additional_includedir=\"$includedir\"
8170           eval additional_libdir=\"$libdir\"
8171
8172   exec_prefix="$acl_save_exec_prefix"
8173   prefix="$acl_save_prefix"
8174
8175       else
8176         additional_includedir="$withval/include"
8177         additional_libdir="$withval/lib"
8178       fi
8179     fi
8180
8181 fi
8182
8183       LIBICONV=
8184   LTLIBICONV=
8185   INCICONV=
8186   rpathdirs=
8187   ltrpathdirs=
8188   names_already_handled=
8189   names_next_round='iconv '
8190   while test -n "$names_next_round"; do
8191     names_this_round="$names_next_round"
8192     names_next_round=
8193     for name in $names_this_round; do
8194       already_handled=
8195       for n in $names_already_handled; do
8196         if test "$n" = "$name"; then
8197           already_handled=yes
8198           break
8199         fi
8200       done
8201       if test -z "$already_handled"; then
8202         names_already_handled="$names_already_handled $name"
8203                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8204         eval value=\"\$HAVE_LIB$uppername\"
8205         if test -n "$value"; then
8206           if test "$value" = yes; then
8207             eval value=\"\$LIB$uppername\"
8208             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8209             eval value=\"\$LTLIB$uppername\"
8210             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8211           else
8212                                     :
8213           fi
8214         else
8215                               found_dir=
8216           found_la=
8217           found_so=
8218           found_a=
8219           if test $use_additional = yes; then
8220             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8221               found_dir="$additional_libdir"
8222               found_so="$additional_libdir/lib$name.$shlibext"
8223               if test -f "$additional_libdir/lib$name.la"; then
8224                 found_la="$additional_libdir/lib$name.la"
8225               fi
8226             else
8227               if test -f "$additional_libdir/lib$name.$libext"; then
8228                 found_dir="$additional_libdir"
8229                 found_a="$additional_libdir/lib$name.$libext"
8230                 if test -f "$additional_libdir/lib$name.la"; then
8231                   found_la="$additional_libdir/lib$name.la"
8232                 fi
8233               fi
8234             fi
8235           fi
8236           if test "X$found_dir" = "X"; then
8237             for x in $LDFLAGS $LTLIBICONV; do
8238
8239   acl_save_prefix="$prefix"
8240   prefix="$acl_final_prefix"
8241   acl_save_exec_prefix="$exec_prefix"
8242   exec_prefix="$acl_final_exec_prefix"
8243   eval x=\"$x\"
8244   exec_prefix="$acl_save_exec_prefix"
8245   prefix="$acl_save_prefix"
8246
8247               case "$x" in
8248                 -L*)
8249                   dir=`echo "X$x" | sed -e 's/^X-L//'`
8250                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8251                     found_dir="$dir"
8252                     found_so="$dir/lib$name.$shlibext"
8253                     if test -f "$dir/lib$name.la"; then
8254                       found_la="$dir/lib$name.la"
8255                     fi
8256                   else
8257                     if test -f "$dir/lib$name.$libext"; then
8258                       found_dir="$dir"
8259                       found_a="$dir/lib$name.$libext"
8260                       if test -f "$dir/lib$name.la"; then
8261                         found_la="$dir/lib$name.la"
8262                       fi
8263                     fi
8264                   fi
8265                   ;;
8266               esac
8267               if test "X$found_dir" != "X"; then
8268                 break
8269               fi
8270             done
8271           fi
8272           if test "X$found_dir" != "X"; then
8273                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8274             if test "X$found_so" != "X"; then
8275                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8276                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8277               else
8278                                                                                 haveit=
8279                 for x in $ltrpathdirs; do
8280                   if test "X$x" = "X$found_dir"; then
8281                     haveit=yes
8282                     break
8283                   fi
8284                 done
8285                 if test -z "$haveit"; then
8286                   ltrpathdirs="$ltrpathdirs $found_dir"
8287                 fi
8288                                 if test "$hardcode_direct" = yes; then
8289                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8290                 else
8291                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8292                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8293                                                             haveit=
8294                     for x in $rpathdirs; do
8295                       if test "X$x" = "X$found_dir"; then
8296                         haveit=yes
8297                         break
8298                       fi
8299                     done
8300                     if test -z "$haveit"; then
8301                       rpathdirs="$rpathdirs $found_dir"
8302                     fi
8303                   else
8304                                                                                 haveit=
8305                     for x in $LDFLAGS $LIBICONV; do
8306
8307   acl_save_prefix="$prefix"
8308   prefix="$acl_final_prefix"
8309   acl_save_exec_prefix="$exec_prefix"
8310   exec_prefix="$acl_final_exec_prefix"
8311   eval x=\"$x\"
8312   exec_prefix="$acl_save_exec_prefix"
8313   prefix="$acl_save_prefix"
8314
8315                       if test "X$x" = "X-L$found_dir"; then
8316                         haveit=yes
8317                         break
8318                       fi
8319                     done
8320                     if test -z "$haveit"; then
8321                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8322                     fi
8323                     if test "$hardcode_minus_L" != no; then
8324                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8325                     else
8326                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8327                     fi
8328                   fi
8329                 fi
8330               fi
8331             else
8332               if test "X$found_a" != "X"; then
8333                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8334               else
8335                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8336               fi
8337             fi
8338                         additional_includedir=
8339             case "$found_dir" in
8340               */lib | */lib/)
8341                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8342                 additional_includedir="$basedir/include"
8343                 ;;
8344             esac
8345             if test "X$additional_includedir" != "X"; then
8346                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
8347                 haveit=
8348                 if test "X$additional_includedir" = "X/usr/local/include"; then
8349                   if test -n "$GCC"; then
8350                     case $host_os in
8351                       linux*) haveit=yes;;
8352                     esac
8353                   fi
8354                 fi
8355                 if test -z "$haveit"; then
8356                   for x in $CPPFLAGS $INCICONV; do
8357
8358   acl_save_prefix="$prefix"
8359   prefix="$acl_final_prefix"
8360   acl_save_exec_prefix="$exec_prefix"
8361   exec_prefix="$acl_final_exec_prefix"
8362   eval x=\"$x\"
8363   exec_prefix="$acl_save_exec_prefix"
8364   prefix="$acl_save_prefix"
8365
8366                     if test "X$x" = "X-I$additional_includedir"; then
8367                       haveit=yes
8368                       break
8369                     fi
8370                   done
8371                   if test -z "$haveit"; then
8372                     if test -d "$additional_includedir"; then
8373                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8374                     fi
8375                   fi
8376                 fi
8377               fi
8378             fi
8379                         if test -n "$found_la"; then
8380                                                         save_libdir="$libdir"
8381               case "$found_la" in
8382                 */* | *\\*) . "$found_la" ;;
8383                 *) . "./$found_la" ;;
8384               esac
8385               libdir="$save_libdir"
8386                             for dep in $dependency_libs; do
8387                 case "$dep" in
8388                   -L*)
8389                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8390                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
8391                       haveit=
8392                       if test "X$additional_libdir" = "X/usr/local/lib"; then
8393                         if test -n "$GCC"; then
8394                           case $host_os in
8395                             linux*) haveit=yes;;
8396                           esac
8397                         fi
8398                       fi
8399                       if test -z "$haveit"; then
8400                         haveit=
8401                         for x in $LDFLAGS $LIBICONV; do
8402
8403   acl_save_prefix="$prefix"
8404   prefix="$acl_final_prefix"
8405   acl_save_exec_prefix="$exec_prefix"
8406   exec_prefix="$acl_final_exec_prefix"
8407   eval x=\"$x\"
8408   exec_prefix="$acl_save_exec_prefix"
8409   prefix="$acl_save_prefix"
8410
8411                           if test "X$x" = "X-L$additional_libdir"; then
8412                             haveit=yes
8413                             break
8414                           fi
8415                         done
8416                         if test -z "$haveit"; then
8417                           if test -d "$additional_libdir"; then
8418                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8419                           fi
8420                         fi
8421                         haveit=
8422                         for x in $LDFLAGS $LTLIBICONV; do
8423
8424   acl_save_prefix="$prefix"
8425   prefix="$acl_final_prefix"
8426   acl_save_exec_prefix="$exec_prefix"
8427   exec_prefix="$acl_final_exec_prefix"
8428   eval x=\"$x\"
8429   exec_prefix="$acl_save_exec_prefix"
8430   prefix="$acl_save_prefix"
8431
8432                           if test "X$x" = "X-L$additional_libdir"; then
8433                             haveit=yes
8434                             break
8435                           fi
8436                         done
8437                         if test -z "$haveit"; then
8438                           if test -d "$additional_libdir"; then
8439                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8440                           fi
8441                         fi
8442                       fi
8443                     fi
8444                     ;;
8445                   -R*)
8446                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
8447                     if test "$enable_rpath" != no; then
8448                                                                   haveit=
8449                       for x in $rpathdirs; do
8450                         if test "X$x" = "X$dir"; then
8451                           haveit=yes
8452                           break
8453                         fi
8454                       done
8455                       if test -z "$haveit"; then
8456                         rpathdirs="$rpathdirs $dir"
8457                       fi
8458                                                                   haveit=
8459                       for x in $ltrpathdirs; do
8460                         if test "X$x" = "X$dir"; then
8461                           haveit=yes
8462                           break
8463                         fi
8464                       done
8465                       if test -z "$haveit"; then
8466                         ltrpathdirs="$ltrpathdirs $dir"
8467                       fi
8468                     fi
8469                     ;;
8470                   -l*)
8471                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8472                     ;;
8473                   *.la)
8474                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8475                     ;;
8476                   *)
8477                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8478                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8479                     ;;
8480                 esac
8481               done
8482             fi
8483           else
8484                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8485             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8486           fi
8487         fi
8488       fi
8489     done
8490   done
8491   if test "X$rpathdirs" != "X"; then
8492     if test -n "$hardcode_libdir_separator"; then
8493                         alldirs=
8494       for found_dir in $rpathdirs; do
8495         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8496       done
8497             acl_save_libdir="$libdir"
8498       libdir="$alldirs"
8499       eval flag=\"$hardcode_libdir_flag_spec\"
8500       libdir="$acl_save_libdir"
8501       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8502     else
8503             for found_dir in $rpathdirs; do
8504         acl_save_libdir="$libdir"
8505         libdir="$found_dir"
8506         eval flag=\"$hardcode_libdir_flag_spec\"
8507         libdir="$acl_save_libdir"
8508         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8509       done
8510     fi
8511   fi
8512   if test "X$ltrpathdirs" != "X"; then
8513             for found_dir in $ltrpathdirs; do
8514       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8515     done
8516   fi
8517
8518
8519
8520
8521
8522
8523
8524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8525 $as_echo_n "checking for iconv... " >&6; }
8526 if test "${am_cv_func_iconv+set}" = set; then :
8527   $as_echo_n "(cached) " >&6
8528 else
8529
8530     am_cv_func_iconv="no, consider installing GNU libiconv"
8531     am_cv_lib_iconv=no
8532                     am_save_CPPFLAGS="$CPPFLAGS"
8533     CPPFLAGS="$CPPFLAGS $INCICONV"
8534     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8535 /* end confdefs.h.  */
8536 #include <stdlib.h>
8537 #include <iconv.h>
8538 int
8539 main ()
8540 {
8541 iconv_t cd = iconv_open("","");
8542        iconv(cd,NULL,NULL,NULL,NULL);
8543        iconv_close(cd);
8544   ;
8545   return 0;
8546 }
8547 _ACEOF
8548 if ac_fn_c_try_link "$LINENO"; then :
8549   am_cv_func_iconv=yes
8550 fi
8551 rm -f core conftest.err conftest.$ac_objext \
8552     conftest$ac_exeext conftest.$ac_ext
8553     CPPFLAGS="$am_save_CPPFLAGS"
8554
8555     if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8556       for _libs in .libs _libs; do
8557         am_save_CPPFLAGS="$CPPFLAGS"
8558         am_save_LIBS="$LIBS"
8559         CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8560         LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8561         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8562 /* end confdefs.h.  */
8563 #include <stdlib.h>
8564 #include <iconv.h>
8565 int
8566 main ()
8567 {
8568 iconv_t cd = iconv_open("","");
8569            iconv(cd,NULL,NULL,NULL,NULL);
8570            iconv_close(cd);
8571   ;
8572   return 0;
8573 }
8574 _ACEOF
8575 if ac_fn_c_try_link "$LINENO"; then :
8576   INCICONV="-I../libiconv/include"
8577           LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8578           LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8579           am_cv_lib_iconv=yes
8580           am_cv_func_iconv=yes
8581 fi
8582 rm -f core conftest.err conftest.$ac_objext \
8583     conftest$ac_exeext conftest.$ac_ext
8584         CPPFLAGS="$am_save_CPPFLAGS"
8585         LIBS="$am_save_LIBS"
8586         if test "$am_cv_func_iconv" = "yes"; then
8587           break
8588         fi
8589       done
8590     fi
8591
8592     if test "$am_cv_func_iconv" != yes; then
8593       am_save_CPPFLAGS="$CPPFLAGS"
8594       am_save_LIBS="$LIBS"
8595       CPPFLAGS="$LIBS $INCICONV"
8596       LIBS="$LIBS $LIBICONV"
8597       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8598 /* end confdefs.h.  */
8599 #include <stdlib.h>
8600 #include <iconv.h>
8601 int
8602 main ()
8603 {
8604 iconv_t cd = iconv_open("","");
8605          iconv(cd,NULL,NULL,NULL,NULL);
8606          iconv_close(cd);
8607   ;
8608   return 0;
8609 }
8610 _ACEOF
8611 if ac_fn_c_try_link "$LINENO"; then :
8612   am_cv_lib_iconv=yes
8613         am_cv_func_iconv=yes
8614 fi
8615 rm -f core conftest.err conftest.$ac_objext \
8616     conftest$ac_exeext conftest.$ac_ext
8617       CPPFLAGS="$am_save_CPPFLAGS"
8618       LIBS="$am_save_LIBS"
8619     fi
8620
8621 fi
8622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8623 $as_echo "$am_cv_func_iconv" >&6; }
8624   if test "$am_cv_func_iconv" = yes; then
8625
8626 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8627
8628   fi
8629   if test "$am_cv_lib_iconv" = yes; then
8630
8631   for element in $INCICONV; do
8632     haveit=
8633     for x in $CPPFLAGS; do
8634
8635   acl_save_prefix="$prefix"
8636   prefix="$acl_final_prefix"
8637   acl_save_exec_prefix="$exec_prefix"
8638   exec_prefix="$acl_final_exec_prefix"
8639   eval x=\"$x\"
8640   exec_prefix="$acl_save_exec_prefix"
8641   prefix="$acl_save_prefix"
8642
8643       if test "X$x" = "X$element"; then
8644         haveit=yes
8645         break
8646       fi
8647     done
8648     if test -z "$haveit"; then
8649       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8650     fi
8651   done
8652
8653     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8654 $as_echo_n "checking how to link with libiconv... " >&6; }
8655     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8656 $as_echo "$LIBICONV" >&6; }
8657   else
8658     LIBICONV=
8659     LTLIBICONV=
8660   fi
8661
8662
8663
8664   if test "$am_cv_func_iconv" = yes; then
8665     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8666 $as_echo_n "checking for iconv declaration... " >&6; }
8667     if test "${am_cv_proto_iconv+set}" = set; then :
8668   $as_echo_n "(cached) " >&6
8669 else
8670
8671       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8672 /* end confdefs.h.  */
8673
8674 #include <stdlib.h>
8675 #include <iconv.h>
8676 extern
8677 #ifdef __cplusplus
8678 "C"
8679 #endif
8680 #if defined(__STDC__) || defined(__cplusplus)
8681 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8682 #else
8683 size_t iconv();
8684 #endif
8685
8686 int
8687 main ()
8688 {
8689
8690   ;
8691   return 0;
8692 }
8693 _ACEOF
8694 if ac_fn_c_try_compile "$LINENO"; then :
8695   am_cv_proto_iconv_arg1=""
8696 else
8697   am_cv_proto_iconv_arg1="const"
8698 fi
8699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8700       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);"
8701 fi
8702
8703     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8704     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8705          }$am_cv_proto_iconv" >&5
8706 $as_echo "${ac_t:-
8707          }$am_cv_proto_iconv" >&6; }
8708
8709 cat >>confdefs.h <<_ACEOF
8710 #define ICONV_CONST $am_cv_proto_iconv_arg1
8711 _ACEOF
8712
8713   fi
8714
8715
8716 # GDB may fork/exec the iconv program to get the list of supported character
8717 # sets.  Allow the user to specify where to find it.
8718 # There are several factors affecting the choice of option name:
8719 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8720 #   the build-time location of libiconv files.
8721 # - The program we need to find is iconv, which comes with glibc.  The user
8722 #   doesn't necessarily have libiconv installed.  Therefore naming this
8723 #   --with-libiconv-foo feels wrong.
8724 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8725 #   defined to work on directories not files (though it really doesn't know
8726 #   the difference).
8727 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8728 #   with --with-libiconv-prefix.
8729 # Putting these together is why the option name is --with-iconv-bin.
8730
8731
8732 # Check whether --with-iconv-bin was given.
8733 if test "${with_iconv_bin+set}" = set; then :
8734   withval=$with_iconv_bin; iconv_bin="${withval}"
8735
8736 cat >>confdefs.h <<_ACEOF
8737 #define ICONV_BIN "${iconv_bin}"
8738 _ACEOF
8739
8740
8741   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8742      if test "x$prefix" = xNONE; then
8743         test_prefix=/usr/local
8744      else
8745         test_prefix=$prefix
8746      fi
8747   else
8748      test_prefix=$exec_prefix
8749   fi
8750   value=0
8751   case ${iconv_bin} in
8752      "${test_prefix}"|"${test_prefix}/"*|\
8753         '${exec_prefix}'|'${exec_prefix}/'*)
8754      value=1
8755      ;;
8756   esac
8757
8758 cat >>confdefs.h <<_ACEOF
8759 #define ICONV_BIN_RELOCATABLE $value
8760 _ACEOF
8761
8762
8763
8764 fi
8765
8766
8767 # For the TUI, we need enhanced curses functionality.
8768 if test x"$enable_tui" != xno; then
8769   prefer_curses=yes
8770 fi
8771
8772 curses_found=no
8773 if test x"$prefer_curses" = xyes; then
8774   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8775   # curses library because the latter might not provide all the
8776   # functionality we need.  However, this leads to problems on systems
8777   # where the linker searches /usr/local/lib, but the compiler doesn't
8778   # search /usr/local/include, if ncurses is installed in /usr/local.  A
8779   # default installation of ncurses on alpha*-dec-osf* will lead to such
8780   # a situation.
8781   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8782 $as_echo_n "checking for library containing waddstr... " >&6; }
8783 if test "${ac_cv_search_waddstr+set}" = set; then :
8784   $as_echo_n "(cached) " >&6
8785 else
8786   ac_func_search_save_LIBS=$LIBS
8787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8788 /* end confdefs.h.  */
8789
8790 /* Override any GCC internal prototype to avoid an error.
8791    Use char because int might match the return type of a GCC
8792    builtin and then its argument prototype would still apply.  */
8793 #ifdef __cplusplus
8794 extern "C"
8795 #endif
8796 char waddstr ();
8797 int
8798 main ()
8799 {
8800 return waddstr ();
8801   ;
8802   return 0;
8803 }
8804 _ACEOF
8805 for ac_lib in '' ncurses cursesX curses; do
8806   if test -z "$ac_lib"; then
8807     ac_res="none required"
8808   else
8809     ac_res=-l$ac_lib
8810     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8811   fi
8812   if ac_fn_c_try_link "$LINENO"; then :
8813   ac_cv_search_waddstr=$ac_res
8814 fi
8815 rm -f core conftest.err conftest.$ac_objext \
8816     conftest$ac_exeext
8817   if test "${ac_cv_search_waddstr+set}" = set; then :
8818   break
8819 fi
8820 done
8821 if test "${ac_cv_search_waddstr+set}" = set; then :
8822
8823 else
8824   ac_cv_search_waddstr=no
8825 fi
8826 rm conftest.$ac_ext
8827 LIBS=$ac_func_search_save_LIBS
8828 fi
8829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8830 $as_echo "$ac_cv_search_waddstr" >&6; }
8831 ac_res=$ac_cv_search_waddstr
8832 if test "$ac_res" != no; then :
8833   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8834
8835 fi
8836
8837
8838   if test "$ac_cv_search_waddstr" != no; then
8839     curses_found=yes
8840   fi
8841 fi
8842
8843 # Check whether we should enable the TUI, but only do so if we really
8844 # can.
8845 if test x"$enable_tui" != xno; then
8846   if test -d $srcdir/tui; then
8847     if test "$curses_found" != no; then
8848       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8849       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8850       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8851       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8852     else
8853       if test x"$enable_tui" = xyes; then
8854         as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
8855       else
8856         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8857 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8858       fi
8859     fi
8860   fi
8861 fi
8862
8863 # Since GDB uses Readline, we need termcap functionality.  In many
8864 # cases this will be provided by the curses library, but some systems
8865 # have a separate termcap library, or no curses library at all.
8866
8867 case $host_os in
8868   cygwin*)
8869     if test -d $srcdir/libtermcap; then
8870       LIBS="../libtermcap/libtermcap.a $LIBS"
8871       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8872     fi ;;
8873   go32* | *djgpp*)
8874     ac_cv_search_tgetent="none required"
8875     ;;
8876 esac
8877
8878 # These are the libraries checked by Readline.
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8880 $as_echo_n "checking for library containing tgetent... " >&6; }
8881 if test "${ac_cv_search_tgetent+set}" = set; then :
8882   $as_echo_n "(cached) " >&6
8883 else
8884   ac_func_search_save_LIBS=$LIBS
8885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8886 /* end confdefs.h.  */
8887
8888 /* Override any GCC internal prototype to avoid an error.
8889    Use char because int might match the return type of a GCC
8890    builtin and then its argument prototype would still apply.  */
8891 #ifdef __cplusplus
8892 extern "C"
8893 #endif
8894 char tgetent ();
8895 int
8896 main ()
8897 {
8898 return tgetent ();
8899   ;
8900   return 0;
8901 }
8902 _ACEOF
8903 for ac_lib in '' termcap tinfo curses ncurses; do
8904   if test -z "$ac_lib"; then
8905     ac_res="none required"
8906   else
8907     ac_res=-l$ac_lib
8908     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8909   fi
8910   if ac_fn_c_try_link "$LINENO"; then :
8911   ac_cv_search_tgetent=$ac_res
8912 fi
8913 rm -f core conftest.err conftest.$ac_objext \
8914     conftest$ac_exeext
8915   if test "${ac_cv_search_tgetent+set}" = set; then :
8916   break
8917 fi
8918 done
8919 if test "${ac_cv_search_tgetent+set}" = set; then :
8920
8921 else
8922   ac_cv_search_tgetent=no
8923 fi
8924 rm conftest.$ac_ext
8925 LIBS=$ac_func_search_save_LIBS
8926 fi
8927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8928 $as_echo "$ac_cv_search_tgetent" >&6; }
8929 ac_res=$ac_cv_search_tgetent
8930 if test "$ac_res" != no; then :
8931   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8932
8933 fi
8934
8935
8936 if test "$ac_cv_search_tgetent" = no; then
8937   CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8938 fi
8939
8940
8941 # Check whether --with-system-readline was given.
8942 if test "${with_system_readline+set}" = set; then :
8943   withval=$with_system_readline;
8944 fi
8945
8946
8947 if test "$with_system_readline" = yes; then
8948   READLINE=-lreadline
8949   READLINE_DEPS=
8950   READLINE_CFLAGS=
8951   READLINE_TEXI_INCFLAG=
8952 else
8953   READLINE='$(READLINE_DIR)/libreadline.a'
8954   READLINE_DEPS='$(READLINE)'
8955   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
8956   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
8957 fi
8958
8959
8960
8961
8962
8963 # Generate jit-reader.h
8964
8965 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8966 TARGET_PTR=
8967
8968 # The cast to long int works around a bug in the HP C Compiler
8969 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8970 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8971 # This bug is HP SR number 8606223364.
8972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8973 $as_echo_n "checking size of unsigned long long... " >&6; }
8974 if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8975   $as_echo_n "(cached) " >&6
8976 else
8977   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
8978
8979 else
8980   if test "$ac_cv_type_unsigned_long_long" = yes; then
8981      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8982 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8983 { as_fn_set_status 77
8984 as_fn_error "cannot compute sizeof (unsigned long long)
8985 See \`config.log' for more details." "$LINENO" 5; }; }
8986    else
8987      ac_cv_sizeof_unsigned_long_long=0
8988    fi
8989 fi
8990
8991 fi
8992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8993 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8994
8995
8996
8997 cat >>confdefs.h <<_ACEOF
8998 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8999 _ACEOF
9000
9001
9002 # The cast to long int works around a bug in the HP C Compiler
9003 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9004 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9005 # This bug is HP SR number 8606223364.
9006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9007 $as_echo_n "checking size of unsigned long... " >&6; }
9008 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
9009   $as_echo_n "(cached) " >&6
9010 else
9011   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
9012
9013 else
9014   if test "$ac_cv_type_unsigned_long" = yes; then
9015      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9016 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9017 { as_fn_set_status 77
9018 as_fn_error "cannot compute sizeof (unsigned long)
9019 See \`config.log' for more details." "$LINENO" 5; }; }
9020    else
9021      ac_cv_sizeof_unsigned_long=0
9022    fi
9023 fi
9024
9025 fi
9026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9027 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9028
9029
9030
9031 cat >>confdefs.h <<_ACEOF
9032 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9033 _ACEOF
9034
9035
9036 # The cast to long int works around a bug in the HP C Compiler
9037 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9038 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9039 # This bug is HP SR number 8606223364.
9040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9041 $as_echo_n "checking size of unsigned __int128... " >&6; }
9042 if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
9043   $as_echo_n "(cached) " >&6
9044 else
9045   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
9046
9047 else
9048   if test "$ac_cv_type_unsigned___int128" = yes; then
9049      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9050 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9051 { as_fn_set_status 77
9052 as_fn_error "cannot compute sizeof (unsigned __int128)
9053 See \`config.log' for more details." "$LINENO" 5; }; }
9054    else
9055      ac_cv_sizeof_unsigned___int128=0
9056    fi
9057 fi
9058
9059 fi
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9061 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9062
9063
9064
9065 cat >>confdefs.h <<_ACEOF
9066 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9067 _ACEOF
9068
9069
9070
9071 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9072   TARGET_PTR="unsigned long"
9073 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9074   TARGET_PTR="unsigned long long"
9075 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9076   TARGET_PTR="unsigned __int128"
9077 else
9078   TARGET_PTR="unsigned long"
9079 fi
9080
9081
9082 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9083
9084
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9086 $as_echo_n "checking for library containing dlopen... " >&6; }
9087 if test "${ac_cv_search_dlopen+set}" = set; then :
9088   $as_echo_n "(cached) " >&6
9089 else
9090   ac_func_search_save_LIBS=$LIBS
9091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9092 /* end confdefs.h.  */
9093
9094 /* Override any GCC internal prototype to avoid an error.
9095    Use char because int might match the return type of a GCC
9096    builtin and then its argument prototype would still apply.  */
9097 #ifdef __cplusplus
9098 extern "C"
9099 #endif
9100 char dlopen ();
9101 int
9102 main ()
9103 {
9104 return dlopen ();
9105   ;
9106   return 0;
9107 }
9108 _ACEOF
9109 for ac_lib in '' dl; do
9110   if test -z "$ac_lib"; then
9111     ac_res="none required"
9112   else
9113     ac_res=-l$ac_lib
9114     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9115   fi
9116   if ac_fn_c_try_link "$LINENO"; then :
9117   ac_cv_search_dlopen=$ac_res
9118 fi
9119 rm -f core conftest.err conftest.$ac_objext \
9120     conftest$ac_exeext
9121   if test "${ac_cv_search_dlopen+set}" = set; then :
9122   break
9123 fi
9124 done
9125 if test "${ac_cv_search_dlopen+set}" = set; then :
9126
9127 else
9128   ac_cv_search_dlopen=no
9129 fi
9130 rm conftest.$ac_ext
9131 LIBS=$ac_func_search_save_LIBS
9132 fi
9133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9134 $as_echo "$ac_cv_search_dlopen" >&6; }
9135 ac_res=$ac_cv_search_dlopen
9136 if test "$ac_res" != no; then :
9137   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9138
9139 fi
9140
9141
9142
9143
9144 # Check whether --with-jit-reader-dir was given.
9145 if test "${with_jit_reader_dir+set}" = set; then :
9146   withval=$with_jit_reader_dir;
9147     JIT_READER_DIR=$withval
9148 else
9149   JIT_READER_DIR=${libdir}/gdb
9150 fi
9151
9152
9153   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9154   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9155   ac_define_dir=`eval echo $JIT_READER_DIR`
9156   ac_define_dir=`eval echo $ac_define_dir`
9157
9158 cat >>confdefs.h <<_ACEOF
9159 #define JIT_READER_DIR "$ac_define_dir"
9160 _ACEOF
9161
9162
9163
9164
9165   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9166      if test "x$prefix" = xNONE; then
9167         test_prefix=/usr/local
9168      else
9169         test_prefix=$prefix
9170      fi
9171   else
9172      test_prefix=$exec_prefix
9173   fi
9174   value=0
9175   case ${ac_define_dir} in
9176      "${test_prefix}"|"${test_prefix}/"*|\
9177         '${exec_prefix}'|'${exec_prefix}/'*)
9178      value=1
9179      ;;
9180   esac
9181
9182 cat >>confdefs.h <<_ACEOF
9183 #define JIT_READER_DIR_RELOCATABLE $value
9184 _ACEOF
9185
9186
9187
9188
9189
9190 # Check whether --with-expat was given.
9191 if test "${with_expat+set}" = set; then :
9192   withval=$with_expat;
9193 else
9194   with_expat=auto
9195 fi
9196
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9198 $as_echo_n "checking whether to use expat... " >&6; }
9199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9200 $as_echo "$with_expat" >&6; }
9201
9202 if test "${with_expat}" = no; then
9203   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9204 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9205   HAVE_LIBEXPAT=no
9206 else
9207
9208
9209
9210
9211
9212
9213
9214
9215     use_additional=yes
9216
9217   acl_save_prefix="$prefix"
9218   prefix="$acl_final_prefix"
9219   acl_save_exec_prefix="$exec_prefix"
9220   exec_prefix="$acl_final_exec_prefix"
9221
9222     eval additional_includedir=\"$includedir\"
9223     eval additional_libdir=\"$libdir\"
9224
9225   exec_prefix="$acl_save_exec_prefix"
9226   prefix="$acl_save_prefix"
9227
9228
9229 # Check whether --with-libexpat-prefix was given.
9230 if test "${with_libexpat_prefix+set}" = set; then :
9231   withval=$with_libexpat_prefix;
9232     if test "X$withval" = "Xno"; then
9233       use_additional=no
9234     else
9235       if test "X$withval" = "X"; then
9236
9237   acl_save_prefix="$prefix"
9238   prefix="$acl_final_prefix"
9239   acl_save_exec_prefix="$exec_prefix"
9240   exec_prefix="$acl_final_exec_prefix"
9241
9242           eval additional_includedir=\"$includedir\"
9243           eval additional_libdir=\"$libdir\"
9244
9245   exec_prefix="$acl_save_exec_prefix"
9246   prefix="$acl_save_prefix"
9247
9248       else
9249         additional_includedir="$withval/include"
9250         additional_libdir="$withval/lib"
9251       fi
9252     fi
9253
9254 fi
9255
9256       LIBEXPAT=
9257   LTLIBEXPAT=
9258   INCEXPAT=
9259   rpathdirs=
9260   ltrpathdirs=
9261   names_already_handled=
9262   names_next_round='expat '
9263   while test -n "$names_next_round"; do
9264     names_this_round="$names_next_round"
9265     names_next_round=
9266     for name in $names_this_round; do
9267       already_handled=
9268       for n in $names_already_handled; do
9269         if test "$n" = "$name"; then
9270           already_handled=yes
9271           break
9272         fi
9273       done
9274       if test -z "$already_handled"; then
9275         names_already_handled="$names_already_handled $name"
9276                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9277         eval value=\"\$HAVE_LIB$uppername\"
9278         if test -n "$value"; then
9279           if test "$value" = yes; then
9280             eval value=\"\$LIB$uppername\"
9281             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9282             eval value=\"\$LTLIB$uppername\"
9283             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9284           else
9285                                     :
9286           fi
9287         else
9288                               found_dir=
9289           found_la=
9290           found_so=
9291           found_a=
9292           if test $use_additional = yes; then
9293             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9294               found_dir="$additional_libdir"
9295               found_so="$additional_libdir/lib$name.$shlibext"
9296               if test -f "$additional_libdir/lib$name.la"; then
9297                 found_la="$additional_libdir/lib$name.la"
9298               fi
9299             else
9300               if test -f "$additional_libdir/lib$name.$libext"; then
9301                 found_dir="$additional_libdir"
9302                 found_a="$additional_libdir/lib$name.$libext"
9303                 if test -f "$additional_libdir/lib$name.la"; then
9304                   found_la="$additional_libdir/lib$name.la"
9305                 fi
9306               fi
9307             fi
9308           fi
9309           if test "X$found_dir" = "X"; then
9310             for x in $LDFLAGS $LTLIBEXPAT; do
9311
9312   acl_save_prefix="$prefix"
9313   prefix="$acl_final_prefix"
9314   acl_save_exec_prefix="$exec_prefix"
9315   exec_prefix="$acl_final_exec_prefix"
9316   eval x=\"$x\"
9317   exec_prefix="$acl_save_exec_prefix"
9318   prefix="$acl_save_prefix"
9319
9320               case "$x" in
9321                 -L*)
9322                   dir=`echo "X$x" | sed -e 's/^X-L//'`
9323                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9324                     found_dir="$dir"
9325                     found_so="$dir/lib$name.$shlibext"
9326                     if test -f "$dir/lib$name.la"; then
9327                       found_la="$dir/lib$name.la"
9328                     fi
9329                   else
9330                     if test -f "$dir/lib$name.$libext"; then
9331                       found_dir="$dir"
9332                       found_a="$dir/lib$name.$libext"
9333                       if test -f "$dir/lib$name.la"; then
9334                         found_la="$dir/lib$name.la"
9335                       fi
9336                     fi
9337                   fi
9338                   ;;
9339               esac
9340               if test "X$found_dir" != "X"; then
9341                 break
9342               fi
9343             done
9344           fi
9345           if test "X$found_dir" != "X"; then
9346                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9347             if test "X$found_so" != "X"; then
9348                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9349                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9350               else
9351                                                                                 haveit=
9352                 for x in $ltrpathdirs; do
9353                   if test "X$x" = "X$found_dir"; then
9354                     haveit=yes
9355                     break
9356                   fi
9357                 done
9358                 if test -z "$haveit"; then
9359                   ltrpathdirs="$ltrpathdirs $found_dir"
9360                 fi
9361                                 if test "$hardcode_direct" = yes; then
9362                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9363                 else
9364                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9365                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9366                                                             haveit=
9367                     for x in $rpathdirs; do
9368                       if test "X$x" = "X$found_dir"; then
9369                         haveit=yes
9370                         break
9371                       fi
9372                     done
9373                     if test -z "$haveit"; then
9374                       rpathdirs="$rpathdirs $found_dir"
9375                     fi
9376                   else
9377                                                                                 haveit=
9378                     for x in $LDFLAGS $LIBEXPAT; do
9379
9380   acl_save_prefix="$prefix"
9381   prefix="$acl_final_prefix"
9382   acl_save_exec_prefix="$exec_prefix"
9383   exec_prefix="$acl_final_exec_prefix"
9384   eval x=\"$x\"
9385   exec_prefix="$acl_save_exec_prefix"
9386   prefix="$acl_save_prefix"
9387
9388                       if test "X$x" = "X-L$found_dir"; then
9389                         haveit=yes
9390                         break
9391                       fi
9392                     done
9393                     if test -z "$haveit"; then
9394                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9395                     fi
9396                     if test "$hardcode_minus_L" != no; then
9397                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9398                     else
9399                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9400                     fi
9401                   fi
9402                 fi
9403               fi
9404             else
9405               if test "X$found_a" != "X"; then
9406                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9407               else
9408                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9409               fi
9410             fi
9411                         additional_includedir=
9412             case "$found_dir" in
9413               */lib | */lib/)
9414                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9415                 additional_includedir="$basedir/include"
9416                 ;;
9417             esac
9418             if test "X$additional_includedir" != "X"; then
9419                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
9420                 haveit=
9421                 if test "X$additional_includedir" = "X/usr/local/include"; then
9422                   if test -n "$GCC"; then
9423                     case $host_os in
9424                       linux*) haveit=yes;;
9425                     esac
9426                   fi
9427                 fi
9428                 if test -z "$haveit"; then
9429                   for x in $CPPFLAGS $INCEXPAT; do
9430
9431   acl_save_prefix="$prefix"
9432   prefix="$acl_final_prefix"
9433   acl_save_exec_prefix="$exec_prefix"
9434   exec_prefix="$acl_final_exec_prefix"
9435   eval x=\"$x\"
9436   exec_prefix="$acl_save_exec_prefix"
9437   prefix="$acl_save_prefix"
9438
9439                     if test "X$x" = "X-I$additional_includedir"; then
9440                       haveit=yes
9441                       break
9442                     fi
9443                   done
9444                   if test -z "$haveit"; then
9445                     if test -d "$additional_includedir"; then
9446                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9447                     fi
9448                   fi
9449                 fi
9450               fi
9451             fi
9452                         if test -n "$found_la"; then
9453                                                         save_libdir="$libdir"
9454               case "$found_la" in
9455                 */* | *\\*) . "$found_la" ;;
9456                 *) . "./$found_la" ;;
9457               esac
9458               libdir="$save_libdir"
9459                             for dep in $dependency_libs; do
9460                 case "$dep" in
9461                   -L*)
9462                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9463                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
9464                       haveit=
9465                       if test "X$additional_libdir" = "X/usr/local/lib"; then
9466                         if test -n "$GCC"; then
9467                           case $host_os in
9468                             linux*) haveit=yes;;
9469                           esac
9470                         fi
9471                       fi
9472                       if test -z "$haveit"; then
9473                         haveit=
9474                         for x in $LDFLAGS $LIBEXPAT; do
9475
9476   acl_save_prefix="$prefix"
9477   prefix="$acl_final_prefix"
9478   acl_save_exec_prefix="$exec_prefix"
9479   exec_prefix="$acl_final_exec_prefix"
9480   eval x=\"$x\"
9481   exec_prefix="$acl_save_exec_prefix"
9482   prefix="$acl_save_prefix"
9483
9484                           if test "X$x" = "X-L$additional_libdir"; then
9485                             haveit=yes
9486                             break
9487                           fi
9488                         done
9489                         if test -z "$haveit"; then
9490                           if test -d "$additional_libdir"; then
9491                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9492                           fi
9493                         fi
9494                         haveit=
9495                         for x in $LDFLAGS $LTLIBEXPAT; do
9496
9497   acl_save_prefix="$prefix"
9498   prefix="$acl_final_prefix"
9499   acl_save_exec_prefix="$exec_prefix"
9500   exec_prefix="$acl_final_exec_prefix"
9501   eval x=\"$x\"
9502   exec_prefix="$acl_save_exec_prefix"
9503   prefix="$acl_save_prefix"
9504
9505                           if test "X$x" = "X-L$additional_libdir"; then
9506                             haveit=yes
9507                             break
9508                           fi
9509                         done
9510                         if test -z "$haveit"; then
9511                           if test -d "$additional_libdir"; then
9512                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9513                           fi
9514                         fi
9515                       fi
9516                     fi
9517                     ;;
9518                   -R*)
9519                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
9520                     if test "$enable_rpath" != no; then
9521                                                                   haveit=
9522                       for x in $rpathdirs; do
9523                         if test "X$x" = "X$dir"; then
9524                           haveit=yes
9525                           break
9526                         fi
9527                       done
9528                       if test -z "$haveit"; then
9529                         rpathdirs="$rpathdirs $dir"
9530                       fi
9531                                                                   haveit=
9532                       for x in $ltrpathdirs; do
9533                         if test "X$x" = "X$dir"; then
9534                           haveit=yes
9535                           break
9536                         fi
9537                       done
9538                       if test -z "$haveit"; then
9539                         ltrpathdirs="$ltrpathdirs $dir"
9540                       fi
9541                     fi
9542                     ;;
9543                   -l*)
9544                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9545                     ;;
9546                   *.la)
9547                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9548                     ;;
9549                   *)
9550                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9551                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9552                     ;;
9553                 esac
9554               done
9555             fi
9556           else
9557                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9558             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9559           fi
9560         fi
9561       fi
9562     done
9563   done
9564   if test "X$rpathdirs" != "X"; then
9565     if test -n "$hardcode_libdir_separator"; then
9566                         alldirs=
9567       for found_dir in $rpathdirs; do
9568         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9569       done
9570             acl_save_libdir="$libdir"
9571       libdir="$alldirs"
9572       eval flag=\"$hardcode_libdir_flag_spec\"
9573       libdir="$acl_save_libdir"
9574       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9575     else
9576             for found_dir in $rpathdirs; do
9577         acl_save_libdir="$libdir"
9578         libdir="$found_dir"
9579         eval flag=\"$hardcode_libdir_flag_spec\"
9580         libdir="$acl_save_libdir"
9581         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9582       done
9583     fi
9584   fi
9585   if test "X$ltrpathdirs" != "X"; then
9586             for found_dir in $ltrpathdirs; do
9587       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9588     done
9589   fi
9590
9591
9592         ac_save_CPPFLAGS="$CPPFLAGS"
9593
9594   for element in $INCEXPAT; do
9595     haveit=
9596     for x in $CPPFLAGS; do
9597
9598   acl_save_prefix="$prefix"
9599   prefix="$acl_final_prefix"
9600   acl_save_exec_prefix="$exec_prefix"
9601   exec_prefix="$acl_final_exec_prefix"
9602   eval x=\"$x\"
9603   exec_prefix="$acl_save_exec_prefix"
9604   prefix="$acl_save_prefix"
9605
9606       if test "X$x" = "X$element"; then
9607         haveit=yes
9608         break
9609       fi
9610     done
9611     if test -z "$haveit"; then
9612       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9613     fi
9614   done
9615
9616
9617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9618 $as_echo_n "checking for libexpat... " >&6; }
9619 if test "${ac_cv_libexpat+set}" = set; then :
9620   $as_echo_n "(cached) " >&6
9621 else
9622
9623     ac_save_LIBS="$LIBS"
9624     LIBS="$LIBS $LIBEXPAT"
9625     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9626 /* end confdefs.h.  */
9627 #include "expat.h"
9628 int
9629 main ()
9630 {
9631 XML_Parser p = XML_ParserCreate (0);
9632   ;
9633   return 0;
9634 }
9635 _ACEOF
9636 if ac_fn_c_try_link "$LINENO"; then :
9637   ac_cv_libexpat=yes
9638 else
9639   ac_cv_libexpat=no
9640 fi
9641 rm -f core conftest.err conftest.$ac_objext \
9642     conftest$ac_exeext conftest.$ac_ext
9643     LIBS="$ac_save_LIBS"
9644
9645 fi
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9647 $as_echo "$ac_cv_libexpat" >&6; }
9648   if test "$ac_cv_libexpat" = yes; then
9649     HAVE_LIBEXPAT=yes
9650
9651 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9652
9653     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9654 $as_echo_n "checking how to link with libexpat... " >&6; }
9655     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9656 $as_echo "$LIBEXPAT" >&6; }
9657   else
9658     HAVE_LIBEXPAT=no
9659             CPPFLAGS="$ac_save_CPPFLAGS"
9660     LIBEXPAT=
9661     LTLIBEXPAT=
9662   fi
9663
9664
9665
9666
9667
9668
9669   if test "$HAVE_LIBEXPAT" != yes; then
9670     if test "$with_expat" = yes; then
9671       as_fn_error "expat is missing or unusable" "$LINENO" 5
9672     else
9673       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9674 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9675     fi
9676   else
9677     save_LIBS=$LIBS
9678     LIBS="$LIBS $LIBEXPAT"
9679     for ac_func in XML_StopParser
9680 do :
9681   ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9682 if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
9683   cat >>confdefs.h <<_ACEOF
9684 #define HAVE_XML_STOPPARSER 1
9685 _ACEOF
9686
9687 fi
9688 done
9689
9690     LIBS=$save_LIBS
9691   fi
9692 fi
9693
9694 # --------------------- #
9695 # Check for libpython.  #
9696 # --------------------- #
9697
9698
9699
9700
9701
9702
9703 # Check whether --with-python was given.
9704 if test "${with_python+set}" = set; then :
9705   withval=$with_python;
9706 else
9707   with_python=auto
9708 fi
9709
9710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
9711 $as_echo_n "checking whether to use python... " >&6; }
9712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
9713 $as_echo "$with_python" >&6; }
9714
9715 if test "${with_python}" = no; then
9716   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
9717 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
9718   have_libpython=no
9719 else
9720   case "${with_python}" in
9721   [\\/]* | ?:[\\/]*)
9722     if test -d ${with_python}; then
9723       # Assume the python binary is ${with_python}/bin/python.
9724       python_prog="${with_python}/bin/python"
9725       python_prefix=
9726       # If python does not exit ${with_python}/bin, then try in
9727       # ${with_python}.  On Windows/MinGW, this is where the Python
9728       # executable is.
9729       if test ! -x "${python_prog}"; then
9730         python_prog="${with_python}/python"
9731         python_prefix=
9732       fi
9733       if test ! -x "${python_prog}"; then
9734         # Fall back to gdb 7.0/7.1 behaviour.
9735         python_prog=missing
9736         python_prefix=${with_python}
9737       fi
9738     elif test -x "${with_python}"; then
9739       # While we can't run python compiled for $host (unless host == build),
9740       # the user could write a script that provides the needed information,
9741       # so we support that.
9742       python_prog=${with_python}
9743       python_prefix=
9744     else
9745       as_fn_error "invalid value for --with-python" "$LINENO" 5
9746     fi
9747     ;;
9748   */*)
9749     # Disallow --with-python=foo/bar.
9750     as_fn_error "invalid value for --with-python" "$LINENO" 5
9751     ;;
9752   *)
9753     # The user has either specified auto, yes, or the name of the python
9754     # program assumed to be in $PATH.
9755     python_prefix=
9756     case "${with_python}" in
9757     yes | auto)
9758       if test ${build} = ${host}; then
9759         # Extract the first word of "python", so it can be a program name with args.
9760 set dummy python; ac_word=$2
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9762 $as_echo_n "checking for $ac_word... " >&6; }
9763 if test "${ac_cv_path_python_prog_path+set}" = set; then :
9764   $as_echo_n "(cached) " >&6
9765 else
9766   case $python_prog_path in
9767   [\\/]* | ?:[\\/]*)
9768   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9769   ;;
9770   *)
9771   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9772 for as_dir in $PATH
9773 do
9774   IFS=$as_save_IFS
9775   test -z "$as_dir" && as_dir=.
9776     for ac_exec_ext in '' $ac_executable_extensions; do
9777   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9778     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9779     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9780     break 2
9781   fi
9782 done
9783   done
9784 IFS=$as_save_IFS
9785
9786   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9787   ;;
9788 esac
9789 fi
9790 python_prog_path=$ac_cv_path_python_prog_path
9791 if test -n "$python_prog_path"; then
9792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9793 $as_echo "$python_prog_path" >&6; }
9794 else
9795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9796 $as_echo "no" >&6; }
9797 fi
9798
9799
9800         if test "${python_prog_path}" = missing; then
9801           python_prog=missing
9802         else
9803           python_prog=${python_prog_path}
9804         fi
9805       else
9806         # Not much we can do except assume the cross-compiler will find the
9807         # right files.
9808         python_prog=missing
9809       fi
9810       ;;
9811     *)
9812       # While we can't run python compiled for $host (unless host == build),
9813       # the user could write a script that provides the needed information,
9814       # so we support that.
9815       python_prog="${with_python}"
9816       # Extract the first word of "${python_prog}", so it can be a program name with args.
9817 set dummy ${python_prog}; ac_word=$2
9818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9819 $as_echo_n "checking for $ac_word... " >&6; }
9820 if test "${ac_cv_path_python_prog_path+set}" = set; then :
9821   $as_echo_n "(cached) " >&6
9822 else
9823   case $python_prog_path in
9824   [\\/]* | ?:[\\/]*)
9825   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9826   ;;
9827   *)
9828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9829 for as_dir in $PATH
9830 do
9831   IFS=$as_save_IFS
9832   test -z "$as_dir" && as_dir=.
9833     for ac_exec_ext in '' $ac_executable_extensions; do
9834   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9835     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9837     break 2
9838   fi
9839 done
9840   done
9841 IFS=$as_save_IFS
9842
9843   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9844   ;;
9845 esac
9846 fi
9847 python_prog_path=$ac_cv_path_python_prog_path
9848 if test -n "$python_prog_path"; then
9849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9850 $as_echo "$python_prog_path" >&6; }
9851 else
9852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853 $as_echo "no" >&6; }
9854 fi
9855
9856
9857       if test "${python_prog_path}" = missing; then
9858         as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9859       fi
9860       ;;
9861     esac
9862   esac
9863
9864   if test "${python_prog}" != missing; then
9865     # We have a python program to use, but it may be too old.
9866     # Don't flag an error for --with-python=auto (the default).
9867     have_python_config=yes
9868     python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9869     if test $? != 0; then
9870       have_python_config=failed
9871       if test "${with_python}" != auto; then
9872         as_fn_error "failure running python-config --includes" "$LINENO" 5
9873       fi
9874     fi
9875     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9876     if test $? != 0; then
9877       have_python_config=failed
9878       if test "${with_python}" != auto; then
9879         as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9880       fi
9881     fi
9882     python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9883     if test $? != 0; then
9884       have_python_config=failed
9885       if test "${with_python}" != auto; then
9886         as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9887       fi
9888     fi
9889   else
9890     # We do not have a python executable we can use to determine where
9891     # to find the Python headers and libs.  We cannot guess the include
9892     # path from the python_prefix either, because that include path
9893     # depends on the Python version.  So, there is nothing much we can
9894     # do except assume that the compiler will be able to find those files.
9895     python_includes=
9896     python_libs=
9897     have_python_config=no
9898   fi
9899
9900   # If we have python-config, only try the configuration it provides.
9901   # Otherwise fallback on the old way of trying different versions of
9902   # python in turn.
9903
9904   have_libpython=no
9905   if test "${have_python_config}" = yes; then
9906     # Determine the Python version by extracting "-lpython<version>"
9907     # part of the python_libs. <version> is usually X.Y with X and Y
9908     # being decimal numbers, but can also be XY (seen on Windows).
9909     #
9910     # The extraction is performed using sed with a regular expression.
9911     # Initially, the regexp used was using the '?' quantifier to make
9912     # the dot in the version number optional.  Unfortunately, this
9913     # does not work with non-GNU versions of sed because, because of
9914     # what looks like a limitation (the '?' quantifier does not work
9915     # with back-references).  We work around this limitation by using
9916     # the '*' quantifier instead.  It means that, in theory, we might
9917     # match unexpected version strings such as "-lpython2..7", but
9918     # this seems unlikely in practice.  And even if that happens,
9919     # an error will be triggered later on, when checking that version
9920     # number.
9921     python_version=`echo " ${python_libs} " \
9922                          | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
9923     case "${python_version}" in
9924     python*)
9925
9926   version=${python_version}
9927
9928   new_CPPFLAGS=${python_includes}
9929   new_LIBS=${python_libs}
9930   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9931 $as_echo_n "checking for ${version}... " >&6; }
9932   save_CPPFLAGS=$CPPFLAGS
9933   save_LIBS=$LIBS
9934   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9935   LIBS="$LIBS $new_LIBS"
9936   found_usable_python=no
9937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9938 /* end confdefs.h.  */
9939 #include "Python.h"
9940 int
9941 main ()
9942 {
9943 Py_Initialize ();
9944   ;
9945   return 0;
9946 }
9947 _ACEOF
9948 if ac_fn_c_try_link "$LINENO"; then :
9949   have_libpython=${version}
9950                   found_usable_python=yes
9951                   PYTHON_CPPFLAGS=$new_CPPFLAGS
9952                   PYTHON_LIBS=$new_LIBS
9953 fi
9954 rm -f core conftest.err conftest.$ac_objext \
9955     conftest$ac_exeext conftest.$ac_ext
9956   CPPFLAGS=$save_CPPFLAGS
9957   LIBS=$save_LIBS
9958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9959 $as_echo "${found_usable_python}" >&6; }
9960
9961       ;;
9962     *)
9963       as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
9964       ;;
9965     esac
9966   elif test "${have_python_config}" != failed; then
9967     if test "${have_libpython}" = no; then
9968
9969   version=python2.7
9970
9971   new_CPPFLAGS=${python_includes}
9972   new_LIBS="${python_libs} -lpython2.7"
9973   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9974 $as_echo_n "checking for ${version}... " >&6; }
9975   save_CPPFLAGS=$CPPFLAGS
9976   save_LIBS=$LIBS
9977   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9978   LIBS="$LIBS $new_LIBS"
9979   found_usable_python=no
9980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9981 /* end confdefs.h.  */
9982 #include "Python.h"
9983 int
9984 main ()
9985 {
9986 Py_Initialize ();
9987   ;
9988   return 0;
9989 }
9990 _ACEOF
9991 if ac_fn_c_try_link "$LINENO"; then :
9992   have_libpython=${version}
9993                   found_usable_python=yes
9994                   PYTHON_CPPFLAGS=$new_CPPFLAGS
9995                   PYTHON_LIBS=$new_LIBS
9996 fi
9997 rm -f core conftest.err conftest.$ac_objext \
9998     conftest$ac_exeext conftest.$ac_ext
9999   CPPFLAGS=$save_CPPFLAGS
10000   LIBS=$save_LIBS
10001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10002 $as_echo "${found_usable_python}" >&6; }
10003
10004     fi
10005     if test "${have_libpython}" = no; then
10006
10007   version=python2.6
10008
10009   new_CPPFLAGS=${python_includes}
10010   new_LIBS="${python_libs} -lpython2.6"
10011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10012 $as_echo_n "checking for ${version}... " >&6; }
10013   save_CPPFLAGS=$CPPFLAGS
10014   save_LIBS=$LIBS
10015   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10016   LIBS="$LIBS $new_LIBS"
10017   found_usable_python=no
10018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10019 /* end confdefs.h.  */
10020 #include "Python.h"
10021 int
10022 main ()
10023 {
10024 Py_Initialize ();
10025   ;
10026   return 0;
10027 }
10028 _ACEOF
10029 if ac_fn_c_try_link "$LINENO"; then :
10030   have_libpython=${version}
10031                   found_usable_python=yes
10032                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10033                   PYTHON_LIBS=$new_LIBS
10034 fi
10035 rm -f core conftest.err conftest.$ac_objext \
10036     conftest$ac_exeext conftest.$ac_ext
10037   CPPFLAGS=$save_CPPFLAGS
10038   LIBS=$save_LIBS
10039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10040 $as_echo "${found_usable_python}" >&6; }
10041
10042     fi
10043     if test ${have_libpython} = no; then
10044
10045   version=python2.5
10046
10047   new_CPPFLAGS=${python_includes}
10048   new_LIBS="${python_libs} -lpython2.5"
10049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10050 $as_echo_n "checking for ${version}... " >&6; }
10051   save_CPPFLAGS=$CPPFLAGS
10052   save_LIBS=$LIBS
10053   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10054   LIBS="$LIBS $new_LIBS"
10055   found_usable_python=no
10056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10057 /* end confdefs.h.  */
10058 #include "Python.h"
10059 int
10060 main ()
10061 {
10062 Py_Initialize ();
10063   ;
10064   return 0;
10065 }
10066 _ACEOF
10067 if ac_fn_c_try_link "$LINENO"; then :
10068   have_libpython=${version}
10069                   found_usable_python=yes
10070                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10071                   PYTHON_LIBS=$new_LIBS
10072 fi
10073 rm -f core conftest.err conftest.$ac_objext \
10074     conftest$ac_exeext conftest.$ac_ext
10075   CPPFLAGS=$save_CPPFLAGS
10076   LIBS=$save_LIBS
10077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10078 $as_echo "${found_usable_python}" >&6; }
10079
10080     fi
10081     if test ${have_libpython} = no; then
10082
10083   version=python2.4
10084
10085   new_CPPFLAGS=${python_includes}
10086   new_LIBS="${python_libs} -lpython2.4"
10087   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10088 $as_echo_n "checking for ${version}... " >&6; }
10089   save_CPPFLAGS=$CPPFLAGS
10090   save_LIBS=$LIBS
10091   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10092   LIBS="$LIBS $new_LIBS"
10093   found_usable_python=no
10094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10095 /* end confdefs.h.  */
10096 #include "Python.h"
10097 int
10098 main ()
10099 {
10100 Py_Initialize ();
10101   ;
10102   return 0;
10103 }
10104 _ACEOF
10105 if ac_fn_c_try_link "$LINENO"; then :
10106   have_libpython=${version}
10107                   found_usable_python=yes
10108                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10109                   PYTHON_LIBS=$new_LIBS
10110 fi
10111 rm -f core conftest.err conftest.$ac_objext \
10112     conftest$ac_exeext conftest.$ac_ext
10113   CPPFLAGS=$save_CPPFLAGS
10114   LIBS=$save_LIBS
10115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10116 $as_echo "${found_usable_python}" >&6; }
10117
10118     fi
10119   fi
10120   if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
10121
10122 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10123
10124   elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
10125
10126 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10127
10128   elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
10129
10130 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10131
10132   elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
10133
10134 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10135
10136   fi
10137
10138   if test "${have_libpython}" = no; then
10139     case "${with_python}" in
10140     yes)
10141       as_fn_error "python is missing or unusable" "$LINENO" 5
10142       ;;
10143     auto)
10144       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10145 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10146       ;;
10147     *)
10148       as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10149       ;;
10150     esac
10151   else
10152     if test -n "${python_prefix}"; then
10153
10154 cat >>confdefs.h <<_ACEOF
10155 #define WITH_PYTHON_PATH "${python_prefix}"
10156 _ACEOF
10157
10158
10159   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10160      if test "x$prefix" = xNONE; then
10161         test_prefix=/usr/local
10162      else
10163         test_prefix=$prefix
10164      fi
10165   else
10166      test_prefix=$exec_prefix
10167   fi
10168   value=0
10169   case ${python_prefix} in
10170      "${test_prefix}"|"${test_prefix}/"*|\
10171         '${exec_prefix}'|'${exec_prefix}/'*)
10172      value=1
10173      ;;
10174   esac
10175
10176 cat >>confdefs.h <<_ACEOF
10177 #define PYTHON_PATH_RELOCATABLE $value
10178 _ACEOF
10179
10180
10181     fi
10182   fi
10183 fi
10184
10185 if test "${have_libpython}" != no; then
10186
10187 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10188
10189   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10190   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10191   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10192   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10193   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10194
10195   # Flags needed to compile Python code (taken from python-config --cflags).
10196   # We cannot call python-config directly because it will output whatever was
10197   # used when compiling the Python interpreter itself, including flags which
10198   # would make the python-related objects be compiled differently from the
10199   # rest of GDB (e.g., -O2 and -fPIC).
10200   if test "${GCC}" = yes; then
10201     tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10202   fi
10203
10204   if test "x${tentative_python_cflags}" != x; then
10205     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10206 $as_echo_n "checking compiler flags for python code... " >&6; }
10207     for flag in ${tentative_python_cflags}; do
10208       # Check that the compiler accepts it
10209       saved_CFLAGS="$CFLAGS"
10210       CFLAGS="$CFLAGS $flag"
10211       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10212 /* end confdefs.h.  */
10213
10214 int
10215 main ()
10216 {
10217
10218   ;
10219   return 0;
10220 }
10221 _ACEOF
10222 if ac_fn_c_try_compile "$LINENO"; then :
10223   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10224 fi
10225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10226       CFLAGS="$saved_CFLAGS"
10227     done
10228     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10229 $as_echo "${PYTHON_CFLAGS}" >&6; }
10230   fi
10231
10232   # On x64 Windows, Python's include headers, and pyconfig.h in
10233   # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10234   # version of Windows.  Unfortunately, MS_WIN64 is only defined if
10235   # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
10236   # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10237   # The issue was reported to the Python community, but still isn't
10238   # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10239
10240   case "$gdb_host" in
10241     mingw64)
10242            if test "${GCC}" = yes; then
10243              CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10244            fi
10245            ;;
10246   esac
10247
10248   # Note that "python -m threading" cannot be used to check for
10249   # threading support due to a bug in Python 2.7.3
10250   # (http://bugs.python.org/issue15567).
10251   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10252 $as_echo_n "checking whether python supports threads... " >&6; }
10253   saved_CPPFLAGS="${CPPFLAGS}"
10254   CPPFLAGS="${PYTHON_CPPFLAGS}"
10255   # Note that the test is reversed so that python_has_threads=yes on
10256   # unexpected failures.
10257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10258 /* end confdefs.h.  */
10259
10260 #include <Python.h>
10261 #ifdef WITH_THREAD
10262 # error
10263 #endif
10264
10265 _ACEOF
10266 if ac_fn_c_try_cpp "$LINENO"; then :
10267   python_has_threads=no
10268 else
10269   python_has_threads=yes
10270 fi
10271 rm -f conftest.err conftest.$ac_ext
10272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10273 $as_echo "${python_has_threads}" >&6; }
10274   CPPFLAGS="${saved_CPPFLAGS}"
10275 else
10276   # Even if Python support is not compiled in, we need to have this file
10277   # included so that the "python" command, et.al., still exists.
10278   CONFIG_OBS="$CONFIG_OBS python.o"
10279   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10280 fi
10281
10282 # Work around Python http://bugs.python.org/issue10112.  See also
10283 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10284 # no effect.  Note that the only test after this that uses Python is
10285 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10286 # run without -export-dynamic too.
10287 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10288
10289
10290
10291
10292  if test "${have_libpython}" != no; then
10293   HAVE_PYTHON_TRUE=
10294   HAVE_PYTHON_FALSE='#'
10295 else
10296   HAVE_PYTHON_TRUE='#'
10297   HAVE_PYTHON_FALSE=
10298 fi
10299
10300
10301 # -------------------- #
10302 # Check for libguile.  #
10303 # -------------------- #
10304
10305
10306
10307
10308
10309
10310 # Check whether --with-guile was given.
10311 if test "${with_guile+set}" = set; then :
10312   withval=$with_guile;
10313 else
10314   with_guile=auto
10315 fi
10316
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10318 $as_echo_n "checking whether to use guile... " >&6; }
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10320 $as_echo "$with_guile" >&6; }
10321
10322 # Extract the first word of "pkg-config", so it can be a program name with args.
10323 set dummy pkg-config; ac_word=$2
10324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10325 $as_echo_n "checking for $ac_word... " >&6; }
10326 if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
10327   $as_echo_n "(cached) " >&6
10328 else
10329   case $pkg_config_prog_path in
10330   [\\/]* | ?:[\\/]*)
10331   ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10332   ;;
10333   *)
10334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335 for as_dir in $PATH
10336 do
10337   IFS=$as_save_IFS
10338   test -z "$as_dir" && as_dir=.
10339     for ac_exec_ext in '' $ac_executable_extensions; do
10340   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10341     ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343     break 2
10344   fi
10345 done
10346   done
10347 IFS=$as_save_IFS
10348
10349   test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10350   ;;
10351 esac
10352 fi
10353 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10354 if test -n "$pkg_config_prog_path"; then
10355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10356 $as_echo "$pkg_config_prog_path" >&6; }
10357 else
10358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359 $as_echo "no" >&6; }
10360 fi
10361
10362
10363
10364 try_guile_versions="guile-2.2 guile-2.0"
10365 have_libguile=no
10366 case "${with_guile}" in
10367 no)
10368   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10369 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10370   ;;
10371 auto)
10372   if test "${pkg_config_prog_path}" = "missing"; then
10373     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10374 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10375   else
10376
10377   pkg_config=${pkg_config_prog_path}
10378   guile_version_list=${try_guile_versions}
10379   flag_errors=no
10380
10381   found_usable_guile=checking
10382   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10383 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10384   for guile_version in ${guile_version_list}; do
10385     ${pkg_config} --exists ${guile_version} 2>/dev/null
10386     if test $? != 0; then
10387       continue
10388     fi
10389             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10390     if test $? != 0; then
10391       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10392     fi
10393     new_LIBS=`${pkg_config} --libs ${guile_version}`
10394     if test $? != 0; then
10395       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10396     fi
10397         found_usable_guile=${guile_version}
10398     break
10399   done
10400   if test "${found_usable_guile}" = "checking"; then
10401     if test "${flag_errors}" = "yes"; then
10402       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10403     else
10404       found_usable_guile=no
10405     fi
10406   fi
10407       if test "${found_usable_guile}" != no; then
10408     save_CPPFLAGS=$CPPFLAGS
10409     save_LIBS=$LIBS
10410     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10411     LIBS="$LIBS $new_LIBS"
10412     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10413 /* end confdefs.h.  */
10414 #include "libguile.h"
10415 int
10416 main ()
10417 {
10418 scm_init_guile ();
10419   ;
10420   return 0;
10421 }
10422 _ACEOF
10423 if ac_fn_c_try_link "$LINENO"; then :
10424   have_libguile=yes
10425                     GUILE_CPPFLAGS=$new_CPPFLAGS
10426                     GUILE_LIBS=$new_LIBS
10427 else
10428   found_usable_guile=no
10429 fi
10430 rm -f core conftest.err conftest.$ac_objext \
10431     conftest$ac_exeext conftest.$ac_ext
10432         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10433 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10434
10435 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10436
10437
10438 fi
10439
10440     CPPFLAGS=$save_CPPFLAGS
10441     LIBS=$save_LIBS
10442     if test "${found_usable_guile}" = no; then
10443       if test "${flag_errors}" = yes; then
10444         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10445 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10446 as_fn_error "linking guile version ${guile_version} test program failed
10447 See \`config.log' for more details." "$LINENO" 5; }
10448       fi
10449     fi
10450   fi
10451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10452 $as_echo "${found_usable_guile}" >&6; }
10453
10454   fi
10455   ;;
10456 yes)
10457   if test "${pkg_config_prog_path}" = "missing"; then
10458     as_fn_error "pkg-config not found" "$LINENO" 5
10459   fi
10460
10461   pkg_config=${pkg_config_prog_path}
10462   guile_version_list=${try_guile_versions}
10463   flag_errors=yes
10464
10465   found_usable_guile=checking
10466   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10467 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10468   for guile_version in ${guile_version_list}; do
10469     ${pkg_config} --exists ${guile_version} 2>/dev/null
10470     if test $? != 0; then
10471       continue
10472     fi
10473             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10474     if test $? != 0; then
10475       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10476     fi
10477     new_LIBS=`${pkg_config} --libs ${guile_version}`
10478     if test $? != 0; then
10479       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10480     fi
10481         found_usable_guile=${guile_version}
10482     break
10483   done
10484   if test "${found_usable_guile}" = "checking"; then
10485     if test "${flag_errors}" = "yes"; then
10486       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10487     else
10488       found_usable_guile=no
10489     fi
10490   fi
10491       if test "${found_usable_guile}" != no; then
10492     save_CPPFLAGS=$CPPFLAGS
10493     save_LIBS=$LIBS
10494     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10495     LIBS="$LIBS $new_LIBS"
10496     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10497 /* end confdefs.h.  */
10498 #include "libguile.h"
10499 int
10500 main ()
10501 {
10502 scm_init_guile ();
10503   ;
10504   return 0;
10505 }
10506 _ACEOF
10507 if ac_fn_c_try_link "$LINENO"; then :
10508   have_libguile=yes
10509                     GUILE_CPPFLAGS=$new_CPPFLAGS
10510                     GUILE_LIBS=$new_LIBS
10511 else
10512   found_usable_guile=no
10513 fi
10514 rm -f core conftest.err conftest.$ac_objext \
10515     conftest$ac_exeext conftest.$ac_ext
10516         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10517 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10518
10519 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10520
10521
10522 fi
10523
10524     CPPFLAGS=$save_CPPFLAGS
10525     LIBS=$save_LIBS
10526     if test "${found_usable_guile}" = no; then
10527       if test "${flag_errors}" = yes; then
10528         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10529 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10530 as_fn_error "linking guile version ${guile_version} test program failed
10531 See \`config.log' for more details." "$LINENO" 5; }
10532       fi
10533     fi
10534   fi
10535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10536 $as_echo "${found_usable_guile}" >&6; }
10537
10538   ;;
10539 [\\/]* | ?:[\\/]*)
10540   if test -x "${with_guile}"; then
10541
10542   pkg_config=${with_guile}
10543   guile_version_list=${try_guile_versions}
10544   flag_errors=yes
10545
10546   found_usable_guile=checking
10547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10548 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10549   for guile_version in ${guile_version_list}; do
10550     ${pkg_config} --exists ${guile_version} 2>/dev/null
10551     if test $? != 0; then
10552       continue
10553     fi
10554             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10555     if test $? != 0; then
10556       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10557     fi
10558     new_LIBS=`${pkg_config} --libs ${guile_version}`
10559     if test $? != 0; then
10560       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10561     fi
10562         found_usable_guile=${guile_version}
10563     break
10564   done
10565   if test "${found_usable_guile}" = "checking"; then
10566     if test "${flag_errors}" = "yes"; then
10567       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10568     else
10569       found_usable_guile=no
10570     fi
10571   fi
10572       if test "${found_usable_guile}" != no; then
10573     save_CPPFLAGS=$CPPFLAGS
10574     save_LIBS=$LIBS
10575     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10576     LIBS="$LIBS $new_LIBS"
10577     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10578 /* end confdefs.h.  */
10579 #include "libguile.h"
10580 int
10581 main ()
10582 {
10583 scm_init_guile ();
10584   ;
10585   return 0;
10586 }
10587 _ACEOF
10588 if ac_fn_c_try_link "$LINENO"; then :
10589   have_libguile=yes
10590                     GUILE_CPPFLAGS=$new_CPPFLAGS
10591                     GUILE_LIBS=$new_LIBS
10592 else
10593   found_usable_guile=no
10594 fi
10595 rm -f core conftest.err conftest.$ac_objext \
10596     conftest$ac_exeext conftest.$ac_ext
10597         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10598 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10599
10600 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10601
10602
10603 fi
10604
10605     CPPFLAGS=$save_CPPFLAGS
10606     LIBS=$save_LIBS
10607     if test "${found_usable_guile}" = no; then
10608       if test "${flag_errors}" = yes; then
10609         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10610 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10611 as_fn_error "linking guile version ${guile_version} test program failed
10612 See \`config.log' for more details." "$LINENO" 5; }
10613       fi
10614     fi
10615   fi
10616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10617 $as_echo "${found_usable_guile}" >&6; }
10618
10619   else
10620     as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
10621   fi
10622   ;;
10623 "" | */*)
10624   # Disallow --with=guile="" and --with-guile=foo/bar.
10625   as_fn_error "invalid value for --with-guile" "$LINENO" 5
10626   ;;
10627 *)
10628   # A space separate list of guile versions to try, in order.
10629   if test "${pkg_config_prog_path}" = "missing"; then
10630     as_fn_error "pkg-config not found" "$LINENO" 5
10631   fi
10632
10633   pkg_config=${pkg_config_prog_path}
10634   guile_version_list=${with_guile}
10635   flag_errors=yes
10636
10637   found_usable_guile=checking
10638   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10639 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10640   for guile_version in ${guile_version_list}; do
10641     ${pkg_config} --exists ${guile_version} 2>/dev/null
10642     if test $? != 0; then
10643       continue
10644     fi
10645             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10646     if test $? != 0; then
10647       as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10648     fi
10649     new_LIBS=`${pkg_config} --libs ${guile_version}`
10650     if test $? != 0; then
10651       as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10652     fi
10653         found_usable_guile=${guile_version}
10654     break
10655   done
10656   if test "${found_usable_guile}" = "checking"; then
10657     if test "${flag_errors}" = "yes"; then
10658       as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10659     else
10660       found_usable_guile=no
10661     fi
10662   fi
10663       if test "${found_usable_guile}" != no; then
10664     save_CPPFLAGS=$CPPFLAGS
10665     save_LIBS=$LIBS
10666     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10667     LIBS="$LIBS $new_LIBS"
10668     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10669 /* end confdefs.h.  */
10670 #include "libguile.h"
10671 int
10672 main ()
10673 {
10674 scm_init_guile ();
10675   ;
10676   return 0;
10677 }
10678 _ACEOF
10679 if ac_fn_c_try_link "$LINENO"; then :
10680   have_libguile=yes
10681                     GUILE_CPPFLAGS=$new_CPPFLAGS
10682                     GUILE_LIBS=$new_LIBS
10683 else
10684   found_usable_guile=no
10685 fi
10686 rm -f core conftest.err conftest.$ac_objext \
10687     conftest$ac_exeext conftest.$ac_ext
10688         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10689 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10690
10691 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10692
10693
10694 fi
10695
10696     CPPFLAGS=$save_CPPFLAGS
10697     LIBS=$save_LIBS
10698     if test "${found_usable_guile}" = no; then
10699       if test "${flag_errors}" = yes; then
10700         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10701 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10702 as_fn_error "linking guile version ${guile_version} test program failed
10703 See \`config.log' for more details." "$LINENO" 5; }
10704       fi
10705     fi
10706   fi
10707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10708 $as_echo "${found_usable_guile}" >&6; }
10709
10710   ;;
10711 esac
10712
10713 if test "${have_libguile}" != no; then
10714     case "${with_guile}" in
10715   [\\/]* | ?:[\\/]*)
10716
10717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10718 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10719 if test "${ac_cv_guild_program_name+set}" = set; then :
10720   $as_echo_n "(cached) " >&6
10721 else
10722   ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
10723
10724      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10725      # the 'guild' and 'bindir' variables.  In that case, try to guess
10726      # what the program name is, at the risk of getting it wrong if
10727      # Guile was configured with '--program-suffix' or similar.
10728      if test "x$ac_cv_guild_program_name" = "x"; then
10729        guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
10730        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10731      fi
10732
10733 fi
10734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10735 $as_echo "$ac_cv_guild_program_name" >&6; }
10736
10737   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10738     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10739   fi
10740
10741   GUILD="$ac_cv_guild_program_name"
10742
10743
10744     ;;
10745   *)
10746
10747   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10748 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10749 if test "${ac_cv_guild_program_name+set}" = set; then :
10750   $as_echo_n "(cached) " >&6
10751 else
10752   ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
10753
10754      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10755      # the 'guild' and 'bindir' variables.  In that case, try to guess
10756      # what the program name is, at the risk of getting it wrong if
10757      # Guile was configured with '--program-suffix' or similar.
10758      if test "x$ac_cv_guild_program_name" = "x"; then
10759        guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
10760        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10761      fi
10762
10763 fi
10764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10765 $as_echo "$ac_cv_guild_program_name" >&6; }
10766
10767   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10768     as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10769   fi
10770
10771   GUILD="$ac_cv_guild_program_name"
10772
10773
10774     ;;
10775   esac
10776
10777
10778   if test "$cross_compiling" = no; then
10779     GUILD_TARGET_FLAG=
10780   else
10781     GUILD_TARGET_FLAG="--target=$host"
10782   fi
10783
10784
10785
10786
10787   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
10788 $as_echo_n "checking whether guild supports this host... " >&6; }
10789 if test "${ac_cv_guild_ok+set}" = set; then :
10790   $as_echo_n "(cached) " >&6
10791 else
10792   echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
10793      if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
10794        ac_cv_guild_ok=yes
10795      else
10796        ac_cv_guild_ok=no
10797      fi
10798 fi
10799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
10800 $as_echo "$ac_cv_guild_ok" >&6; }
10801
10802     if test "$ac_cv_guild_ok" = no; then
10803     have_libguile=no
10804     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
10805 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
10806   fi
10807 fi
10808
10809 if test "${have_libguile}" != no; then
10810
10811 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
10812
10813   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
10814   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
10815   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
10816   CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
10817   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
10818
10819     save_LIBS="$LIBS"
10820   save_CPPFLAGS="$CPPFLAGS"
10821   LIBS="$GUILE_LIBS"
10822   CPPFLAGS="$GUILE_CPPFLAGS"
10823   for ac_func in scm_new_smob
10824 do :
10825   ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
10826 if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
10827   cat >>confdefs.h <<_ACEOF
10828 #define HAVE_SCM_NEW_SMOB 1
10829 _ACEOF
10830
10831 fi
10832 done
10833
10834   LIBS="$save_LIBS"
10835   CPPFLAGS="$save_CPPFLAGS"
10836 else
10837   # Even if Guile support is not compiled in, we need to have these files
10838   # included.
10839   CONFIG_OBS="$CONFIG_OBS guile.o"
10840   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10841 fi
10842
10843
10844  if test "${have_libguile}" != no; then
10845   HAVE_GUILE_TRUE=
10846   HAVE_GUILE_FALSE='#'
10847 else
10848   HAVE_GUILE_TRUE='#'
10849   HAVE_GUILE_FALSE=
10850 fi
10851
10852
10853 # --------------------- #
10854 # Check for libmcheck.  #
10855 # --------------------- #
10856
10857 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
10858 # but turn it off if Python is enabled with threads, since -lmcheck is
10859 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10860 # and for releases.
10861 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10862    && $development; then
10863   libmcheck_default=yes
10864 else
10865   libmcheck_default=no
10866 fi
10867
10868   # Check whether --enable-libmcheck was given.
10869 if test "${enable_libmcheck+set}" = set; then :
10870   enableval=$enable_libmcheck; case "${enableval}" in
10871       yes | y) ENABLE_LIBMCHECK="yes" ;;
10872       no | n)  ENABLE_LIBMCHECK="no" ;;
10873       *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10874     esac
10875 fi
10876
10877
10878   if test -z "${ENABLE_LIBMCHECK}"; then
10879     ENABLE_LIBMCHECK=${libmcheck_default}
10880   fi
10881
10882   if test "$ENABLE_LIBMCHECK" = "yes" ; then
10883     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
10884 $as_echo_n "checking for main in -lmcheck... " >&6; }
10885 if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10886   $as_echo_n "(cached) " >&6
10887 else
10888   ac_check_lib_save_LIBS=$LIBS
10889 LIBS="-lmcheck  $LIBS"
10890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10891 /* end confdefs.h.  */
10892
10893
10894 int
10895 main ()
10896 {
10897 return main ();
10898   ;
10899   return 0;
10900 }
10901 _ACEOF
10902 if ac_fn_c_try_link "$LINENO"; then :
10903   ac_cv_lib_mcheck_main=yes
10904 else
10905   ac_cv_lib_mcheck_main=no
10906 fi
10907 rm -f core conftest.err conftest.$ac_objext \
10908     conftest$ac_exeext conftest.$ac_ext
10909 LIBS=$ac_check_lib_save_LIBS
10910 fi
10911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10912 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
10913 if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10914   cat >>confdefs.h <<_ACEOF
10915 #define HAVE_LIBMCHECK 1
10916 _ACEOF
10917
10918   LIBS="-lmcheck $LIBS"
10919
10920 fi
10921
10922   fi
10923
10924
10925 if test "$ENABLE_LIBMCHECK" = "yes" \
10926         -a "${have_libpython}" != "no" \
10927         -a "${python_has_threads}" = "yes" ; then
10928   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10929 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
10930 fi
10931
10932
10933 # Check whether --with-intel_pt was given.
10934 if test "${with_intel_pt+set}" = set; then :
10935   withval=$with_intel_pt;
10936 else
10937   with_intel_pt=auto
10938 fi
10939
10940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10941 $as_echo_n "checking whether to use intel pt... " >&6; }
10942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10943 $as_echo "$with_intel_pt" >&6; }
10944
10945 if test "${with_intel_pt}" = no; then
10946   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10947 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
10948   HAVE_LIBIPT=no
10949 else
10950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10951 /* end confdefs.h.  */
10952
10953 #include <linux/perf_event.h>
10954 #ifndef PERF_ATTR_SIZE_VER5
10955 # error
10956 #endif
10957
10958 _ACEOF
10959 if ac_fn_c_try_cpp "$LINENO"; then :
10960   perf_event=yes
10961 else
10962   perf_event=no
10963 fi
10964 rm -f conftest.err conftest.$ac_ext
10965   if test "$perf_event" != yes; then
10966     if test "$with_intel_pt" = yes; then
10967       as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10968     else
10969       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10970 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10971     fi
10972   fi
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982     use_additional=yes
10983
10984   acl_save_prefix="$prefix"
10985   prefix="$acl_final_prefix"
10986   acl_save_exec_prefix="$exec_prefix"
10987   exec_prefix="$acl_final_exec_prefix"
10988
10989     eval additional_includedir=\"$includedir\"
10990     eval additional_libdir=\"$libdir\"
10991
10992   exec_prefix="$acl_save_exec_prefix"
10993   prefix="$acl_save_prefix"
10994
10995
10996 # Check whether --with-libipt-prefix was given.
10997 if test "${with_libipt_prefix+set}" = set; then :
10998   withval=$with_libipt_prefix;
10999     if test "X$withval" = "Xno"; then
11000       use_additional=no
11001     else
11002       if test "X$withval" = "X"; then
11003
11004   acl_save_prefix="$prefix"
11005   prefix="$acl_final_prefix"
11006   acl_save_exec_prefix="$exec_prefix"
11007   exec_prefix="$acl_final_exec_prefix"
11008
11009           eval additional_includedir=\"$includedir\"
11010           eval additional_libdir=\"$libdir\"
11011
11012   exec_prefix="$acl_save_exec_prefix"
11013   prefix="$acl_save_prefix"
11014
11015       else
11016         additional_includedir="$withval/include"
11017         additional_libdir="$withval/lib"
11018       fi
11019     fi
11020
11021 fi
11022
11023       LIBIPT=
11024   LTLIBIPT=
11025   INCIPT=
11026   rpathdirs=
11027   ltrpathdirs=
11028   names_already_handled=
11029   names_next_round='ipt '
11030   while test -n "$names_next_round"; do
11031     names_this_round="$names_next_round"
11032     names_next_round=
11033     for name in $names_this_round; do
11034       already_handled=
11035       for n in $names_already_handled; do
11036         if test "$n" = "$name"; then
11037           already_handled=yes
11038           break
11039         fi
11040       done
11041       if test -z "$already_handled"; then
11042         names_already_handled="$names_already_handled $name"
11043                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11044         eval value=\"\$HAVE_LIB$uppername\"
11045         if test -n "$value"; then
11046           if test "$value" = yes; then
11047             eval value=\"\$LIB$uppername\"
11048             test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11049             eval value=\"\$LTLIB$uppername\"
11050             test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11051           else
11052                                     :
11053           fi
11054         else
11055                               found_dir=
11056           found_la=
11057           found_so=
11058           found_a=
11059           if test $use_additional = yes; then
11060             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11061               found_dir="$additional_libdir"
11062               found_so="$additional_libdir/lib$name.$shlibext"
11063               if test -f "$additional_libdir/lib$name.la"; then
11064                 found_la="$additional_libdir/lib$name.la"
11065               fi
11066             else
11067               if test -f "$additional_libdir/lib$name.$libext"; then
11068                 found_dir="$additional_libdir"
11069                 found_a="$additional_libdir/lib$name.$libext"
11070                 if test -f "$additional_libdir/lib$name.la"; then
11071                   found_la="$additional_libdir/lib$name.la"
11072                 fi
11073               fi
11074             fi
11075           fi
11076           if test "X$found_dir" = "X"; then
11077             for x in $LDFLAGS $LTLIBIPT; do
11078
11079   acl_save_prefix="$prefix"
11080   prefix="$acl_final_prefix"
11081   acl_save_exec_prefix="$exec_prefix"
11082   exec_prefix="$acl_final_exec_prefix"
11083   eval x=\"$x\"
11084   exec_prefix="$acl_save_exec_prefix"
11085   prefix="$acl_save_prefix"
11086
11087               case "$x" in
11088                 -L*)
11089                   dir=`echo "X$x" | sed -e 's/^X-L//'`
11090                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11091                     found_dir="$dir"
11092                     found_so="$dir/lib$name.$shlibext"
11093                     if test -f "$dir/lib$name.la"; then
11094                       found_la="$dir/lib$name.la"
11095                     fi
11096                   else
11097                     if test -f "$dir/lib$name.$libext"; then
11098                       found_dir="$dir"
11099                       found_a="$dir/lib$name.$libext"
11100                       if test -f "$dir/lib$name.la"; then
11101                         found_la="$dir/lib$name.la"
11102                       fi
11103                     fi
11104                   fi
11105                   ;;
11106               esac
11107               if test "X$found_dir" != "X"; then
11108                 break
11109               fi
11110             done
11111           fi
11112           if test "X$found_dir" != "X"; then
11113                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11114             if test "X$found_so" != "X"; then
11115                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11116                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11117               else
11118                                                                                 haveit=
11119                 for x in $ltrpathdirs; do
11120                   if test "X$x" = "X$found_dir"; then
11121                     haveit=yes
11122                     break
11123                   fi
11124                 done
11125                 if test -z "$haveit"; then
11126                   ltrpathdirs="$ltrpathdirs $found_dir"
11127                 fi
11128                                 if test "$hardcode_direct" = yes; then
11129                                                       LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11130                 else
11131                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11132                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11133                                                             haveit=
11134                     for x in $rpathdirs; do
11135                       if test "X$x" = "X$found_dir"; then
11136                         haveit=yes
11137                         break
11138                       fi
11139                     done
11140                     if test -z "$haveit"; then
11141                       rpathdirs="$rpathdirs $found_dir"
11142                     fi
11143                   else
11144                                                                                 haveit=
11145                     for x in $LDFLAGS $LIBIPT; do
11146
11147   acl_save_prefix="$prefix"
11148   prefix="$acl_final_prefix"
11149   acl_save_exec_prefix="$exec_prefix"
11150   exec_prefix="$acl_final_exec_prefix"
11151   eval x=\"$x\"
11152   exec_prefix="$acl_save_exec_prefix"
11153   prefix="$acl_save_prefix"
11154
11155                       if test "X$x" = "X-L$found_dir"; then
11156                         haveit=yes
11157                         break
11158                       fi
11159                     done
11160                     if test -z "$haveit"; then
11161                       LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11162                     fi
11163                     if test "$hardcode_minus_L" != no; then
11164                                                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11165                     else
11166                                                                                                                                                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11167                     fi
11168                   fi
11169                 fi
11170               fi
11171             else
11172               if test "X$found_a" != "X"; then
11173                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11174               else
11175                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11176               fi
11177             fi
11178                         additional_includedir=
11179             case "$found_dir" in
11180               */lib | */lib/)
11181                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11182                 additional_includedir="$basedir/include"
11183                 ;;
11184             esac
11185             if test "X$additional_includedir" != "X"; then
11186                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
11187                 haveit=
11188                 if test "X$additional_includedir" = "X/usr/local/include"; then
11189                   if test -n "$GCC"; then
11190                     case $host_os in
11191                       linux*) haveit=yes;;
11192                     esac
11193                   fi
11194                 fi
11195                 if test -z "$haveit"; then
11196                   for x in $CPPFLAGS $INCIPT; do
11197
11198   acl_save_prefix="$prefix"
11199   prefix="$acl_final_prefix"
11200   acl_save_exec_prefix="$exec_prefix"
11201   exec_prefix="$acl_final_exec_prefix"
11202   eval x=\"$x\"
11203   exec_prefix="$acl_save_exec_prefix"
11204   prefix="$acl_save_prefix"
11205
11206                     if test "X$x" = "X-I$additional_includedir"; then
11207                       haveit=yes
11208                       break
11209                     fi
11210                   done
11211                   if test -z "$haveit"; then
11212                     if test -d "$additional_includedir"; then
11213                                             INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11214                     fi
11215                   fi
11216                 fi
11217               fi
11218             fi
11219                         if test -n "$found_la"; then
11220                                                         save_libdir="$libdir"
11221               case "$found_la" in
11222                 */* | *\\*) . "$found_la" ;;
11223                 *) . "./$found_la" ;;
11224               esac
11225               libdir="$save_libdir"
11226                             for dep in $dependency_libs; do
11227                 case "$dep" in
11228                   -L*)
11229                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11230                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
11231                       haveit=
11232                       if test "X$additional_libdir" = "X/usr/local/lib"; then
11233                         if test -n "$GCC"; then
11234                           case $host_os in
11235                             linux*) haveit=yes;;
11236                           esac
11237                         fi
11238                       fi
11239                       if test -z "$haveit"; then
11240                         haveit=
11241                         for x in $LDFLAGS $LIBIPT; do
11242
11243   acl_save_prefix="$prefix"
11244   prefix="$acl_final_prefix"
11245   acl_save_exec_prefix="$exec_prefix"
11246   exec_prefix="$acl_final_exec_prefix"
11247   eval x=\"$x\"
11248   exec_prefix="$acl_save_exec_prefix"
11249   prefix="$acl_save_prefix"
11250
11251                           if test "X$x" = "X-L$additional_libdir"; then
11252                             haveit=yes
11253                             break
11254                           fi
11255                         done
11256                         if test -z "$haveit"; then
11257                           if test -d "$additional_libdir"; then
11258                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11259                           fi
11260                         fi
11261                         haveit=
11262                         for x in $LDFLAGS $LTLIBIPT; do
11263
11264   acl_save_prefix="$prefix"
11265   prefix="$acl_final_prefix"
11266   acl_save_exec_prefix="$exec_prefix"
11267   exec_prefix="$acl_final_exec_prefix"
11268   eval x=\"$x\"
11269   exec_prefix="$acl_save_exec_prefix"
11270   prefix="$acl_save_prefix"
11271
11272                           if test "X$x" = "X-L$additional_libdir"; then
11273                             haveit=yes
11274                             break
11275                           fi
11276                         done
11277                         if test -z "$haveit"; then
11278                           if test -d "$additional_libdir"; then
11279                                                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11280                           fi
11281                         fi
11282                       fi
11283                     fi
11284                     ;;
11285                   -R*)
11286                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
11287                     if test "$enable_rpath" != no; then
11288                                                                   haveit=
11289                       for x in $rpathdirs; do
11290                         if test "X$x" = "X$dir"; then
11291                           haveit=yes
11292                           break
11293                         fi
11294                       done
11295                       if test -z "$haveit"; then
11296                         rpathdirs="$rpathdirs $dir"
11297                       fi
11298                                                                   haveit=
11299                       for x in $ltrpathdirs; do
11300                         if test "X$x" = "X$dir"; then
11301                           haveit=yes
11302                           break
11303                         fi
11304                       done
11305                       if test -z "$haveit"; then
11306                         ltrpathdirs="$ltrpathdirs $dir"
11307                       fi
11308                     fi
11309                     ;;
11310                   -l*)
11311                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11312                     ;;
11313                   *.la)
11314                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11315                     ;;
11316                   *)
11317                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11318                     LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11319                     ;;
11320                 esac
11321               done
11322             fi
11323           else
11324                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11325             LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11326           fi
11327         fi
11328       fi
11329     done
11330   done
11331   if test "X$rpathdirs" != "X"; then
11332     if test -n "$hardcode_libdir_separator"; then
11333                         alldirs=
11334       for found_dir in $rpathdirs; do
11335         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11336       done
11337             acl_save_libdir="$libdir"
11338       libdir="$alldirs"
11339       eval flag=\"$hardcode_libdir_flag_spec\"
11340       libdir="$acl_save_libdir"
11341       LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11342     else
11343             for found_dir in $rpathdirs; do
11344         acl_save_libdir="$libdir"
11345         libdir="$found_dir"
11346         eval flag=\"$hardcode_libdir_flag_spec\"
11347         libdir="$acl_save_libdir"
11348         LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11349       done
11350     fi
11351   fi
11352   if test "X$ltrpathdirs" != "X"; then
11353             for found_dir in $ltrpathdirs; do
11354       LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11355     done
11356   fi
11357
11358
11359         ac_save_CPPFLAGS="$CPPFLAGS"
11360
11361   for element in $INCIPT; do
11362     haveit=
11363     for x in $CPPFLAGS; do
11364
11365   acl_save_prefix="$prefix"
11366   prefix="$acl_final_prefix"
11367   acl_save_exec_prefix="$exec_prefix"
11368   exec_prefix="$acl_final_exec_prefix"
11369   eval x=\"$x\"
11370   exec_prefix="$acl_save_exec_prefix"
11371   prefix="$acl_save_prefix"
11372
11373       if test "X$x" = "X$element"; then
11374         haveit=yes
11375         break
11376       fi
11377     done
11378     if test -z "$haveit"; then
11379       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11380     fi
11381   done
11382
11383
11384   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11385 $as_echo_n "checking for libipt... " >&6; }
11386 if test "${ac_cv_libipt+set}" = set; then :
11387   $as_echo_n "(cached) " >&6
11388 else
11389
11390     ac_save_LIBS="$LIBS"
11391     LIBS="$LIBS $LIBIPT"
11392     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11393 /* end confdefs.h.  */
11394 #include "intel-pt.h"
11395 int
11396 main ()
11397 {
11398 pt_insn_alloc_decoder (0);
11399   ;
11400   return 0;
11401 }
11402 _ACEOF
11403 if ac_fn_c_try_link "$LINENO"; then :
11404   ac_cv_libipt=yes
11405 else
11406   ac_cv_libipt=no
11407 fi
11408 rm -f core conftest.err conftest.$ac_objext \
11409     conftest$ac_exeext conftest.$ac_ext
11410     LIBS="$ac_save_LIBS"
11411
11412 fi
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11414 $as_echo "$ac_cv_libipt" >&6; }
11415   if test "$ac_cv_libipt" = yes; then
11416     HAVE_LIBIPT=yes
11417
11418 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11419
11420     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11421 $as_echo_n "checking how to link with libipt... " >&6; }
11422     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11423 $as_echo "$LIBIPT" >&6; }
11424   else
11425     HAVE_LIBIPT=no
11426             CPPFLAGS="$ac_save_CPPFLAGS"
11427     LIBIPT=
11428     LTLIBIPT=
11429   fi
11430
11431
11432
11433
11434
11435
11436   if test "$HAVE_LIBIPT" != yes; then
11437     if test "$with_intel_pt" = yes; then
11438       as_fn_error "libipt is missing or unusable" "$LINENO" 5
11439     else
11440       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11441 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11442     fi
11443   else
11444     save_LIBS=$LIBS
11445     LIBS="$LIBS $LIBIPT"
11446     for ac_func in pt_insn_event
11447 do :
11448   ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
11449 if test "x$ac_cv_func_pt_insn_event" = x""yes; then :
11450   cat >>confdefs.h <<_ACEOF
11451 #define HAVE_PT_INSN_EVENT 1
11452 _ACEOF
11453
11454 fi
11455 done
11456
11457     ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11458 "
11459 if test "x$ac_cv_member_struct_pt_insn_enabled" = x""yes; then :
11460
11461 cat >>confdefs.h <<_ACEOF
11462 #define HAVE_STRUCT_PT_INSN_ENABLED 1
11463 _ACEOF
11464
11465
11466 fi
11467 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11468 "
11469 if test "x$ac_cv_member_struct_pt_insn_resynced" = x""yes; then :
11470
11471 cat >>confdefs.h <<_ACEOF
11472 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
11473 _ACEOF
11474
11475
11476 fi
11477
11478     LIBS=$save_LIBS
11479   fi
11480 fi
11481
11482 # ------------------------- #
11483 # Checks for header files.  #
11484 # ------------------------- #
11485
11486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11487 $as_echo_n "checking for ANSI C header files... " >&6; }
11488 if test "${ac_cv_header_stdc+set}" = set; then :
11489   $as_echo_n "(cached) " >&6
11490 else
11491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11492 /* end confdefs.h.  */
11493 #include <stdlib.h>
11494 #include <stdarg.h>
11495 #include <string.h>
11496 #include <float.h>
11497
11498 int
11499 main ()
11500 {
11501
11502   ;
11503   return 0;
11504 }
11505 _ACEOF
11506 if ac_fn_c_try_compile "$LINENO"; then :
11507   ac_cv_header_stdc=yes
11508 else
11509   ac_cv_header_stdc=no
11510 fi
11511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11512
11513 if test $ac_cv_header_stdc = yes; then
11514   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11515   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11516 /* end confdefs.h.  */
11517 #include <string.h>
11518
11519 _ACEOF
11520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11521   $EGREP "memchr" >/dev/null 2>&1; then :
11522
11523 else
11524   ac_cv_header_stdc=no
11525 fi
11526 rm -f conftest*
11527
11528 fi
11529
11530 if test $ac_cv_header_stdc = yes; then
11531   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11533 /* end confdefs.h.  */
11534 #include <stdlib.h>
11535
11536 _ACEOF
11537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11538   $EGREP "free" >/dev/null 2>&1; then :
11539
11540 else
11541   ac_cv_header_stdc=no
11542 fi
11543 rm -f conftest*
11544
11545 fi
11546
11547 if test $ac_cv_header_stdc = yes; then
11548   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11549   if test "$cross_compiling" = yes; then :
11550   :
11551 else
11552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11553 /* end confdefs.h.  */
11554 #include <ctype.h>
11555 #include <stdlib.h>
11556 #if ((' ' & 0x0FF) == 0x020)
11557 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11558 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11559 #else
11560 # define ISLOWER(c) \
11561                    (('a' <= (c) && (c) <= 'i') \
11562                      || ('j' <= (c) && (c) <= 'r') \
11563                      || ('s' <= (c) && (c) <= 'z'))
11564 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11565 #endif
11566
11567 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11568 int
11569 main ()
11570 {
11571   int i;
11572   for (i = 0; i < 256; i++)
11573     if (XOR (islower (i), ISLOWER (i))
11574         || toupper (i) != TOUPPER (i))
11575       return 2;
11576   return 0;
11577 }
11578 _ACEOF
11579 if ac_fn_c_try_run "$LINENO"; then :
11580
11581 else
11582   ac_cv_header_stdc=no
11583 fi
11584 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11585   conftest.$ac_objext conftest.beam conftest.$ac_ext
11586 fi
11587
11588 fi
11589 fi
11590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11591 $as_echo "$ac_cv_header_stdc" >&6; }
11592 if test $ac_cv_header_stdc = yes; then
11593
11594 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11595
11596 fi
11597
11598 # elf_hp.h is for HP/UX 64-bit shared library support.
11599 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
11600                   thread_db.h \
11601                   sys/fault.h \
11602                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11603                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11604                   sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
11605                   termios.h termio.h \
11606                   sgtty.h elf_hp.h \
11607                   dlfcn.h
11608 do :
11609   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11610 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11611 eval as_val=\$$as_ac_Header
11612    if test "x$as_val" = x""yes; then :
11613   cat >>confdefs.h <<_ACEOF
11614 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11615 _ACEOF
11616
11617 fi
11618
11619 done
11620
11621 for ac_header in sys/proc.h
11622 do :
11623   ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11624 # include <sys/param.h>
11625 #endif
11626
11627 "
11628 if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
11629   cat >>confdefs.h <<_ACEOF
11630 #define HAVE_SYS_PROC_H 1
11631 _ACEOF
11632
11633 fi
11634
11635 done
11636
11637 for ac_header in sys/user.h
11638 do :
11639   ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11640 # include <sys/param.h>
11641 #endif
11642
11643 "
11644 if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11645   cat >>confdefs.h <<_ACEOF
11646 #define HAVE_SYS_USER_H 1
11647 _ACEOF
11648
11649 fi
11650
11651 done
11652
11653
11654 # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11655 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11656 # think that we don't have <curses.h> if we're using GCC.
11657 case $host_os in
11658   solaris2.[789])
11659     if test "$GCC" = yes; then
11660
11661 $as_echo "#define _MSE_INT_H 1" >>confdefs.h
11662
11663     fi ;;
11664 esac
11665 for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11666 do :
11667   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11668 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11669 eval as_val=\$$as_ac_Header
11670    if test "x$as_val" = x""yes; then :
11671   cat >>confdefs.h <<_ACEOF
11672 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11673 _ACEOF
11674
11675 fi
11676
11677 done
11678
11679 for ac_header in term.h
11680 do :
11681   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11682 # include <curses.h>
11683 #endif
11684
11685 "
11686 if test "x$ac_cv_header_term_h" = x""yes; then :
11687   cat >>confdefs.h <<_ACEOF
11688 #define HAVE_TERM_H 1
11689 _ACEOF
11690
11691 fi
11692
11693 done
11694
11695
11696 # ------------------------- #
11697 # Checks for declarations.  #
11698 # ------------------------- #
11699
11700
11701   # Check for presence and size of long long.
11702   ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11703 if test "x$ac_cv_type_long_long" = x""yes; then :
11704
11705 cat >>confdefs.h <<_ACEOF
11706 #define HAVE_LONG_LONG 1
11707 _ACEOF
11708
11709 # The cast to long int works around a bug in the HP C Compiler
11710 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11711 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11712 # This bug is HP SR number 8606223364.
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11714 $as_echo_n "checking size of long long... " >&6; }
11715 if test "${ac_cv_sizeof_long_long+set}" = set; then :
11716   $as_echo_n "(cached) " >&6
11717 else
11718   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
11719
11720 else
11721   if test "$ac_cv_type_long_long" = yes; then
11722      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11723 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11724 { as_fn_set_status 77
11725 as_fn_error "cannot compute sizeof (long long)
11726 See \`config.log' for more details." "$LINENO" 5; }; }
11727    else
11728      ac_cv_sizeof_long_long=0
11729    fi
11730 fi
11731
11732 fi
11733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11734 $as_echo "$ac_cv_sizeof_long_long" >&6; }
11735
11736
11737
11738 cat >>confdefs.h <<_ACEOF
11739 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11740 _ACEOF
11741
11742
11743 fi
11744
11745
11746   ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
11747 if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
11748   ac_have_decl=1
11749 else
11750   ac_have_decl=0
11751 fi
11752
11753 cat >>confdefs.h <<_ACEOF
11754 #define HAVE_DECL_BASENAME $ac_have_decl
11755 _ACEOF
11756 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11757 if test "x$ac_cv_have_decl_ffs" = x""yes; then :
11758   ac_have_decl=1
11759 else
11760   ac_have_decl=0
11761 fi
11762
11763 cat >>confdefs.h <<_ACEOF
11764 #define HAVE_DECL_FFS $ac_have_decl
11765 _ACEOF
11766 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11767 if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
11768   ac_have_decl=1
11769 else
11770   ac_have_decl=0
11771 fi
11772
11773 cat >>confdefs.h <<_ACEOF
11774 #define HAVE_DECL_ASPRINTF $ac_have_decl
11775 _ACEOF
11776 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11777 if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
11778   ac_have_decl=1
11779 else
11780   ac_have_decl=0
11781 fi
11782
11783 cat >>confdefs.h <<_ACEOF
11784 #define HAVE_DECL_VASPRINTF $ac_have_decl
11785 _ACEOF
11786 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11787 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11788   ac_have_decl=1
11789 else
11790   ac_have_decl=0
11791 fi
11792
11793 cat >>confdefs.h <<_ACEOF
11794 #define HAVE_DECL_SNPRINTF $ac_have_decl
11795 _ACEOF
11796 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11797 if test "x$ac_cv_have_decl_vsnprintf" = 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_VSNPRINTF $ac_have_decl
11805 _ACEOF
11806
11807   ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11808 if test "x$ac_cv_have_decl_strtol" = x""yes; then :
11809   ac_have_decl=1
11810 else
11811   ac_have_decl=0
11812 fi
11813
11814 cat >>confdefs.h <<_ACEOF
11815 #define HAVE_DECL_STRTOL $ac_have_decl
11816 _ACEOF
11817 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11818 if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
11819   ac_have_decl=1
11820 else
11821   ac_have_decl=0
11822 fi
11823
11824 cat >>confdefs.h <<_ACEOF
11825 #define HAVE_DECL_STRTOUL $ac_have_decl
11826 _ACEOF
11827 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11828 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
11829   ac_have_decl=1
11830 else
11831   ac_have_decl=0
11832 fi
11833
11834 cat >>confdefs.h <<_ACEOF
11835 #define HAVE_DECL_STRTOLL $ac_have_decl
11836 _ACEOF
11837 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11838 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
11839   ac_have_decl=1
11840 else
11841   ac_have_decl=0
11842 fi
11843
11844 cat >>confdefs.h <<_ACEOF
11845 #define HAVE_DECL_STRTOULL $ac_have_decl
11846 _ACEOF
11847
11848   ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11849 if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
11850   ac_have_decl=1
11851 else
11852   ac_have_decl=0
11853 fi
11854
11855 cat >>confdefs.h <<_ACEOF
11856 #define HAVE_DECL_STRVERSCMP $ac_have_decl
11857 _ACEOF
11858
11859
11860
11861 ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11862 if test "x$ac_cv_have_decl_free" = x""yes; then :
11863   ac_have_decl=1
11864 else
11865   ac_have_decl=0
11866 fi
11867
11868 cat >>confdefs.h <<_ACEOF
11869 #define HAVE_DECL_FREE $ac_have_decl
11870 _ACEOF
11871 ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11872 if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11873   ac_have_decl=1
11874 else
11875   ac_have_decl=0
11876 fi
11877
11878 cat >>confdefs.h <<_ACEOF
11879 #define HAVE_DECL_MALLOC $ac_have_decl
11880 _ACEOF
11881 ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11882 if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11883   ac_have_decl=1
11884 else
11885   ac_have_decl=0
11886 fi
11887
11888 cat >>confdefs.h <<_ACEOF
11889 #define HAVE_DECL_REALLOC $ac_have_decl
11890 _ACEOF
11891 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11892 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11893   ac_have_decl=1
11894 else
11895   ac_have_decl=0
11896 fi
11897
11898 cat >>confdefs.h <<_ACEOF
11899 #define HAVE_DECL_SNPRINTF $ac_have_decl
11900 _ACEOF
11901
11902
11903   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11904 $as_echo_n "checking for LC_MESSAGES... " >&6; }
11905 if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11906   $as_echo_n "(cached) " >&6
11907 else
11908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11909 /* end confdefs.h.  */
11910 #include <locale.h>
11911 int
11912 main ()
11913 {
11914 return LC_MESSAGES
11915   ;
11916   return 0;
11917 }
11918 _ACEOF
11919 if ac_fn_c_try_link "$LINENO"; then :
11920   am_cv_val_LC_MESSAGES=yes
11921 else
11922   am_cv_val_LC_MESSAGES=no
11923 fi
11924 rm -f core conftest.err conftest.$ac_objext \
11925     conftest$ac_exeext conftest.$ac_ext
11926 fi
11927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11928 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11929   if test $am_cv_val_LC_MESSAGES = yes; then
11930
11931 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11932
11933   fi
11934
11935
11936 # ----------------------- #
11937 # Checks for structures.  #
11938 # ----------------------- #
11939
11940 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11941 if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11942
11943 cat >>confdefs.h <<_ACEOF
11944 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
11945 _ACEOF
11946
11947
11948 fi
11949 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11950 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
11951
11952 cat >>confdefs.h <<_ACEOF
11953 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11954 _ACEOF
11955
11956
11957 fi
11958
11959
11960 # ------------------ #
11961 # Checks for types.  #
11962 # ------------------ #
11963
11964 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
11965 #include <sys/socket.h>
11966
11967 "
11968 if test "x$ac_cv_type_socklen_t" = x""yes; then :
11969
11970 cat >>confdefs.h <<_ACEOF
11971 #define HAVE_SOCKLEN_T 1
11972 _ACEOF
11973
11974
11975 fi
11976
11977
11978 # ------------------------------------- #
11979 # Checks for compiler characteristics.  #
11980 # ------------------------------------- #
11981
11982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11983 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11984 if test "${ac_cv_c_const+set}" = set; then :
11985   $as_echo_n "(cached) " >&6
11986 else
11987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11988 /* end confdefs.h.  */
11989
11990 int
11991 main ()
11992 {
11993 /* FIXME: Include the comments suggested by Paul. */
11994 #ifndef __cplusplus
11995   /* Ultrix mips cc rejects this.  */
11996   typedef int charset[2];
11997   const charset cs;
11998   /* SunOS 4.1.1 cc rejects this.  */
11999   char const *const *pcpcc;
12000   char **ppc;
12001   /* NEC SVR4.0.2 mips cc rejects this.  */
12002   struct point {int x, y;};
12003   static struct point const zero = {0,0};
12004   /* AIX XL C 1.02.0.0 rejects this.
12005      It does not let you subtract one const X* pointer from another in
12006      an arm of an if-expression whose if-part is not a constant
12007      expression */
12008   const char *g = "string";
12009   pcpcc = &g + (g ? g-g : 0);
12010   /* HPUX 7.0 cc rejects these. */
12011   ++pcpcc;
12012   ppc = (char**) pcpcc;
12013   pcpcc = (char const *const *) ppc;
12014   { /* SCO 3.2v4 cc rejects this.  */
12015     char *t;
12016     char const *s = 0 ? (char *) 0 : (char const *) 0;
12017
12018     *t++ = 0;
12019     if (s) return 0;
12020   }
12021   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12022     int x[] = {25, 17};
12023     const int *foo = &x[0];
12024     ++foo;
12025   }
12026   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12027     typedef const int *iptr;
12028     iptr p = 0;
12029     ++p;
12030   }
12031   { /* AIX XL C 1.02.0.0 rejects this saying
12032        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12033     struct s { int j; const int *ap[3]; };
12034     struct s *b; b->j = 5;
12035   }
12036   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12037     const int foo = 10;
12038     if (!foo) return 0;
12039   }
12040   return !cs[0] && !zero.x;
12041 #endif
12042
12043   ;
12044   return 0;
12045 }
12046 _ACEOF
12047 if ac_fn_c_try_compile "$LINENO"; then :
12048   ac_cv_c_const=yes
12049 else
12050   ac_cv_c_const=no
12051 fi
12052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12053 fi
12054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12055 $as_echo "$ac_cv_c_const" >&6; }
12056 if test $ac_cv_c_const = no; then
12057
12058 $as_echo "#define const /**/" >>confdefs.h
12059
12060 fi
12061
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12063 $as_echo_n "checking for inline... " >&6; }
12064 if test "${ac_cv_c_inline+set}" = set; then :
12065   $as_echo_n "(cached) " >&6
12066 else
12067   ac_cv_c_inline=no
12068 for ac_kw in inline __inline__ __inline; do
12069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12070 /* end confdefs.h.  */
12071 #ifndef __cplusplus
12072 typedef int foo_t;
12073 static $ac_kw foo_t static_foo () {return 0; }
12074 $ac_kw foo_t foo () {return 0; }
12075 #endif
12076
12077 _ACEOF
12078 if ac_fn_c_try_compile "$LINENO"; then :
12079   ac_cv_c_inline=$ac_kw
12080 fi
12081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12082   test "$ac_cv_c_inline" != no && break
12083 done
12084
12085 fi
12086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12087 $as_echo "$ac_cv_c_inline" >&6; }
12088
12089 case $ac_cv_c_inline in
12090   inline | yes) ;;
12091   *)
12092     case $ac_cv_c_inline in
12093       no) ac_val=;;
12094       *) ac_val=$ac_cv_c_inline;;
12095     esac
12096     cat >>confdefs.h <<_ACEOF
12097 #ifndef __cplusplus
12098 #define inline $ac_val
12099 #endif
12100 _ACEOF
12101     ;;
12102 esac
12103
12104  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12105 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12106 if test "${ac_cv_c_bigendian+set}" = set; then :
12107   $as_echo_n "(cached) " >&6
12108 else
12109   ac_cv_c_bigendian=unknown
12110     # See if we're dealing with a universal compiler.
12111     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12112 /* end confdefs.h.  */
12113 #ifndef __APPLE_CC__
12114                not a universal capable compiler
12115              #endif
12116              typedef int dummy;
12117
12118 _ACEOF
12119 if ac_fn_c_try_compile "$LINENO"; then :
12120
12121         # Check for potential -arch flags.  It is not universal unless
12122         # there are at least two -arch flags with different values.
12123         ac_arch=
12124         ac_prev=
12125         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12126          if test -n "$ac_prev"; then
12127            case $ac_word in
12128              i?86 | x86_64 | ppc | ppc64)
12129                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12130                  ac_arch=$ac_word
12131                else
12132                  ac_cv_c_bigendian=universal
12133                  break
12134                fi
12135                ;;
12136            esac
12137            ac_prev=
12138          elif test "x$ac_word" = "x-arch"; then
12139            ac_prev=arch
12140          fi
12141        done
12142 fi
12143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12144     if test $ac_cv_c_bigendian = unknown; then
12145       # See if sys/param.h defines the BYTE_ORDER macro.
12146       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12147 /* end confdefs.h.  */
12148 #include <sys/types.h>
12149              #include <sys/param.h>
12150
12151 int
12152 main ()
12153 {
12154 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12155                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12156                      && LITTLE_ENDIAN)
12157               bogus endian macros
12158              #endif
12159
12160   ;
12161   return 0;
12162 }
12163 _ACEOF
12164 if ac_fn_c_try_compile "$LINENO"; then :
12165   # It does; now see whether it defined to BIG_ENDIAN or not.
12166          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12167 /* end confdefs.h.  */
12168 #include <sys/types.h>
12169                 #include <sys/param.h>
12170
12171 int
12172 main ()
12173 {
12174 #if BYTE_ORDER != BIG_ENDIAN
12175                  not big endian
12176                 #endif
12177
12178   ;
12179   return 0;
12180 }
12181 _ACEOF
12182 if ac_fn_c_try_compile "$LINENO"; then :
12183   ac_cv_c_bigendian=yes
12184 else
12185   ac_cv_c_bigendian=no
12186 fi
12187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12188 fi
12189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12190     fi
12191     if test $ac_cv_c_bigendian = unknown; then
12192       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12193       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12194 /* end confdefs.h.  */
12195 #include <limits.h>
12196
12197 int
12198 main ()
12199 {
12200 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12201               bogus endian macros
12202              #endif
12203
12204   ;
12205   return 0;
12206 }
12207 _ACEOF
12208 if ac_fn_c_try_compile "$LINENO"; then :
12209   # It does; now see whether it defined to _BIG_ENDIAN or not.
12210          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12211 /* end confdefs.h.  */
12212 #include <limits.h>
12213
12214 int
12215 main ()
12216 {
12217 #ifndef _BIG_ENDIAN
12218                  not big endian
12219                 #endif
12220
12221   ;
12222   return 0;
12223 }
12224 _ACEOF
12225 if ac_fn_c_try_compile "$LINENO"; then :
12226   ac_cv_c_bigendian=yes
12227 else
12228   ac_cv_c_bigendian=no
12229 fi
12230 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12231 fi
12232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12233     fi
12234     if test $ac_cv_c_bigendian = unknown; then
12235       # Compile a test program.
12236       if test "$cross_compiling" = yes; then :
12237   # Try to guess by grepping values from an object file.
12238          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12239 /* end confdefs.h.  */
12240 short int ascii_mm[] =
12241                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12242                 short int ascii_ii[] =
12243                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12244                 int use_ascii (int i) {
12245                   return ascii_mm[i] + ascii_ii[i];
12246                 }
12247                 short int ebcdic_ii[] =
12248                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12249                 short int ebcdic_mm[] =
12250                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12251                 int use_ebcdic (int i) {
12252                   return ebcdic_mm[i] + ebcdic_ii[i];
12253                 }
12254                 extern int foo;
12255
12256 int
12257 main ()
12258 {
12259 return use_ascii (foo) == use_ebcdic (foo);
12260   ;
12261   return 0;
12262 }
12263 _ACEOF
12264 if ac_fn_c_try_compile "$LINENO"; then :
12265   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12266               ac_cv_c_bigendian=yes
12267             fi
12268             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12269               if test "$ac_cv_c_bigendian" = unknown; then
12270                 ac_cv_c_bigendian=no
12271               else
12272                 # finding both strings is unlikely to happen, but who knows?
12273                 ac_cv_c_bigendian=unknown
12274               fi
12275             fi
12276 fi
12277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12278 else
12279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12280 /* end confdefs.h.  */
12281 $ac_includes_default
12282 int
12283 main ()
12284 {
12285
12286              /* Are we little or big endian?  From Harbison&Steele.  */
12287              union
12288              {
12289                long int l;
12290                char c[sizeof (long int)];
12291              } u;
12292              u.l = 1;
12293              return u.c[sizeof (long int) - 1] == 1;
12294
12295   ;
12296   return 0;
12297 }
12298 _ACEOF
12299 if ac_fn_c_try_run "$LINENO"; then :
12300   ac_cv_c_bigendian=no
12301 else
12302   ac_cv_c_bigendian=yes
12303 fi
12304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12305   conftest.$ac_objext conftest.beam conftest.$ac_ext
12306 fi
12307
12308     fi
12309 fi
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12311 $as_echo "$ac_cv_c_bigendian" >&6; }
12312  case $ac_cv_c_bigendian in #(
12313    yes)
12314      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12315 ;; #(
12316    no)
12317       ;; #(
12318    universal)
12319
12320 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12321
12322      ;; #(
12323    *)
12324      as_fn_error "unknown endianness
12325  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12326  esac
12327
12328
12329 # ------------------------------ #
12330 # Checks for library functions.  #
12331 # ------------------------------ #
12332
12333 for ac_header in stdlib.h unistd.h
12334 do :
12335   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12336 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12337 eval as_val=\$$as_ac_Header
12338    if test "x$as_val" = x""yes; then :
12339   cat >>confdefs.h <<_ACEOF
12340 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12341 _ACEOF
12342
12343 fi
12344
12345 done
12346
12347 for ac_func in getpagesize
12348 do :
12349   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12350 if test "x$ac_cv_func_getpagesize" = x""yes; then :
12351   cat >>confdefs.h <<_ACEOF
12352 #define HAVE_GETPAGESIZE 1
12353 _ACEOF
12354
12355 fi
12356 done
12357
12358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12359 $as_echo_n "checking for working mmap... " >&6; }
12360 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12361   $as_echo_n "(cached) " >&6
12362 else
12363   if test "$cross_compiling" = yes; then :
12364   ac_cv_func_mmap_fixed_mapped=no
12365 else
12366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12367 /* end confdefs.h.  */
12368 $ac_includes_default
12369 /* malloc might have been renamed as rpl_malloc. */
12370 #undef malloc
12371
12372 /* Thanks to Mike Haertel and Jim Avera for this test.
12373    Here is a matrix of mmap possibilities:
12374         mmap private not fixed
12375         mmap private fixed at somewhere currently unmapped
12376         mmap private fixed at somewhere already mapped
12377         mmap shared not fixed
12378         mmap shared fixed at somewhere currently unmapped
12379         mmap shared fixed at somewhere already mapped
12380    For private mappings, we should verify that changes cannot be read()
12381    back from the file, nor mmap's back from the file at a different
12382    address.  (There have been systems where private was not correctly
12383    implemented like the infamous i386 svr4.0, and systems where the
12384    VM page cache was not coherent with the file system buffer cache
12385    like early versions of FreeBSD and possibly contemporary NetBSD.)
12386    For shared mappings, we should conversely verify that changes get
12387    propagated back to all the places they're supposed to be.
12388
12389    Grep wants private fixed already mapped.
12390    The main things grep needs to know about mmap are:
12391    * does it exist and is it safe to write into the mmap'd area
12392    * how to use it (BSD variants)  */
12393
12394 #include <fcntl.h>
12395 #include <sys/mman.h>
12396
12397 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12398 char *malloc ();
12399 #endif
12400
12401 /* This mess was copied from the GNU getpagesize.h.  */
12402 #ifndef HAVE_GETPAGESIZE
12403 /* Assume that all systems that can run configure have sys/param.h.  */
12404 # ifndef HAVE_SYS_PARAM_H
12405 #  define HAVE_SYS_PARAM_H 1
12406 # endif
12407
12408 # ifdef _SC_PAGESIZE
12409 #  define getpagesize() sysconf(_SC_PAGESIZE)
12410 # else /* no _SC_PAGESIZE */
12411 #  ifdef HAVE_SYS_PARAM_H
12412 #   include <sys/param.h>
12413 #   ifdef EXEC_PAGESIZE
12414 #    define getpagesize() EXEC_PAGESIZE
12415 #   else /* no EXEC_PAGESIZE */
12416 #    ifdef NBPG
12417 #     define getpagesize() NBPG * CLSIZE
12418 #     ifndef CLSIZE
12419 #      define CLSIZE 1
12420 #     endif /* no CLSIZE */
12421 #    else /* no NBPG */
12422 #     ifdef NBPC
12423 #      define getpagesize() NBPC
12424 #     else /* no NBPC */
12425 #      ifdef PAGESIZE
12426 #       define getpagesize() PAGESIZE
12427 #      endif /* PAGESIZE */
12428 #     endif /* no NBPC */
12429 #    endif /* no NBPG */
12430 #   endif /* no EXEC_PAGESIZE */
12431 #  else /* no HAVE_SYS_PARAM_H */
12432 #   define getpagesize() 8192   /* punt totally */
12433 #  endif /* no HAVE_SYS_PARAM_H */
12434 # endif /* no _SC_PAGESIZE */
12435
12436 #endif /* no HAVE_GETPAGESIZE */
12437
12438 int
12439 main ()
12440 {
12441   char *data, *data2, *data3;
12442   int i, pagesize;
12443   int fd;
12444
12445   pagesize = getpagesize ();
12446
12447   /* First, make a file with some known garbage in it. */
12448   data = (char *) malloc (pagesize);
12449   if (!data)
12450     return 1;
12451   for (i = 0; i < pagesize; ++i)
12452     *(data + i) = rand ();
12453   umask (0);
12454   fd = creat ("conftest.mmap", 0600);
12455   if (fd < 0)
12456     return 1;
12457   if (write (fd, data, pagesize) != pagesize)
12458     return 1;
12459   close (fd);
12460
12461   /* Next, try to mmap the file at a fixed address which already has
12462      something else allocated at it.  If we can, also make sure that
12463      we see the same garbage.  */
12464   fd = open ("conftest.mmap", O_RDWR);
12465   if (fd < 0)
12466     return 1;
12467   data2 = (char *) malloc (2 * pagesize);
12468   if (!data2)
12469     return 1;
12470   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
12471   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12472                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
12473     return 1;
12474   for (i = 0; i < pagesize; ++i)
12475     if (*(data + i) != *(data2 + i))
12476       return 1;
12477
12478   /* Finally, make sure that changes to the mapped area do not
12479      percolate back to the file as seen by read().  (This is a bug on
12480      some variants of i386 svr4.0.)  */
12481   for (i = 0; i < pagesize; ++i)
12482     *(data2 + i) = *(data2 + i) + 1;
12483   data3 = (char *) malloc (pagesize);
12484   if (!data3)
12485     return 1;
12486   if (read (fd, data3, pagesize) != pagesize)
12487     return 1;
12488   for (i = 0; i < pagesize; ++i)
12489     if (*(data + i) != *(data3 + i))
12490       return 1;
12491   close (fd);
12492   return 0;
12493 }
12494 _ACEOF
12495 if ac_fn_c_try_run "$LINENO"; then :
12496   ac_cv_func_mmap_fixed_mapped=yes
12497 else
12498   ac_cv_func_mmap_fixed_mapped=no
12499 fi
12500 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12501   conftest.$ac_objext conftest.beam conftest.$ac_ext
12502 fi
12503
12504 fi
12505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12506 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
12507 if test $ac_cv_func_mmap_fixed_mapped = yes; then
12508
12509 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
12510
12511 fi
12512 rm -f conftest.mmap
12513
12514 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12515 if test "x$ac_cv_type_pid_t" = x""yes; then :
12516
12517 else
12518
12519 cat >>confdefs.h <<_ACEOF
12520 #define pid_t int
12521 _ACEOF
12522
12523 fi
12524
12525 for ac_header in vfork.h
12526 do :
12527   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12528 if test "x$ac_cv_header_vfork_h" = x""yes; then :
12529   cat >>confdefs.h <<_ACEOF
12530 #define HAVE_VFORK_H 1
12531 _ACEOF
12532
12533 fi
12534
12535 done
12536
12537 for ac_func in fork vfork
12538 do :
12539   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12540 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12541 eval as_val=\$$as_ac_var
12542    if test "x$as_val" = x""yes; then :
12543   cat >>confdefs.h <<_ACEOF
12544 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12545 _ACEOF
12546
12547 fi
12548 done
12549
12550 if test "x$ac_cv_func_fork" = xyes; then
12551   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12552 $as_echo_n "checking for working fork... " >&6; }
12553 if test "${ac_cv_func_fork_works+set}" = set; then :
12554   $as_echo_n "(cached) " >&6
12555 else
12556   if test "$cross_compiling" = yes; then :
12557   ac_cv_func_fork_works=cross
12558 else
12559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12560 /* end confdefs.h.  */
12561 $ac_includes_default
12562 int
12563 main ()
12564 {
12565
12566           /* By Ruediger Kuhlmann. */
12567           return fork () < 0;
12568
12569   ;
12570   return 0;
12571 }
12572 _ACEOF
12573 if ac_fn_c_try_run "$LINENO"; then :
12574   ac_cv_func_fork_works=yes
12575 else
12576   ac_cv_func_fork_works=no
12577 fi
12578 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12579   conftest.$ac_objext conftest.beam conftest.$ac_ext
12580 fi
12581
12582 fi
12583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12584 $as_echo "$ac_cv_func_fork_works" >&6; }
12585
12586 else
12587   ac_cv_func_fork_works=$ac_cv_func_fork
12588 fi
12589 if test "x$ac_cv_func_fork_works" = xcross; then
12590   case $host in
12591     *-*-amigaos* | *-*-msdosdjgpp*)
12592       # Override, as these systems have only a dummy fork() stub
12593       ac_cv_func_fork_works=no
12594       ;;
12595     *)
12596       ac_cv_func_fork_works=yes
12597       ;;
12598   esac
12599   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12600 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
12601 fi
12602 ac_cv_func_vfork_works=$ac_cv_func_vfork
12603 if test "x$ac_cv_func_vfork" = xyes; then
12604   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12605 $as_echo_n "checking for working vfork... " >&6; }
12606 if test "${ac_cv_func_vfork_works+set}" = set; then :
12607   $as_echo_n "(cached) " >&6
12608 else
12609   if test "$cross_compiling" = yes; then :
12610   ac_cv_func_vfork_works=cross
12611 else
12612   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12613 /* end confdefs.h.  */
12614 /* Thanks to Paul Eggert for this test.  */
12615 $ac_includes_default
12616 #include <sys/wait.h>
12617 #ifdef HAVE_VFORK_H
12618 # include <vfork.h>
12619 #endif
12620 /* On some sparc systems, changes by the child to local and incoming
12621    argument registers are propagated back to the parent.  The compiler
12622    is told about this with #include <vfork.h>, but some compilers
12623    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
12624    static variable whose address is put into a register that is
12625    clobbered by the vfork.  */
12626 static void
12627 #ifdef __cplusplus
12628 sparc_address_test (int arg)
12629 # else
12630 sparc_address_test (arg) int arg;
12631 #endif
12632 {
12633   static pid_t child;
12634   if (!child) {
12635     child = vfork ();
12636     if (child < 0) {
12637       perror ("vfork");
12638       _exit(2);
12639     }
12640     if (!child) {
12641       arg = getpid();
12642       write(-1, "", 0);
12643       _exit (arg);
12644     }
12645   }
12646 }
12647
12648 int
12649 main ()
12650 {
12651   pid_t parent = getpid ();
12652   pid_t child;
12653
12654   sparc_address_test (0);
12655
12656   child = vfork ();
12657
12658   if (child == 0) {
12659     /* Here is another test for sparc vfork register problems.  This
12660        test uses lots of local variables, at least as many local
12661        variables as main has allocated so far including compiler
12662        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
12663        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
12664        reuse the register of parent for one of the local variables,
12665        since it will think that parent can't possibly be used any more
12666        in this routine.  Assigning to the local variable will thus
12667        munge parent in the parent process.  */
12668     pid_t
12669       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12670       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12671     /* Convince the compiler that p..p7 are live; otherwise, it might
12672        use the same hardware register for all 8 local variables.  */
12673     if (p != p1 || p != p2 || p != p3 || p != p4
12674         || p != p5 || p != p6 || p != p7)
12675       _exit(1);
12676
12677     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12678        from child file descriptors.  If the child closes a descriptor
12679        before it execs or exits, this munges the parent's descriptor
12680        as well.  Test for this by closing stdout in the child.  */
12681     _exit(close(fileno(stdout)) != 0);
12682   } else {
12683     int status;
12684     struct stat st;
12685
12686     while (wait(&status) != child)
12687       ;
12688     return (
12689          /* Was there some problem with vforking?  */
12690          child < 0
12691
12692          /* Did the child fail?  (This shouldn't happen.)  */
12693          || status
12694
12695          /* Did the vfork/compiler bug occur?  */
12696          || parent != getpid()
12697
12698          /* Did the file descriptor bug occur?  */
12699          || fstat(fileno(stdout), &st) != 0
12700          );
12701   }
12702 }
12703 _ACEOF
12704 if ac_fn_c_try_run "$LINENO"; then :
12705   ac_cv_func_vfork_works=yes
12706 else
12707   ac_cv_func_vfork_works=no
12708 fi
12709 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12710   conftest.$ac_objext conftest.beam conftest.$ac_ext
12711 fi
12712
12713 fi
12714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12715 $as_echo "$ac_cv_func_vfork_works" >&6; }
12716
12717 fi;
12718 if test "x$ac_cv_func_fork_works" = xcross; then
12719   ac_cv_func_vfork_works=$ac_cv_func_vfork
12720   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12721 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
12722 fi
12723
12724 if test "x$ac_cv_func_vfork_works" = xyes; then
12725
12726 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
12727
12728 else
12729
12730 $as_echo "#define vfork fork" >>confdefs.h
12731
12732 fi
12733 if test "x$ac_cv_func_fork_works" = xyes; then
12734
12735 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
12736
12737 fi
12738
12739 for ac_func in getauxval getrusage getuid getgid \
12740                 pipe poll pread pread64 pwrite resize_term \
12741                 sbrk setpgid setpgrp setsid \
12742                 sigaction sigprocmask sigsetmask socketpair \
12743                 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12744                 setrlimit getrlimit posix_madvise waitpid \
12745                 ptrace64 sigaltstack mkdtemp setns
12746 do :
12747   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12748 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12749 eval as_val=\$$as_ac_var
12750    if test "x$as_val" = x""yes; then :
12751   cat >>confdefs.h <<_ACEOF
12752 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12753 _ACEOF
12754
12755 fi
12756 done
12757
12758
12759   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12760 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12761 if test "${am_cv_langinfo_codeset+set}" = set; then :
12762   $as_echo_n "(cached) " >&6
12763 else
12764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12765 /* end confdefs.h.  */
12766 #include <langinfo.h>
12767 int
12768 main ()
12769 {
12770 char* cs = nl_langinfo(CODESET);
12771   ;
12772   return 0;
12773 }
12774 _ACEOF
12775 if ac_fn_c_try_link "$LINENO"; then :
12776   am_cv_langinfo_codeset=yes
12777 else
12778   am_cv_langinfo_codeset=no
12779 fi
12780 rm -f core conftest.err conftest.$ac_objext \
12781     conftest$ac_exeext conftest.$ac_ext
12782
12783 fi
12784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12785 $as_echo "$am_cv_langinfo_codeset" >&6; }
12786   if test $am_cv_langinfo_codeset = yes; then
12787
12788 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12789
12790   fi
12791
12792
12793   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12794 $as_echo_n "checking for ANSI C header files... " >&6; }
12795 if test "${ac_cv_header_stdc+set}" = set; then :
12796   $as_echo_n "(cached) " >&6
12797 else
12798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12799 /* end confdefs.h.  */
12800 #include <stdlib.h>
12801 #include <stdarg.h>
12802 #include <string.h>
12803 #include <float.h>
12804
12805 int
12806 main ()
12807 {
12808
12809   ;
12810   return 0;
12811 }
12812 _ACEOF
12813 if ac_fn_c_try_compile "$LINENO"; then :
12814   ac_cv_header_stdc=yes
12815 else
12816   ac_cv_header_stdc=no
12817 fi
12818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12819
12820 if test $ac_cv_header_stdc = yes; then
12821   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12823 /* end confdefs.h.  */
12824 #include <string.h>
12825
12826 _ACEOF
12827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12828   $EGREP "memchr" >/dev/null 2>&1; then :
12829
12830 else
12831   ac_cv_header_stdc=no
12832 fi
12833 rm -f conftest*
12834
12835 fi
12836
12837 if test $ac_cv_header_stdc = yes; then
12838   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12840 /* end confdefs.h.  */
12841 #include <stdlib.h>
12842
12843 _ACEOF
12844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12845   $EGREP "free" >/dev/null 2>&1; then :
12846
12847 else
12848   ac_cv_header_stdc=no
12849 fi
12850 rm -f conftest*
12851
12852 fi
12853
12854 if test $ac_cv_header_stdc = yes; then
12855   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12856   if test "$cross_compiling" = yes; then :
12857   :
12858 else
12859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12860 /* end confdefs.h.  */
12861 #include <ctype.h>
12862 #include <stdlib.h>
12863 #if ((' ' & 0x0FF) == 0x020)
12864 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12865 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12866 #else
12867 # define ISLOWER(c) \
12868                    (('a' <= (c) && (c) <= 'i') \
12869                      || ('j' <= (c) && (c) <= 'r') \
12870                      || ('s' <= (c) && (c) <= 'z'))
12871 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12872 #endif
12873
12874 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12875 int
12876 main ()
12877 {
12878   int i;
12879   for (i = 0; i < 256; i++)
12880     if (XOR (islower (i), ISLOWER (i))
12881         || toupper (i) != TOUPPER (i))
12882       return 2;
12883   return 0;
12884 }
12885 _ACEOF
12886 if ac_fn_c_try_run "$LINENO"; then :
12887
12888 else
12889   ac_cv_header_stdc=no
12890 fi
12891 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12892   conftest.$ac_objext conftest.beam conftest.$ac_ext
12893 fi
12894
12895 fi
12896 fi
12897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12898 $as_echo "$ac_cv_header_stdc" >&6; }
12899 if test $ac_cv_header_stdc = yes; then
12900
12901 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12902
12903 fi
12904
12905   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12906 # for constant arguments.  Useless!
12907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12908 $as_echo_n "checking for working alloca.h... " >&6; }
12909 if test "${ac_cv_working_alloca_h+set}" = set; then :
12910   $as_echo_n "(cached) " >&6
12911 else
12912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12913 /* end confdefs.h.  */
12914 #include <alloca.h>
12915 int
12916 main ()
12917 {
12918 char *p = (char *) alloca (2 * sizeof (int));
12919                           if (p) return 0;
12920   ;
12921   return 0;
12922 }
12923 _ACEOF
12924 if ac_fn_c_try_link "$LINENO"; then :
12925   ac_cv_working_alloca_h=yes
12926 else
12927   ac_cv_working_alloca_h=no
12928 fi
12929 rm -f core conftest.err conftest.$ac_objext \
12930     conftest$ac_exeext conftest.$ac_ext
12931 fi
12932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12933 $as_echo "$ac_cv_working_alloca_h" >&6; }
12934 if test $ac_cv_working_alloca_h = yes; then
12935
12936 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12937
12938 fi
12939
12940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12941 $as_echo_n "checking for alloca... " >&6; }
12942 if test "${ac_cv_func_alloca_works+set}" = set; then :
12943   $as_echo_n "(cached) " >&6
12944 else
12945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12946 /* end confdefs.h.  */
12947 #ifdef __GNUC__
12948 # define alloca __builtin_alloca
12949 #else
12950 # ifdef _MSC_VER
12951 #  include <malloc.h>
12952 #  define alloca _alloca
12953 # else
12954 #  ifdef HAVE_ALLOCA_H
12955 #   include <alloca.h>
12956 #  else
12957 #   ifdef _AIX
12958  #pragma alloca
12959 #   else
12960 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12961 char *alloca ();
12962 #    endif
12963 #   endif
12964 #  endif
12965 # endif
12966 #endif
12967
12968 int
12969 main ()
12970 {
12971 char *p = (char *) alloca (1);
12972                                     if (p) return 0;
12973   ;
12974   return 0;
12975 }
12976 _ACEOF
12977 if ac_fn_c_try_link "$LINENO"; then :
12978   ac_cv_func_alloca_works=yes
12979 else
12980   ac_cv_func_alloca_works=no
12981 fi
12982 rm -f core conftest.err conftest.$ac_objext \
12983     conftest$ac_exeext conftest.$ac_ext
12984 fi
12985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12986 $as_echo "$ac_cv_func_alloca_works" >&6; }
12987
12988 if test $ac_cv_func_alloca_works = yes; then
12989
12990 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12991
12992 else
12993   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12994 # that cause trouble.  Some versions do not even contain alloca or
12995 # contain a buggy version.  If you still want to use their alloca,
12996 # use ar to extract alloca.o from them instead of compiling alloca.c.
12997
12998 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12999
13000 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13001
13002
13003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13004 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13005 if test "${ac_cv_os_cray+set}" = set; then :
13006   $as_echo_n "(cached) " >&6
13007 else
13008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13009 /* end confdefs.h.  */
13010 #if defined CRAY && ! defined CRAY2
13011 webecray
13012 #else
13013 wenotbecray
13014 #endif
13015
13016 _ACEOF
13017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13018   $EGREP "webecray" >/dev/null 2>&1; then :
13019   ac_cv_os_cray=yes
13020 else
13021   ac_cv_os_cray=no
13022 fi
13023 rm -f conftest*
13024
13025 fi
13026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13027 $as_echo "$ac_cv_os_cray" >&6; }
13028 if test $ac_cv_os_cray = yes; then
13029   for ac_func in _getb67 GETB67 getb67; do
13030     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13031 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13032 eval as_val=\$$as_ac_var
13033    if test "x$as_val" = x""yes; then :
13034
13035 cat >>confdefs.h <<_ACEOF
13036 #define CRAY_STACKSEG_END $ac_func
13037 _ACEOF
13038
13039     break
13040 fi
13041
13042   done
13043 fi
13044
13045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13046 $as_echo_n "checking stack direction for C alloca... " >&6; }
13047 if test "${ac_cv_c_stack_direction+set}" = set; then :
13048   $as_echo_n "(cached) " >&6
13049 else
13050   if test "$cross_compiling" = yes; then :
13051   ac_cv_c_stack_direction=0
13052 else
13053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13054 /* end confdefs.h.  */
13055 $ac_includes_default
13056 int
13057 find_stack_direction ()
13058 {
13059   static char *addr = 0;
13060   auto char dummy;
13061   if (addr == 0)
13062     {
13063       addr = &dummy;
13064       return find_stack_direction ();
13065     }
13066   else
13067     return (&dummy > addr) ? 1 : -1;
13068 }
13069
13070 int
13071 main ()
13072 {
13073   return find_stack_direction () < 0;
13074 }
13075 _ACEOF
13076 if ac_fn_c_try_run "$LINENO"; then :
13077   ac_cv_c_stack_direction=1
13078 else
13079   ac_cv_c_stack_direction=-1
13080 fi
13081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13082   conftest.$ac_objext conftest.beam conftest.$ac_ext
13083 fi
13084
13085 fi
13086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13087 $as_echo "$ac_cv_c_stack_direction" >&6; }
13088 cat >>confdefs.h <<_ACEOF
13089 #define STACK_DIRECTION $ac_cv_c_stack_direction
13090 _ACEOF
13091
13092
13093 fi
13094
13095
13096
13097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13098 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13099 if test "${am_cv_langinfo_codeset+set}" = set; then :
13100   $as_echo_n "(cached) " >&6
13101 else
13102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13103 /* end confdefs.h.  */
13104 #include <langinfo.h>
13105 int
13106 main ()
13107 {
13108 char* cs = nl_langinfo(CODESET);
13109   ;
13110   return 0;
13111 }
13112 _ACEOF
13113 if ac_fn_c_try_link "$LINENO"; then :
13114   am_cv_langinfo_codeset=yes
13115 else
13116   am_cv_langinfo_codeset=no
13117 fi
13118 rm -f core conftest.err conftest.$ac_objext \
13119     conftest$ac_exeext conftest.$ac_ext
13120
13121 fi
13122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13123 $as_echo "$am_cv_langinfo_codeset" >&6; }
13124   if test $am_cv_langinfo_codeset = yes; then
13125
13126 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13127
13128   fi
13129
13130
13131   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              termios.h termio.h sgtty.h
13132 do :
13133   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13134 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13135 eval as_val=\$$as_ac_Header
13136    if test "x$as_val" = x""yes; then :
13137   cat >>confdefs.h <<_ACEOF
13138 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13139 _ACEOF
13140
13141 fi
13142
13143 done
13144
13145
13146   for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
13147 do :
13148   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13149 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13150 eval as_val=\$$as_ac_var
13151    if test "x$as_val" = x""yes; then :
13152   cat >>confdefs.h <<_ACEOF
13153 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13154 _ACEOF
13155
13156 fi
13157 done
13158
13159
13160   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13161 if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13162   ac_have_decl=1
13163 else
13164   ac_have_decl=0
13165 fi
13166
13167 cat >>confdefs.h <<_ACEOF
13168 #define HAVE_DECL_STRERROR $ac_have_decl
13169 _ACEOF
13170 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13171 if test "x$ac_cv_have_decl_strstr" = x""yes; then :
13172   ac_have_decl=1
13173 else
13174   ac_have_decl=0
13175 fi
13176
13177 cat >>confdefs.h <<_ACEOF
13178 #define HAVE_DECL_STRSTR $ac_have_decl
13179 _ACEOF
13180
13181
13182     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13183 $as_echo_n "checking for sigsetjmp... " >&6; }
13184 if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13185   $as_echo_n "(cached) " >&6
13186 else
13187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13188 /* end confdefs.h.  */
13189
13190 #include <setjmp.h>
13191
13192 int
13193 main ()
13194 {
13195 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13196   ;
13197   return 0;
13198 }
13199 _ACEOF
13200 if ac_fn_c_try_compile "$LINENO"; then :
13201   gdb_cv_func_sigsetjmp=yes
13202 else
13203   gdb_cv_func_sigsetjmp=no
13204 fi
13205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13206 fi
13207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13208 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13209 if test $gdb_cv_func_sigsetjmp = yes; then
13210
13211 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13212
13213 fi
13214
13215
13216 # Check the return and argument types of ptrace.
13217
13218
13219 for ac_header in sys/ptrace.h ptrace.h
13220 do :
13221   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13222 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13223 eval as_val=\$$as_ac_Header
13224    if test "x$as_val" = x""yes; then :
13225   cat >>confdefs.h <<_ACEOF
13226 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13227 _ACEOF
13228
13229 fi
13230
13231 done
13232
13233
13234 gdb_ptrace_headers='
13235 #include <sys/types.h>
13236 #if HAVE_SYS_PTRACE_H
13237 # include <sys/ptrace.h>
13238 #endif
13239 #if HAVE_UNISTD_H
13240 # include <unistd.h>
13241 #endif
13242 '
13243 # There is no point in checking if we don't have a prototype.
13244 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
13245 "
13246 if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
13247   ac_have_decl=1
13248 else
13249   ac_have_decl=0
13250 fi
13251
13252 cat >>confdefs.h <<_ACEOF
13253 #define HAVE_DECL_PTRACE $ac_have_decl
13254 _ACEOF
13255 if test $ac_have_decl = 1; then :
13256
13257 else
13258
13259   : ${gdb_cv_func_ptrace_ret='int'}
13260   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13261
13262 fi
13263
13264 # Check return type.  Varargs (used on GNU/Linux) conflict with the
13265 # empty argument list, so check for that explicitly.
13266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13267 $as_echo_n "checking return type of ptrace... " >&6; }
13268 if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
13269   $as_echo_n "(cached) " >&6
13270 else
13271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13272 /* end confdefs.h.  */
13273 $gdb_ptrace_headers
13274 int
13275 main ()
13276 {
13277 extern long ptrace (enum __ptrace_request, ...);
13278   ;
13279   return 0;
13280 }
13281 _ACEOF
13282 if ac_fn_c_try_compile "$LINENO"; then :
13283   gdb_cv_func_ptrace_ret='long'
13284 else
13285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13286 /* end confdefs.h.  */
13287 $gdb_ptrace_headers
13288 int
13289 main ()
13290 {
13291 extern int ptrace ();
13292   ;
13293   return 0;
13294 }
13295 _ACEOF
13296 if ac_fn_c_try_compile "$LINENO"; then :
13297   gdb_cv_func_ptrace_ret='int'
13298 else
13299   gdb_cv_func_ptrace_ret='long'
13300 fi
13301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13302 fi
13303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13304 fi
13305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13306 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13307
13308 cat >>confdefs.h <<_ACEOF
13309 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13310 _ACEOF
13311
13312 # Check argument types.
13313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13314 $as_echo_n "checking types of arguments for ptrace... " >&6; }
13315 if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13316   $as_echo_n "(cached) " >&6
13317 else
13318
13319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13320 /* end confdefs.h.  */
13321 $gdb_ptrace_headers
13322 int
13323 main ()
13324 {
13325 extern long ptrace (enum __ptrace_request, ...);
13326   ;
13327   return 0;
13328 }
13329 _ACEOF
13330 if ac_fn_c_try_compile "$LINENO"; then :
13331   gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
13332 else
13333
13334 for gdb_arg1 in 'int' 'long'; do
13335  for gdb_arg2 in 'pid_t' 'int' 'long'; do
13336   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13337    for gdb_arg4 in 'int' 'long' 'void *'; do
13338      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13339 /* end confdefs.h.  */
13340 $gdb_ptrace_headers
13341 int
13342 main ()
13343 {
13344
13345 extern $gdb_cv_func_ptrace_ret
13346   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13347
13348   ;
13349   return 0;
13350 }
13351 _ACEOF
13352 if ac_fn_c_try_compile "$LINENO"; then :
13353   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13354     break 4;
13355 fi
13356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13357     for gdb_arg5 in 'int *' 'int' 'long'; do
13358      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13359 /* end confdefs.h.  */
13360 $gdb_ptrace_headers
13361 int
13362 main ()
13363 {
13364
13365 extern $gdb_cv_func_ptrace_ret
13366   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13367
13368   ;
13369   return 0;
13370 }
13371 _ACEOF
13372 if ac_fn_c_try_compile "$LINENO"; then :
13373
13374 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13375     break 5;
13376 fi
13377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13378     done
13379    done
13380   done
13381  done
13382 done
13383 # Provide a safe default value.
13384 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13385
13386 fi
13387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13388 fi
13389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13390 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
13391 ac_save_IFS=$IFS; IFS=','
13392 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13393 IFS=$ac_save_IFS
13394 shift
13395
13396 cat >>confdefs.h <<_ACEOF
13397 #define PTRACE_TYPE_ARG1 $1
13398 _ACEOF
13399
13400
13401 cat >>confdefs.h <<_ACEOF
13402 #define PTRACE_TYPE_ARG3 $3
13403 _ACEOF
13404
13405
13406 cat >>confdefs.h <<_ACEOF
13407 #define PTRACE_TYPE_ARG4 $4
13408 _ACEOF
13409
13410 if test -n "$5"; then
13411
13412 cat >>confdefs.h <<_ACEOF
13413 #define PTRACE_TYPE_ARG5 $5
13414 _ACEOF
13415
13416 fi
13417
13418
13419 if test "$cross_compiling" = no; then
13420   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13421 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13422 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13423   $as_echo_n "(cached) " >&6
13424 else
13425   if test "$cross_compiling" = yes; then :
13426   as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
13427 else
13428   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13429 /* end confdefs.h.  */
13430 $ac_includes_default
13431 int
13432 main ()
13433 {
13434 /* If this system has a BSD-style setpgrp which takes arguments,
13435   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13436   exit successfully. */
13437   return setpgrp (1,1) != -1;
13438   ;
13439   return 0;
13440 }
13441 _ACEOF
13442 if ac_fn_c_try_run "$LINENO"; then :
13443   ac_cv_func_setpgrp_void=no
13444 else
13445   ac_cv_func_setpgrp_void=yes
13446 fi
13447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13448   conftest.$ac_objext conftest.beam conftest.$ac_ext
13449 fi
13450
13451 fi
13452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13453 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
13454 if test $ac_cv_func_setpgrp_void = yes; then
13455
13456 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
13457
13458 fi
13459
13460 else
13461   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13462 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13463 if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13464   $as_echo_n "(cached) " >&6
13465 else
13466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13467 /* end confdefs.h.  */
13468
13469 #include <unistd.h>
13470
13471 int
13472 main ()
13473 {
13474
13475   if (setpgrp(1,1) == -1)
13476     exit (0);
13477   else
13478     exit (1);
13479
13480   ;
13481   return 0;
13482 }
13483 _ACEOF
13484 if ac_fn_c_try_compile "$LINENO"; then :
13485   ac_cv_func_setpgrp_void=no
13486 else
13487   ac_cv_func_setpgrp_void=yes
13488 fi
13489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13490 fi
13491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13492 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
13493 if test $ac_cv_func_setpgrp_void = yes; then
13494   $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
13495
13496 fi
13497 fi
13498
13499 # Assume we'll default to using the included libiberty regex.
13500 gdb_use_included_regex=yes
13501
13502 # However, if the system regex is GNU regex, then default to *not*
13503 # using the included regex.
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13505 $as_echo_n "checking for GNU regex... " >&6; }
13506 if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13507   $as_echo_n "(cached) " >&6
13508 else
13509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13510 /* end confdefs.h.  */
13511 #include <gnu-versions.h>
13512 int
13513 main ()
13514 {
13515 #define REGEX_INTERFACE_VERSION 1
13516 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13517 # error "Version mismatch"
13518 #endif
13519   ;
13520   return 0;
13521 }
13522 _ACEOF
13523 if ac_fn_c_try_compile "$LINENO"; then :
13524   gdb_cv_have_gnu_regex=yes
13525 else
13526   gdb_cv_have_gnu_regex=no
13527 fi
13528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13529 fi
13530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13531 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
13532 if test $gdb_cv_have_gnu_regex = yes; then
13533   gdb_use_included_regex=no
13534 fi
13535
13536
13537 # Check whether --with-included-regex was given.
13538 if test "${with_included_regex+set}" = set; then :
13539   withval=$with_included_regex; gdb_with_regex=$withval
13540 else
13541   gdb_with_regex=$gdb_use_included_regex
13542 fi
13543
13544 if test "$gdb_with_regex" = yes; then
13545
13546 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13547
13548 fi
13549
13550 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13551 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13552 #include <sys/proc.h>
13553
13554 "
13555 if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
13556
13557 cat >>confdefs.h <<_ACEOF
13558 #define HAVE_STRUCT_THREAD_TD_PCB 1
13559 _ACEOF
13560
13561
13562 fi
13563
13564
13565 # See if <sys/lwp.h> defines `struct lwp`.
13566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13567 $as_echo_n "checking for struct lwp... " >&6; }
13568 if test "${gdb_cv_struct_lwp+set}" = set; then :
13569   $as_echo_n "(cached) " >&6
13570 else
13571   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13572 /* end confdefs.h.  */
13573 #include <sys/param.h>
13574 #define _KMEMUSER
13575 #include <sys/lwp.h>
13576 int
13577 main ()
13578 {
13579 struct lwp l;
13580   ;
13581   return 0;
13582 }
13583 _ACEOF
13584 if ac_fn_c_try_compile "$LINENO"; then :
13585   gdb_cv_struct_lwp=yes
13586 else
13587   gdb_cv_struct_lwp=no
13588 fi
13589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13590 fi
13591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13592 $as_echo "$gdb_cv_struct_lwp" >&6; }
13593 if test $gdb_cv_struct_lwp = yes; then
13594
13595 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
13596
13597 fi
13598
13599 # See if <machine/reg.h> degines `struct reg'.
13600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13601 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13602 if test "${gdb_cv_struct_reg+set}" = set; then :
13603   $as_echo_n "(cached) " >&6
13604 else
13605   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13606 /* end confdefs.h.  */
13607 #include <sys/types.h>
13608 #include <machine/reg.h>
13609 int
13610 main ()
13611 {
13612 struct reg r;
13613   ;
13614   return 0;
13615 }
13616 _ACEOF
13617 if ac_fn_c_try_compile "$LINENO"; then :
13618   gdb_cv_struct_reg=yes
13619 else
13620   gdb_cv_struct_reg=no
13621 fi
13622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13623 fi
13624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13625 $as_echo "$gdb_cv_struct_reg" >&6; }
13626 if test $gdb_cv_struct_reg = yes; then
13627
13628 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
13629
13630 fi
13631
13632 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13633 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
13634 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
13635 #include <machine/reg.h>
13636 "
13637 if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
13638
13639 cat >>confdefs.h <<_ACEOF
13640 #define HAVE_STRUCT_REG_R_FS 1
13641 _ACEOF
13642
13643
13644 fi
13645 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
13646 #include <machine/reg.h>
13647 "
13648 if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
13649
13650 cat >>confdefs.h <<_ACEOF
13651 #define HAVE_STRUCT_REG_R_GS 1
13652 _ACEOF
13653
13654
13655 fi
13656
13657
13658 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
13659 # Older amd64 Linux's don't have the fs_base and gs_base members of
13660 # `struct user_regs_struct'.
13661 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>
13662 "
13663 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
13664
13665 cat >>confdefs.h <<_ACEOF
13666 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
13667 _ACEOF
13668
13669
13670 fi
13671 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>
13672 "
13673 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
13674
13675 cat >>confdefs.h <<_ACEOF
13676 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
13677 _ACEOF
13678
13679
13680 fi
13681
13682
13683 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
13684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13685 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13686 if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13687   $as_echo_n "(cached) " >&6
13688 else
13689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13690 /* end confdefs.h.  */
13691 #include <sys/ptrace.h>
13692 int
13693 main ()
13694 {
13695 PTRACE_GETREGS;
13696   ;
13697   return 0;
13698 }
13699 _ACEOF
13700 if ac_fn_c_try_compile "$LINENO"; then :
13701   gdb_cv_have_ptrace_getregs=yes
13702 else
13703   gdb_cv_have_ptrace_getregs=no
13704 fi
13705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13706 fi
13707
13708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13709 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
13710 if test $gdb_cv_have_ptrace_getregs = yes; then
13711
13712 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
13713
13714 fi
13715
13716 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
13717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13718 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13719 if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13720   $as_echo_n "(cached) " >&6
13721 else
13722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13723 /* end confdefs.h.  */
13724 #include <sys/ptrace.h>
13725 int
13726 main ()
13727 {
13728 PTRACE_GETFPXREGS;
13729   ;
13730   return 0;
13731 }
13732 _ACEOF
13733 if ac_fn_c_try_compile "$LINENO"; then :
13734   gdb_cv_have_ptrace_getfpxregs=yes
13735 else
13736   gdb_cv_have_ptrace_getfpxregs=no
13737 fi
13738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13739 fi
13740
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13742 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
13743 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
13744
13745 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
13746
13747 fi
13748
13749 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
13750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13751 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
13752 if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13753   $as_echo_n "(cached) " >&6
13754 else
13755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13756 /* end confdefs.h.  */
13757 #include <sys/types.h>
13758 #include <sys/ptrace.h>
13759 int
13760 main ()
13761 {
13762 PT_GETDBREGS;
13763   ;
13764   return 0;
13765 }
13766 _ACEOF
13767 if ac_fn_c_try_compile "$LINENO"; then :
13768   gdb_cv_have_pt_getdbregs=yes
13769 else
13770   gdb_cv_have_pt_getdbregs=no
13771 fi
13772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13773 fi
13774
13775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13776 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
13777 if test $gdb_cv_have_pt_getdbregs = yes; then
13778
13779 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
13780
13781 fi
13782
13783 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13785 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13786 if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13787   $as_echo_n "(cached) " >&6
13788 else
13789   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13790 /* end confdefs.h.  */
13791 #include <sys/types.h>
13792 #include <sys/ptrace.h>
13793 int
13794 main ()
13795 {
13796 PT_GETXMMREGS;
13797   ;
13798   return 0;
13799 }
13800 _ACEOF
13801 if ac_fn_c_try_compile "$LINENO"; then :
13802   gdb_cv_have_pt_getxmmregs=yes
13803 else
13804   gdb_cv_have_pt_getxmmregs=no
13805 fi
13806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13807 fi
13808
13809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13810 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
13811 if test $gdb_cv_have_pt_getxmmregs = yes; then
13812
13813 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
13814
13815 fi
13816
13817 # See if <sys/ptrace.h> supports LWP names on FreeBSD
13818 # Older FreeBSD versions don't have the pl_tdname member of
13819 # `struct ptrace_lwpinfo'.
13820 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
13821 "
13822 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
13823
13824 cat >>confdefs.h <<_ACEOF
13825 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
13826 _ACEOF
13827
13828
13829 fi
13830
13831
13832 # See if <sys/ptrace.h> supports syscall fields on FreeBSD.  The
13833 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
13834 # FreeBSD 10.3.
13835 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>
13836 "
13837 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
13838
13839 cat >>confdefs.h <<_ACEOF
13840 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
13841 _ACEOF
13842
13843
13844 fi
13845
13846
13847 # Detect which type of /proc is in use, such as for Solaris.
13848
13849 if test "${target}" = "${host}"; then
13850   case "${host}" in
13851   *-*-sysv4.2* | *-*-sysv5* )
13852
13853 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
13854
13855       ;;
13856   *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
13857
13858 $as_echo "#define NEW_PROC_API 1" >>confdefs.h
13859
13860       ;;
13861   esac
13862 fi
13863
13864 if test "$ac_cv_header_sys_procfs_h" = yes; then
13865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13866 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13867  if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13868   $as_echo_n "(cached) " >&6
13869 else
13870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13871 /* end confdefs.h.  */
13872
13873 #define _SYSCALL32
13874 /* Needed for new procfs interface on sparc-solaris.  */
13875 #define _STRUCTURED_PROC 1
13876 #include <sys/procfs.h>
13877 int
13878 main ()
13879 {
13880 gregset_t avar
13881   ;
13882   return 0;
13883 }
13884 _ACEOF
13885 if ac_fn_c_try_compile "$LINENO"; then :
13886   bfd_cv_have_sys_procfs_type_gregset_t=yes
13887 else
13888   bfd_cv_have_sys_procfs_type_gregset_t=no
13889
13890 fi
13891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13892 fi
13893
13894  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
13895
13896 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
13897
13898  fi
13899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13900 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
13901
13902   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13903 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13904  if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13905   $as_echo_n "(cached) " >&6
13906 else
13907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13908 /* end confdefs.h.  */
13909
13910 #define _SYSCALL32
13911 /* Needed for new procfs interface on sparc-solaris.  */
13912 #define _STRUCTURED_PROC 1
13913 #include <sys/procfs.h>
13914 int
13915 main ()
13916 {
13917 fpregset_t avar
13918   ;
13919   return 0;
13920 }
13921 _ACEOF
13922 if ac_fn_c_try_compile "$LINENO"; then :
13923   bfd_cv_have_sys_procfs_type_fpregset_t=yes
13924 else
13925   bfd_cv_have_sys_procfs_type_fpregset_t=no
13926
13927 fi
13928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13929 fi
13930
13931  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
13932
13933 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
13934
13935  fi
13936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13937 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
13938
13939   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13940 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13941  if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13942   $as_echo_n "(cached) " >&6
13943 else
13944   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13945 /* end confdefs.h.  */
13946
13947 #define _SYSCALL32
13948 /* Needed for new procfs interface on sparc-solaris.  */
13949 #define _STRUCTURED_PROC 1
13950 #include <sys/procfs.h>
13951 int
13952 main ()
13953 {
13954 prgregset_t avar
13955   ;
13956   return 0;
13957 }
13958 _ACEOF
13959 if ac_fn_c_try_compile "$LINENO"; then :
13960   bfd_cv_have_sys_procfs_type_prgregset_t=yes
13961 else
13962   bfd_cv_have_sys_procfs_type_prgregset_t=no
13963
13964 fi
13965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13966 fi
13967
13968  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
13969
13970 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
13971
13972  fi
13973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13974 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
13975
13976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13977 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13978  if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13979   $as_echo_n "(cached) " >&6
13980 else
13981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13982 /* end confdefs.h.  */
13983
13984 #define _SYSCALL32
13985 /* Needed for new procfs interface on sparc-solaris.  */
13986 #define _STRUCTURED_PROC 1
13987 #include <sys/procfs.h>
13988 int
13989 main ()
13990 {
13991 prfpregset_t avar
13992   ;
13993   return 0;
13994 }
13995 _ACEOF
13996 if ac_fn_c_try_compile "$LINENO"; then :
13997   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
13998 else
13999   bfd_cv_have_sys_procfs_type_prfpregset_t=no
14000
14001 fi
14002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14003 fi
14004
14005  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14006
14007 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14008
14009  fi
14010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14011 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14012
14013   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14014 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14015  if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
14016   $as_echo_n "(cached) " >&6
14017 else
14018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14019 /* end confdefs.h.  */
14020
14021 #define _SYSCALL32
14022 /* Needed for new procfs interface on sparc-solaris.  */
14023 #define _STRUCTURED_PROC 1
14024 #include <sys/procfs.h>
14025 int
14026 main ()
14027 {
14028 prgregset32_t avar
14029   ;
14030   return 0;
14031 }
14032 _ACEOF
14033 if ac_fn_c_try_compile "$LINENO"; then :
14034   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14035 else
14036   bfd_cv_have_sys_procfs_type_prgregset32_t=no
14037
14038 fi
14039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14040 fi
14041
14042  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14043
14044 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14045
14046  fi
14047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14048 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14049
14050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14051 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14052  if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
14053   $as_echo_n "(cached) " >&6
14054 else
14055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14056 /* end confdefs.h.  */
14057
14058 #define _SYSCALL32
14059 /* Needed for new procfs interface on sparc-solaris.  */
14060 #define _STRUCTURED_PROC 1
14061 #include <sys/procfs.h>
14062 int
14063 main ()
14064 {
14065 lwpid_t avar
14066   ;
14067   return 0;
14068 }
14069 _ACEOF
14070 if ac_fn_c_try_compile "$LINENO"; then :
14071   bfd_cv_have_sys_procfs_type_lwpid_t=yes
14072 else
14073   bfd_cv_have_sys_procfs_type_lwpid_t=no
14074
14075 fi
14076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14077 fi
14078
14079  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14080
14081 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14082
14083  fi
14084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14085 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14086
14087   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14088 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14089  if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
14090   $as_echo_n "(cached) " >&6
14091 else
14092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14093 /* end confdefs.h.  */
14094
14095 #define _SYSCALL32
14096 /* Needed for new procfs interface on sparc-solaris.  */
14097 #define _STRUCTURED_PROC 1
14098 #include <sys/procfs.h>
14099 int
14100 main ()
14101 {
14102 psaddr_t avar
14103   ;
14104   return 0;
14105 }
14106 _ACEOF
14107 if ac_fn_c_try_compile "$LINENO"; then :
14108   bfd_cv_have_sys_procfs_type_psaddr_t=yes
14109 else
14110   bfd_cv_have_sys_procfs_type_psaddr_t=no
14111
14112 fi
14113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14114 fi
14115
14116  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14117
14118 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14119
14120  fi
14121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14122 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14123
14124   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
14125 $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
14126  if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
14127   $as_echo_n "(cached) " >&6
14128 else
14129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14130 /* end confdefs.h.  */
14131
14132 #define _SYSCALL32
14133 /* Needed for new procfs interface on sparc-solaris.  */
14134 #define _STRUCTURED_PROC 1
14135 #include <sys/procfs.h>
14136 int
14137 main ()
14138 {
14139 prsysent_t avar
14140   ;
14141   return 0;
14142 }
14143 _ACEOF
14144 if ac_fn_c_try_compile "$LINENO"; then :
14145   bfd_cv_have_sys_procfs_type_prsysent_t=yes
14146 else
14147   bfd_cv_have_sys_procfs_type_prsysent_t=no
14148
14149 fi
14150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14151 fi
14152
14153  if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
14154
14155 $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
14156
14157  fi
14158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
14159 $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
14160
14161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
14162 $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
14163  if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
14164   $as_echo_n "(cached) " >&6
14165 else
14166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14167 /* end confdefs.h.  */
14168
14169 #define _SYSCALL32
14170 /* Needed for new procfs interface on sparc-solaris.  */
14171 #define _STRUCTURED_PROC 1
14172 #include <sys/procfs.h>
14173 int
14174 main ()
14175 {
14176 pr_sigset_t avar
14177   ;
14178   return 0;
14179 }
14180 _ACEOF
14181 if ac_fn_c_try_compile "$LINENO"; then :
14182   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
14183 else
14184   bfd_cv_have_sys_procfs_type_pr_sigset_t=no
14185
14186 fi
14187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14188 fi
14189
14190  if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
14191
14192 $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
14193
14194  fi
14195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
14196 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
14197
14198   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
14199 $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
14200  if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
14201   $as_echo_n "(cached) " >&6
14202 else
14203   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14204 /* end confdefs.h.  */
14205
14206 #define _SYSCALL32
14207 /* Needed for new procfs interface on sparc-solaris.  */
14208 #define _STRUCTURED_PROC 1
14209 #include <sys/procfs.h>
14210 int
14211 main ()
14212 {
14213 pr_sigaction64_t avar
14214   ;
14215   return 0;
14216 }
14217 _ACEOF
14218 if ac_fn_c_try_compile "$LINENO"; then :
14219   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
14220 else
14221   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
14222
14223 fi
14224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14225 fi
14226
14227  if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
14228
14229 $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
14230
14231  fi
14232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14233 $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
14234
14235   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14236 $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14237  if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14238   $as_echo_n "(cached) " >&6
14239 else
14240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14241 /* end confdefs.h.  */
14242
14243 #define _SYSCALL32
14244 /* Needed for new procfs interface on sparc-solaris.  */
14245 #define _STRUCTURED_PROC 1
14246 #include <sys/procfs.h>
14247 int
14248 main ()
14249 {
14250 pr_siginfo64_t avar
14251   ;
14252   return 0;
14253 }
14254 _ACEOF
14255 if ac_fn_c_try_compile "$LINENO"; then :
14256   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14257 else
14258   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
14259
14260 fi
14261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14262 fi
14263
14264  if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
14265
14266 $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
14267
14268  fi
14269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14270 $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
14271
14272
14273
14274
14275
14276   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14277     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14278 $as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14279     if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14280   $as_echo_n "(cached) " >&6
14281 else
14282   if test "$cross_compiling" = yes; then :
14283   gdb_cv_prfpregset_t_broken=yes
14284 else
14285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14286 /* end confdefs.h.  */
14287 #include <sys/procfs.h>
14288        int main ()
14289        {
14290          if (sizeof (prfpregset_t) == sizeof (void *))
14291            return 1;
14292          return 0;
14293        }
14294 _ACEOF
14295 if ac_fn_c_try_run "$LINENO"; then :
14296   gdb_cv_prfpregset_t_broken=no
14297 else
14298   gdb_cv_prfpregset_t_broken=yes
14299 fi
14300 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14301   conftest.$ac_objext conftest.beam conftest.$ac_ext
14302 fi
14303
14304 fi
14305
14306     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14307 $as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
14308     if test $gdb_cv_prfpregset_t_broken = yes; then
14309
14310 $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
14311
14312     fi
14313   fi
14314 fi
14315
14316 # Check if the compiler supports the `long long' type.
14317
14318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14319 $as_echo_n "checking for long long support in compiler... " >&6; }
14320 if test "${gdb_cv_c_long_long+set}" = set; then :
14321   $as_echo_n "(cached) " >&6
14322 else
14323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14324 /* end confdefs.h.  */
14325 extern long long foo;
14326 int
14327 main ()
14328 {
14329 switch (foo & 2) { case 0: return 1; }
14330   ;
14331   return 0;
14332 }
14333 _ACEOF
14334 if ac_fn_c_try_compile "$LINENO"; then :
14335   gdb_cv_c_long_long=yes
14336 else
14337   gdb_cv_c_long_long=no
14338 fi
14339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14340 fi
14341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14342 $as_echo "$gdb_cv_c_long_long" >&6; }
14343 if test $gdb_cv_c_long_long != yes; then
14344   # libdecnumber requires long long.
14345   as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
14346 fi
14347
14348 # Check if the compiler and runtime support printing long longs.
14349
14350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14351 $as_echo_n "checking for long long support in printf... " >&6; }
14352 if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14353   $as_echo_n "(cached) " >&6
14354 else
14355   if test "$cross_compiling" = yes; then :
14356   gdb_cv_printf_has_long_long=no
14357 else
14358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14359 /* end confdefs.h.  */
14360 $ac_includes_default
14361 int
14362 main ()
14363 {
14364 char buf[32];
14365   long long l = 0;
14366   l = (l << 16) + 0x0123;
14367   l = (l << 16) + 0x4567;
14368   l = (l << 16) + 0x89ab;
14369   l = (l << 16) + 0xcdef;
14370   sprintf (buf, "0x%016llx", l);
14371   return (strcmp ("0x0123456789abcdef", buf));
14372   ;
14373   return 0;
14374 }
14375 _ACEOF
14376 if ac_fn_c_try_run "$LINENO"; then :
14377   gdb_cv_printf_has_long_long=yes
14378 else
14379   gdb_cv_printf_has_long_long=no
14380 fi
14381 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14382   conftest.$ac_objext conftest.beam conftest.$ac_ext
14383 fi
14384
14385 fi
14386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14387 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
14388 if test $gdb_cv_printf_has_long_long = yes; then
14389
14390 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
14391
14392 fi
14393
14394 # Check if the compiler and runtime support printing decfloats.
14395
14396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14397 $as_echo_n "checking for decfloat support in printf... " >&6; }
14398 if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14399   $as_echo_n "(cached) " >&6
14400 else
14401   if test "$cross_compiling" = yes; then :
14402   gdb_cv_printf_has_decfloat=no
14403 else
14404   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14405 /* end confdefs.h.  */
14406 $ac_includes_default
14407 int
14408 main ()
14409 {
14410 char buf[64];
14411   _Decimal32 d32 = 1.2345df;
14412   _Decimal64 d64 = 1.2345dd;
14413   _Decimal128 d128 = 1.2345dl;
14414   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14415   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14416   ;
14417   return 0;
14418 }
14419 _ACEOF
14420 if ac_fn_c_try_run "$LINENO"; then :
14421   gdb_cv_printf_has_decfloat=yes
14422 else
14423   gdb_cv_printf_has_decfloat=no
14424 fi
14425 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14426   conftest.$ac_objext conftest.beam conftest.$ac_ext
14427 fi
14428
14429 fi
14430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14431 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
14432 if test $gdb_cv_printf_has_decfloat = yes; then
14433
14434 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
14435
14436 fi
14437
14438 # Check if the compiler supports the `long double' type.  We can't use
14439 # AC_C_LONG_DOUBLE because that one does additional checks on the
14440 # constants defined in <float.h> that fail on some systems,
14441 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
14442
14443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14444 $as_echo_n "checking for long double support in compiler... " >&6; }
14445 if test "${gdb_cv_c_long_double+set}" = set; then :
14446   $as_echo_n "(cached) " >&6
14447 else
14448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14449 /* end confdefs.h.  */
14450 long double foo;
14451 _ACEOF
14452 if ac_fn_c_try_compile "$LINENO"; then :
14453   gdb_cv_c_long_double=yes
14454 else
14455   gdb_cv_c_long_double=no
14456 fi
14457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14458 fi
14459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14460 $as_echo "$gdb_cv_c_long_double" >&6; }
14461 if test $gdb_cv_c_long_double = yes; then
14462
14463 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
14464
14465 fi
14466
14467 # Check if the compiler and runtime support printing long doubles.
14468
14469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14470 $as_echo_n "checking for long double support in printf... " >&6; }
14471 if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14472   $as_echo_n "(cached) " >&6
14473 else
14474   if test "$cross_compiling" = yes; then :
14475   gdb_cv_printf_has_long_double=no
14476 else
14477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14478 /* end confdefs.h.  */
14479 $ac_includes_default
14480 int
14481 main ()
14482 {
14483 char buf[16];
14484   long double f = 3.141592653;
14485   sprintf (buf, "%Lg", f);
14486   return (strncmp ("3.14159", buf, 7));
14487   ;
14488   return 0;
14489 }
14490 _ACEOF
14491 if ac_fn_c_try_run "$LINENO"; then :
14492   gdb_cv_printf_has_long_double=yes
14493 else
14494   gdb_cv_printf_has_long_double=no
14495 fi
14496 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14497   conftest.$ac_objext conftest.beam conftest.$ac_ext
14498 fi
14499
14500 fi
14501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14502 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
14503 if test $gdb_cv_printf_has_long_double = yes; then
14504
14505 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
14506
14507 fi
14508
14509 # Check if the compiler and runtime support scanning long doubles.
14510
14511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14512 $as_echo_n "checking for long double support in scanf... " >&6; }
14513 if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14514   $as_echo_n "(cached) " >&6
14515 else
14516   if test "$cross_compiling" = yes; then :
14517   gdb_cv_scanf_has_long_double=no
14518 else
14519   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14520 /* end confdefs.h.  */
14521 #include <stdio.h>
14522 int
14523 main ()
14524 {
14525 char *buf = "3.141592653";
14526   long double f = 0;
14527   sscanf (buf, "%Lg", &f);
14528   return !(f > 3.14159 && f < 3.14160);
14529   ;
14530   return 0;
14531 }
14532 _ACEOF
14533 if ac_fn_c_try_run "$LINENO"; then :
14534   gdb_cv_scanf_has_long_double=yes
14535 else
14536   gdb_cv_scanf_has_long_double=no
14537 fi
14538 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14539   conftest.$ac_objext conftest.beam conftest.$ac_ext
14540 fi
14541
14542 fi
14543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14544 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
14545 if test $gdb_cv_scanf_has_long_double = yes; then
14546
14547 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
14548
14549 fi
14550
14551 case ${host_os} in
14552 aix*)
14553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14554 $as_echo_n "checking for -bbigtoc option... " >&6; }
14555 if test "${gdb_cv_bigtoc+set}" = set; then :
14556   $as_echo_n "(cached) " >&6
14557 else
14558
14559     SAVE_LDFLAGS=$LDFLAGS
14560
14561     case $GCC in
14562     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14563     *) gdb_cv_bigtoc=-bbigtoc ;;
14564     esac
14565
14566     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
14567     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14568 /* end confdefs.h.  */
14569
14570 int
14571 main ()
14572 {
14573 int i;
14574   ;
14575   return 0;
14576 }
14577 _ACEOF
14578 if ac_fn_c_try_link "$LINENO"; then :
14579
14580 else
14581   gdb_cv_bigtoc=
14582 fi
14583 rm -f core conftest.err conftest.$ac_objext \
14584     conftest$ac_exeext conftest.$ac_ext
14585     LDFLAGS="${SAVE_LDFLAGS}"
14586
14587 fi
14588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14589 $as_echo "$gdb_cv_bigtoc" >&6; }
14590   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14591   ;;
14592 esac
14593
14594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
14595 $as_echo_n "checking for the dynamic export flag... " >&6; }
14596 dynamic_list=false
14597 if test "${gdb_native}" = yes; then
14598    # The dynamically loaded libthread_db needs access to symbols in the gdb
14599    # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
14600    # may not be supported there.
14601    old_LDFLAGS="$LDFLAGS"
14602    # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14603    RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14604    LDFLAGS="$LDFLAGS $RDYNAMIC"
14605    if test "${have_libpython}" = no; then
14606      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14607 /* end confdefs.h.  */
14608
14609 int
14610 main ()
14611 {
14612
14613   ;
14614   return 0;
14615 }
14616 _ACEOF
14617 if ac_fn_c_try_link "$LINENO"; then :
14618   dynamic_list=true
14619 fi
14620 rm -f core conftest.err conftest.$ac_objext \
14621     conftest$ac_exeext conftest.$ac_ext
14622    else
14623      # Workaround http://bugs.python.org/issue4434 where static
14624      # libpythonX.Y.a would get its symbols required for
14625      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14626      # Problem does not happen for the recommended libpythonX.Y.so linkage.
14627
14628      # Note the workaround for Python
14629      # http://bugs.python.org/issue10112 earlier has removed
14630      # -export-dynamic from PYTHON_LIBS.  That's exactly what we want
14631      # here too, as otherwise it'd make this -Wl,--dynamic-list test
14632      # always pass.
14633      old_CFLAGS="$CFLAGS"
14634      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14635      old_LIBS="$LIBS"
14636      LIBS="$LIBS $PYTHON_LIBS"
14637      old_CPPFLAGS="$CPPFLAGS"
14638      CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
14639      if test "$cross_compiling" = yes; then :
14640   true
14641 else
14642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14643 /* end confdefs.h.  */
14644 #include "Python.h"
14645 int
14646 main ()
14647 {
14648 int err;
14649           Py_Initialize ();
14650           err = PyRun_SimpleString ("import itertools\n");
14651           Py_Finalize ();
14652           return err == 0 ? 0 : 1;
14653   ;
14654   return 0;
14655 }
14656 _ACEOF
14657 if ac_fn_c_try_run "$LINENO"; then :
14658   dynamic_list=true
14659 fi
14660 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14661   conftest.$ac_objext conftest.beam conftest.$ac_ext
14662 fi
14663
14664      LIBS="$old_LIBS"
14665      CFLAGS="$old_CFLAGS"
14666      CPPFLAGS="$old_CPPFLAGS"
14667    fi
14668    LDFLAGS="$old_LDFLAGS"
14669 fi
14670 if $dynamic_list; then
14671   found="-Wl,--dynamic-list"
14672   RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
14673 else
14674   found="-rdynamic"
14675   RDYNAMIC="-rdynamic"
14676 fi
14677
14678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
14679 $as_echo "$found" >&6; }
14680
14681
14682 if test ${build} = ${host} -a ${host} = ${target} ; then
14683    case ${host_os} in
14684    solaris*)
14685       # See if thread_db library is around for Solaris thread debugging.
14686       # Note that we must explicitly test for version 1 of the library
14687       # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14688       # the same API.
14689       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14690 $as_echo_n "checking for Solaris thread debugging library... " >&6; }
14691       if test -f /usr/lib/libthread_db.so.1 ; then
14692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14693 $as_echo "yes" >&6; }
14694
14695 $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
14696
14697          CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
14698          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
14699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14700 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14701 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14702   $as_echo_n "(cached) " >&6
14703 else
14704   ac_check_lib_save_LIBS=$LIBS
14705 LIBS="-ldl  $LIBS"
14706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14707 /* end confdefs.h.  */
14708
14709 /* Override any GCC internal prototype to avoid an error.
14710    Use char because int might match the return type of a GCC
14711    builtin and then its argument prototype would still apply.  */
14712 #ifdef __cplusplus
14713 extern "C"
14714 #endif
14715 char dlopen ();
14716 int
14717 main ()
14718 {
14719 return dlopen ();
14720   ;
14721   return 0;
14722 }
14723 _ACEOF
14724 if ac_fn_c_try_link "$LINENO"; then :
14725   ac_cv_lib_dl_dlopen=yes
14726 else
14727   ac_cv_lib_dl_dlopen=no
14728 fi
14729 rm -f core conftest.err conftest.$ac_objext \
14730     conftest$ac_exeext conftest.$ac_ext
14731 LIBS=$ac_check_lib_save_LIBS
14732 fi
14733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14734 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14735 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
14736   cat >>confdefs.h <<_ACEOF
14737 #define HAVE_LIBDL 1
14738 _ACEOF
14739
14740   LIBS="-ldl $LIBS"
14741
14742 fi
14743
14744          CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
14745          # Sun randomly tweaked the prototypes in <proc_service.h>
14746          # at one point.
14747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14748 $as_echo_n "checking if <proc_service.h> is old... " >&6; }
14749          if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14750   $as_echo_n "(cached) " >&6
14751 else
14752
14753             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14754 /* end confdefs.h.  */
14755
14756                 #include <proc_service.h>
14757                 ps_err_e ps_pdwrite
14758                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
14759
14760 int
14761 main ()
14762 {
14763
14764   ;
14765   return 0;
14766 }
14767 _ACEOF
14768 if ac_fn_c_try_compile "$LINENO"; then :
14769   gdb_cv_proc_service_is_old=no
14770 else
14771   gdb_cv_proc_service_is_old=yes
14772 fi
14773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14774
14775 fi
14776
14777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14778 $as_echo "$gdb_cv_proc_service_is_old" >&6; }
14779          if test $gdb_cv_proc_service_is_old = yes; then
14780
14781 $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
14782
14783          fi
14784       else
14785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14786 $as_echo "no" >&6; }
14787       fi
14788       ;;
14789    aix*)
14790       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14791 $as_echo_n "checking for AiX thread debugging library... " >&6; }
14792       if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14793   $as_echo_n "(cached) " >&6
14794 else
14795   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14796 /* end confdefs.h.  */
14797 #include <sys/pthdebug.h>
14798 int
14799 main ()
14800 {
14801 #ifndef PTHDB_VERSION_3
14802                                     #error
14803                                     #endif
14804   ;
14805   return 0;
14806 }
14807 _ACEOF
14808 if ac_fn_c_try_compile "$LINENO"; then :
14809   gdb_cv_have_aix_thread_debug=yes
14810 else
14811   gdb_cv_have_aix_thread_debug=no
14812 fi
14813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14814 fi
14815
14816       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14817 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
14818       if test $gdb_cv_have_aix_thread_debug = yes; then
14819          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
14820          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
14821          LIBS="$LIBS -lpthdebug"
14822
14823          # Older versions of AIX do not provide the declaration for
14824          # the getthrds function (it appears that it was introduced
14825          # with AIX 6.x).
14826          ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14827 "
14828 if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14829   ac_have_decl=1
14830 else
14831   ac_have_decl=0
14832 fi
14833
14834 cat >>confdefs.h <<_ACEOF
14835 #define HAVE_DECL_GETTHRDS $ac_have_decl
14836 _ACEOF
14837
14838       fi
14839       ;;
14840    esac
14841
14842 fi
14843
14844 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
14845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14846 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14847 if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14848   $as_echo_n "(cached) " >&6
14849 else
14850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14851 /* end confdefs.h.  */
14852 #include <thread_db.h>
14853 int
14854 main ()
14855 {
14856 int i = TD_NOTALLOC;
14857   ;
14858   return 0;
14859 }
14860 _ACEOF
14861 if ac_fn_c_try_compile "$LINENO"; then :
14862   gdb_cv_thread_db_h_has_td_notalloc=yes
14863 else
14864   gdb_cv_thread_db_h_has_td_notalloc=no
14865
14866 fi
14867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14868
14869 fi
14870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14871 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14873 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14874 if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14875   $as_echo_n "(cached) " >&6
14876 else
14877   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14878 /* end confdefs.h.  */
14879 #include <thread_db.h>
14880 int
14881 main ()
14882 {
14883 int i = TD_VERSION;
14884   ;
14885   return 0;
14886 }
14887 _ACEOF
14888 if ac_fn_c_try_compile "$LINENO"; then :
14889   gdb_cv_thread_db_h_has_td_version=yes
14890 else
14891   gdb_cv_thread_db_h_has_td_version=no
14892
14893 fi
14894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14895
14896 fi
14897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14898 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14900 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14901 if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14902   $as_echo_n "(cached) " >&6
14903 else
14904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14905 /* end confdefs.h.  */
14906 #include <thread_db.h>
14907 int
14908 main ()
14909 {
14910 int i = TD_NOTLS;
14911   ;
14912   return 0;
14913 }
14914 _ACEOF
14915 if ac_fn_c_try_compile "$LINENO"; then :
14916   gdb_cv_thread_db_h_has_td_notls=yes
14917 else
14918   gdb_cv_thread_db_h_has_td_notls=no
14919
14920 fi
14921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14922
14923 fi
14924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14925 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
14926 fi
14927 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
14928
14929 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
14930
14931 fi
14932 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14933
14934 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
14935
14936 fi
14937 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14938
14939 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
14940
14941 fi
14942
14943 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14944 "
14945 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14946   ac_have_decl=1
14947 else
14948   ac_have_decl=0
14949 fi
14950
14951 cat >>confdefs.h <<_ACEOF
14952 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
14953 _ACEOF
14954
14955
14956 if test "$cross_compiling" = yes; then :
14957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14958 /* end confdefs.h.  */
14959 #include <sys/personality.h>
14960 int
14961 main ()
14962 {
14963
14964 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
14965 #       define ADDR_NO_RANDOMIZE 0x0040000
14966 #      endif
14967        /* Test the flag could be set and stays set.  */
14968        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14969        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14970            return 1
14971   ;
14972   return 0;
14973 }
14974 _ACEOF
14975 if ac_fn_c_try_link "$LINENO"; then :
14976   have_personality=true
14977 else
14978   have_personality=false
14979 fi
14980 rm -f core conftest.err conftest.$ac_objext \
14981     conftest$ac_exeext conftest.$ac_ext
14982 else
14983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14984 /* end confdefs.h.  */
14985 #include <sys/personality.h>
14986 int
14987 main ()
14988 {
14989
14990 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
14991 #       define ADDR_NO_RANDOMIZE 0x0040000
14992 #      endif
14993        /* Test the flag could be set and stays set.  */
14994        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14995        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14996            return 1
14997   ;
14998   return 0;
14999 }
15000 _ACEOF
15001 if ac_fn_c_try_run "$LINENO"; then :
15002   have_personality=true
15003 else
15004   have_personality=false
15005 fi
15006 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15007   conftest.$ac_objext conftest.beam conftest.$ac_ext
15008 fi
15009
15010 if $have_personality
15011 then
15012
15013 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
15014
15015 fi
15016
15017 case $host_os in
15018   go32* | *djgpp*)
15019     gdbinit=gdb.ini
15020     ;;
15021   *)
15022     gdbinit=.gdbinit
15023     ;;
15024 esac
15025
15026 cat >>confdefs.h <<_ACEOF
15027 #define GDBINIT "$gdbinit"
15028 _ACEOF
15029
15030
15031
15032 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15033 # except that the argument to --with-sysroot is optional.
15034 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15035 if test "x$with_sysroot" = xyes; then
15036   with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15037 fi
15038
15039 # Check whether --with-sysroot was given.
15040 if test "${with_sysroot+set}" = set; then :
15041   withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15042 else
15043   TARGET_SYSTEM_ROOT=
15044 fi
15045
15046
15047   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15048   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15049   ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15050   ac_define_dir=`eval echo $ac_define_dir`
15051
15052 cat >>confdefs.h <<_ACEOF
15053 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
15054 _ACEOF
15055
15056
15057
15058
15059   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15060      if test "x$prefix" = xNONE; then
15061         test_prefix=/usr/local
15062      else
15063         test_prefix=$prefix
15064      fi
15065   else
15066      test_prefix=$exec_prefix
15067   fi
15068   value=0
15069   case ${ac_define_dir} in
15070      "${test_prefix}"|"${test_prefix}/"*|\
15071         '${exec_prefix}'|'${exec_prefix}/'*)
15072      value=1
15073      ;;
15074   esac
15075
15076 cat >>confdefs.h <<_ACEOF
15077 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15078 _ACEOF
15079
15080
15081
15082
15083
15084 # Check whether --with-system-gdbinit was given.
15085 if test "${with_system_gdbinit+set}" = set; then :
15086   withval=$with_system_gdbinit;
15087     SYSTEM_GDBINIT=$withval
15088 else
15089   SYSTEM_GDBINIT=
15090 fi
15091
15092
15093   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15094   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15095   ac_define_dir=`eval echo $SYSTEM_GDBINIT`
15096   ac_define_dir=`eval echo $ac_define_dir`
15097
15098 cat >>confdefs.h <<_ACEOF
15099 #define SYSTEM_GDBINIT "$ac_define_dir"
15100 _ACEOF
15101
15102
15103
15104
15105   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15106      if test "x$prefix" = xNONE; then
15107         test_prefix=/usr/local
15108      else
15109         test_prefix=$prefix
15110      fi
15111   else
15112      test_prefix=$exec_prefix
15113   fi
15114   value=0
15115   case ${ac_define_dir} in
15116      "${test_prefix}"|"${test_prefix}/"*|\
15117         '${exec_prefix}'|'${exec_prefix}/'*)
15118      value=1
15119      ;;
15120   esac
15121
15122 cat >>confdefs.h <<_ACEOF
15123 #define SYSTEM_GDBINIT_RELOCATABLE $value
15124 _ACEOF
15125
15126
15127
15128
15129
15130 # Check whether --enable-werror was given.
15131 if test "${enable_werror+set}" = set; then :
15132   enableval=$enable_werror; case "${enableval}" in
15133      yes | y) ERROR_ON_WARNING="yes" ;;
15134      no | n)  ERROR_ON_WARNING="no" ;;
15135      *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
15136    esac
15137 fi
15138
15139
15140 # Enable -Werror by default when using gcc.  Turn it off for releases.
15141 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
15142     ERROR_ON_WARNING=yes
15143 fi
15144
15145 WERROR_CFLAGS=""
15146 if test "${ERROR_ON_WARNING}" = yes ; then
15147     WERROR_CFLAGS="-Werror"
15148 fi
15149
15150 # The options we'll try to enable.
15151 build_warnings="-Wall -Wpointer-arith \
15152 -Wno-unused -Wunused-value -Wunused-function \
15153 -Wno-switch -Wno-char-subscripts \
15154 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
15155 -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
15156 -Wno-mismatched-tags"
15157
15158 # Enable -Wno-format by default when using gcc on mingw since many
15159 # GCC versions complain about %I64.
15160 case "${host}" in
15161   *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
15162   *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
15163 esac
15164
15165 # Check whether --enable-build-warnings was given.
15166 if test "${enable_build_warnings+set}" = set; then :
15167   enableval=$enable_build_warnings; case "${enableval}" in
15168   yes)  ;;
15169   no)   build_warnings="-w";;
15170   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15171         build_warnings="${build_warnings} ${t}";;
15172   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15173         build_warnings="${t} ${build_warnings}";;
15174   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15175 esac
15176 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15177   echo "Setting compiler warning flags = $build_warnings" 6>&1
15178 fi
15179 fi
15180 # Check whether --enable-gdb-build-warnings was given.
15181 if test "${enable_gdb_build_warnings+set}" = set; then :
15182   enableval=$enable_gdb_build_warnings; case "${enableval}" in
15183   yes)  ;;
15184   no)   build_warnings="-w";;
15185   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15186         build_warnings="${build_warnings} ${t}";;
15187   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15188         build_warnings="${t} ${build_warnings}";;
15189   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15190 esac
15191 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15192   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15193 fi
15194 fi
15195
15196 # The set of warnings supported by a C++ compiler is not the same as
15197 # of the C compiler.
15198 ac_ext=cpp
15199 ac_cpp='$CXXCPP $CPPFLAGS'
15200 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15201 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15202 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15203
15204
15205 WARN_CFLAGS=""
15206 if test "x${build_warnings}" != x -a "x$GCC" = xyes
15207 then
15208     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15209 $as_echo_n "checking compiler warning flags... " >&6; }
15210     # Separate out the -Werror flag as some files just cannot be
15211     # compiled with it enabled.
15212     for w in ${build_warnings}; do
15213         # GCC does not complain about -Wno-unknown-warning.  Invert
15214         # and test -Wunknown-warning instead.
15215         case $w in
15216         -Wno-*)
15217                 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15218         *)
15219                 wtest=$w ;;
15220         esac
15221
15222         case $w in
15223         -Werr*) WERROR_CFLAGS=-Werror ;;
15224         *)
15225             # Check whether GCC accepts it.
15226             saved_CFLAGS="$CFLAGS"
15227             CFLAGS="$CFLAGS -Werror $wtest"
15228             saved_CXXFLAGS="$CXXFLAGS"
15229             CXXFLAGS="$CXXFLAGS -Werror $wtest"
15230             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15231 /* end confdefs.h.  */
15232
15233 int
15234 main ()
15235 {
15236
15237   ;
15238   return 0;
15239 }
15240 _ACEOF
15241 if ac_fn_cxx_try_compile "$LINENO"; then :
15242   WARN_CFLAGS="${WARN_CFLAGS} $w"
15243 fi
15244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15245             CFLAGS="$saved_CFLAGS"
15246             CXXFLAGS="$saved_CXXFLAGS"
15247         esac
15248     done
15249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15250 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
15251 fi
15252
15253
15254
15255 ac_ext=c
15256 ac_cpp='$CPP $CPPFLAGS'
15257 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15258 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15259 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15260
15261
15262
15263 # In the Cygwin environment, we need some additional flags.
15264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15265 $as_echo_n "checking for cygwin... " >&6; }
15266 if test "${gdb_cv_os_cygwin+set}" = set; then :
15267   $as_echo_n "(cached) " >&6
15268 else
15269   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15270 /* end confdefs.h.  */
15271
15272 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
15273 lose
15274 #endif
15275 _ACEOF
15276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15277   $EGREP "^lose$" >/dev/null 2>&1; then :
15278   gdb_cv_os_cygwin=yes
15279 else
15280   gdb_cv_os_cygwin=no
15281 fi
15282 rm -f conftest*
15283
15284 fi
15285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15286 $as_echo "$gdb_cv_os_cygwin" >&6; }
15287
15288
15289 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
15290 case ${host} in
15291   *go32* ) SER_HARDWIRE=ser-go32.o ;;
15292   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
15293   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
15294 esac
15295
15296
15297 # libreadline needs libuser32.a in a cygwin environment
15298 WIN32LIBS=
15299 if test x$gdb_cv_os_cygwin = xyes; then
15300     WIN32LIBS="-luser32"
15301     case "${target}" in
15302         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15303         ;;
15304     esac
15305 fi
15306
15307 # The ser-tcp.c module requires sockets.
15308 case ${host} in
15309   *mingw32*)
15310
15311 $as_echo "#define USE_WIN32API 1" >>confdefs.h
15312
15313     WIN32LIBS="$WIN32LIBS -lws2_32"
15314     ;;
15315 esac
15316
15317
15318 # Add ELF support to GDB, but only if BFD includes ELF support.
15319
15320   OLD_CFLAGS=$CFLAGS
15321   OLD_LDFLAGS=$LDFLAGS
15322   OLD_LIBS=$LIBS
15323   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15324   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15325   # always want our bfd.
15326   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15327   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15328   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15329   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15330   LIBS="-lbfd -liberty -lz $intl $LIBS"
15331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15332 $as_echo_n "checking for ELF support in BFD... " >&6; }
15333 if test "${gdb_cv_var_elf+set}" = set; then :
15334   $as_echo_n "(cached) " >&6
15335 else
15336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15337 /* end confdefs.h.  */
15338 #include <stdlib.h>
15339   #include "bfd.h"
15340   #include "elf-bfd.h"
15341
15342 int
15343 main ()
15344 {
15345 return bfd_get_elf_phdr_upper_bound (NULL);
15346   ;
15347   return 0;
15348 }
15349 _ACEOF
15350 if ac_fn_c_try_link "$LINENO"; then :
15351   gdb_cv_var_elf=yes
15352 else
15353   gdb_cv_var_elf=no
15354 fi
15355 rm -f core conftest.err conftest.$ac_objext \
15356     conftest$ac_exeext conftest.$ac_ext
15357 fi
15358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15359 $as_echo "$gdb_cv_var_elf" >&6; }
15360   CFLAGS=$OLD_CFLAGS
15361   LDFLAGS=$OLD_LDFLAGS
15362   LIBS=$OLD_LIBS
15363 if test $gdb_cv_var_elf = yes; then
15364   CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
15365
15366 $as_echo "#define HAVE_ELF 1" >>confdefs.h
15367
15368   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15369   if test "$plugins" = "yes"; then
15370     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15371 $as_echo_n "checking for library containing dlopen... " >&6; }
15372 if test "${ac_cv_search_dlopen+set}" = set; then :
15373   $as_echo_n "(cached) " >&6
15374 else
15375   ac_func_search_save_LIBS=$LIBS
15376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15377 /* end confdefs.h.  */
15378
15379 /* Override any GCC internal prototype to avoid an error.
15380    Use char because int might match the return type of a GCC
15381    builtin and then its argument prototype would still apply.  */
15382 #ifdef __cplusplus
15383 extern "C"
15384 #endif
15385 char dlopen ();
15386 int
15387 main ()
15388 {
15389 return dlopen ();
15390   ;
15391   return 0;
15392 }
15393 _ACEOF
15394 for ac_lib in '' dl; do
15395   if test -z "$ac_lib"; then
15396     ac_res="none required"
15397   else
15398     ac_res=-l$ac_lib
15399     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15400   fi
15401   if ac_fn_c_try_link "$LINENO"; then :
15402   ac_cv_search_dlopen=$ac_res
15403 fi
15404 rm -f core conftest.err conftest.$ac_objext \
15405     conftest$ac_exeext
15406   if test "${ac_cv_search_dlopen+set}" = set; then :
15407   break
15408 fi
15409 done
15410 if test "${ac_cv_search_dlopen+set}" = set; then :
15411
15412 else
15413   ac_cv_search_dlopen=no
15414 fi
15415 rm conftest.$ac_ext
15416 LIBS=$ac_func_search_save_LIBS
15417 fi
15418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15419 $as_echo "$ac_cv_search_dlopen" >&6; }
15420 ac_res=$ac_cv_search_dlopen
15421 if test "$ac_res" != no; then :
15422   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15423
15424 fi
15425
15426   fi
15427 fi
15428
15429 # Add macho support to GDB, but only if BFD includes it.
15430
15431   OLD_CFLAGS=$CFLAGS
15432   OLD_LDFLAGS=$LDFLAGS
15433   OLD_LIBS=$LIBS
15434   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15435   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15436   # always want our bfd.
15437   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15438   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15439   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15440   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15441   LIBS="-lbfd -liberty -lz $intl $LIBS"
15442   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15443 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
15444 if test "${gdb_cv_var_macho+set}" = set; then :
15445   $as_echo_n "(cached) " >&6
15446 else
15447   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15448 /* end confdefs.h.  */
15449 #include <stdlib.h>
15450   #include "bfd.h"
15451   #include "mach-o.h"
15452
15453 int
15454 main ()
15455 {
15456 return bfd_mach_o_lookup_command (NULL, 0, NULL);
15457   ;
15458   return 0;
15459 }
15460 _ACEOF
15461 if ac_fn_c_try_link "$LINENO"; then :
15462   gdb_cv_var_macho=yes
15463 else
15464   gdb_cv_var_macho=no
15465 fi
15466 rm -f core conftest.err conftest.$ac_objext \
15467     conftest$ac_exeext conftest.$ac_ext
15468 fi
15469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15470 $as_echo "$gdb_cv_var_macho" >&6; }
15471   CFLAGS=$OLD_CFLAGS
15472   LDFLAGS=$OLD_LDFLAGS
15473   LIBS=$OLD_LIBS
15474 if test $gdb_cv_var_macho = yes; then
15475   CONFIG_OBS="$CONFIG_OBS machoread.o"
15476 fi
15477
15478 # Add any host-specific objects to GDB.
15479 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15480
15481 # If building on ELF, look for lzma support for embedded compressed debug info.
15482 if test $gdb_cv_var_elf = yes; then
15483
15484 # Check whether --with-lzma was given.
15485 if test "${with_lzma+set}" = set; then :
15486   withval=$with_lzma;
15487 else
15488   with_lzma=auto
15489 fi
15490
15491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15492 $as_echo_n "checking whether to use lzma... " >&6; }
15493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15494 $as_echo "$with_lzma" >&6; }
15495
15496   if test "${with_lzma}" != no; then
15497
15498
15499
15500
15501
15502
15503
15504
15505     use_additional=yes
15506
15507   acl_save_prefix="$prefix"
15508   prefix="$acl_final_prefix"
15509   acl_save_exec_prefix="$exec_prefix"
15510   exec_prefix="$acl_final_exec_prefix"
15511
15512     eval additional_includedir=\"$includedir\"
15513     eval additional_libdir=\"$libdir\"
15514
15515   exec_prefix="$acl_save_exec_prefix"
15516   prefix="$acl_save_prefix"
15517
15518
15519 # Check whether --with-liblzma-prefix was given.
15520 if test "${with_liblzma_prefix+set}" = set; then :
15521   withval=$with_liblzma_prefix;
15522     if test "X$withval" = "Xno"; then
15523       use_additional=no
15524     else
15525       if test "X$withval" = "X"; then
15526
15527   acl_save_prefix="$prefix"
15528   prefix="$acl_final_prefix"
15529   acl_save_exec_prefix="$exec_prefix"
15530   exec_prefix="$acl_final_exec_prefix"
15531
15532           eval additional_includedir=\"$includedir\"
15533           eval additional_libdir=\"$libdir\"
15534
15535   exec_prefix="$acl_save_exec_prefix"
15536   prefix="$acl_save_prefix"
15537
15538       else
15539         additional_includedir="$withval/include"
15540         additional_libdir="$withval/lib"
15541       fi
15542     fi
15543
15544 fi
15545
15546       LIBLZMA=
15547   LTLIBLZMA=
15548   INCLZMA=
15549   rpathdirs=
15550   ltrpathdirs=
15551   names_already_handled=
15552   names_next_round='lzma '
15553   while test -n "$names_next_round"; do
15554     names_this_round="$names_next_round"
15555     names_next_round=
15556     for name in $names_this_round; do
15557       already_handled=
15558       for n in $names_already_handled; do
15559         if test "$n" = "$name"; then
15560           already_handled=yes
15561           break
15562         fi
15563       done
15564       if test -z "$already_handled"; then
15565         names_already_handled="$names_already_handled $name"
15566                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15567         eval value=\"\$HAVE_LIB$uppername\"
15568         if test -n "$value"; then
15569           if test "$value" = yes; then
15570             eval value=\"\$LIB$uppername\"
15571             test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15572             eval value=\"\$LTLIB$uppername\"
15573             test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15574           else
15575                                     :
15576           fi
15577         else
15578                               found_dir=
15579           found_la=
15580           found_so=
15581           found_a=
15582           if test $use_additional = yes; then
15583             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15584               found_dir="$additional_libdir"
15585               found_so="$additional_libdir/lib$name.$shlibext"
15586               if test -f "$additional_libdir/lib$name.la"; then
15587                 found_la="$additional_libdir/lib$name.la"
15588               fi
15589             else
15590               if test -f "$additional_libdir/lib$name.$libext"; then
15591                 found_dir="$additional_libdir"
15592                 found_a="$additional_libdir/lib$name.$libext"
15593                 if test -f "$additional_libdir/lib$name.la"; then
15594                   found_la="$additional_libdir/lib$name.la"
15595                 fi
15596               fi
15597             fi
15598           fi
15599           if test "X$found_dir" = "X"; then
15600             for x in $LDFLAGS $LTLIBLZMA; do
15601
15602   acl_save_prefix="$prefix"
15603   prefix="$acl_final_prefix"
15604   acl_save_exec_prefix="$exec_prefix"
15605   exec_prefix="$acl_final_exec_prefix"
15606   eval x=\"$x\"
15607   exec_prefix="$acl_save_exec_prefix"
15608   prefix="$acl_save_prefix"
15609
15610               case "$x" in
15611                 -L*)
15612                   dir=`echo "X$x" | sed -e 's/^X-L//'`
15613                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15614                     found_dir="$dir"
15615                     found_so="$dir/lib$name.$shlibext"
15616                     if test -f "$dir/lib$name.la"; then
15617                       found_la="$dir/lib$name.la"
15618                     fi
15619                   else
15620                     if test -f "$dir/lib$name.$libext"; then
15621                       found_dir="$dir"
15622                       found_a="$dir/lib$name.$libext"
15623                       if test -f "$dir/lib$name.la"; then
15624                         found_la="$dir/lib$name.la"
15625                       fi
15626                     fi
15627                   fi
15628                   ;;
15629               esac
15630               if test "X$found_dir" != "X"; then
15631                 break
15632               fi
15633             done
15634           fi
15635           if test "X$found_dir" != "X"; then
15636                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15637             if test "X$found_so" != "X"; then
15638                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15639                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15640               else
15641                                                                                 haveit=
15642                 for x in $ltrpathdirs; do
15643                   if test "X$x" = "X$found_dir"; then
15644                     haveit=yes
15645                     break
15646                   fi
15647                 done
15648                 if test -z "$haveit"; then
15649                   ltrpathdirs="$ltrpathdirs $found_dir"
15650                 fi
15651                                 if test "$hardcode_direct" = yes; then
15652                                                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15653                 else
15654                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15655                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15656                                                             haveit=
15657                     for x in $rpathdirs; do
15658                       if test "X$x" = "X$found_dir"; then
15659                         haveit=yes
15660                         break
15661                       fi
15662                     done
15663                     if test -z "$haveit"; then
15664                       rpathdirs="$rpathdirs $found_dir"
15665                     fi
15666                   else
15667                                                                                 haveit=
15668                     for x in $LDFLAGS $LIBLZMA; do
15669
15670   acl_save_prefix="$prefix"
15671   prefix="$acl_final_prefix"
15672   acl_save_exec_prefix="$exec_prefix"
15673   exec_prefix="$acl_final_exec_prefix"
15674   eval x=\"$x\"
15675   exec_prefix="$acl_save_exec_prefix"
15676   prefix="$acl_save_prefix"
15677
15678                       if test "X$x" = "X-L$found_dir"; then
15679                         haveit=yes
15680                         break
15681                       fi
15682                     done
15683                     if test -z "$haveit"; then
15684                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15685                     fi
15686                     if test "$hardcode_minus_L" != no; then
15687                                                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15688                     else
15689                                                                                                                                                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15690                     fi
15691                   fi
15692                 fi
15693               fi
15694             else
15695               if test "X$found_a" != "X"; then
15696                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15697               else
15698                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15699               fi
15700             fi
15701                         additional_includedir=
15702             case "$found_dir" in
15703               */lib | */lib/)
15704                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15705                 additional_includedir="$basedir/include"
15706                 ;;
15707             esac
15708             if test "X$additional_includedir" != "X"; then
15709                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
15710                 haveit=
15711                 if test "X$additional_includedir" = "X/usr/local/include"; then
15712                   if test -n "$GCC"; then
15713                     case $host_os in
15714                       linux*) haveit=yes;;
15715                     esac
15716                   fi
15717                 fi
15718                 if test -z "$haveit"; then
15719                   for x in $CPPFLAGS $INCLZMA; do
15720
15721   acl_save_prefix="$prefix"
15722   prefix="$acl_final_prefix"
15723   acl_save_exec_prefix="$exec_prefix"
15724   exec_prefix="$acl_final_exec_prefix"
15725   eval x=\"$x\"
15726   exec_prefix="$acl_save_exec_prefix"
15727   prefix="$acl_save_prefix"
15728
15729                     if test "X$x" = "X-I$additional_includedir"; then
15730                       haveit=yes
15731                       break
15732                     fi
15733                   done
15734                   if test -z "$haveit"; then
15735                     if test -d "$additional_includedir"; then
15736                                             INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15737                     fi
15738                   fi
15739                 fi
15740               fi
15741             fi
15742                         if test -n "$found_la"; then
15743                                                         save_libdir="$libdir"
15744               case "$found_la" in
15745                 */* | *\\*) . "$found_la" ;;
15746                 *) . "./$found_la" ;;
15747               esac
15748               libdir="$save_libdir"
15749                             for dep in $dependency_libs; do
15750                 case "$dep" in
15751                   -L*)
15752                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15753                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
15754                       haveit=
15755                       if test "X$additional_libdir" = "X/usr/local/lib"; then
15756                         if test -n "$GCC"; then
15757                           case $host_os in
15758                             linux*) haveit=yes;;
15759                           esac
15760                         fi
15761                       fi
15762                       if test -z "$haveit"; then
15763                         haveit=
15764                         for x in $LDFLAGS $LIBLZMA; do
15765
15766   acl_save_prefix="$prefix"
15767   prefix="$acl_final_prefix"
15768   acl_save_exec_prefix="$exec_prefix"
15769   exec_prefix="$acl_final_exec_prefix"
15770   eval x=\"$x\"
15771   exec_prefix="$acl_save_exec_prefix"
15772   prefix="$acl_save_prefix"
15773
15774                           if test "X$x" = "X-L$additional_libdir"; then
15775                             haveit=yes
15776                             break
15777                           fi
15778                         done
15779                         if test -z "$haveit"; then
15780                           if test -d "$additional_libdir"; then
15781                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
15782                           fi
15783                         fi
15784                         haveit=
15785                         for x in $LDFLAGS $LTLIBLZMA; do
15786
15787   acl_save_prefix="$prefix"
15788   prefix="$acl_final_prefix"
15789   acl_save_exec_prefix="$exec_prefix"
15790   exec_prefix="$acl_final_exec_prefix"
15791   eval x=\"$x\"
15792   exec_prefix="$acl_save_exec_prefix"
15793   prefix="$acl_save_prefix"
15794
15795                           if test "X$x" = "X-L$additional_libdir"; then
15796                             haveit=yes
15797                             break
15798                           fi
15799                         done
15800                         if test -z "$haveit"; then
15801                           if test -d "$additional_libdir"; then
15802                                                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
15803                           fi
15804                         fi
15805                       fi
15806                     fi
15807                     ;;
15808                   -R*)
15809                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
15810                     if test "$enable_rpath" != no; then
15811                                                                   haveit=
15812                       for x in $rpathdirs; do
15813                         if test "X$x" = "X$dir"; then
15814                           haveit=yes
15815                           break
15816                         fi
15817                       done
15818                       if test -z "$haveit"; then
15819                         rpathdirs="$rpathdirs $dir"
15820                       fi
15821                                                                   haveit=
15822                       for x in $ltrpathdirs; do
15823                         if test "X$x" = "X$dir"; then
15824                           haveit=yes
15825                           break
15826                         fi
15827                       done
15828                       if test -z "$haveit"; then
15829                         ltrpathdirs="$ltrpathdirs $dir"
15830                       fi
15831                     fi
15832                     ;;
15833                   -l*)
15834                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15835                     ;;
15836                   *.la)
15837                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15838                     ;;
15839                   *)
15840                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
15841                     LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
15842                     ;;
15843                 esac
15844               done
15845             fi
15846           else
15847                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15848             LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
15849           fi
15850         fi
15851       fi
15852     done
15853   done
15854   if test "X$rpathdirs" != "X"; then
15855     if test -n "$hardcode_libdir_separator"; then
15856                         alldirs=
15857       for found_dir in $rpathdirs; do
15858         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15859       done
15860             acl_save_libdir="$libdir"
15861       libdir="$alldirs"
15862       eval flag=\"$hardcode_libdir_flag_spec\"
15863       libdir="$acl_save_libdir"
15864       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15865     else
15866             for found_dir in $rpathdirs; do
15867         acl_save_libdir="$libdir"
15868         libdir="$found_dir"
15869         eval flag=\"$hardcode_libdir_flag_spec\"
15870         libdir="$acl_save_libdir"
15871         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15872       done
15873     fi
15874   fi
15875   if test "X$ltrpathdirs" != "X"; then
15876             for found_dir in $ltrpathdirs; do
15877       LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15878     done
15879   fi
15880
15881
15882         ac_save_CPPFLAGS="$CPPFLAGS"
15883
15884   for element in $INCLZMA; do
15885     haveit=
15886     for x in $CPPFLAGS; do
15887
15888   acl_save_prefix="$prefix"
15889   prefix="$acl_final_prefix"
15890   acl_save_exec_prefix="$exec_prefix"
15891   exec_prefix="$acl_final_exec_prefix"
15892   eval x=\"$x\"
15893   exec_prefix="$acl_save_exec_prefix"
15894   prefix="$acl_save_prefix"
15895
15896       if test "X$x" = "X$element"; then
15897         haveit=yes
15898         break
15899       fi
15900     done
15901     if test -z "$haveit"; then
15902       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15903     fi
15904   done
15905
15906
15907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15908 $as_echo_n "checking for liblzma... " >&6; }
15909 if test "${ac_cv_liblzma+set}" = set; then :
15910   $as_echo_n "(cached) " >&6
15911 else
15912
15913     ac_save_LIBS="$LIBS"
15914     LIBS="$LIBS $LIBLZMA"
15915     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15916 /* end confdefs.h.  */
15917 #include "lzma.h"
15918 int
15919 main ()
15920 {
15921 lzma_index_iter iter;
15922                            lzma_index_iter_init (&iter, 0);
15923                            lzma_mf_is_supported (LZMA_MF_HC3);
15924   ;
15925   return 0;
15926 }
15927 _ACEOF
15928 if ac_fn_c_try_link "$LINENO"; then :
15929   ac_cv_liblzma=yes
15930 else
15931   ac_cv_liblzma=no
15932 fi
15933 rm -f core conftest.err conftest.$ac_objext \
15934     conftest$ac_exeext conftest.$ac_ext
15935     LIBS="$ac_save_LIBS"
15936
15937 fi
15938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15939 $as_echo "$ac_cv_liblzma" >&6; }
15940   if test "$ac_cv_liblzma" = yes; then
15941     HAVE_LIBLZMA=yes
15942
15943 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15944
15945     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15946 $as_echo_n "checking how to link with liblzma... " >&6; }
15947     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15948 $as_echo "$LIBLZMA" >&6; }
15949   else
15950     HAVE_LIBLZMA=no
15951             CPPFLAGS="$ac_save_CPPFLAGS"
15952     LIBLZMA=
15953     LTLIBLZMA=
15954   fi
15955
15956
15957
15958
15959
15960
15961     if test "$HAVE_LIBLZMA" != yes; then
15962       if test "$with_lzma" = yes; then
15963         as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15964       fi
15965     fi
15966   fi
15967 fi
15968
15969 LIBGUI="../libgui/src/libgui.a"
15970 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15971
15972
15973
15974 WIN32LDAPP=
15975
15976
15977
15978 case "${host}" in
15979 *-*-cygwin* | *-*-mingw* )
15980     configdir="win"
15981     ;;
15982 *)
15983     configdir="unix"
15984     ;;
15985 esac
15986
15987 GDBTKLIBS=
15988 if test "${enable_gdbtk}" = "yes"; then
15989
15990     # Gdbtk must have an absolute path to srcdir in order to run
15991     # properly when not installed.
15992     here=`pwd`
15993     cd ${srcdir}
15994     GDBTK_SRC_DIR=`pwd`
15995     cd $here
15996
15997
15998     #
15999     # Ok, lets find the tcl configuration
16000     # First, look for one uninstalled.
16001     # the alternative search directory is invoked by --with-tcl
16002     #
16003
16004     if test x"${no_tcl}" = x ; then
16005         # we reset no_tcl in case something fails here
16006         no_tcl=true
16007
16008 # Check whether --with-tcl was given.
16009 if test "${with_tcl+set}" = set; then :
16010   withval=$with_tcl; with_tclconfig=${withval}
16011 fi
16012
16013         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16014 $as_echo_n "checking for Tcl configuration... " >&6; }
16015         if test "${ac_cv_c_tclconfig+set}" = set; then :
16016   $as_echo_n "(cached) " >&6
16017 else
16018
16019
16020             # First check to see if --with-tcl was specified.
16021             case "${host}" in
16022                 *-*-cygwin*) platDir="win" ;;
16023                 *) platDir="unix" ;;
16024             esac
16025             if test x"${with_tclconfig}" != x ; then
16026                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16027                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16028                 else
16029                     as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
16030                 fi
16031             fi
16032
16033             # then check for a private Tcl installation
16034             if test x"${ac_cv_c_tclconfig}" = x ; then
16035                 for i in \
16036                         ../tcl \
16037                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16038                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16039                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16040                         ../../tcl \
16041                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16042                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16043                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16044                         ../../../tcl \
16045                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16046                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16047                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16048                     if test -f "$i/$platDir/tclConfig.sh" ; then
16049                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16050                         break
16051                     fi
16052                 done
16053             fi
16054
16055             # on Darwin, check in Framework installation locations
16056             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16057                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16058                         `ls -d /Library/Frameworks 2>/dev/null` \
16059                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16060                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16061                         ; do
16062                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16063                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16064                         break
16065                     fi
16066                 done
16067             fi
16068
16069             # check in a few common install locations
16070             if test x"${ac_cv_c_tclconfig}" = x ; then
16071                 for i in `ls -d ${libdir} 2>/dev/null` \
16072                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16073                         `ls -d ${prefix}/lib 2>/dev/null` \
16074                         `ls -d /usr/local/lib 2>/dev/null` \
16075                         `ls -d /usr/contrib/lib 2>/dev/null` \
16076                         `ls -d /usr/lib 2>/dev/null` \
16077                         ; do
16078                     if test -f "$i/tclConfig.sh" ; then
16079                         ac_cv_c_tclconfig=`(cd $i; pwd)`
16080                         break
16081                     fi
16082                 done
16083             fi
16084
16085             # check in a few other private locations
16086             if test x"${ac_cv_c_tclconfig}" = x ; then
16087                 for i in \
16088                         ${srcdir}/../tcl \
16089                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16090                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16091                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16092                     if test -f "$i/$platDir/tclConfig.sh" ; then
16093                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16094                     break
16095                 fi
16096                 done
16097             fi
16098
16099 fi
16100
16101
16102         if test x"${ac_cv_c_tclconfig}" = x ; then
16103             TCL_BIN_DIR="# no Tcl configs found"
16104             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16105 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
16106         else
16107             no_tcl=
16108             TCL_BIN_DIR=${ac_cv_c_tclconfig}
16109             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16110 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16111         fi
16112     fi
16113
16114
16115     # If $no_tk is nonempty, then we can't do Tk, and there is no
16116     # point to doing Tcl.
16117
16118     #
16119     # Ok, lets find the tk configuration
16120     # First, look for one uninstalled.
16121     # the alternative search directory is invoked by --with-tk
16122     #
16123
16124     if test x"${no_tk}" = x ; then
16125         # we reset no_tk in case something fails here
16126         no_tk=true
16127
16128 # Check whether --with-tk was given.
16129 if test "${with_tk+set}" = set; then :
16130   withval=$with_tk; with_tkconfig=${withval}
16131 fi
16132
16133         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16134 $as_echo_n "checking for Tk configuration... " >&6; }
16135         if test "${ac_cv_c_tkconfig+set}" = set; then :
16136   $as_echo_n "(cached) " >&6
16137 else
16138
16139
16140             # First check to see if --with-tkconfig was specified.
16141             if test x"${with_tkconfig}" != x ; then
16142                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16143                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16144                 else
16145                     as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
16146                 fi
16147             fi
16148
16149             # then check for a private Tk library
16150             case "${host}" in
16151                 *-*-cygwin*) platDir="win" ;;
16152                 *) platDir="unix" ;;
16153             esac
16154             if test x"${ac_cv_c_tkconfig}" = x ; then
16155                 for i in \
16156                         ../tk \
16157                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16158                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16159                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16160                         ../../tk \
16161                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16162                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16163                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16164                         ../../../tk \
16165                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16166                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16167                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16168                     if test -f "$i/$platDir/tkConfig.sh" ; then
16169                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16170                         break
16171                     fi
16172                 done
16173             fi
16174
16175             # on Darwin, check in Framework installation locations
16176             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16177                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16178                         `ls -d /Library/Frameworks 2>/dev/null` \
16179                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16180                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16181                         ; do
16182                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
16183                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16184                         break
16185                     fi
16186                 done
16187             fi
16188
16189             # check in a few common install locations
16190             if test x"${ac_cv_c_tkconfig}" = x ; then
16191                 for i in `ls -d ${libdir} 2>/dev/null` \
16192                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16193                         `ls -d ${prefix}/lib 2>/dev/null` \
16194                         `ls -d /usr/local/lib 2>/dev/null` \
16195                         `ls -d /usr/contrib/lib 2>/dev/null` \
16196                         `ls -d /usr/lib 2>/dev/null` \
16197                         ; do
16198                     if test -f "$i/tkConfig.sh" ; then
16199                         ac_cv_c_tkconfig=`(cd $i; pwd)`
16200                         break
16201                     fi
16202                 done
16203             fi
16204             # check in a few other private locations
16205             if test x"${ac_cv_c_tkconfig}" = x ; then
16206                 for i in \
16207                         ${srcdir}/../tk \
16208                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16209                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16210                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16211                     if test -f "$i/$platDir/tkConfig.sh" ; then
16212                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16213                         break
16214                     fi
16215                 done
16216             fi
16217
16218 fi
16219
16220
16221         if test x"${ac_cv_c_tkconfig}" = x ; then
16222             TK_BIN_DIR="# no Tk configs found"
16223             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16224 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
16225         else
16226             no_tk=
16227             TK_BIN_DIR=${ac_cv_c_tkconfig}
16228             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16229 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16230         fi
16231     fi
16232
16233
16234     if test -z "${no_tcl}" -a -z "${no_tk}"; then
16235
16236     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16237 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
16238
16239     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
16240         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16241 $as_echo "loading" >&6; }
16242         . ${TCL_BIN_DIR}/tclConfig.sh
16243     else
16244         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16245 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16246     fi
16247
16248     # eval is required to do the TCL_DBGX substitution
16249     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16250     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16251
16252     # If the TCL_BIN_DIR is the build directory (not the install directory),
16253     # then set the common variable name to the value of the build variables.
16254     # For example, the variable TCL_LIB_SPEC will be set to the value
16255     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16256     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16257     # installed and uninstalled version of Tcl.
16258     if test -f "${TCL_BIN_DIR}/Makefile" ; then
16259         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16260         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16261         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16262     elif test "`uname -s`" = "Darwin"; then
16263         # If Tcl was built as a framework, attempt to use the libraries
16264         # from the framework at the given location so that linking works
16265         # against Tcl.framework installed in an arbitrary location.
16266         case ${TCL_DEFS} in
16267             *TCL_FRAMEWORK*)
16268                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16269                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16270                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16271                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16272                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16273                             break
16274                         fi
16275                     done
16276                 fi
16277                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16278                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16279                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16280                 fi
16281                 ;;
16282         esac
16283     fi
16284
16285     # eval is required to do the TCL_DBGX substitution
16286     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16287     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16288     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16289     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305         # Check for in-tree tcl
16306         here=`pwd`
16307         cd ${srcdir}/..
16308         topdir=`pwd`
16309         cd ${here}
16310
16311         intree="no"
16312         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16313           intree="yes"
16314         fi
16315
16316         # Find Tcl private headers
16317         if test x"${intree}" = xno; then
16318
16319   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16320 $as_echo_n "checking for Tcl private headers... " >&6; }
16321   private_dir=""
16322   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16323   if test -f ${dir}/tclInt.h ; then
16324     private_dir=${dir}
16325   fi
16326
16327   if test x"${private_dir}" = x; then
16328     as_fn_error "could not find private Tcl headers" "$LINENO" 5
16329   else
16330     TCL_PRIVATE_INCLUDE="-I${private_dir}"
16331     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16332 $as_echo "${private_dir}" >&6; }
16333   fi
16334
16335           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16336           TCL_LIBRARY="${TCL_LIB_SPEC}"
16337           TCL_DEPS=""
16338         else
16339           # If building tcl in the same src tree, private headers
16340           # are not needed, but we need to be sure to use the right
16341           # headers library
16342           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16343           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16344           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16345         fi
16346
16347
16348
16349
16350
16351     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16352 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
16353
16354     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
16355         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16356 $as_echo "loading" >&6; }
16357         . ${TK_BIN_DIR}/tkConfig.sh
16358     else
16359         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16360 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16361     fi
16362
16363     # eval is required to do the TK_DBGX substitution
16364     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16365     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16366
16367     # If the TK_BIN_DIR is the build directory (not the install directory),
16368     # then set the common variable name to the value of the build variables.
16369     # For example, the variable TK_LIB_SPEC will be set to the value
16370     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16371     # instead of TK_BUILD_LIB_SPEC since it will work with both an
16372     # installed and uninstalled version of Tcl.
16373     if test -f "${TK_BIN_DIR}/Makefile" ; then
16374         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16375         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16376         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16377     elif test "`uname -s`" = "Darwin"; then
16378         # If Tk was built as a framework, attempt to use the libraries
16379         # from the framework at the given location so that linking works
16380         # against Tk.framework installed in an arbitrary location.
16381         case ${TK_DEFS} in
16382             *TK_FRAMEWORK*)
16383                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
16384                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
16385                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16386                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16387                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16388                             break
16389                         fi
16390                     done
16391                 fi
16392                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
16393                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16394                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16395                 fi
16396                 ;;
16397         esac
16398     fi
16399
16400     # eval is required to do the TK_DBGX substitution
16401     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16402     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16403     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16404     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419         # Check for in-tree Tk
16420         intree="no"
16421         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16422           intree="yes"
16423         fi
16424
16425         # Find Tk private headers
16426         if test x"${intree}" = xno; then
16427
16428   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16429 $as_echo_n "checking for Tk private headers... " >&6; }
16430   private_dir=""
16431   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16432   if test -f ${dir}/tkInt.h; then
16433     private_dir=${dir}
16434   fi
16435
16436   if test x"${private_dir}" = x; then
16437     as_fn_error "could not find Tk private headers" "$LINENO" 5
16438   else
16439     TK_PRIVATE_INCLUDE="-I${private_dir}"
16440     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16441 $as_echo "${private_dir}" >&6; }
16442   fi
16443
16444           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16445           TK_LIBRARY=${TK_LIB_SPEC}
16446           TK_DEPS=""
16447         else
16448           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16449           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16450           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16451         fi
16452
16453
16454
16455
16456
16457         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
16458
16459         # Include some libraries that Tcl and Tk want.
16460         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16461         # Yes, the ordering seems wrong here.  But it isn't.
16462         # TK_LIBS is the list of libraries that need to be linked
16463         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
16464         # were in LIBS then any link tests after this point would
16465         # try to include things like `$(LIBGUI)', which wouldn't work.
16466         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
16467
16468         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16469         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16470         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16471         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16472         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16473         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16474         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
16475
16476         if test x$gdb_cv_os_cygwin = xyes; then
16477           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16478           WIN32LDAPP="-Wl,--subsystem,console"
16479           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
16480         fi
16481
16482         subdirs="$subdirs gdbtk"
16483
16484     fi
16485 fi
16486
16487
16488
16489
16490
16491
16492
16493
16494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16495 $as_echo_n "checking for X... " >&6; }
16496
16497
16498 # Check whether --with-x was given.
16499 if test "${with_x+set}" = set; then :
16500   withval=$with_x;
16501 fi
16502
16503 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16504 if test "x$with_x" = xno; then
16505   # The user explicitly disabled X.
16506   have_x=disabled
16507 else
16508   case $x_includes,$x_libraries in #(
16509     *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
16510     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
16511   $as_echo_n "(cached) " >&6
16512 else
16513   # One or both of the vars are not set, and there is no cached value.
16514 ac_x_includes=no ac_x_libraries=no
16515 rm -f -r conftest.dir
16516 if mkdir conftest.dir; then
16517   cd conftest.dir
16518   cat >Imakefile <<'_ACEOF'
16519 incroot:
16520         @echo incroot='${INCROOT}'
16521 usrlibdir:
16522         @echo usrlibdir='${USRLIBDIR}'
16523 libdir:
16524         @echo libdir='${LIBDIR}'
16525 _ACEOF
16526   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
16527     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
16528     for ac_var in incroot usrlibdir libdir; do
16529       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16530     done
16531     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
16532     for ac_extension in a so sl dylib la dll; do
16533       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16534          test -f "$ac_im_libdir/libX11.$ac_extension"; then
16535         ac_im_usrlibdir=$ac_im_libdir; break
16536       fi
16537     done
16538     # Screen out bogus values from the imake configuration.  They are
16539     # bogus both because they are the default anyway, and because
16540     # using them would break gcc on systems where it needs fixed includes.
16541     case $ac_im_incroot in
16542         /usr/include) ac_x_includes= ;;
16543         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
16544     esac
16545     case $ac_im_usrlibdir in
16546         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
16547         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
16548     esac
16549   fi
16550   cd ..
16551   rm -f -r conftest.dir
16552 fi
16553
16554 # Standard set of common directories for X headers.
16555 # Check X11 before X11Rn because it is often a symlink to the current release.
16556 ac_x_header_dirs='
16557 /usr/X11/include
16558 /usr/X11R7/include
16559 /usr/X11R6/include
16560 /usr/X11R5/include
16561 /usr/X11R4/include
16562
16563 /usr/include/X11
16564 /usr/include/X11R7
16565 /usr/include/X11R6
16566 /usr/include/X11R5
16567 /usr/include/X11R4
16568
16569 /usr/local/X11/include
16570 /usr/local/X11R7/include
16571 /usr/local/X11R6/include
16572 /usr/local/X11R5/include
16573 /usr/local/X11R4/include
16574
16575 /usr/local/include/X11
16576 /usr/local/include/X11R7
16577 /usr/local/include/X11R6
16578 /usr/local/include/X11R5
16579 /usr/local/include/X11R4
16580
16581 /usr/X386/include
16582 /usr/x386/include
16583 /usr/XFree86/include/X11
16584
16585 /usr/include
16586 /usr/local/include
16587 /usr/unsupported/include
16588 /usr/athena/include
16589 /usr/local/x11r5/include
16590 /usr/lpp/Xamples/include
16591
16592 /usr/openwin/include
16593 /usr/openwin/share/include'
16594
16595 if test "$ac_x_includes" = no; then
16596   # Guess where to find include files, by looking for Xlib.h.
16597   # First, try using that file with no special directory specified.
16598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16599 /* end confdefs.h.  */
16600 #include <X11/Xlib.h>
16601 _ACEOF
16602 if ac_fn_c_try_cpp "$LINENO"; then :
16603   # We can compile using X headers with no special include directory.
16604 ac_x_includes=
16605 else
16606   for ac_dir in $ac_x_header_dirs; do
16607   if test -r "$ac_dir/X11/Xlib.h"; then
16608     ac_x_includes=$ac_dir
16609     break
16610   fi
16611 done
16612 fi
16613 rm -f conftest.err conftest.$ac_ext
16614 fi # $ac_x_includes = no
16615
16616 if test "$ac_x_libraries" = no; then
16617   # Check for the libraries.
16618   # See if we find them without any special options.
16619   # Don't add to $LIBS permanently.
16620   ac_save_LIBS=$LIBS
16621   LIBS="-lX11 $LIBS"
16622   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16623 /* end confdefs.h.  */
16624 #include <X11/Xlib.h>
16625 int
16626 main ()
16627 {
16628 XrmInitialize ()
16629   ;
16630   return 0;
16631 }
16632 _ACEOF
16633 if ac_fn_c_try_link "$LINENO"; then :
16634   LIBS=$ac_save_LIBS
16635 # We can link X programs with no special library path.
16636 ac_x_libraries=
16637 else
16638   LIBS=$ac_save_LIBS
16639 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
16640 do
16641   # Don't even attempt the hair of trying to link an X program!
16642   for ac_extension in a so sl dylib la dll; do
16643     if test -r "$ac_dir/libX11.$ac_extension"; then
16644       ac_x_libraries=$ac_dir
16645       break 2
16646     fi
16647   done
16648 done
16649 fi
16650 rm -f core conftest.err conftest.$ac_objext \
16651     conftest$ac_exeext conftest.$ac_ext
16652 fi # $ac_x_libraries = no
16653
16654 case $ac_x_includes,$ac_x_libraries in #(
16655   no,* | *,no | *\'*)
16656     # Didn't find X, or a directory has "'" in its name.
16657     ac_cv_have_x="have_x=no";; #(
16658   *)
16659     # Record where we found X for the cache.
16660     ac_cv_have_x="have_x=yes\
16661         ac_x_includes='$ac_x_includes'\
16662         ac_x_libraries='$ac_x_libraries'"
16663 esac
16664 fi
16665 ;; #(
16666     *) have_x=yes;;
16667   esac
16668   eval "$ac_cv_have_x"
16669 fi # $with_x != no
16670
16671 if test "$have_x" != yes; then
16672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16673 $as_echo "$have_x" >&6; }
16674   no_x=yes
16675 else
16676   # If each of the values was on the command line, it overrides each guess.
16677   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16678   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16679   # Update the cache value to reflect the command line values.
16680   ac_cv_have_x="have_x=yes\
16681         ac_x_includes='$x_includes'\
16682         ac_x_libraries='$x_libraries'"
16683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16684 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
16685 fi
16686
16687
16688 # Unlike the sim directory, whether a simulator is linked is controlled by
16689 # presence of a gdb_sim definition in the target configure.tgt entry.
16690 # This code just checks for a few cases where we'd like to ignore those
16691 # definitions, even when they're present in the '.mt' file.  These cases
16692 # are when --disable-sim is specified, or if the simulator directory is
16693 # not part of the source tree.
16694 #
16695 # Check whether --enable-sim was given.
16696 if test "${enable_sim+set}" = set; then :
16697   enableval=$enable_sim; echo "enable_sim = $enable_sim";
16698  echo "enableval = ${enableval}";
16699  case "${enableval}" in
16700   yes) ignore_sim=false ;;
16701   no)  ignore_sim=true ;;
16702   *)   ignore_sim=false ;;
16703  esac
16704 else
16705   ignore_sim=false
16706 fi
16707
16708
16709 if test ! -d "${srcdir}/../sim"; then
16710   ignore_sim=true
16711 fi
16712
16713 SIM=
16714 SIM_OBS=
16715 if test "${ignore_sim}" = "false"; then
16716   if test x"${gdb_sim}" != x ; then
16717     SIM="${gdb_sim}"
16718     SIM_OBS="remote-sim.o"
16719
16720 $as_echo "#define WITH_SIM 1" >>confdefs.h
16721
16722
16723     # Some tdep code should only be compiled in when the ppc sim is
16724     # built.  PR sim/13418.
16725     case $target in
16726       powerpc*-*-*)
16727
16728 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16729
16730         ;;
16731     esac
16732   fi
16733 fi
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748 # List of host floatformats.
16749
16750 cat >>confdefs.h <<_ACEOF
16751 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
16752 _ACEOF
16753
16754
16755 cat >>confdefs.h <<_ACEOF
16756 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
16757 _ACEOF
16758
16759
16760 cat >>confdefs.h <<_ACEOF
16761 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
16762 _ACEOF
16763
16764
16765 # target_subdir is used by the testsuite to find the target libraries.
16766 target_subdir=
16767 if test "${host}" != "${target}"; then
16768     target_subdir="${target_alias}/"
16769 fi
16770
16771
16772 # Import nat definitions.
16773 nat_makefile_frag=/dev/null
16774 if test "${gdb_native}" = "yes"; then
16775   . ${srcdir}/configure.nat
16776   nativefile=$NAT_FILE
16777 fi
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789 if test x"${gdb_osabi}" != x ; then
16790
16791 cat >>confdefs.h <<_ACEOF
16792 #define GDB_OSABI_DEFAULT $gdb_osabi
16793 _ACEOF
16794
16795 fi
16796
16797 # Enable multi-ice-gdb-server.
16798 # Check whether --enable-multi-ice was given.
16799 if test "${enable_multi_ice+set}" = set; then :
16800   enableval=$enable_multi_ice; case $enableval in
16801     yes | no)
16802       ;;
16803     *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
16804   esac
16805 fi
16806
16807 if test "x$enable_multi_ice" = xyes; then
16808    subdirs="$subdirs multi-ice"
16809
16810 fi
16811
16812 # Check whether --enable-gdbserver was given.
16813 if test "${enable_gdbserver+set}" = set; then :
16814   enableval=$enable_gdbserver; case "${enableval}" in
16815   yes| no|auto) ;;
16816   *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16817 esac
16818 else
16819   enable_gdbserver=auto
16820 fi
16821
16822
16823 # We only build gdbserver automatically in a native configuration, and
16824 # only if the user did not explicitly disable its build.
16825 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
16826   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16827 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
16828   if test "x$build_gdbserver" = xyes; then
16829     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16830 $as_echo "yes" >&6; }
16831     subdirs="$subdirs gdbserver"
16832
16833     gdbserver_build_enabled=yes
16834   else
16835     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16836 $as_echo "no" >&6; }
16837   fi
16838 fi
16839
16840 # If the user explicitly request the gdbserver to be built, verify that
16841 # we were in fact able to enable it.
16842 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16843   as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16844 fi
16845
16846 # Check for babeltrace and babeltrace-ctf
16847
16848 # Check whether --with-babeltrace was given.
16849 if test "${with_babeltrace+set}" = set; then :
16850   withval=$with_babeltrace;
16851 else
16852   with_babeltrace=auto
16853 fi
16854
16855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
16856 $as_echo_n "checking whether to use babeltrace... " >&6; }
16857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
16858 $as_echo "$with_babeltrace" >&6; }
16859
16860 if test "x$with_babeltrace" = "xno"; then
16861   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
16862 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
16863 else
16864   # Append -Werror to CFLAGS so that configure can catch the warning
16865   # "assignment from incompatible pointer type", which is related to
16866   # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
16867   # in GDB, while babeltrace 1.0.3 is broken.
16868   # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16869   # safe to save and restore CFLAGS here.
16870   saved_CFLAGS=$CFLAGS
16871   CFLAGS="$CFLAGS -Werror"
16872
16873
16874
16875
16876
16877
16878
16879
16880     use_additional=yes
16881
16882   acl_save_prefix="$prefix"
16883   prefix="$acl_final_prefix"
16884   acl_save_exec_prefix="$exec_prefix"
16885   exec_prefix="$acl_final_exec_prefix"
16886
16887     eval additional_includedir=\"$includedir\"
16888     eval additional_libdir=\"$libdir\"
16889
16890   exec_prefix="$acl_save_exec_prefix"
16891   prefix="$acl_save_prefix"
16892
16893
16894 # Check whether --with-libbabeltrace-prefix was given.
16895 if test "${with_libbabeltrace_prefix+set}" = set; then :
16896   withval=$with_libbabeltrace_prefix;
16897     if test "X$withval" = "Xno"; then
16898       use_additional=no
16899     else
16900       if test "X$withval" = "X"; then
16901
16902   acl_save_prefix="$prefix"
16903   prefix="$acl_final_prefix"
16904   acl_save_exec_prefix="$exec_prefix"
16905   exec_prefix="$acl_final_exec_prefix"
16906
16907           eval additional_includedir=\"$includedir\"
16908           eval additional_libdir=\"$libdir\"
16909
16910   exec_prefix="$acl_save_exec_prefix"
16911   prefix="$acl_save_prefix"
16912
16913       else
16914         additional_includedir="$withval/include"
16915         additional_libdir="$withval/lib"
16916       fi
16917     fi
16918
16919 fi
16920
16921       LIBBABELTRACE=
16922   LTLIBBABELTRACE=
16923   INCBABELTRACE=
16924   rpathdirs=
16925   ltrpathdirs=
16926   names_already_handled=
16927   names_next_round='babeltrace babeltrace-ctf'
16928   while test -n "$names_next_round"; do
16929     names_this_round="$names_next_round"
16930     names_next_round=
16931     for name in $names_this_round; do
16932       already_handled=
16933       for n in $names_already_handled; do
16934         if test "$n" = "$name"; then
16935           already_handled=yes
16936           break
16937         fi
16938       done
16939       if test -z "$already_handled"; then
16940         names_already_handled="$names_already_handled $name"
16941                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16942         eval value=\"\$HAVE_LIB$uppername\"
16943         if test -n "$value"; then
16944           if test "$value" = yes; then
16945             eval value=\"\$LIB$uppername\"
16946             test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16947             eval value=\"\$LTLIB$uppername\"
16948             test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16949           else
16950                                     :
16951           fi
16952         else
16953                               found_dir=
16954           found_la=
16955           found_so=
16956           found_a=
16957           if test $use_additional = yes; then
16958             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16959               found_dir="$additional_libdir"
16960               found_so="$additional_libdir/lib$name.$shlibext"
16961               if test -f "$additional_libdir/lib$name.la"; then
16962                 found_la="$additional_libdir/lib$name.la"
16963               fi
16964             else
16965               if test -f "$additional_libdir/lib$name.$libext"; then
16966                 found_dir="$additional_libdir"
16967                 found_a="$additional_libdir/lib$name.$libext"
16968                 if test -f "$additional_libdir/lib$name.la"; then
16969                   found_la="$additional_libdir/lib$name.la"
16970                 fi
16971               fi
16972             fi
16973           fi
16974           if test "X$found_dir" = "X"; then
16975             for x in $LDFLAGS $LTLIBBABELTRACE; do
16976
16977   acl_save_prefix="$prefix"
16978   prefix="$acl_final_prefix"
16979   acl_save_exec_prefix="$exec_prefix"
16980   exec_prefix="$acl_final_exec_prefix"
16981   eval x=\"$x\"
16982   exec_prefix="$acl_save_exec_prefix"
16983   prefix="$acl_save_prefix"
16984
16985               case "$x" in
16986                 -L*)
16987                   dir=`echo "X$x" | sed -e 's/^X-L//'`
16988                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16989                     found_dir="$dir"
16990                     found_so="$dir/lib$name.$shlibext"
16991                     if test -f "$dir/lib$name.la"; then
16992                       found_la="$dir/lib$name.la"
16993                     fi
16994                   else
16995                     if test -f "$dir/lib$name.$libext"; then
16996                       found_dir="$dir"
16997                       found_a="$dir/lib$name.$libext"
16998                       if test -f "$dir/lib$name.la"; then
16999                         found_la="$dir/lib$name.la"
17000                       fi
17001                     fi
17002                   fi
17003                   ;;
17004               esac
17005               if test "X$found_dir" != "X"; then
17006                 break
17007               fi
17008             done
17009           fi
17010           if test "X$found_dir" != "X"; then
17011                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17012             if test "X$found_so" != "X"; then
17013                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17014                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17015               else
17016                                                                                 haveit=
17017                 for x in $ltrpathdirs; do
17018                   if test "X$x" = "X$found_dir"; then
17019                     haveit=yes
17020                     break
17021                   fi
17022                 done
17023                 if test -z "$haveit"; then
17024                   ltrpathdirs="$ltrpathdirs $found_dir"
17025                 fi
17026                                 if test "$hardcode_direct" = yes; then
17027                                                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17028                 else
17029                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17030                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17031                                                             haveit=
17032                     for x in $rpathdirs; do
17033                       if test "X$x" = "X$found_dir"; then
17034                         haveit=yes
17035                         break
17036                       fi
17037                     done
17038                     if test -z "$haveit"; then
17039                       rpathdirs="$rpathdirs $found_dir"
17040                     fi
17041                   else
17042                                                                                 haveit=
17043                     for x in $LDFLAGS $LIBBABELTRACE; do
17044
17045   acl_save_prefix="$prefix"
17046   prefix="$acl_final_prefix"
17047   acl_save_exec_prefix="$exec_prefix"
17048   exec_prefix="$acl_final_exec_prefix"
17049   eval x=\"$x\"
17050   exec_prefix="$acl_save_exec_prefix"
17051   prefix="$acl_save_prefix"
17052
17053                       if test "X$x" = "X-L$found_dir"; then
17054                         haveit=yes
17055                         break
17056                       fi
17057                     done
17058                     if test -z "$haveit"; then
17059                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17060                     fi
17061                     if test "$hardcode_minus_L" != no; then
17062                                                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17063                     else
17064                                                                                                                                                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17065                     fi
17066                   fi
17067                 fi
17068               fi
17069             else
17070               if test "X$found_a" != "X"; then
17071                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17072               else
17073                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17074               fi
17075             fi
17076                         additional_includedir=
17077             case "$found_dir" in
17078               */lib | */lib/)
17079                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17080                 additional_includedir="$basedir/include"
17081                 ;;
17082             esac
17083             if test "X$additional_includedir" != "X"; then
17084                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
17085                 haveit=
17086                 if test "X$additional_includedir" = "X/usr/local/include"; then
17087                   if test -n "$GCC"; then
17088                     case $host_os in
17089                       linux*) haveit=yes;;
17090                     esac
17091                   fi
17092                 fi
17093                 if test -z "$haveit"; then
17094                   for x in $CPPFLAGS $INCBABELTRACE; do
17095
17096   acl_save_prefix="$prefix"
17097   prefix="$acl_final_prefix"
17098   acl_save_exec_prefix="$exec_prefix"
17099   exec_prefix="$acl_final_exec_prefix"
17100   eval x=\"$x\"
17101   exec_prefix="$acl_save_exec_prefix"
17102   prefix="$acl_save_prefix"
17103
17104                     if test "X$x" = "X-I$additional_includedir"; then
17105                       haveit=yes
17106                       break
17107                     fi
17108                   done
17109                   if test -z "$haveit"; then
17110                     if test -d "$additional_includedir"; then
17111                                             INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17112                     fi
17113                   fi
17114                 fi
17115               fi
17116             fi
17117                         if test -n "$found_la"; then
17118                                                         save_libdir="$libdir"
17119               case "$found_la" in
17120                 */* | *\\*) . "$found_la" ;;
17121                 *) . "./$found_la" ;;
17122               esac
17123               libdir="$save_libdir"
17124                             for dep in $dependency_libs; do
17125                 case "$dep" in
17126                   -L*)
17127                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17128                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
17129                       haveit=
17130                       if test "X$additional_libdir" = "X/usr/local/lib"; then
17131                         if test -n "$GCC"; then
17132                           case $host_os in
17133                             linux*) haveit=yes;;
17134                           esac
17135                         fi
17136                       fi
17137                       if test -z "$haveit"; then
17138                         haveit=
17139                         for x in $LDFLAGS $LIBBABELTRACE; do
17140
17141   acl_save_prefix="$prefix"
17142   prefix="$acl_final_prefix"
17143   acl_save_exec_prefix="$exec_prefix"
17144   exec_prefix="$acl_final_exec_prefix"
17145   eval x=\"$x\"
17146   exec_prefix="$acl_save_exec_prefix"
17147   prefix="$acl_save_prefix"
17148
17149                           if test "X$x" = "X-L$additional_libdir"; then
17150                             haveit=yes
17151                             break
17152                           fi
17153                         done
17154                         if test -z "$haveit"; then
17155                           if test -d "$additional_libdir"; then
17156                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17157                           fi
17158                         fi
17159                         haveit=
17160                         for x in $LDFLAGS $LTLIBBABELTRACE; do
17161
17162   acl_save_prefix="$prefix"
17163   prefix="$acl_final_prefix"
17164   acl_save_exec_prefix="$exec_prefix"
17165   exec_prefix="$acl_final_exec_prefix"
17166   eval x=\"$x\"
17167   exec_prefix="$acl_save_exec_prefix"
17168   prefix="$acl_save_prefix"
17169
17170                           if test "X$x" = "X-L$additional_libdir"; then
17171                             haveit=yes
17172                             break
17173                           fi
17174                         done
17175                         if test -z "$haveit"; then
17176                           if test -d "$additional_libdir"; then
17177                                                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17178                           fi
17179                         fi
17180                       fi
17181                     fi
17182                     ;;
17183                   -R*)
17184                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
17185                     if test "$enable_rpath" != no; then
17186                                                                   haveit=
17187                       for x in $rpathdirs; do
17188                         if test "X$x" = "X$dir"; then
17189                           haveit=yes
17190                           break
17191                         fi
17192                       done
17193                       if test -z "$haveit"; then
17194                         rpathdirs="$rpathdirs $dir"
17195                       fi
17196                                                                   haveit=
17197                       for x in $ltrpathdirs; do
17198                         if test "X$x" = "X$dir"; then
17199                           haveit=yes
17200                           break
17201                         fi
17202                       done
17203                       if test -z "$haveit"; then
17204                         ltrpathdirs="$ltrpathdirs $dir"
17205                       fi
17206                     fi
17207                     ;;
17208                   -l*)
17209                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17210                     ;;
17211                   *.la)
17212                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17213                     ;;
17214                   *)
17215                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17216                     LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17217                     ;;
17218                 esac
17219               done
17220             fi
17221           else
17222                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17223             LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17224           fi
17225         fi
17226       fi
17227     done
17228   done
17229   if test "X$rpathdirs" != "X"; then
17230     if test -n "$hardcode_libdir_separator"; then
17231                         alldirs=
17232       for found_dir in $rpathdirs; do
17233         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17234       done
17235             acl_save_libdir="$libdir"
17236       libdir="$alldirs"
17237       eval flag=\"$hardcode_libdir_flag_spec\"
17238       libdir="$acl_save_libdir"
17239       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17240     else
17241             for found_dir in $rpathdirs; do
17242         acl_save_libdir="$libdir"
17243         libdir="$found_dir"
17244         eval flag=\"$hardcode_libdir_flag_spec\"
17245         libdir="$acl_save_libdir"
17246         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17247       done
17248     fi
17249   fi
17250   if test "X$ltrpathdirs" != "X"; then
17251             for found_dir in $ltrpathdirs; do
17252       LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17253     done
17254   fi
17255
17256
17257         ac_save_CPPFLAGS="$CPPFLAGS"
17258
17259   for element in $INCBABELTRACE; do
17260     haveit=
17261     for x in $CPPFLAGS; do
17262
17263   acl_save_prefix="$prefix"
17264   prefix="$acl_final_prefix"
17265   acl_save_exec_prefix="$exec_prefix"
17266   exec_prefix="$acl_final_exec_prefix"
17267   eval x=\"$x\"
17268   exec_prefix="$acl_save_exec_prefix"
17269   prefix="$acl_save_prefix"
17270
17271       if test "X$x" = "X$element"; then
17272         haveit=yes
17273         break
17274       fi
17275     done
17276     if test -z "$haveit"; then
17277       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17278     fi
17279   done
17280
17281
17282   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17283 $as_echo_n "checking for libbabeltrace... " >&6; }
17284 if test "${ac_cv_libbabeltrace+set}" = set; then :
17285   $as_echo_n "(cached) " >&6
17286 else
17287
17288     ac_save_LIBS="$LIBS"
17289     LIBS="$LIBS $LIBBABELTRACE"
17290     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17291 /* end confdefs.h.  */
17292 #include <babeltrace/babeltrace.h>
17293                          #include <babeltrace/ctf/events.h>
17294                          #include <babeltrace/ctf/iterator.h>
17295 int
17296 main ()
17297 {
17298 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17299                         struct bt_ctf_event *event = NULL;
17300                         const struct bt_definition *scope;
17301
17302                         pos->type = BT_SEEK_BEGIN;
17303                         bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
17304                         scope = bt_ctf_get_top_level_scope (event,
17305                                                            BT_STREAM_EVENT_HEADER);
17306                         bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17307
17308   ;
17309   return 0;
17310 }
17311 _ACEOF
17312 if ac_fn_c_try_link "$LINENO"; then :
17313   ac_cv_libbabeltrace=yes
17314 else
17315   ac_cv_libbabeltrace=no
17316 fi
17317 rm -f core conftest.err conftest.$ac_objext \
17318     conftest$ac_exeext conftest.$ac_ext
17319     LIBS="$ac_save_LIBS"
17320
17321 fi
17322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17323 $as_echo "$ac_cv_libbabeltrace" >&6; }
17324   if test "$ac_cv_libbabeltrace" = yes; then
17325     HAVE_LIBBABELTRACE=yes
17326
17327 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17328
17329     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17330 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
17331     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17332 $as_echo "$LIBBABELTRACE" >&6; }
17333   else
17334     HAVE_LIBBABELTRACE=no
17335             CPPFLAGS="$ac_save_CPPFLAGS"
17336     LIBBABELTRACE=
17337     LTLIBBABELTRACE=
17338   fi
17339
17340
17341
17342
17343
17344
17345   CFLAGS=$saved_CFLAGS
17346
17347   if test "$HAVE_LIBBABELTRACE" != yes; then
17348      if test "$with_babeltrace" = yes; then
17349        as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
17350      else
17351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17352 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17353      fi
17354   fi
17355 fi
17356
17357 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17358 # empty version.
17359
17360 files=
17361 links=
17362
17363 rm -f nm.h
17364 if test "${nativefile}" != ""; then
17365     case "${nativefile}" in
17366       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17367       * ) GDB_NM_FILE="${nativefile}"
17368     esac
17369     files="${files} ${GDB_NM_FILE}"
17370     links="${links} nm.h"
17371
17372 cat >>confdefs.h <<_ACEOF
17373 #define GDB_NM_FILE "${GDB_NM_FILE}"
17374 _ACEOF
17375
17376 fi
17377
17378
17379 for ac_prog in xsltproc
17380 do
17381   # Extract the first word of "$ac_prog", so it can be a program name with args.
17382 set dummy $ac_prog; ac_word=$2
17383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17384 $as_echo_n "checking for $ac_word... " >&6; }
17385 if test "${ac_cv_path_XSLTPROC+set}" = set; then :
17386   $as_echo_n "(cached) " >&6
17387 else
17388   case $XSLTPROC in
17389   [\\/]* | ?:[\\/]*)
17390   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17391   ;;
17392   *)
17393   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17394 for as_dir in $PATH
17395 do
17396   IFS=$as_save_IFS
17397   test -z "$as_dir" && as_dir=.
17398     for ac_exec_ext in '' $ac_executable_extensions; do
17399   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17400     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17402     break 2
17403   fi
17404 done
17405   done
17406 IFS=$as_save_IFS
17407
17408   ;;
17409 esac
17410 fi
17411 XSLTPROC=$ac_cv_path_XSLTPROC
17412 if test -n "$XSLTPROC"; then
17413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17414 $as_echo "$XSLTPROC" >&6; }
17415 else
17416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17417 $as_echo "no" >&6; }
17418 fi
17419
17420
17421   test -n "$XSLTPROC" && break
17422 done
17423 test -n "$XSLTPROC" || XSLTPROC="missing"
17424
17425 if test "x$USE_MAINTAINER_MODE" = xyes; then
17426   if test "${XSLTPROC}" = missing; then
17427     as_fn_error "unable to find xsltproc.  maintainer-mode requires xsltproc." "$LINENO" 5
17428   fi
17429 fi
17430
17431
17432 ac_sources="$files"
17433 ac_dests="$links"
17434 while test -n "$ac_sources"; do
17435   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17436   set $ac_sources; ac_source=$1; shift; ac_sources=$*
17437   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17438 done
17439 ac_config_links="$ac_config_links $ac_config_links_1"
17440
17441
17442
17443
17444
17445 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
17446
17447
17448 if $development; then
17449
17450 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17451
17452   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS)"
17453   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS)"
17454 fi
17455
17456
17457   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17458   GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17459   if test "x$GDB_TRANSFORM_NAME" = x; then
17460      GDB_TRANSFORM_NAME=gdb
17461   fi
17462
17463
17464
17465   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17466   GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17467   if test "x$GCORE_TRANSFORM_NAME" = x; then
17468      GCORE_TRANSFORM_NAME=gcore
17469   fi
17470
17471
17472 ac_config_files="$ac_config_files gcore"
17473
17474 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
17475
17476
17477 cat >confcache <<\_ACEOF
17478 # This file is a shell script that caches the results of configure
17479 # tests run on this system so they can be shared between configure
17480 # scripts and configure runs, see configure's option --config-cache.
17481 # It is not useful on other systems.  If it contains results you don't
17482 # want to keep, you may remove or edit it.
17483 #
17484 # config.status only pays attention to the cache file if you give it
17485 # the --recheck option to rerun configure.
17486 #
17487 # `ac_cv_env_foo' variables (set or unset) will be overridden when
17488 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17489 # following values.
17490
17491 _ACEOF
17492
17493 # The following way of writing the cache mishandles newlines in values,
17494 # but we know of no workaround that is simple, portable, and efficient.
17495 # So, we kill variables containing newlines.
17496 # Ultrix sh set writes to stderr and can't be redirected directly,
17497 # and sets the high bit in the cache file unless we assign to the vars.
17498 (
17499   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17500     eval ac_val=\$$ac_var
17501     case $ac_val in #(
17502     *${as_nl}*)
17503       case $ac_var in #(
17504       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17505 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17506       esac
17507       case $ac_var in #(
17508       _ | IFS | as_nl) ;; #(
17509       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17510       *) { eval $ac_var=; unset $ac_var;} ;;
17511       esac ;;
17512     esac
17513   done
17514
17515   (set) 2>&1 |
17516     case $as_nl`(ac_space=' '; set) 2>&1` in #(
17517     *${as_nl}ac_space=\ *)
17518       # `set' does not quote correctly, so add quotes: double-quote
17519       # substitution turns \\\\ into \\, and sed turns \\ into \.
17520       sed -n \
17521         "s/'/'\\\\''/g;
17522           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17523       ;; #(
17524     *)
17525       # `set' quotes correctly as required by POSIX, so do not add quotes.
17526       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
17527       ;;
17528     esac |
17529     sort
17530 ) |
17531   sed '
17532      /^ac_cv_env_/b end
17533      t clear
17534      :clear
17535      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17536      t end
17537      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17538      :end' >>confcache
17539 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17540   if test -w "$cache_file"; then
17541     test "x$cache_file" != "x/dev/null" &&
17542       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17543 $as_echo "$as_me: updating cache $cache_file" >&6;}
17544     cat confcache >$cache_file
17545   else
17546     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17547 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
17548   fi
17549 fi
17550 rm -f confcache
17551
17552 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17553 # Let make expand exec_prefix.
17554 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17555
17556 DEFS=-DHAVE_CONFIG_H
17557
17558 ac_libobjs=
17559 ac_ltlibobjs=
17560 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17561   # 1. Remove the extension, and $U if already installed.
17562   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17563   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17564   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
17565   #    will be set to the directory where LIBOBJS objects are built.
17566   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17567   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
17568 done
17569 LIBOBJS=$ac_libobjs
17570
17571 LTLIBOBJS=$ac_ltlibobjs
17572
17573
17574 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
17575   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
17576 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17577 fi
17578 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17579   as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
17580 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17581 fi
17582 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17583   as_fn_error "conditional \"HAVE_GUILE\" was never defined.
17584 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17585 fi
17586
17587
17588 : ${CONFIG_STATUS=./config.status}
17589 ac_write_fail=0
17590 ac_clean_files_save=$ac_clean_files
17591 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17592 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17593 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17594 as_write_fail=0
17595 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
17596 #! $SHELL
17597 # Generated by $as_me.
17598 # Run this file to recreate the current configuration.
17599 # Compiler output produced by configure, useful for debugging
17600 # configure, is in config.log if it exists.
17601
17602 debug=false
17603 ac_cs_recheck=false
17604 ac_cs_silent=false
17605
17606 SHELL=\${CONFIG_SHELL-$SHELL}
17607 export SHELL
17608 _ASEOF
17609 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17610 ## -------------------- ##
17611 ## M4sh Initialization. ##
17612 ## -------------------- ##
17613
17614 # Be more Bourne compatible
17615 DUALCASE=1; export DUALCASE # for MKS sh
17616 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17617   emulate sh
17618   NULLCMD=:
17619   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
17620   # is contrary to our usage.  Disable this feature.
17621   alias -g '${1+"$@"}'='"$@"'
17622   setopt NO_GLOB_SUBST
17623 else
17624   case `(set -o) 2>/dev/null` in #(
17625   *posix*) :
17626     set -o posix ;; #(
17627   *) :
17628      ;;
17629 esac
17630 fi
17631
17632
17633 as_nl='
17634 '
17635 export as_nl
17636 # Printing a long string crashes Solaris 7 /usr/bin/printf.
17637 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17638 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17639 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17640 # Prefer a ksh shell builtin over an external printf program on Solaris,
17641 # but without wasting forks for bash or zsh.
17642 if test -z "$BASH_VERSION$ZSH_VERSION" \
17643     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17644   as_echo='print -r --'
17645   as_echo_n='print -rn --'
17646 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17647   as_echo='printf %s\n'
17648   as_echo_n='printf %s'
17649 else
17650   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17651     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17652     as_echo_n='/usr/ucb/echo -n'
17653   else
17654     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17655     as_echo_n_body='eval
17656       arg=$1;
17657       case $arg in #(
17658       *"$as_nl"*)
17659         expr "X$arg" : "X\\(.*\\)$as_nl";
17660         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17661       esac;
17662       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17663     '
17664     export as_echo_n_body
17665     as_echo_n='sh -c $as_echo_n_body as_echo'
17666   fi
17667   export as_echo_body
17668   as_echo='sh -c $as_echo_body as_echo'
17669 fi
17670
17671 # The user is always right.
17672 if test "${PATH_SEPARATOR+set}" != set; then
17673   PATH_SEPARATOR=:
17674   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17675     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17676       PATH_SEPARATOR=';'
17677   }
17678 fi
17679
17680
17681 # IFS
17682 # We need space, tab and new line, in precisely that order.  Quoting is
17683 # there to prevent editors from complaining about space-tab.
17684 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
17685 # splitting by setting IFS to empty value.)
17686 IFS=" ""        $as_nl"
17687
17688 # Find who we are.  Look in the path if we contain no directory separator.
17689 case $0 in #((
17690   *[\\/]* ) as_myself=$0 ;;
17691   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17692 for as_dir in $PATH
17693 do
17694   IFS=$as_save_IFS
17695   test -z "$as_dir" && as_dir=.
17696     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17697   done
17698 IFS=$as_save_IFS
17699
17700      ;;
17701 esac
17702 # We did not find ourselves, most probably we were run as `sh COMMAND'
17703 # in which case we are not to be found in the path.
17704 if test "x$as_myself" = x; then
17705   as_myself=$0
17706 fi
17707 if test ! -f "$as_myself"; then
17708   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17709   exit 1
17710 fi
17711
17712 # Unset variables that we do not need and which cause bugs (e.g. in
17713 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
17714 # suppresses any "Segmentation fault" message there.  '((' could
17715 # trigger a bug in pdksh 5.2.14.
17716 for as_var in BASH_ENV ENV MAIL MAILPATH
17717 do eval test x\${$as_var+set} = xset \
17718   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17719 done
17720 PS1='$ '
17721 PS2='> '
17722 PS4='+ '
17723
17724 # NLS nuisances.
17725 LC_ALL=C
17726 export LC_ALL
17727 LANGUAGE=C
17728 export LANGUAGE
17729
17730 # CDPATH.
17731 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17732
17733
17734 # as_fn_error ERROR [LINENO LOG_FD]
17735 # ---------------------------------
17736 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17737 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17738 # script with status $?, using 1 if that was 0.
17739 as_fn_error ()
17740 {
17741   as_status=$?; test $as_status -eq 0 && as_status=1
17742   if test "$3"; then
17743     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17744     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
17745   fi
17746   $as_echo "$as_me: error: $1" >&2
17747   as_fn_exit $as_status
17748 } # as_fn_error
17749
17750
17751 # as_fn_set_status STATUS
17752 # -----------------------
17753 # Set $? to STATUS, without forking.
17754 as_fn_set_status ()
17755 {
17756   return $1
17757 } # as_fn_set_status
17758
17759 # as_fn_exit STATUS
17760 # -----------------
17761 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17762 as_fn_exit ()
17763 {
17764   set +e
17765   as_fn_set_status $1
17766   exit $1
17767 } # as_fn_exit
17768
17769 # as_fn_unset VAR
17770 # ---------------
17771 # Portably unset VAR.
17772 as_fn_unset ()
17773 {
17774   { eval $1=; unset $1;}
17775 }
17776 as_unset=as_fn_unset
17777 # as_fn_append VAR VALUE
17778 # ----------------------
17779 # Append the text in VALUE to the end of the definition contained in VAR. Take
17780 # advantage of any shell optimizations that allow amortized linear growth over
17781 # repeated appends, instead of the typical quadratic growth present in naive
17782 # implementations.
17783 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17784   eval 'as_fn_append ()
17785   {
17786     eval $1+=\$2
17787   }'
17788 else
17789   as_fn_append ()
17790   {
17791     eval $1=\$$1\$2
17792   }
17793 fi # as_fn_append
17794
17795 # as_fn_arith ARG...
17796 # ------------------
17797 # Perform arithmetic evaluation on the ARGs, and store the result in the
17798 # global $as_val. Take advantage of shells that can avoid forks. The arguments
17799 # must be portable across $(()) and expr.
17800 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17801   eval 'as_fn_arith ()
17802   {
17803     as_val=$(( $* ))
17804   }'
17805 else
17806   as_fn_arith ()
17807   {
17808     as_val=`expr "$@" || test $? -eq 1`
17809   }
17810 fi # as_fn_arith
17811
17812
17813 if expr a : '\(a\)' >/dev/null 2>&1 &&
17814    test "X`expr 00001 : '.*\(...\)'`" = X001; then
17815   as_expr=expr
17816 else
17817   as_expr=false
17818 fi
17819
17820 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17821   as_basename=basename
17822 else
17823   as_basename=false
17824 fi
17825
17826 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17827   as_dirname=dirname
17828 else
17829   as_dirname=false
17830 fi
17831
17832 as_me=`$as_basename -- "$0" ||
17833 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17834          X"$0" : 'X\(//\)$' \| \
17835          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17836 $as_echo X/"$0" |
17837     sed '/^.*\/\([^/][^/]*\)\/*$/{
17838             s//\1/
17839             q
17840           }
17841           /^X\/\(\/\/\)$/{
17842             s//\1/
17843             q
17844           }
17845           /^X\/\(\/\).*/{
17846             s//\1/
17847             q
17848           }
17849           s/.*/./; q'`
17850
17851 # Avoid depending upon Character Ranges.
17852 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17853 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17854 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17855 as_cr_digits='0123456789'
17856 as_cr_alnum=$as_cr_Letters$as_cr_digits
17857
17858 ECHO_C= ECHO_N= ECHO_T=
17859 case `echo -n x` in #(((((
17860 -n*)
17861   case `echo 'xy\c'` in
17862   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
17863   xy)  ECHO_C='\c';;
17864   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
17865        ECHO_T=' ';;
17866   esac;;
17867 *)
17868   ECHO_N='-n';;
17869 esac
17870
17871 rm -f conf$$ conf$$.exe conf$$.file
17872 if test -d conf$$.dir; then
17873   rm -f conf$$.dir/conf$$.file
17874 else
17875   rm -f conf$$.dir
17876   mkdir conf$$.dir 2>/dev/null
17877 fi
17878 if (echo >conf$$.file) 2>/dev/null; then
17879   if ln -s conf$$.file conf$$ 2>/dev/null; then
17880     as_ln_s='ln -s'
17881     # ... but there are two gotchas:
17882     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17883     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17884     # In both cases, we have to default to `cp -p'.
17885     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17886       as_ln_s='cp -p'
17887   elif ln conf$$.file conf$$ 2>/dev/null; then
17888     as_ln_s=ln
17889   else
17890     as_ln_s='cp -p'
17891   fi
17892 else
17893   as_ln_s='cp -p'
17894 fi
17895 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17896 rmdir conf$$.dir 2>/dev/null
17897
17898
17899 # as_fn_mkdir_p
17900 # -------------
17901 # Create "$as_dir" as a directory, including parents if necessary.
17902 as_fn_mkdir_p ()
17903 {
17904
17905   case $as_dir in #(
17906   -*) as_dir=./$as_dir;;
17907   esac
17908   test -d "$as_dir" || eval $as_mkdir_p || {
17909     as_dirs=
17910     while :; do
17911       case $as_dir in #(
17912       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17913       *) as_qdir=$as_dir;;
17914       esac
17915       as_dirs="'$as_qdir' $as_dirs"
17916       as_dir=`$as_dirname -- "$as_dir" ||
17917 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17918          X"$as_dir" : 'X\(//\)[^/]' \| \
17919          X"$as_dir" : 'X\(//\)$' \| \
17920          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17921 $as_echo X"$as_dir" |
17922     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17923             s//\1/
17924             q
17925           }
17926           /^X\(\/\/\)[^/].*/{
17927             s//\1/
17928             q
17929           }
17930           /^X\(\/\/\)$/{
17931             s//\1/
17932             q
17933           }
17934           /^X\(\/\).*/{
17935             s//\1/
17936             q
17937           }
17938           s/.*/./; q'`
17939       test -d "$as_dir" && break
17940     done
17941     test -z "$as_dirs" || eval "mkdir $as_dirs"
17942   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17943
17944
17945 } # as_fn_mkdir_p
17946 if mkdir -p . 2>/dev/null; then
17947   as_mkdir_p='mkdir -p "$as_dir"'
17948 else
17949   test -d ./-p && rmdir ./-p
17950   as_mkdir_p=false
17951 fi
17952
17953 if test -x / >/dev/null 2>&1; then
17954   as_test_x='test -x'
17955 else
17956   if ls -dL / >/dev/null 2>&1; then
17957     as_ls_L_option=L
17958   else
17959     as_ls_L_option=
17960   fi
17961   as_test_x='
17962     eval sh -c '\''
17963       if test -d "$1"; then
17964         test -d "$1/.";
17965       else
17966         case $1 in #(
17967         -*)set "./$1";;
17968         esac;
17969         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17970         ???[sx]*):;;*)false;;esac;fi
17971     '\'' sh
17972   '
17973 fi
17974 as_executable_p=$as_test_x
17975
17976 # Sed expression to map a string onto a valid CPP name.
17977 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17978
17979 # Sed expression to map a string onto a valid variable name.
17980 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17981
17982
17983 exec 6>&1
17984 ## ----------------------------------- ##
17985 ## Main body of $CONFIG_STATUS script. ##
17986 ## ----------------------------------- ##
17987 _ASEOF
17988 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17989
17990 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17991 # Save the log message, to keep $0 and so on meaningful, and to
17992 # report actual input values of CONFIG_FILES etc. instead of their
17993 # values after options handling.
17994 ac_log="
17995 This file was extended by $as_me, which was
17996 generated by GNU Autoconf 2.64.  Invocation command line was
17997
17998   CONFIG_FILES    = $CONFIG_FILES
17999   CONFIG_HEADERS  = $CONFIG_HEADERS
18000   CONFIG_LINKS    = $CONFIG_LINKS
18001   CONFIG_COMMANDS = $CONFIG_COMMANDS
18002   $ $0 $@
18003
18004 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18005 "
18006
18007 _ACEOF
18008
18009 case $ac_config_files in *"
18010 "*) set x $ac_config_files; shift; ac_config_files=$*;;
18011 esac
18012
18013 case $ac_config_headers in *"
18014 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18015 esac
18016
18017
18018 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18019 # Files that config.status was made for.
18020 config_files="$ac_config_files"
18021 config_headers="$ac_config_headers"
18022 config_links="$ac_config_links"
18023 config_commands="$ac_config_commands"
18024
18025 _ACEOF
18026
18027 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18028 ac_cs_usage="\
18029 \`$as_me' instantiates files and other configuration actions
18030 from templates according to the current configuration.  Unless the files
18031 and actions are specified as TAGs, all are instantiated by default.
18032
18033 Usage: $0 [OPTION]... [TAG]...
18034
18035   -h, --help       print this help, then exit
18036   -V, --version    print version number and configuration settings, then exit
18037   -q, --quiet, --silent
18038                    do not print progress messages
18039   -d, --debug      don't remove temporary files
18040       --recheck    update $as_me by reconfiguring in the same conditions
18041       --file=FILE[:TEMPLATE]
18042                    instantiate the configuration file FILE
18043       --header=FILE[:TEMPLATE]
18044                    instantiate the configuration header FILE
18045
18046 Configuration files:
18047 $config_files
18048
18049 Configuration headers:
18050 $config_headers
18051
18052 Configuration links:
18053 $config_links
18054
18055 Configuration commands:
18056 $config_commands
18057
18058 Report bugs to the package provider."
18059
18060 _ACEOF
18061 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18062 ac_cs_version="\\
18063 config.status
18064 configured by $0, generated by GNU Autoconf 2.64,
18065   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
18066
18067 Copyright (C) 2009 Free Software Foundation, Inc.
18068 This config.status script is free software; the Free Software Foundation
18069 gives unlimited permission to copy, distribute and modify it."
18070
18071 ac_pwd='$ac_pwd'
18072 srcdir='$srcdir'
18073 INSTALL='$INSTALL'
18074 AWK='$AWK'
18075 test -n "\$AWK" || AWK=awk
18076 _ACEOF
18077
18078 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18079 # The default lists apply if the user does not specify any file.
18080 ac_need_defaults=:
18081 while test $# != 0
18082 do
18083   case $1 in
18084   --*=*)
18085     ac_option=`expr "X$1" : 'X\([^=]*\)='`
18086     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18087     ac_shift=:
18088     ;;
18089   *)
18090     ac_option=$1
18091     ac_optarg=$2
18092     ac_shift=shift
18093     ;;
18094   esac
18095
18096   case $ac_option in
18097   # Handling of the options.
18098   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18099     ac_cs_recheck=: ;;
18100   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18101     $as_echo "$ac_cs_version"; exit ;;
18102   --debug | --debu | --deb | --de | --d | -d )
18103     debug=: ;;
18104   --file | --fil | --fi | --f )
18105     $ac_shift
18106     case $ac_optarg in
18107     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18108     esac
18109     as_fn_append CONFIG_FILES " '$ac_optarg'"
18110     ac_need_defaults=false;;
18111   --header | --heade | --head | --hea )
18112     $ac_shift
18113     case $ac_optarg in
18114     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18115     esac
18116     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
18117     ac_need_defaults=false;;
18118   --he | --h)
18119     # Conflict between --help and --header
18120     as_fn_error "ambiguous option: \`$1'
18121 Try \`$0 --help' for more information.";;
18122   --help | --hel | -h )
18123     $as_echo "$ac_cs_usage"; exit ;;
18124   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18125   | -silent | --silent | --silen | --sile | --sil | --si | --s)
18126     ac_cs_silent=: ;;
18127
18128   # This is an error.
18129   -*) as_fn_error "unrecognized option: \`$1'
18130 Try \`$0 --help' for more information." ;;
18131
18132   *) as_fn_append ac_config_targets " $1"
18133      ac_need_defaults=false ;;
18134
18135   esac
18136   shift
18137 done
18138
18139 ac_configure_extra_args=
18140
18141 if $ac_cs_silent; then
18142   exec 6>/dev/null
18143   ac_configure_extra_args="$ac_configure_extra_args --silent"
18144 fi
18145
18146 _ACEOF
18147 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18148 if \$ac_cs_recheck; then
18149   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18150   shift
18151   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18152   CONFIG_SHELL='$SHELL'
18153   export CONFIG_SHELL
18154   exec "\$@"
18155 fi
18156
18157 _ACEOF
18158 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18159 exec 5>>config.log
18160 {
18161   echo
18162   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18163 ## Running $as_me. ##
18164 _ASBOX
18165   $as_echo "$ac_log"
18166 } >&5
18167
18168 _ACEOF
18169 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18170 #
18171 # INIT-COMMANDS
18172 #
18173 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
18174
18175 _ACEOF
18176
18177 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18178
18179 # Handling of arguments.
18180 for ac_config_target in $ac_config_targets
18181 do
18182   case $ac_config_target in
18183     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18184     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
18185     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
18186     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
18187     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
18188     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18189     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
18190     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
18191     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
18192
18193   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
18194   esac
18195 done
18196
18197
18198 # If the user did not use the arguments to specify the items to instantiate,
18199 # then the envvar interface is used.  Set only those that are not.
18200 # We use the long form for the default assignment because of an extremely
18201 # bizarre bug on SunOS 4.1.3.
18202 if $ac_need_defaults; then
18203   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18204   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18205   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18206   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18207 fi
18208
18209 # Have a temporary directory for convenience.  Make it in the build tree
18210 # simply because there is no reason against having it here, and in addition,
18211 # creating and moving files from /tmp can sometimes cause problems.
18212 # Hook for its removal unless debugging.
18213 # Note that there is a small window in which the directory will not be cleaned:
18214 # after its creation but before its name has been assigned to `$tmp'.
18215 $debug ||
18216 {
18217   tmp=
18218   trap 'exit_status=$?
18219   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
18220 ' 0
18221   trap 'as_fn_exit 1' 1 2 13 15
18222 }
18223 # Create a (secure) tmp directory for tmp files.
18224
18225 {
18226   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18227   test -n "$tmp" && test -d "$tmp"
18228 }  ||
18229 {
18230   tmp=./conf$$-$RANDOM
18231   (umask 077 && mkdir "$tmp")
18232 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
18233
18234 # Set up the scripts for CONFIG_FILES section.
18235 # No need to generate them if there are no CONFIG_FILES.
18236 # This happens for instance with `./config.status config.h'.
18237 if test -n "$CONFIG_FILES"; then
18238
18239 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18240   ac_cs_awk_getline=:
18241   ac_cs_awk_pipe_init=
18242   ac_cs_awk_read_file='
18243       while ((getline aline < (F[key])) > 0)
18244         print(aline)
18245       close(F[key])'
18246   ac_cs_awk_pipe_fini=
18247 else
18248   ac_cs_awk_getline=false
18249   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18250   ac_cs_awk_read_file='
18251       print "|#_!!_#|"
18252       print "cat " F[key] " &&"
18253       '$ac_cs_awk_pipe_init
18254   # The final `:' finishes the AND list.
18255   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18256 fi
18257 ac_cr=`echo X | tr X '\015'`
18258 # On cygwin, bash can eat \r inside `` if the user requested igncr.
18259 # But we know of no other shell where ac_cr would be empty at this
18260 # point, so we can use a bashism as a fallback.
18261 if test "x$ac_cr" = x; then
18262   eval ac_cr=\$\'\\r\'
18263 fi
18264 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18265 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18266   ac_cs_awk_cr='\r'
18267 else
18268   ac_cs_awk_cr=$ac_cr
18269 fi
18270
18271 echo 'BEGIN {' >"$tmp/subs1.awk" &&
18272 _ACEOF
18273
18274 # Create commands to substitute file output variables.
18275 {
18276   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18277   echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
18278   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18279   echo "_ACAWK" &&
18280   echo "_ACEOF"
18281 } >conf$$files.sh &&
18282 . ./conf$$files.sh ||
18283   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18284 rm -f conf$$files.sh
18285
18286 {
18287   echo "cat >conf$$subs.awk <<_ACEOF" &&
18288   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18289   echo "_ACEOF"
18290 } >conf$$subs.sh ||
18291   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18292 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
18293 ac_delim='%!_!# '
18294 for ac_last_try in false false false false false :; do
18295   . ./conf$$subs.sh ||
18296     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18297
18298   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18299   if test $ac_delim_n = $ac_delim_num; then
18300     break
18301   elif $ac_last_try; then
18302     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18303   else
18304     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18305   fi
18306 done
18307 rm -f conf$$subs.sh
18308
18309 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18310 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
18311 _ACEOF
18312 sed -n '
18313 h
18314 s/^/S["/; s/!.*/"]=/
18315 p
18316 g
18317 s/^[^!]*!//
18318 :repl
18319 t repl
18320 s/'"$ac_delim"'$//
18321 t delim
18322 :nl
18323 h
18324 s/\(.\{148\}\).*/\1/
18325 t more1
18326 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18327 p
18328 n
18329 b repl
18330 :more1
18331 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18332 p
18333 g
18334 s/.\{148\}//
18335 t nl
18336 :delim
18337 h
18338 s/\(.\{148\}\).*/\1/
18339 t more2
18340 s/["\\]/\\&/g; s/^/"/; s/$/"/
18341 p
18342 b
18343 :more2
18344 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18345 p
18346 g
18347 s/.\{148\}//
18348 t delim
18349 ' <conf$$subs.awk | sed '
18350 /^[^""]/{
18351   N
18352   s/\n//
18353 }
18354 ' >>$CONFIG_STATUS || ac_write_fail=1
18355 rm -f conf$$subs.awk
18356 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18357 _ACAWK
18358 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
18359   for (key in S) S_is_set[key] = 1
18360   FS = "\a"
18361   \$ac_cs_awk_pipe_init
18362 }
18363 {
18364   line = $ 0
18365   nfields = split(line, field, "@")
18366   substed = 0
18367   len = length(field[1])
18368   for (i = 2; i < nfields; i++) {
18369     key = field[i]
18370     keylen = length(key)
18371     if (S_is_set[key]) {
18372       value = S[key]
18373       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18374       len += length(value) + length(field[++i])
18375       substed = 1
18376     } else
18377       len += 1 + keylen
18378   }
18379   if (nfields == 3 && !substed) {
18380     key = field[2]
18381     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
18382       \$ac_cs_awk_read_file
18383       next
18384     }
18385   }
18386   print line
18387 }
18388 \$ac_cs_awk_pipe_fini
18389 _ACAWK
18390 _ACEOF
18391 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18392 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18393   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18394 else
18395   cat
18396 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
18397   || as_fn_error "could not setup config files machinery" "$LINENO" 5
18398 _ACEOF
18399
18400 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18401 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18402 # trailing colons and then remove the whole line if VPATH becomes empty
18403 # (actually we leave an empty line to preserve line numbers).
18404 if test "x$srcdir" = x.; then
18405   ac_vpsub='/^[  ]*VPATH[        ]*=/{
18406 s/:*\$(srcdir):*/:/
18407 s/:*\${srcdir}:*/:/
18408 s/:*@srcdir@:*/:/
18409 s/^\([^=]*=[     ]*\):*/\1/
18410 s/:*$//
18411 s/^[^=]*=[       ]*$//
18412 }'
18413 fi
18414
18415 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18416 fi # test -n "$CONFIG_FILES"
18417
18418 # Set up the scripts for CONFIG_HEADERS section.
18419 # No need to generate them if there are no CONFIG_HEADERS.
18420 # This happens for instance with `./config.status Makefile'.
18421 if test -n "$CONFIG_HEADERS"; then
18422 cat >"$tmp/defines.awk" <<\_ACAWK ||
18423 BEGIN {
18424 _ACEOF
18425
18426 # Transform confdefs.h into an awk script `defines.awk', embedded as
18427 # here-document in config.status, that substitutes the proper values into
18428 # config.h.in to produce config.h.
18429
18430 # Create a delimiter string that does not exist in confdefs.h, to ease
18431 # handling of long lines.
18432 ac_delim='%!_!# '
18433 for ac_last_try in false false :; do
18434   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
18435   if test -z "$ac_t"; then
18436     break
18437   elif $ac_last_try; then
18438     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
18439   else
18440     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18441   fi
18442 done
18443
18444 # For the awk script, D is an array of macro values keyed by name,
18445 # likewise P contains macro parameters if any.  Preserve backslash
18446 # newline sequences.
18447
18448 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18449 sed -n '
18450 s/.\{148\}/&'"$ac_delim"'/g
18451 t rset
18452 :rset
18453 s/^[     ]*#[    ]*define[       ][      ]*/ /
18454 t def
18455 d
18456 :def
18457 s/\\$//
18458 t bsnl
18459 s/["\\]/\\&/g
18460 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18461 D["\1"]=" \3"/p
18462 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
18463 d
18464 :bsnl
18465 s/["\\]/\\&/g
18466 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18467 D["\1"]=" \3\\\\\\n"\\/p
18468 t cont
18469 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18470 t cont
18471 d
18472 :cont
18473 n
18474 s/.\{148\}/&'"$ac_delim"'/g
18475 t clear
18476 :clear
18477 s/\\$//
18478 t bsnlc
18479 s/["\\]/\\&/g; s/^/"/; s/$/"/p
18480 d
18481 :bsnlc
18482 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18483 b cont
18484 ' <confdefs.h | sed '
18485 s/'"$ac_delim"'/"\\\
18486 "/g' >>$CONFIG_STATUS || ac_write_fail=1
18487
18488 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18489   for (key in D) D_is_set[key] = 1
18490   FS = "\a"
18491 }
18492 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18493   line = \$ 0
18494   split(line, arg, " ")
18495   if (arg[1] == "#") {
18496     defundef = arg[2]
18497     mac1 = arg[3]
18498   } else {
18499     defundef = substr(arg[1], 2)
18500     mac1 = arg[2]
18501   }
18502   split(mac1, mac2, "(") #)
18503   macro = mac2[1]
18504   prefix = substr(line, 1, index(line, defundef) - 1)
18505   if (D_is_set[macro]) {
18506     # Preserve the white space surrounding the "#".
18507     print prefix "define", macro P[macro] D[macro]
18508     next
18509   } else {
18510     # Replace #undef with comments.  This is necessary, for example,
18511     # in the case of _POSIX_SOURCE, which is predefined and required
18512     # on some systems where configure will not decide to define it.
18513     if (defundef == "undef") {
18514       print "/*", prefix defundef, macro, "*/"
18515       next
18516     }
18517   }
18518 }
18519 { print }
18520 _ACAWK
18521 _ACEOF
18522 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18523   as_fn_error "could not setup config headers machinery" "$LINENO" 5
18524 fi # test -n "$CONFIG_HEADERS"
18525
18526
18527 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
18528 shift
18529 for ac_tag
18530 do
18531   case $ac_tag in
18532   :[FHLC]) ac_mode=$ac_tag; continue;;
18533   esac
18534   case $ac_mode$ac_tag in
18535   :[FHL]*:*);;
18536   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
18537   :[FH]-) ac_tag=-:-;;
18538   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18539   esac
18540   ac_save_IFS=$IFS
18541   IFS=:
18542   set x $ac_tag
18543   IFS=$ac_save_IFS
18544   shift
18545   ac_file=$1
18546   shift
18547
18548   case $ac_mode in
18549   :L) ac_source=$1;;
18550   :[FH])
18551     ac_file_inputs=
18552     for ac_f
18553     do
18554       case $ac_f in
18555       -) ac_f="$tmp/stdin";;
18556       *) # Look for the file first in the build tree, then in the source tree
18557          # (if the path is not absolute).  The absolute path cannot be DOS-style,
18558          # because $ac_f cannot contain `:'.
18559          test -f "$ac_f" ||
18560            case $ac_f in
18561            [\\/$]*) false;;
18562            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18563            esac ||
18564            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18565       esac
18566       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18567       as_fn_append ac_file_inputs " '$ac_f'"
18568     done
18569
18570     # Let's still pretend it is `configure' which instantiates (i.e., don't
18571     # use $as_me), people would be surprised to read:
18572     #    /* config.h.  Generated by config.status.  */
18573     configure_input='Generated from '`
18574           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18575         `' by configure.'
18576     if test x"$ac_file" != x-; then
18577       configure_input="$ac_file.  $configure_input"
18578       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18579 $as_echo "$as_me: creating $ac_file" >&6;}
18580     fi
18581     # Neutralize special characters interpreted by sed in replacement strings.
18582     case $configure_input in #(
18583     *\&* | *\|* | *\\* )
18584        ac_sed_conf_input=`$as_echo "$configure_input" |
18585        sed 's/[\\\\&|]/\\\\&/g'`;; #(
18586     *) ac_sed_conf_input=$configure_input;;
18587     esac
18588
18589     case $ac_tag in
18590     *:-:* | *:-) cat >"$tmp/stdin" \
18591       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
18592     esac
18593     ;;
18594   esac
18595
18596   ac_dir=`$as_dirname -- "$ac_file" ||
18597 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18598          X"$ac_file" : 'X\(//\)[^/]' \| \
18599          X"$ac_file" : 'X\(//\)$' \| \
18600          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18601 $as_echo X"$ac_file" |
18602     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18603             s//\1/
18604             q
18605           }
18606           /^X\(\/\/\)[^/].*/{
18607             s//\1/
18608             q
18609           }
18610           /^X\(\/\/\)$/{
18611             s//\1/
18612             q
18613           }
18614           /^X\(\/\).*/{
18615             s//\1/
18616             q
18617           }
18618           s/.*/./; q'`
18619   as_dir="$ac_dir"; as_fn_mkdir_p
18620   ac_builddir=.
18621
18622 case "$ac_dir" in
18623 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18624 *)
18625   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18626   # A ".." for each directory in $ac_dir_suffix.
18627   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18628   case $ac_top_builddir_sub in
18629   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18630   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18631   esac ;;
18632 esac
18633 ac_abs_top_builddir=$ac_pwd
18634 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18635 # for backward compatibility:
18636 ac_top_builddir=$ac_top_build_prefix
18637
18638 case $srcdir in
18639   .)  # We are building in place.
18640     ac_srcdir=.
18641     ac_top_srcdir=$ac_top_builddir_sub
18642     ac_abs_top_srcdir=$ac_pwd ;;
18643   [\\/]* | ?:[\\/]* )  # Absolute name.
18644     ac_srcdir=$srcdir$ac_dir_suffix;
18645     ac_top_srcdir=$srcdir
18646     ac_abs_top_srcdir=$srcdir ;;
18647   *) # Relative name.
18648     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18649     ac_top_srcdir=$ac_top_build_prefix$srcdir
18650     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18651 esac
18652 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18653
18654
18655   case $ac_mode in
18656   :F)
18657   #
18658   # CONFIG_FILE
18659   #
18660
18661   case $INSTALL in
18662   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18663   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
18664   esac
18665 _ACEOF
18666
18667 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18668 # If the template does not know about datarootdir, expand it.
18669 # FIXME: This hack should be removed a few years after 2.60.
18670 ac_datarootdir_hack=; ac_datarootdir_seen=
18671 ac_sed_dataroot='
18672 /datarootdir/ {
18673   p
18674   q
18675 }
18676 /@datadir@/p
18677 /@docdir@/p
18678 /@infodir@/p
18679 /@localedir@/p
18680 /@mandir@/p'
18681 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18682 *datarootdir*) ac_datarootdir_seen=yes;;
18683 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18684   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18685 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18686 _ACEOF
18687 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18688   ac_datarootdir_hack='
18689   s&@datadir@&$datadir&g
18690   s&@docdir@&$docdir&g
18691   s&@infodir@&$infodir&g
18692   s&@localedir@&$localedir&g
18693   s&@mandir@&$mandir&g
18694   s&\\\${datarootdir}&$datarootdir&g' ;;
18695 esac
18696 _ACEOF
18697
18698 # Neutralize VPATH when `$srcdir' = `.'.
18699 # Shell code in configure.ac might set extrasub.
18700 # FIXME: do we really want to maintain this feature?
18701 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18702 ac_sed_extra="$ac_vpsub
18703 $extrasub
18704 _ACEOF
18705 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18706 :t
18707 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18708 s|@configure_input@|$ac_sed_conf_input|;t t
18709 s&@top_builddir@&$ac_top_builddir_sub&;t t
18710 s&@top_build_prefix@&$ac_top_build_prefix&;t t
18711 s&@srcdir@&$ac_srcdir&;t t
18712 s&@abs_srcdir@&$ac_abs_srcdir&;t t
18713 s&@top_srcdir@&$ac_top_srcdir&;t t
18714 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18715 s&@builddir@&$ac_builddir&;t t
18716 s&@abs_builddir@&$ac_abs_builddir&;t t
18717 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18718 s&@INSTALL@&$ac_INSTALL&;t t
18719 $ac_datarootdir_hack
18720 "
18721 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18722 if $ac_cs_awk_getline; then
18723   $AWK -f "$tmp/subs.awk"
18724 else
18725   $AWK -f "$tmp/subs.awk" | $SHELL
18726 fi >$tmp/out \
18727   || as_fn_error "could not create $ac_file" "$LINENO" 5
18728
18729 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18730   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18731   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18732   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18733 which seems to be undefined.  Please make sure it is defined." >&5
18734 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18735 which seems to be undefined.  Please make sure it is defined." >&2;}
18736
18737   rm -f "$tmp/stdin"
18738   case $ac_file in
18739   -) cat "$tmp/out" && rm -f "$tmp/out";;
18740   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
18741   esac \
18742   || as_fn_error "could not create $ac_file" "$LINENO" 5
18743  ;;
18744   :H)
18745   #
18746   # CONFIG_HEADER
18747   #
18748   if test x"$ac_file" != x-; then
18749     {
18750       $as_echo "/* $configure_input  */" \
18751       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
18752     } >"$tmp/config.h" \
18753       || as_fn_error "could not create $ac_file" "$LINENO" 5
18754     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
18755       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18756 $as_echo "$as_me: $ac_file is unchanged" >&6;}
18757     else
18758       rm -f "$ac_file"
18759       mv "$tmp/config.h" "$ac_file" \
18760         || as_fn_error "could not create $ac_file" "$LINENO" 5
18761     fi
18762   else
18763     $as_echo "/* $configure_input  */" \
18764       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
18765       || as_fn_error "could not create -" "$LINENO" 5
18766   fi
18767  ;;
18768   :L)
18769   #
18770   # CONFIG_LINK
18771   #
18772
18773   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18774     :
18775   else
18776     # Prefer the file from the source tree if names are identical.
18777     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18778       ac_source=$srcdir/$ac_source
18779     fi
18780
18781     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18782 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
18783
18784     if test ! -r "$ac_source"; then
18785       as_fn_error "$ac_source: file not found" "$LINENO" 5
18786     fi
18787     rm -f "$ac_file"
18788
18789     # Try a relative symlink, then a hard link, then a copy.
18790     case $srcdir in
18791     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18792         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18793     esac
18794     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18795       ln "$ac_source" "$ac_file" 2>/dev/null ||
18796       cp -p "$ac_source" "$ac_file" ||
18797       as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18798   fi
18799  ;;
18800   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18801 $as_echo "$as_me: executing $ac_file commands" >&6;}
18802  ;;
18803   esac
18804
18805
18806   case $ac_file$ac_mode in
18807     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
18808     "gcore":F) chmod +x gcore ;;
18809     "Makefile":F)
18810 case x$CONFIG_HEADERS in
18811 xconfig.h:config.in)
18812 echo > stamp-h ;;
18813 esac
18814  ;;
18815     "gdb-gdb.gdb":F)
18816 case x$CONFIG_HEADERS in
18817 xconfig.h:config.in)
18818 echo > stamp-h ;;
18819 esac
18820  ;;
18821     "doc/Makefile":F)
18822 case x$CONFIG_HEADERS in
18823 xconfig.h:config.in)
18824 echo > stamp-h ;;
18825 esac
18826  ;;
18827     "data-directory/Makefile":F)
18828 case x$CONFIG_HEADERS in
18829 xconfig.h:config.in)
18830 echo > stamp-h ;;
18831 esac
18832  ;;
18833
18834   esac
18835 done # for ac_tag
18836
18837
18838 as_fn_exit 0
18839 _ACEOF
18840 ac_clean_files=$ac_clean_files_save
18841
18842 test $ac_write_fail = 0 ||
18843   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
18844
18845
18846 # configure is writing to config.log, and then calls config.status.
18847 # config.status does its own redirection, appending to config.log.
18848 # Unfortunately, on DOS this fails, as config.log is still kept open
18849 # by configure, so config.status won't be able to write to it; its
18850 # output is simply discarded.  So we exec the FD to /dev/null,
18851 # effectively closing config.log, so it can be properly (re)opened and
18852 # appended to by config.status.  When coming back to configure, we
18853 # need to make the FD available again.
18854 if test "$no_create" != yes; then
18855   ac_cs_success=:
18856   ac_config_status_args=
18857   test "$silent" = yes &&
18858     ac_config_status_args="$ac_config_status_args --quiet"
18859   exec 5>/dev/null
18860   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18861   exec 5>>config.log
18862   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18863   # would make configure fail if this is the last instruction.
18864   $ac_cs_success || as_fn_exit $?
18865 fi
18866
18867 #
18868 # CONFIG_SUBDIRS section.
18869 #
18870 if test "$no_recursion" != yes; then
18871
18872   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
18873   # so they do not pile up.
18874   ac_sub_configure_args=
18875   ac_prev=
18876   eval "set x $ac_configure_args"
18877   shift
18878   for ac_arg
18879   do
18880     if test -n "$ac_prev"; then
18881       ac_prev=
18882       continue
18883     fi
18884     case $ac_arg in
18885     -cache-file | --cache-file | --cache-fil | --cache-fi \
18886     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
18887       ac_prev=cache_file ;;
18888     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
18889     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
18890     | --c=*)
18891       ;;
18892     --config-cache | -C)
18893       ;;
18894     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
18895       ac_prev=srcdir ;;
18896     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
18897       ;;
18898     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
18899       ac_prev=prefix ;;
18900     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
18901       ;;
18902     --disable-option-checking)
18903       ;;
18904     *)
18905       case $ac_arg in
18906       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
18907       esac
18908       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
18909     esac
18910   done
18911
18912   # Always prepend --prefix to ensure using the same prefix
18913   # in subdir configurations.
18914   ac_arg="--prefix=$prefix"
18915   case $ac_arg in
18916   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
18917   esac
18918   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18919
18920   # Pass --silent
18921   if test "$silent" = yes; then
18922     ac_sub_configure_args="--silent $ac_sub_configure_args"
18923   fi
18924
18925   # Always prepend --disable-option-checking to silence warnings, since
18926   # different subdirs can have different --enable and --with options.
18927   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
18928
18929   ac_popdir=`pwd`
18930   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
18931
18932     # Do not complain, so a configure script can configure whichever
18933     # parts of a large source tree are present.
18934     test -d "$srcdir/$ac_dir" || continue
18935
18936     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18937     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18938     $as_echo "$ac_msg" >&6
18939     as_dir="$ac_dir"; as_fn_mkdir_p
18940     ac_builddir=.
18941
18942 case "$ac_dir" in
18943 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18944 *)
18945   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18946   # A ".." for each directory in $ac_dir_suffix.
18947   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18948   case $ac_top_builddir_sub in
18949   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18950   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18951   esac ;;
18952 esac
18953 ac_abs_top_builddir=$ac_pwd
18954 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18955 # for backward compatibility:
18956 ac_top_builddir=$ac_top_build_prefix
18957
18958 case $srcdir in
18959   .)  # We are building in place.
18960     ac_srcdir=.
18961     ac_top_srcdir=$ac_top_builddir_sub
18962     ac_abs_top_srcdir=$ac_pwd ;;
18963   [\\/]* | ?:[\\/]* )  # Absolute name.
18964     ac_srcdir=$srcdir$ac_dir_suffix;
18965     ac_top_srcdir=$srcdir
18966     ac_abs_top_srcdir=$srcdir ;;
18967   *) # Relative name.
18968     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18969     ac_top_srcdir=$ac_top_build_prefix$srcdir
18970     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18971 esac
18972 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18973
18974
18975     cd "$ac_dir"
18976
18977     # Check for guested configure; otherwise get Cygnus style configure.
18978     if test -f "$ac_srcdir/configure.gnu"; then
18979       ac_sub_configure=$ac_srcdir/configure.gnu
18980     elif test -f "$ac_srcdir/configure"; then
18981       ac_sub_configure=$ac_srcdir/configure
18982     elif test -f "$ac_srcdir/configure.in"; then
18983       # This should be Cygnus configure.
18984       ac_sub_configure=$ac_aux_dir/configure
18985     else
18986       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18987 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
18988       ac_sub_configure=
18989     fi
18990
18991     # The recursion is here.
18992     if test -n "$ac_sub_configure"; then
18993       # Make the cache file name correct relative to the subdirectory.
18994       case $cache_file in
18995       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
18996       *) # Relative name.
18997         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
18998       esac
18999
19000       { $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
19001 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
19002       # The eval makes quoting arguments work.
19003       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19004            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
19005         as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
19006     fi
19007
19008     cd "$ac_popdir"
19009   done
19010 fi
19011 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19012   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19013 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19014 fi
19015