Fix crash with empty Rust enum
[external/binutils.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
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 as_myself=
91 case $0 in #((
92   *[\\/]* ) as_myself=$0 ;;
93   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96   IFS=$as_save_IFS
97   test -z "$as_dir" && as_dir=.
98     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99   done
100 IFS=$as_save_IFS
101
102      ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107   as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111   exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there.  '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136   # into an infinite loop, continuously re-executing ourselves.
137   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138     _as_can_reexec=no; export _as_can_reexec;
139     # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147   *v*x* | *x*v* ) as_opts=-vx ;;
148   *v* ) as_opts=-v ;;
149   *x* ) as_opts=-x ;;
150   * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157   fi
158   # We don't want this to propagate to other subprocesses.
159           { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162   emulate sh
163   NULLCMD=:
164   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165   # is contrary to our usage.  Disable this feature.
166   alias -g '\${1+\"\$@\"}'='\"\$@\"'
167   setopt NO_GLOB_SUBST
168 else
169   case \`(set -o) 2>/dev/null\` in #(
170   *posix*) :
171     set -o posix ;; #(
172   *) :
173      ;;
174 esac
175 fi
176 "
177   as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191   exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200   if (eval "$as_required") 2>/dev/null; then :
201   as_have_required=yes
202 else
203   as_have_required=no
204 fi
205   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212   IFS=$as_save_IFS
213   test -z "$as_dir" && as_dir=.
214   as_found=:
215   case $as_dir in #(
216          /*)
217            for as_base in sh bash ksh sh5; do
218              # Try only shells that exist, to save several forks.
219              as_shell=$as_dir/$as_base
220              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222   CONFIG_SHELL=$as_shell as_have_required=yes
223                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224   break 2
225 fi
226 fi
227            done;;
228        esac
229   as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233   CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238       if test "x$CONFIG_SHELL" != x; then :
239   export CONFIG_SHELL
240              # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248   *v*x* | *x*v* ) as_opts=-vx ;;
249   *v* ) as_opts=-v ;;
250   *x* ) as_opts=-x ;;
251   * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260     if test x$as_have_required = xno; then :
261   $as_echo "$0: This script requires a shell more modern than all"
262   $as_echo "$0: the shells that I found on your system."
263   if test x${ZSH_VERSION+set} = xset ; then
264     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266   else
267     $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271   fi
272   exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290   { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299   return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307   set +e
308   as_fn_set_status $1
309   exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318   case $as_dir in #(
319   -*) as_dir=./$as_dir;;
320   esac
321   test -d "$as_dir" || eval $as_mkdir_p || {
322     as_dirs=
323     while :; do
324       case $as_dir in #(
325       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326       *) as_qdir=$as_dir;;
327       esac
328       as_dirs="'$as_qdir' $as_dirs"
329       as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331          X"$as_dir" : 'X\(//\)[^/]' \| \
332          X"$as_dir" : 'X\(//\)$' \| \
333          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336             s//\1/
337             q
338           }
339           /^X\(\/\/\)[^/].*/{
340             s//\1/
341             q
342           }
343           /^X\(\/\/\)$/{
344             s//\1/
345             q
346           }
347           /^X\(\/\).*/{
348             s//\1/
349             q
350           }
351           s/.*/./; q'`
352       test -d "$as_dir" && break
353     done
354     test -z "$as_dirs" || eval "mkdir $as_dirs"
355   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365   test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374   eval 'as_fn_append ()
375   {
376     eval $1+=\$2
377   }'
378 else
379   as_fn_append ()
380   {
381     eval $1=\$$1\$2
382   }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391   eval 'as_fn_arith ()
392   {
393     as_val=$(( $* ))
394   }'
395 else
396   as_fn_arith ()
397   {
398     as_val=`expr "$@" || test $? -eq 1`
399   }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410   as_status=$1; test $as_status -eq 0 && as_status=1
411   if test "$4"; then
412     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414   fi
415   $as_echo "$as_me: error: $2" >&2
416   as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420    test "X`expr 00001 : '.*\(...\)'`" = X001; then
421   as_expr=expr
422 else
423   as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427   as_basename=basename
428 else
429   as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433   as_dirname=dirname
434 else
435   as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440          X"$0" : 'X\(//\)$' \| \
441          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443     sed '/^.*\/\([^/][^/]*\)\/*$/{
444             s//\1/
445             q
446           }
447           /^X\/\(\/\/\)$/{
448             s//\1/
449             q
450           }
451           /^X\/\(\/\).*/{
452             s//\1/
453             q
454           }
455           s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465   as_lineno_1=$LINENO as_lineno_1a=$LINENO
466   as_lineno_2=$LINENO as_lineno_2a=$LINENO
467   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470   sed -n '
471     p
472     /[$]LINENO/=
473   ' <$as_myself |
474     sed '
475       s/[$]LINENO.*/&-/
476       t lineno
477       b
478       :lineno
479       N
480       :loop
481       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482       t loop
483       s/-\n.*//
484     ' >$as_me.lineno &&
485   chmod +x "$as_me.lineno" ||
486     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489   # already done that, so ensure we don't try to do so again and fall
490   # in an infinite loop.  This has already happened in practice.
491   _as_can_reexec=no; export _as_can_reexec
492   # Don't try to exec as it changes $[0], causing all sort of problems
493   # (the dirname of $[0] is not the place where we might find the
494   # original and so on.  Autoconf is especially sensitive to this).
495   . "./$as_me.lineno"
496   # Exit status is that of the last command.
497   exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503   case `echo 'xy\c'` in
504   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
505   xy)  ECHO_C='\c';;
506   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507        ECHO_T=' ';;
508   esac;;
509 *)
510   ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515   rm -f conf$$.dir/conf$$.file
516 else
517   rm -f conf$$.dir
518   mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521   if ln -s conf$$.file conf$$ 2>/dev/null; then
522     as_ln_s='ln -s'
523     # ... but there are two gotchas:
524     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526     # In both cases, we have to default to `cp -pR'.
527     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528       as_ln_s='cp -pR'
529   elif ln conf$$.file conf$$ 2>/dev/null; then
530     as_ln_s=ln
531   else
532     as_ln_s='cp -pR'
533   fi
534 else
535   as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541   as_mkdir_p='mkdir -p "$as_dir"'
542 else
543   test -d ./-p && rmdir ./-p
544   as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="main.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 #  include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 #  include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 enable_option_checking=no
623 ac_header_list=
624 ac_subst_vars='LTLIBOBJS
625 LIBOBJS
626 GCORE_TRANSFORM_NAME
627 GDB_TRANSFORM_NAME
628 XSLTPROC
629 GDB_NM_FILE
630 LTLIBBABELTRACE
631 LIBBABELTRACE
632 HAVE_LIBBABELTRACE
633 HAVE_NATIVE_GCORE_HOST
634 NAT_GENERATED_FILES
635 XM_CLIBS
636 MH_CFLAGS
637 LOADLIBES
638 NAT_CDEPS
639 NATDEPFILES
640 NAT_FILE
641 target_subdir
642 CONFIG_UNINSTALL
643 CONFIG_INSTALL
644 CONFIG_CLEAN
645 CONFIG_ALL
646 CONFIG_SRCS
647 CONFIG_DEPS
648 CONFIG_OBS
649 PROFILE_CFLAGS
650 ENABLE_CFLAGS
651 SIM_OBS
652 SIM
653 XMKMF
654 GDBTK_SRC_DIR
655 GDBTK_CFLAGS
656 GDBTKLIBS
657 X_LIBS
658 X_LDFLAGS
659 X_CFLAGS
660 TK_XINCLUDES
661 TK_DEPS
662 TK_LIBRARY
663 TK_INCLUDE
664 TK_STUB_LIB_SPEC
665 TK_STUB_LIB_FLAG
666 TK_STUB_LIB_FILE
667 TK_LIB_SPEC
668 TK_LIB_FLAG
669 TK_LIB_FILE
670 TK_SRC_DIR
671 TK_BIN_DIR
672 TK_VERSION
673 TCL_DEPS
674 TCL_LIBRARY
675 TCL_INCLUDE
676 TCL_STUB_LIB_SPEC
677 TCL_STUB_LIB_FLAG
678 TCL_STUB_LIB_FILE
679 TCL_LIB_SPEC
680 TCL_LIB_FLAG
681 TCL_LIB_FILE
682 TCL_SRC_DIR
683 TCL_BIN_DIR
684 TCL_PATCH_LEVEL
685 TCL_VERSION
686 WIN32LDAPP
687 GUI_CFLAGS_X
688 LIBGUI
689 LTLIBLZMA
690 LIBLZMA
691 HAVE_LIBLZMA
692 WIN32LIBS
693 SER_HARDWIRE
694 WERROR_CFLAGS
695 WARN_CFLAGS
696 SYSTEM_GDBINIT
697 TARGET_SYSTEM_ROOT
698 CONFIG_LDFLAGS
699 RDYNAMIC
700 ALLOCA
701 LTLIBIPT
702 LIBIPT
703 HAVE_LIBIPT
704 HAVE_GUILE_FALSE
705 HAVE_GUILE_TRUE
706 GUILE_LIBS
707 GUILE_CPPFLAGS
708 GUILD_TARGET_FLAG
709 GUILD
710 pkg_config_prog_path
711 HAVE_PYTHON_FALSE
712 HAVE_PYTHON_TRUE
713 PYTHON_LIBS
714 PYTHON_CPPFLAGS
715 PYTHON_CFLAGS
716 python_prog_path
717 LTLIBMPFR
718 LIBMPFR
719 HAVE_LIBMPFR
720 LTLIBEXPAT
721 LIBEXPAT
722 HAVE_LIBEXPAT
723 JIT_READER_DIR
724 TARGET_PTR
725 READLINE_TEXI_INCFLAG
726 READLINE_CFLAGS
727 READLINE_DEPS
728 READLINE
729 LTLIBICONV
730 LIBICONV
731 zlibinc
732 zlibdir
733 MIG
734 WINDRES
735 DLLTOOL
736 AR
737 YFLAGS
738 YACC
739 RANLIB
740 LN_S
741 INSTALL_DATA
742 INSTALL_SCRIPT
743 INSTALL_PROGRAM
744 AWK
745 REPORT_BUGS_TEXI
746 REPORT_BUGS_TO
747 PKGVERSION
748 CODESIGN_CERT
749 HAVE_NATIVE_GCORE_TARGET
750 TARGET_OBS
751 subdirs
752 GDB_DATADIR
753 DEBUGDIR
754 MAKEINFO_EXTRA_FLAGS
755 MAKEINFOFLAGS
756 MAKEINFO
757 PACKAGE
758 GNULIB_STDINT_H
759 CATOBJEXT
760 GENCAT
761 INSTOBJEXT
762 DATADIRNAME
763 CATALOGS
764 POSUB
765 GMSGFMT
766 XGETTEXT
767 INCINTL
768 LIBINTL_DEP
769 LIBINTL
770 USE_NLS
771 CCDEPMODE
772 DEPDIR
773 am__leading_dot
774 CXX_DIALECT
775 HAVE_CXX11
776 INSTALL_STRIP_PROGRAM
777 STRIP
778 install_sh
779 target_os
780 target_vendor
781 target_cpu
782 target
783 host_os
784 host_vendor
785 host_cpu
786 host
787 build_os
788 build_vendor
789 build_cpu
790 build
791 EGREP
792 GREP
793 CPP
794 ac_ct_CXX
795 CXXFLAGS
796 CXX
797 OBJEXT
798 EXEEXT
799 ac_ct_CC
800 CPPFLAGS
801 LDFLAGS
802 CFLAGS
803 CC
804 MAINT
805 MAINTAINER_MODE_FALSE
806 MAINTAINER_MODE_TRUE
807 target_alias
808 host_alias
809 build_alias
810 LIBS
811 ECHO_T
812 ECHO_N
813 ECHO_C
814 DEFS
815 mandir
816 localedir
817 libdir
818 psdir
819 pdfdir
820 dvidir
821 htmldir
822 infodir
823 docdir
824 oldincludedir
825 includedir
826 localstatedir
827 sharedstatedir
828 sysconfdir
829 datadir
830 datarootdir
831 libexecdir
832 sbindir
833 bindir
834 program_transform_name
835 prefix
836 exec_prefix
837 PACKAGE_URL
838 PACKAGE_BUGREPORT
839 PACKAGE_STRING
840 PACKAGE_VERSION
841 PACKAGE_TARNAME
842 PACKAGE_NAME
843 PATH_SEPARATOR
844 SHELL'
845 ac_subst_files='nat_makefile_frag'
846 ac_user_opts='
847 enable_option_checking
848 enable_maintainer_mode
849 enable_plugins
850 enable_largefile
851 with_separate_debug_dir
852 with_gdb_datadir
853 with_relocated_sources
854 with_auto_load_dir
855 with_auto_load_safe_path
856 enable_targets
857 enable_64_bit_bfd
858 enable_gdbcli
859 enable_gdbmi
860 enable_tui
861 enable_gdbtk
862 with_libunwind_ia64
863 with_curses
864 enable_profiling
865 enable_codesign
866 with_pkgversion
867 with_bugurl
868 with_system_zlib
869 with_gnu_ld
870 enable_rpath
871 with_libiconv_prefix
872 with_iconv_bin
873 with_system_readline
874 with_jit_reader_dir
875 with_expat
876 with_libexpat_prefix
877 with_mpfr
878 with_libmpfr_prefix
879 with_python
880 with_guile
881 enable_libmcheck
882 with_intel_pt
883 with_libipt_prefix
884 with_included_regex
885 with_sysroot
886 with_system_gdbinit
887 enable_werror
888 enable_build_warnings
889 enable_gdb_build_warnings
890 with_lzma
891 with_liblzma_prefix
892 with_tcl
893 with_tk
894 with_x
895 enable_sim
896 enable_multi_ice
897 enable_gdbserver
898 with_babeltrace
899 with_libbabeltrace_prefix
900 '
901       ac_precious_vars='build_alias
902 host_alias
903 target_alias
904 CC
905 CFLAGS
906 LDFLAGS
907 LIBS
908 CPPFLAGS
909 CXX
910 CXXFLAGS
911 CCC
912 CPP
913 MAKEINFO
914 MAKEINFOFLAGS
915 YACC
916 YFLAGS
917 XMKMF'
918 ac_subdirs_all='testsuite
919 gdbtk
920 multi-ice
921 gdbserver'
922
923 # Initialize some variables set by options.
924 ac_init_help=
925 ac_init_version=false
926 ac_unrecognized_opts=
927 ac_unrecognized_sep=
928 # The variables have the same names as the options, with
929 # dashes changed to underlines.
930 cache_file=/dev/null
931 exec_prefix=NONE
932 no_create=
933 no_recursion=
934 prefix=NONE
935 program_prefix=NONE
936 program_suffix=NONE
937 program_transform_name=s,x,x,
938 silent=
939 site=
940 srcdir=
941 verbose=
942 x_includes=NONE
943 x_libraries=NONE
944
945 # Installation directory options.
946 # These are left unexpanded so users can "make install exec_prefix=/foo"
947 # and all the variables that are supposed to be based on exec_prefix
948 # by default will actually change.
949 # Use braces instead of parens because sh, perl, etc. also accept them.
950 # (The list follows the same order as the GNU Coding Standards.)
951 bindir='${exec_prefix}/bin'
952 sbindir='${exec_prefix}/sbin'
953 libexecdir='${exec_prefix}/libexec'
954 datarootdir='${prefix}/share'
955 datadir='${datarootdir}'
956 sysconfdir='${prefix}/etc'
957 sharedstatedir='${prefix}/com'
958 localstatedir='${prefix}/var'
959 includedir='${prefix}/include'
960 oldincludedir='/usr/include'
961 docdir='${datarootdir}/doc/${PACKAGE}'
962 infodir='${datarootdir}/info'
963 htmldir='${docdir}'
964 dvidir='${docdir}'
965 pdfdir='${docdir}'
966 psdir='${docdir}'
967 libdir='${exec_prefix}/lib'
968 localedir='${datarootdir}/locale'
969 mandir='${datarootdir}/man'
970
971 ac_prev=
972 ac_dashdash=
973 for ac_option
974 do
975   # If the previous option needs an argument, assign it.
976   if test -n "$ac_prev"; then
977     eval $ac_prev=\$ac_option
978     ac_prev=
979     continue
980   fi
981
982   case $ac_option in
983   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
984   *=)   ac_optarg= ;;
985   *)    ac_optarg=yes ;;
986   esac
987
988   # Accept the important Cygnus configure options, so we can diagnose typos.
989
990   case $ac_dashdash$ac_option in
991   --)
992     ac_dashdash=yes ;;
993
994   -bindir | --bindir | --bindi | --bind | --bin | --bi)
995     ac_prev=bindir ;;
996   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
997     bindir=$ac_optarg ;;
998
999   -build | --build | --buil | --bui | --bu)
1000     ac_prev=build_alias ;;
1001   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1002     build_alias=$ac_optarg ;;
1003
1004   -cache-file | --cache-file | --cache-fil | --cache-fi \
1005   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1006     ac_prev=cache_file ;;
1007   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1008   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1009     cache_file=$ac_optarg ;;
1010
1011   --config-cache | -C)
1012     cache_file=config.cache ;;
1013
1014   -datadir | --datadir | --datadi | --datad)
1015     ac_prev=datadir ;;
1016   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1017     datadir=$ac_optarg ;;
1018
1019   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1020   | --dataroo | --dataro | --datar)
1021     ac_prev=datarootdir ;;
1022   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1023   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1024     datarootdir=$ac_optarg ;;
1025
1026   -disable-* | --disable-*)
1027     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1028     # Reject names that are not valid shell variable names.
1029     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1030       as_fn_error $? "invalid feature name: $ac_useropt"
1031     ac_useropt_orig=$ac_useropt
1032     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1033     case $ac_user_opts in
1034       *"
1035 "enable_$ac_useropt"
1036 "*) ;;
1037       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1038          ac_unrecognized_sep=', ';;
1039     esac
1040     eval enable_$ac_useropt=no ;;
1041
1042   -docdir | --docdir | --docdi | --doc | --do)
1043     ac_prev=docdir ;;
1044   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1045     docdir=$ac_optarg ;;
1046
1047   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1048     ac_prev=dvidir ;;
1049   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1050     dvidir=$ac_optarg ;;
1051
1052   -enable-* | --enable-*)
1053     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1054     # Reject names that are not valid shell variable names.
1055     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1056       as_fn_error $? "invalid feature name: $ac_useropt"
1057     ac_useropt_orig=$ac_useropt
1058     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1059     case $ac_user_opts in
1060       *"
1061 "enable_$ac_useropt"
1062 "*) ;;
1063       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1064          ac_unrecognized_sep=', ';;
1065     esac
1066     eval enable_$ac_useropt=\$ac_optarg ;;
1067
1068   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1069   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1070   | --exec | --exe | --ex)
1071     ac_prev=exec_prefix ;;
1072   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1073   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1074   | --exec=* | --exe=* | --ex=*)
1075     exec_prefix=$ac_optarg ;;
1076
1077   -gas | --gas | --ga | --g)
1078     # Obsolete; use --with-gas.
1079     with_gas=yes ;;
1080
1081   -help | --help | --hel | --he | -h)
1082     ac_init_help=long ;;
1083   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1084     ac_init_help=recursive ;;
1085   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1086     ac_init_help=short ;;
1087
1088   -host | --host | --hos | --ho)
1089     ac_prev=host_alias ;;
1090   -host=* | --host=* | --hos=* | --ho=*)
1091     host_alias=$ac_optarg ;;
1092
1093   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1094     ac_prev=htmldir ;;
1095   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1096   | --ht=*)
1097     htmldir=$ac_optarg ;;
1098
1099   -includedir | --includedir | --includedi | --included | --include \
1100   | --includ | --inclu | --incl | --inc)
1101     ac_prev=includedir ;;
1102   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1103   | --includ=* | --inclu=* | --incl=* | --inc=*)
1104     includedir=$ac_optarg ;;
1105
1106   -infodir | --infodir | --infodi | --infod | --info | --inf)
1107     ac_prev=infodir ;;
1108   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1109     infodir=$ac_optarg ;;
1110
1111   -libdir | --libdir | --libdi | --libd)
1112     ac_prev=libdir ;;
1113   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1114     libdir=$ac_optarg ;;
1115
1116   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1117   | --libexe | --libex | --libe)
1118     ac_prev=libexecdir ;;
1119   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1120   | --libexe=* | --libex=* | --libe=*)
1121     libexecdir=$ac_optarg ;;
1122
1123   -localedir | --localedir | --localedi | --localed | --locale)
1124     ac_prev=localedir ;;
1125   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1126     localedir=$ac_optarg ;;
1127
1128   -localstatedir | --localstatedir | --localstatedi | --localstated \
1129   | --localstate | --localstat | --localsta | --localst | --locals)
1130     ac_prev=localstatedir ;;
1131   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1132   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1133     localstatedir=$ac_optarg ;;
1134
1135   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1136     ac_prev=mandir ;;
1137   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1138     mandir=$ac_optarg ;;
1139
1140   -nfp | --nfp | --nf)
1141     # Obsolete; use --without-fp.
1142     with_fp=no ;;
1143
1144   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1145   | --no-cr | --no-c | -n)
1146     no_create=yes ;;
1147
1148   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1149   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1150     no_recursion=yes ;;
1151
1152   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1153   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1154   | --oldin | --oldi | --old | --ol | --o)
1155     ac_prev=oldincludedir ;;
1156   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1157   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1158   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1159     oldincludedir=$ac_optarg ;;
1160
1161   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1162     ac_prev=prefix ;;
1163   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1164     prefix=$ac_optarg ;;
1165
1166   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1167   | --program-pre | --program-pr | --program-p)
1168     ac_prev=program_prefix ;;
1169   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1170   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1171     program_prefix=$ac_optarg ;;
1172
1173   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1174   | --program-suf | --program-su | --program-s)
1175     ac_prev=program_suffix ;;
1176   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1177   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1178     program_suffix=$ac_optarg ;;
1179
1180   -program-transform-name | --program-transform-name \
1181   | --program-transform-nam | --program-transform-na \
1182   | --program-transform-n | --program-transform- \
1183   | --program-transform | --program-transfor \
1184   | --program-transfo | --program-transf \
1185   | --program-trans | --program-tran \
1186   | --progr-tra | --program-tr | --program-t)
1187     ac_prev=program_transform_name ;;
1188   -program-transform-name=* | --program-transform-name=* \
1189   | --program-transform-nam=* | --program-transform-na=* \
1190   | --program-transform-n=* | --program-transform-=* \
1191   | --program-transform=* | --program-transfor=* \
1192   | --program-transfo=* | --program-transf=* \
1193   | --program-trans=* | --program-tran=* \
1194   | --progr-tra=* | --program-tr=* | --program-t=*)
1195     program_transform_name=$ac_optarg ;;
1196
1197   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1198     ac_prev=pdfdir ;;
1199   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1200     pdfdir=$ac_optarg ;;
1201
1202   -psdir | --psdir | --psdi | --psd | --ps)
1203     ac_prev=psdir ;;
1204   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1205     psdir=$ac_optarg ;;
1206
1207   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1208   | -silent | --silent | --silen | --sile | --sil)
1209     silent=yes ;;
1210
1211   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1212     ac_prev=sbindir ;;
1213   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1214   | --sbi=* | --sb=*)
1215     sbindir=$ac_optarg ;;
1216
1217   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1218   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1219   | --sharedst | --shareds | --shared | --share | --shar \
1220   | --sha | --sh)
1221     ac_prev=sharedstatedir ;;
1222   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1223   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1224   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1225   | --sha=* | --sh=*)
1226     sharedstatedir=$ac_optarg ;;
1227
1228   -site | --site | --sit)
1229     ac_prev=site ;;
1230   -site=* | --site=* | --sit=*)
1231     site=$ac_optarg ;;
1232
1233   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1234     ac_prev=srcdir ;;
1235   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1236     srcdir=$ac_optarg ;;
1237
1238   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1239   | --syscon | --sysco | --sysc | --sys | --sy)
1240     ac_prev=sysconfdir ;;
1241   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1242   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1243     sysconfdir=$ac_optarg ;;
1244
1245   -target | --target | --targe | --targ | --tar | --ta | --t)
1246     ac_prev=target_alias ;;
1247   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1248     target_alias=$ac_optarg ;;
1249
1250   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1251     verbose=yes ;;
1252
1253   -version | --version | --versio | --versi | --vers | -V)
1254     ac_init_version=: ;;
1255
1256   -with-* | --with-*)
1257     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1258     # Reject names that are not valid shell variable names.
1259     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1260       as_fn_error $? "invalid package name: $ac_useropt"
1261     ac_useropt_orig=$ac_useropt
1262     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1263     case $ac_user_opts in
1264       *"
1265 "with_$ac_useropt"
1266 "*) ;;
1267       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1268          ac_unrecognized_sep=', ';;
1269     esac
1270     eval with_$ac_useropt=\$ac_optarg ;;
1271
1272   -without-* | --without-*)
1273     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1274     # Reject names that are not valid shell variable names.
1275     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1276       as_fn_error $? "invalid package name: $ac_useropt"
1277     ac_useropt_orig=$ac_useropt
1278     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1279     case $ac_user_opts in
1280       *"
1281 "with_$ac_useropt"
1282 "*) ;;
1283       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1284          ac_unrecognized_sep=', ';;
1285     esac
1286     eval with_$ac_useropt=no ;;
1287
1288   --x)
1289     # Obsolete; use --with-x.
1290     with_x=yes ;;
1291
1292   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1293   | --x-incl | --x-inc | --x-in | --x-i)
1294     ac_prev=x_includes ;;
1295   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1296   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1297     x_includes=$ac_optarg ;;
1298
1299   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1300   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1301     ac_prev=x_libraries ;;
1302   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1303   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1304     x_libraries=$ac_optarg ;;
1305
1306   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1307 Try \`$0 --help' for more information"
1308     ;;
1309
1310   *=*)
1311     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1312     # Reject names that are not valid shell variable names.
1313     case $ac_envvar in #(
1314       '' | [0-9]* | *[!_$as_cr_alnum]* )
1315       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1316     esac
1317     eval $ac_envvar=\$ac_optarg
1318     export $ac_envvar ;;
1319
1320   *)
1321     # FIXME: should be removed in autoconf 3.0.
1322     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1323     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1324       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1325     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1326     ;;
1327
1328   esac
1329 done
1330
1331 if test -n "$ac_prev"; then
1332   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1333   as_fn_error $? "missing argument to $ac_option"
1334 fi
1335
1336 if test -n "$ac_unrecognized_opts"; then
1337   case $enable_option_checking in
1338     no) ;;
1339     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1340     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1341   esac
1342 fi
1343
1344 # Check all directory arguments for consistency.
1345 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1346                 datadir sysconfdir sharedstatedir localstatedir includedir \
1347                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1348                 libdir localedir mandir
1349 do
1350   eval ac_val=\$$ac_var
1351   # Remove trailing slashes.
1352   case $ac_val in
1353     */ )
1354       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1355       eval $ac_var=\$ac_val;;
1356   esac
1357   # Be sure to have absolute directory names.
1358   case $ac_val in
1359     [\\/$]* | ?:[\\/]* )  continue;;
1360     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1361   esac
1362   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1363 done
1364
1365 # There might be people who depend on the old broken behavior: `$host'
1366 # used to hold the argument of --host etc.
1367 # FIXME: To remove some day.
1368 build=$build_alias
1369 host=$host_alias
1370 target=$target_alias
1371
1372 # FIXME: To remove some day.
1373 if test "x$host_alias" != x; then
1374   if test "x$build_alias" = x; then
1375     cross_compiling=maybe
1376   elif test "x$build_alias" != "x$host_alias"; then
1377     cross_compiling=yes
1378   fi
1379 fi
1380
1381 ac_tool_prefix=
1382 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1383
1384 test "$silent" = yes && exec 6>/dev/null
1385
1386
1387 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1388 ac_ls_di=`ls -di .` &&
1389 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1390   as_fn_error $? "working directory cannot be determined"
1391 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1392   as_fn_error $? "pwd does not report name of working directory"
1393
1394
1395 # Find the source files, if location was not specified.
1396 if test -z "$srcdir"; then
1397   ac_srcdir_defaulted=yes
1398   # Try the directory containing this script, then the parent directory.
1399   ac_confdir=`$as_dirname -- "$as_myself" ||
1400 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1401          X"$as_myself" : 'X\(//\)[^/]' \| \
1402          X"$as_myself" : 'X\(//\)$' \| \
1403          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1404 $as_echo X"$as_myself" |
1405     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1406             s//\1/
1407             q
1408           }
1409           /^X\(\/\/\)[^/].*/{
1410             s//\1/
1411             q
1412           }
1413           /^X\(\/\/\)$/{
1414             s//\1/
1415             q
1416           }
1417           /^X\(\/\).*/{
1418             s//\1/
1419             q
1420           }
1421           s/.*/./; q'`
1422   srcdir=$ac_confdir
1423   if test ! -r "$srcdir/$ac_unique_file"; then
1424     srcdir=..
1425   fi
1426 else
1427   ac_srcdir_defaulted=no
1428 fi
1429 if test ! -r "$srcdir/$ac_unique_file"; then
1430   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1431   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1432 fi
1433 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1434 ac_abs_confdir=`(
1435         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1436         pwd)`
1437 # When building in place, set srcdir=.
1438 if test "$ac_abs_confdir" = "$ac_pwd"; then
1439   srcdir=.
1440 fi
1441 # Remove unnecessary trailing slashes from srcdir.
1442 # Double slashes in file names in object file debugging info
1443 # mess up M-x gdb in Emacs.
1444 case $srcdir in
1445 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1446 esac
1447 for ac_var in $ac_precious_vars; do
1448   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1449   eval ac_env_${ac_var}_value=\$${ac_var}
1450   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1451   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1452 done
1453
1454 #
1455 # Report the --help message.
1456 #
1457 if test "$ac_init_help" = "long"; then
1458   # Omit some internal or obsolete options to make the list less imposing.
1459   # This message is too long to be a string in the A/UX 3.1 sh.
1460   cat <<_ACEOF
1461 \`configure' configures this package to adapt to many kinds of systems.
1462
1463 Usage: $0 [OPTION]... [VAR=VALUE]...
1464
1465 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1466 VAR=VALUE.  See below for descriptions of some of the useful variables.
1467
1468 Defaults for the options are specified in brackets.
1469
1470 Configuration:
1471   -h, --help              display this help and exit
1472       --help=short        display options specific to this package
1473       --help=recursive    display the short help of all the included packages
1474   -V, --version           display version information and exit
1475   -q, --quiet, --silent   do not print \`checking ...' messages
1476       --cache-file=FILE   cache test results in FILE [disabled]
1477   -C, --config-cache      alias for \`--cache-file=config.cache'
1478   -n, --no-create         do not create output files
1479       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1480
1481 Installation directories:
1482   --prefix=PREFIX         install architecture-independent files in PREFIX
1483                           [$ac_default_prefix]
1484   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1485                           [PREFIX]
1486
1487 By default, \`make install' will install all the files in
1488 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1489 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1490 for instance \`--prefix=\$HOME'.
1491
1492 For better control, use the options below.
1493
1494 Fine tuning of the installation directories:
1495   --bindir=DIR            user executables [EPREFIX/bin]
1496   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1497   --libexecdir=DIR        program executables [EPREFIX/libexec]
1498   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1499   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1500   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1501   --libdir=DIR            object code libraries [EPREFIX/lib]
1502   --includedir=DIR        C header files [PREFIX/include]
1503   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1504   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1505   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1506   --infodir=DIR           info documentation [DATAROOTDIR/info]
1507   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1508   --mandir=DIR            man documentation [DATAROOTDIR/man]
1509   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1510   --htmldir=DIR           html documentation [DOCDIR]
1511   --dvidir=DIR            dvi documentation [DOCDIR]
1512   --pdfdir=DIR            pdf documentation [DOCDIR]
1513   --psdir=DIR             ps documentation [DOCDIR]
1514 _ACEOF
1515
1516   cat <<\_ACEOF
1517
1518 Program names:
1519   --program-prefix=PREFIX            prepend PREFIX to installed program names
1520   --program-suffix=SUFFIX            append SUFFIX to installed program names
1521   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1522
1523 X features:
1524   --x-includes=DIR    X include files are in DIR
1525   --x-libraries=DIR   X library files are in DIR
1526
1527 System types:
1528   --build=BUILD     configure for building on BUILD [guessed]
1529   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1530   --target=TARGET   configure for building compilers for TARGET [HOST]
1531 _ACEOF
1532 fi
1533
1534 if test -n "$ac_init_help"; then
1535
1536   cat <<\_ACEOF
1537
1538 Optional Features:
1539   --disable-option-checking  ignore unrecognized --enable/--with options
1540   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1541   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1542   --enable-maintainer-mode
1543                           enable make rules and dependencies not useful (and
1544                           sometimes confusing) to the casual installer
1545   --enable-plugins        Enable support for plugins
1546   --disable-largefile     omit support for large files
1547   --enable-targets=TARGETS
1548                           alternative target configurations
1549   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
1550   --disable-gdbcli        disable command-line interface (CLI)
1551   --disable-gdbmi         disable machine-interface (MI)
1552   --enable-tui            enable full-screen terminal user interface (TUI)
1553   --enable-gdbtk          enable gdbtk graphical user interface (GUI)
1554   --enable-profiling      enable profiling of GDB
1555   --enable-codesign=CERT  sign gdb with 'codesign -s CERT'
1556   --disable-rpath         do not hardcode runtime library paths
1557   --enable-libmcheck      Try linking with -lmcheck if available
1558   --enable-werror         treat compile warnings as errors
1559   --enable-build-warnings enable build-time compiler warnings if gcc is used
1560   --enable-gdb-build-warnings
1561                           enable GDB specific build-time compiler warnings if
1562                           gcc is used
1563   --enable-sim            link gdb with simulator
1564   --enable-multi-ice      build the multi-ice-gdb-server
1565   --enable-gdbserver      automatically build gdbserver (yes/no/auto, default
1566                           is auto)
1567
1568 Optional Packages:
1569   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1570   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1571   --with-separate-debug-dir=PATH
1572                           look for global separate debug info in this path
1573                           [LIBDIR/debug]
1574   --with-gdb-datadir=PATH look for global separate data files in this path
1575                           [DATADIR/gdb]
1576   --with-relocated-sources=PATH
1577                           automatically relocate this path for source files
1578   --with-auto-load-dir=PATH
1579                           directories from which to load auto-loaded scripts
1580                           [$debugdir:$datadir/auto-load]
1581   --with-auto-load-safe-path=PATH
1582                           directories safe to hold auto-loaded files
1583                           [--with-auto-load-dir]
1584   --without-auto-load-safe-path
1585                           do not restrict auto-loaded files locations
1586   --with-libunwind-ia64   use libunwind frame unwinding for ia64 targets
1587   --with-curses           use the curses library instead of the termcap
1588                           library
1589   --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
1590   --with-bugurl=URL       Direct users to URL to report a bug
1591   --with-system-zlib      use installed libz
1592   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1593   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
1594   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
1595   --with-iconv-bin=PATH   specify where to find the iconv program
1596   --with-system-readline  use installed readline library
1597   --with-jit-reader-dir=PATH
1598                           directory to load the JIT readers from
1599   --with-expat            include expat support (auto/yes/no)
1600   --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
1601   --without-libexpat-prefix     don't search for libexpat in includedir and libdir
1602   --with-mpfr             include MPFR support (auto/yes/no)
1603   --with-libmpfr-prefix[=DIR]  search for libmpfr in DIR/include and DIR/lib
1604   --without-libmpfr-prefix     don't search for libmpfr in includedir and libdir
1605   --with-python[=PYTHON]  include python support
1606                           (auto/yes/no/<python-program>)
1607   --with-guile[=GUILE]    include guile support
1608                           (auto/yes/no/<guile-version>/<pkg-config-program>)
1609   --with-intel-pt         include Intel Processor Trace support (auto/yes/no)
1610   --with-libipt-prefix[=DIR]  search for libipt in DIR/include and DIR/lib
1611   --without-libipt-prefix     don't search for libipt in includedir and libdir
1612   --without-included-regex
1613                           don't use included regex; this is the default on
1614                           systems with version 2 of the GNU C library (use
1615                           with caution on other system)
1616   --with-sysroot[=DIR]    search for usr/lib et al within DIR
1617   --with-system-gdbinit=PATH
1618                           automatically load a system-wide gdbinit file
1619   --with-lzma             support lzma compression (auto/yes/no)
1620   --with-liblzma-prefix[=DIR]  search for liblzma in DIR/include and DIR/lib
1621   --without-liblzma-prefix     don't search for liblzma in includedir and libdir
1622   --with-tcl              directory containing tcl configuration (tclConfig.sh)
1623   --with-tk               directory containing tk configuration (tkConfig.sh)
1624   --with-x                use the X Window System
1625   --with-babeltrace       include babeltrace support (auto/yes/no)
1626   --with-libbabeltrace-prefix[=DIR]  search for libbabeltrace in DIR/include and DIR/lib
1627   --without-libbabeltrace-prefix     don't search for libbabeltrace in includedir and libdir
1628
1629 Some influential environment variables:
1630   CC          C compiler command
1631   CFLAGS      C compiler flags
1632   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1633               nonstandard directory <lib dir>
1634   LIBS        libraries to pass to the linker, e.g. -l<library>
1635   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1636               you have headers in a nonstandard directory <include dir>
1637   CXX         C++ compiler command
1638   CXXFLAGS    C++ compiler flags
1639   CPP         C preprocessor
1640   MAKEINFO    Parent configure detects if it is of sufficient version.
1641   MAKEINFOFLAGS
1642               Parameters for MAKEINFO.
1643   YACC        The `Yet Another Compiler Compiler' implementation to use.
1644               Defaults to the first program found out of: `bison -y', `byacc',
1645               `yacc'.
1646   YFLAGS      The list of arguments that will be passed by default to $YACC.
1647               This script will default YFLAGS to the empty string to avoid a
1648               default value of `-d' given by some make applications.
1649   XMKMF       Path to xmkmf, Makefile generator for X Window System
1650
1651 Use these variables to override the choices made by `configure' or to help
1652 it to find libraries and programs with nonstandard names/locations.
1653
1654 Report bugs to the package provider.
1655 _ACEOF
1656 ac_status=$?
1657 fi
1658
1659 if test "$ac_init_help" = "recursive"; then
1660   # If there are subdirs, report their specific --help.
1661   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1662     test -d "$ac_dir" ||
1663       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1664       continue
1665     ac_builddir=.
1666
1667 case "$ac_dir" in
1668 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1669 *)
1670   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1671   # A ".." for each directory in $ac_dir_suffix.
1672   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1673   case $ac_top_builddir_sub in
1674   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1675   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1676   esac ;;
1677 esac
1678 ac_abs_top_builddir=$ac_pwd
1679 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1680 # for backward compatibility:
1681 ac_top_builddir=$ac_top_build_prefix
1682
1683 case $srcdir in
1684   .)  # We are building in place.
1685     ac_srcdir=.
1686     ac_top_srcdir=$ac_top_builddir_sub
1687     ac_abs_top_srcdir=$ac_pwd ;;
1688   [\\/]* | ?:[\\/]* )  # Absolute name.
1689     ac_srcdir=$srcdir$ac_dir_suffix;
1690     ac_top_srcdir=$srcdir
1691     ac_abs_top_srcdir=$srcdir ;;
1692   *) # Relative name.
1693     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1694     ac_top_srcdir=$ac_top_build_prefix$srcdir
1695     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1696 esac
1697 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1698
1699     cd "$ac_dir" || { ac_status=$?; continue; }
1700     # Check for guested configure.
1701     if test -f "$ac_srcdir/configure.gnu"; then
1702       echo &&
1703       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1704     elif test -f "$ac_srcdir/configure"; then
1705       echo &&
1706       $SHELL "$ac_srcdir/configure" --help=recursive
1707     else
1708       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1709     fi || ac_status=$?
1710     cd "$ac_pwd" || { ac_status=$?; break; }
1711   done
1712 fi
1713
1714 test -n "$ac_init_help" && exit $ac_status
1715 if $ac_init_version; then
1716   cat <<\_ACEOF
1717 configure
1718 generated by GNU Autoconf 2.69
1719
1720 Copyright (C) 2012 Free Software Foundation, Inc.
1721 This configure script is free software; the Free Software Foundation
1722 gives unlimited permission to copy, distribute and modify it.
1723 _ACEOF
1724   exit
1725 fi
1726
1727 ## ------------------------ ##
1728 ## Autoconf initialization. ##
1729 ## ------------------------ ##
1730
1731 # ac_fn_c_try_compile LINENO
1732 # --------------------------
1733 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1734 ac_fn_c_try_compile ()
1735 {
1736   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1737   rm -f conftest.$ac_objext
1738   if { { ac_try="$ac_compile"
1739 case "(($ac_try" in
1740   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1741   *) ac_try_echo=$ac_try;;
1742 esac
1743 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1744 $as_echo "$ac_try_echo"; } >&5
1745   (eval "$ac_compile") 2>conftest.err
1746   ac_status=$?
1747   if test -s conftest.err; then
1748     grep -v '^ *+' conftest.err >conftest.er1
1749     cat conftest.er1 >&5
1750     mv -f conftest.er1 conftest.err
1751   fi
1752   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1753   test $ac_status = 0; } && {
1754          test -z "$ac_c_werror_flag" ||
1755          test ! -s conftest.err
1756        } && test -s conftest.$ac_objext; then :
1757   ac_retval=0
1758 else
1759   $as_echo "$as_me: failed program was:" >&5
1760 sed 's/^/| /' conftest.$ac_ext >&5
1761
1762         ac_retval=1
1763 fi
1764   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1765   as_fn_set_status $ac_retval
1766
1767 } # ac_fn_c_try_compile
1768
1769 # ac_fn_cxx_try_compile LINENO
1770 # ----------------------------
1771 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1772 ac_fn_cxx_try_compile ()
1773 {
1774   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1775   rm -f conftest.$ac_objext
1776   if { { ac_try="$ac_compile"
1777 case "(($ac_try" in
1778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1779   *) ac_try_echo=$ac_try;;
1780 esac
1781 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1782 $as_echo "$ac_try_echo"; } >&5
1783   (eval "$ac_compile") 2>conftest.err
1784   ac_status=$?
1785   if test -s conftest.err; then
1786     grep -v '^ *+' conftest.err >conftest.er1
1787     cat conftest.er1 >&5
1788     mv -f conftest.er1 conftest.err
1789   fi
1790   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1791   test $ac_status = 0; } && {
1792          test -z "$ac_cxx_werror_flag" ||
1793          test ! -s conftest.err
1794        } && test -s conftest.$ac_objext; then :
1795   ac_retval=0
1796 else
1797   $as_echo "$as_me: failed program was:" >&5
1798 sed 's/^/| /' conftest.$ac_ext >&5
1799
1800         ac_retval=1
1801 fi
1802   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1803   as_fn_set_status $ac_retval
1804
1805 } # ac_fn_cxx_try_compile
1806
1807 # ac_fn_c_try_cpp LINENO
1808 # ----------------------
1809 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1810 ac_fn_c_try_cpp ()
1811 {
1812   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813   if { { ac_try="$ac_cpp conftest.$ac_ext"
1814 case "(($ac_try" in
1815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816   *) ac_try_echo=$ac_try;;
1817 esac
1818 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819 $as_echo "$ac_try_echo"; } >&5
1820   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1821   ac_status=$?
1822   if test -s conftest.err; then
1823     grep -v '^ *+' conftest.err >conftest.er1
1824     cat conftest.er1 >&5
1825     mv -f conftest.er1 conftest.err
1826   fi
1827   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828   test $ac_status = 0; } > conftest.i && {
1829          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1830          test ! -s conftest.err
1831        }; then :
1832   ac_retval=0
1833 else
1834   $as_echo "$as_me: failed program was:" >&5
1835 sed 's/^/| /' conftest.$ac_ext >&5
1836
1837     ac_retval=1
1838 fi
1839   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840   as_fn_set_status $ac_retval
1841
1842 } # ac_fn_c_try_cpp
1843
1844 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1845 # -------------------------------------------------------
1846 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1847 # the include files in INCLUDES and setting the cache variable VAR
1848 # accordingly.
1849 ac_fn_c_check_header_mongrel ()
1850 {
1851   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1852   if eval \${$3+:} false; then :
1853   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854 $as_echo_n "checking for $2... " >&6; }
1855 if eval \${$3+:} false; then :
1856   $as_echo_n "(cached) " >&6
1857 fi
1858 eval ac_res=\$$3
1859                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860 $as_echo "$ac_res" >&6; }
1861 else
1862   # Is the header compilable?
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1864 $as_echo_n "checking $2 usability... " >&6; }
1865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1866 /* end confdefs.h.  */
1867 $4
1868 #include <$2>
1869 _ACEOF
1870 if ac_fn_c_try_compile "$LINENO"; then :
1871   ac_header_compiler=yes
1872 else
1873   ac_header_compiler=no
1874 fi
1875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1877 $as_echo "$ac_header_compiler" >&6; }
1878
1879 # Is the header present?
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1881 $as_echo_n "checking $2 presence... " >&6; }
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883 /* end confdefs.h.  */
1884 #include <$2>
1885 _ACEOF
1886 if ac_fn_c_try_cpp "$LINENO"; then :
1887   ac_header_preproc=yes
1888 else
1889   ac_header_preproc=no
1890 fi
1891 rm -f conftest.err conftest.i conftest.$ac_ext
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1893 $as_echo "$ac_header_preproc" >&6; }
1894
1895 # So?  What about this header?
1896 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1897   yes:no: )
1898     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1899 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1900     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1901 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1902     ;;
1903   no:yes:* )
1904     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1905 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1906     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1907 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1908     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1909 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1910     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1911 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1912     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1913 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1914     ;;
1915 esac
1916   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1917 $as_echo_n "checking for $2... " >&6; }
1918 if eval \${$3+:} false; then :
1919   $as_echo_n "(cached) " >&6
1920 else
1921   eval "$3=\$ac_header_compiler"
1922 fi
1923 eval ac_res=\$$3
1924                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925 $as_echo "$ac_res" >&6; }
1926 fi
1927   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1928
1929 } # ac_fn_c_check_header_mongrel
1930
1931 # ac_fn_c_try_run LINENO
1932 # ----------------------
1933 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1934 # that executables *can* be run.
1935 ac_fn_c_try_run ()
1936 {
1937   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938   if { { ac_try="$ac_link"
1939 case "(($ac_try" in
1940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1941   *) ac_try_echo=$ac_try;;
1942 esac
1943 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1944 $as_echo "$ac_try_echo"; } >&5
1945   (eval "$ac_link") 2>&5
1946   ac_status=$?
1947   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1948   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1949   { { case "(($ac_try" in
1950   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1951   *) ac_try_echo=$ac_try;;
1952 esac
1953 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1954 $as_echo "$ac_try_echo"; } >&5
1955   (eval "$ac_try") 2>&5
1956   ac_status=$?
1957   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958   test $ac_status = 0; }; }; then :
1959   ac_retval=0
1960 else
1961   $as_echo "$as_me: program exited with status $ac_status" >&5
1962        $as_echo "$as_me: failed program was:" >&5
1963 sed 's/^/| /' conftest.$ac_ext >&5
1964
1965        ac_retval=$ac_status
1966 fi
1967   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1968   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1969   as_fn_set_status $ac_retval
1970
1971 } # ac_fn_c_try_run
1972
1973 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1974 # -------------------------------------------------------
1975 # Tests whether HEADER exists and can be compiled using the include files in
1976 # INCLUDES, setting the cache variable VAR accordingly.
1977 ac_fn_c_check_header_compile ()
1978 {
1979   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1981 $as_echo_n "checking for $2... " >&6; }
1982 if eval \${$3+:} false; then :
1983   $as_echo_n "(cached) " >&6
1984 else
1985   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986 /* end confdefs.h.  */
1987 $4
1988 #include <$2>
1989 _ACEOF
1990 if ac_fn_c_try_compile "$LINENO"; then :
1991   eval "$3=yes"
1992 else
1993   eval "$3=no"
1994 fi
1995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1996 fi
1997 eval ac_res=\$$3
1998                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999 $as_echo "$ac_res" >&6; }
2000   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2001
2002 } # ac_fn_c_check_header_compile
2003
2004 # ac_fn_c_try_link LINENO
2005 # -----------------------
2006 # Try to link conftest.$ac_ext, and return whether this succeeded.
2007 ac_fn_c_try_link ()
2008 {
2009   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010   rm -f conftest.$ac_objext conftest$ac_exeext
2011   if { { ac_try="$ac_link"
2012 case "(($ac_try" in
2013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2014   *) ac_try_echo=$ac_try;;
2015 esac
2016 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2017 $as_echo "$ac_try_echo"; } >&5
2018   (eval "$ac_link") 2>conftest.err
2019   ac_status=$?
2020   if test -s conftest.err; then
2021     grep -v '^ *+' conftest.err >conftest.er1
2022     cat conftest.er1 >&5
2023     mv -f conftest.er1 conftest.err
2024   fi
2025   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2026   test $ac_status = 0; } && {
2027          test -z "$ac_c_werror_flag" ||
2028          test ! -s conftest.err
2029        } && test -s conftest$ac_exeext && {
2030          test "$cross_compiling" = yes ||
2031          test -x conftest$ac_exeext
2032        }; then :
2033   ac_retval=0
2034 else
2035   $as_echo "$as_me: failed program was:" >&5
2036 sed 's/^/| /' conftest.$ac_ext >&5
2037
2038         ac_retval=1
2039 fi
2040   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2041   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2042   # interfere with the next link command; also delete a directory that is
2043   # left behind by Apple's compiler.  We do this before executing the actions.
2044   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2045   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2046   as_fn_set_status $ac_retval
2047
2048 } # ac_fn_c_try_link
2049
2050 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2051 # --------------------------------------------
2052 # Tries to find the compile-time value of EXPR in a program that includes
2053 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2054 # computed
2055 ac_fn_c_compute_int ()
2056 {
2057   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2058   if test "$cross_compiling" = yes; then
2059     # Depending upon the size, compute the lo and hi bounds.
2060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061 /* end confdefs.h.  */
2062 $4
2063 int
2064 main ()
2065 {
2066 static int test_array [1 - 2 * !(($2) >= 0)];
2067 test_array [0] = 0;
2068 return test_array [0];
2069
2070   ;
2071   return 0;
2072 }
2073 _ACEOF
2074 if ac_fn_c_try_compile "$LINENO"; then :
2075   ac_lo=0 ac_mid=0
2076   while :; do
2077     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078 /* end confdefs.h.  */
2079 $4
2080 int
2081 main ()
2082 {
2083 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2084 test_array [0] = 0;
2085 return test_array [0];
2086
2087   ;
2088   return 0;
2089 }
2090 _ACEOF
2091 if ac_fn_c_try_compile "$LINENO"; then :
2092   ac_hi=$ac_mid; break
2093 else
2094   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2095                         if test $ac_lo -le $ac_mid; then
2096                           ac_lo= ac_hi=
2097                           break
2098                         fi
2099                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2100 fi
2101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102   done
2103 else
2104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105 /* end confdefs.h.  */
2106 $4
2107 int
2108 main ()
2109 {
2110 static int test_array [1 - 2 * !(($2) < 0)];
2111 test_array [0] = 0;
2112 return test_array [0];
2113
2114   ;
2115   return 0;
2116 }
2117 _ACEOF
2118 if ac_fn_c_try_compile "$LINENO"; then :
2119   ac_hi=-1 ac_mid=-1
2120   while :; do
2121     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122 /* end confdefs.h.  */
2123 $4
2124 int
2125 main ()
2126 {
2127 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2128 test_array [0] = 0;
2129 return test_array [0];
2130
2131   ;
2132   return 0;
2133 }
2134 _ACEOF
2135 if ac_fn_c_try_compile "$LINENO"; then :
2136   ac_lo=$ac_mid; break
2137 else
2138   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2139                         if test $ac_mid -le $ac_hi; then
2140                           ac_lo= ac_hi=
2141                           break
2142                         fi
2143                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2144 fi
2145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146   done
2147 else
2148   ac_lo= ac_hi=
2149 fi
2150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151 fi
2152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153 # Binary search between lo and hi bounds.
2154 while test "x$ac_lo" != "x$ac_hi"; do
2155   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157 /* end confdefs.h.  */
2158 $4
2159 int
2160 main ()
2161 {
2162 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2163 test_array [0] = 0;
2164 return test_array [0];
2165
2166   ;
2167   return 0;
2168 }
2169 _ACEOF
2170 if ac_fn_c_try_compile "$LINENO"; then :
2171   ac_hi=$ac_mid
2172 else
2173   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2174 fi
2175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2176 done
2177 case $ac_lo in #((
2178 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2179 '') ac_retval=1 ;;
2180 esac
2181   else
2182     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183 /* end confdefs.h.  */
2184 $4
2185 static long int longval () { return $2; }
2186 static unsigned long int ulongval () { return $2; }
2187 #include <stdio.h>
2188 #include <stdlib.h>
2189 int
2190 main ()
2191 {
2192
2193   FILE *f = fopen ("conftest.val", "w");
2194   if (! f)
2195     return 1;
2196   if (($2) < 0)
2197     {
2198       long int i = longval ();
2199       if (i != ($2))
2200         return 1;
2201       fprintf (f, "%ld", i);
2202     }
2203   else
2204     {
2205       unsigned long int i = ulongval ();
2206       if (i != ($2))
2207         return 1;
2208       fprintf (f, "%lu", i);
2209     }
2210   /* Do not output a trailing newline, as this causes \r\n confusion
2211      on some platforms.  */
2212   return ferror (f) || fclose (f) != 0;
2213
2214   ;
2215   return 0;
2216 }
2217 _ACEOF
2218 if ac_fn_c_try_run "$LINENO"; then :
2219   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2220 else
2221   ac_retval=1
2222 fi
2223 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2224   conftest.$ac_objext conftest.beam conftest.$ac_ext
2225 rm -f conftest.val
2226
2227   fi
2228   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2229   as_fn_set_status $ac_retval
2230
2231 } # ac_fn_c_compute_int
2232
2233 # ac_fn_c_check_func LINENO FUNC VAR
2234 # ----------------------------------
2235 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2236 ac_fn_c_check_func ()
2237 {
2238   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2240 $as_echo_n "checking for $2... " >&6; }
2241 if eval \${$3+:} false; then :
2242   $as_echo_n "(cached) " >&6
2243 else
2244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h.  */
2246 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2247    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2248 #define $2 innocuous_$2
2249
2250 /* System header to define __stub macros and hopefully few prototypes,
2251     which can conflict with char $2 (); below.
2252     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2253     <limits.h> exists even on freestanding compilers.  */
2254
2255 #ifdef __STDC__
2256 # include <limits.h>
2257 #else
2258 # include <assert.h>
2259 #endif
2260
2261 #undef $2
2262
2263 /* Override any GCC internal prototype to avoid an error.
2264    Use char because int might match the return type of a GCC
2265    builtin and then its argument prototype would still apply.  */
2266 #ifdef __cplusplus
2267 extern "C"
2268 #endif
2269 char $2 ();
2270 /* The GNU C library defines this for functions which it implements
2271     to always fail with ENOSYS.  Some functions are actually named
2272     something starting with __ and the normal name is an alias.  */
2273 #if defined __stub_$2 || defined __stub___$2
2274 choke me
2275 #endif
2276
2277 int
2278 main ()
2279 {
2280 return $2 ();
2281   ;
2282   return 0;
2283 }
2284 _ACEOF
2285 if ac_fn_c_try_link "$LINENO"; then :
2286   eval "$3=yes"
2287 else
2288   eval "$3=no"
2289 fi
2290 rm -f core conftest.err conftest.$ac_objext \
2291     conftest$ac_exeext conftest.$ac_ext
2292 fi
2293 eval ac_res=\$$3
2294                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2295 $as_echo "$ac_res" >&6; }
2296   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2297
2298 } # ac_fn_c_check_func
2299
2300 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2301 # ----------------------------------------------------
2302 # Tries to find if the field MEMBER exists in type AGGR, after including
2303 # INCLUDES, setting cache variable VAR accordingly.
2304 ac_fn_c_check_member ()
2305 {
2306   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2308 $as_echo_n "checking for $2.$3... " >&6; }
2309 if eval \${$4+:} false; then :
2310   $as_echo_n "(cached) " >&6
2311 else
2312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313 /* end confdefs.h.  */
2314 $5
2315 int
2316 main ()
2317 {
2318 static $2 ac_aggr;
2319 if (ac_aggr.$3)
2320 return 0;
2321   ;
2322   return 0;
2323 }
2324 _ACEOF
2325 if ac_fn_c_try_compile "$LINENO"; then :
2326   eval "$4=yes"
2327 else
2328   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329 /* end confdefs.h.  */
2330 $5
2331 int
2332 main ()
2333 {
2334 static $2 ac_aggr;
2335 if (sizeof ac_aggr.$3)
2336 return 0;
2337   ;
2338   return 0;
2339 }
2340 _ACEOF
2341 if ac_fn_c_try_compile "$LINENO"; then :
2342   eval "$4=yes"
2343 else
2344   eval "$4=no"
2345 fi
2346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347 fi
2348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349 fi
2350 eval ac_res=\$$4
2351                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352 $as_echo "$ac_res" >&6; }
2353   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2354
2355 } # ac_fn_c_check_member
2356
2357 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2358 # -------------------------------------------
2359 # Tests whether TYPE exists after having included INCLUDES, setting cache
2360 # variable VAR accordingly.
2361 ac_fn_c_check_type ()
2362 {
2363   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2364   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2365 $as_echo_n "checking for $2... " >&6; }
2366 if eval \${$3+:} false; then :
2367   $as_echo_n "(cached) " >&6
2368 else
2369   eval "$3=no"
2370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371 /* end confdefs.h.  */
2372 $4
2373 int
2374 main ()
2375 {
2376 if (sizeof ($2))
2377          return 0;
2378   ;
2379   return 0;
2380 }
2381 _ACEOF
2382 if ac_fn_c_try_compile "$LINENO"; then :
2383   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2384 /* end confdefs.h.  */
2385 $4
2386 int
2387 main ()
2388 {
2389 if (sizeof (($2)))
2390             return 0;
2391   ;
2392   return 0;
2393 }
2394 _ACEOF
2395 if ac_fn_c_try_compile "$LINENO"; then :
2396
2397 else
2398   eval "$3=yes"
2399 fi
2400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401 fi
2402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403 fi
2404 eval ac_res=\$$3
2405                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406 $as_echo "$ac_res" >&6; }
2407   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2408
2409 } # ac_fn_c_check_type
2410
2411 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2412 # ---------------------------------------------
2413 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2414 # accordingly.
2415 ac_fn_c_check_decl ()
2416 {
2417   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418   as_decl_name=`echo $2|sed 's/ *(.*//'`
2419   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2420   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2421 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2422 if eval \${$3+:} false; then :
2423   $as_echo_n "(cached) " >&6
2424 else
2425   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426 /* end confdefs.h.  */
2427 $4
2428 int
2429 main ()
2430 {
2431 #ifndef $as_decl_name
2432 #ifdef __cplusplus
2433   (void) $as_decl_use;
2434 #else
2435   (void) $as_decl_name;
2436 #endif
2437 #endif
2438
2439   ;
2440   return 0;
2441 }
2442 _ACEOF
2443 if ac_fn_c_try_compile "$LINENO"; then :
2444   eval "$3=yes"
2445 else
2446   eval "$3=no"
2447 fi
2448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449 fi
2450 eval ac_res=\$$3
2451                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2452 $as_echo "$ac_res" >&6; }
2453   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2454
2455 } # ac_fn_c_check_decl
2456 cat >config.log <<_ACEOF
2457 This file contains any messages produced by compilers while
2458 running configure, to aid debugging if configure makes a mistake.
2459
2460 It was created by $as_me, which was
2461 generated by GNU Autoconf 2.69.  Invocation command line was
2462
2463   $ $0 $@
2464
2465 _ACEOF
2466 exec 5>>config.log
2467 {
2468 cat <<_ASUNAME
2469 ## --------- ##
2470 ## Platform. ##
2471 ## --------- ##
2472
2473 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2474 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2475 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2476 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2477 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2478
2479 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2480 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2481
2482 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2483 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2484 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2485 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2486 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2487 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2488 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2489
2490 _ASUNAME
2491
2492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2493 for as_dir in $PATH
2494 do
2495   IFS=$as_save_IFS
2496   test -z "$as_dir" && as_dir=.
2497     $as_echo "PATH: $as_dir"
2498   done
2499 IFS=$as_save_IFS
2500
2501 } >&5
2502
2503 cat >&5 <<_ACEOF
2504
2505
2506 ## ----------- ##
2507 ## Core tests. ##
2508 ## ----------- ##
2509
2510 _ACEOF
2511
2512
2513 # Keep a trace of the command line.
2514 # Strip out --no-create and --no-recursion so they do not pile up.
2515 # Strip out --silent because we don't want to record it for future runs.
2516 # Also quote any args containing shell meta-characters.
2517 # Make two passes to allow for proper duplicate-argument suppression.
2518 ac_configure_args=
2519 ac_configure_args0=
2520 ac_configure_args1=
2521 ac_must_keep_next=false
2522 for ac_pass in 1 2
2523 do
2524   for ac_arg
2525   do
2526     case $ac_arg in
2527     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2528     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2529     | -silent | --silent | --silen | --sile | --sil)
2530       continue ;;
2531     *\'*)
2532       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2533     esac
2534     case $ac_pass in
2535     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2536     2)
2537       as_fn_append ac_configure_args1 " '$ac_arg'"
2538       if test $ac_must_keep_next = true; then
2539         ac_must_keep_next=false # Got value, back to normal.
2540       else
2541         case $ac_arg in
2542           *=* | --config-cache | -C | -disable-* | --disable-* \
2543           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2544           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2545           | -with-* | --with-* | -without-* | --without-* | --x)
2546             case "$ac_configure_args0 " in
2547               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2548             esac
2549             ;;
2550           -* ) ac_must_keep_next=true ;;
2551         esac
2552       fi
2553       as_fn_append ac_configure_args " '$ac_arg'"
2554       ;;
2555     esac
2556   done
2557 done
2558 { ac_configure_args0=; unset ac_configure_args0;}
2559 { ac_configure_args1=; unset ac_configure_args1;}
2560
2561 # When interrupted or exit'd, cleanup temporary files, and complete
2562 # config.log.  We remove comments because anyway the quotes in there
2563 # would cause problems or look ugly.
2564 # WARNING: Use '\'' to represent an apostrophe within the trap.
2565 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2566 trap 'exit_status=$?
2567   # Save into config.log some information that might help in debugging.
2568   {
2569     echo
2570
2571     $as_echo "## ---------------- ##
2572 ## Cache variables. ##
2573 ## ---------------- ##"
2574     echo
2575     # The following way of writing the cache mishandles newlines in values,
2576 (
2577   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2578     eval ac_val=\$$ac_var
2579     case $ac_val in #(
2580     *${as_nl}*)
2581       case $ac_var in #(
2582       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2583 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2584       esac
2585       case $ac_var in #(
2586       _ | IFS | as_nl) ;; #(
2587       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2588       *) { eval $ac_var=; unset $ac_var;} ;;
2589       esac ;;
2590     esac
2591   done
2592   (set) 2>&1 |
2593     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2594     *${as_nl}ac_space=\ *)
2595       sed -n \
2596         "s/'\''/'\''\\\\'\'''\''/g;
2597           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2598       ;; #(
2599     *)
2600       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2601       ;;
2602     esac |
2603     sort
2604 )
2605     echo
2606
2607     $as_echo "## ----------------- ##
2608 ## Output variables. ##
2609 ## ----------------- ##"
2610     echo
2611     for ac_var in $ac_subst_vars
2612     do
2613       eval ac_val=\$$ac_var
2614       case $ac_val in
2615       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2616       esac
2617       $as_echo "$ac_var='\''$ac_val'\''"
2618     done | sort
2619     echo
2620
2621     if test -n "$ac_subst_files"; then
2622       $as_echo "## ------------------- ##
2623 ## File substitutions. ##
2624 ## ------------------- ##"
2625       echo
2626       for ac_var in $ac_subst_files
2627       do
2628         eval ac_val=\$$ac_var
2629         case $ac_val in
2630         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2631         esac
2632         $as_echo "$ac_var='\''$ac_val'\''"
2633       done | sort
2634       echo
2635     fi
2636
2637     if test -s confdefs.h; then
2638       $as_echo "## ----------- ##
2639 ## confdefs.h. ##
2640 ## ----------- ##"
2641       echo
2642       cat confdefs.h
2643       echo
2644     fi
2645     test "$ac_signal" != 0 &&
2646       $as_echo "$as_me: caught signal $ac_signal"
2647     $as_echo "$as_me: exit $exit_status"
2648   } >&5
2649   rm -f core *.core core.conftest.* &&
2650     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2651     exit $exit_status
2652 ' 0
2653 for ac_signal in 1 2 13 15; do
2654   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2655 done
2656 ac_signal=0
2657
2658 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2659 rm -f -r conftest* confdefs.h
2660
2661 $as_echo "/* confdefs.h */" > confdefs.h
2662
2663 # Predefined preprocessor variables.
2664
2665 cat >>confdefs.h <<_ACEOF
2666 #define PACKAGE_NAME "$PACKAGE_NAME"
2667 _ACEOF
2668
2669 cat >>confdefs.h <<_ACEOF
2670 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2671 _ACEOF
2672
2673 cat >>confdefs.h <<_ACEOF
2674 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2675 _ACEOF
2676
2677 cat >>confdefs.h <<_ACEOF
2678 #define PACKAGE_STRING "$PACKAGE_STRING"
2679 _ACEOF
2680
2681 cat >>confdefs.h <<_ACEOF
2682 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2683 _ACEOF
2684
2685 cat >>confdefs.h <<_ACEOF
2686 #define PACKAGE_URL "$PACKAGE_URL"
2687 _ACEOF
2688
2689
2690 # Let the site file select an alternate cache file if it wants to.
2691 # Prefer an explicitly selected file to automatically selected ones.
2692 ac_site_file1=NONE
2693 ac_site_file2=NONE
2694 if test -n "$CONFIG_SITE"; then
2695   # We do not want a PATH search for config.site.
2696   case $CONFIG_SITE in #((
2697     -*)  ac_site_file1=./$CONFIG_SITE;;
2698     */*) ac_site_file1=$CONFIG_SITE;;
2699     *)   ac_site_file1=./$CONFIG_SITE;;
2700   esac
2701 elif test "x$prefix" != xNONE; then
2702   ac_site_file1=$prefix/share/config.site
2703   ac_site_file2=$prefix/etc/config.site
2704 else
2705   ac_site_file1=$ac_default_prefix/share/config.site
2706   ac_site_file2=$ac_default_prefix/etc/config.site
2707 fi
2708 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2709 do
2710   test "x$ac_site_file" = xNONE && continue
2711   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2712     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2713 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2714     sed 's/^/| /' "$ac_site_file" >&5
2715     . "$ac_site_file" \
2716       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2717 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2718 as_fn_error $? "failed to load site script $ac_site_file
2719 See \`config.log' for more details" "$LINENO" 5; }
2720   fi
2721 done
2722
2723 if test -r "$cache_file"; then
2724   # Some versions of bash will fail to source /dev/null (special files
2725   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2726   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2727     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2728 $as_echo "$as_me: loading cache $cache_file" >&6;}
2729     case $cache_file in
2730       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2731       *)                      . "./$cache_file";;
2732     esac
2733   fi
2734 else
2735   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2736 $as_echo "$as_me: creating cache $cache_file" >&6;}
2737   >$cache_file
2738 fi
2739
2740 as_fn_append ac_header_list " stdlib.h"
2741 as_fn_append ac_header_list " unistd.h"
2742 as_fn_append ac_header_list " sys/param.h"
2743 # Check that the precious variables saved in the cache have kept the same
2744 # value.
2745 ac_cache_corrupted=false
2746 for ac_var in $ac_precious_vars; do
2747   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2748   eval ac_new_set=\$ac_env_${ac_var}_set
2749   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2750   eval ac_new_val=\$ac_env_${ac_var}_value
2751   case $ac_old_set,$ac_new_set in
2752     set,)
2753       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2754 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2755       ac_cache_corrupted=: ;;
2756     ,set)
2757       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2758 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2759       ac_cache_corrupted=: ;;
2760     ,);;
2761     *)
2762       if test "x$ac_old_val" != "x$ac_new_val"; then
2763         # differences in whitespace do not lead to failure.
2764         ac_old_val_w=`echo x $ac_old_val`
2765         ac_new_val_w=`echo x $ac_new_val`
2766         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2767           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2768 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2769           ac_cache_corrupted=:
2770         else
2771           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2772 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2773           eval $ac_var=\$ac_old_val
2774         fi
2775         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2776 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2777         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2778 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2779       fi;;
2780   esac
2781   # Pass precious variables to config.status.
2782   if test "$ac_new_set" = set; then
2783     case $ac_new_val in
2784     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2785     *) ac_arg=$ac_var=$ac_new_val ;;
2786     esac
2787     case " $ac_configure_args " in
2788       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2789       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2790     esac
2791   fi
2792 done
2793 if $ac_cache_corrupted; then
2794   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2795 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2796   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2797 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2798   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2799 fi
2800 ## -------------------- ##
2801 ## Main body of script. ##
2802 ## -------------------- ##
2803
2804 ac_ext=c
2805 ac_cpp='$CPP $CPPFLAGS'
2806 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2807 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2808 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2809
2810
2811
2812
2813
2814 ac_config_headers="$ac_config_headers config.h:config.in"
2815
2816
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2818 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2819     # Check whether --enable-maintainer-mode was given.
2820 if test "${enable_maintainer_mode+set}" = set; then :
2821   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2822 else
2823   USE_MAINTAINER_MODE=no
2824 fi
2825
2826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2827 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2828    if test $USE_MAINTAINER_MODE = yes; then
2829   MAINTAINER_MODE_TRUE=
2830   MAINTAINER_MODE_FALSE='#'
2831 else
2832   MAINTAINER_MODE_TRUE='#'
2833   MAINTAINER_MODE_FALSE=
2834 fi
2835
2836   MAINT=$MAINTAINER_MODE_TRUE
2837
2838
2839
2840 # Set the 'development' global.
2841 . $srcdir/../bfd/development.sh
2842
2843 ac_ext=c
2844 ac_cpp='$CPP $CPPFLAGS'
2845 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2846 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2848 if test -n "$ac_tool_prefix"; then
2849   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2850 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2852 $as_echo_n "checking for $ac_word... " >&6; }
2853 if ${ac_cv_prog_CC+:} false; then :
2854   $as_echo_n "(cached) " >&6
2855 else
2856   if test -n "$CC"; then
2857   ac_cv_prog_CC="$CC" # Let the user override the test.
2858 else
2859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2860 for as_dir in $PATH
2861 do
2862   IFS=$as_save_IFS
2863   test -z "$as_dir" && as_dir=.
2864     for ac_exec_ext in '' $ac_executable_extensions; do
2865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2866     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2868     break 2
2869   fi
2870 done
2871   done
2872 IFS=$as_save_IFS
2873
2874 fi
2875 fi
2876 CC=$ac_cv_prog_CC
2877 if test -n "$CC"; then
2878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2879 $as_echo "$CC" >&6; }
2880 else
2881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2882 $as_echo "no" >&6; }
2883 fi
2884
2885
2886 fi
2887 if test -z "$ac_cv_prog_CC"; then
2888   ac_ct_CC=$CC
2889   # Extract the first word of "gcc", so it can be a program name with args.
2890 set dummy gcc; ac_word=$2
2891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2892 $as_echo_n "checking for $ac_word... " >&6; }
2893 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2894   $as_echo_n "(cached) " >&6
2895 else
2896   if test -n "$ac_ct_CC"; then
2897   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2898 else
2899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2900 for as_dir in $PATH
2901 do
2902   IFS=$as_save_IFS
2903   test -z "$as_dir" && as_dir=.
2904     for ac_exec_ext in '' $ac_executable_extensions; do
2905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2906     ac_cv_prog_ac_ct_CC="gcc"
2907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2908     break 2
2909   fi
2910 done
2911   done
2912 IFS=$as_save_IFS
2913
2914 fi
2915 fi
2916 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2917 if test -n "$ac_ct_CC"; then
2918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2919 $as_echo "$ac_ct_CC" >&6; }
2920 else
2921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2922 $as_echo "no" >&6; }
2923 fi
2924
2925   if test "x$ac_ct_CC" = x; then
2926     CC=""
2927   else
2928     case $cross_compiling:$ac_tool_warned in
2929 yes:)
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2931 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2932 ac_tool_warned=yes ;;
2933 esac
2934     CC=$ac_ct_CC
2935   fi
2936 else
2937   CC="$ac_cv_prog_CC"
2938 fi
2939
2940 if test -z "$CC"; then
2941           if test -n "$ac_tool_prefix"; then
2942     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2943 set dummy ${ac_tool_prefix}cc; ac_word=$2
2944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2945 $as_echo_n "checking for $ac_word... " >&6; }
2946 if ${ac_cv_prog_CC+:} false; then :
2947   $as_echo_n "(cached) " >&6
2948 else
2949   if test -n "$CC"; then
2950   ac_cv_prog_CC="$CC" # Let the user override the test.
2951 else
2952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2953 for as_dir in $PATH
2954 do
2955   IFS=$as_save_IFS
2956   test -z "$as_dir" && as_dir=.
2957     for ac_exec_ext in '' $ac_executable_extensions; do
2958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2959     ac_cv_prog_CC="${ac_tool_prefix}cc"
2960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2961     break 2
2962   fi
2963 done
2964   done
2965 IFS=$as_save_IFS
2966
2967 fi
2968 fi
2969 CC=$ac_cv_prog_CC
2970 if test -n "$CC"; then
2971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2972 $as_echo "$CC" >&6; }
2973 else
2974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2975 $as_echo "no" >&6; }
2976 fi
2977
2978
2979   fi
2980 fi
2981 if test -z "$CC"; then
2982   # Extract the first word of "cc", so it can be a program name with args.
2983 set dummy cc; ac_word=$2
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2985 $as_echo_n "checking for $ac_word... " >&6; }
2986 if ${ac_cv_prog_CC+:} false; then :
2987   $as_echo_n "(cached) " >&6
2988 else
2989   if test -n "$CC"; then
2990   ac_cv_prog_CC="$CC" # Let the user override the test.
2991 else
2992   ac_prog_rejected=no
2993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2994 for as_dir in $PATH
2995 do
2996   IFS=$as_save_IFS
2997   test -z "$as_dir" && as_dir=.
2998     for ac_exec_ext in '' $ac_executable_extensions; do
2999   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3000     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3001        ac_prog_rejected=yes
3002        continue
3003      fi
3004     ac_cv_prog_CC="cc"
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 if test $ac_prog_rejected = yes; then
3013   # We found a bogon in the path, so make sure we never use it.
3014   set dummy $ac_cv_prog_CC
3015   shift
3016   if test $# != 0; then
3017     # We chose a different compiler from the bogus one.
3018     # However, it has the same basename, so the bogon will be chosen
3019     # first if we set CC to just the basename; use the full file name.
3020     shift
3021     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3022   fi
3023 fi
3024 fi
3025 fi
3026 CC=$ac_cv_prog_CC
3027 if test -n "$CC"; then
3028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3029 $as_echo "$CC" >&6; }
3030 else
3031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3032 $as_echo "no" >&6; }
3033 fi
3034
3035
3036 fi
3037 if test -z "$CC"; then
3038   if test -n "$ac_tool_prefix"; then
3039   for ac_prog in cl.exe
3040   do
3041     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3042 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3044 $as_echo_n "checking for $ac_word... " >&6; }
3045 if ${ac_cv_prog_CC+:} false; then :
3046   $as_echo_n "(cached) " >&6
3047 else
3048   if test -n "$CC"; then
3049   ac_cv_prog_CC="$CC" # Let the user override the test.
3050 else
3051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3052 for as_dir in $PATH
3053 do
3054   IFS=$as_save_IFS
3055   test -z "$as_dir" && as_dir=.
3056     for ac_exec_ext in '' $ac_executable_extensions; do
3057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3058     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3060     break 2
3061   fi
3062 done
3063   done
3064 IFS=$as_save_IFS
3065
3066 fi
3067 fi
3068 CC=$ac_cv_prog_CC
3069 if test -n "$CC"; then
3070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3071 $as_echo "$CC" >&6; }
3072 else
3073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3074 $as_echo "no" >&6; }
3075 fi
3076
3077
3078     test -n "$CC" && break
3079   done
3080 fi
3081 if test -z "$CC"; then
3082   ac_ct_CC=$CC
3083   for ac_prog in cl.exe
3084 do
3085   # Extract the first word of "$ac_prog", so it can be a program name with args.
3086 set dummy $ac_prog; ac_word=$2
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3088 $as_echo_n "checking for $ac_word... " >&6; }
3089 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3090   $as_echo_n "(cached) " >&6
3091 else
3092   if test -n "$ac_ct_CC"; then
3093   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3094 else
3095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3096 for as_dir in $PATH
3097 do
3098   IFS=$as_save_IFS
3099   test -z "$as_dir" && as_dir=.
3100     for ac_exec_ext in '' $ac_executable_extensions; do
3101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3102     ac_cv_prog_ac_ct_CC="$ac_prog"
3103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3104     break 2
3105   fi
3106 done
3107   done
3108 IFS=$as_save_IFS
3109
3110 fi
3111 fi
3112 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3113 if test -n "$ac_ct_CC"; then
3114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3115 $as_echo "$ac_ct_CC" >&6; }
3116 else
3117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3118 $as_echo "no" >&6; }
3119 fi
3120
3121
3122   test -n "$ac_ct_CC" && break
3123 done
3124
3125   if test "x$ac_ct_CC" = x; then
3126     CC=""
3127   else
3128     case $cross_compiling:$ac_tool_warned in
3129 yes:)
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3131 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3132 ac_tool_warned=yes ;;
3133 esac
3134     CC=$ac_ct_CC
3135   fi
3136 fi
3137
3138 fi
3139
3140
3141 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3142 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3143 as_fn_error $? "no acceptable C compiler found in \$PATH
3144 See \`config.log' for more details" "$LINENO" 5; }
3145
3146 # Provide some information about the compiler.
3147 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3148 set X $ac_compile
3149 ac_compiler=$2
3150 for ac_option in --version -v -V -qversion; do
3151   { { ac_try="$ac_compiler $ac_option >&5"
3152 case "(($ac_try" in
3153   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3154   *) ac_try_echo=$ac_try;;
3155 esac
3156 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3157 $as_echo "$ac_try_echo"; } >&5
3158   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3159   ac_status=$?
3160   if test -s conftest.err; then
3161     sed '10a\
3162 ... rest of stderr output deleted ...
3163          10q' conftest.err >conftest.er1
3164     cat conftest.er1 >&5
3165   fi
3166   rm -f conftest.er1 conftest.err
3167   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3168   test $ac_status = 0; }
3169 done
3170
3171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3172 /* end confdefs.h.  */
3173
3174 int
3175 main ()
3176 {
3177
3178   ;
3179   return 0;
3180 }
3181 _ACEOF
3182 ac_clean_files_save=$ac_clean_files
3183 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3184 # Try to create an executable without -o first, disregard a.out.
3185 # It will help us diagnose broken compilers, and finding out an intuition
3186 # of exeext.
3187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3188 $as_echo_n "checking whether the C compiler works... " >&6; }
3189 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3190
3191 # The possible output files:
3192 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3193
3194 ac_rmfiles=
3195 for ac_file in $ac_files
3196 do
3197   case $ac_file in
3198     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3199     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3200   esac
3201 done
3202 rm -f $ac_rmfiles
3203
3204 if { { ac_try="$ac_link_default"
3205 case "(($ac_try" in
3206   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3207   *) ac_try_echo=$ac_try;;
3208 esac
3209 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3210 $as_echo "$ac_try_echo"; } >&5
3211   (eval "$ac_link_default") 2>&5
3212   ac_status=$?
3213   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3214   test $ac_status = 0; }; then :
3215   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3216 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3217 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3218 # so that the user can short-circuit this test for compilers unknown to
3219 # Autoconf.
3220 for ac_file in $ac_files ''
3221 do
3222   test -f "$ac_file" || continue
3223   case $ac_file in
3224     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3225         ;;
3226     [ab].out )
3227         # We found the default executable, but exeext='' is most
3228         # certainly right.
3229         break;;
3230     *.* )
3231         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3232         then :; else
3233            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3234         fi
3235         # We set ac_cv_exeext here because the later test for it is not
3236         # safe: cross compilers may not add the suffix if given an `-o'
3237         # argument, so we may need to know it at that point already.
3238         # Even if this section looks crufty: it has the advantage of
3239         # actually working.
3240         break;;
3241     * )
3242         break;;
3243   esac
3244 done
3245 test "$ac_cv_exeext" = no && ac_cv_exeext=
3246
3247 else
3248   ac_file=''
3249 fi
3250 if test -z "$ac_file"; then :
3251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3252 $as_echo "no" >&6; }
3253 $as_echo "$as_me: failed program was:" >&5
3254 sed 's/^/| /' conftest.$ac_ext >&5
3255
3256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3257 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3258 as_fn_error 77 "C compiler cannot create executables
3259 See \`config.log' for more details" "$LINENO" 5; }
3260 else
3261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3262 $as_echo "yes" >&6; }
3263 fi
3264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3265 $as_echo_n "checking for C compiler default output file name... " >&6; }
3266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3267 $as_echo "$ac_file" >&6; }
3268 ac_exeext=$ac_cv_exeext
3269
3270 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3271 ac_clean_files=$ac_clean_files_save
3272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3273 $as_echo_n "checking for suffix of executables... " >&6; }
3274 if { { ac_try="$ac_link"
3275 case "(($ac_try" in
3276   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3277   *) ac_try_echo=$ac_try;;
3278 esac
3279 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3280 $as_echo "$ac_try_echo"; } >&5
3281   (eval "$ac_link") 2>&5
3282   ac_status=$?
3283   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3284   test $ac_status = 0; }; then :
3285   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3286 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3287 # work properly (i.e., refer to `conftest.exe'), while it won't with
3288 # `rm'.
3289 for ac_file in conftest.exe conftest conftest.*; do
3290   test -f "$ac_file" || continue
3291   case $ac_file in
3292     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3293     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3294           break;;
3295     * ) break;;
3296   esac
3297 done
3298 else
3299   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3300 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3301 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3302 See \`config.log' for more details" "$LINENO" 5; }
3303 fi
3304 rm -f conftest conftest$ac_cv_exeext
3305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3306 $as_echo "$ac_cv_exeext" >&6; }
3307
3308 rm -f conftest.$ac_ext
3309 EXEEXT=$ac_cv_exeext
3310 ac_exeext=$EXEEXT
3311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3312 /* end confdefs.h.  */
3313 #include <stdio.h>
3314 int
3315 main ()
3316 {
3317 FILE *f = fopen ("conftest.out", "w");
3318  return ferror (f) || fclose (f) != 0;
3319
3320   ;
3321   return 0;
3322 }
3323 _ACEOF
3324 ac_clean_files="$ac_clean_files conftest.out"
3325 # Check that the compiler produces executables we can run.  If not, either
3326 # the compiler is broken, or we cross compile.
3327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3328 $as_echo_n "checking whether we are cross compiling... " >&6; }
3329 if test "$cross_compiling" != yes; then
3330   { { ac_try="$ac_link"
3331 case "(($ac_try" in
3332   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3333   *) ac_try_echo=$ac_try;;
3334 esac
3335 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3336 $as_echo "$ac_try_echo"; } >&5
3337   (eval "$ac_link") 2>&5
3338   ac_status=$?
3339   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3340   test $ac_status = 0; }
3341   if { ac_try='./conftest$ac_cv_exeext'
3342   { { case "(($ac_try" in
3343   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3344   *) ac_try_echo=$ac_try;;
3345 esac
3346 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3347 $as_echo "$ac_try_echo"; } >&5
3348   (eval "$ac_try") 2>&5
3349   ac_status=$?
3350   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3351   test $ac_status = 0; }; }; then
3352     cross_compiling=no
3353   else
3354     if test "$cross_compiling" = maybe; then
3355         cross_compiling=yes
3356     else
3357         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3358 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3359 as_fn_error $? "cannot run C compiled programs.
3360 If you meant to cross compile, use \`--host'.
3361 See \`config.log' for more details" "$LINENO" 5; }
3362     fi
3363   fi
3364 fi
3365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3366 $as_echo "$cross_compiling" >&6; }
3367
3368 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3369 ac_clean_files=$ac_clean_files_save
3370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3371 $as_echo_n "checking for suffix of object files... " >&6; }
3372 if ${ac_cv_objext+:} false; then :
3373   $as_echo_n "(cached) " >&6
3374 else
3375   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3376 /* end confdefs.h.  */
3377
3378 int
3379 main ()
3380 {
3381
3382   ;
3383   return 0;
3384 }
3385 _ACEOF
3386 rm -f conftest.o conftest.obj
3387 if { { ac_try="$ac_compile"
3388 case "(($ac_try" in
3389   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3390   *) ac_try_echo=$ac_try;;
3391 esac
3392 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3393 $as_echo "$ac_try_echo"; } >&5
3394   (eval "$ac_compile") 2>&5
3395   ac_status=$?
3396   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3397   test $ac_status = 0; }; then :
3398   for ac_file in conftest.o conftest.obj conftest.*; do
3399   test -f "$ac_file" || continue;
3400   case $ac_file in
3401     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3402     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3403        break;;
3404   esac
3405 done
3406 else
3407   $as_echo "$as_me: failed program was:" >&5
3408 sed 's/^/| /' conftest.$ac_ext >&5
3409
3410 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3411 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3412 as_fn_error $? "cannot compute suffix of object files: cannot compile
3413 See \`config.log' for more details" "$LINENO" 5; }
3414 fi
3415 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3416 fi
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3418 $as_echo "$ac_cv_objext" >&6; }
3419 OBJEXT=$ac_cv_objext
3420 ac_objext=$OBJEXT
3421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3422 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3423 if ${ac_cv_c_compiler_gnu+:} false; then :
3424   $as_echo_n "(cached) " >&6
3425 else
3426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3427 /* end confdefs.h.  */
3428
3429 int
3430 main ()
3431 {
3432 #ifndef __GNUC__
3433        choke me
3434 #endif
3435
3436   ;
3437   return 0;
3438 }
3439 _ACEOF
3440 if ac_fn_c_try_compile "$LINENO"; then :
3441   ac_compiler_gnu=yes
3442 else
3443   ac_compiler_gnu=no
3444 fi
3445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3446 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3447
3448 fi
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3450 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3451 if test $ac_compiler_gnu = yes; then
3452   GCC=yes
3453 else
3454   GCC=
3455 fi
3456 ac_test_CFLAGS=${CFLAGS+set}
3457 ac_save_CFLAGS=$CFLAGS
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3459 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3460 if ${ac_cv_prog_cc_g+:} false; then :
3461   $as_echo_n "(cached) " >&6
3462 else
3463   ac_save_c_werror_flag=$ac_c_werror_flag
3464    ac_c_werror_flag=yes
3465    ac_cv_prog_cc_g=no
3466    CFLAGS="-g"
3467    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3468 /* end confdefs.h.  */
3469
3470 int
3471 main ()
3472 {
3473
3474   ;
3475   return 0;
3476 }
3477 _ACEOF
3478 if ac_fn_c_try_compile "$LINENO"; then :
3479   ac_cv_prog_cc_g=yes
3480 else
3481   CFLAGS=""
3482       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3483 /* end confdefs.h.  */
3484
3485 int
3486 main ()
3487 {
3488
3489   ;
3490   return 0;
3491 }
3492 _ACEOF
3493 if ac_fn_c_try_compile "$LINENO"; then :
3494
3495 else
3496   ac_c_werror_flag=$ac_save_c_werror_flag
3497          CFLAGS="-g"
3498          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3499 /* end confdefs.h.  */
3500
3501 int
3502 main ()
3503 {
3504
3505   ;
3506   return 0;
3507 }
3508 _ACEOF
3509 if ac_fn_c_try_compile "$LINENO"; then :
3510   ac_cv_prog_cc_g=yes
3511 fi
3512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3513 fi
3514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3515 fi
3516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3517    ac_c_werror_flag=$ac_save_c_werror_flag
3518 fi
3519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3520 $as_echo "$ac_cv_prog_cc_g" >&6; }
3521 if test "$ac_test_CFLAGS" = set; then
3522   CFLAGS=$ac_save_CFLAGS
3523 elif test $ac_cv_prog_cc_g = yes; then
3524   if test "$GCC" = yes; then
3525     CFLAGS="-g -O2"
3526   else
3527     CFLAGS="-g"
3528   fi
3529 else
3530   if test "$GCC" = yes; then
3531     CFLAGS="-O2"
3532   else
3533     CFLAGS=
3534   fi
3535 fi
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3537 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3538 if ${ac_cv_prog_cc_c89+:} false; then :
3539   $as_echo_n "(cached) " >&6
3540 else
3541   ac_cv_prog_cc_c89=no
3542 ac_save_CC=$CC
3543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3544 /* end confdefs.h.  */
3545 #include <stdarg.h>
3546 #include <stdio.h>
3547 struct stat;
3548 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3549 struct buf { int x; };
3550 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3551 static char *e (p, i)
3552      char **p;
3553      int i;
3554 {
3555   return p[i];
3556 }
3557 static char *f (char * (*g) (char **, int), char **p, ...)
3558 {
3559   char *s;
3560   va_list v;
3561   va_start (v,p);
3562   s = g (p, va_arg (v,int));
3563   va_end (v);
3564   return s;
3565 }
3566
3567 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3568    function prototypes and stuff, but not '\xHH' hex character constants.
3569    These don't provoke an error unfortunately, instead are silently treated
3570    as 'x'.  The following induces an error, until -std is added to get
3571    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3572    array size at least.  It's necessary to write '\x00'==0 to get something
3573    that's true only with -std.  */
3574 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3575
3576 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3577    inside strings and character constants.  */
3578 #define FOO(x) 'x'
3579 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3580
3581 int test (int i, double x);
3582 struct s1 {int (*f) (int a);};
3583 struct s2 {int (*f) (double a);};
3584 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3585 int argc;
3586 char **argv;
3587 int
3588 main ()
3589 {
3590 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3591   ;
3592   return 0;
3593 }
3594 _ACEOF
3595 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3596         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3597 do
3598   CC="$ac_save_CC $ac_arg"
3599   if ac_fn_c_try_compile "$LINENO"; then :
3600   ac_cv_prog_cc_c89=$ac_arg
3601 fi
3602 rm -f core conftest.err conftest.$ac_objext
3603   test "x$ac_cv_prog_cc_c89" != "xno" && break
3604 done
3605 rm -f conftest.$ac_ext
3606 CC=$ac_save_CC
3607
3608 fi
3609 # AC_CACHE_VAL
3610 case "x$ac_cv_prog_cc_c89" in
3611   x)
3612     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3613 $as_echo "none needed" >&6; } ;;
3614   xno)
3615     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3616 $as_echo "unsupported" >&6; } ;;
3617   *)
3618     CC="$CC $ac_cv_prog_cc_c89"
3619     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3620 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3621 esac
3622 if test "x$ac_cv_prog_cc_c89" != xno; then :
3623
3624 fi
3625
3626 ac_ext=c
3627 ac_cpp='$CPP $CPPFLAGS'
3628 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3629 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3630 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3631
3632 ac_ext=cpp
3633 ac_cpp='$CXXCPP $CPPFLAGS'
3634 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3635 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3636 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3637 if test -z "$CXX"; then
3638   if test -n "$CCC"; then
3639     CXX=$CCC
3640   else
3641     if test -n "$ac_tool_prefix"; then
3642   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3643   do
3644     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3645 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3647 $as_echo_n "checking for $ac_word... " >&6; }
3648 if ${ac_cv_prog_CXX+:} false; then :
3649   $as_echo_n "(cached) " >&6
3650 else
3651   if test -n "$CXX"; then
3652   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3653 else
3654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3655 for as_dir in $PATH
3656 do
3657   IFS=$as_save_IFS
3658   test -z "$as_dir" && as_dir=.
3659     for ac_exec_ext in '' $ac_executable_extensions; do
3660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3661     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3663     break 2
3664   fi
3665 done
3666   done
3667 IFS=$as_save_IFS
3668
3669 fi
3670 fi
3671 CXX=$ac_cv_prog_CXX
3672 if test -n "$CXX"; then
3673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3674 $as_echo "$CXX" >&6; }
3675 else
3676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3677 $as_echo "no" >&6; }
3678 fi
3679
3680
3681     test -n "$CXX" && break
3682   done
3683 fi
3684 if test -z "$CXX"; then
3685   ac_ct_CXX=$CXX
3686   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3687 do
3688   # Extract the first word of "$ac_prog", so it can be a program name with args.
3689 set dummy $ac_prog; ac_word=$2
3690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3691 $as_echo_n "checking for $ac_word... " >&6; }
3692 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3693   $as_echo_n "(cached) " >&6
3694 else
3695   if test -n "$ac_ct_CXX"; then
3696   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3697 else
3698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3699 for as_dir in $PATH
3700 do
3701   IFS=$as_save_IFS
3702   test -z "$as_dir" && as_dir=.
3703     for ac_exec_ext in '' $ac_executable_extensions; do
3704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3705     ac_cv_prog_ac_ct_CXX="$ac_prog"
3706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3707     break 2
3708   fi
3709 done
3710   done
3711 IFS=$as_save_IFS
3712
3713 fi
3714 fi
3715 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3716 if test -n "$ac_ct_CXX"; then
3717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3718 $as_echo "$ac_ct_CXX" >&6; }
3719 else
3720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3721 $as_echo "no" >&6; }
3722 fi
3723
3724
3725   test -n "$ac_ct_CXX" && break
3726 done
3727
3728   if test "x$ac_ct_CXX" = x; then
3729     CXX="g++"
3730   else
3731     case $cross_compiling:$ac_tool_warned in
3732 yes:)
3733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3734 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3735 ac_tool_warned=yes ;;
3736 esac
3737     CXX=$ac_ct_CXX
3738   fi
3739 fi
3740
3741   fi
3742 fi
3743 # Provide some information about the compiler.
3744 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3745 set X $ac_compile
3746 ac_compiler=$2
3747 for ac_option in --version -v -V -qversion; do
3748   { { ac_try="$ac_compiler $ac_option >&5"
3749 case "(($ac_try" in
3750   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3751   *) ac_try_echo=$ac_try;;
3752 esac
3753 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3754 $as_echo "$ac_try_echo"; } >&5
3755   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3756   ac_status=$?
3757   if test -s conftest.err; then
3758     sed '10a\
3759 ... rest of stderr output deleted ...
3760          10q' conftest.err >conftest.er1
3761     cat conftest.er1 >&5
3762   fi
3763   rm -f conftest.er1 conftest.err
3764   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3765   test $ac_status = 0; }
3766 done
3767
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3769 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3770 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3771   $as_echo_n "(cached) " >&6
3772 else
3773   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3774 /* end confdefs.h.  */
3775
3776 int
3777 main ()
3778 {
3779 #ifndef __GNUC__
3780        choke me
3781 #endif
3782
3783   ;
3784   return 0;
3785 }
3786 _ACEOF
3787 if ac_fn_cxx_try_compile "$LINENO"; then :
3788   ac_compiler_gnu=yes
3789 else
3790   ac_compiler_gnu=no
3791 fi
3792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3793 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3794
3795 fi
3796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3797 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3798 if test $ac_compiler_gnu = yes; then
3799   GXX=yes
3800 else
3801   GXX=
3802 fi
3803 ac_test_CXXFLAGS=${CXXFLAGS+set}
3804 ac_save_CXXFLAGS=$CXXFLAGS
3805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3806 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3807 if ${ac_cv_prog_cxx_g+:} false; then :
3808   $as_echo_n "(cached) " >&6
3809 else
3810   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3811    ac_cxx_werror_flag=yes
3812    ac_cv_prog_cxx_g=no
3813    CXXFLAGS="-g"
3814    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3815 /* end confdefs.h.  */
3816
3817 int
3818 main ()
3819 {
3820
3821   ;
3822   return 0;
3823 }
3824 _ACEOF
3825 if ac_fn_cxx_try_compile "$LINENO"; then :
3826   ac_cv_prog_cxx_g=yes
3827 else
3828   CXXFLAGS=""
3829       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3830 /* end confdefs.h.  */
3831
3832 int
3833 main ()
3834 {
3835
3836   ;
3837   return 0;
3838 }
3839 _ACEOF
3840 if ac_fn_cxx_try_compile "$LINENO"; then :
3841
3842 else
3843   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3844          CXXFLAGS="-g"
3845          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3846 /* end confdefs.h.  */
3847
3848 int
3849 main ()
3850 {
3851
3852   ;
3853   return 0;
3854 }
3855 _ACEOF
3856 if ac_fn_cxx_try_compile "$LINENO"; then :
3857   ac_cv_prog_cxx_g=yes
3858 fi
3859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3860 fi
3861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862 fi
3863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3864    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3865 fi
3866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3867 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3868 if test "$ac_test_CXXFLAGS" = set; then
3869   CXXFLAGS=$ac_save_CXXFLAGS
3870 elif test $ac_cv_prog_cxx_g = yes; then
3871   if test "$GXX" = yes; then
3872     CXXFLAGS="-g -O2"
3873   else
3874     CXXFLAGS="-g"
3875   fi
3876 else
3877   if test "$GXX" = yes; then
3878     CXXFLAGS="-O2"
3879   else
3880     CXXFLAGS=
3881   fi
3882 fi
3883 ac_ext=c
3884 ac_cpp='$CPP $CPPFLAGS'
3885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3888
3889
3890
3891 ac_ext=c
3892 ac_cpp='$CPP $CPPFLAGS'
3893 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3894 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3895 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3897 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3898 # On Suns, sometimes $CPP names a directory.
3899 if test -n "$CPP" && test -d "$CPP"; then
3900   CPP=
3901 fi
3902 if test -z "$CPP"; then
3903   if ${ac_cv_prog_CPP+:} false; then :
3904   $as_echo_n "(cached) " >&6
3905 else
3906       # Double quotes because CPP needs to be expanded
3907     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3908     do
3909       ac_preproc_ok=false
3910 for ac_c_preproc_warn_flag in '' yes
3911 do
3912   # Use a header file that comes with gcc, so configuring glibc
3913   # with a fresh cross-compiler works.
3914   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3915   # <limits.h> exists even on freestanding compilers.
3916   # On the NeXT, cc -E runs the code through the compiler's parser,
3917   # not just through cpp. "Syntax error" is here to catch this case.
3918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3919 /* end confdefs.h.  */
3920 #ifdef __STDC__
3921 # include <limits.h>
3922 #else
3923 # include <assert.h>
3924 #endif
3925                      Syntax error
3926 _ACEOF
3927 if ac_fn_c_try_cpp "$LINENO"; then :
3928
3929 else
3930   # Broken: fails on valid input.
3931 continue
3932 fi
3933 rm -f conftest.err conftest.i conftest.$ac_ext
3934
3935   # OK, works on sane cases.  Now check whether nonexistent headers
3936   # can be detected and how.
3937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3938 /* end confdefs.h.  */
3939 #include <ac_nonexistent.h>
3940 _ACEOF
3941 if ac_fn_c_try_cpp "$LINENO"; then :
3942   # Broken: success on invalid input.
3943 continue
3944 else
3945   # Passes both tests.
3946 ac_preproc_ok=:
3947 break
3948 fi
3949 rm -f conftest.err conftest.i conftest.$ac_ext
3950
3951 done
3952 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3953 rm -f conftest.i conftest.err conftest.$ac_ext
3954 if $ac_preproc_ok; then :
3955   break
3956 fi
3957
3958     done
3959     ac_cv_prog_CPP=$CPP
3960
3961 fi
3962   CPP=$ac_cv_prog_CPP
3963 else
3964   ac_cv_prog_CPP=$CPP
3965 fi
3966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3967 $as_echo "$CPP" >&6; }
3968 ac_preproc_ok=false
3969 for ac_c_preproc_warn_flag in '' yes
3970 do
3971   # Use a header file that comes with gcc, so configuring glibc
3972   # with a fresh cross-compiler works.
3973   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3974   # <limits.h> exists even on freestanding compilers.
3975   # On the NeXT, cc -E runs the code through the compiler's parser,
3976   # not just through cpp. "Syntax error" is here to catch this case.
3977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3978 /* end confdefs.h.  */
3979 #ifdef __STDC__
3980 # include <limits.h>
3981 #else
3982 # include <assert.h>
3983 #endif
3984                      Syntax error
3985 _ACEOF
3986 if ac_fn_c_try_cpp "$LINENO"; then :
3987
3988 else
3989   # Broken: fails on valid input.
3990 continue
3991 fi
3992 rm -f conftest.err conftest.i conftest.$ac_ext
3993
3994   # OK, works on sane cases.  Now check whether nonexistent headers
3995   # can be detected and how.
3996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997 /* end confdefs.h.  */
3998 #include <ac_nonexistent.h>
3999 _ACEOF
4000 if ac_fn_c_try_cpp "$LINENO"; then :
4001   # Broken: success on invalid input.
4002 continue
4003 else
4004   # Passes both tests.
4005 ac_preproc_ok=:
4006 break
4007 fi
4008 rm -f conftest.err conftest.i conftest.$ac_ext
4009
4010 done
4011 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4012 rm -f conftest.i conftest.err conftest.$ac_ext
4013 if $ac_preproc_ok; then :
4014
4015 else
4016   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4018 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4019 See \`config.log' for more details" "$LINENO" 5; }
4020 fi
4021
4022 ac_ext=c
4023 ac_cpp='$CPP $CPPFLAGS'
4024 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4025 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4026 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4027
4028
4029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4030 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4031 if ${ac_cv_path_GREP+:} false; then :
4032   $as_echo_n "(cached) " >&6
4033 else
4034   if test -z "$GREP"; then
4035   ac_path_GREP_found=false
4036   # Loop through the user's path and test for each of PROGNAME-LIST
4037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4038 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4039 do
4040   IFS=$as_save_IFS
4041   test -z "$as_dir" && as_dir=.
4042     for ac_prog in grep ggrep; do
4043     for ac_exec_ext in '' $ac_executable_extensions; do
4044       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4045       as_fn_executable_p "$ac_path_GREP" || continue
4046 # Check for GNU ac_path_GREP and select it if it is found.
4047   # Check for GNU $ac_path_GREP
4048 case `"$ac_path_GREP" --version 2>&1` in
4049 *GNU*)
4050   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4051 *)
4052   ac_count=0
4053   $as_echo_n 0123456789 >"conftest.in"
4054   while :
4055   do
4056     cat "conftest.in" "conftest.in" >"conftest.tmp"
4057     mv "conftest.tmp" "conftest.in"
4058     cp "conftest.in" "conftest.nl"
4059     $as_echo 'GREP' >> "conftest.nl"
4060     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4061     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4062     as_fn_arith $ac_count + 1 && ac_count=$as_val
4063     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4064       # Best one so far, save it but keep looking for a better one
4065       ac_cv_path_GREP="$ac_path_GREP"
4066       ac_path_GREP_max=$ac_count
4067     fi
4068     # 10*(2^10) chars as input seems more than enough
4069     test $ac_count -gt 10 && break
4070   done
4071   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4072 esac
4073
4074       $ac_path_GREP_found && break 3
4075     done
4076   done
4077   done
4078 IFS=$as_save_IFS
4079   if test -z "$ac_cv_path_GREP"; then
4080     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4081   fi
4082 else
4083   ac_cv_path_GREP=$GREP
4084 fi
4085
4086 fi
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4088 $as_echo "$ac_cv_path_GREP" >&6; }
4089  GREP="$ac_cv_path_GREP"
4090
4091
4092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4093 $as_echo_n "checking for egrep... " >&6; }
4094 if ${ac_cv_path_EGREP+:} false; then :
4095   $as_echo_n "(cached) " >&6
4096 else
4097   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4098    then ac_cv_path_EGREP="$GREP -E"
4099    else
4100      if test -z "$EGREP"; then
4101   ac_path_EGREP_found=false
4102   # Loop through the user's path and test for each of PROGNAME-LIST
4103   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4105 do
4106   IFS=$as_save_IFS
4107   test -z "$as_dir" && as_dir=.
4108     for ac_prog in egrep; do
4109     for ac_exec_ext in '' $ac_executable_extensions; do
4110       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4111       as_fn_executable_p "$ac_path_EGREP" || continue
4112 # Check for GNU ac_path_EGREP and select it if it is found.
4113   # Check for GNU $ac_path_EGREP
4114 case `"$ac_path_EGREP" --version 2>&1` in
4115 *GNU*)
4116   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4117 *)
4118   ac_count=0
4119   $as_echo_n 0123456789 >"conftest.in"
4120   while :
4121   do
4122     cat "conftest.in" "conftest.in" >"conftest.tmp"
4123     mv "conftest.tmp" "conftest.in"
4124     cp "conftest.in" "conftest.nl"
4125     $as_echo 'EGREP' >> "conftest.nl"
4126     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4127     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4128     as_fn_arith $ac_count + 1 && ac_count=$as_val
4129     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4130       # Best one so far, save it but keep looking for a better one
4131       ac_cv_path_EGREP="$ac_path_EGREP"
4132       ac_path_EGREP_max=$ac_count
4133     fi
4134     # 10*(2^10) chars as input seems more than enough
4135     test $ac_count -gt 10 && break
4136   done
4137   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4138 esac
4139
4140       $ac_path_EGREP_found && break 3
4141     done
4142   done
4143   done
4144 IFS=$as_save_IFS
4145   if test -z "$ac_cv_path_EGREP"; then
4146     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4147   fi
4148 else
4149   ac_cv_path_EGREP=$EGREP
4150 fi
4151
4152    fi
4153 fi
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4155 $as_echo "$ac_cv_path_EGREP" >&6; }
4156  EGREP="$ac_cv_path_EGREP"
4157
4158
4159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4160 $as_echo_n "checking for ANSI C header files... " >&6; }
4161 if ${ac_cv_header_stdc+:} false; then :
4162   $as_echo_n "(cached) " >&6
4163 else
4164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4165 /* end confdefs.h.  */
4166 #include <stdlib.h>
4167 #include <stdarg.h>
4168 #include <string.h>
4169 #include <float.h>
4170
4171 int
4172 main ()
4173 {
4174
4175   ;
4176   return 0;
4177 }
4178 _ACEOF
4179 if ac_fn_c_try_compile "$LINENO"; then :
4180   ac_cv_header_stdc=yes
4181 else
4182   ac_cv_header_stdc=no
4183 fi
4184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4185
4186 if test $ac_cv_header_stdc = yes; then
4187   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4188   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4189 /* end confdefs.h.  */
4190 #include <string.h>
4191
4192 _ACEOF
4193 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4194   $EGREP "memchr" >/dev/null 2>&1; then :
4195
4196 else
4197   ac_cv_header_stdc=no
4198 fi
4199 rm -f conftest*
4200
4201 fi
4202
4203 if test $ac_cv_header_stdc = yes; then
4204   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4206 /* end confdefs.h.  */
4207 #include <stdlib.h>
4208
4209 _ACEOF
4210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4211   $EGREP "free" >/dev/null 2>&1; then :
4212
4213 else
4214   ac_cv_header_stdc=no
4215 fi
4216 rm -f conftest*
4217
4218 fi
4219
4220 if test $ac_cv_header_stdc = yes; then
4221   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4222   if test "$cross_compiling" = yes; then :
4223   :
4224 else
4225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4226 /* end confdefs.h.  */
4227 #include <ctype.h>
4228 #include <stdlib.h>
4229 #if ((' ' & 0x0FF) == 0x020)
4230 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4231 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4232 #else
4233 # define ISLOWER(c) \
4234                    (('a' <= (c) && (c) <= 'i') \
4235                      || ('j' <= (c) && (c) <= 'r') \
4236                      || ('s' <= (c) && (c) <= 'z'))
4237 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4238 #endif
4239
4240 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4241 int
4242 main ()
4243 {
4244   int i;
4245   for (i = 0; i < 256; i++)
4246     if (XOR (islower (i), ISLOWER (i))
4247         || toupper (i) != TOUPPER (i))
4248       return 2;
4249   return 0;
4250 }
4251 _ACEOF
4252 if ac_fn_c_try_run "$LINENO"; then :
4253
4254 else
4255   ac_cv_header_stdc=no
4256 fi
4257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4258   conftest.$ac_objext conftest.beam conftest.$ac_ext
4259 fi
4260
4261 fi
4262 fi
4263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4264 $as_echo "$ac_cv_header_stdc" >&6; }
4265 if test $ac_cv_header_stdc = yes; then
4266
4267 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4268
4269 fi
4270
4271 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4272 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4273                   inttypes.h stdint.h unistd.h
4274 do :
4275   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4276 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4277 "
4278 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4279   cat >>confdefs.h <<_ACEOF
4280 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4281 _ACEOF
4282
4283 fi
4284
4285 done
4286
4287
4288
4289   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4290 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4291   MINIX=yes
4292 else
4293   MINIX=
4294 fi
4295
4296
4297   if test "$MINIX" = yes; then
4298
4299 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4300
4301
4302 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4303
4304
4305 $as_echo "#define _MINIX 1" >>confdefs.h
4306
4307   fi
4308
4309
4310   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4311 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4312 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4313   $as_echo_n "(cached) " >&6
4314 else
4315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4316 /* end confdefs.h.  */
4317
4318 #         define __EXTENSIONS__ 1
4319           $ac_includes_default
4320 int
4321 main ()
4322 {
4323
4324   ;
4325   return 0;
4326 }
4327 _ACEOF
4328 if ac_fn_c_try_compile "$LINENO"; then :
4329   ac_cv_safe_to_define___extensions__=yes
4330 else
4331   ac_cv_safe_to_define___extensions__=no
4332 fi
4333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4334 fi
4335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4336 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4337   test $ac_cv_safe_to_define___extensions__ = yes &&
4338     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4339
4340   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4341
4342   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4343
4344   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4345
4346   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4347
4348
4349 ac_aux_dir=
4350 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4351   if test -f "$ac_dir/install-sh"; then
4352     ac_aux_dir=$ac_dir
4353     ac_install_sh="$ac_aux_dir/install-sh -c"
4354     break
4355   elif test -f "$ac_dir/install.sh"; then
4356     ac_aux_dir=$ac_dir
4357     ac_install_sh="$ac_aux_dir/install.sh -c"
4358     break
4359   elif test -f "$ac_dir/shtool"; then
4360     ac_aux_dir=$ac_dir
4361     ac_install_sh="$ac_aux_dir/shtool install -c"
4362     break
4363   fi
4364 done
4365 if test -z "$ac_aux_dir"; then
4366   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4367 fi
4368
4369 # These three variables are undocumented and unsupported,
4370 # and are intended to be withdrawn in a future Autoconf release.
4371 # They can cause serious problems if a builder's source tree is in a directory
4372 # whose full name contains unusual characters.
4373 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4374 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4375 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4376
4377
4378 # Make sure we can run config.sub.
4379 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4380   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4381
4382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4383 $as_echo_n "checking build system type... " >&6; }
4384 if ${ac_cv_build+:} false; then :
4385   $as_echo_n "(cached) " >&6
4386 else
4387   ac_build_alias=$build_alias
4388 test "x$ac_build_alias" = x &&
4389   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4390 test "x$ac_build_alias" = x &&
4391   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4392 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4393   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4394
4395 fi
4396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4397 $as_echo "$ac_cv_build" >&6; }
4398 case $ac_cv_build in
4399 *-*-*) ;;
4400 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4401 esac
4402 build=$ac_cv_build
4403 ac_save_IFS=$IFS; IFS='-'
4404 set x $ac_cv_build
4405 shift
4406 build_cpu=$1
4407 build_vendor=$2
4408 shift; shift
4409 # Remember, the first character of IFS is used to create $*,
4410 # except with old shells:
4411 build_os=$*
4412 IFS=$ac_save_IFS
4413 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4414
4415
4416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4417 $as_echo_n "checking host system type... " >&6; }
4418 if ${ac_cv_host+:} false; then :
4419   $as_echo_n "(cached) " >&6
4420 else
4421   if test "x$host_alias" = x; then
4422   ac_cv_host=$ac_cv_build
4423 else
4424   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4425     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4426 fi
4427
4428 fi
4429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4430 $as_echo "$ac_cv_host" >&6; }
4431 case $ac_cv_host in
4432 *-*-*) ;;
4433 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4434 esac
4435 host=$ac_cv_host
4436 ac_save_IFS=$IFS; IFS='-'
4437 set x $ac_cv_host
4438 shift
4439 host_cpu=$1
4440 host_vendor=$2
4441 shift; shift
4442 # Remember, the first character of IFS is used to create $*,
4443 # except with old shells:
4444 host_os=$*
4445 IFS=$ac_save_IFS
4446 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4447
4448
4449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4450 $as_echo_n "checking target system type... " >&6; }
4451 if ${ac_cv_target+:} false; then :
4452   $as_echo_n "(cached) " >&6
4453 else
4454   if test "x$target_alias" = x; then
4455   ac_cv_target=$ac_cv_host
4456 else
4457   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4458     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4459 fi
4460
4461 fi
4462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4463 $as_echo "$ac_cv_target" >&6; }
4464 case $ac_cv_target in
4465 *-*-*) ;;
4466 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4467 esac
4468 target=$ac_cv_target
4469 ac_save_IFS=$IFS; IFS='-'
4470 set x $ac_cv_target
4471 shift
4472 target_cpu=$1
4473 target_vendor=$2
4474 shift; shift
4475 # Remember, the first character of IFS is used to create $*,
4476 # except with old shells:
4477 target_os=$*
4478 IFS=$ac_save_IFS
4479 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4480
4481
4482 # The aliases save the names the user supplied, while $host etc.
4483 # will get canonicalized.
4484 test -n "$target_alias" &&
4485   test "$program_prefix$program_suffix$program_transform_name" = \
4486     NONENONEs,x,x, &&
4487   program_prefix=${target_alias}-
4488
4489 # The tests for host and target for $enable_largefile require
4490 # canonical names.
4491
4492
4493
4494 # As the $enable_largefile decision depends on --enable-plugins we must set it
4495 # even in directories otherwise not depending on the $plugins option.
4496
4497
4498   maybe_plugins=no
4499   for ac_header in dlfcn.h
4500 do :
4501   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4502 "
4503 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4504   cat >>confdefs.h <<_ACEOF
4505 #define HAVE_DLFCN_H 1
4506 _ACEOF
4507  maybe_plugins=yes
4508 fi
4509
4510 done
4511
4512   for ac_header in windows.h
4513 do :
4514   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4515 "
4516 if test "x$ac_cv_header_windows_h" = xyes; then :
4517   cat >>confdefs.h <<_ACEOF
4518 #define HAVE_WINDOWS_H 1
4519 _ACEOF
4520  maybe_plugins=yes
4521 fi
4522
4523 done
4524
4525
4526   # Check whether --enable-plugins was given.
4527 if test "${enable_plugins+set}" = set; then :
4528   enableval=$enable_plugins; case "${enableval}" in
4529       no) plugins=no ;;
4530       *) plugins=yes
4531          if test "$maybe_plugins" != "yes" ; then
4532            as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4533          fi ;;
4534      esac
4535 else
4536   plugins=$maybe_plugins
4537
4538 fi
4539
4540   if test "$plugins" = "yes"; then
4541     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4542 $as_echo_n "checking for library containing dlsym... " >&6; }
4543 if ${ac_cv_search_dlsym+:} false; then :
4544   $as_echo_n "(cached) " >&6
4545 else
4546   ac_func_search_save_LIBS=$LIBS
4547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4548 /* end confdefs.h.  */
4549
4550 /* Override any GCC internal prototype to avoid an error.
4551    Use char because int might match the return type of a GCC
4552    builtin and then its argument prototype would still apply.  */
4553 #ifdef __cplusplus
4554 extern "C"
4555 #endif
4556 char dlsym ();
4557 int
4558 main ()
4559 {
4560 return dlsym ();
4561   ;
4562   return 0;
4563 }
4564 _ACEOF
4565 for ac_lib in '' dl; do
4566   if test -z "$ac_lib"; then
4567     ac_res="none required"
4568   else
4569     ac_res=-l$ac_lib
4570     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4571   fi
4572   if ac_fn_c_try_link "$LINENO"; then :
4573   ac_cv_search_dlsym=$ac_res
4574 fi
4575 rm -f core conftest.err conftest.$ac_objext \
4576     conftest$ac_exeext
4577   if ${ac_cv_search_dlsym+:} false; then :
4578   break
4579 fi
4580 done
4581 if ${ac_cv_search_dlsym+:} false; then :
4582
4583 else
4584   ac_cv_search_dlsym=no
4585 fi
4586 rm conftest.$ac_ext
4587 LIBS=$ac_func_search_save_LIBS
4588 fi
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4590 $as_echo "$ac_cv_search_dlsym" >&6; }
4591 ac_res=$ac_cv_search_dlsym
4592 if test "$ac_res" != no; then :
4593   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4594
4595 fi
4596
4597   fi
4598
4599
4600 case "${host}" in
4601   sparc-*-solaris*|i[3-7]86-*-solaris*)
4602     # On native 32bit sparc and ia32 solaris, large-file and procfs support
4603     # are mutually exclusive; and without procfs support, the bfd/ elf module
4604     # cannot provide certain routines such as elfcore_write_prpsinfo
4605     # or elfcore_write_prstatus.  So unless the user explicitly requested
4606     # large-file support through the --enable-largefile switch, disable
4607     # large-file support in favor of procfs support.
4608     test "${target}" = "${host}" -a "x$plugins" = xno \
4609       && : ${enable_largefile="no"}
4610     ;;
4611 esac
4612
4613 # Check whether --enable-largefile was given.
4614 if test "${enable_largefile+set}" = set; then :
4615   enableval=$enable_largefile;
4616 fi
4617
4618 if test "$enable_largefile" != no; then
4619
4620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4621 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4622 if ${ac_cv_sys_largefile_CC+:} false; then :
4623   $as_echo_n "(cached) " >&6
4624 else
4625   ac_cv_sys_largefile_CC=no
4626      if test "$GCC" != yes; then
4627        ac_save_CC=$CC
4628        while :; do
4629          # IRIX 6.2 and later do not support large files by default,
4630          # so use the C compiler's -n32 option if that helps.
4631          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4632 /* end confdefs.h.  */
4633 #include <sys/types.h>
4634  /* Check that off_t can represent 2**63 - 1 correctly.
4635     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4636     since some C++ compilers masquerading as C compilers
4637     incorrectly reject 9223372036854775807.  */
4638 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4639   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4640                        && LARGE_OFF_T % 2147483647 == 1)
4641                       ? 1 : -1];
4642 int
4643 main ()
4644 {
4645
4646   ;
4647   return 0;
4648 }
4649 _ACEOF
4650          if ac_fn_c_try_compile "$LINENO"; then :
4651   break
4652 fi
4653 rm -f core conftest.err conftest.$ac_objext
4654          CC="$CC -n32"
4655          if ac_fn_c_try_compile "$LINENO"; then :
4656   ac_cv_sys_largefile_CC=' -n32'; break
4657 fi
4658 rm -f core conftest.err conftest.$ac_objext
4659          break
4660        done
4661        CC=$ac_save_CC
4662        rm -f conftest.$ac_ext
4663     fi
4664 fi
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4666 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4667   if test "$ac_cv_sys_largefile_CC" != no; then
4668     CC=$CC$ac_cv_sys_largefile_CC
4669   fi
4670
4671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4672 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4673 if ${ac_cv_sys_file_offset_bits+:} false; then :
4674   $as_echo_n "(cached) " >&6
4675 else
4676   while :; do
4677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4678 /* end confdefs.h.  */
4679 #include <sys/types.h>
4680  /* Check that off_t can represent 2**63 - 1 correctly.
4681     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4682     since some C++ compilers masquerading as C compilers
4683     incorrectly reject 9223372036854775807.  */
4684 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4685   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4686                        && LARGE_OFF_T % 2147483647 == 1)
4687                       ? 1 : -1];
4688 int
4689 main ()
4690 {
4691
4692   ;
4693   return 0;
4694 }
4695 _ACEOF
4696 if ac_fn_c_try_compile "$LINENO"; then :
4697   ac_cv_sys_file_offset_bits=no; break
4698 fi
4699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4701 /* end confdefs.h.  */
4702 #define _FILE_OFFSET_BITS 64
4703 #include <sys/types.h>
4704  /* Check that off_t can represent 2**63 - 1 correctly.
4705     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4706     since some C++ compilers masquerading as C compilers
4707     incorrectly reject 9223372036854775807.  */
4708 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4709   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4710                        && LARGE_OFF_T % 2147483647 == 1)
4711                       ? 1 : -1];
4712 int
4713 main ()
4714 {
4715
4716   ;
4717   return 0;
4718 }
4719 _ACEOF
4720 if ac_fn_c_try_compile "$LINENO"; then :
4721   ac_cv_sys_file_offset_bits=64; break
4722 fi
4723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4724   ac_cv_sys_file_offset_bits=unknown
4725   break
4726 done
4727 fi
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4729 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4730 case $ac_cv_sys_file_offset_bits in #(
4731   no | unknown) ;;
4732   *)
4733 cat >>confdefs.h <<_ACEOF
4734 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4735 _ACEOF
4736 ;;
4737 esac
4738 rm -rf conftest*
4739   if test $ac_cv_sys_file_offset_bits = unknown; then
4740     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4741 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4742 if ${ac_cv_sys_large_files+:} false; then :
4743   $as_echo_n "(cached) " >&6
4744 else
4745   while :; do
4746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4747 /* end confdefs.h.  */
4748 #include <sys/types.h>
4749  /* Check that off_t can represent 2**63 - 1 correctly.
4750     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4751     since some C++ compilers masquerading as C compilers
4752     incorrectly reject 9223372036854775807.  */
4753 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4754   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4755                        && LARGE_OFF_T % 2147483647 == 1)
4756                       ? 1 : -1];
4757 int
4758 main ()
4759 {
4760
4761   ;
4762   return 0;
4763 }
4764 _ACEOF
4765 if ac_fn_c_try_compile "$LINENO"; then :
4766   ac_cv_sys_large_files=no; break
4767 fi
4768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4769   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4770 /* end confdefs.h.  */
4771 #define _LARGE_FILES 1
4772 #include <sys/types.h>
4773  /* Check that off_t can represent 2**63 - 1 correctly.
4774     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4775     since some C++ compilers masquerading as C compilers
4776     incorrectly reject 9223372036854775807.  */
4777 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4778   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4779                        && LARGE_OFF_T % 2147483647 == 1)
4780                       ? 1 : -1];
4781 int
4782 main ()
4783 {
4784
4785   ;
4786   return 0;
4787 }
4788 _ACEOF
4789 if ac_fn_c_try_compile "$LINENO"; then :
4790   ac_cv_sys_large_files=1; break
4791 fi
4792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4793   ac_cv_sys_large_files=unknown
4794   break
4795 done
4796 fi
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4798 $as_echo "$ac_cv_sys_large_files" >&6; }
4799 case $ac_cv_sys_large_files in #(
4800   no | unknown) ;;
4801   *)
4802 cat >>confdefs.h <<_ACEOF
4803 #define _LARGE_FILES $ac_cv_sys_large_files
4804 _ACEOF
4805 ;;
4806 esac
4807 rm -rf conftest*
4808   fi
4809
4810
4811 fi
4812
4813
4814
4815
4816
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4818 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4819 if ${am_cv_prog_cc_stdc+:} false; then :
4820   $as_echo_n "(cached) " >&6
4821 else
4822   am_cv_prog_cc_stdc=no
4823 ac_save_CC="$CC"
4824 # Don't try gcc -ansi; that turns off useful extensions and
4825 # breaks some systems' header files.
4826 # AIX                   -qlanglvl=ansi
4827 # Ultrix and OSF/1      -std1
4828 # HP-UX 10.20 and later -Ae
4829 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4830 # SVR4                  -Xc -D__EXTENSIONS__
4831 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4832 do
4833   CC="$ac_save_CC $ac_arg"
4834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4835 /* end confdefs.h.  */
4836 #include <stdarg.h>
4837 #include <stdio.h>
4838 #include <sys/types.h>
4839 #include <sys/stat.h>
4840 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4841 struct buf { int x; };
4842 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4843 static char *e (p, i)
4844      char **p;
4845      int i;
4846 {
4847   return p[i];
4848 }
4849 static char *f (char * (*g) (char **, int), char **p, ...)
4850 {
4851   char *s;
4852   va_list v;
4853   va_start (v,p);
4854   s = g (p, va_arg (v,int));
4855   va_end (v);
4856   return s;
4857 }
4858 int test (int i, double x);
4859 struct s1 {int (*f) (int a);};
4860 struct s2 {int (*f) (double a);};
4861 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4862 int argc;
4863 char **argv;
4864
4865 int
4866 main ()
4867 {
4868
4869 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4870
4871   ;
4872   return 0;
4873 }
4874 _ACEOF
4875 if ac_fn_c_try_compile "$LINENO"; then :
4876   am_cv_prog_cc_stdc="$ac_arg"; break
4877 fi
4878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4879 done
4880 CC="$ac_save_CC"
4881
4882 fi
4883
4884 if test -z "$am_cv_prog_cc_stdc"; then
4885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4886 $as_echo "none needed" >&6; }
4887 else
4888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4889 $as_echo "$am_cv_prog_cc_stdc" >&6; }
4890 fi
4891 case "x$am_cv_prog_cc_stdc" in
4892   x|xno) ;;
4893   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4894 esac
4895
4896 # Expand $ac_aux_dir to an absolute path.
4897 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4898
4899 if test x"${install_sh+set}" != xset; then
4900   case $am_aux_dir in
4901   *\ * | *\     *)
4902     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4903   *)
4904     install_sh="\${SHELL} $am_aux_dir/install-sh"
4905   esac
4906 fi
4907
4908 # Installed binaries are usually stripped using 'strip' when the user
4909 # run "make install-strip".  However 'strip' might not be the right
4910 # tool to use in cross-compilation environments, therefore Automake
4911 # will honor the 'STRIP' environment variable to overrule this program.
4912 if test "$cross_compiling" != no; then
4913   if test -n "$ac_tool_prefix"; then
4914   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4915 set dummy ${ac_tool_prefix}strip; ac_word=$2
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4917 $as_echo_n "checking for $ac_word... " >&6; }
4918 if ${ac_cv_prog_STRIP+:} false; then :
4919   $as_echo_n "(cached) " >&6
4920 else
4921   if test -n "$STRIP"; then
4922   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4923 else
4924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4925 for as_dir in $PATH
4926 do
4927   IFS=$as_save_IFS
4928   test -z "$as_dir" && as_dir=.
4929     for ac_exec_ext in '' $ac_executable_extensions; do
4930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4931     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4933     break 2
4934   fi
4935 done
4936   done
4937 IFS=$as_save_IFS
4938
4939 fi
4940 fi
4941 STRIP=$ac_cv_prog_STRIP
4942 if test -n "$STRIP"; then
4943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4944 $as_echo "$STRIP" >&6; }
4945 else
4946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947 $as_echo "no" >&6; }
4948 fi
4949
4950
4951 fi
4952 if test -z "$ac_cv_prog_STRIP"; then
4953   ac_ct_STRIP=$STRIP
4954   # Extract the first word of "strip", so it can be a program name with args.
4955 set dummy strip; ac_word=$2
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4957 $as_echo_n "checking for $ac_word... " >&6; }
4958 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4959   $as_echo_n "(cached) " >&6
4960 else
4961   if test -n "$ac_ct_STRIP"; then
4962   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4963 else
4964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4965 for as_dir in $PATH
4966 do
4967   IFS=$as_save_IFS
4968   test -z "$as_dir" && as_dir=.
4969     for ac_exec_ext in '' $ac_executable_extensions; do
4970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4971     ac_cv_prog_ac_ct_STRIP="strip"
4972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4973     break 2
4974   fi
4975 done
4976   done
4977 IFS=$as_save_IFS
4978
4979 fi
4980 fi
4981 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4982 if test -n "$ac_ct_STRIP"; then
4983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4984 $as_echo "$ac_ct_STRIP" >&6; }
4985 else
4986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4987 $as_echo "no" >&6; }
4988 fi
4989
4990   if test "x$ac_ct_STRIP" = x; then
4991     STRIP=":"
4992   else
4993     case $cross_compiling:$ac_tool_warned in
4994 yes:)
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4996 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4997 ac_tool_warned=yes ;;
4998 esac
4999     STRIP=$ac_ct_STRIP
5000   fi
5001 else
5002   STRIP="$ac_cv_prog_STRIP"
5003 fi
5004
5005 fi
5006 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5007
5008
5009 ac_aux_dir=
5010 for ac_dir in .. "$srcdir"/..; do
5011   if test -f "$ac_dir/install-sh"; then
5012     ac_aux_dir=$ac_dir
5013     ac_install_sh="$ac_aux_dir/install-sh -c"
5014     break
5015   elif test -f "$ac_dir/install.sh"; then
5016     ac_aux_dir=$ac_dir
5017     ac_install_sh="$ac_aux_dir/install.sh -c"
5018     break
5019   elif test -f "$ac_dir/shtool"; then
5020     ac_aux_dir=$ac_dir
5021     ac_install_sh="$ac_aux_dir/shtool install -c"
5022     break
5023   fi
5024 done
5025 if test -z "$ac_aux_dir"; then
5026   as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5027 fi
5028
5029 # These three variables are undocumented and unsupported,
5030 # and are intended to be withdrawn in a future Autoconf release.
5031 # They can cause serious problems if a builder's source tree is in a directory
5032 # whose full name contains unusual characters.
5033 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
5034 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
5035 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
5036
5037
5038
5039 test "$program_prefix" != NONE &&
5040   program_transform_name="s&^&$program_prefix&;$program_transform_name"
5041 # Use a double $ so make ignores it.
5042 test "$program_suffix" != NONE &&
5043   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5044 # Double any \ or $.
5045 # By default was `s,x,x', remove it if useless.
5046 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5047 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5048
5049
5050 # We require a C++11 compiler.  Check if one is available, and if
5051 # necessary, set CXX_DIALECT to some -std=xxx switch.
5052
5053   ax_cxx_compile_alternatives="11 0x"    ax_cxx_compile_cxx11_required=true
5054   ac_ext=cpp
5055 ac_cpp='$CXXCPP $CPPFLAGS'
5056 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5057 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5058 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5059   CXX_DIALECT=""
5060   ac_success=no
5061   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5062 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5063 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5064   $as_echo_n "(cached) " >&6
5065 else
5066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5067 /* end confdefs.h.  */
5068
5069
5070 // If the compiler admits that it is not ready for C++11, why torture it?
5071 // Hopefully, this will speed up the test.
5072
5073 #ifndef __cplusplus
5074
5075 #error "This is not a C++ compiler"
5076
5077 #elif __cplusplus < 201103L
5078
5079 #error "This is not a C++11 compiler"
5080
5081 #else
5082
5083 namespace cxx11
5084 {
5085
5086   namespace test_static_assert
5087   {
5088
5089     template <typename T>
5090     struct check
5091     {
5092       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5093     };
5094
5095   }
5096
5097   namespace test_final_override
5098   {
5099
5100     struct Base
5101     {
5102       virtual void f() {}
5103     };
5104
5105     struct Derived : public Base
5106     {
5107       virtual void f() override {}
5108     };
5109
5110   }
5111
5112   namespace test_double_right_angle_brackets
5113   {
5114
5115     template < typename T >
5116     struct check {};
5117
5118     typedef check<void> single_type;
5119     typedef check<check<void>> double_type;
5120     typedef check<check<check<void>>> triple_type;
5121     typedef check<check<check<check<void>>>> quadruple_type;
5122
5123   }
5124
5125   namespace test_decltype
5126   {
5127
5128     int
5129     f()
5130     {
5131       int a = 1;
5132       decltype(a) b = 2;
5133       return a + b;
5134     }
5135
5136   }
5137
5138   namespace test_type_deduction
5139   {
5140
5141     template < typename T1, typename T2 >
5142     struct is_same
5143     {
5144       static const bool value = false;
5145     };
5146
5147     template < typename T >
5148     struct is_same<T, T>
5149     {
5150       static const bool value = true;
5151     };
5152
5153     template < typename T1, typename T2 >
5154     auto
5155     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5156     {
5157       return a1 + a2;
5158     }
5159
5160     int
5161     test(const int c, volatile int v)
5162     {
5163       static_assert(is_same<int, decltype(0)>::value == true, "");
5164       static_assert(is_same<int, decltype(c)>::value == false, "");
5165       static_assert(is_same<int, decltype(v)>::value == false, "");
5166       auto ac = c;
5167       auto av = v;
5168       auto sumi = ac + av + 'x';
5169       auto sumf = ac + av + 1.0;
5170       static_assert(is_same<int, decltype(ac)>::value == true, "");
5171       static_assert(is_same<int, decltype(av)>::value == true, "");
5172       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5173       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5174       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5175       return (sumf > 0.0) ? sumi : add(c, v);
5176     }
5177
5178   }
5179
5180   namespace test_noexcept
5181   {
5182
5183     int f() { return 0; }
5184     int g() noexcept { return 0; }
5185
5186     static_assert(noexcept(f()) == false, "");
5187     static_assert(noexcept(g()) == true, "");
5188
5189   }
5190
5191   namespace test_constexpr
5192   {
5193
5194     template < typename CharT >
5195     unsigned long constexpr
5196     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5197     {
5198       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5199     }
5200
5201     template < typename CharT >
5202     unsigned long constexpr
5203     strlen_c(const CharT *const s) noexcept
5204     {
5205       return strlen_c_r(s, 0UL);
5206     }
5207
5208     static_assert(strlen_c("") == 0UL, "");
5209     static_assert(strlen_c("1") == 1UL, "");
5210     static_assert(strlen_c("example") == 7UL, "");
5211     static_assert(strlen_c("another\0example") == 7UL, "");
5212
5213   }
5214
5215   namespace test_rvalue_references
5216   {
5217
5218     template < int N >
5219     struct answer
5220     {
5221       static constexpr int value = N;
5222     };
5223
5224     answer<1> f(int&)       { return answer<1>(); }
5225     answer<2> f(const int&) { return answer<2>(); }
5226     answer<3> f(int&&)      { return answer<3>(); }
5227
5228     void
5229     test()
5230     {
5231       int i = 0;
5232       const int c = 0;
5233       static_assert(decltype(f(i))::value == 1, "");
5234       static_assert(decltype(f(c))::value == 2, "");
5235       static_assert(decltype(f(0))::value == 3, "");
5236     }
5237
5238   }
5239
5240   namespace test_uniform_initialization
5241   {
5242
5243     struct test
5244     {
5245       static const int zero {};
5246       static const int one {1};
5247     };
5248
5249     static_assert(test::zero == 0, "");
5250     static_assert(test::one == 1, "");
5251
5252   }
5253
5254   namespace test_lambdas
5255   {
5256
5257     void
5258     test1()
5259     {
5260       auto lambda1 = [](){};
5261       auto lambda2 = lambda1;
5262       lambda1();
5263       lambda2();
5264     }
5265
5266     int
5267     test2()
5268     {
5269       auto a = [](int i, int j){ return i + j; }(1, 2);
5270       auto b = []() -> int { return '0'; }();
5271       auto c = [=](){ return a + b; }();
5272       auto d = [&](){ return c; }();
5273       auto e = [a, &b](int x) mutable {
5274         const auto identity = [](int y){ return y; };
5275         for (auto i = 0; i < a; ++i)
5276           a += b--;
5277         return x + identity(a + b);
5278       }(0);
5279       return a + b + c + d + e;
5280     }
5281
5282     int
5283     test3()
5284     {
5285       const auto nullary = [](){ return 0; };
5286       const auto unary = [](int x){ return x; };
5287       using nullary_t = decltype(nullary);
5288       using unary_t = decltype(unary);
5289       const auto higher1st = [](nullary_t f){ return f(); };
5290       const auto higher2nd = [unary](nullary_t f1){
5291         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5292       };
5293       return higher1st(nullary) + higher2nd(nullary)(unary);
5294     }
5295
5296   }
5297
5298   namespace test_variadic_templates
5299   {
5300
5301     template <int...>
5302     struct sum;
5303
5304     template <int N0, int... N1toN>
5305     struct sum<N0, N1toN...>
5306     {
5307       static constexpr auto value = N0 + sum<N1toN...>::value;
5308     };
5309
5310     template <>
5311     struct sum<>
5312     {
5313       static constexpr auto value = 0;
5314     };
5315
5316     static_assert(sum<>::value == 0, "");
5317     static_assert(sum<1>::value == 1, "");
5318     static_assert(sum<23>::value == 23, "");
5319     static_assert(sum<1, 2>::value == 3, "");
5320     static_assert(sum<5, 5, 11>::value == 21, "");
5321     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5322
5323   }
5324
5325   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5326   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5327   // because of this.
5328   namespace test_template_alias_sfinae
5329   {
5330
5331     struct foo {};
5332
5333     template<typename T>
5334     using member = typename T::member_type;
5335
5336     template<typename T>
5337     void func(...) {}
5338
5339     template<typename T>
5340     void func(member<T>*) {}
5341
5342     void test();
5343
5344     void test() { func<foo>(0); }
5345
5346   }
5347
5348 }  // namespace cxx11
5349
5350 #endif  // __cplusplus >= 201103L
5351
5352
5353
5354 _ACEOF
5355 if ac_fn_cxx_try_compile "$LINENO"; then :
5356   ax_cv_cxx_compile_cxx11=yes
5357 else
5358   ax_cv_cxx_compile_cxx11=no
5359 fi
5360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5361 fi
5362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5363 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5364   if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5365     ac_success=yes
5366   fi
5367
5368     if test x$ac_success = xno; then
5369     for alternative in ${ax_cxx_compile_alternatives}; do
5370       switch="-std=gnu++${alternative}"
5371       cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5372       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5373 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5374 if eval \${$cachevar+:} false; then :
5375   $as_echo_n "(cached) " >&6
5376 else
5377   ac_save_CXX="$CXX"
5378          CXX="$CXX $switch"
5379          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5380 /* end confdefs.h.  */
5381
5382
5383 // If the compiler admits that it is not ready for C++11, why torture it?
5384 // Hopefully, this will speed up the test.
5385
5386 #ifndef __cplusplus
5387
5388 #error "This is not a C++ compiler"
5389
5390 #elif __cplusplus < 201103L
5391
5392 #error "This is not a C++11 compiler"
5393
5394 #else
5395
5396 namespace cxx11
5397 {
5398
5399   namespace test_static_assert
5400   {
5401
5402     template <typename T>
5403     struct check
5404     {
5405       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5406     };
5407
5408   }
5409
5410   namespace test_final_override
5411   {
5412
5413     struct Base
5414     {
5415       virtual void f() {}
5416     };
5417
5418     struct Derived : public Base
5419     {
5420       virtual void f() override {}
5421     };
5422
5423   }
5424
5425   namespace test_double_right_angle_brackets
5426   {
5427
5428     template < typename T >
5429     struct check {};
5430
5431     typedef check<void> single_type;
5432     typedef check<check<void>> double_type;
5433     typedef check<check<check<void>>> triple_type;
5434     typedef check<check<check<check<void>>>> quadruple_type;
5435
5436   }
5437
5438   namespace test_decltype
5439   {
5440
5441     int
5442     f()
5443     {
5444       int a = 1;
5445       decltype(a) b = 2;
5446       return a + b;
5447     }
5448
5449   }
5450
5451   namespace test_type_deduction
5452   {
5453
5454     template < typename T1, typename T2 >
5455     struct is_same
5456     {
5457       static const bool value = false;
5458     };
5459
5460     template < typename T >
5461     struct is_same<T, T>
5462     {
5463       static const bool value = true;
5464     };
5465
5466     template < typename T1, typename T2 >
5467     auto
5468     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5469     {
5470       return a1 + a2;
5471     }
5472
5473     int
5474     test(const int c, volatile int v)
5475     {
5476       static_assert(is_same<int, decltype(0)>::value == true, "");
5477       static_assert(is_same<int, decltype(c)>::value == false, "");
5478       static_assert(is_same<int, decltype(v)>::value == false, "");
5479       auto ac = c;
5480       auto av = v;
5481       auto sumi = ac + av + 'x';
5482       auto sumf = ac + av + 1.0;
5483       static_assert(is_same<int, decltype(ac)>::value == true, "");
5484       static_assert(is_same<int, decltype(av)>::value == true, "");
5485       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5486       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5487       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5488       return (sumf > 0.0) ? sumi : add(c, v);
5489     }
5490
5491   }
5492
5493   namespace test_noexcept
5494   {
5495
5496     int f() { return 0; }
5497     int g() noexcept { return 0; }
5498
5499     static_assert(noexcept(f()) == false, "");
5500     static_assert(noexcept(g()) == true, "");
5501
5502   }
5503
5504   namespace test_constexpr
5505   {
5506
5507     template < typename CharT >
5508     unsigned long constexpr
5509     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5510     {
5511       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5512     }
5513
5514     template < typename CharT >
5515     unsigned long constexpr
5516     strlen_c(const CharT *const s) noexcept
5517     {
5518       return strlen_c_r(s, 0UL);
5519     }
5520
5521     static_assert(strlen_c("") == 0UL, "");
5522     static_assert(strlen_c("1") == 1UL, "");
5523     static_assert(strlen_c("example") == 7UL, "");
5524     static_assert(strlen_c("another\0example") == 7UL, "");
5525
5526   }
5527
5528   namespace test_rvalue_references
5529   {
5530
5531     template < int N >
5532     struct answer
5533     {
5534       static constexpr int value = N;
5535     };
5536
5537     answer<1> f(int&)       { return answer<1>(); }
5538     answer<2> f(const int&) { return answer<2>(); }
5539     answer<3> f(int&&)      { return answer<3>(); }
5540
5541     void
5542     test()
5543     {
5544       int i = 0;
5545       const int c = 0;
5546       static_assert(decltype(f(i))::value == 1, "");
5547       static_assert(decltype(f(c))::value == 2, "");
5548       static_assert(decltype(f(0))::value == 3, "");
5549     }
5550
5551   }
5552
5553   namespace test_uniform_initialization
5554   {
5555
5556     struct test
5557     {
5558       static const int zero {};
5559       static const int one {1};
5560     };
5561
5562     static_assert(test::zero == 0, "");
5563     static_assert(test::one == 1, "");
5564
5565   }
5566
5567   namespace test_lambdas
5568   {
5569
5570     void
5571     test1()
5572     {
5573       auto lambda1 = [](){};
5574       auto lambda2 = lambda1;
5575       lambda1();
5576       lambda2();
5577     }
5578
5579     int
5580     test2()
5581     {
5582       auto a = [](int i, int j){ return i + j; }(1, 2);
5583       auto b = []() -> int { return '0'; }();
5584       auto c = [=](){ return a + b; }();
5585       auto d = [&](){ return c; }();
5586       auto e = [a, &b](int x) mutable {
5587         const auto identity = [](int y){ return y; };
5588         for (auto i = 0; i < a; ++i)
5589           a += b--;
5590         return x + identity(a + b);
5591       }(0);
5592       return a + b + c + d + e;
5593     }
5594
5595     int
5596     test3()
5597     {
5598       const auto nullary = [](){ return 0; };
5599       const auto unary = [](int x){ return x; };
5600       using nullary_t = decltype(nullary);
5601       using unary_t = decltype(unary);
5602       const auto higher1st = [](nullary_t f){ return f(); };
5603       const auto higher2nd = [unary](nullary_t f1){
5604         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5605       };
5606       return higher1st(nullary) + higher2nd(nullary)(unary);
5607     }
5608
5609   }
5610
5611   namespace test_variadic_templates
5612   {
5613
5614     template <int...>
5615     struct sum;
5616
5617     template <int N0, int... N1toN>
5618     struct sum<N0, N1toN...>
5619     {
5620       static constexpr auto value = N0 + sum<N1toN...>::value;
5621     };
5622
5623     template <>
5624     struct sum<>
5625     {
5626       static constexpr auto value = 0;
5627     };
5628
5629     static_assert(sum<>::value == 0, "");
5630     static_assert(sum<1>::value == 1, "");
5631     static_assert(sum<23>::value == 23, "");
5632     static_assert(sum<1, 2>::value == 3, "");
5633     static_assert(sum<5, 5, 11>::value == 21, "");
5634     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5635
5636   }
5637
5638   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5639   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5640   // because of this.
5641   namespace test_template_alias_sfinae
5642   {
5643
5644     struct foo {};
5645
5646     template<typename T>
5647     using member = typename T::member_type;
5648
5649     template<typename T>
5650     void func(...) {}
5651
5652     template<typename T>
5653     void func(member<T>*) {}
5654
5655     void test();
5656
5657     void test() { func<foo>(0); }
5658
5659   }
5660
5661 }  // namespace cxx11
5662
5663 #endif  // __cplusplus >= 201103L
5664
5665
5666
5667 _ACEOF
5668 if ac_fn_cxx_try_compile "$LINENO"; then :
5669   eval $cachevar=yes
5670 else
5671   eval $cachevar=no
5672 fi
5673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5674          CXX="$ac_save_CXX"
5675 fi
5676 eval ac_res=\$$cachevar
5677                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5678 $as_echo "$ac_res" >&6; }
5679       if eval test x\$$cachevar = xyes; then
5680         CXX_DIALECT="$switch"
5681         ac_success=yes
5682         break
5683       fi
5684     done
5685   fi
5686
5687     if test x$ac_success = xno; then
5688                 for alternative in ${ax_cxx_compile_alternatives}; do
5689       for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5690         cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5691         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5692 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5693 if eval \${$cachevar+:} false; then :
5694   $as_echo_n "(cached) " >&6
5695 else
5696   ac_save_CXX="$CXX"
5697            CXX="$CXX $switch"
5698            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5699 /* end confdefs.h.  */
5700
5701
5702 // If the compiler admits that it is not ready for C++11, why torture it?
5703 // Hopefully, this will speed up the test.
5704
5705 #ifndef __cplusplus
5706
5707 #error "This is not a C++ compiler"
5708
5709 #elif __cplusplus < 201103L
5710
5711 #error "This is not a C++11 compiler"
5712
5713 #else
5714
5715 namespace cxx11
5716 {
5717
5718   namespace test_static_assert
5719   {
5720
5721     template <typename T>
5722     struct check
5723     {
5724       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5725     };
5726
5727   }
5728
5729   namespace test_final_override
5730   {
5731
5732     struct Base
5733     {
5734       virtual void f() {}
5735     };
5736
5737     struct Derived : public Base
5738     {
5739       virtual void f() override {}
5740     };
5741
5742   }
5743
5744   namespace test_double_right_angle_brackets
5745   {
5746
5747     template < typename T >
5748     struct check {};
5749
5750     typedef check<void> single_type;
5751     typedef check<check<void>> double_type;
5752     typedef check<check<check<void>>> triple_type;
5753     typedef check<check<check<check<void>>>> quadruple_type;
5754
5755   }
5756
5757   namespace test_decltype
5758   {
5759
5760     int
5761     f()
5762     {
5763       int a = 1;
5764       decltype(a) b = 2;
5765       return a + b;
5766     }
5767
5768   }
5769
5770   namespace test_type_deduction
5771   {
5772
5773     template < typename T1, typename T2 >
5774     struct is_same
5775     {
5776       static const bool value = false;
5777     };
5778
5779     template < typename T >
5780     struct is_same<T, T>
5781     {
5782       static const bool value = true;
5783     };
5784
5785     template < typename T1, typename T2 >
5786     auto
5787     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5788     {
5789       return a1 + a2;
5790     }
5791
5792     int
5793     test(const int c, volatile int v)
5794     {
5795       static_assert(is_same<int, decltype(0)>::value == true, "");
5796       static_assert(is_same<int, decltype(c)>::value == false, "");
5797       static_assert(is_same<int, decltype(v)>::value == false, "");
5798       auto ac = c;
5799       auto av = v;
5800       auto sumi = ac + av + 'x';
5801       auto sumf = ac + av + 1.0;
5802       static_assert(is_same<int, decltype(ac)>::value == true, "");
5803       static_assert(is_same<int, decltype(av)>::value == true, "");
5804       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5805       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5806       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5807       return (sumf > 0.0) ? sumi : add(c, v);
5808     }
5809
5810   }
5811
5812   namespace test_noexcept
5813   {
5814
5815     int f() { return 0; }
5816     int g() noexcept { return 0; }
5817
5818     static_assert(noexcept(f()) == false, "");
5819     static_assert(noexcept(g()) == true, "");
5820
5821   }
5822
5823   namespace test_constexpr
5824   {
5825
5826     template < typename CharT >
5827     unsigned long constexpr
5828     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5829     {
5830       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5831     }
5832
5833     template < typename CharT >
5834     unsigned long constexpr
5835     strlen_c(const CharT *const s) noexcept
5836     {
5837       return strlen_c_r(s, 0UL);
5838     }
5839
5840     static_assert(strlen_c("") == 0UL, "");
5841     static_assert(strlen_c("1") == 1UL, "");
5842     static_assert(strlen_c("example") == 7UL, "");
5843     static_assert(strlen_c("another\0example") == 7UL, "");
5844
5845   }
5846
5847   namespace test_rvalue_references
5848   {
5849
5850     template < int N >
5851     struct answer
5852     {
5853       static constexpr int value = N;
5854     };
5855
5856     answer<1> f(int&)       { return answer<1>(); }
5857     answer<2> f(const int&) { return answer<2>(); }
5858     answer<3> f(int&&)      { return answer<3>(); }
5859
5860     void
5861     test()
5862     {
5863       int i = 0;
5864       const int c = 0;
5865       static_assert(decltype(f(i))::value == 1, "");
5866       static_assert(decltype(f(c))::value == 2, "");
5867       static_assert(decltype(f(0))::value == 3, "");
5868     }
5869
5870   }
5871
5872   namespace test_uniform_initialization
5873   {
5874
5875     struct test
5876     {
5877       static const int zero {};
5878       static const int one {1};
5879     };
5880
5881     static_assert(test::zero == 0, "");
5882     static_assert(test::one == 1, "");
5883
5884   }
5885
5886   namespace test_lambdas
5887   {
5888
5889     void
5890     test1()
5891     {
5892       auto lambda1 = [](){};
5893       auto lambda2 = lambda1;
5894       lambda1();
5895       lambda2();
5896     }
5897
5898     int
5899     test2()
5900     {
5901       auto a = [](int i, int j){ return i + j; }(1, 2);
5902       auto b = []() -> int { return '0'; }();
5903       auto c = [=](){ return a + b; }();
5904       auto d = [&](){ return c; }();
5905       auto e = [a, &b](int x) mutable {
5906         const auto identity = [](int y){ return y; };
5907         for (auto i = 0; i < a; ++i)
5908           a += b--;
5909         return x + identity(a + b);
5910       }(0);
5911       return a + b + c + d + e;
5912     }
5913
5914     int
5915     test3()
5916     {
5917       const auto nullary = [](){ return 0; };
5918       const auto unary = [](int x){ return x; };
5919       using nullary_t = decltype(nullary);
5920       using unary_t = decltype(unary);
5921       const auto higher1st = [](nullary_t f){ return f(); };
5922       const auto higher2nd = [unary](nullary_t f1){
5923         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5924       };
5925       return higher1st(nullary) + higher2nd(nullary)(unary);
5926     }
5927
5928   }
5929
5930   namespace test_variadic_templates
5931   {
5932
5933     template <int...>
5934     struct sum;
5935
5936     template <int N0, int... N1toN>
5937     struct sum<N0, N1toN...>
5938     {
5939       static constexpr auto value = N0 + sum<N1toN...>::value;
5940     };
5941
5942     template <>
5943     struct sum<>
5944     {
5945       static constexpr auto value = 0;
5946     };
5947
5948     static_assert(sum<>::value == 0, "");
5949     static_assert(sum<1>::value == 1, "");
5950     static_assert(sum<23>::value == 23, "");
5951     static_assert(sum<1, 2>::value == 3, "");
5952     static_assert(sum<5, 5, 11>::value == 21, "");
5953     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5954
5955   }
5956
5957   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5958   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5959   // because of this.
5960   namespace test_template_alias_sfinae
5961   {
5962
5963     struct foo {};
5964
5965     template<typename T>
5966     using member = typename T::member_type;
5967
5968     template<typename T>
5969     void func(...) {}
5970
5971     template<typename T>
5972     void func(member<T>*) {}
5973
5974     void test();
5975
5976     void test() { func<foo>(0); }
5977
5978   }
5979
5980 }  // namespace cxx11
5981
5982 #endif  // __cplusplus >= 201103L
5983
5984
5985
5986 _ACEOF
5987 if ac_fn_cxx_try_compile "$LINENO"; then :
5988   eval $cachevar=yes
5989 else
5990   eval $cachevar=no
5991 fi
5992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5993            CXX="$ac_save_CXX"
5994 fi
5995 eval ac_res=\$$cachevar
5996                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5997 $as_echo "$ac_res" >&6; }
5998         if eval test x\$$cachevar = xyes; then
5999           CXX_DIALECT="$switch"
6000           ac_success=yes
6001           break
6002         fi
6003       done
6004       if test x$ac_success = xyes; then
6005         break
6006       fi
6007     done
6008   fi
6009   ac_ext=c
6010 ac_cpp='$CPP $CPPFLAGS'
6011 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6012 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6013 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6014
6015   if test x$ax_cxx_compile_cxx11_required = xtrue; then
6016     if test x$ac_success = xno; then
6017       as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6018     fi
6019   fi
6020   if test x$ac_success = xno; then
6021     HAVE_CXX11=0
6022     { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6023 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6024   else
6025     HAVE_CXX11=1
6026
6027 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6028
6029   fi
6030
6031
6032
6033
6034 # Dependency checking.
6035 rm -rf .tst 2>/dev/null
6036 mkdir .tst 2>/dev/null
6037 if test -d .tst; then
6038   am__leading_dot=.
6039 else
6040   am__leading_dot=_
6041 fi
6042 rmdir .tst 2>/dev/null
6043
6044 DEPDIR="${am__leading_dot}deps"
6045
6046 ac_config_commands="$ac_config_commands depdir"
6047
6048
6049 depcc="$CC"   am_compiler_list=
6050
6051 am_depcomp=$ac_aux_dir/depcomp
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6053 $as_echo_n "checking dependency style of $depcc... " >&6; }
6054 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6055   $as_echo_n "(cached) " >&6
6056 else
6057   if test -f "$am_depcomp"; then
6058   # We make a subdir and do the tests there.  Otherwise we can end up
6059   # making bogus files that we don't know about and never remove.  For
6060   # instance it was reported that on HP-UX the gcc test will end up
6061   # making a dummy file named `D' -- because `-MD' means `put the output
6062   # in D'.
6063   mkdir conftest.dir
6064   # Copy depcomp to subdir because otherwise we won't find it if we're
6065   # using a relative directory.
6066   cp "$am_depcomp" conftest.dir
6067   cd conftest.dir
6068   # We will build objects and dependencies in a subdirectory because
6069   # it helps to detect inapplicable dependency modes.  For instance
6070   # both Tru64's cc and ICC support -MD to output dependencies as a
6071   # side effect of compilation, but ICC will put the dependencies in
6072   # the current directory while Tru64 will put them in the object
6073   # directory.
6074   mkdir sub
6075
6076   am_cv_CC_dependencies_compiler_type=none
6077   if test "$am_compiler_list" = ""; then
6078      am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6079   fi
6080   for depmode in $am_compiler_list; do
6081     if test $depmode = none; then break; fi
6082
6083     $as_echo "$as_me:$LINENO: trying $depmode" >&5
6084     # Setup a source with many dependencies, because some compilers
6085     # like to wrap large dependency lists on column 80 (with \), and
6086     # we should not choose a depcomp mode which is confused by this.
6087     #
6088     # We need to recreate these files for each test, as the compiler may
6089     # overwrite some of them when testing with obscure command lines.
6090     # This happens at least with the AIX C compiler.
6091     : > sub/conftest.c
6092     for i in 1 2 3 4 5 6; do
6093       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6094       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6095       # Solaris 8's {/usr,}/bin/sh.
6096       touch sub/conftst$i.h
6097     done
6098     echo "include sub/conftest.Po" > confmf
6099
6100     # We check with `-c' and `-o' for the sake of the "dashmstdout"
6101     # mode.  It turns out that the SunPro C++ compiler does not properly
6102     # handle `-M -o', and we need to detect this.
6103     depcmd="depmode=$depmode \
6104        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6105        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6106        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6107     echo "| $depcmd" | sed -e 's/  */ /g' >&5
6108     if env $depcmd > conftest.err 2>&1 &&
6109        grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6110        grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6111        ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6112       # icc doesn't choke on unknown options, it will just issue warnings
6113       # or remarks (even with -Werror).  So we grep stderr for any message
6114       # that says an option was ignored or not supported.
6115       # When given -MP, icc 7.0 and 7.1 complain thusly:
6116       #   icc: Command line warning: ignoring option '-M'; no argument required
6117       # The diagnosis changed in icc 8.0:
6118       #   icc: Command line remark: option '-MP' not supported
6119       if (grep 'ignoring option' conftest.err ||
6120           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6121         am_cv_CC_dependencies_compiler_type=$depmode
6122         $as_echo "$as_me:$LINENO: success" >&5
6123         break
6124       fi
6125     fi
6126     $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6127     sed -e 's/^/| /' < conftest.err >&5
6128   done
6129
6130   cd ..
6131   rm -rf conftest.dir
6132 else
6133   am_cv_CC_dependencies_compiler_type=none
6134 fi
6135
6136 fi
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6138 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6139 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6140 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6141 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6142
6143 fi
6144
6145
6146 gnulib_extra_configure_args=
6147 # If large-file support is disabled, make sure gnulib does the same.
6148 if test "$enable_largefile" = no; then
6149 gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6150 fi
6151
6152 # Configure gnulib.  We need to build gnulib under some other
6153 # directory not "gnulib", to avoid the problem of both GDB and
6154 # GDBserver wanting to build it in the same directory, when building
6155 # in the source dir.
6156
6157   in_src="gnulib"
6158   in_build="build-gnulib"
6159   in_extra_args="$gnulib_extra_configure_args"
6160
6161   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6162   # so they do not pile up.
6163   ac_sub_configure_args=
6164   ac_prev=
6165   eval "set x $ac_configure_args"
6166   shift
6167   for ac_arg
6168   do
6169     if test -n "$ac_prev"; then
6170       ac_prev=
6171       continue
6172     fi
6173     case $ac_arg in
6174     -cache-file | --cache-file | --cache-fil | --cache-fi \
6175     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6176       ac_prev=cache_file ;;
6177     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6178     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6179     | --c=*)
6180       ;;
6181     --config-cache | -C)
6182       ;;
6183     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6184       ac_prev=srcdir ;;
6185     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6186       ;;
6187     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6188       ac_prev=prefix ;;
6189     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6190       ;;
6191     --disable-option-checking)
6192       ;;
6193     *)
6194       case $ac_arg in
6195       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6196       esac
6197       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6198     esac
6199   done
6200
6201   # Always prepend --prefix to ensure using the same prefix
6202   # in subdir configurations.
6203   ac_arg="--prefix=$prefix"
6204   case $ac_arg in
6205   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6206   esac
6207   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6208
6209   # Pass --silent
6210   if test "$silent" = yes; then
6211     ac_sub_configure_args="--silent $ac_sub_configure_args"
6212   fi
6213
6214   # Always prepend --disable-option-checking to silence warnings, since
6215   # different subdirs can have different --enable and --with options.
6216   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6217
6218   ac_popdir=`pwd`
6219   ac_dir=$in_build
6220
6221   ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6222   $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6223   $as_echo "$ac_msg" >&6
6224   as_dir="$ac_dir"; as_fn_mkdir_p
6225
6226   case $srcdir in
6227   [\\/]* | ?:[\\/]* )
6228     ac_srcdir=$srcdir/$in_src ;;
6229   *) # Relative name.
6230     ac_srcdir=../$srcdir/$in_src ;;
6231   esac
6232
6233   cd "$ac_dir"
6234
6235   ac_sub_configure=$ac_srcdir/configure
6236
6237   # Make the cache file name correct relative to the subdirectory.
6238   case $cache_file in
6239   [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6240   *) # Relative name.
6241     ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6242   esac
6243
6244   if test -n "$in_extra_args"; then
6245     # Add the extra args at the end.
6246     ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6247   fi
6248
6249   { $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
6250 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6251   # The eval makes quoting arguments work.
6252   eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6253        --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6254     as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6255
6256   cd "$ac_popdir"
6257
6258
6259
6260 CONFIG_OBS=
6261 CONFIG_DEPS=
6262 CONFIG_SRCS=
6263 ENABLE_CFLAGS=
6264
6265 CONFIG_ALL=
6266 CONFIG_CLEAN=
6267 CONFIG_INSTALL=
6268 CONFIG_UNINSTALL=
6269
6270 # If we haven't got the data from the intl directory,
6271 # assume NLS is disabled.
6272 USE_NLS=no
6273 LIBINTL=
6274 LIBINTL_DEP=
6275 INCINTL=
6276 XGETTEXT=
6277 GMSGFMT=
6278 POSUB=
6279
6280 if test -f  ../intl/config.intl; then
6281   .  ../intl/config.intl
6282 fi
6283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6284 $as_echo_n "checking whether NLS is requested... " >&6; }
6285 if test x"$USE_NLS" != xyes; then
6286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6287 $as_echo "no" >&6; }
6288 else
6289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6290 $as_echo "yes" >&6; }
6291
6292 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6293
6294
6295   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6296 $as_echo_n "checking for catalogs to be installed... " >&6; }
6297   # Look for .po and .gmo files in the source directory.
6298   CATALOGS=
6299   XLINGUAS=
6300   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6301     # If there aren't any .gmo files the shell will give us the
6302     # literal string "../path/to/srcdir/po/*.gmo" which has to be
6303     # weeded out.
6304     case "$cat" in *\**)
6305       continue;;
6306     esac
6307     # The quadruple backslash is collapsed to a double backslash
6308     # by the backticks, then collapsed again by the double quotes,
6309     # leaving us with one backslash in the sed expression (right
6310     # before the dot that mustn't act as a wildcard).
6311     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6312     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6313     # The user is allowed to set LINGUAS to a list of languages to
6314     # install catalogs for.  If it's empty that means "all of them."
6315     if test "x$LINGUAS" = x; then
6316       CATALOGS="$CATALOGS $cat"
6317       XLINGUAS="$XLINGUAS $lang"
6318     else
6319       case "$LINGUAS" in *$lang*)
6320         CATALOGS="$CATALOGS $cat"
6321         XLINGUAS="$XLINGUAS $lang"
6322         ;;
6323       esac
6324     fi
6325   done
6326   LINGUAS="$XLINGUAS"
6327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6328 $as_echo "$LINGUAS" >&6; }
6329
6330
6331     DATADIRNAME=share
6332
6333   INSTOBJEXT=.mo
6334
6335   GENCAT=gencat
6336
6337   CATOBJEXT=.gmo
6338
6339 fi
6340
6341 localedir='${datadir}/locale'
6342
6343
6344 if test x"$USE_NLS" = xyes; then
6345    CONFIG_ALL="$CONFIG_ALL all-po"
6346    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6347    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6348    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6349 fi
6350
6351 GNULIB=build-gnulib/import
6352
6353 # For Makefile dependencies.
6354 GNULIB_STDINT_H=
6355 if test x"$STDINT_H" != x; then
6356   GNULIB_STDINT_H=$GNULIB/$STDINT_H
6357 fi
6358
6359
6360 PACKAGE=gdb
6361
6362 cat >>confdefs.h <<_ACEOF
6363 #define PACKAGE "$PACKAGE"
6364 _ACEOF
6365
6366
6367
6368 # We never need to detect it in this sub-configure.
6369 # But preserve it for config.status --recheck.
6370
6371
6372
6373 MAKEINFO_EXTRA_FLAGS=""
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6375 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6376 if ${gdb_cv_have_makeinfo_click+:} false; then :
6377   $as_echo_n "(cached) " >&6
6378 else
6379   echo '@clicksequence{a @click{} b}' >conftest.texinfo
6380   if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6381     gdb_cv_have_makeinfo_click=yes
6382   else
6383     gdb_cv_have_makeinfo_click=no
6384   fi
6385 fi
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6387 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6388 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6389   MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6390 fi
6391
6392
6393
6394
6395 # Check whether --with-separate-debug-dir was given.
6396 if test "${with_separate_debug_dir+set}" = set; then :
6397   withval=$with_separate_debug_dir;
6398     DEBUGDIR=$withval
6399 else
6400   DEBUGDIR=${libdir}/debug
6401 fi
6402
6403
6404   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6405   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6406   ac_define_dir=`eval echo $DEBUGDIR`
6407   ac_define_dir=`eval echo $ac_define_dir`
6408
6409 cat >>confdefs.h <<_ACEOF
6410 #define DEBUGDIR "$ac_define_dir"
6411 _ACEOF
6412
6413
6414
6415
6416   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6417      if test "x$prefix" = xNONE; then
6418         test_prefix=/usr/local
6419      else
6420         test_prefix=$prefix
6421      fi
6422   else
6423      test_prefix=$exec_prefix
6424   fi
6425   value=0
6426   case ${ac_define_dir} in
6427      "${test_prefix}"|"${test_prefix}/"*|\
6428         '${exec_prefix}'|'${exec_prefix}/'*)
6429      value=1
6430      ;;
6431   esac
6432
6433 cat >>confdefs.h <<_ACEOF
6434 #define DEBUGDIR_RELOCATABLE $value
6435 _ACEOF
6436
6437
6438
6439
6440 # We can't pass paths as command line arguments.
6441 # Mingw32 tries to be clever and will convert the paths for us.
6442 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6443 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6444 # This breaks GDB's relocatable path conversions since paths passed in
6445 # config.h would not get so translated, the path prefixes no longer match.
6446
6447   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6448   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6449   ac_define_dir=`eval echo $bindir`
6450   ac_define_dir=`eval echo $ac_define_dir`
6451
6452 cat >>confdefs.h <<_ACEOF
6453 #define BINDIR "$ac_define_dir"
6454 _ACEOF
6455
6456
6457
6458 # GDB's datadir relocation
6459
6460
6461
6462 # Check whether --with-gdb-datadir was given.
6463 if test "${with_gdb_datadir+set}" = set; then :
6464   withval=$with_gdb_datadir;
6465     GDB_DATADIR=$withval
6466 else
6467   GDB_DATADIR=${datadir}/gdb
6468 fi
6469
6470
6471   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6472   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6473   ac_define_dir=`eval echo $GDB_DATADIR`
6474   ac_define_dir=`eval echo $ac_define_dir`
6475
6476 cat >>confdefs.h <<_ACEOF
6477 #define GDB_DATADIR "$ac_define_dir"
6478 _ACEOF
6479
6480
6481
6482
6483   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6484      if test "x$prefix" = xNONE; then
6485         test_prefix=/usr/local
6486      else
6487         test_prefix=$prefix
6488      fi
6489   else
6490      test_prefix=$exec_prefix
6491   fi
6492   value=0
6493   case ${ac_define_dir} in
6494      "${test_prefix}"|"${test_prefix}/"*|\
6495         '${exec_prefix}'|'${exec_prefix}/'*)
6496      value=1
6497      ;;
6498   esac
6499
6500 cat >>confdefs.h <<_ACEOF
6501 #define GDB_DATADIR_RELOCATABLE $value
6502 _ACEOF
6503
6504
6505
6506
6507
6508 # Check whether --with-relocated-sources was given.
6509 if test "${with_relocated_sources+set}" = set; then :
6510   withval=$with_relocated_sources; reloc_srcdir="${withval}"
6511
6512   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6513   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6514   ac_define_dir=`eval echo $reloc_srcdir`
6515   ac_define_dir=`eval echo $ac_define_dir`
6516
6517 cat >>confdefs.h <<_ACEOF
6518 #define RELOC_SRCDIR "$ac_define_dir"
6519 _ACEOF
6520
6521
6522
6523 fi
6524
6525
6526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6527 $as_echo_n "checking for default auto-load directory... " >&6; }
6528
6529 # Check whether --with-auto-load-dir was given.
6530 if test "${with_auto_load_dir+set}" = set; then :
6531   withval=$with_auto_load_dir;
6532 else
6533   with_auto_load_dir='$debugdir:$datadir/auto-load'
6534 fi
6535
6536 escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6537
6538   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6539   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6540   ac_define_dir=`eval echo $escape_dir`
6541   ac_define_dir=`eval echo $ac_define_dir`
6542
6543 cat >>confdefs.h <<_ACEOF
6544 #define AUTO_LOAD_DIR "$ac_define_dir"
6545 _ACEOF
6546
6547
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6549 $as_echo "$with_auto_load_dir" >&6; }
6550
6551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6552 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6553
6554 # Check whether --with-auto-load-safe-path was given.
6555 if test "${with_auto_load_safe_path+set}" = set; then :
6556   withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6557      with_auto_load_safe_path="/"
6558      fi
6559 else
6560   with_auto_load_safe_path="$with_auto_load_dir"
6561 fi
6562
6563 escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6564
6565   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6566   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6567   ac_define_dir=`eval echo $escape_dir`
6568   ac_define_dir=`eval echo $ac_define_dir`
6569
6570 cat >>confdefs.h <<_ACEOF
6571 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6572 _ACEOF
6573
6574
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6576 $as_echo "$with_auto_load_safe_path" >&6; }
6577
6578
6579
6580 subdirs="$subdirs testsuite"
6581
6582
6583 # Check whether to support alternative target configurations
6584 # Check whether --enable-targets was given.
6585 if test "${enable_targets+set}" = set; then :
6586   enableval=$enable_targets; case "${enableval}" in
6587   yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6588             ;;
6589   no)       enable_targets= ;;
6590   *)        enable_targets=$enableval ;;
6591 esac
6592 fi
6593
6594
6595 # Check whether to enable 64-bit support on 32-bit hosts
6596 # Check whether --enable-64-bit-bfd was given.
6597 if test "${enable_64_bit_bfd+set}" = set; then :
6598   enableval=$enable_64_bit_bfd; case "${enableval}" in
6599   yes)  want64=true  ;;
6600   no)   want64=false ;;
6601   *)    as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6602 esac
6603 else
6604   want64=false
6605 fi
6606
6607 # Provide defaults for some variables set by the per-host and per-target
6608 # configuration.
6609 gdb_host_obs=posix-hdep.o
6610
6611 if test "${target}" = "${host}"; then
6612   gdb_native=yes
6613 else
6614   gdb_native=no
6615 fi
6616
6617 . $srcdir/configure.host
6618
6619 # Add in the common host objects.
6620 . $srcdir/common/common.host
6621 gdb_host_obs="$gdb_host_obs $common_host_obs"
6622
6623 # Accumulate some settings from configure.tgt over all enabled targets
6624
6625 TARGET_OBS=
6626 all_targets=
6627 HAVE_NATIVE_GCORE_TARGET=
6628
6629 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6630 do
6631   if test "$targ_alias" = "all"; then
6632     all_targets=true
6633   else
6634     # Canonicalize the secondary target names.
6635     result=`$ac_config_sub $targ_alias 2>/dev/null`
6636     if test -n "$result"; then
6637         targ=$result
6638     else
6639         targ=$targ_alias
6640     fi
6641
6642     . ${srcdir}/configure.tgt
6643
6644     if test -z "${gdb_target_obs}"; then :
6645   as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6646 fi
6647
6648     # Target-specific object files
6649     for i in ${gdb_target_obs}; do
6650         case " $TARGET_OBS " in
6651         *" ${i} "*) ;;
6652         *)
6653           TARGET_OBS="$TARGET_OBS ${i}"
6654           ;;
6655         esac
6656     done
6657
6658     # Check whether this target needs 64-bit CORE_ADDR
6659     if test x${want64} = xfalse; then
6660       . ${srcdir}/../bfd/config.bfd
6661     fi
6662
6663     # Check whether this target is native and supports gcore.
6664     if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6665        && $gdb_have_gcore; then
6666       HAVE_NATIVE_GCORE_TARGET=1
6667     fi
6668   fi
6669 done
6670
6671 if test x${all_targets} = xtrue; then
6672
6673   # We want all 64-bit targets if we either:
6674   #  - run on a 64-bit host  or
6675   #  - already require 64-bit support for some other target  or
6676   #  - the --enable-64-bit-bfd option was supplied
6677   # Otherwise we only support all 32-bit targets.
6678   #
6679   # NOTE: This test must be in sync with the corresponding
6680   #       tests in BFD!
6681
6682   if test x${want64} = xfalse; then
6683     # The cast to long int works around a bug in the HP C Compiler
6684 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6685 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6686 # This bug is HP SR number 8606223364.
6687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6688 $as_echo_n "checking size of long... " >&6; }
6689 if ${ac_cv_sizeof_long+:} false; then :
6690   $as_echo_n "(cached) " >&6
6691 else
6692   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
6693
6694 else
6695   if test "$ac_cv_type_long" = yes; then
6696      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6697 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6698 as_fn_error 77 "cannot compute sizeof (long)
6699 See \`config.log' for more details" "$LINENO" 5; }
6700    else
6701      ac_cv_sizeof_long=0
6702    fi
6703 fi
6704
6705 fi
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6707 $as_echo "$ac_cv_sizeof_long" >&6; }
6708
6709
6710
6711 cat >>confdefs.h <<_ACEOF
6712 #define SIZEOF_LONG $ac_cv_sizeof_long
6713 _ACEOF
6714
6715
6716     if test "x${ac_cv_sizeof_long}" = "x8"; then
6717       want64=true
6718     fi
6719   fi
6720   if test x${want64} = xtrue; then
6721     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6722   else
6723     TARGET_OBS='$(ALL_TARGET_OBS)'
6724   fi
6725 fi
6726
6727
6728
6729
6730 # For other settings, only the main target counts.
6731 gdb_sim=
6732 gdb_osabi=
6733 build_gdbserver=
6734 targ=$target; . ${srcdir}/configure.tgt
6735
6736 # Fetch the default architecture and default target vector from BFD.
6737 targ=$target; . $srcdir/../bfd/config.bfd
6738
6739 # We only want the first architecture, so strip off the others if
6740 # there is more than one.
6741 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6742
6743 if test "x$targ_archs" != x; then
6744
6745 cat >>confdefs.h <<_ACEOF
6746 #define DEFAULT_BFD_ARCH $targ_archs
6747 _ACEOF
6748
6749 fi
6750 if test "x$targ_defvec" != x; then
6751
6752 cat >>confdefs.h <<_ACEOF
6753 #define DEFAULT_BFD_VEC $targ_defvec
6754 _ACEOF
6755
6756 fi
6757
6758 # The CLI cannot be disabled yet, but may be in the future.
6759
6760 # Enable CLI.
6761 # Check whether --enable-gdbcli was given.
6762 if test "${enable_gdbcli+set}" = set; then :
6763   enableval=$enable_gdbcli; case $enableval in
6764     yes)
6765       ;;
6766     no)
6767       as_fn_error $? "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
6768     *)
6769       as_fn_error $? "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
6770   esac
6771 else
6772   enable_gdbcli=yes
6773 fi
6774
6775 if test x"$enable_gdbcli" = xyes; then
6776   if test -d $srcdir/cli; then
6777     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6778     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6779     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6780     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6781   fi
6782 fi
6783
6784 # Enable MI.
6785 # Check whether --enable-gdbmi was given.
6786 if test "${enable_gdbmi+set}" = set; then :
6787   enableval=$enable_gdbmi; case $enableval in
6788     yes | no)
6789       ;;
6790     *)
6791       as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6792   esac
6793 else
6794   enable_gdbmi=yes
6795 fi
6796
6797 if test x"$enable_gdbmi" = xyes; then
6798   if test -d $srcdir/mi; then
6799     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6800     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6801     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6802     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6803   fi
6804 fi
6805
6806 # Enable TUI.
6807 # Check whether --enable-tui was given.
6808 if test "${enable_tui+set}" = set; then :
6809   enableval=$enable_tui; case $enableval in
6810     yes | no | auto)
6811       ;;
6812     *)
6813       as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6814   esac
6815 else
6816   enable_tui=auto
6817 fi
6818
6819
6820 # Enable gdbtk.
6821 # Check whether --enable-gdbtk was given.
6822 if test "${enable_gdbtk+set}" = set; then :
6823   enableval=$enable_gdbtk; case $enableval in
6824     yes | no)
6825       ;;
6826     *)
6827       as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6828   esac
6829 else
6830   if test -d $srcdir/gdbtk; then
6831     enable_gdbtk=yes
6832   else
6833     enable_gdbtk=no
6834   fi
6835 fi
6836
6837 # We unconditionally disable gdbtk tests on selected platforms.
6838 case $host_os in
6839   go32* | windows*)
6840     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6841 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6842     enable_gdbtk=no ;;
6843 esac
6844
6845 # Libunwind support for ia64.
6846
6847
6848 # Check whether --with-libunwind-ia64 was given.
6849 if test "${with_libunwind_ia64+set}" = set; then :
6850   withval=$with_libunwind_ia64;
6851 else
6852   with_libunwind_ia64=auto
6853 fi
6854
6855
6856 # Backward compatibility option.
6857 if test "${with_libunwind+set}" = set; then
6858   if test x"$with_libunwind_ia64" != xauto; then
6859     as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6860   fi
6861   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6862 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6863   with_libunwind_ia64="$with_libunwind"
6864 fi
6865
6866 case "$with_libunwind_ia64" in
6867   yes | no)
6868     ;;
6869   auto)
6870     for ac_header in libunwind-ia64.h
6871 do :
6872   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6873 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6874   cat >>confdefs.h <<_ACEOF
6875 #define HAVE_LIBUNWIND_IA64_H 1
6876 _ACEOF
6877
6878 fi
6879
6880 done
6881
6882     with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6883     ;;
6884   *)
6885     as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6886     ;;
6887 esac
6888
6889 if test x"$with_libunwind_ia64" = xyes; then
6890   for ac_header in libunwind-ia64.h
6891 do :
6892   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6893 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6894   cat >>confdefs.h <<_ACEOF
6895 #define HAVE_LIBUNWIND_IA64_H 1
6896 _ACEOF
6897
6898 fi
6899
6900 done
6901
6902   if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6903     as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6904   fi
6905   CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6906   CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6907   CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6908 fi
6909
6910 opt_curses=no
6911
6912 # Check whether --with-curses was given.
6913 if test "${with_curses+set}" = set; then :
6914   withval=$with_curses; opt_curses=$withval
6915 fi
6916
6917
6918 prefer_curses=no
6919 if test "$opt_curses" = "yes"; then
6920   prefer_curses=yes
6921 fi
6922
6923 # Profiling support.
6924 # Check whether --enable-profiling was given.
6925 if test "${enable_profiling+set}" = set; then :
6926   enableval=$enable_profiling; case $enableval in
6927     yes | no)
6928       ;;
6929     *)
6930       as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6931   esac
6932 else
6933   enable_profiling=no
6934 fi
6935
6936
6937 for ac_func in monstartup _mcleanup
6938 do :
6939   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6940 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6941 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6942   cat >>confdefs.h <<_ACEOF
6943 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6944 _ACEOF
6945
6946 fi
6947 done
6948
6949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6950 $as_echo_n "checking for _etext... " >&6; }
6951 if ${ac_cv_var__etext+:} false; then :
6952   $as_echo_n "(cached) " >&6
6953 else
6954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6955 /* end confdefs.h.  */
6956 #include <stdlib.h>
6957 extern char _etext;
6958
6959 int
6960 main ()
6961 {
6962 free (&_etext);
6963   ;
6964   return 0;
6965 }
6966 _ACEOF
6967 if ac_fn_c_try_link "$LINENO"; then :
6968   ac_cv_var__etext=yes
6969 else
6970   ac_cv_var__etext=no
6971 fi
6972 rm -f core conftest.err conftest.$ac_objext \
6973     conftest$ac_exeext conftest.$ac_ext
6974 fi
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6976 $as_echo "$ac_cv_var__etext" >&6; }
6977 if test $ac_cv_var__etext = yes; then
6978
6979 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
6980
6981 fi
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6983 $as_echo_n "checking for etext... " >&6; }
6984 if ${ac_cv_var_etext+:} false; then :
6985   $as_echo_n "(cached) " >&6
6986 else
6987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6988 /* end confdefs.h.  */
6989 #include <stdlib.h>
6990 extern char etext;
6991
6992 int
6993 main ()
6994 {
6995 free (&etext);
6996   ;
6997   return 0;
6998 }
6999 _ACEOF
7000 if ac_fn_c_try_link "$LINENO"; then :
7001   ac_cv_var_etext=yes
7002 else
7003   ac_cv_var_etext=no
7004 fi
7005 rm -f core conftest.err conftest.$ac_objext \
7006     conftest$ac_exeext conftest.$ac_ext
7007 fi
7008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7009 $as_echo "$ac_cv_var_etext" >&6; }
7010 if test $ac_cv_var_etext = yes; then
7011
7012 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7013
7014 fi
7015 if test "$enable_profiling" = yes ; then
7016   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
7017     as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7018   fi
7019   PROFILE_CFLAGS=-pg
7020   OLD_CFLAGS="$CFLAGS"
7021   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7022
7023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7024 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7025 if ${ac_cv_cc_supports_pg+:} false; then :
7026   $as_echo_n "(cached) " >&6
7027 else
7028   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7029 /* end confdefs.h.  */
7030
7031 int
7032 main ()
7033 {
7034 int x;
7035   ;
7036   return 0;
7037 }
7038 _ACEOF
7039 if ac_fn_c_try_compile "$LINENO"; then :
7040   ac_cv_cc_supports_pg=yes
7041 else
7042   ac_cv_cc_supports_pg=no
7043 fi
7044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7045 fi
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7047 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7048
7049   if test $ac_cv_cc_supports_pg = no; then
7050     as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7051   fi
7052
7053   CFLAGS="$OLD_CFLAGS"
7054 fi
7055
7056 CODESIGN_CERT=
7057 # Check whether --enable-codesign was given.
7058 if test "${enable_codesign+set}" = set; then :
7059   enableval=$enable_codesign; CODESIGN_CERT=$enableval
7060 fi
7061
7062
7063
7064
7065
7066 # Check whether --with-pkgversion was given.
7067 if test "${with_pkgversion+set}" = set; then :
7068   withval=$with_pkgversion; case "$withval" in
7069       yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7070       no)  PKGVERSION= ;;
7071       *)   PKGVERSION="($withval) " ;;
7072      esac
7073 else
7074   PKGVERSION="(GDB) "
7075
7076 fi
7077
7078
7079
7080
7081
7082 # Check whether --with-bugurl was given.
7083 if test "${with_bugurl+set}" = set; then :
7084   withval=$with_bugurl; case "$withval" in
7085       yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7086       no)  BUGURL=
7087            ;;
7088       *)   BUGURL="$withval"
7089            ;;
7090      esac
7091 else
7092   BUGURL="http://www.gnu.org/software/gdb/bugs/"
7093
7094 fi
7095
7096   case ${BUGURL} in
7097   "")
7098     REPORT_BUGS_TO=
7099     REPORT_BUGS_TEXI=
7100     ;;
7101   *)
7102     REPORT_BUGS_TO="<$BUGURL>"
7103     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7104     ;;
7105   esac;
7106
7107
7108
7109
7110 cat >>confdefs.h <<_ACEOF
7111 #define PKGVERSION "$PKGVERSION"
7112 _ACEOF
7113
7114
7115 cat >>confdefs.h <<_ACEOF
7116 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7117 _ACEOF
7118
7119
7120 # --------------------- #
7121 # Checks for programs.  #
7122 # --------------------- #
7123
7124 for ac_prog in gawk mawk nawk awk
7125 do
7126   # Extract the first word of "$ac_prog", so it can be a program name with args.
7127 set dummy $ac_prog; ac_word=$2
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7129 $as_echo_n "checking for $ac_word... " >&6; }
7130 if ${ac_cv_prog_AWK+:} false; then :
7131   $as_echo_n "(cached) " >&6
7132 else
7133   if test -n "$AWK"; then
7134   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7135 else
7136 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7137 for as_dir in $PATH
7138 do
7139   IFS=$as_save_IFS
7140   test -z "$as_dir" && as_dir=.
7141     for ac_exec_ext in '' $ac_executable_extensions; do
7142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7143     ac_cv_prog_AWK="$ac_prog"
7144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7145     break 2
7146   fi
7147 done
7148   done
7149 IFS=$as_save_IFS
7150
7151 fi
7152 fi
7153 AWK=$ac_cv_prog_AWK
7154 if test -n "$AWK"; then
7155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7156 $as_echo "$AWK" >&6; }
7157 else
7158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7159 $as_echo "no" >&6; }
7160 fi
7161
7162
7163   test -n "$AWK" && break
7164 done
7165
7166 # Find a good install program.  We prefer a C program (faster),
7167 # so one script is as good as another.  But avoid the broken or
7168 # incompatible versions:
7169 # SysV /etc/install, /usr/sbin/install
7170 # SunOS /usr/etc/install
7171 # IRIX /sbin/install
7172 # AIX /bin/install
7173 # AmigaOS /C/install, which installs bootblocks on floppy discs
7174 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7175 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7176 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7177 # OS/2's system install, which has a completely different semantic
7178 # ./install, which can be erroneously created by make from ./install.sh.
7179 # Reject install programs that cannot install multiple files.
7180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7181 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7182 if test -z "$INSTALL"; then
7183 if ${ac_cv_path_install+:} false; then :
7184   $as_echo_n "(cached) " >&6
7185 else
7186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7187 for as_dir in $PATH
7188 do
7189   IFS=$as_save_IFS
7190   test -z "$as_dir" && as_dir=.
7191     # Account for people who put trailing slashes in PATH elements.
7192 case $as_dir/ in #((
7193   ./ | .// | /[cC]/* | \
7194   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7195   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7196   /usr/ucb/* ) ;;
7197   *)
7198     # OSF1 and SCO ODT 3.0 have their own names for install.
7199     # Don't use installbsd from OSF since it installs stuff as root
7200     # by default.
7201     for ac_prog in ginstall scoinst install; do
7202       for ac_exec_ext in '' $ac_executable_extensions; do
7203         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7204           if test $ac_prog = install &&
7205             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7206             # AIX install.  It has an incompatible calling convention.
7207             :
7208           elif test $ac_prog = install &&
7209             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7210             # program-specific install script used by HP pwplus--don't use.
7211             :
7212           else
7213             rm -rf conftest.one conftest.two conftest.dir
7214             echo one > conftest.one
7215             echo two > conftest.two
7216             mkdir conftest.dir
7217             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7218               test -s conftest.one && test -s conftest.two &&
7219               test -s conftest.dir/conftest.one &&
7220               test -s conftest.dir/conftest.two
7221             then
7222               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7223               break 3
7224             fi
7225           fi
7226         fi
7227       done
7228     done
7229     ;;
7230 esac
7231
7232   done
7233 IFS=$as_save_IFS
7234
7235 rm -rf conftest.one conftest.two conftest.dir
7236
7237 fi
7238   if test "${ac_cv_path_install+set}" = set; then
7239     INSTALL=$ac_cv_path_install
7240   else
7241     # As a last resort, use the slow shell script.  Don't cache a
7242     # value for INSTALL within a source directory, because that will
7243     # break other packages using the cache if that directory is
7244     # removed, or if the value is a relative name.
7245     INSTALL=$ac_install_sh
7246   fi
7247 fi
7248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7249 $as_echo "$INSTALL" >&6; }
7250
7251 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7252 # It thinks the first close brace ends the variable substitution.
7253 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7254
7255 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7256
7257 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7258
7259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7260 $as_echo_n "checking whether ln -s works... " >&6; }
7261 LN_S=$as_ln_s
7262 if test "$LN_S" = "ln -s"; then
7263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7264 $as_echo "yes" >&6; }
7265 else
7266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7267 $as_echo "no, using $LN_S" >&6; }
7268 fi
7269
7270 if test -n "$ac_tool_prefix"; then
7271   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7272 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7274 $as_echo_n "checking for $ac_word... " >&6; }
7275 if ${ac_cv_prog_RANLIB+:} false; then :
7276   $as_echo_n "(cached) " >&6
7277 else
7278   if test -n "$RANLIB"; then
7279   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7280 else
7281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7282 for as_dir in $PATH
7283 do
7284   IFS=$as_save_IFS
7285   test -z "$as_dir" && as_dir=.
7286     for ac_exec_ext in '' $ac_executable_extensions; do
7287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7288     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7290     break 2
7291   fi
7292 done
7293   done
7294 IFS=$as_save_IFS
7295
7296 fi
7297 fi
7298 RANLIB=$ac_cv_prog_RANLIB
7299 if test -n "$RANLIB"; then
7300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7301 $as_echo "$RANLIB" >&6; }
7302 else
7303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7304 $as_echo "no" >&6; }
7305 fi
7306
7307
7308 fi
7309 if test -z "$ac_cv_prog_RANLIB"; then
7310   ac_ct_RANLIB=$RANLIB
7311   # Extract the first word of "ranlib", so it can be a program name with args.
7312 set dummy ranlib; ac_word=$2
7313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7314 $as_echo_n "checking for $ac_word... " >&6; }
7315 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7316   $as_echo_n "(cached) " >&6
7317 else
7318   if test -n "$ac_ct_RANLIB"; then
7319   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7320 else
7321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7322 for as_dir in $PATH
7323 do
7324   IFS=$as_save_IFS
7325   test -z "$as_dir" && as_dir=.
7326     for ac_exec_ext in '' $ac_executable_extensions; do
7327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7328     ac_cv_prog_ac_ct_RANLIB="ranlib"
7329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7330     break 2
7331   fi
7332 done
7333   done
7334 IFS=$as_save_IFS
7335
7336 fi
7337 fi
7338 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7339 if test -n "$ac_ct_RANLIB"; then
7340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7341 $as_echo "$ac_ct_RANLIB" >&6; }
7342 else
7343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7344 $as_echo "no" >&6; }
7345 fi
7346
7347   if test "x$ac_ct_RANLIB" = x; then
7348     RANLIB=":"
7349   else
7350     case $cross_compiling:$ac_tool_warned in
7351 yes:)
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7353 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7354 ac_tool_warned=yes ;;
7355 esac
7356     RANLIB=$ac_ct_RANLIB
7357   fi
7358 else
7359   RANLIB="$ac_cv_prog_RANLIB"
7360 fi
7361
7362 for ac_prog in 'bison -y' byacc
7363 do
7364   # Extract the first word of "$ac_prog", so it can be a program name with args.
7365 set dummy $ac_prog; ac_word=$2
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7367 $as_echo_n "checking for $ac_word... " >&6; }
7368 if ${ac_cv_prog_YACC+:} false; then :
7369   $as_echo_n "(cached) " >&6
7370 else
7371   if test -n "$YACC"; then
7372   ac_cv_prog_YACC="$YACC" # Let the user override the test.
7373 else
7374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7375 for as_dir in $PATH
7376 do
7377   IFS=$as_save_IFS
7378   test -z "$as_dir" && as_dir=.
7379     for ac_exec_ext in '' $ac_executable_extensions; do
7380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7381     ac_cv_prog_YACC="$ac_prog"
7382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7383     break 2
7384   fi
7385 done
7386   done
7387 IFS=$as_save_IFS
7388
7389 fi
7390 fi
7391 YACC=$ac_cv_prog_YACC
7392 if test -n "$YACC"; then
7393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7394 $as_echo "$YACC" >&6; }
7395 else
7396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7397 $as_echo "no" >&6; }
7398 fi
7399
7400
7401   test -n "$YACC" && break
7402 done
7403 test -n "$YACC" || YACC="yacc"
7404
7405
7406 if test -n "$ac_tool_prefix"; then
7407   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7408 set dummy ${ac_tool_prefix}ar; ac_word=$2
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7410 $as_echo_n "checking for $ac_word... " >&6; }
7411 if ${ac_cv_prog_AR+:} false; then :
7412   $as_echo_n "(cached) " >&6
7413 else
7414   if test -n "$AR"; then
7415   ac_cv_prog_AR="$AR" # Let the user override the test.
7416 else
7417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7418 for as_dir in $PATH
7419 do
7420   IFS=$as_save_IFS
7421   test -z "$as_dir" && as_dir=.
7422     for ac_exec_ext in '' $ac_executable_extensions; do
7423   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7424     ac_cv_prog_AR="${ac_tool_prefix}ar"
7425     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7426     break 2
7427   fi
7428 done
7429   done
7430 IFS=$as_save_IFS
7431
7432 fi
7433 fi
7434 AR=$ac_cv_prog_AR
7435 if test -n "$AR"; then
7436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7437 $as_echo "$AR" >&6; }
7438 else
7439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7440 $as_echo "no" >&6; }
7441 fi
7442
7443
7444 fi
7445 if test -z "$ac_cv_prog_AR"; then
7446   ac_ct_AR=$AR
7447   # Extract the first word of "ar", so it can be a program name with args.
7448 set dummy ar; ac_word=$2
7449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7450 $as_echo_n "checking for $ac_word... " >&6; }
7451 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7452   $as_echo_n "(cached) " >&6
7453 else
7454   if test -n "$ac_ct_AR"; then
7455   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7456 else
7457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7458 for as_dir in $PATH
7459 do
7460   IFS=$as_save_IFS
7461   test -z "$as_dir" && as_dir=.
7462     for ac_exec_ext in '' $ac_executable_extensions; do
7463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7464     ac_cv_prog_ac_ct_AR="ar"
7465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7466     break 2
7467   fi
7468 done
7469   done
7470 IFS=$as_save_IFS
7471
7472 fi
7473 fi
7474 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7475 if test -n "$ac_ct_AR"; then
7476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7477 $as_echo "$ac_ct_AR" >&6; }
7478 else
7479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7480 $as_echo "no" >&6; }
7481 fi
7482
7483   if test "x$ac_ct_AR" = x; then
7484     AR=""
7485   else
7486     case $cross_compiling:$ac_tool_warned in
7487 yes:)
7488 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7489 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7490 ac_tool_warned=yes ;;
7491 esac
7492     AR=$ac_ct_AR
7493   fi
7494 else
7495   AR="$ac_cv_prog_AR"
7496 fi
7497
7498 if test -n "$ac_tool_prefix"; then
7499   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7500 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7502 $as_echo_n "checking for $ac_word... " >&6; }
7503 if ${ac_cv_prog_DLLTOOL+:} false; then :
7504   $as_echo_n "(cached) " >&6
7505 else
7506   if test -n "$DLLTOOL"; then
7507   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7508 else
7509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7510 for as_dir in $PATH
7511 do
7512   IFS=$as_save_IFS
7513   test -z "$as_dir" && as_dir=.
7514     for ac_exec_ext in '' $ac_executable_extensions; do
7515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7516     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7518     break 2
7519   fi
7520 done
7521   done
7522 IFS=$as_save_IFS
7523
7524 fi
7525 fi
7526 DLLTOOL=$ac_cv_prog_DLLTOOL
7527 if test -n "$DLLTOOL"; then
7528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7529 $as_echo "$DLLTOOL" >&6; }
7530 else
7531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7532 $as_echo "no" >&6; }
7533 fi
7534
7535
7536 fi
7537 if test -z "$ac_cv_prog_DLLTOOL"; then
7538   ac_ct_DLLTOOL=$DLLTOOL
7539   # Extract the first word of "dlltool", so it can be a program name with args.
7540 set dummy dlltool; ac_word=$2
7541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7542 $as_echo_n "checking for $ac_word... " >&6; }
7543 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7544   $as_echo_n "(cached) " >&6
7545 else
7546   if test -n "$ac_ct_DLLTOOL"; then
7547   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7548 else
7549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7550 for as_dir in $PATH
7551 do
7552   IFS=$as_save_IFS
7553   test -z "$as_dir" && as_dir=.
7554     for ac_exec_ext in '' $ac_executable_extensions; do
7555   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7556     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7558     break 2
7559   fi
7560 done
7561   done
7562 IFS=$as_save_IFS
7563
7564 fi
7565 fi
7566 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7567 if test -n "$ac_ct_DLLTOOL"; then
7568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7569 $as_echo "$ac_ct_DLLTOOL" >&6; }
7570 else
7571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7572 $as_echo "no" >&6; }
7573 fi
7574
7575   if test "x$ac_ct_DLLTOOL" = x; then
7576     DLLTOOL=""
7577   else
7578     case $cross_compiling:$ac_tool_warned in
7579 yes:)
7580 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7581 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7582 ac_tool_warned=yes ;;
7583 esac
7584     DLLTOOL=$ac_ct_DLLTOOL
7585   fi
7586 else
7587   DLLTOOL="$ac_cv_prog_DLLTOOL"
7588 fi
7589
7590 if test -n "$ac_tool_prefix"; then
7591   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7592 set dummy ${ac_tool_prefix}windres; ac_word=$2
7593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7594 $as_echo_n "checking for $ac_word... " >&6; }
7595 if ${ac_cv_prog_WINDRES+:} false; then :
7596   $as_echo_n "(cached) " >&6
7597 else
7598   if test -n "$WINDRES"; then
7599   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7600 else
7601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7602 for as_dir in $PATH
7603 do
7604   IFS=$as_save_IFS
7605   test -z "$as_dir" && as_dir=.
7606     for ac_exec_ext in '' $ac_executable_extensions; do
7607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7608     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7610     break 2
7611   fi
7612 done
7613   done
7614 IFS=$as_save_IFS
7615
7616 fi
7617 fi
7618 WINDRES=$ac_cv_prog_WINDRES
7619 if test -n "$WINDRES"; then
7620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7621 $as_echo "$WINDRES" >&6; }
7622 else
7623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7624 $as_echo "no" >&6; }
7625 fi
7626
7627
7628 fi
7629 if test -z "$ac_cv_prog_WINDRES"; then
7630   ac_ct_WINDRES=$WINDRES
7631   # Extract the first word of "windres", so it can be a program name with args.
7632 set dummy windres; ac_word=$2
7633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7634 $as_echo_n "checking for $ac_word... " >&6; }
7635 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7636   $as_echo_n "(cached) " >&6
7637 else
7638   if test -n "$ac_ct_WINDRES"; then
7639   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7640 else
7641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7642 for as_dir in $PATH
7643 do
7644   IFS=$as_save_IFS
7645   test -z "$as_dir" && as_dir=.
7646     for ac_exec_ext in '' $ac_executable_extensions; do
7647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7648     ac_cv_prog_ac_ct_WINDRES="windres"
7649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7650     break 2
7651   fi
7652 done
7653   done
7654 IFS=$as_save_IFS
7655
7656 fi
7657 fi
7658 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7659 if test -n "$ac_ct_WINDRES"; then
7660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7661 $as_echo "$ac_ct_WINDRES" >&6; }
7662 else
7663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7664 $as_echo "no" >&6; }
7665 fi
7666
7667   if test "x$ac_ct_WINDRES" = x; then
7668     WINDRES=""
7669   else
7670     case $cross_compiling:$ac_tool_warned in
7671 yes:)
7672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7673 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7674 ac_tool_warned=yes ;;
7675 esac
7676     WINDRES=$ac_ct_WINDRES
7677   fi
7678 else
7679   WINDRES="$ac_cv_prog_WINDRES"
7680 fi
7681
7682
7683 case $host_os in
7684   gnu*)
7685     # Needed for GNU Hurd hosts.
7686     if test -n "$ac_tool_prefix"; then
7687   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7688 set dummy ${ac_tool_prefix}mig; ac_word=$2
7689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7690 $as_echo_n "checking for $ac_word... " >&6; }
7691 if ${ac_cv_prog_MIG+:} false; then :
7692   $as_echo_n "(cached) " >&6
7693 else
7694   if test -n "$MIG"; then
7695   ac_cv_prog_MIG="$MIG" # Let the user override the test.
7696 else
7697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7698 for as_dir in $PATH
7699 do
7700   IFS=$as_save_IFS
7701   test -z "$as_dir" && as_dir=.
7702     for ac_exec_ext in '' $ac_executable_extensions; do
7703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7704     ac_cv_prog_MIG="${ac_tool_prefix}mig"
7705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7706     break 2
7707   fi
7708 done
7709   done
7710 IFS=$as_save_IFS
7711
7712 fi
7713 fi
7714 MIG=$ac_cv_prog_MIG
7715 if test -n "$MIG"; then
7716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7717 $as_echo "$MIG" >&6; }
7718 else
7719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7720 $as_echo "no" >&6; }
7721 fi
7722
7723
7724 fi
7725 if test -z "$ac_cv_prog_MIG"; then
7726   ac_ct_MIG=$MIG
7727   # Extract the first word of "mig", so it can be a program name with args.
7728 set dummy mig; ac_word=$2
7729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7730 $as_echo_n "checking for $ac_word... " >&6; }
7731 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7732   $as_echo_n "(cached) " >&6
7733 else
7734   if test -n "$ac_ct_MIG"; then
7735   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7736 else
7737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7738 for as_dir in $PATH
7739 do
7740   IFS=$as_save_IFS
7741   test -z "$as_dir" && as_dir=.
7742     for ac_exec_ext in '' $ac_executable_extensions; do
7743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7744     ac_cv_prog_ac_ct_MIG="mig"
7745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7746     break 2
7747   fi
7748 done
7749   done
7750 IFS=$as_save_IFS
7751
7752 fi
7753 fi
7754 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7755 if test -n "$ac_ct_MIG"; then
7756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7757 $as_echo "$ac_ct_MIG" >&6; }
7758 else
7759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7760 $as_echo "no" >&6; }
7761 fi
7762
7763   if test "x$ac_ct_MIG" = x; then
7764     MIG=""
7765   else
7766     case $cross_compiling:$ac_tool_warned in
7767 yes:)
7768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7769 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7770 ac_tool_warned=yes ;;
7771 esac
7772     MIG=$ac_ct_MIG
7773   fi
7774 else
7775   MIG="$ac_cv_prog_MIG"
7776 fi
7777
7778     if test x"$MIG" = x; then
7779       as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
7780     fi
7781     ;;
7782 esac
7783
7784 # ---------------------- #
7785 # Checks for libraries.  #
7786 # ---------------------- #
7787
7788 # We might need to link with -lm; most simulators need it.
7789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7790 $as_echo_n "checking for main in -lm... " >&6; }
7791 if ${ac_cv_lib_m_main+:} false; then :
7792   $as_echo_n "(cached) " >&6
7793 else
7794   ac_check_lib_save_LIBS=$LIBS
7795 LIBS="-lm  $LIBS"
7796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7797 /* end confdefs.h.  */
7798
7799
7800 int
7801 main ()
7802 {
7803 return main ();
7804   ;
7805   return 0;
7806 }
7807 _ACEOF
7808 if ac_fn_c_try_link "$LINENO"; then :
7809   ac_cv_lib_m_main=yes
7810 else
7811   ac_cv_lib_m_main=no
7812 fi
7813 rm -f core conftest.err conftest.$ac_objext \
7814     conftest$ac_exeext conftest.$ac_ext
7815 LIBS=$ac_check_lib_save_LIBS
7816 fi
7817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7818 $as_echo "$ac_cv_lib_m_main" >&6; }
7819 if test "x$ac_cv_lib_m_main" = xyes; then :
7820   cat >>confdefs.h <<_ACEOF
7821 #define HAVE_LIBM 1
7822 _ACEOF
7823
7824   LIBS="-lm $LIBS"
7825
7826 fi
7827
7828
7829 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7831 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7832 if ${ac_cv_search_gethostbyname+:} false; then :
7833   $as_echo_n "(cached) " >&6
7834 else
7835   ac_func_search_save_LIBS=$LIBS
7836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7837 /* end confdefs.h.  */
7838
7839 /* Override any GCC internal prototype to avoid an error.
7840    Use char because int might match the return type of a GCC
7841    builtin and then its argument prototype would still apply.  */
7842 #ifdef __cplusplus
7843 extern "C"
7844 #endif
7845 char gethostbyname ();
7846 int
7847 main ()
7848 {
7849 return gethostbyname ();
7850   ;
7851   return 0;
7852 }
7853 _ACEOF
7854 for ac_lib in '' nsl; do
7855   if test -z "$ac_lib"; then
7856     ac_res="none required"
7857   else
7858     ac_res=-l$ac_lib
7859     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7860   fi
7861   if ac_fn_c_try_link "$LINENO"; then :
7862   ac_cv_search_gethostbyname=$ac_res
7863 fi
7864 rm -f core conftest.err conftest.$ac_objext \
7865     conftest$ac_exeext
7866   if ${ac_cv_search_gethostbyname+:} false; then :
7867   break
7868 fi
7869 done
7870 if ${ac_cv_search_gethostbyname+:} false; then :
7871
7872 else
7873   ac_cv_search_gethostbyname=no
7874 fi
7875 rm conftest.$ac_ext
7876 LIBS=$ac_func_search_save_LIBS
7877 fi
7878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7879 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7880 ac_res=$ac_cv_search_gethostbyname
7881 if test "$ac_res" != no; then :
7882   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7883
7884 fi
7885
7886
7887 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7889 $as_echo_n "checking for library containing socketpair... " >&6; }
7890 if ${ac_cv_search_socketpair+:} false; then :
7891   $as_echo_n "(cached) " >&6
7892 else
7893   ac_func_search_save_LIBS=$LIBS
7894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7895 /* end confdefs.h.  */
7896
7897 /* Override any GCC internal prototype to avoid an error.
7898    Use char because int might match the return type of a GCC
7899    builtin and then its argument prototype would still apply.  */
7900 #ifdef __cplusplus
7901 extern "C"
7902 #endif
7903 char socketpair ();
7904 int
7905 main ()
7906 {
7907 return socketpair ();
7908   ;
7909   return 0;
7910 }
7911 _ACEOF
7912 for ac_lib in '' socket; do
7913   if test -z "$ac_lib"; then
7914     ac_res="none required"
7915   else
7916     ac_res=-l$ac_lib
7917     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7918   fi
7919   if ac_fn_c_try_link "$LINENO"; then :
7920   ac_cv_search_socketpair=$ac_res
7921 fi
7922 rm -f core conftest.err conftest.$ac_objext \
7923     conftest$ac_exeext
7924   if ${ac_cv_search_socketpair+:} false; then :
7925   break
7926 fi
7927 done
7928 if ${ac_cv_search_socketpair+:} false; then :
7929
7930 else
7931   ac_cv_search_socketpair=no
7932 fi
7933 rm conftest.$ac_ext
7934 LIBS=$ac_func_search_save_LIBS
7935 fi
7936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7937 $as_echo "$ac_cv_search_socketpair" >&6; }
7938 ac_res=$ac_cv_search_socketpair
7939 if test "$ac_res" != no; then :
7940   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7941
7942 fi
7943
7944
7945 # Link in zlib if we can.  This allows us to read compressed debug sections.
7946
7947   # Use the system's zlib library.
7948   zlibdir="-L\$(top_builddir)/../zlib"
7949   zlibinc="-I\$(top_srcdir)/../zlib"
7950
7951 # Check whether --with-system-zlib was given.
7952 if test "${with_system_zlib+set}" = set; then :
7953   withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7954     zlibdir=
7955     zlibinc=
7956   fi
7957
7958 fi
7959
7960
7961
7962
7963
7964 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7965 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7967 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7968 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7969   $as_echo_n "(cached) " >&6
7970 else
7971   ac_func_search_save_LIBS=$LIBS
7972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7973 /* end confdefs.h.  */
7974
7975 /* Override any GCC internal prototype to avoid an error.
7976    Use char because int might match the return type of a GCC
7977    builtin and then its argument prototype would still apply.  */
7978 #ifdef __cplusplus
7979 extern "C"
7980 #endif
7981 char kinfo_getvmmap ();
7982 int
7983 main ()
7984 {
7985 return kinfo_getvmmap ();
7986   ;
7987   return 0;
7988 }
7989 _ACEOF
7990 for ac_lib in '' util util-freebsd; do
7991   if test -z "$ac_lib"; then
7992     ac_res="none required"
7993   else
7994     ac_res=-l$ac_lib
7995     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7996   fi
7997   if ac_fn_c_try_link "$LINENO"; then :
7998   ac_cv_search_kinfo_getvmmap=$ac_res
7999 fi
8000 rm -f core conftest.err conftest.$ac_objext \
8001     conftest$ac_exeext
8002   if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8003   break
8004 fi
8005 done
8006 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8007
8008 else
8009   ac_cv_search_kinfo_getvmmap=no
8010 fi
8011 rm conftest.$ac_ext
8012 LIBS=$ac_func_search_save_LIBS
8013 fi
8014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8015 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8016 ac_res=$ac_cv_search_kinfo_getvmmap
8017 if test "$ac_res" != no; then :
8018   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8019
8020 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8021
8022 fi
8023
8024
8025 # fbsd-nat.c can also use kinfo_getfile.
8026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8027 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
8028 if ${ac_cv_search_kinfo_getfile+:} false; then :
8029   $as_echo_n "(cached) " >&6
8030 else
8031   ac_func_search_save_LIBS=$LIBS
8032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8033 /* end confdefs.h.  */
8034
8035 /* Override any GCC internal prototype to avoid an error.
8036    Use char because int might match the return type of a GCC
8037    builtin and then its argument prototype would still apply.  */
8038 #ifdef __cplusplus
8039 extern "C"
8040 #endif
8041 char kinfo_getfile ();
8042 int
8043 main ()
8044 {
8045 return kinfo_getfile ();
8046   ;
8047   return 0;
8048 }
8049 _ACEOF
8050 for ac_lib in '' util util-freebsd; do
8051   if test -z "$ac_lib"; then
8052     ac_res="none required"
8053   else
8054     ac_res=-l$ac_lib
8055     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8056   fi
8057   if ac_fn_c_try_link "$LINENO"; then :
8058   ac_cv_search_kinfo_getfile=$ac_res
8059 fi
8060 rm -f core conftest.err conftest.$ac_objext \
8061     conftest$ac_exeext
8062   if ${ac_cv_search_kinfo_getfile+:} false; then :
8063   break
8064 fi
8065 done
8066 if ${ac_cv_search_kinfo_getfile+:} false; then :
8067
8068 else
8069   ac_cv_search_kinfo_getfile=no
8070 fi
8071 rm conftest.$ac_ext
8072 LIBS=$ac_func_search_save_LIBS
8073 fi
8074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8075 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8076 ac_res=$ac_cv_search_kinfo_getfile
8077 if test "$ac_res" != no; then :
8078   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8079
8080 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8081
8082 fi
8083
8084
8085
8086       if test "X$prefix" = "XNONE"; then
8087     acl_final_prefix="$ac_default_prefix"
8088   else
8089     acl_final_prefix="$prefix"
8090   fi
8091   if test "X$exec_prefix" = "XNONE"; then
8092     acl_final_exec_prefix='${prefix}'
8093   else
8094     acl_final_exec_prefix="$exec_prefix"
8095   fi
8096   acl_save_prefix="$prefix"
8097   prefix="$acl_final_prefix"
8098   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8099   prefix="$acl_save_prefix"
8100
8101
8102 # Check whether --with-gnu-ld was given.
8103 if test "${with_gnu_ld+set}" = set; then :
8104   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8105 else
8106   with_gnu_ld=no
8107 fi
8108
8109 # Prepare PATH_SEPARATOR.
8110 # The user is always right.
8111 if test "${PATH_SEPARATOR+set}" != set; then
8112   echo "#! /bin/sh" >conf$$.sh
8113   echo  "exit 0"   >>conf$$.sh
8114   chmod +x conf$$.sh
8115   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8116     PATH_SEPARATOR=';'
8117   else
8118     PATH_SEPARATOR=:
8119   fi
8120   rm -f conf$$.sh
8121 fi
8122 ac_prog=ld
8123 if test "$GCC" = yes; then
8124   # Check if gcc -print-prog-name=ld gives a path.
8125   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8126 $as_echo_n "checking for ld used by GCC... " >&6; }
8127   case $host in
8128   *-*-mingw*)
8129     # gcc leaves a trailing carriage return which upsets mingw
8130     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8131   *)
8132     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8133   esac
8134   case $ac_prog in
8135     # Accept absolute paths.
8136     [\\/]* | [A-Za-z]:[\\/]*)
8137       re_direlt='/[^/][^/]*/\.\./'
8138       # Canonicalize the path of ld
8139       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8140       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8141         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8142       done
8143       test -z "$LD" && LD="$ac_prog"
8144       ;;
8145   "")
8146     # If it fails, then pretend we aren't using GCC.
8147     ac_prog=ld
8148     ;;
8149   *)
8150     # If it is relative, then search for the first ld in PATH.
8151     with_gnu_ld=unknown
8152     ;;
8153   esac
8154 elif test "$with_gnu_ld" = yes; then
8155   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8156 $as_echo_n "checking for GNU ld... " >&6; }
8157 else
8158   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8159 $as_echo_n "checking for non-GNU ld... " >&6; }
8160 fi
8161 if ${acl_cv_path_LD+:} false; then :
8162   $as_echo_n "(cached) " >&6
8163 else
8164   if test -z "$LD"; then
8165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8166   for ac_dir in $PATH; do
8167     test -z "$ac_dir" && ac_dir=.
8168     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8169       acl_cv_path_LD="$ac_dir/$ac_prog"
8170       # Check to see if the program is GNU ld.  I'd rather use --version,
8171       # but apparently some GNU ld's only accept -v.
8172       # Break only if it was the GNU/non-GNU ld that we prefer.
8173       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8174         test "$with_gnu_ld" != no && break
8175       else
8176         test "$with_gnu_ld" != yes && break
8177       fi
8178     fi
8179   done
8180   IFS="$ac_save_ifs"
8181 else
8182   acl_cv_path_LD="$LD" # Let the user override the test with a path.
8183 fi
8184 fi
8185
8186 LD="$acl_cv_path_LD"
8187 if test -n "$LD"; then
8188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8189 $as_echo "$LD" >&6; }
8190 else
8191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8192 $as_echo "no" >&6; }
8193 fi
8194 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8196 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8197 if ${acl_cv_prog_gnu_ld+:} false; then :
8198   $as_echo_n "(cached) " >&6
8199 else
8200   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8201 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8202   acl_cv_prog_gnu_ld=yes
8203 else
8204   acl_cv_prog_gnu_ld=no
8205 fi
8206 fi
8207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8208 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8209 with_gnu_ld=$acl_cv_prog_gnu_ld
8210
8211
8212
8213                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8214 $as_echo_n "checking for shared library run path origin... " >&6; }
8215 if ${acl_cv_rpath+:} false; then :
8216   $as_echo_n "(cached) " >&6
8217 else
8218
8219     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8220     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8221     . ./conftest.sh
8222     rm -f ./conftest.sh
8223     acl_cv_rpath=done
8224
8225 fi
8226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8227 $as_echo "$acl_cv_rpath" >&6; }
8228   wl="$acl_cv_wl"
8229   libext="$acl_cv_libext"
8230   shlibext="$acl_cv_shlibext"
8231   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8232   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8233   hardcode_direct="$acl_cv_hardcode_direct"
8234   hardcode_minus_L="$acl_cv_hardcode_minus_L"
8235     # Check whether --enable-rpath was given.
8236 if test "${enable_rpath+set}" = set; then :
8237   enableval=$enable_rpath; :
8238 else
8239   enable_rpath=yes
8240 fi
8241
8242
8243
8244
8245
8246
8247
8248
8249     use_additional=yes
8250
8251   acl_save_prefix="$prefix"
8252   prefix="$acl_final_prefix"
8253   acl_save_exec_prefix="$exec_prefix"
8254   exec_prefix="$acl_final_exec_prefix"
8255
8256     eval additional_includedir=\"$includedir\"
8257     eval additional_libdir=\"$libdir\"
8258
8259   exec_prefix="$acl_save_exec_prefix"
8260   prefix="$acl_save_prefix"
8261
8262
8263 # Check whether --with-libiconv-prefix was given.
8264 if test "${with_libiconv_prefix+set}" = set; then :
8265   withval=$with_libiconv_prefix;
8266     if test "X$withval" = "Xno"; then
8267       use_additional=no
8268     else
8269       if test "X$withval" = "X"; then
8270
8271   acl_save_prefix="$prefix"
8272   prefix="$acl_final_prefix"
8273   acl_save_exec_prefix="$exec_prefix"
8274   exec_prefix="$acl_final_exec_prefix"
8275
8276           eval additional_includedir=\"$includedir\"
8277           eval additional_libdir=\"$libdir\"
8278
8279   exec_prefix="$acl_save_exec_prefix"
8280   prefix="$acl_save_prefix"
8281
8282       else
8283         additional_includedir="$withval/include"
8284         additional_libdir="$withval/lib"
8285       fi
8286     fi
8287
8288 fi
8289
8290       LIBICONV=
8291   LTLIBICONV=
8292   INCICONV=
8293   rpathdirs=
8294   ltrpathdirs=
8295   names_already_handled=
8296   names_next_round='iconv '
8297   while test -n "$names_next_round"; do
8298     names_this_round="$names_next_round"
8299     names_next_round=
8300     for name in $names_this_round; do
8301       already_handled=
8302       for n in $names_already_handled; do
8303         if test "$n" = "$name"; then
8304           already_handled=yes
8305           break
8306         fi
8307       done
8308       if test -z "$already_handled"; then
8309         names_already_handled="$names_already_handled $name"
8310                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8311         eval value=\"\$HAVE_LIB$uppername\"
8312         if test -n "$value"; then
8313           if test "$value" = yes; then
8314             eval value=\"\$LIB$uppername\"
8315             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8316             eval value=\"\$LTLIB$uppername\"
8317             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8318           else
8319                                     :
8320           fi
8321         else
8322                               found_dir=
8323           found_la=
8324           found_so=
8325           found_a=
8326           if test $use_additional = yes; then
8327             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8328               found_dir="$additional_libdir"
8329               found_so="$additional_libdir/lib$name.$shlibext"
8330               if test -f "$additional_libdir/lib$name.la"; then
8331                 found_la="$additional_libdir/lib$name.la"
8332               fi
8333             else
8334               if test -f "$additional_libdir/lib$name.$libext"; then
8335                 found_dir="$additional_libdir"
8336                 found_a="$additional_libdir/lib$name.$libext"
8337                 if test -f "$additional_libdir/lib$name.la"; then
8338                   found_la="$additional_libdir/lib$name.la"
8339                 fi
8340               fi
8341             fi
8342           fi
8343           if test "X$found_dir" = "X"; then
8344             for x in $LDFLAGS $LTLIBICONV; do
8345
8346   acl_save_prefix="$prefix"
8347   prefix="$acl_final_prefix"
8348   acl_save_exec_prefix="$exec_prefix"
8349   exec_prefix="$acl_final_exec_prefix"
8350   eval x=\"$x\"
8351   exec_prefix="$acl_save_exec_prefix"
8352   prefix="$acl_save_prefix"
8353
8354               case "$x" in
8355                 -L*)
8356                   dir=`echo "X$x" | sed -e 's/^X-L//'`
8357                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8358                     found_dir="$dir"
8359                     found_so="$dir/lib$name.$shlibext"
8360                     if test -f "$dir/lib$name.la"; then
8361                       found_la="$dir/lib$name.la"
8362                     fi
8363                   else
8364                     if test -f "$dir/lib$name.$libext"; then
8365                       found_dir="$dir"
8366                       found_a="$dir/lib$name.$libext"
8367                       if test -f "$dir/lib$name.la"; then
8368                         found_la="$dir/lib$name.la"
8369                       fi
8370                     fi
8371                   fi
8372                   ;;
8373               esac
8374               if test "X$found_dir" != "X"; then
8375                 break
8376               fi
8377             done
8378           fi
8379           if test "X$found_dir" != "X"; then
8380                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8381             if test "X$found_so" != "X"; then
8382                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8383                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8384               else
8385                                                                                 haveit=
8386                 for x in $ltrpathdirs; do
8387                   if test "X$x" = "X$found_dir"; then
8388                     haveit=yes
8389                     break
8390                   fi
8391                 done
8392                 if test -z "$haveit"; then
8393                   ltrpathdirs="$ltrpathdirs $found_dir"
8394                 fi
8395                                 if test "$hardcode_direct" = yes; then
8396                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8397                 else
8398                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8399                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8400                                                             haveit=
8401                     for x in $rpathdirs; do
8402                       if test "X$x" = "X$found_dir"; then
8403                         haveit=yes
8404                         break
8405                       fi
8406                     done
8407                     if test -z "$haveit"; then
8408                       rpathdirs="$rpathdirs $found_dir"
8409                     fi
8410                   else
8411                                                                                 haveit=
8412                     for x in $LDFLAGS $LIBICONV; do
8413
8414   acl_save_prefix="$prefix"
8415   prefix="$acl_final_prefix"
8416   acl_save_exec_prefix="$exec_prefix"
8417   exec_prefix="$acl_final_exec_prefix"
8418   eval x=\"$x\"
8419   exec_prefix="$acl_save_exec_prefix"
8420   prefix="$acl_save_prefix"
8421
8422                       if test "X$x" = "X-L$found_dir"; then
8423                         haveit=yes
8424                         break
8425                       fi
8426                     done
8427                     if test -z "$haveit"; then
8428                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8429                     fi
8430                     if test "$hardcode_minus_L" != no; then
8431                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8432                     else
8433                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8434                     fi
8435                   fi
8436                 fi
8437               fi
8438             else
8439               if test "X$found_a" != "X"; then
8440                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8441               else
8442                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8443               fi
8444             fi
8445                         additional_includedir=
8446             case "$found_dir" in
8447               */lib | */lib/)
8448                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8449                 additional_includedir="$basedir/include"
8450                 ;;
8451             esac
8452             if test "X$additional_includedir" != "X"; then
8453                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
8454                 haveit=
8455                 if test "X$additional_includedir" = "X/usr/local/include"; then
8456                   if test -n "$GCC"; then
8457                     case $host_os in
8458                       linux*) haveit=yes;;
8459                     esac
8460                   fi
8461                 fi
8462                 if test -z "$haveit"; then
8463                   for x in $CPPFLAGS $INCICONV; do
8464
8465   acl_save_prefix="$prefix"
8466   prefix="$acl_final_prefix"
8467   acl_save_exec_prefix="$exec_prefix"
8468   exec_prefix="$acl_final_exec_prefix"
8469   eval x=\"$x\"
8470   exec_prefix="$acl_save_exec_prefix"
8471   prefix="$acl_save_prefix"
8472
8473                     if test "X$x" = "X-I$additional_includedir"; then
8474                       haveit=yes
8475                       break
8476                     fi
8477                   done
8478                   if test -z "$haveit"; then
8479                     if test -d "$additional_includedir"; then
8480                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8481                     fi
8482                   fi
8483                 fi
8484               fi
8485             fi
8486                         if test -n "$found_la"; then
8487                                                         save_libdir="$libdir"
8488               case "$found_la" in
8489                 */* | *\\*) . "$found_la" ;;
8490                 *) . "./$found_la" ;;
8491               esac
8492               libdir="$save_libdir"
8493                             for dep in $dependency_libs; do
8494                 case "$dep" in
8495                   -L*)
8496                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8497                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
8498                       haveit=
8499                       if test "X$additional_libdir" = "X/usr/local/lib"; then
8500                         if test -n "$GCC"; then
8501                           case $host_os in
8502                             linux*) haveit=yes;;
8503                           esac
8504                         fi
8505                       fi
8506                       if test -z "$haveit"; then
8507                         haveit=
8508                         for x in $LDFLAGS $LIBICONV; do
8509
8510   acl_save_prefix="$prefix"
8511   prefix="$acl_final_prefix"
8512   acl_save_exec_prefix="$exec_prefix"
8513   exec_prefix="$acl_final_exec_prefix"
8514   eval x=\"$x\"
8515   exec_prefix="$acl_save_exec_prefix"
8516   prefix="$acl_save_prefix"
8517
8518                           if test "X$x" = "X-L$additional_libdir"; then
8519                             haveit=yes
8520                             break
8521                           fi
8522                         done
8523                         if test -z "$haveit"; then
8524                           if test -d "$additional_libdir"; then
8525                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8526                           fi
8527                         fi
8528                         haveit=
8529                         for x in $LDFLAGS $LTLIBICONV; do
8530
8531   acl_save_prefix="$prefix"
8532   prefix="$acl_final_prefix"
8533   acl_save_exec_prefix="$exec_prefix"
8534   exec_prefix="$acl_final_exec_prefix"
8535   eval x=\"$x\"
8536   exec_prefix="$acl_save_exec_prefix"
8537   prefix="$acl_save_prefix"
8538
8539                           if test "X$x" = "X-L$additional_libdir"; then
8540                             haveit=yes
8541                             break
8542                           fi
8543                         done
8544                         if test -z "$haveit"; then
8545                           if test -d "$additional_libdir"; then
8546                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8547                           fi
8548                         fi
8549                       fi
8550                     fi
8551                     ;;
8552                   -R*)
8553                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
8554                     if test "$enable_rpath" != no; then
8555                                                                   haveit=
8556                       for x in $rpathdirs; do
8557                         if test "X$x" = "X$dir"; then
8558                           haveit=yes
8559                           break
8560                         fi
8561                       done
8562                       if test -z "$haveit"; then
8563                         rpathdirs="$rpathdirs $dir"
8564                       fi
8565                                                                   haveit=
8566                       for x in $ltrpathdirs; do
8567                         if test "X$x" = "X$dir"; then
8568                           haveit=yes
8569                           break
8570                         fi
8571                       done
8572                       if test -z "$haveit"; then
8573                         ltrpathdirs="$ltrpathdirs $dir"
8574                       fi
8575                     fi
8576                     ;;
8577                   -l*)
8578                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8579                     ;;
8580                   *.la)
8581                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8582                     ;;
8583                   *)
8584                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8585                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8586                     ;;
8587                 esac
8588               done
8589             fi
8590           else
8591                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8592             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8593           fi
8594         fi
8595       fi
8596     done
8597   done
8598   if test "X$rpathdirs" != "X"; then
8599     if test -n "$hardcode_libdir_separator"; then
8600                         alldirs=
8601       for found_dir in $rpathdirs; do
8602         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8603       done
8604             acl_save_libdir="$libdir"
8605       libdir="$alldirs"
8606       eval flag=\"$hardcode_libdir_flag_spec\"
8607       libdir="$acl_save_libdir"
8608       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8609     else
8610             for found_dir in $rpathdirs; do
8611         acl_save_libdir="$libdir"
8612         libdir="$found_dir"
8613         eval flag=\"$hardcode_libdir_flag_spec\"
8614         libdir="$acl_save_libdir"
8615         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8616       done
8617     fi
8618   fi
8619   if test "X$ltrpathdirs" != "X"; then
8620             for found_dir in $ltrpathdirs; do
8621       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8622     done
8623   fi
8624
8625
8626
8627
8628
8629
8630
8631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8632 $as_echo_n "checking for iconv... " >&6; }
8633 if ${am_cv_func_iconv+:} false; then :
8634   $as_echo_n "(cached) " >&6
8635 else
8636
8637     am_cv_func_iconv="no, consider installing GNU libiconv"
8638     am_cv_lib_iconv=no
8639                     am_save_CPPFLAGS="$CPPFLAGS"
8640     CPPFLAGS="$CPPFLAGS $INCICONV"
8641     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8642 /* end confdefs.h.  */
8643 #include <stdlib.h>
8644 #include <iconv.h>
8645 int
8646 main ()
8647 {
8648 iconv_t cd = iconv_open("","");
8649        iconv(cd,NULL,NULL,NULL,NULL);
8650        iconv_close(cd);
8651   ;
8652   return 0;
8653 }
8654 _ACEOF
8655 if ac_fn_c_try_link "$LINENO"; then :
8656   am_cv_func_iconv=yes
8657 fi
8658 rm -f core conftest.err conftest.$ac_objext \
8659     conftest$ac_exeext conftest.$ac_ext
8660     CPPFLAGS="$am_save_CPPFLAGS"
8661
8662     if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8663       for _libs in .libs _libs; do
8664         am_save_CPPFLAGS="$CPPFLAGS"
8665         am_save_LIBS="$LIBS"
8666         CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8667         LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8668         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8669 /* end confdefs.h.  */
8670 #include <stdlib.h>
8671 #include <iconv.h>
8672 int
8673 main ()
8674 {
8675 iconv_t cd = iconv_open("","");
8676            iconv(cd,NULL,NULL,NULL,NULL);
8677            iconv_close(cd);
8678   ;
8679   return 0;
8680 }
8681 _ACEOF
8682 if ac_fn_c_try_link "$LINENO"; then :
8683   INCICONV="-I../libiconv/include"
8684           LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8685           LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8686           am_cv_lib_iconv=yes
8687           am_cv_func_iconv=yes
8688 fi
8689 rm -f core conftest.err conftest.$ac_objext \
8690     conftest$ac_exeext conftest.$ac_ext
8691         CPPFLAGS="$am_save_CPPFLAGS"
8692         LIBS="$am_save_LIBS"
8693         if test "$am_cv_func_iconv" = "yes"; then
8694           break
8695         fi
8696       done
8697     fi
8698
8699     if test "$am_cv_func_iconv" != yes; then
8700       am_save_CPPFLAGS="$CPPFLAGS"
8701       am_save_LIBS="$LIBS"
8702       CPPFLAGS="$LIBS $INCICONV"
8703       LIBS="$LIBS $LIBICONV"
8704       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8705 /* end confdefs.h.  */
8706 #include <stdlib.h>
8707 #include <iconv.h>
8708 int
8709 main ()
8710 {
8711 iconv_t cd = iconv_open("","");
8712          iconv(cd,NULL,NULL,NULL,NULL);
8713          iconv_close(cd);
8714   ;
8715   return 0;
8716 }
8717 _ACEOF
8718 if ac_fn_c_try_link "$LINENO"; then :
8719   am_cv_lib_iconv=yes
8720         am_cv_func_iconv=yes
8721 fi
8722 rm -f core conftest.err conftest.$ac_objext \
8723     conftest$ac_exeext conftest.$ac_ext
8724       CPPFLAGS="$am_save_CPPFLAGS"
8725       LIBS="$am_save_LIBS"
8726     fi
8727
8728 fi
8729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8730 $as_echo "$am_cv_func_iconv" >&6; }
8731   if test "$am_cv_func_iconv" = yes; then
8732
8733 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8734
8735   fi
8736   if test "$am_cv_lib_iconv" = yes; then
8737
8738   for element in $INCICONV; do
8739     haveit=
8740     for x in $CPPFLAGS; do
8741
8742   acl_save_prefix="$prefix"
8743   prefix="$acl_final_prefix"
8744   acl_save_exec_prefix="$exec_prefix"
8745   exec_prefix="$acl_final_exec_prefix"
8746   eval x=\"$x\"
8747   exec_prefix="$acl_save_exec_prefix"
8748   prefix="$acl_save_prefix"
8749
8750       if test "X$x" = "X$element"; then
8751         haveit=yes
8752         break
8753       fi
8754     done
8755     if test -z "$haveit"; then
8756       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8757     fi
8758   done
8759
8760     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8761 $as_echo_n "checking how to link with libiconv... " >&6; }
8762     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8763 $as_echo "$LIBICONV" >&6; }
8764   else
8765     LIBICONV=
8766     LTLIBICONV=
8767   fi
8768
8769
8770
8771   if test "$am_cv_func_iconv" = yes; then
8772     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8773 $as_echo_n "checking for iconv declaration... " >&6; }
8774     if ${am_cv_proto_iconv+:} false; then :
8775   $as_echo_n "(cached) " >&6
8776 else
8777
8778       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8779 /* end confdefs.h.  */
8780
8781 #include <stdlib.h>
8782 #include <iconv.h>
8783 extern
8784 #ifdef __cplusplus
8785 "C"
8786 #endif
8787 #if defined(__STDC__) || defined(__cplusplus)
8788 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8789 #else
8790 size_t iconv();
8791 #endif
8792
8793 int
8794 main ()
8795 {
8796
8797   ;
8798   return 0;
8799 }
8800 _ACEOF
8801 if ac_fn_c_try_compile "$LINENO"; then :
8802   am_cv_proto_iconv_arg1=""
8803 else
8804   am_cv_proto_iconv_arg1="const"
8805 fi
8806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8807       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);"
8808 fi
8809
8810     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8811     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8812          }$am_cv_proto_iconv" >&5
8813 $as_echo "${ac_t:-
8814          }$am_cv_proto_iconv" >&6; }
8815
8816 cat >>confdefs.h <<_ACEOF
8817 #define ICONV_CONST $am_cv_proto_iconv_arg1
8818 _ACEOF
8819
8820   fi
8821
8822
8823 # GDB may fork/exec the iconv program to get the list of supported character
8824 # sets.  Allow the user to specify where to find it.
8825 # There are several factors affecting the choice of option name:
8826 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8827 #   the build-time location of libiconv files.
8828 # - The program we need to find is iconv, which comes with glibc.  The user
8829 #   doesn't necessarily have libiconv installed.  Therefore naming this
8830 #   --with-libiconv-foo feels wrong.
8831 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8832 #   defined to work on directories not files (though it really doesn't know
8833 #   the difference).
8834 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8835 #   with --with-libiconv-prefix.
8836 # Putting these together is why the option name is --with-iconv-bin.
8837
8838
8839 # Check whether --with-iconv-bin was given.
8840 if test "${with_iconv_bin+set}" = set; then :
8841   withval=$with_iconv_bin; iconv_bin="${withval}"
8842
8843 cat >>confdefs.h <<_ACEOF
8844 #define ICONV_BIN "${iconv_bin}"
8845 _ACEOF
8846
8847
8848   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8849      if test "x$prefix" = xNONE; then
8850         test_prefix=/usr/local
8851      else
8852         test_prefix=$prefix
8853      fi
8854   else
8855      test_prefix=$exec_prefix
8856   fi
8857   value=0
8858   case ${iconv_bin} in
8859      "${test_prefix}"|"${test_prefix}/"*|\
8860         '${exec_prefix}'|'${exec_prefix}/'*)
8861      value=1
8862      ;;
8863   esac
8864
8865 cat >>confdefs.h <<_ACEOF
8866 #define ICONV_BIN_RELOCATABLE $value
8867 _ACEOF
8868
8869
8870
8871 fi
8872
8873
8874 # For the TUI, we need enhanced curses functionality.
8875 if test x"$enable_tui" != xno; then
8876   prefer_curses=yes
8877 fi
8878
8879 curses_found=no
8880 if test x"$prefer_curses" = xyes; then
8881   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8882   # curses library because the latter might not provide all the
8883   # functionality we need.  However, this leads to problems on systems
8884   # where the linker searches /usr/local/lib, but the compiler doesn't
8885   # search /usr/local/include, if ncurses is installed in /usr/local.  A
8886   # default installation of ncurses on alpha*-dec-osf* will lead to such
8887   # a situation.
8888   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8889 $as_echo_n "checking for library containing waddstr... " >&6; }
8890 if ${ac_cv_search_waddstr+:} false; then :
8891   $as_echo_n "(cached) " >&6
8892 else
8893   ac_func_search_save_LIBS=$LIBS
8894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8895 /* end confdefs.h.  */
8896
8897 /* Override any GCC internal prototype to avoid an error.
8898    Use char because int might match the return type of a GCC
8899    builtin and then its argument prototype would still apply.  */
8900 #ifdef __cplusplus
8901 extern "C"
8902 #endif
8903 char waddstr ();
8904 int
8905 main ()
8906 {
8907 return waddstr ();
8908   ;
8909   return 0;
8910 }
8911 _ACEOF
8912 for ac_lib in '' ncursesw ncurses cursesX curses; do
8913   if test -z "$ac_lib"; then
8914     ac_res="none required"
8915   else
8916     ac_res=-l$ac_lib
8917     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8918   fi
8919   if ac_fn_c_try_link "$LINENO"; then :
8920   ac_cv_search_waddstr=$ac_res
8921 fi
8922 rm -f core conftest.err conftest.$ac_objext \
8923     conftest$ac_exeext
8924   if ${ac_cv_search_waddstr+:} false; then :
8925   break
8926 fi
8927 done
8928 if ${ac_cv_search_waddstr+:} false; then :
8929
8930 else
8931   ac_cv_search_waddstr=no
8932 fi
8933 rm conftest.$ac_ext
8934 LIBS=$ac_func_search_save_LIBS
8935 fi
8936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8937 $as_echo "$ac_cv_search_waddstr" >&6; }
8938 ac_res=$ac_cv_search_waddstr
8939 if test "$ac_res" != no; then :
8940   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8941
8942 fi
8943
8944
8945   if test "$ac_cv_search_waddstr" != no; then
8946     curses_found=yes
8947   fi
8948 fi
8949
8950 # Check whether we should enable the TUI, but only do so if we really
8951 # can.
8952 if test x"$enable_tui" != xno; then
8953   if test -d $srcdir/tui; then
8954     if test "$curses_found" != no; then
8955       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8956       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8957       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8958       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8959     else
8960       if test x"$enable_tui" = xyes; then
8961         as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
8962       else
8963         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8964 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8965       fi
8966     fi
8967   fi
8968 fi
8969
8970 # Since GDB uses Readline, we need termcap functionality.  In many
8971 # cases this will be provided by the curses library, but some systems
8972 # have a separate termcap library, or no curses library at all.
8973
8974 case $host_os in
8975   cygwin*)
8976     if test -d $srcdir/libtermcap; then
8977       LIBS="../libtermcap/libtermcap.a $LIBS"
8978       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8979     fi ;;
8980   go32* | *djgpp*)
8981     ac_cv_search_tgetent="none required"
8982     ;;
8983 esac
8984
8985 # These are the libraries checked by Readline.
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8987 $as_echo_n "checking for library containing tgetent... " >&6; }
8988 if ${ac_cv_search_tgetent+:} false; then :
8989   $as_echo_n "(cached) " >&6
8990 else
8991   ac_func_search_save_LIBS=$LIBS
8992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8993 /* end confdefs.h.  */
8994
8995 /* Override any GCC internal prototype to avoid an error.
8996    Use char because int might match the return type of a GCC
8997    builtin and then its argument prototype would still apply.  */
8998 #ifdef __cplusplus
8999 extern "C"
9000 #endif
9001 char tgetent ();
9002 int
9003 main ()
9004 {
9005 return tgetent ();
9006   ;
9007   return 0;
9008 }
9009 _ACEOF
9010 for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
9011   if test -z "$ac_lib"; then
9012     ac_res="none required"
9013   else
9014     ac_res=-l$ac_lib
9015     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9016   fi
9017   if ac_fn_c_try_link "$LINENO"; then :
9018   ac_cv_search_tgetent=$ac_res
9019 fi
9020 rm -f core conftest.err conftest.$ac_objext \
9021     conftest$ac_exeext
9022   if ${ac_cv_search_tgetent+:} false; then :
9023   break
9024 fi
9025 done
9026 if ${ac_cv_search_tgetent+:} false; then :
9027
9028 else
9029   ac_cv_search_tgetent=no
9030 fi
9031 rm conftest.$ac_ext
9032 LIBS=$ac_func_search_save_LIBS
9033 fi
9034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9035 $as_echo "$ac_cv_search_tgetent" >&6; }
9036 ac_res=$ac_cv_search_tgetent
9037 if test "$ac_res" != no; then :
9038   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9039
9040 fi
9041
9042
9043 if test "$ac_cv_search_tgetent" = no; then
9044   CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9045 fi
9046
9047
9048 # Check whether --with-system-readline was given.
9049 if test "${with_system_readline+set}" = set; then :
9050   withval=$with_system_readline;
9051 fi
9052
9053
9054 if test "$with_system_readline" = yes; then
9055   READLINE=-lreadline
9056   READLINE_DEPS=
9057   READLINE_CFLAGS=
9058   READLINE_TEXI_INCFLAG=
9059 else
9060   READLINE='$(READLINE_DIR)/libreadline.a'
9061   READLINE_DEPS='$(READLINE)'
9062   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9063   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9064 fi
9065
9066
9067
9068
9069
9070 # Generate jit-reader.h
9071
9072 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9073 TARGET_PTR=
9074
9075 # The cast to long int works around a bug in the HP C Compiler
9076 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9077 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9078 # This bug is HP SR number 8606223364.
9079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9080 $as_echo_n "checking size of unsigned long long... " >&6; }
9081 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9082   $as_echo_n "(cached) " >&6
9083 else
9084   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
9085
9086 else
9087   if test "$ac_cv_type_unsigned_long_long" = yes; then
9088      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9089 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9090 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9091 See \`config.log' for more details" "$LINENO" 5; }
9092    else
9093      ac_cv_sizeof_unsigned_long_long=0
9094    fi
9095 fi
9096
9097 fi
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9099 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9100
9101
9102
9103 cat >>confdefs.h <<_ACEOF
9104 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9105 _ACEOF
9106
9107
9108 # The cast to long int works around a bug in the HP C Compiler
9109 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9110 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9111 # This bug is HP SR number 8606223364.
9112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9113 $as_echo_n "checking size of unsigned long... " >&6; }
9114 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9115   $as_echo_n "(cached) " >&6
9116 else
9117   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
9118
9119 else
9120   if test "$ac_cv_type_unsigned_long" = yes; then
9121      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9122 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9123 as_fn_error 77 "cannot compute sizeof (unsigned long)
9124 See \`config.log' for more details" "$LINENO" 5; }
9125    else
9126      ac_cv_sizeof_unsigned_long=0
9127    fi
9128 fi
9129
9130 fi
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9132 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9133
9134
9135
9136 cat >>confdefs.h <<_ACEOF
9137 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9138 _ACEOF
9139
9140
9141 # The cast to long int works around a bug in the HP C Compiler
9142 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9143 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9144 # This bug is HP SR number 8606223364.
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9146 $as_echo_n "checking size of unsigned __int128... " >&6; }
9147 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9148   $as_echo_n "(cached) " >&6
9149 else
9150   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
9151
9152 else
9153   if test "$ac_cv_type_unsigned___int128" = yes; then
9154      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9155 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9156 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9157 See \`config.log' for more details" "$LINENO" 5; }
9158    else
9159      ac_cv_sizeof_unsigned___int128=0
9160    fi
9161 fi
9162
9163 fi
9164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9165 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9166
9167
9168
9169 cat >>confdefs.h <<_ACEOF
9170 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9171 _ACEOF
9172
9173
9174
9175 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9176   TARGET_PTR="unsigned long"
9177 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9178   TARGET_PTR="unsigned long long"
9179 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9180   TARGET_PTR="unsigned __int128"
9181 else
9182   TARGET_PTR="unsigned long"
9183 fi
9184
9185
9186 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9187
9188
9189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9190 $as_echo_n "checking for library containing dlopen... " >&6; }
9191 if ${ac_cv_search_dlopen+:} false; then :
9192   $as_echo_n "(cached) " >&6
9193 else
9194   ac_func_search_save_LIBS=$LIBS
9195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9196 /* end confdefs.h.  */
9197
9198 /* Override any GCC internal prototype to avoid an error.
9199    Use char because int might match the return type of a GCC
9200    builtin and then its argument prototype would still apply.  */
9201 #ifdef __cplusplus
9202 extern "C"
9203 #endif
9204 char dlopen ();
9205 int
9206 main ()
9207 {
9208 return dlopen ();
9209   ;
9210   return 0;
9211 }
9212 _ACEOF
9213 for ac_lib in '' dl; do
9214   if test -z "$ac_lib"; then
9215     ac_res="none required"
9216   else
9217     ac_res=-l$ac_lib
9218     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9219   fi
9220   if ac_fn_c_try_link "$LINENO"; then :
9221   ac_cv_search_dlopen=$ac_res
9222 fi
9223 rm -f core conftest.err conftest.$ac_objext \
9224     conftest$ac_exeext
9225   if ${ac_cv_search_dlopen+:} false; then :
9226   break
9227 fi
9228 done
9229 if ${ac_cv_search_dlopen+:} false; then :
9230
9231 else
9232   ac_cv_search_dlopen=no
9233 fi
9234 rm conftest.$ac_ext
9235 LIBS=$ac_func_search_save_LIBS
9236 fi
9237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9238 $as_echo "$ac_cv_search_dlopen" >&6; }
9239 ac_res=$ac_cv_search_dlopen
9240 if test "$ac_res" != no; then :
9241   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9242
9243 fi
9244
9245
9246
9247
9248 # Check whether --with-jit-reader-dir was given.
9249 if test "${with_jit_reader_dir+set}" = set; then :
9250   withval=$with_jit_reader_dir;
9251     JIT_READER_DIR=$withval
9252 else
9253   JIT_READER_DIR=${libdir}/gdb
9254 fi
9255
9256
9257   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9258   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9259   ac_define_dir=`eval echo $JIT_READER_DIR`
9260   ac_define_dir=`eval echo $ac_define_dir`
9261
9262 cat >>confdefs.h <<_ACEOF
9263 #define JIT_READER_DIR "$ac_define_dir"
9264 _ACEOF
9265
9266
9267
9268
9269   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9270      if test "x$prefix" = xNONE; then
9271         test_prefix=/usr/local
9272      else
9273         test_prefix=$prefix
9274      fi
9275   else
9276      test_prefix=$exec_prefix
9277   fi
9278   value=0
9279   case ${ac_define_dir} in
9280      "${test_prefix}"|"${test_prefix}/"*|\
9281         '${exec_prefix}'|'${exec_prefix}/'*)
9282      value=1
9283      ;;
9284   esac
9285
9286 cat >>confdefs.h <<_ACEOF
9287 #define JIT_READER_DIR_RELOCATABLE $value
9288 _ACEOF
9289
9290
9291
9292
9293
9294 # Check whether --with-expat was given.
9295 if test "${with_expat+set}" = set; then :
9296   withval=$with_expat;
9297 else
9298   with_expat=auto
9299 fi
9300
9301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9302 $as_echo_n "checking whether to use expat... " >&6; }
9303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9304 $as_echo "$with_expat" >&6; }
9305
9306 if test "${with_expat}" = no; then
9307   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9308 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9309   HAVE_LIBEXPAT=no
9310 else
9311
9312
9313
9314
9315
9316
9317
9318
9319     use_additional=yes
9320
9321   acl_save_prefix="$prefix"
9322   prefix="$acl_final_prefix"
9323   acl_save_exec_prefix="$exec_prefix"
9324   exec_prefix="$acl_final_exec_prefix"
9325
9326     eval additional_includedir=\"$includedir\"
9327     eval additional_libdir=\"$libdir\"
9328
9329   exec_prefix="$acl_save_exec_prefix"
9330   prefix="$acl_save_prefix"
9331
9332
9333 # Check whether --with-libexpat-prefix was given.
9334 if test "${with_libexpat_prefix+set}" = set; then :
9335   withval=$with_libexpat_prefix;
9336     if test "X$withval" = "Xno"; then
9337       use_additional=no
9338     else
9339       if test "X$withval" = "X"; then
9340
9341   acl_save_prefix="$prefix"
9342   prefix="$acl_final_prefix"
9343   acl_save_exec_prefix="$exec_prefix"
9344   exec_prefix="$acl_final_exec_prefix"
9345
9346           eval additional_includedir=\"$includedir\"
9347           eval additional_libdir=\"$libdir\"
9348
9349   exec_prefix="$acl_save_exec_prefix"
9350   prefix="$acl_save_prefix"
9351
9352       else
9353         additional_includedir="$withval/include"
9354         additional_libdir="$withval/lib"
9355       fi
9356     fi
9357
9358 fi
9359
9360       LIBEXPAT=
9361   LTLIBEXPAT=
9362   INCEXPAT=
9363   rpathdirs=
9364   ltrpathdirs=
9365   names_already_handled=
9366   names_next_round='expat '
9367   while test -n "$names_next_round"; do
9368     names_this_round="$names_next_round"
9369     names_next_round=
9370     for name in $names_this_round; do
9371       already_handled=
9372       for n in $names_already_handled; do
9373         if test "$n" = "$name"; then
9374           already_handled=yes
9375           break
9376         fi
9377       done
9378       if test -z "$already_handled"; then
9379         names_already_handled="$names_already_handled $name"
9380                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9381         eval value=\"\$HAVE_LIB$uppername\"
9382         if test -n "$value"; then
9383           if test "$value" = yes; then
9384             eval value=\"\$LIB$uppername\"
9385             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9386             eval value=\"\$LTLIB$uppername\"
9387             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9388           else
9389                                     :
9390           fi
9391         else
9392                               found_dir=
9393           found_la=
9394           found_so=
9395           found_a=
9396           if test $use_additional = yes; then
9397             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9398               found_dir="$additional_libdir"
9399               found_so="$additional_libdir/lib$name.$shlibext"
9400               if test -f "$additional_libdir/lib$name.la"; then
9401                 found_la="$additional_libdir/lib$name.la"
9402               fi
9403             else
9404               if test -f "$additional_libdir/lib$name.$libext"; then
9405                 found_dir="$additional_libdir"
9406                 found_a="$additional_libdir/lib$name.$libext"
9407                 if test -f "$additional_libdir/lib$name.la"; then
9408                   found_la="$additional_libdir/lib$name.la"
9409                 fi
9410               fi
9411             fi
9412           fi
9413           if test "X$found_dir" = "X"; then
9414             for x in $LDFLAGS $LTLIBEXPAT; do
9415
9416   acl_save_prefix="$prefix"
9417   prefix="$acl_final_prefix"
9418   acl_save_exec_prefix="$exec_prefix"
9419   exec_prefix="$acl_final_exec_prefix"
9420   eval x=\"$x\"
9421   exec_prefix="$acl_save_exec_prefix"
9422   prefix="$acl_save_prefix"
9423
9424               case "$x" in
9425                 -L*)
9426                   dir=`echo "X$x" | sed -e 's/^X-L//'`
9427                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9428                     found_dir="$dir"
9429                     found_so="$dir/lib$name.$shlibext"
9430                     if test -f "$dir/lib$name.la"; then
9431                       found_la="$dir/lib$name.la"
9432                     fi
9433                   else
9434                     if test -f "$dir/lib$name.$libext"; then
9435                       found_dir="$dir"
9436                       found_a="$dir/lib$name.$libext"
9437                       if test -f "$dir/lib$name.la"; then
9438                         found_la="$dir/lib$name.la"
9439                       fi
9440                     fi
9441                   fi
9442                   ;;
9443               esac
9444               if test "X$found_dir" != "X"; then
9445                 break
9446               fi
9447             done
9448           fi
9449           if test "X$found_dir" != "X"; then
9450                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9451             if test "X$found_so" != "X"; then
9452                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9453                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9454               else
9455                                                                                 haveit=
9456                 for x in $ltrpathdirs; do
9457                   if test "X$x" = "X$found_dir"; then
9458                     haveit=yes
9459                     break
9460                   fi
9461                 done
9462                 if test -z "$haveit"; then
9463                   ltrpathdirs="$ltrpathdirs $found_dir"
9464                 fi
9465                                 if test "$hardcode_direct" = yes; then
9466                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9467                 else
9468                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9469                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9470                                                             haveit=
9471                     for x in $rpathdirs; do
9472                       if test "X$x" = "X$found_dir"; then
9473                         haveit=yes
9474                         break
9475                       fi
9476                     done
9477                     if test -z "$haveit"; then
9478                       rpathdirs="$rpathdirs $found_dir"
9479                     fi
9480                   else
9481                                                                                 haveit=
9482                     for x in $LDFLAGS $LIBEXPAT; do
9483
9484   acl_save_prefix="$prefix"
9485   prefix="$acl_final_prefix"
9486   acl_save_exec_prefix="$exec_prefix"
9487   exec_prefix="$acl_final_exec_prefix"
9488   eval x=\"$x\"
9489   exec_prefix="$acl_save_exec_prefix"
9490   prefix="$acl_save_prefix"
9491
9492                       if test "X$x" = "X-L$found_dir"; then
9493                         haveit=yes
9494                         break
9495                       fi
9496                     done
9497                     if test -z "$haveit"; then
9498                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9499                     fi
9500                     if test "$hardcode_minus_L" != no; then
9501                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9502                     else
9503                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9504                     fi
9505                   fi
9506                 fi
9507               fi
9508             else
9509               if test "X$found_a" != "X"; then
9510                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9511               else
9512                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9513               fi
9514             fi
9515                         additional_includedir=
9516             case "$found_dir" in
9517               */lib | */lib/)
9518                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9519                 additional_includedir="$basedir/include"
9520                 ;;
9521             esac
9522             if test "X$additional_includedir" != "X"; then
9523                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
9524                 haveit=
9525                 if test "X$additional_includedir" = "X/usr/local/include"; then
9526                   if test -n "$GCC"; then
9527                     case $host_os in
9528                       linux*) haveit=yes;;
9529                     esac
9530                   fi
9531                 fi
9532                 if test -z "$haveit"; then
9533                   for x in $CPPFLAGS $INCEXPAT; do
9534
9535   acl_save_prefix="$prefix"
9536   prefix="$acl_final_prefix"
9537   acl_save_exec_prefix="$exec_prefix"
9538   exec_prefix="$acl_final_exec_prefix"
9539   eval x=\"$x\"
9540   exec_prefix="$acl_save_exec_prefix"
9541   prefix="$acl_save_prefix"
9542
9543                     if test "X$x" = "X-I$additional_includedir"; then
9544                       haveit=yes
9545                       break
9546                     fi
9547                   done
9548                   if test -z "$haveit"; then
9549                     if test -d "$additional_includedir"; then
9550                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9551                     fi
9552                   fi
9553                 fi
9554               fi
9555             fi
9556                         if test -n "$found_la"; then
9557                                                         save_libdir="$libdir"
9558               case "$found_la" in
9559                 */* | *\\*) . "$found_la" ;;
9560                 *) . "./$found_la" ;;
9561               esac
9562               libdir="$save_libdir"
9563                             for dep in $dependency_libs; do
9564                 case "$dep" in
9565                   -L*)
9566                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9567                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
9568                       haveit=
9569                       if test "X$additional_libdir" = "X/usr/local/lib"; then
9570                         if test -n "$GCC"; then
9571                           case $host_os in
9572                             linux*) haveit=yes;;
9573                           esac
9574                         fi
9575                       fi
9576                       if test -z "$haveit"; then
9577                         haveit=
9578                         for x in $LDFLAGS $LIBEXPAT; do
9579
9580   acl_save_prefix="$prefix"
9581   prefix="$acl_final_prefix"
9582   acl_save_exec_prefix="$exec_prefix"
9583   exec_prefix="$acl_final_exec_prefix"
9584   eval x=\"$x\"
9585   exec_prefix="$acl_save_exec_prefix"
9586   prefix="$acl_save_prefix"
9587
9588                           if test "X$x" = "X-L$additional_libdir"; then
9589                             haveit=yes
9590                             break
9591                           fi
9592                         done
9593                         if test -z "$haveit"; then
9594                           if test -d "$additional_libdir"; then
9595                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9596                           fi
9597                         fi
9598                         haveit=
9599                         for x in $LDFLAGS $LTLIBEXPAT; do
9600
9601   acl_save_prefix="$prefix"
9602   prefix="$acl_final_prefix"
9603   acl_save_exec_prefix="$exec_prefix"
9604   exec_prefix="$acl_final_exec_prefix"
9605   eval x=\"$x\"
9606   exec_prefix="$acl_save_exec_prefix"
9607   prefix="$acl_save_prefix"
9608
9609                           if test "X$x" = "X-L$additional_libdir"; then
9610                             haveit=yes
9611                             break
9612                           fi
9613                         done
9614                         if test -z "$haveit"; then
9615                           if test -d "$additional_libdir"; then
9616                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9617                           fi
9618                         fi
9619                       fi
9620                     fi
9621                     ;;
9622                   -R*)
9623                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
9624                     if test "$enable_rpath" != no; then
9625                                                                   haveit=
9626                       for x in $rpathdirs; do
9627                         if test "X$x" = "X$dir"; then
9628                           haveit=yes
9629                           break
9630                         fi
9631                       done
9632                       if test -z "$haveit"; then
9633                         rpathdirs="$rpathdirs $dir"
9634                       fi
9635                                                                   haveit=
9636                       for x in $ltrpathdirs; do
9637                         if test "X$x" = "X$dir"; then
9638                           haveit=yes
9639                           break
9640                         fi
9641                       done
9642                       if test -z "$haveit"; then
9643                         ltrpathdirs="$ltrpathdirs $dir"
9644                       fi
9645                     fi
9646                     ;;
9647                   -l*)
9648                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9649                     ;;
9650                   *.la)
9651                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9652                     ;;
9653                   *)
9654                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9655                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9656                     ;;
9657                 esac
9658               done
9659             fi
9660           else
9661                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9662             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9663           fi
9664         fi
9665       fi
9666     done
9667   done
9668   if test "X$rpathdirs" != "X"; then
9669     if test -n "$hardcode_libdir_separator"; then
9670                         alldirs=
9671       for found_dir in $rpathdirs; do
9672         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9673       done
9674             acl_save_libdir="$libdir"
9675       libdir="$alldirs"
9676       eval flag=\"$hardcode_libdir_flag_spec\"
9677       libdir="$acl_save_libdir"
9678       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9679     else
9680             for found_dir in $rpathdirs; do
9681         acl_save_libdir="$libdir"
9682         libdir="$found_dir"
9683         eval flag=\"$hardcode_libdir_flag_spec\"
9684         libdir="$acl_save_libdir"
9685         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9686       done
9687     fi
9688   fi
9689   if test "X$ltrpathdirs" != "X"; then
9690             for found_dir in $ltrpathdirs; do
9691       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9692     done
9693   fi
9694
9695
9696         ac_save_CPPFLAGS="$CPPFLAGS"
9697
9698   for element in $INCEXPAT; do
9699     haveit=
9700     for x in $CPPFLAGS; do
9701
9702   acl_save_prefix="$prefix"
9703   prefix="$acl_final_prefix"
9704   acl_save_exec_prefix="$exec_prefix"
9705   exec_prefix="$acl_final_exec_prefix"
9706   eval x=\"$x\"
9707   exec_prefix="$acl_save_exec_prefix"
9708   prefix="$acl_save_prefix"
9709
9710       if test "X$x" = "X$element"; then
9711         haveit=yes
9712         break
9713       fi
9714     done
9715     if test -z "$haveit"; then
9716       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9717     fi
9718   done
9719
9720
9721   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9722 $as_echo_n "checking for libexpat... " >&6; }
9723 if ${ac_cv_libexpat+:} false; then :
9724   $as_echo_n "(cached) " >&6
9725 else
9726
9727     ac_save_LIBS="$LIBS"
9728     LIBS="$LIBS $LIBEXPAT"
9729     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9730 /* end confdefs.h.  */
9731 #include "expat.h"
9732 int
9733 main ()
9734 {
9735 XML_Parser p = XML_ParserCreate (0);
9736   ;
9737   return 0;
9738 }
9739 _ACEOF
9740 if ac_fn_c_try_link "$LINENO"; then :
9741   ac_cv_libexpat=yes
9742 else
9743   ac_cv_libexpat=no
9744 fi
9745 rm -f core conftest.err conftest.$ac_objext \
9746     conftest$ac_exeext conftest.$ac_ext
9747     LIBS="$ac_save_LIBS"
9748
9749 fi
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9751 $as_echo "$ac_cv_libexpat" >&6; }
9752   if test "$ac_cv_libexpat" = yes; then
9753     HAVE_LIBEXPAT=yes
9754
9755 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9756
9757     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9758 $as_echo_n "checking how to link with libexpat... " >&6; }
9759     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9760 $as_echo "$LIBEXPAT" >&6; }
9761   else
9762     HAVE_LIBEXPAT=no
9763             CPPFLAGS="$ac_save_CPPFLAGS"
9764     LIBEXPAT=
9765     LTLIBEXPAT=
9766   fi
9767
9768
9769
9770
9771
9772
9773   if test "$HAVE_LIBEXPAT" != yes; then
9774     if test "$with_expat" = yes; then
9775       as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9776     else
9777       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9778 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9779     fi
9780   else
9781     save_LIBS=$LIBS
9782     LIBS="$LIBS $LIBEXPAT"
9783     for ac_func in XML_StopParser
9784 do :
9785   ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9786 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
9787   cat >>confdefs.h <<_ACEOF
9788 #define HAVE_XML_STOPPARSER 1
9789 _ACEOF
9790
9791 fi
9792 done
9793
9794     LIBS=$save_LIBS
9795   fi
9796 fi
9797
9798
9799 # Check whether --with-mpfr was given.
9800 if test "${with_mpfr+set}" = set; then :
9801   withval=$with_mpfr;
9802 else
9803   with_mpfr=auto
9804 fi
9805
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9807 $as_echo_n "checking whether to use MPFR... " >&6; }
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9809 $as_echo "$with_mpfr" >&6; }
9810
9811 if test "${with_mpfr}" = no; then
9812   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9813 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9814   HAVE_LIBMPFR=no
9815 else
9816
9817
9818
9819
9820
9821
9822
9823
9824     use_additional=yes
9825
9826   acl_save_prefix="$prefix"
9827   prefix="$acl_final_prefix"
9828   acl_save_exec_prefix="$exec_prefix"
9829   exec_prefix="$acl_final_exec_prefix"
9830
9831     eval additional_includedir=\"$includedir\"
9832     eval additional_libdir=\"$libdir\"
9833
9834   exec_prefix="$acl_save_exec_prefix"
9835   prefix="$acl_save_prefix"
9836
9837
9838 # Check whether --with-libmpfr-prefix was given.
9839 if test "${with_libmpfr_prefix+set}" = set; then :
9840   withval=$with_libmpfr_prefix;
9841     if test "X$withval" = "Xno"; then
9842       use_additional=no
9843     else
9844       if test "X$withval" = "X"; then
9845
9846   acl_save_prefix="$prefix"
9847   prefix="$acl_final_prefix"
9848   acl_save_exec_prefix="$exec_prefix"
9849   exec_prefix="$acl_final_exec_prefix"
9850
9851           eval additional_includedir=\"$includedir\"
9852           eval additional_libdir=\"$libdir\"
9853
9854   exec_prefix="$acl_save_exec_prefix"
9855   prefix="$acl_save_prefix"
9856
9857       else
9858         additional_includedir="$withval/include"
9859         additional_libdir="$withval/lib"
9860       fi
9861     fi
9862
9863 fi
9864
9865       LIBMPFR=
9866   LTLIBMPFR=
9867   INCMPFR=
9868   rpathdirs=
9869   ltrpathdirs=
9870   names_already_handled=
9871   names_next_round='mpfr '
9872   while test -n "$names_next_round"; do
9873     names_this_round="$names_next_round"
9874     names_next_round=
9875     for name in $names_this_round; do
9876       already_handled=
9877       for n in $names_already_handled; do
9878         if test "$n" = "$name"; then
9879           already_handled=yes
9880           break
9881         fi
9882       done
9883       if test -z "$already_handled"; then
9884         names_already_handled="$names_already_handled $name"
9885                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9886         eval value=\"\$HAVE_LIB$uppername\"
9887         if test -n "$value"; then
9888           if test "$value" = yes; then
9889             eval value=\"\$LIB$uppername\"
9890             test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9891             eval value=\"\$LTLIB$uppername\"
9892             test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9893           else
9894                                     :
9895           fi
9896         else
9897                               found_dir=
9898           found_la=
9899           found_so=
9900           found_a=
9901           if test $use_additional = yes; then
9902             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9903               found_dir="$additional_libdir"
9904               found_so="$additional_libdir/lib$name.$shlibext"
9905               if test -f "$additional_libdir/lib$name.la"; then
9906                 found_la="$additional_libdir/lib$name.la"
9907               fi
9908             else
9909               if test -f "$additional_libdir/lib$name.$libext"; then
9910                 found_dir="$additional_libdir"
9911                 found_a="$additional_libdir/lib$name.$libext"
9912                 if test -f "$additional_libdir/lib$name.la"; then
9913                   found_la="$additional_libdir/lib$name.la"
9914                 fi
9915               fi
9916             fi
9917           fi
9918           if test "X$found_dir" = "X"; then
9919             for x in $LDFLAGS $LTLIBMPFR; do
9920
9921   acl_save_prefix="$prefix"
9922   prefix="$acl_final_prefix"
9923   acl_save_exec_prefix="$exec_prefix"
9924   exec_prefix="$acl_final_exec_prefix"
9925   eval x=\"$x\"
9926   exec_prefix="$acl_save_exec_prefix"
9927   prefix="$acl_save_prefix"
9928
9929               case "$x" in
9930                 -L*)
9931                   dir=`echo "X$x" | sed -e 's/^X-L//'`
9932                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9933                     found_dir="$dir"
9934                     found_so="$dir/lib$name.$shlibext"
9935                     if test -f "$dir/lib$name.la"; then
9936                       found_la="$dir/lib$name.la"
9937                     fi
9938                   else
9939                     if test -f "$dir/lib$name.$libext"; then
9940                       found_dir="$dir"
9941                       found_a="$dir/lib$name.$libext"
9942                       if test -f "$dir/lib$name.la"; then
9943                         found_la="$dir/lib$name.la"
9944                       fi
9945                     fi
9946                   fi
9947                   ;;
9948               esac
9949               if test "X$found_dir" != "X"; then
9950                 break
9951               fi
9952             done
9953           fi
9954           if test "X$found_dir" != "X"; then
9955                         LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9956             if test "X$found_so" != "X"; then
9957                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9958                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9959               else
9960                                                                                 haveit=
9961                 for x in $ltrpathdirs; do
9962                   if test "X$x" = "X$found_dir"; then
9963                     haveit=yes
9964                     break
9965                   fi
9966                 done
9967                 if test -z "$haveit"; then
9968                   ltrpathdirs="$ltrpathdirs $found_dir"
9969                 fi
9970                                 if test "$hardcode_direct" = yes; then
9971                                                       LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9972                 else
9973                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9974                                                             LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9975                                                             haveit=
9976                     for x in $rpathdirs; do
9977                       if test "X$x" = "X$found_dir"; then
9978                         haveit=yes
9979                         break
9980                       fi
9981                     done
9982                     if test -z "$haveit"; then
9983                       rpathdirs="$rpathdirs $found_dir"
9984                     fi
9985                   else
9986                                                                                 haveit=
9987                     for x in $LDFLAGS $LIBMPFR; do
9988
9989   acl_save_prefix="$prefix"
9990   prefix="$acl_final_prefix"
9991   acl_save_exec_prefix="$exec_prefix"
9992   exec_prefix="$acl_final_exec_prefix"
9993   eval x=\"$x\"
9994   exec_prefix="$acl_save_exec_prefix"
9995   prefix="$acl_save_prefix"
9996
9997                       if test "X$x" = "X-L$found_dir"; then
9998                         haveit=yes
9999                         break
10000                       fi
10001                     done
10002                     if test -z "$haveit"; then
10003                       LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10004                     fi
10005                     if test "$hardcode_minus_L" != no; then
10006                                                                                         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10007                     else
10008                                                                                                                                                                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10009                     fi
10010                   fi
10011                 fi
10012               fi
10013             else
10014               if test "X$found_a" != "X"; then
10015                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10016               else
10017                                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10018               fi
10019             fi
10020                         additional_includedir=
10021             case "$found_dir" in
10022               */lib | */lib/)
10023                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10024                 additional_includedir="$basedir/include"
10025                 ;;
10026             esac
10027             if test "X$additional_includedir" != "X"; then
10028                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
10029                 haveit=
10030                 if test "X$additional_includedir" = "X/usr/local/include"; then
10031                   if test -n "$GCC"; then
10032                     case $host_os in
10033                       linux*) haveit=yes;;
10034                     esac
10035                   fi
10036                 fi
10037                 if test -z "$haveit"; then
10038                   for x in $CPPFLAGS $INCMPFR; do
10039
10040   acl_save_prefix="$prefix"
10041   prefix="$acl_final_prefix"
10042   acl_save_exec_prefix="$exec_prefix"
10043   exec_prefix="$acl_final_exec_prefix"
10044   eval x=\"$x\"
10045   exec_prefix="$acl_save_exec_prefix"
10046   prefix="$acl_save_prefix"
10047
10048                     if test "X$x" = "X-I$additional_includedir"; then
10049                       haveit=yes
10050                       break
10051                     fi
10052                   done
10053                   if test -z "$haveit"; then
10054                     if test -d "$additional_includedir"; then
10055                                             INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10056                     fi
10057                   fi
10058                 fi
10059               fi
10060             fi
10061                         if test -n "$found_la"; then
10062                                                         save_libdir="$libdir"
10063               case "$found_la" in
10064                 */* | *\\*) . "$found_la" ;;
10065                 *) . "./$found_la" ;;
10066               esac
10067               libdir="$save_libdir"
10068                             for dep in $dependency_libs; do
10069                 case "$dep" in
10070                   -L*)
10071                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10072                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
10073                       haveit=
10074                       if test "X$additional_libdir" = "X/usr/local/lib"; then
10075                         if test -n "$GCC"; then
10076                           case $host_os in
10077                             linux*) haveit=yes;;
10078                           esac
10079                         fi
10080                       fi
10081                       if test -z "$haveit"; then
10082                         haveit=
10083                         for x in $LDFLAGS $LIBMPFR; do
10084
10085   acl_save_prefix="$prefix"
10086   prefix="$acl_final_prefix"
10087   acl_save_exec_prefix="$exec_prefix"
10088   exec_prefix="$acl_final_exec_prefix"
10089   eval x=\"$x\"
10090   exec_prefix="$acl_save_exec_prefix"
10091   prefix="$acl_save_prefix"
10092
10093                           if test "X$x" = "X-L$additional_libdir"; then
10094                             haveit=yes
10095                             break
10096                           fi
10097                         done
10098                         if test -z "$haveit"; then
10099                           if test -d "$additional_libdir"; then
10100                                                         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10101                           fi
10102                         fi
10103                         haveit=
10104                         for x in $LDFLAGS $LTLIBMPFR; do
10105
10106   acl_save_prefix="$prefix"
10107   prefix="$acl_final_prefix"
10108   acl_save_exec_prefix="$exec_prefix"
10109   exec_prefix="$acl_final_exec_prefix"
10110   eval x=\"$x\"
10111   exec_prefix="$acl_save_exec_prefix"
10112   prefix="$acl_save_prefix"
10113
10114                           if test "X$x" = "X-L$additional_libdir"; then
10115                             haveit=yes
10116                             break
10117                           fi
10118                         done
10119                         if test -z "$haveit"; then
10120                           if test -d "$additional_libdir"; then
10121                                                         LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10122                           fi
10123                         fi
10124                       fi
10125                     fi
10126                     ;;
10127                   -R*)
10128                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
10129                     if test "$enable_rpath" != no; then
10130                                                                   haveit=
10131                       for x in $rpathdirs; do
10132                         if test "X$x" = "X$dir"; then
10133                           haveit=yes
10134                           break
10135                         fi
10136                       done
10137                       if test -z "$haveit"; then
10138                         rpathdirs="$rpathdirs $dir"
10139                       fi
10140                                                                   haveit=
10141                       for x in $ltrpathdirs; do
10142                         if test "X$x" = "X$dir"; then
10143                           haveit=yes
10144                           break
10145                         fi
10146                       done
10147                       if test -z "$haveit"; then
10148                         ltrpathdirs="$ltrpathdirs $dir"
10149                       fi
10150                     fi
10151                     ;;
10152                   -l*)
10153                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10154                     ;;
10155                   *.la)
10156                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10157                     ;;
10158                   *)
10159                                         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10160                     LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10161                     ;;
10162                 esac
10163               done
10164             fi
10165           else
10166                                                             LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10167             LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10168           fi
10169         fi
10170       fi
10171     done
10172   done
10173   if test "X$rpathdirs" != "X"; then
10174     if test -n "$hardcode_libdir_separator"; then
10175                         alldirs=
10176       for found_dir in $rpathdirs; do
10177         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10178       done
10179             acl_save_libdir="$libdir"
10180       libdir="$alldirs"
10181       eval flag=\"$hardcode_libdir_flag_spec\"
10182       libdir="$acl_save_libdir"
10183       LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10184     else
10185             for found_dir in $rpathdirs; do
10186         acl_save_libdir="$libdir"
10187         libdir="$found_dir"
10188         eval flag=\"$hardcode_libdir_flag_spec\"
10189         libdir="$acl_save_libdir"
10190         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10191       done
10192     fi
10193   fi
10194   if test "X$ltrpathdirs" != "X"; then
10195             for found_dir in $ltrpathdirs; do
10196       LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10197     done
10198   fi
10199
10200
10201         ac_save_CPPFLAGS="$CPPFLAGS"
10202
10203   for element in $INCMPFR; do
10204     haveit=
10205     for x in $CPPFLAGS; do
10206
10207   acl_save_prefix="$prefix"
10208   prefix="$acl_final_prefix"
10209   acl_save_exec_prefix="$exec_prefix"
10210   exec_prefix="$acl_final_exec_prefix"
10211   eval x=\"$x\"
10212   exec_prefix="$acl_save_exec_prefix"
10213   prefix="$acl_save_prefix"
10214
10215       if test "X$x" = "X$element"; then
10216         haveit=yes
10217         break
10218       fi
10219     done
10220     if test -z "$haveit"; then
10221       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10222     fi
10223   done
10224
10225
10226   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10227 $as_echo_n "checking for libmpfr... " >&6; }
10228 if ${ac_cv_libmpfr+:} false; then :
10229   $as_echo_n "(cached) " >&6
10230 else
10231
10232     ac_save_LIBS="$LIBS"
10233     LIBS="$LIBS $LIBMPFR"
10234     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10235 /* end confdefs.h.  */
10236 #include <mpfr.h>
10237 int
10238 main ()
10239 {
10240 mpfr_exp_t exp; mpfr_t x;
10241                          mpfr_frexp (&exp, x, x, MPFR_RNDN);
10242   ;
10243   return 0;
10244 }
10245 _ACEOF
10246 if ac_fn_c_try_link "$LINENO"; then :
10247   ac_cv_libmpfr=yes
10248 else
10249   ac_cv_libmpfr=no
10250 fi
10251 rm -f core conftest.err conftest.$ac_objext \
10252     conftest$ac_exeext conftest.$ac_ext
10253     LIBS="$ac_save_LIBS"
10254
10255 fi
10256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10257 $as_echo "$ac_cv_libmpfr" >&6; }
10258   if test "$ac_cv_libmpfr" = yes; then
10259     HAVE_LIBMPFR=yes
10260
10261 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10262
10263     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10264 $as_echo_n "checking how to link with libmpfr... " >&6; }
10265     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10266 $as_echo "$LIBMPFR" >&6; }
10267   else
10268     HAVE_LIBMPFR=no
10269             CPPFLAGS="$ac_save_CPPFLAGS"
10270     LIBMPFR=
10271     LTLIBMPFR=
10272   fi
10273
10274
10275
10276
10277
10278
10279   if test "$HAVE_LIBMPFR" != yes; then
10280     if test "$with_mpfr" = yes; then
10281       as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10282     else
10283       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10284 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10285     fi
10286   fi
10287 fi
10288
10289 # --------------------- #
10290 # Check for libpython.  #
10291 # --------------------- #
10292
10293
10294
10295
10296
10297
10298 # Check whether --with-python was given.
10299 if test "${with_python+set}" = set; then :
10300   withval=$with_python;
10301 else
10302   with_python=auto
10303 fi
10304
10305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10306 $as_echo_n "checking whether to use python... " >&6; }
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10308 $as_echo "$with_python" >&6; }
10309
10310 if test "${with_python}" = no; then
10311   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10312 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10313   have_libpython=no
10314 else
10315   case "${with_python}" in
10316   [\\/]* | ?:[\\/]*)
10317     if test -d ${with_python}; then
10318       # Assume the python binary is ${with_python}/bin/python.
10319       python_prog="${with_python}/bin/python"
10320       python_prefix=
10321       # If python does not exit ${with_python}/bin, then try in
10322       # ${with_python}.  On Windows/MinGW, this is where the Python
10323       # executable is.
10324       if test ! -x "${python_prog}"; then
10325         python_prog="${with_python}/python"
10326         python_prefix=
10327       fi
10328       if test ! -x "${python_prog}"; then
10329         # Fall back to gdb 7.0/7.1 behaviour.
10330         python_prog=missing
10331         python_prefix=${with_python}
10332       fi
10333     elif test -x "${with_python}"; then
10334       # While we can't run python compiled for $host (unless host == build),
10335       # the user could write a script that provides the needed information,
10336       # so we support that.
10337       python_prog=${with_python}
10338       python_prefix=
10339     else
10340       as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10341     fi
10342     ;;
10343   */*)
10344     # Disallow --with-python=foo/bar.
10345     as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10346     ;;
10347   *)
10348     # The user has either specified auto, yes, or the name of the python
10349     # program assumed to be in $PATH.
10350     python_prefix=
10351     case "${with_python}" in
10352     yes | auto)
10353       if test ${build} = ${host}; then
10354         # Extract the first word of "python", so it can be a program name with args.
10355 set dummy python; ac_word=$2
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10357 $as_echo_n "checking for $ac_word... " >&6; }
10358 if ${ac_cv_path_python_prog_path+:} false; then :
10359   $as_echo_n "(cached) " >&6
10360 else
10361   case $python_prog_path in
10362   [\\/]* | ?:[\\/]*)
10363   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10364   ;;
10365   *)
10366   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10367 for as_dir in $PATH
10368 do
10369   IFS=$as_save_IFS
10370   test -z "$as_dir" && as_dir=.
10371     for ac_exec_ext in '' $ac_executable_extensions; do
10372   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10373     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10374     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10375     break 2
10376   fi
10377 done
10378   done
10379 IFS=$as_save_IFS
10380
10381   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10382   ;;
10383 esac
10384 fi
10385 python_prog_path=$ac_cv_path_python_prog_path
10386 if test -n "$python_prog_path"; then
10387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10388 $as_echo "$python_prog_path" >&6; }
10389 else
10390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391 $as_echo "no" >&6; }
10392 fi
10393
10394
10395         if test "${python_prog_path}" = missing; then
10396           python_prog=missing
10397         else
10398           python_prog=${python_prog_path}
10399         fi
10400       else
10401         # Not much we can do except assume the cross-compiler will find the
10402         # right files.
10403         python_prog=missing
10404       fi
10405       ;;
10406     *)
10407       # While we can't run python compiled for $host (unless host == build),
10408       # the user could write a script that provides the needed information,
10409       # so we support that.
10410       python_prog="${with_python}"
10411       # Extract the first word of "${python_prog}", so it can be a program name with args.
10412 set dummy ${python_prog}; ac_word=$2
10413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10414 $as_echo_n "checking for $ac_word... " >&6; }
10415 if ${ac_cv_path_python_prog_path+:} false; then :
10416   $as_echo_n "(cached) " >&6
10417 else
10418   case $python_prog_path in
10419   [\\/]* | ?:[\\/]*)
10420   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10421   ;;
10422   *)
10423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10424 for as_dir in $PATH
10425 do
10426   IFS=$as_save_IFS
10427   test -z "$as_dir" && as_dir=.
10428     for ac_exec_ext in '' $ac_executable_extensions; do
10429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10430     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10432     break 2
10433   fi
10434 done
10435   done
10436 IFS=$as_save_IFS
10437
10438   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10439   ;;
10440 esac
10441 fi
10442 python_prog_path=$ac_cv_path_python_prog_path
10443 if test -n "$python_prog_path"; then
10444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10445 $as_echo "$python_prog_path" >&6; }
10446 else
10447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448 $as_echo "no" >&6; }
10449 fi
10450
10451
10452       if test "${python_prog_path}" = missing; then
10453         as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10454       fi
10455       ;;
10456     esac
10457   esac
10458
10459   if test "${python_prog}" != missing; then
10460     # We have a python program to use, but it may be too old.
10461     # Don't flag an error for --with-python=auto (the default).
10462     have_python_config=yes
10463     python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10464     if test $? != 0; then
10465       have_python_config=failed
10466       if test "${with_python}" != auto; then
10467         as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10468       fi
10469     fi
10470     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10471     if test $? != 0; then
10472       have_python_config=failed
10473       if test "${with_python}" != auto; then
10474         as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10475       fi
10476     fi
10477     python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10478     if test $? != 0; then
10479       have_python_config=failed
10480       if test "${with_python}" != auto; then
10481         as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10482       fi
10483     fi
10484   else
10485     # We do not have a python executable we can use to determine where
10486     # to find the Python headers and libs.  We cannot guess the include
10487     # path from the python_prefix either, because that include path
10488     # depends on the Python version.  So, there is nothing much we can
10489     # do except assume that the compiler will be able to find those files.
10490     python_includes=
10491     python_libs=
10492     have_python_config=no
10493   fi
10494
10495   # If we have python-config, only try the configuration it provides.
10496   # Otherwise fallback on the old way of trying different versions of
10497   # python in turn.
10498
10499   have_libpython=no
10500   if test "${have_python_config}" = yes; then
10501     # Determine the Python version by extracting "-lpython<version>"
10502     # part of the python_libs. <version> is usually X.Y with X and Y
10503     # being decimal numbers, but can also be XY (seen on Windows).
10504     #
10505     # The extraction is performed using sed with a regular expression.
10506     # Initially, the regexp used was using the '?' quantifier to make
10507     # the dot in the version number optional.  Unfortunately, this
10508     # does not work with non-GNU versions of sed because, because of
10509     # what looks like a limitation (the '?' quantifier does not work
10510     # with back-references).  We work around this limitation by using
10511     # the '*' quantifier instead.  It means that, in theory, we might
10512     # match unexpected version strings such as "-lpython2..7", but
10513     # this seems unlikely in practice.  And even if that happens,
10514     # an error will be triggered later on, when checking that version
10515     # number.
10516     python_version=`echo " ${python_libs} " \
10517                          | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
10518     case "${python_version}" in
10519     python*)
10520
10521   version=${python_version}
10522
10523   new_CPPFLAGS=${python_includes}
10524   new_LIBS=${python_libs}
10525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10526 $as_echo_n "checking for ${version}... " >&6; }
10527   save_CPPFLAGS=$CPPFLAGS
10528   save_LIBS=$LIBS
10529   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10530   LIBS="$new_LIBS $LIBS"
10531   found_usable_python=no
10532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10533 /* end confdefs.h.  */
10534 #include "Python.h"
10535 int
10536 main ()
10537 {
10538 Py_Initialize ();
10539   ;
10540   return 0;
10541 }
10542 _ACEOF
10543 if ac_fn_c_try_link "$LINENO"; then :
10544   have_libpython=${version}
10545                   found_usable_python=yes
10546                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10547                   PYTHON_LIBS=$new_LIBS
10548 fi
10549 rm -f core conftest.err conftest.$ac_objext \
10550     conftest$ac_exeext conftest.$ac_ext
10551   CPPFLAGS=$save_CPPFLAGS
10552   LIBS=$save_LIBS
10553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10554 $as_echo "${found_usable_python}" >&6; }
10555
10556       ;;
10557     *)
10558       as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
10559       ;;
10560     esac
10561   elif test "${have_python_config}" != failed; then
10562     if test "${have_libpython}" = no; then
10563
10564   version=python2.7
10565
10566   new_CPPFLAGS=${python_includes}
10567   new_LIBS="-lpython2.7 ${python_libs}"
10568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10569 $as_echo_n "checking for ${version}... " >&6; }
10570   save_CPPFLAGS=$CPPFLAGS
10571   save_LIBS=$LIBS
10572   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10573   LIBS="$new_LIBS $LIBS"
10574   found_usable_python=no
10575   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10576 /* end confdefs.h.  */
10577 #include "Python.h"
10578 int
10579 main ()
10580 {
10581 Py_Initialize ();
10582   ;
10583   return 0;
10584 }
10585 _ACEOF
10586 if ac_fn_c_try_link "$LINENO"; then :
10587   have_libpython=${version}
10588                   found_usable_python=yes
10589                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10590                   PYTHON_LIBS=$new_LIBS
10591 fi
10592 rm -f core conftest.err conftest.$ac_objext \
10593     conftest$ac_exeext conftest.$ac_ext
10594   CPPFLAGS=$save_CPPFLAGS
10595   LIBS=$save_LIBS
10596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10597 $as_echo "${found_usable_python}" >&6; }
10598
10599     fi
10600     if test "${have_libpython}" = no; then
10601
10602   version=python2.6
10603
10604   new_CPPFLAGS=${python_includes}
10605   new_LIBS="-lpython2.6 ${python_libs}"
10606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10607 $as_echo_n "checking for ${version}... " >&6; }
10608   save_CPPFLAGS=$CPPFLAGS
10609   save_LIBS=$LIBS
10610   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10611   LIBS="$new_LIBS $LIBS"
10612   found_usable_python=no
10613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10614 /* end confdefs.h.  */
10615 #include "Python.h"
10616 int
10617 main ()
10618 {
10619 Py_Initialize ();
10620   ;
10621   return 0;
10622 }
10623 _ACEOF
10624 if ac_fn_c_try_link "$LINENO"; then :
10625   have_libpython=${version}
10626                   found_usable_python=yes
10627                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10628                   PYTHON_LIBS=$new_LIBS
10629 fi
10630 rm -f core conftest.err conftest.$ac_objext \
10631     conftest$ac_exeext conftest.$ac_ext
10632   CPPFLAGS=$save_CPPFLAGS
10633   LIBS=$save_LIBS
10634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10635 $as_echo "${found_usable_python}" >&6; }
10636
10637     fi
10638     if test ${have_libpython} = no; then
10639
10640   version=python2.5
10641
10642   new_CPPFLAGS=${python_includes}
10643   new_LIBS="-lpython2.5 ${python_libs}"
10644   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10645 $as_echo_n "checking for ${version}... " >&6; }
10646   save_CPPFLAGS=$CPPFLAGS
10647   save_LIBS=$LIBS
10648   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10649   LIBS="$new_LIBS $LIBS"
10650   found_usable_python=no
10651   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10652 /* end confdefs.h.  */
10653 #include "Python.h"
10654 int
10655 main ()
10656 {
10657 Py_Initialize ();
10658   ;
10659   return 0;
10660 }
10661 _ACEOF
10662 if ac_fn_c_try_link "$LINENO"; then :
10663   have_libpython=${version}
10664                   found_usable_python=yes
10665                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10666                   PYTHON_LIBS=$new_LIBS
10667 fi
10668 rm -f core conftest.err conftest.$ac_objext \
10669     conftest$ac_exeext conftest.$ac_ext
10670   CPPFLAGS=$save_CPPFLAGS
10671   LIBS=$save_LIBS
10672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10673 $as_echo "${found_usable_python}" >&6; }
10674
10675     fi
10676     if test ${have_libpython} = no; then
10677
10678   version=python2.4
10679
10680   new_CPPFLAGS=${python_includes}
10681   new_LIBS="-lpython2.4 ${python_libs}"
10682   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10683 $as_echo_n "checking for ${version}... " >&6; }
10684   save_CPPFLAGS=$CPPFLAGS
10685   save_LIBS=$LIBS
10686   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10687   LIBS="$new_LIBS $LIBS"
10688   found_usable_python=no
10689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10690 /* end confdefs.h.  */
10691 #include "Python.h"
10692 int
10693 main ()
10694 {
10695 Py_Initialize ();
10696   ;
10697   return 0;
10698 }
10699 _ACEOF
10700 if ac_fn_c_try_link "$LINENO"; then :
10701   have_libpython=${version}
10702                   found_usable_python=yes
10703                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10704                   PYTHON_LIBS=$new_LIBS
10705 fi
10706 rm -f core conftest.err conftest.$ac_objext \
10707     conftest$ac_exeext conftest.$ac_ext
10708   CPPFLAGS=$save_CPPFLAGS
10709   LIBS=$save_LIBS
10710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10711 $as_echo "${found_usable_python}" >&6; }
10712
10713     fi
10714   fi
10715   if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
10716
10717 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10718
10719   elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
10720
10721 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10722
10723   elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
10724
10725 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10726
10727   elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
10728
10729 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10730
10731   fi
10732
10733   if test "${have_libpython}" = no; then
10734     case "${with_python}" in
10735     yes)
10736       as_fn_error $? "python is missing or unusable" "$LINENO" 5
10737       ;;
10738     auto)
10739       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10740 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10741       ;;
10742     *)
10743       as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10744       ;;
10745     esac
10746   else
10747     if test -n "${python_prefix}"; then
10748
10749 cat >>confdefs.h <<_ACEOF
10750 #define WITH_PYTHON_PATH "${python_prefix}"
10751 _ACEOF
10752
10753
10754   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10755      if test "x$prefix" = xNONE; then
10756         test_prefix=/usr/local
10757      else
10758         test_prefix=$prefix
10759      fi
10760   else
10761      test_prefix=$exec_prefix
10762   fi
10763   value=0
10764   case ${python_prefix} in
10765      "${test_prefix}"|"${test_prefix}/"*|\
10766         '${exec_prefix}'|'${exec_prefix}/'*)
10767      value=1
10768      ;;
10769   esac
10770
10771 cat >>confdefs.h <<_ACEOF
10772 #define PYTHON_PATH_RELOCATABLE $value
10773 _ACEOF
10774
10775
10776     fi
10777   fi
10778 fi
10779
10780 if test "${have_libpython}" != no; then
10781
10782 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10783
10784   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10785   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10786   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10787   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10788   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10789
10790   # Flags needed to compile Python code (taken from python-config --cflags).
10791   # We cannot call python-config directly because it will output whatever was
10792   # used when compiling the Python interpreter itself, including flags which
10793   # would make the python-related objects be compiled differently from the
10794   # rest of GDB (e.g., -O2 and -fPIC).
10795   if test "${GCC}" = yes; then
10796     tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10797   fi
10798
10799   if test "x${tentative_python_cflags}" != x; then
10800     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10801 $as_echo_n "checking compiler flags for python code... " >&6; }
10802     for flag in ${tentative_python_cflags}; do
10803       # Check that the compiler accepts it
10804       saved_CFLAGS="$CFLAGS"
10805       CFLAGS="$CFLAGS $flag"
10806       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10807 /* end confdefs.h.  */
10808
10809 int
10810 main ()
10811 {
10812
10813   ;
10814   return 0;
10815 }
10816 _ACEOF
10817 if ac_fn_c_try_compile "$LINENO"; then :
10818   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10819 fi
10820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10821       CFLAGS="$saved_CFLAGS"
10822     done
10823     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10824 $as_echo "${PYTHON_CFLAGS}" >&6; }
10825   fi
10826
10827   # On x64 Windows, Python's include headers, and pyconfig.h in
10828   # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10829   # version of Windows.  Unfortunately, MS_WIN64 is only defined if
10830   # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
10831   # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10832   # The issue was reported to the Python community, but still isn't
10833   # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10834
10835   case "$gdb_host" in
10836     mingw64)
10837            if test "${GCC}" = yes; then
10838              CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10839            fi
10840            ;;
10841   esac
10842
10843   # Note that "python -m threading" cannot be used to check for
10844   # threading support due to a bug in Python 2.7.3
10845   # (http://bugs.python.org/issue15567).
10846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10847 $as_echo_n "checking whether python supports threads... " >&6; }
10848   saved_CPPFLAGS="${CPPFLAGS}"
10849   CPPFLAGS="${PYTHON_CPPFLAGS}"
10850   # Note that the test is reversed so that python_has_threads=yes on
10851   # unexpected failures.
10852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10853 /* end confdefs.h.  */
10854
10855 #include <Python.h>
10856 #ifdef WITH_THREAD
10857 # error
10858 #endif
10859
10860 _ACEOF
10861 if ac_fn_c_try_cpp "$LINENO"; then :
10862   python_has_threads=no
10863 else
10864   python_has_threads=yes
10865 fi
10866 rm -f conftest.err conftest.i conftest.$ac_ext
10867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10868 $as_echo "${python_has_threads}" >&6; }
10869   CPPFLAGS="${saved_CPPFLAGS}"
10870 else
10871   # Even if Python support is not compiled in, we need to have this file
10872   # included so that the "python" command, et.al., still exists.
10873   CONFIG_OBS="$CONFIG_OBS python/python.o"
10874   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10875 fi
10876
10877 # Work around Python http://bugs.python.org/issue10112.  See also
10878 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10879 # no effect.  Note that the only test after this that uses Python is
10880 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10881 # run without -export-dynamic too.
10882 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10883
10884
10885
10886
10887  if test "${have_libpython}" != no; then
10888   HAVE_PYTHON_TRUE=
10889   HAVE_PYTHON_FALSE='#'
10890 else
10891   HAVE_PYTHON_TRUE='#'
10892   HAVE_PYTHON_FALSE=
10893 fi
10894
10895
10896 # -------------------- #
10897 # Check for libguile.  #
10898 # -------------------- #
10899
10900
10901
10902
10903
10904
10905 # Check whether --with-guile was given.
10906 if test "${with_guile+set}" = set; then :
10907   withval=$with_guile;
10908 else
10909   with_guile=auto
10910 fi
10911
10912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10913 $as_echo_n "checking whether to use guile... " >&6; }
10914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10915 $as_echo "$with_guile" >&6; }
10916
10917 # Extract the first word of "pkg-config", so it can be a program name with args.
10918 set dummy pkg-config; ac_word=$2
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10920 $as_echo_n "checking for $ac_word... " >&6; }
10921 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
10922   $as_echo_n "(cached) " >&6
10923 else
10924   case $pkg_config_prog_path in
10925   [\\/]* | ?:[\\/]*)
10926   ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10927   ;;
10928   *)
10929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10930 for as_dir in $PATH
10931 do
10932   IFS=$as_save_IFS
10933   test -z "$as_dir" && as_dir=.
10934     for ac_exec_ext in '' $ac_executable_extensions; do
10935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10936     ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10938     break 2
10939   fi
10940 done
10941   done
10942 IFS=$as_save_IFS
10943
10944   test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10945   ;;
10946 esac
10947 fi
10948 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10949 if test -n "$pkg_config_prog_path"; then
10950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10951 $as_echo "$pkg_config_prog_path" >&6; }
10952 else
10953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954 $as_echo "no" >&6; }
10955 fi
10956
10957
10958
10959 try_guile_versions="guile-2.0"
10960 have_libguile=no
10961 case "${with_guile}" in
10962 no)
10963   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10964 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10965   ;;
10966 auto)
10967   if test "${pkg_config_prog_path}" = "missing"; then
10968     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10969 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10970   else
10971
10972   pkg_config=${pkg_config_prog_path}
10973   guile_version_list=${try_guile_versions}
10974   flag_errors=no
10975
10976   found_usable_guile=checking
10977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10978 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10979   for guile_version in ${guile_version_list}; do
10980     ${pkg_config} --exists ${guile_version} 2>/dev/null
10981     if test $? != 0; then
10982       continue
10983     fi
10984             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10985     if test $? != 0; then
10986       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10987     fi
10988     new_LIBS=`${pkg_config} --libs ${guile_version}`
10989     if test $? != 0; then
10990       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10991     fi
10992         found_usable_guile=${guile_version}
10993     break
10994   done
10995   if test "${found_usable_guile}" = "checking"; then
10996     if test "${flag_errors}" = "yes"; then
10997       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10998     else
10999       found_usable_guile=no
11000     fi
11001   fi
11002       if test "${found_usable_guile}" != no; then
11003     save_CPPFLAGS=$CPPFLAGS
11004     save_LIBS=$LIBS
11005     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11006     LIBS="$LIBS $new_LIBS"
11007     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11008 /* end confdefs.h.  */
11009 #include "libguile.h"
11010 int
11011 main ()
11012 {
11013 scm_init_guile ();
11014   ;
11015   return 0;
11016 }
11017 _ACEOF
11018 if ac_fn_c_try_link "$LINENO"; then :
11019   have_libguile=yes
11020                     GUILE_CPPFLAGS=$new_CPPFLAGS
11021                     GUILE_LIBS=$new_LIBS
11022 else
11023   found_usable_guile=no
11024 fi
11025 rm -f core conftest.err conftest.$ac_objext \
11026     conftest$ac_exeext conftest.$ac_ext
11027         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11028 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11029
11030 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11031
11032
11033 fi
11034
11035     CPPFLAGS=$save_CPPFLAGS
11036     LIBS=$save_LIBS
11037     if test "${found_usable_guile}" = no; then
11038       if test "${flag_errors}" = yes; then
11039         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11040 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11041 as_fn_error $? "linking guile version ${guile_version} test program failed
11042 See \`config.log' for more details" "$LINENO" 5; }
11043       fi
11044     fi
11045   fi
11046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11047 $as_echo "${found_usable_guile}" >&6; }
11048
11049   fi
11050   ;;
11051 yes)
11052   if test "${pkg_config_prog_path}" = "missing"; then
11053     as_fn_error $? "pkg-config not found" "$LINENO" 5
11054   fi
11055
11056   pkg_config=${pkg_config_prog_path}
11057   guile_version_list=${try_guile_versions}
11058   flag_errors=yes
11059
11060   found_usable_guile=checking
11061   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11062 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11063   for guile_version in ${guile_version_list}; do
11064     ${pkg_config} --exists ${guile_version} 2>/dev/null
11065     if test $? != 0; then
11066       continue
11067     fi
11068             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11069     if test $? != 0; then
11070       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11071     fi
11072     new_LIBS=`${pkg_config} --libs ${guile_version}`
11073     if test $? != 0; then
11074       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11075     fi
11076         found_usable_guile=${guile_version}
11077     break
11078   done
11079   if test "${found_usable_guile}" = "checking"; then
11080     if test "${flag_errors}" = "yes"; then
11081       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11082     else
11083       found_usable_guile=no
11084     fi
11085   fi
11086       if test "${found_usable_guile}" != no; then
11087     save_CPPFLAGS=$CPPFLAGS
11088     save_LIBS=$LIBS
11089     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11090     LIBS="$LIBS $new_LIBS"
11091     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11092 /* end confdefs.h.  */
11093 #include "libguile.h"
11094 int
11095 main ()
11096 {
11097 scm_init_guile ();
11098   ;
11099   return 0;
11100 }
11101 _ACEOF
11102 if ac_fn_c_try_link "$LINENO"; then :
11103   have_libguile=yes
11104                     GUILE_CPPFLAGS=$new_CPPFLAGS
11105                     GUILE_LIBS=$new_LIBS
11106 else
11107   found_usable_guile=no
11108 fi
11109 rm -f core conftest.err conftest.$ac_objext \
11110     conftest$ac_exeext conftest.$ac_ext
11111         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11112 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11113
11114 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11115
11116
11117 fi
11118
11119     CPPFLAGS=$save_CPPFLAGS
11120     LIBS=$save_LIBS
11121     if test "${found_usable_guile}" = no; then
11122       if test "${flag_errors}" = yes; then
11123         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11124 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11125 as_fn_error $? "linking guile version ${guile_version} test program failed
11126 See \`config.log' for more details" "$LINENO" 5; }
11127       fi
11128     fi
11129   fi
11130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11131 $as_echo "${found_usable_guile}" >&6; }
11132
11133   ;;
11134 [\\/]* | ?:[\\/]*)
11135   if test -x "${with_guile}"; then
11136
11137   pkg_config=${with_guile}
11138   guile_version_list=${try_guile_versions}
11139   flag_errors=yes
11140
11141   found_usable_guile=checking
11142   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11143 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11144   for guile_version in ${guile_version_list}; do
11145     ${pkg_config} --exists ${guile_version} 2>/dev/null
11146     if test $? != 0; then
11147       continue
11148     fi
11149             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11150     if test $? != 0; then
11151       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11152     fi
11153     new_LIBS=`${pkg_config} --libs ${guile_version}`
11154     if test $? != 0; then
11155       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11156     fi
11157         found_usable_guile=${guile_version}
11158     break
11159   done
11160   if test "${found_usable_guile}" = "checking"; then
11161     if test "${flag_errors}" = "yes"; then
11162       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11163     else
11164       found_usable_guile=no
11165     fi
11166   fi
11167       if test "${found_usable_guile}" != no; then
11168     save_CPPFLAGS=$CPPFLAGS
11169     save_LIBS=$LIBS
11170     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11171     LIBS="$LIBS $new_LIBS"
11172     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11173 /* end confdefs.h.  */
11174 #include "libguile.h"
11175 int
11176 main ()
11177 {
11178 scm_init_guile ();
11179   ;
11180   return 0;
11181 }
11182 _ACEOF
11183 if ac_fn_c_try_link "$LINENO"; then :
11184   have_libguile=yes
11185                     GUILE_CPPFLAGS=$new_CPPFLAGS
11186                     GUILE_LIBS=$new_LIBS
11187 else
11188   found_usable_guile=no
11189 fi
11190 rm -f core conftest.err conftest.$ac_objext \
11191     conftest$ac_exeext conftest.$ac_ext
11192         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11193 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11194
11195 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11196
11197
11198 fi
11199
11200     CPPFLAGS=$save_CPPFLAGS
11201     LIBS=$save_LIBS
11202     if test "${found_usable_guile}" = no; then
11203       if test "${flag_errors}" = yes; then
11204         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11205 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11206 as_fn_error $? "linking guile version ${guile_version} test program failed
11207 See \`config.log' for more details" "$LINENO" 5; }
11208       fi
11209     fi
11210   fi
11211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11212 $as_echo "${found_usable_guile}" >&6; }
11213
11214   else
11215     as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11216   fi
11217   ;;
11218 "" | */*)
11219   # Disallow --with=guile="" and --with-guile=foo/bar.
11220   as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11221   ;;
11222 *)
11223   # A space separate list of guile versions to try, in order.
11224   if test "${pkg_config_prog_path}" = "missing"; then
11225     as_fn_error $? "pkg-config not found" "$LINENO" 5
11226   fi
11227
11228   pkg_config=${pkg_config_prog_path}
11229   guile_version_list=${with_guile}
11230   flag_errors=yes
11231
11232   found_usable_guile=checking
11233   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11234 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11235   for guile_version in ${guile_version_list}; do
11236     ${pkg_config} --exists ${guile_version} 2>/dev/null
11237     if test $? != 0; then
11238       continue
11239     fi
11240             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11241     if test $? != 0; then
11242       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11243     fi
11244     new_LIBS=`${pkg_config} --libs ${guile_version}`
11245     if test $? != 0; then
11246       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11247     fi
11248         found_usable_guile=${guile_version}
11249     break
11250   done
11251   if test "${found_usable_guile}" = "checking"; then
11252     if test "${flag_errors}" = "yes"; then
11253       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11254     else
11255       found_usable_guile=no
11256     fi
11257   fi
11258       if test "${found_usable_guile}" != no; then
11259     save_CPPFLAGS=$CPPFLAGS
11260     save_LIBS=$LIBS
11261     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11262     LIBS="$LIBS $new_LIBS"
11263     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11264 /* end confdefs.h.  */
11265 #include "libguile.h"
11266 int
11267 main ()
11268 {
11269 scm_init_guile ();
11270   ;
11271   return 0;
11272 }
11273 _ACEOF
11274 if ac_fn_c_try_link "$LINENO"; then :
11275   have_libguile=yes
11276                     GUILE_CPPFLAGS=$new_CPPFLAGS
11277                     GUILE_LIBS=$new_LIBS
11278 else
11279   found_usable_guile=no
11280 fi
11281 rm -f core conftest.err conftest.$ac_objext \
11282     conftest$ac_exeext conftest.$ac_ext
11283         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11284 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11285
11286 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11287
11288
11289 fi
11290
11291     CPPFLAGS=$save_CPPFLAGS
11292     LIBS=$save_LIBS
11293     if test "${found_usable_guile}" = no; then
11294       if test "${flag_errors}" = yes; then
11295         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11296 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11297 as_fn_error $? "linking guile version ${guile_version} test program failed
11298 See \`config.log' for more details" "$LINENO" 5; }
11299       fi
11300     fi
11301   fi
11302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11303 $as_echo "${found_usable_guile}" >&6; }
11304
11305   ;;
11306 esac
11307
11308 if test "${have_libguile}" != no; then
11309     case "${with_guile}" in
11310   [\\/]* | ?:[\\/]*)
11311
11312   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11313 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11314 if ${ac_cv_guild_program_name+:} false; then :
11315   $as_echo_n "(cached) " >&6
11316 else
11317   ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11318
11319      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11320      # the 'guild' and 'bindir' variables.  In that case, try to guess
11321      # what the program name is, at the risk of getting it wrong if
11322      # Guile was configured with '--program-suffix' or similar.
11323      if test "x$ac_cv_guild_program_name" = "x"; then
11324        guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11325        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11326      fi
11327
11328 fi
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11330 $as_echo "$ac_cv_guild_program_name" >&6; }
11331
11332   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11333     as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11334   fi
11335
11336   GUILD="$ac_cv_guild_program_name"
11337
11338
11339     ;;
11340   *)
11341
11342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11343 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11344 if ${ac_cv_guild_program_name+:} false; then :
11345   $as_echo_n "(cached) " >&6
11346 else
11347   ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11348
11349      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11350      # the 'guild' and 'bindir' variables.  In that case, try to guess
11351      # what the program name is, at the risk of getting it wrong if
11352      # Guile was configured with '--program-suffix' or similar.
11353      if test "x$ac_cv_guild_program_name" = "x"; then
11354        guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11355        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11356      fi
11357
11358 fi
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11360 $as_echo "$ac_cv_guild_program_name" >&6; }
11361
11362   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11363     as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11364   fi
11365
11366   GUILD="$ac_cv_guild_program_name"
11367
11368
11369     ;;
11370   esac
11371
11372
11373   if test "$cross_compiling" = no; then
11374     GUILD_TARGET_FLAG=
11375   else
11376     GUILD_TARGET_FLAG="--target=$host"
11377   fi
11378
11379
11380
11381
11382   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11383 $as_echo_n "checking whether guild supports this host... " >&6; }
11384 if ${ac_cv_guild_ok+:} false; then :
11385   $as_echo_n "(cached) " >&6
11386 else
11387   echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11388      if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11389        ac_cv_guild_ok=yes
11390      else
11391        ac_cv_guild_ok=no
11392      fi
11393 fi
11394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11395 $as_echo "$ac_cv_guild_ok" >&6; }
11396
11397     if test "$ac_cv_guild_ok" = no; then
11398     have_libguile=no
11399     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11400 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11401   fi
11402 fi
11403
11404 if test "${have_libguile}" != no; then
11405
11406 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11407
11408   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11409   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11410   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11411   CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11412   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11413
11414     save_LIBS="$LIBS"
11415   save_CPPFLAGS="$CPPFLAGS"
11416   LIBS="$GUILE_LIBS"
11417   CPPFLAGS="$GUILE_CPPFLAGS"
11418   for ac_func in scm_new_smob
11419 do :
11420   ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11421 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11422   cat >>confdefs.h <<_ACEOF
11423 #define HAVE_SCM_NEW_SMOB 1
11424 _ACEOF
11425
11426 fi
11427 done
11428
11429   LIBS="$save_LIBS"
11430   CPPFLAGS="$save_CPPFLAGS"
11431 else
11432   # Even if Guile support is not compiled in, we need to have these files
11433   # included.
11434   CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11435   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11436 fi
11437
11438
11439  if test "${have_libguile}" != no; then
11440   HAVE_GUILE_TRUE=
11441   HAVE_GUILE_FALSE='#'
11442 else
11443   HAVE_GUILE_TRUE='#'
11444   HAVE_GUILE_FALSE=
11445 fi
11446
11447
11448 # --------------------- #
11449 # Check for libmcheck.  #
11450 # --------------------- #
11451
11452 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
11453 # but turn it off if Python is enabled with threads, since -lmcheck is
11454 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11455 # and for releases.
11456 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11457    && $development; then
11458   libmcheck_default=yes
11459 else
11460   libmcheck_default=no
11461 fi
11462
11463   # Check whether --enable-libmcheck was given.
11464 if test "${enable_libmcheck+set}" = set; then :
11465   enableval=$enable_libmcheck; case "${enableval}" in
11466       yes | y) ENABLE_LIBMCHECK="yes" ;;
11467       no | n)  ENABLE_LIBMCHECK="no" ;;
11468       *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
11469     esac
11470 fi
11471
11472
11473   if test -z "${ENABLE_LIBMCHECK}"; then
11474     ENABLE_LIBMCHECK=${libmcheck_default}
11475   fi
11476
11477   if test "$ENABLE_LIBMCHECK" = "yes" ; then
11478     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
11479 $as_echo_n "checking for main in -lmcheck... " >&6; }
11480 if ${ac_cv_lib_mcheck_main+:} false; then :
11481   $as_echo_n "(cached) " >&6
11482 else
11483   ac_check_lib_save_LIBS=$LIBS
11484 LIBS="-lmcheck  $LIBS"
11485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11486 /* end confdefs.h.  */
11487
11488
11489 int
11490 main ()
11491 {
11492 return main ();
11493   ;
11494   return 0;
11495 }
11496 _ACEOF
11497 if ac_fn_c_try_link "$LINENO"; then :
11498   ac_cv_lib_mcheck_main=yes
11499 else
11500   ac_cv_lib_mcheck_main=no
11501 fi
11502 rm -f core conftest.err conftest.$ac_objext \
11503     conftest$ac_exeext conftest.$ac_ext
11504 LIBS=$ac_check_lib_save_LIBS
11505 fi
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11507 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
11508 if test "x$ac_cv_lib_mcheck_main" = xyes; then :
11509   cat >>confdefs.h <<_ACEOF
11510 #define HAVE_LIBMCHECK 1
11511 _ACEOF
11512
11513   LIBS="-lmcheck $LIBS"
11514
11515 fi
11516
11517   fi
11518
11519
11520 if test "$ENABLE_LIBMCHECK" = "yes" \
11521         -a "${have_libpython}" != "no" \
11522         -a "${python_has_threads}" = "yes" ; then
11523   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11524 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
11525 fi
11526
11527
11528 # Check whether --with-intel_pt was given.
11529 if test "${with_intel_pt+set}" = set; then :
11530   withval=$with_intel_pt;
11531 else
11532   with_intel_pt=auto
11533 fi
11534
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11536 $as_echo_n "checking whether to use intel pt... " >&6; }
11537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11538 $as_echo "$with_intel_pt" >&6; }
11539
11540 if test "${with_intel_pt}" = no; then
11541   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11542 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
11543   HAVE_LIBIPT=no
11544 else
11545   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11546 /* end confdefs.h.  */
11547
11548 #include <linux/perf_event.h>
11549 #ifndef PERF_ATTR_SIZE_VER5
11550 # error
11551 #endif
11552
11553 _ACEOF
11554 if ac_fn_c_try_cpp "$LINENO"; then :
11555   perf_event=yes
11556 else
11557   perf_event=no
11558 fi
11559 rm -f conftest.err conftest.i conftest.$ac_ext
11560   if test "$perf_event" != yes; then
11561     if test "$with_intel_pt" = yes; then
11562       as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
11563     else
11564       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11565 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11566     fi
11567   fi
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577     use_additional=yes
11578
11579   acl_save_prefix="$prefix"
11580   prefix="$acl_final_prefix"
11581   acl_save_exec_prefix="$exec_prefix"
11582   exec_prefix="$acl_final_exec_prefix"
11583
11584     eval additional_includedir=\"$includedir\"
11585     eval additional_libdir=\"$libdir\"
11586
11587   exec_prefix="$acl_save_exec_prefix"
11588   prefix="$acl_save_prefix"
11589
11590
11591 # Check whether --with-libipt-prefix was given.
11592 if test "${with_libipt_prefix+set}" = set; then :
11593   withval=$with_libipt_prefix;
11594     if test "X$withval" = "Xno"; then
11595       use_additional=no
11596     else
11597       if test "X$withval" = "X"; then
11598
11599   acl_save_prefix="$prefix"
11600   prefix="$acl_final_prefix"
11601   acl_save_exec_prefix="$exec_prefix"
11602   exec_prefix="$acl_final_exec_prefix"
11603
11604           eval additional_includedir=\"$includedir\"
11605           eval additional_libdir=\"$libdir\"
11606
11607   exec_prefix="$acl_save_exec_prefix"
11608   prefix="$acl_save_prefix"
11609
11610       else
11611         additional_includedir="$withval/include"
11612         additional_libdir="$withval/lib"
11613       fi
11614     fi
11615
11616 fi
11617
11618       LIBIPT=
11619   LTLIBIPT=
11620   INCIPT=
11621   rpathdirs=
11622   ltrpathdirs=
11623   names_already_handled=
11624   names_next_round='ipt '
11625   while test -n "$names_next_round"; do
11626     names_this_round="$names_next_round"
11627     names_next_round=
11628     for name in $names_this_round; do
11629       already_handled=
11630       for n in $names_already_handled; do
11631         if test "$n" = "$name"; then
11632           already_handled=yes
11633           break
11634         fi
11635       done
11636       if test -z "$already_handled"; then
11637         names_already_handled="$names_already_handled $name"
11638                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11639         eval value=\"\$HAVE_LIB$uppername\"
11640         if test -n "$value"; then
11641           if test "$value" = yes; then
11642             eval value=\"\$LIB$uppername\"
11643             test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11644             eval value=\"\$LTLIB$uppername\"
11645             test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11646           else
11647                                     :
11648           fi
11649         else
11650                               found_dir=
11651           found_la=
11652           found_so=
11653           found_a=
11654           if test $use_additional = yes; then
11655             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11656               found_dir="$additional_libdir"
11657               found_so="$additional_libdir/lib$name.$shlibext"
11658               if test -f "$additional_libdir/lib$name.la"; then
11659                 found_la="$additional_libdir/lib$name.la"
11660               fi
11661             else
11662               if test -f "$additional_libdir/lib$name.$libext"; then
11663                 found_dir="$additional_libdir"
11664                 found_a="$additional_libdir/lib$name.$libext"
11665                 if test -f "$additional_libdir/lib$name.la"; then
11666                   found_la="$additional_libdir/lib$name.la"
11667                 fi
11668               fi
11669             fi
11670           fi
11671           if test "X$found_dir" = "X"; then
11672             for x in $LDFLAGS $LTLIBIPT; do
11673
11674   acl_save_prefix="$prefix"
11675   prefix="$acl_final_prefix"
11676   acl_save_exec_prefix="$exec_prefix"
11677   exec_prefix="$acl_final_exec_prefix"
11678   eval x=\"$x\"
11679   exec_prefix="$acl_save_exec_prefix"
11680   prefix="$acl_save_prefix"
11681
11682               case "$x" in
11683                 -L*)
11684                   dir=`echo "X$x" | sed -e 's/^X-L//'`
11685                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11686                     found_dir="$dir"
11687                     found_so="$dir/lib$name.$shlibext"
11688                     if test -f "$dir/lib$name.la"; then
11689                       found_la="$dir/lib$name.la"
11690                     fi
11691                   else
11692                     if test -f "$dir/lib$name.$libext"; then
11693                       found_dir="$dir"
11694                       found_a="$dir/lib$name.$libext"
11695                       if test -f "$dir/lib$name.la"; then
11696                         found_la="$dir/lib$name.la"
11697                       fi
11698                     fi
11699                   fi
11700                   ;;
11701               esac
11702               if test "X$found_dir" != "X"; then
11703                 break
11704               fi
11705             done
11706           fi
11707           if test "X$found_dir" != "X"; then
11708                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11709             if test "X$found_so" != "X"; then
11710                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11711                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11712               else
11713                                                                                 haveit=
11714                 for x in $ltrpathdirs; do
11715                   if test "X$x" = "X$found_dir"; then
11716                     haveit=yes
11717                     break
11718                   fi
11719                 done
11720                 if test -z "$haveit"; then
11721                   ltrpathdirs="$ltrpathdirs $found_dir"
11722                 fi
11723                                 if test "$hardcode_direct" = yes; then
11724                                                       LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11725                 else
11726                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11727                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11728                                                             haveit=
11729                     for x in $rpathdirs; do
11730                       if test "X$x" = "X$found_dir"; then
11731                         haveit=yes
11732                         break
11733                       fi
11734                     done
11735                     if test -z "$haveit"; then
11736                       rpathdirs="$rpathdirs $found_dir"
11737                     fi
11738                   else
11739                                                                                 haveit=
11740                     for x in $LDFLAGS $LIBIPT; do
11741
11742   acl_save_prefix="$prefix"
11743   prefix="$acl_final_prefix"
11744   acl_save_exec_prefix="$exec_prefix"
11745   exec_prefix="$acl_final_exec_prefix"
11746   eval x=\"$x\"
11747   exec_prefix="$acl_save_exec_prefix"
11748   prefix="$acl_save_prefix"
11749
11750                       if test "X$x" = "X-L$found_dir"; then
11751                         haveit=yes
11752                         break
11753                       fi
11754                     done
11755                     if test -z "$haveit"; then
11756                       LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11757                     fi
11758                     if test "$hardcode_minus_L" != no; then
11759                                                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11760                     else
11761                                                                                                                                                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11762                     fi
11763                   fi
11764                 fi
11765               fi
11766             else
11767               if test "X$found_a" != "X"; then
11768                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11769               else
11770                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11771               fi
11772             fi
11773                         additional_includedir=
11774             case "$found_dir" in
11775               */lib | */lib/)
11776                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11777                 additional_includedir="$basedir/include"
11778                 ;;
11779             esac
11780             if test "X$additional_includedir" != "X"; then
11781                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
11782                 haveit=
11783                 if test "X$additional_includedir" = "X/usr/local/include"; then
11784                   if test -n "$GCC"; then
11785                     case $host_os in
11786                       linux*) haveit=yes;;
11787                     esac
11788                   fi
11789                 fi
11790                 if test -z "$haveit"; then
11791                   for x in $CPPFLAGS $INCIPT; do
11792
11793   acl_save_prefix="$prefix"
11794   prefix="$acl_final_prefix"
11795   acl_save_exec_prefix="$exec_prefix"
11796   exec_prefix="$acl_final_exec_prefix"
11797   eval x=\"$x\"
11798   exec_prefix="$acl_save_exec_prefix"
11799   prefix="$acl_save_prefix"
11800
11801                     if test "X$x" = "X-I$additional_includedir"; then
11802                       haveit=yes
11803                       break
11804                     fi
11805                   done
11806                   if test -z "$haveit"; then
11807                     if test -d "$additional_includedir"; then
11808                                             INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11809                     fi
11810                   fi
11811                 fi
11812               fi
11813             fi
11814                         if test -n "$found_la"; then
11815                                                         save_libdir="$libdir"
11816               case "$found_la" in
11817                 */* | *\\*) . "$found_la" ;;
11818                 *) . "./$found_la" ;;
11819               esac
11820               libdir="$save_libdir"
11821                             for dep in $dependency_libs; do
11822                 case "$dep" in
11823                   -L*)
11824                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11825                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
11826                       haveit=
11827                       if test "X$additional_libdir" = "X/usr/local/lib"; then
11828                         if test -n "$GCC"; then
11829                           case $host_os in
11830                             linux*) haveit=yes;;
11831                           esac
11832                         fi
11833                       fi
11834                       if test -z "$haveit"; then
11835                         haveit=
11836                         for x in $LDFLAGS $LIBIPT; do
11837
11838   acl_save_prefix="$prefix"
11839   prefix="$acl_final_prefix"
11840   acl_save_exec_prefix="$exec_prefix"
11841   exec_prefix="$acl_final_exec_prefix"
11842   eval x=\"$x\"
11843   exec_prefix="$acl_save_exec_prefix"
11844   prefix="$acl_save_prefix"
11845
11846                           if test "X$x" = "X-L$additional_libdir"; then
11847                             haveit=yes
11848                             break
11849                           fi
11850                         done
11851                         if test -z "$haveit"; then
11852                           if test -d "$additional_libdir"; then
11853                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11854                           fi
11855                         fi
11856                         haveit=
11857                         for x in $LDFLAGS $LTLIBIPT; do
11858
11859   acl_save_prefix="$prefix"
11860   prefix="$acl_final_prefix"
11861   acl_save_exec_prefix="$exec_prefix"
11862   exec_prefix="$acl_final_exec_prefix"
11863   eval x=\"$x\"
11864   exec_prefix="$acl_save_exec_prefix"
11865   prefix="$acl_save_prefix"
11866
11867                           if test "X$x" = "X-L$additional_libdir"; then
11868                             haveit=yes
11869                             break
11870                           fi
11871                         done
11872                         if test -z "$haveit"; then
11873                           if test -d "$additional_libdir"; then
11874                                                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11875                           fi
11876                         fi
11877                       fi
11878                     fi
11879                     ;;
11880                   -R*)
11881                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
11882                     if test "$enable_rpath" != no; then
11883                                                                   haveit=
11884                       for x in $rpathdirs; do
11885                         if test "X$x" = "X$dir"; then
11886                           haveit=yes
11887                           break
11888                         fi
11889                       done
11890                       if test -z "$haveit"; then
11891                         rpathdirs="$rpathdirs $dir"
11892                       fi
11893                                                                   haveit=
11894                       for x in $ltrpathdirs; do
11895                         if test "X$x" = "X$dir"; then
11896                           haveit=yes
11897                           break
11898                         fi
11899                       done
11900                       if test -z "$haveit"; then
11901                         ltrpathdirs="$ltrpathdirs $dir"
11902                       fi
11903                     fi
11904                     ;;
11905                   -l*)
11906                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11907                     ;;
11908                   *.la)
11909                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11910                     ;;
11911                   *)
11912                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11913                     LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11914                     ;;
11915                 esac
11916               done
11917             fi
11918           else
11919                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11920             LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11921           fi
11922         fi
11923       fi
11924     done
11925   done
11926   if test "X$rpathdirs" != "X"; then
11927     if test -n "$hardcode_libdir_separator"; then
11928                         alldirs=
11929       for found_dir in $rpathdirs; do
11930         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11931       done
11932             acl_save_libdir="$libdir"
11933       libdir="$alldirs"
11934       eval flag=\"$hardcode_libdir_flag_spec\"
11935       libdir="$acl_save_libdir"
11936       LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11937     else
11938             for found_dir in $rpathdirs; do
11939         acl_save_libdir="$libdir"
11940         libdir="$found_dir"
11941         eval flag=\"$hardcode_libdir_flag_spec\"
11942         libdir="$acl_save_libdir"
11943         LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11944       done
11945     fi
11946   fi
11947   if test "X$ltrpathdirs" != "X"; then
11948             for found_dir in $ltrpathdirs; do
11949       LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11950     done
11951   fi
11952
11953
11954         ac_save_CPPFLAGS="$CPPFLAGS"
11955
11956   for element in $INCIPT; do
11957     haveit=
11958     for x in $CPPFLAGS; do
11959
11960   acl_save_prefix="$prefix"
11961   prefix="$acl_final_prefix"
11962   acl_save_exec_prefix="$exec_prefix"
11963   exec_prefix="$acl_final_exec_prefix"
11964   eval x=\"$x\"
11965   exec_prefix="$acl_save_exec_prefix"
11966   prefix="$acl_save_prefix"
11967
11968       if test "X$x" = "X$element"; then
11969         haveit=yes
11970         break
11971       fi
11972     done
11973     if test -z "$haveit"; then
11974       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11975     fi
11976   done
11977
11978
11979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11980 $as_echo_n "checking for libipt... " >&6; }
11981 if ${ac_cv_libipt+:} false; then :
11982   $as_echo_n "(cached) " >&6
11983 else
11984
11985     ac_save_LIBS="$LIBS"
11986     LIBS="$LIBS $LIBIPT"
11987     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11988 /* end confdefs.h.  */
11989 #include "intel-pt.h"
11990 int
11991 main ()
11992 {
11993 pt_insn_alloc_decoder (0);
11994   ;
11995   return 0;
11996 }
11997 _ACEOF
11998 if ac_fn_c_try_link "$LINENO"; then :
11999   ac_cv_libipt=yes
12000 else
12001   ac_cv_libipt=no
12002 fi
12003 rm -f core conftest.err conftest.$ac_objext \
12004     conftest$ac_exeext conftest.$ac_ext
12005     LIBS="$ac_save_LIBS"
12006
12007 fi
12008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
12009 $as_echo "$ac_cv_libipt" >&6; }
12010   if test "$ac_cv_libipt" = yes; then
12011     HAVE_LIBIPT=yes
12012
12013 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
12014
12015     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
12016 $as_echo_n "checking how to link with libipt... " >&6; }
12017     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
12018 $as_echo "$LIBIPT" >&6; }
12019   else
12020     HAVE_LIBIPT=no
12021             CPPFLAGS="$ac_save_CPPFLAGS"
12022     LIBIPT=
12023     LTLIBIPT=
12024   fi
12025
12026
12027
12028
12029
12030
12031   if test "$HAVE_LIBIPT" != yes; then
12032     if test "$with_intel_pt" = yes; then
12033       as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
12034     else
12035       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
12036 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
12037     fi
12038   else
12039     save_LIBS=$LIBS
12040     LIBS="$LIBS $LIBIPT"
12041     for ac_func in pt_insn_event
12042 do :
12043   ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
12044 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
12045   cat >>confdefs.h <<_ACEOF
12046 #define HAVE_PT_INSN_EVENT 1
12047 _ACEOF
12048
12049 fi
12050 done
12051
12052     ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
12053 "
12054 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
12055
12056 cat >>confdefs.h <<_ACEOF
12057 #define HAVE_STRUCT_PT_INSN_ENABLED 1
12058 _ACEOF
12059
12060
12061 fi
12062 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12063 "
12064 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
12065
12066 cat >>confdefs.h <<_ACEOF
12067 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
12068 _ACEOF
12069
12070
12071 fi
12072
12073     LIBS=$save_LIBS
12074   fi
12075 fi
12076
12077 # ------------------------- #
12078 # Checks for header files.  #
12079 # ------------------------- #
12080
12081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12082 $as_echo_n "checking for ANSI C header files... " >&6; }
12083 if ${ac_cv_header_stdc+:} false; then :
12084   $as_echo_n "(cached) " >&6
12085 else
12086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12087 /* end confdefs.h.  */
12088 #include <stdlib.h>
12089 #include <stdarg.h>
12090 #include <string.h>
12091 #include <float.h>
12092
12093 int
12094 main ()
12095 {
12096
12097   ;
12098   return 0;
12099 }
12100 _ACEOF
12101 if ac_fn_c_try_compile "$LINENO"; then :
12102   ac_cv_header_stdc=yes
12103 else
12104   ac_cv_header_stdc=no
12105 fi
12106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12107
12108 if test $ac_cv_header_stdc = yes; then
12109   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12111 /* end confdefs.h.  */
12112 #include <string.h>
12113
12114 _ACEOF
12115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12116   $EGREP "memchr" >/dev/null 2>&1; then :
12117
12118 else
12119   ac_cv_header_stdc=no
12120 fi
12121 rm -f conftest*
12122
12123 fi
12124
12125 if test $ac_cv_header_stdc = yes; then
12126   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128 /* end confdefs.h.  */
12129 #include <stdlib.h>
12130
12131 _ACEOF
12132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12133   $EGREP "free" >/dev/null 2>&1; then :
12134
12135 else
12136   ac_cv_header_stdc=no
12137 fi
12138 rm -f conftest*
12139
12140 fi
12141
12142 if test $ac_cv_header_stdc = yes; then
12143   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12144   if test "$cross_compiling" = yes; then :
12145   :
12146 else
12147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12148 /* end confdefs.h.  */
12149 #include <ctype.h>
12150 #include <stdlib.h>
12151 #if ((' ' & 0x0FF) == 0x020)
12152 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12153 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12154 #else
12155 # define ISLOWER(c) \
12156                    (('a' <= (c) && (c) <= 'i') \
12157                      || ('j' <= (c) && (c) <= 'r') \
12158                      || ('s' <= (c) && (c) <= 'z'))
12159 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12160 #endif
12161
12162 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12163 int
12164 main ()
12165 {
12166   int i;
12167   for (i = 0; i < 256; i++)
12168     if (XOR (islower (i), ISLOWER (i))
12169         || toupper (i) != TOUPPER (i))
12170       return 2;
12171   return 0;
12172 }
12173 _ACEOF
12174 if ac_fn_c_try_run "$LINENO"; then :
12175
12176 else
12177   ac_cv_header_stdc=no
12178 fi
12179 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12180   conftest.$ac_objext conftest.beam conftest.$ac_ext
12181 fi
12182
12183 fi
12184 fi
12185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12186 $as_echo "$ac_cv_header_stdc" >&6; }
12187 if test $ac_cv_header_stdc = yes; then
12188
12189 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12190
12191 fi
12192
12193 # elf_hp.h is for HP/UX 64-bit shared library support.
12194 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12195                   thread_db.h \
12196                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12197                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12198                   sys/reg.h sys/debugreg.h sys/select.h \
12199                   termios.h elf_hp.h \
12200                   dlfcn.h
12201 do :
12202   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12203 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12204 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12205   cat >>confdefs.h <<_ACEOF
12206 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12207 _ACEOF
12208
12209 fi
12210
12211 done
12212
12213 for ac_header in sys/user.h
12214 do :
12215   ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12216 # include <sys/param.h>
12217 #endif
12218
12219 "
12220 if test "x$ac_cv_header_sys_user_h" = xyes; then :
12221   cat >>confdefs.h <<_ACEOF
12222 #define HAVE_SYS_USER_H 1
12223 _ACEOF
12224
12225 fi
12226
12227 done
12228
12229
12230 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12231 do :
12232   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12233 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12234 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12235   cat >>confdefs.h <<_ACEOF
12236 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12237 _ACEOF
12238
12239 fi
12240
12241 done
12242
12243 for ac_header in term.h
12244 do :
12245   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12246 # include <curses.h>
12247 #endif
12248
12249 "
12250 if test "x$ac_cv_header_term_h" = xyes; then :
12251   cat >>confdefs.h <<_ACEOF
12252 #define HAVE_TERM_H 1
12253 _ACEOF
12254
12255 fi
12256
12257 done
12258
12259
12260 # ------------------------- #
12261 # Checks for declarations.  #
12262 # ------------------------- #
12263
12264
12265   # Check for presence and size of long long.
12266   ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12267 if test "x$ac_cv_type_long_long" = xyes; then :
12268
12269 cat >>confdefs.h <<_ACEOF
12270 #define HAVE_LONG_LONG 1
12271 _ACEOF
12272
12273 # The cast to long int works around a bug in the HP C Compiler
12274 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12275 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12276 # This bug is HP SR number 8606223364.
12277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12278 $as_echo_n "checking size of long long... " >&6; }
12279 if ${ac_cv_sizeof_long_long+:} false; then :
12280   $as_echo_n "(cached) " >&6
12281 else
12282   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
12283
12284 else
12285   if test "$ac_cv_type_long_long" = yes; then
12286      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12287 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12288 as_fn_error 77 "cannot compute sizeof (long long)
12289 See \`config.log' for more details" "$LINENO" 5; }
12290    else
12291      ac_cv_sizeof_long_long=0
12292    fi
12293 fi
12294
12295 fi
12296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12297 $as_echo "$ac_cv_sizeof_long_long" >&6; }
12298
12299
12300
12301 cat >>confdefs.h <<_ACEOF
12302 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12303 _ACEOF
12304
12305
12306 fi
12307
12308
12309   as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12310 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12311 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12312   ac_have_decl=1
12313 else
12314   ac_have_decl=0
12315 fi
12316
12317 cat >>confdefs.h <<_ACEOF
12318 #define HAVE_DECL_BASENAME $ac_have_decl
12319 _ACEOF
12320 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12321 if test "x$ac_cv_have_decl_ffs" = xyes; then :
12322   ac_have_decl=1
12323 else
12324   ac_have_decl=0
12325 fi
12326
12327 cat >>confdefs.h <<_ACEOF
12328 #define HAVE_DECL_FFS $ac_have_decl
12329 _ACEOF
12330 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12331 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12332   ac_have_decl=1
12333 else
12334   ac_have_decl=0
12335 fi
12336
12337 cat >>confdefs.h <<_ACEOF
12338 #define HAVE_DECL_ASPRINTF $ac_have_decl
12339 _ACEOF
12340 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12341 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12342   ac_have_decl=1
12343 else
12344   ac_have_decl=0
12345 fi
12346
12347 cat >>confdefs.h <<_ACEOF
12348 #define HAVE_DECL_VASPRINTF $ac_have_decl
12349 _ACEOF
12350 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12351 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12352   ac_have_decl=1
12353 else
12354   ac_have_decl=0
12355 fi
12356
12357 cat >>confdefs.h <<_ACEOF
12358 #define HAVE_DECL_SNPRINTF $ac_have_decl
12359 _ACEOF
12360 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12361 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12362   ac_have_decl=1
12363 else
12364   ac_have_decl=0
12365 fi
12366
12367 cat >>confdefs.h <<_ACEOF
12368 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12369 _ACEOF
12370
12371   ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12372 if test "x$ac_cv_have_decl_strtol" = xyes; then :
12373   ac_have_decl=1
12374 else
12375   ac_have_decl=0
12376 fi
12377
12378 cat >>confdefs.h <<_ACEOF
12379 #define HAVE_DECL_STRTOL $ac_have_decl
12380 _ACEOF
12381 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12382 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12383   ac_have_decl=1
12384 else
12385   ac_have_decl=0
12386 fi
12387
12388 cat >>confdefs.h <<_ACEOF
12389 #define HAVE_DECL_STRTOUL $ac_have_decl
12390 _ACEOF
12391 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12392 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12393   ac_have_decl=1
12394 else
12395   ac_have_decl=0
12396 fi
12397
12398 cat >>confdefs.h <<_ACEOF
12399 #define HAVE_DECL_STRTOLL $ac_have_decl
12400 _ACEOF
12401 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12402 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12403   ac_have_decl=1
12404 else
12405   ac_have_decl=0
12406 fi
12407
12408 cat >>confdefs.h <<_ACEOF
12409 #define HAVE_DECL_STRTOULL $ac_have_decl
12410 _ACEOF
12411
12412   ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12413 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12414   ac_have_decl=1
12415 else
12416   ac_have_decl=0
12417 fi
12418
12419 cat >>confdefs.h <<_ACEOF
12420 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12421 _ACEOF
12422
12423
12424
12425 ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
12426 if test "x$ac_cv_have_decl_free" = xyes; then :
12427   ac_have_decl=1
12428 else
12429   ac_have_decl=0
12430 fi
12431
12432 cat >>confdefs.h <<_ACEOF
12433 #define HAVE_DECL_FREE $ac_have_decl
12434 _ACEOF
12435 ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
12436 if test "x$ac_cv_have_decl_malloc" = xyes; then :
12437   ac_have_decl=1
12438 else
12439   ac_have_decl=0
12440 fi
12441
12442 cat >>confdefs.h <<_ACEOF
12443 #define HAVE_DECL_MALLOC $ac_have_decl
12444 _ACEOF
12445 ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
12446 if test "x$ac_cv_have_decl_realloc" = xyes; then :
12447   ac_have_decl=1
12448 else
12449   ac_have_decl=0
12450 fi
12451
12452 cat >>confdefs.h <<_ACEOF
12453 #define HAVE_DECL_REALLOC $ac_have_decl
12454 _ACEOF
12455 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12456 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12457   ac_have_decl=1
12458 else
12459   ac_have_decl=0
12460 fi
12461
12462 cat >>confdefs.h <<_ACEOF
12463 #define HAVE_DECL_SNPRINTF $ac_have_decl
12464 _ACEOF
12465
12466
12467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12468 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12469 if ${am_cv_val_LC_MESSAGES+:} false; then :
12470   $as_echo_n "(cached) " >&6
12471 else
12472   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12473 /* end confdefs.h.  */
12474 #include <locale.h>
12475 int
12476 main ()
12477 {
12478 return LC_MESSAGES
12479   ;
12480   return 0;
12481 }
12482 _ACEOF
12483 if ac_fn_c_try_link "$LINENO"; then :
12484   am_cv_val_LC_MESSAGES=yes
12485 else
12486   am_cv_val_LC_MESSAGES=no
12487 fi
12488 rm -f core conftest.err conftest.$ac_objext \
12489     conftest$ac_exeext conftest.$ac_ext
12490 fi
12491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12492 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12493   if test $am_cv_val_LC_MESSAGES = yes; then
12494
12495 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12496
12497   fi
12498
12499
12500 # ----------------------- #
12501 # Checks for structures.  #
12502 # ----------------------- #
12503
12504 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
12505 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
12506
12507 cat >>confdefs.h <<_ACEOF
12508 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
12509 _ACEOF
12510
12511
12512 fi
12513 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
12514 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
12515
12516 cat >>confdefs.h <<_ACEOF
12517 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12518 _ACEOF
12519
12520
12521 fi
12522
12523
12524 # ------------------ #
12525 # Checks for types.  #
12526 # ------------------ #
12527
12528 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12529 #include <sys/socket.h>
12530
12531 "
12532 if test "x$ac_cv_type_socklen_t" = xyes; then :
12533
12534 cat >>confdefs.h <<_ACEOF
12535 #define HAVE_SOCKLEN_T 1
12536 _ACEOF
12537
12538
12539 fi
12540
12541
12542 # ------------------------------------- #
12543 # Checks for compiler characteristics.  #
12544 # ------------------------------------- #
12545
12546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12547 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12548 if ${ac_cv_c_const+:} false; then :
12549   $as_echo_n "(cached) " >&6
12550 else
12551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12552 /* end confdefs.h.  */
12553
12554 int
12555 main ()
12556 {
12557
12558 #ifndef __cplusplus
12559   /* Ultrix mips cc rejects this sort of thing.  */
12560   typedef int charset[2];
12561   const charset cs = { 0, 0 };
12562   /* SunOS 4.1.1 cc rejects this.  */
12563   char const *const *pcpcc;
12564   char **ppc;
12565   /* NEC SVR4.0.2 mips cc rejects this.  */
12566   struct point {int x, y;};
12567   static struct point const zero = {0,0};
12568   /* AIX XL C 1.02.0.0 rejects this.
12569      It does not let you subtract one const X* pointer from another in
12570      an arm of an if-expression whose if-part is not a constant
12571      expression */
12572   const char *g = "string";
12573   pcpcc = &g + (g ? g-g : 0);
12574   /* HPUX 7.0 cc rejects these. */
12575   ++pcpcc;
12576   ppc = (char**) pcpcc;
12577   pcpcc = (char const *const *) ppc;
12578   { /* SCO 3.2v4 cc rejects this sort of thing.  */
12579     char tx;
12580     char *t = &tx;
12581     char const *s = 0 ? (char *) 0 : (char const *) 0;
12582
12583     *t++ = 0;
12584     if (s) return 0;
12585   }
12586   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12587     int x[] = {25, 17};
12588     const int *foo = &x[0];
12589     ++foo;
12590   }
12591   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12592     typedef const int *iptr;
12593     iptr p = 0;
12594     ++p;
12595   }
12596   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12597        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12598     struct s { int j; const int *ap[3]; } bx;
12599     struct s *b = &bx; b->j = 5;
12600   }
12601   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12602     const int foo = 10;
12603     if (!foo) return 0;
12604   }
12605   return !cs[0] && !zero.x;
12606 #endif
12607
12608   ;
12609   return 0;
12610 }
12611 _ACEOF
12612 if ac_fn_c_try_compile "$LINENO"; then :
12613   ac_cv_c_const=yes
12614 else
12615   ac_cv_c_const=no
12616 fi
12617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12618 fi
12619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12620 $as_echo "$ac_cv_c_const" >&6; }
12621 if test $ac_cv_c_const = no; then
12622
12623 $as_echo "#define const /**/" >>confdefs.h
12624
12625 fi
12626
12627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12628 $as_echo_n "checking for inline... " >&6; }
12629 if ${ac_cv_c_inline+:} false; then :
12630   $as_echo_n "(cached) " >&6
12631 else
12632   ac_cv_c_inline=no
12633 for ac_kw in inline __inline__ __inline; do
12634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12635 /* end confdefs.h.  */
12636 #ifndef __cplusplus
12637 typedef int foo_t;
12638 static $ac_kw foo_t static_foo () {return 0; }
12639 $ac_kw foo_t foo () {return 0; }
12640 #endif
12641
12642 _ACEOF
12643 if ac_fn_c_try_compile "$LINENO"; then :
12644   ac_cv_c_inline=$ac_kw
12645 fi
12646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12647   test "$ac_cv_c_inline" != no && break
12648 done
12649
12650 fi
12651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12652 $as_echo "$ac_cv_c_inline" >&6; }
12653
12654 case $ac_cv_c_inline in
12655   inline | yes) ;;
12656   *)
12657     case $ac_cv_c_inline in
12658       no) ac_val=;;
12659       *) ac_val=$ac_cv_c_inline;;
12660     esac
12661     cat >>confdefs.h <<_ACEOF
12662 #ifndef __cplusplus
12663 #define inline $ac_val
12664 #endif
12665 _ACEOF
12666     ;;
12667 esac
12668
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12670 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12671 if ${ac_cv_c_bigendian+:} false; then :
12672   $as_echo_n "(cached) " >&6
12673 else
12674   ac_cv_c_bigendian=unknown
12675     # See if we're dealing with a universal compiler.
12676     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12677 /* end confdefs.h.  */
12678 #ifndef __APPLE_CC__
12679                not a universal capable compiler
12680              #endif
12681              typedef int dummy;
12682
12683 _ACEOF
12684 if ac_fn_c_try_compile "$LINENO"; then :
12685
12686         # Check for potential -arch flags.  It is not universal unless
12687         # there are at least two -arch flags with different values.
12688         ac_arch=
12689         ac_prev=
12690         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12691          if test -n "$ac_prev"; then
12692            case $ac_word in
12693              i?86 | x86_64 | ppc | ppc64)
12694                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12695                  ac_arch=$ac_word
12696                else
12697                  ac_cv_c_bigendian=universal
12698                  break
12699                fi
12700                ;;
12701            esac
12702            ac_prev=
12703          elif test "x$ac_word" = "x-arch"; then
12704            ac_prev=arch
12705          fi
12706        done
12707 fi
12708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12709     if test $ac_cv_c_bigendian = unknown; then
12710       # See if sys/param.h defines the BYTE_ORDER macro.
12711       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12712 /* end confdefs.h.  */
12713 #include <sys/types.h>
12714              #include <sys/param.h>
12715
12716 int
12717 main ()
12718 {
12719 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12720                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12721                      && LITTLE_ENDIAN)
12722               bogus endian macros
12723              #endif
12724
12725   ;
12726   return 0;
12727 }
12728 _ACEOF
12729 if ac_fn_c_try_compile "$LINENO"; then :
12730   # It does; now see whether it defined to BIG_ENDIAN or not.
12731          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12732 /* end confdefs.h.  */
12733 #include <sys/types.h>
12734                 #include <sys/param.h>
12735
12736 int
12737 main ()
12738 {
12739 #if BYTE_ORDER != BIG_ENDIAN
12740                  not big endian
12741                 #endif
12742
12743   ;
12744   return 0;
12745 }
12746 _ACEOF
12747 if ac_fn_c_try_compile "$LINENO"; then :
12748   ac_cv_c_bigendian=yes
12749 else
12750   ac_cv_c_bigendian=no
12751 fi
12752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12753 fi
12754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12755     fi
12756     if test $ac_cv_c_bigendian = unknown; then
12757       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12758       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12759 /* end confdefs.h.  */
12760 #include <limits.h>
12761
12762 int
12763 main ()
12764 {
12765 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12766               bogus endian macros
12767              #endif
12768
12769   ;
12770   return 0;
12771 }
12772 _ACEOF
12773 if ac_fn_c_try_compile "$LINENO"; then :
12774   # It does; now see whether it defined to _BIG_ENDIAN or not.
12775          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12776 /* end confdefs.h.  */
12777 #include <limits.h>
12778
12779 int
12780 main ()
12781 {
12782 #ifndef _BIG_ENDIAN
12783                  not big endian
12784                 #endif
12785
12786   ;
12787   return 0;
12788 }
12789 _ACEOF
12790 if ac_fn_c_try_compile "$LINENO"; then :
12791   ac_cv_c_bigendian=yes
12792 else
12793   ac_cv_c_bigendian=no
12794 fi
12795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12796 fi
12797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12798     fi
12799     if test $ac_cv_c_bigendian = unknown; then
12800       # Compile a test program.
12801       if test "$cross_compiling" = yes; then :
12802   # Try to guess by grepping values from an object file.
12803          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12804 /* end confdefs.h.  */
12805 short int ascii_mm[] =
12806                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12807                 short int ascii_ii[] =
12808                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12809                 int use_ascii (int i) {
12810                   return ascii_mm[i] + ascii_ii[i];
12811                 }
12812                 short int ebcdic_ii[] =
12813                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12814                 short int ebcdic_mm[] =
12815                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12816                 int use_ebcdic (int i) {
12817                   return ebcdic_mm[i] + ebcdic_ii[i];
12818                 }
12819                 extern int foo;
12820
12821 int
12822 main ()
12823 {
12824 return use_ascii (foo) == use_ebcdic (foo);
12825   ;
12826   return 0;
12827 }
12828 _ACEOF
12829 if ac_fn_c_try_compile "$LINENO"; then :
12830   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12831               ac_cv_c_bigendian=yes
12832             fi
12833             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12834               if test "$ac_cv_c_bigendian" = unknown; then
12835                 ac_cv_c_bigendian=no
12836               else
12837                 # finding both strings is unlikely to happen, but who knows?
12838                 ac_cv_c_bigendian=unknown
12839               fi
12840             fi
12841 fi
12842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12843 else
12844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12845 /* end confdefs.h.  */
12846 $ac_includes_default
12847 int
12848 main ()
12849 {
12850
12851              /* Are we little or big endian?  From Harbison&Steele.  */
12852              union
12853              {
12854                long int l;
12855                char c[sizeof (long int)];
12856              } u;
12857              u.l = 1;
12858              return u.c[sizeof (long int) - 1] == 1;
12859
12860   ;
12861   return 0;
12862 }
12863 _ACEOF
12864 if ac_fn_c_try_run "$LINENO"; then :
12865   ac_cv_c_bigendian=no
12866 else
12867   ac_cv_c_bigendian=yes
12868 fi
12869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12870   conftest.$ac_objext conftest.beam conftest.$ac_ext
12871 fi
12872
12873     fi
12874 fi
12875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12876 $as_echo "$ac_cv_c_bigendian" >&6; }
12877  case $ac_cv_c_bigendian in #(
12878    yes)
12879      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12880 ;; #(
12881    no)
12882       ;; #(
12883    universal)
12884
12885 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12886
12887      ;; #(
12888    *)
12889      as_fn_error $? "unknown endianness
12890  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12891  esac
12892
12893
12894 # ------------------------------ #
12895 # Checks for library functions.  #
12896 # ------------------------------ #
12897
12898
12899
12900
12901   for ac_header in $ac_header_list
12902 do :
12903   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12904 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12905 "
12906 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12907   cat >>confdefs.h <<_ACEOF
12908 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12909 _ACEOF
12910
12911 fi
12912
12913 done
12914
12915
12916
12917
12918
12919
12920
12921
12922 for ac_func in getpagesize
12923 do :
12924   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12925 if test "x$ac_cv_func_getpagesize" = xyes; then :
12926   cat >>confdefs.h <<_ACEOF
12927 #define HAVE_GETPAGESIZE 1
12928 _ACEOF
12929
12930 fi
12931 done
12932
12933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12934 $as_echo_n "checking for working mmap... " >&6; }
12935 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
12936   $as_echo_n "(cached) " >&6
12937 else
12938   if test "$cross_compiling" = yes; then :
12939   ac_cv_func_mmap_fixed_mapped=no
12940 else
12941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12942 /* end confdefs.h.  */
12943 $ac_includes_default
12944 /* malloc might have been renamed as rpl_malloc. */
12945 #undef malloc
12946
12947 /* Thanks to Mike Haertel and Jim Avera for this test.
12948    Here is a matrix of mmap possibilities:
12949         mmap private not fixed
12950         mmap private fixed at somewhere currently unmapped
12951         mmap private fixed at somewhere already mapped
12952         mmap shared not fixed
12953         mmap shared fixed at somewhere currently unmapped
12954         mmap shared fixed at somewhere already mapped
12955    For private mappings, we should verify that changes cannot be read()
12956    back from the file, nor mmap's back from the file at a different
12957    address.  (There have been systems where private was not correctly
12958    implemented like the infamous i386 svr4.0, and systems where the
12959    VM page cache was not coherent with the file system buffer cache
12960    like early versions of FreeBSD and possibly contemporary NetBSD.)
12961    For shared mappings, we should conversely verify that changes get
12962    propagated back to all the places they're supposed to be.
12963
12964    Grep wants private fixed already mapped.
12965    The main things grep needs to know about mmap are:
12966    * does it exist and is it safe to write into the mmap'd area
12967    * how to use it (BSD variants)  */
12968
12969 #include <fcntl.h>
12970 #include <sys/mman.h>
12971
12972 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12973 char *malloc ();
12974 #endif
12975
12976 /* This mess was copied from the GNU getpagesize.h.  */
12977 #ifndef HAVE_GETPAGESIZE
12978 # ifdef _SC_PAGESIZE
12979 #  define getpagesize() sysconf(_SC_PAGESIZE)
12980 # else /* no _SC_PAGESIZE */
12981 #  ifdef HAVE_SYS_PARAM_H
12982 #   include <sys/param.h>
12983 #   ifdef EXEC_PAGESIZE
12984 #    define getpagesize() EXEC_PAGESIZE
12985 #   else /* no EXEC_PAGESIZE */
12986 #    ifdef NBPG
12987 #     define getpagesize() NBPG * CLSIZE
12988 #     ifndef CLSIZE
12989 #      define CLSIZE 1
12990 #     endif /* no CLSIZE */
12991 #    else /* no NBPG */
12992 #     ifdef NBPC
12993 #      define getpagesize() NBPC
12994 #     else /* no NBPC */
12995 #      ifdef PAGESIZE
12996 #       define getpagesize() PAGESIZE
12997 #      endif /* PAGESIZE */
12998 #     endif /* no NBPC */
12999 #    endif /* no NBPG */
13000 #   endif /* no EXEC_PAGESIZE */
13001 #  else /* no HAVE_SYS_PARAM_H */
13002 #   define getpagesize() 8192   /* punt totally */
13003 #  endif /* no HAVE_SYS_PARAM_H */
13004 # endif /* no _SC_PAGESIZE */
13005
13006 #endif /* no HAVE_GETPAGESIZE */
13007
13008 int
13009 main ()
13010 {
13011   char *data, *data2, *data3;
13012   const char *cdata2;
13013   int i, pagesize;
13014   int fd, fd2;
13015
13016   pagesize = getpagesize ();
13017
13018   /* First, make a file with some known garbage in it. */
13019   data = (char *) malloc (pagesize);
13020   if (!data)
13021     return 1;
13022   for (i = 0; i < pagesize; ++i)
13023     *(data + i) = rand ();
13024   umask (0);
13025   fd = creat ("conftest.mmap", 0600);
13026   if (fd < 0)
13027     return 2;
13028   if (write (fd, data, pagesize) != pagesize)
13029     return 3;
13030   close (fd);
13031
13032   /* Next, check that the tail of a page is zero-filled.  File must have
13033      non-zero length, otherwise we risk SIGBUS for entire page.  */
13034   fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13035   if (fd2 < 0)
13036     return 4;
13037   cdata2 = "";
13038   if (write (fd2, cdata2, 1) != 1)
13039     return 5;
13040   data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13041   if (data2 == MAP_FAILED)
13042     return 6;
13043   for (i = 0; i < pagesize; ++i)
13044     if (*(data2 + i))
13045       return 7;
13046   close (fd2);
13047   if (munmap (data2, pagesize))
13048     return 8;
13049
13050   /* Next, try to mmap the file at a fixed address which already has
13051      something else allocated at it.  If we can, also make sure that
13052      we see the same garbage.  */
13053   fd = open ("conftest.mmap", O_RDWR);
13054   if (fd < 0)
13055     return 9;
13056   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13057                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
13058     return 10;
13059   for (i = 0; i < pagesize; ++i)
13060     if (*(data + i) != *(data2 + i))
13061       return 11;
13062
13063   /* Finally, make sure that changes to the mapped area do not
13064      percolate back to the file as seen by read().  (This is a bug on
13065      some variants of i386 svr4.0.)  */
13066   for (i = 0; i < pagesize; ++i)
13067     *(data2 + i) = *(data2 + i) + 1;
13068   data3 = (char *) malloc (pagesize);
13069   if (!data3)
13070     return 12;
13071   if (read (fd, data3, pagesize) != pagesize)
13072     return 13;
13073   for (i = 0; i < pagesize; ++i)
13074     if (*(data + i) != *(data3 + i))
13075       return 14;
13076   close (fd);
13077   return 0;
13078 }
13079 _ACEOF
13080 if ac_fn_c_try_run "$LINENO"; then :
13081   ac_cv_func_mmap_fixed_mapped=yes
13082 else
13083   ac_cv_func_mmap_fixed_mapped=no
13084 fi
13085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13086   conftest.$ac_objext conftest.beam conftest.$ac_ext
13087 fi
13088
13089 fi
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13091 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13092 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13093
13094 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
13095
13096 fi
13097 rm -f conftest.mmap conftest.txt
13098
13099 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13100 if test "x$ac_cv_type_pid_t" = xyes; then :
13101
13102 else
13103
13104 cat >>confdefs.h <<_ACEOF
13105 #define pid_t int
13106 _ACEOF
13107
13108 fi
13109
13110 for ac_header in vfork.h
13111 do :
13112   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13113 if test "x$ac_cv_header_vfork_h" = xyes; then :
13114   cat >>confdefs.h <<_ACEOF
13115 #define HAVE_VFORK_H 1
13116 _ACEOF
13117
13118 fi
13119
13120 done
13121
13122 for ac_func in fork vfork
13123 do :
13124   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13125 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13126 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13127   cat >>confdefs.h <<_ACEOF
13128 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13129 _ACEOF
13130
13131 fi
13132 done
13133
13134 if test "x$ac_cv_func_fork" = xyes; then
13135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13136 $as_echo_n "checking for working fork... " >&6; }
13137 if ${ac_cv_func_fork_works+:} false; then :
13138   $as_echo_n "(cached) " >&6
13139 else
13140   if test "$cross_compiling" = yes; then :
13141   ac_cv_func_fork_works=cross
13142 else
13143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13144 /* end confdefs.h.  */
13145 $ac_includes_default
13146 int
13147 main ()
13148 {
13149
13150           /* By Ruediger Kuhlmann. */
13151           return fork () < 0;
13152
13153   ;
13154   return 0;
13155 }
13156 _ACEOF
13157 if ac_fn_c_try_run "$LINENO"; then :
13158   ac_cv_func_fork_works=yes
13159 else
13160   ac_cv_func_fork_works=no
13161 fi
13162 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13163   conftest.$ac_objext conftest.beam conftest.$ac_ext
13164 fi
13165
13166 fi
13167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13168 $as_echo "$ac_cv_func_fork_works" >&6; }
13169
13170 else
13171   ac_cv_func_fork_works=$ac_cv_func_fork
13172 fi
13173 if test "x$ac_cv_func_fork_works" = xcross; then
13174   case $host in
13175     *-*-amigaos* | *-*-msdosdjgpp*)
13176       # Override, as these systems have only a dummy fork() stub
13177       ac_cv_func_fork_works=no
13178       ;;
13179     *)
13180       ac_cv_func_fork_works=yes
13181       ;;
13182   esac
13183   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13184 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13185 fi
13186 ac_cv_func_vfork_works=$ac_cv_func_vfork
13187 if test "x$ac_cv_func_vfork" = xyes; then
13188   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13189 $as_echo_n "checking for working vfork... " >&6; }
13190 if ${ac_cv_func_vfork_works+:} false; then :
13191   $as_echo_n "(cached) " >&6
13192 else
13193   if test "$cross_compiling" = yes; then :
13194   ac_cv_func_vfork_works=cross
13195 else
13196   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13197 /* end confdefs.h.  */
13198 /* Thanks to Paul Eggert for this test.  */
13199 $ac_includes_default
13200 #include <sys/wait.h>
13201 #ifdef HAVE_VFORK_H
13202 # include <vfork.h>
13203 #endif
13204 /* On some sparc systems, changes by the child to local and incoming
13205    argument registers are propagated back to the parent.  The compiler
13206    is told about this with #include <vfork.h>, but some compilers
13207    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
13208    static variable whose address is put into a register that is
13209    clobbered by the vfork.  */
13210 static void
13211 #ifdef __cplusplus
13212 sparc_address_test (int arg)
13213 # else
13214 sparc_address_test (arg) int arg;
13215 #endif
13216 {
13217   static pid_t child;
13218   if (!child) {
13219     child = vfork ();
13220     if (child < 0) {
13221       perror ("vfork");
13222       _exit(2);
13223     }
13224     if (!child) {
13225       arg = getpid();
13226       write(-1, "", 0);
13227       _exit (arg);
13228     }
13229   }
13230 }
13231
13232 int
13233 main ()
13234 {
13235   pid_t parent = getpid ();
13236   pid_t child;
13237
13238   sparc_address_test (0);
13239
13240   child = vfork ();
13241
13242   if (child == 0) {
13243     /* Here is another test for sparc vfork register problems.  This
13244        test uses lots of local variables, at least as many local
13245        variables as main has allocated so far including compiler
13246        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
13247        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
13248        reuse the register of parent for one of the local variables,
13249        since it will think that parent can't possibly be used any more
13250        in this routine.  Assigning to the local variable will thus
13251        munge parent in the parent process.  */
13252     pid_t
13253       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13254       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13255     /* Convince the compiler that p..p7 are live; otherwise, it might
13256        use the same hardware register for all 8 local variables.  */
13257     if (p != p1 || p != p2 || p != p3 || p != p4
13258         || p != p5 || p != p6 || p != p7)
13259       _exit(1);
13260
13261     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13262        from child file descriptors.  If the child closes a descriptor
13263        before it execs or exits, this munges the parent's descriptor
13264        as well.  Test for this by closing stdout in the child.  */
13265     _exit(close(fileno(stdout)) != 0);
13266   } else {
13267     int status;
13268     struct stat st;
13269
13270     while (wait(&status) != child)
13271       ;
13272     return (
13273          /* Was there some problem with vforking?  */
13274          child < 0
13275
13276          /* Did the child fail?  (This shouldn't happen.)  */
13277          || status
13278
13279          /* Did the vfork/compiler bug occur?  */
13280          || parent != getpid()
13281
13282          /* Did the file descriptor bug occur?  */
13283          || fstat(fileno(stdout), &st) != 0
13284          );
13285   }
13286 }
13287 _ACEOF
13288 if ac_fn_c_try_run "$LINENO"; then :
13289   ac_cv_func_vfork_works=yes
13290 else
13291   ac_cv_func_vfork_works=no
13292 fi
13293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13294   conftest.$ac_objext conftest.beam conftest.$ac_ext
13295 fi
13296
13297 fi
13298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13299 $as_echo "$ac_cv_func_vfork_works" >&6; }
13300
13301 fi;
13302 if test "x$ac_cv_func_fork_works" = xcross; then
13303   ac_cv_func_vfork_works=$ac_cv_func_vfork
13304   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13305 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13306 fi
13307
13308 if test "x$ac_cv_func_vfork_works" = xyes; then
13309
13310 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13311
13312 else
13313
13314 $as_echo "#define vfork fork" >>confdefs.h
13315
13316 fi
13317 if test "x$ac_cv_func_fork_works" = xyes; then
13318
13319 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13320
13321 fi
13322
13323 for ac_func in getauxval getrusage getuid getgid \
13324                 pipe poll pread pread64 pwrite resize_term \
13325                 sbrk getpgid setpgid setpgrp setsid \
13326                 sigaction sigprocmask sigsetmask socketpair \
13327                 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
13328                 setrlimit getrlimit posix_madvise waitpid \
13329                 ptrace64 sigaltstack mkdtemp setns
13330 do :
13331   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13332 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13333 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13334   cat >>confdefs.h <<_ACEOF
13335 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13336 _ACEOF
13337
13338 fi
13339 done
13340
13341
13342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13343 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13344 if ${am_cv_langinfo_codeset+:} false; then :
13345   $as_echo_n "(cached) " >&6
13346 else
13347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13348 /* end confdefs.h.  */
13349 #include <langinfo.h>
13350 int
13351 main ()
13352 {
13353 char* cs = nl_langinfo(CODESET);
13354   ;
13355   return 0;
13356 }
13357 _ACEOF
13358 if ac_fn_c_try_link "$LINENO"; then :
13359   am_cv_langinfo_codeset=yes
13360 else
13361   am_cv_langinfo_codeset=no
13362 fi
13363 rm -f core conftest.err conftest.$ac_objext \
13364     conftest$ac_exeext conftest.$ac_ext
13365
13366 fi
13367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13368 $as_echo "$am_cv_langinfo_codeset" >&6; }
13369   if test $am_cv_langinfo_codeset = yes; then
13370
13371 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13372
13373   fi
13374
13375 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13376 if test "x$ac_cv_type_size_t" = xyes; then :
13377
13378 else
13379
13380 cat >>confdefs.h <<_ACEOF
13381 #define size_t unsigned int
13382 _ACEOF
13383
13384 fi
13385
13386
13387   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13388 $as_echo_n "checking for ANSI C header files... " >&6; }
13389 if ${ac_cv_header_stdc+:} false; then :
13390   $as_echo_n "(cached) " >&6
13391 else
13392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13393 /* end confdefs.h.  */
13394 #include <stdlib.h>
13395 #include <stdarg.h>
13396 #include <string.h>
13397 #include <float.h>
13398
13399 int
13400 main ()
13401 {
13402
13403   ;
13404   return 0;
13405 }
13406 _ACEOF
13407 if ac_fn_c_try_compile "$LINENO"; then :
13408   ac_cv_header_stdc=yes
13409 else
13410   ac_cv_header_stdc=no
13411 fi
13412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13413
13414 if test $ac_cv_header_stdc = yes; then
13415   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13417 /* end confdefs.h.  */
13418 #include <string.h>
13419
13420 _ACEOF
13421 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13422   $EGREP "memchr" >/dev/null 2>&1; then :
13423
13424 else
13425   ac_cv_header_stdc=no
13426 fi
13427 rm -f conftest*
13428
13429 fi
13430
13431 if test $ac_cv_header_stdc = yes; then
13432   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13433   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13434 /* end confdefs.h.  */
13435 #include <stdlib.h>
13436
13437 _ACEOF
13438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13439   $EGREP "free" >/dev/null 2>&1; then :
13440
13441 else
13442   ac_cv_header_stdc=no
13443 fi
13444 rm -f conftest*
13445
13446 fi
13447
13448 if test $ac_cv_header_stdc = yes; then
13449   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13450   if test "$cross_compiling" = yes; then :
13451   :
13452 else
13453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13454 /* end confdefs.h.  */
13455 #include <ctype.h>
13456 #include <stdlib.h>
13457 #if ((' ' & 0x0FF) == 0x020)
13458 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13459 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13460 #else
13461 # define ISLOWER(c) \
13462                    (('a' <= (c) && (c) <= 'i') \
13463                      || ('j' <= (c) && (c) <= 'r') \
13464                      || ('s' <= (c) && (c) <= 'z'))
13465 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13466 #endif
13467
13468 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13469 int
13470 main ()
13471 {
13472   int i;
13473   for (i = 0; i < 256; i++)
13474     if (XOR (islower (i), ISLOWER (i))
13475         || toupper (i) != TOUPPER (i))
13476       return 2;
13477   return 0;
13478 }
13479 _ACEOF
13480 if ac_fn_c_try_run "$LINENO"; then :
13481
13482 else
13483   ac_cv_header_stdc=no
13484 fi
13485 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13486   conftest.$ac_objext conftest.beam conftest.$ac_ext
13487 fi
13488
13489 fi
13490 fi
13491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13492 $as_echo "$ac_cv_header_stdc" >&6; }
13493 if test $ac_cv_header_stdc = yes; then
13494
13495 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13496
13497 fi
13498
13499   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13500 # for constant arguments.  Useless!
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13502 $as_echo_n "checking for working alloca.h... " >&6; }
13503 if ${ac_cv_working_alloca_h+:} false; then :
13504   $as_echo_n "(cached) " >&6
13505 else
13506   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13507 /* end confdefs.h.  */
13508 #include <alloca.h>
13509 int
13510 main ()
13511 {
13512 char *p = (char *) alloca (2 * sizeof (int));
13513                           if (p) return 0;
13514   ;
13515   return 0;
13516 }
13517 _ACEOF
13518 if ac_fn_c_try_link "$LINENO"; then :
13519   ac_cv_working_alloca_h=yes
13520 else
13521   ac_cv_working_alloca_h=no
13522 fi
13523 rm -f core conftest.err conftest.$ac_objext \
13524     conftest$ac_exeext conftest.$ac_ext
13525 fi
13526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13527 $as_echo "$ac_cv_working_alloca_h" >&6; }
13528 if test $ac_cv_working_alloca_h = yes; then
13529
13530 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13531
13532 fi
13533
13534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13535 $as_echo_n "checking for alloca... " >&6; }
13536 if ${ac_cv_func_alloca_works+:} false; then :
13537   $as_echo_n "(cached) " >&6
13538 else
13539   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13540 /* end confdefs.h.  */
13541 #ifdef __GNUC__
13542 # define alloca __builtin_alloca
13543 #else
13544 # ifdef _MSC_VER
13545 #  include <malloc.h>
13546 #  define alloca _alloca
13547 # else
13548 #  ifdef HAVE_ALLOCA_H
13549 #   include <alloca.h>
13550 #  else
13551 #   ifdef _AIX
13552  #pragma alloca
13553 #   else
13554 #    ifndef alloca /* predefined by HP cc +Olibcalls */
13555 void *alloca (size_t);
13556 #    endif
13557 #   endif
13558 #  endif
13559 # endif
13560 #endif
13561
13562 int
13563 main ()
13564 {
13565 char *p = (char *) alloca (1);
13566                                     if (p) return 0;
13567   ;
13568   return 0;
13569 }
13570 _ACEOF
13571 if ac_fn_c_try_link "$LINENO"; then :
13572   ac_cv_func_alloca_works=yes
13573 else
13574   ac_cv_func_alloca_works=no
13575 fi
13576 rm -f core conftest.err conftest.$ac_objext \
13577     conftest$ac_exeext conftest.$ac_ext
13578 fi
13579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13580 $as_echo "$ac_cv_func_alloca_works" >&6; }
13581
13582 if test $ac_cv_func_alloca_works = yes; then
13583
13584 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13585
13586 else
13587   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13588 # that cause trouble.  Some versions do not even contain alloca or
13589 # contain a buggy version.  If you still want to use their alloca,
13590 # use ar to extract alloca.o from them instead of compiling alloca.c.
13591
13592 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13593
13594 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13595
13596
13597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13598 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13599 if ${ac_cv_os_cray+:} false; then :
13600   $as_echo_n "(cached) " >&6
13601 else
13602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13603 /* end confdefs.h.  */
13604 #if defined CRAY && ! defined CRAY2
13605 webecray
13606 #else
13607 wenotbecray
13608 #endif
13609
13610 _ACEOF
13611 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13612   $EGREP "webecray" >/dev/null 2>&1; then :
13613   ac_cv_os_cray=yes
13614 else
13615   ac_cv_os_cray=no
13616 fi
13617 rm -f conftest*
13618
13619 fi
13620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13621 $as_echo "$ac_cv_os_cray" >&6; }
13622 if test $ac_cv_os_cray = yes; then
13623   for ac_func in _getb67 GETB67 getb67; do
13624     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13625 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13626 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13627
13628 cat >>confdefs.h <<_ACEOF
13629 #define CRAY_STACKSEG_END $ac_func
13630 _ACEOF
13631
13632     break
13633 fi
13634
13635   done
13636 fi
13637
13638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13639 $as_echo_n "checking stack direction for C alloca... " >&6; }
13640 if ${ac_cv_c_stack_direction+:} false; then :
13641   $as_echo_n "(cached) " >&6
13642 else
13643   if test "$cross_compiling" = yes; then :
13644   ac_cv_c_stack_direction=0
13645 else
13646   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13647 /* end confdefs.h.  */
13648 $ac_includes_default
13649 int
13650 find_stack_direction (int *addr, int depth)
13651 {
13652   int dir, dummy = 0;
13653   if (! addr)
13654     addr = &dummy;
13655   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13656   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13657   return dir + dummy;
13658 }
13659
13660 int
13661 main (int argc, char **argv)
13662 {
13663   return find_stack_direction (0, argc + !argv + 20) < 0;
13664 }
13665 _ACEOF
13666 if ac_fn_c_try_run "$LINENO"; then :
13667   ac_cv_c_stack_direction=1
13668 else
13669   ac_cv_c_stack_direction=-1
13670 fi
13671 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13672   conftest.$ac_objext conftest.beam conftest.$ac_ext
13673 fi
13674
13675 fi
13676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13677 $as_echo "$ac_cv_c_stack_direction" >&6; }
13678 cat >>confdefs.h <<_ACEOF
13679 #define STACK_DIRECTION $ac_cv_c_stack_direction
13680 _ACEOF
13681
13682
13683 fi
13684
13685
13686
13687   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13688 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13689 if ${am_cv_langinfo_codeset+:} false; then :
13690   $as_echo_n "(cached) " >&6
13691 else
13692   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13693 /* end confdefs.h.  */
13694 #include <langinfo.h>
13695 int
13696 main ()
13697 {
13698 char* cs = nl_langinfo(CODESET);
13699   ;
13700   return 0;
13701 }
13702 _ACEOF
13703 if ac_fn_c_try_link "$LINENO"; then :
13704   am_cv_langinfo_codeset=yes
13705 else
13706   am_cv_langinfo_codeset=no
13707 fi
13708 rm -f core conftest.err conftest.$ac_objext \
13709     conftest$ac_exeext conftest.$ac_ext
13710
13711 fi
13712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13713 $as_echo "$am_cv_langinfo_codeset" >&6; }
13714   if test $am_cv_langinfo_codeset = yes; then
13715
13716 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13717
13718   fi
13719
13720
13721   for ac_header in linux/perf_event.h locale.h memory.h signal.h                   sys/resource.h sys/socket.h             sys/un.h sys/wait.h             thread_db.h wait.h              termios.h
13722 do :
13723   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13724 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13725 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13726   cat >>confdefs.h <<_ACEOF
13727 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13728 _ACEOF
13729
13730 fi
13731
13732 done
13733
13734
13735   for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
13736 do :
13737   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13738 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13739 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13740   cat >>confdefs.h <<_ACEOF
13741 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13742 _ACEOF
13743
13744 fi
13745 done
13746
13747
13748   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13749 if test "x$ac_cv_have_decl_strerror" = xyes; then :
13750   ac_have_decl=1
13751 else
13752   ac_have_decl=0
13753 fi
13754
13755 cat >>confdefs.h <<_ACEOF
13756 #define HAVE_DECL_STRERROR $ac_have_decl
13757 _ACEOF
13758 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13759 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13760   ac_have_decl=1
13761 else
13762   ac_have_decl=0
13763 fi
13764
13765 cat >>confdefs.h <<_ACEOF
13766 #define HAVE_DECL_STRSTR $ac_have_decl
13767 _ACEOF
13768
13769
13770     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13771 $as_echo_n "checking for sigsetjmp... " >&6; }
13772 if ${gdb_cv_func_sigsetjmp+:} false; then :
13773   $as_echo_n "(cached) " >&6
13774 else
13775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13776 /* end confdefs.h.  */
13777
13778 #include <setjmp.h>
13779
13780 int
13781 main ()
13782 {
13783 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13784   ;
13785   return 0;
13786 }
13787 _ACEOF
13788 if ac_fn_c_try_compile "$LINENO"; then :
13789   gdb_cv_func_sigsetjmp=yes
13790 else
13791   gdb_cv_func_sigsetjmp=no
13792 fi
13793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13794 fi
13795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13796 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13797 if test $gdb_cv_func_sigsetjmp = yes; then
13798
13799 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13800
13801 fi
13802
13803
13804 # Check the return and argument types of ptrace.
13805
13806
13807 for ac_header in sys/ptrace.h ptrace.h
13808 do :
13809   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13810 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13811 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13812   cat >>confdefs.h <<_ACEOF
13813 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13814 _ACEOF
13815
13816 fi
13817
13818 done
13819
13820
13821 gdb_ptrace_headers='
13822 #include <sys/types.h>
13823 #if HAVE_SYS_PTRACE_H
13824 # include <sys/ptrace.h>
13825 #endif
13826 #if HAVE_UNISTD_H
13827 # include <unistd.h>
13828 #endif
13829 '
13830 # There is no point in checking if we don't have a prototype.
13831 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
13832 "
13833 if test "x$ac_cv_have_decl_ptrace" = xyes; then :
13834   ac_have_decl=1
13835 else
13836   ac_have_decl=0
13837 fi
13838
13839 cat >>confdefs.h <<_ACEOF
13840 #define HAVE_DECL_PTRACE $ac_have_decl
13841 _ACEOF
13842 if test $ac_have_decl = 1; then :
13843
13844 else
13845
13846   : ${gdb_cv_func_ptrace_ret='int'}
13847   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13848
13849 fi
13850
13851 # Check return type.  Varargs (used on GNU/Linux) conflict with the
13852 # empty argument list, so check for that explicitly.
13853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13854 $as_echo_n "checking return type of ptrace... " >&6; }
13855 if ${gdb_cv_func_ptrace_ret+:} false; then :
13856   $as_echo_n "(cached) " >&6
13857 else
13858   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13859 /* end confdefs.h.  */
13860 $gdb_ptrace_headers
13861 int
13862 main ()
13863 {
13864 extern long ptrace (enum __ptrace_request, ...);
13865   ;
13866   return 0;
13867 }
13868 _ACEOF
13869 if ac_fn_c_try_compile "$LINENO"; then :
13870   gdb_cv_func_ptrace_ret='long'
13871 else
13872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13873 /* end confdefs.h.  */
13874 $gdb_ptrace_headers
13875 int
13876 main ()
13877 {
13878 extern int ptrace ();
13879   ;
13880   return 0;
13881 }
13882 _ACEOF
13883 if ac_fn_c_try_compile "$LINENO"; then :
13884   gdb_cv_func_ptrace_ret='int'
13885 else
13886   gdb_cv_func_ptrace_ret='long'
13887 fi
13888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13889 fi
13890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13891 fi
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13893 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13894
13895 cat >>confdefs.h <<_ACEOF
13896 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13897 _ACEOF
13898
13899 # Check argument types.
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13901 $as_echo_n "checking types of arguments for ptrace... " >&6; }
13902 if ${gdb_cv_func_ptrace_args+:} false; then :
13903   $as_echo_n "(cached) " >&6
13904 else
13905
13906   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13907 /* end confdefs.h.  */
13908 $gdb_ptrace_headers
13909 int
13910 main ()
13911 {
13912 extern long ptrace (enum __ptrace_request, ...);
13913   ;
13914   return 0;
13915 }
13916 _ACEOF
13917 if ac_fn_c_try_compile "$LINENO"; then :
13918   gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
13919 else
13920
13921 for gdb_arg1 in 'int' 'long'; do
13922  for gdb_arg2 in 'pid_t' 'int' 'long'; do
13923   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13924    for gdb_arg4 in 'int' 'long' 'void *'; do
13925      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13926 /* end confdefs.h.  */
13927 $gdb_ptrace_headers
13928 int
13929 main ()
13930 {
13931
13932 extern $gdb_cv_func_ptrace_ret
13933   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13934
13935   ;
13936   return 0;
13937 }
13938 _ACEOF
13939 if ac_fn_c_try_compile "$LINENO"; then :
13940   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13941     break 4;
13942 fi
13943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13944     for gdb_arg5 in 'int *' 'int' 'long'; do
13945      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13946 /* end confdefs.h.  */
13947 $gdb_ptrace_headers
13948 int
13949 main ()
13950 {
13951
13952 extern $gdb_cv_func_ptrace_ret
13953   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13954
13955   ;
13956   return 0;
13957 }
13958 _ACEOF
13959 if ac_fn_c_try_compile "$LINENO"; then :
13960
13961 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13962     break 5;
13963 fi
13964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13965     done
13966    done
13967   done
13968  done
13969 done
13970 # Provide a safe default value.
13971 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13972
13973 fi
13974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13975 fi
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13977 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
13978 ac_save_IFS=$IFS; IFS=','
13979 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13980 IFS=$ac_save_IFS
13981 shift
13982
13983 cat >>confdefs.h <<_ACEOF
13984 #define PTRACE_TYPE_ARG1 $1
13985 _ACEOF
13986
13987
13988 cat >>confdefs.h <<_ACEOF
13989 #define PTRACE_TYPE_ARG3 $3
13990 _ACEOF
13991
13992
13993 cat >>confdefs.h <<_ACEOF
13994 #define PTRACE_TYPE_ARG4 $4
13995 _ACEOF
13996
13997 if test -n "$5"; then
13998
13999 cat >>confdefs.h <<_ACEOF
14000 #define PTRACE_TYPE_ARG5 $5
14001 _ACEOF
14002
14003 fi
14004
14005
14006 if test "$cross_compiling" = no; then
14007   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14008 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14009 if ${ac_cv_func_setpgrp_void+:} false; then :
14010   $as_echo_n "(cached) " >&6
14011 else
14012   if test "$cross_compiling" = yes; then :
14013   as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
14014 else
14015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14016 /* end confdefs.h.  */
14017 $ac_includes_default
14018 int
14019 main ()
14020 {
14021 /* If this system has a BSD-style setpgrp which takes arguments,
14022   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14023   exit successfully. */
14024   return setpgrp (1,1) != -1;
14025   ;
14026   return 0;
14027 }
14028 _ACEOF
14029 if ac_fn_c_try_run "$LINENO"; then :
14030   ac_cv_func_setpgrp_void=no
14031 else
14032   ac_cv_func_setpgrp_void=yes
14033 fi
14034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14035   conftest.$ac_objext conftest.beam conftest.$ac_ext
14036 fi
14037
14038 fi
14039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14040 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
14041 if test $ac_cv_func_setpgrp_void = yes; then
14042
14043 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
14044
14045 fi
14046
14047 else
14048   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14049 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14050 if ${ac_cv_func_setpgrp_void+:} false; then :
14051   $as_echo_n "(cached) " >&6
14052 else
14053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14054 /* end confdefs.h.  */
14055
14056 #include <unistd.h>
14057
14058 int
14059 main ()
14060 {
14061
14062   if (setpgrp(1,1) == -1)
14063     exit (0);
14064   else
14065     exit (1);
14066
14067   ;
14068   return 0;
14069 }
14070 _ACEOF
14071 if ac_fn_c_try_compile "$LINENO"; then :
14072   ac_cv_func_setpgrp_void=no
14073 else
14074   ac_cv_func_setpgrp_void=yes
14075 fi
14076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14077 fi
14078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14079 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
14080 if test $ac_cv_func_setpgrp_void = yes; then
14081   $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
14082
14083 fi
14084 fi
14085
14086 # Assume we'll default to using the included libiberty regex.
14087 gdb_use_included_regex=yes
14088
14089 # However, if the system regex is GNU regex, then default to *not*
14090 # using the included regex.
14091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14092 $as_echo_n "checking for GNU regex... " >&6; }
14093 if ${gdb_cv_have_gnu_regex+:} false; then :
14094   $as_echo_n "(cached) " >&6
14095 else
14096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14097 /* end confdefs.h.  */
14098 #include <gnu-versions.h>
14099 int
14100 main ()
14101 {
14102 #define REGEX_INTERFACE_VERSION 1
14103 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14104 # error "Version mismatch"
14105 #endif
14106   ;
14107   return 0;
14108 }
14109 _ACEOF
14110 if ac_fn_c_try_compile "$LINENO"; then :
14111   gdb_cv_have_gnu_regex=yes
14112 else
14113   gdb_cv_have_gnu_regex=no
14114 fi
14115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14116 fi
14117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14118 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
14119 if test $gdb_cv_have_gnu_regex = yes; then
14120   gdb_use_included_regex=no
14121 fi
14122
14123
14124 # Check whether --with-included-regex was given.
14125 if test "${with_included_regex+set}" = set; then :
14126   withval=$with_included_regex; gdb_with_regex=$withval
14127 else
14128   gdb_with_regex=$gdb_use_included_regex
14129 fi
14130
14131 if test "$gdb_with_regex" = yes; then
14132
14133 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14134
14135 fi
14136
14137 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14138 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14139 #include <sys/proc.h>
14140
14141 "
14142 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
14143
14144 cat >>confdefs.h <<_ACEOF
14145 #define HAVE_STRUCT_THREAD_TD_PCB 1
14146 _ACEOF
14147
14148
14149 fi
14150
14151
14152 # See if <sys/lwp.h> defines `struct lwp`.
14153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14154 $as_echo_n "checking for struct lwp... " >&6; }
14155 if ${gdb_cv_struct_lwp+:} false; then :
14156   $as_echo_n "(cached) " >&6
14157 else
14158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14159 /* end confdefs.h.  */
14160 #include <sys/param.h>
14161 #define _KMEMUSER
14162 #include <sys/lwp.h>
14163 int
14164 main ()
14165 {
14166 struct lwp l;
14167   ;
14168   return 0;
14169 }
14170 _ACEOF
14171 if ac_fn_c_try_compile "$LINENO"; then :
14172   gdb_cv_struct_lwp=yes
14173 else
14174   gdb_cv_struct_lwp=no
14175 fi
14176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14177 fi
14178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14179 $as_echo "$gdb_cv_struct_lwp" >&6; }
14180 if test $gdb_cv_struct_lwp = yes; then
14181
14182 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
14183
14184 fi
14185
14186 # See if <machine/reg.h> degines `struct reg'.
14187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14188 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
14189 if ${gdb_cv_struct_reg+:} false; then :
14190   $as_echo_n "(cached) " >&6
14191 else
14192   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14193 /* end confdefs.h.  */
14194 #include <sys/types.h>
14195 #include <machine/reg.h>
14196 int
14197 main ()
14198 {
14199 struct reg r;
14200   ;
14201   return 0;
14202 }
14203 _ACEOF
14204 if ac_fn_c_try_compile "$LINENO"; then :
14205   gdb_cv_struct_reg=yes
14206 else
14207   gdb_cv_struct_reg=no
14208 fi
14209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14210 fi
14211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14212 $as_echo "$gdb_cv_struct_reg" >&6; }
14213 if test $gdb_cv_struct_reg = yes; then
14214
14215 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
14216
14217 fi
14218
14219 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14220 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
14221 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14222 #include <machine/reg.h>
14223 "
14224 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
14225
14226 cat >>confdefs.h <<_ACEOF
14227 #define HAVE_STRUCT_REG_R_FS 1
14228 _ACEOF
14229
14230
14231 fi
14232 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14233 #include <machine/reg.h>
14234 "
14235 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
14236
14237 cat >>confdefs.h <<_ACEOF
14238 #define HAVE_STRUCT_REG_R_GS 1
14239 _ACEOF
14240
14241
14242 fi
14243
14244
14245 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14246 # Older amd64 Linux's don't have the fs_base and gs_base members of
14247 # `struct user_regs_struct'.
14248 ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14249 #include <sys/user.h>
14250 "
14251 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
14252
14253 cat >>confdefs.h <<_ACEOF
14254 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14255 _ACEOF
14256
14257
14258 fi
14259 ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14260 #include <sys/user.h>
14261 "
14262 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
14263
14264 cat >>confdefs.h <<_ACEOF
14265 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14266 _ACEOF
14267
14268
14269 fi
14270
14271
14272 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
14273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14274 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
14275 if ${gdb_cv_have_ptrace_getregs+:} false; then :
14276   $as_echo_n "(cached) " >&6
14277 else
14278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14279 /* end confdefs.h.  */
14280 #include <sys/ptrace.h>
14281 int
14282 main ()
14283 {
14284 PTRACE_GETREGS;
14285   ;
14286   return 0;
14287 }
14288 _ACEOF
14289 if ac_fn_c_try_compile "$LINENO"; then :
14290   gdb_cv_have_ptrace_getregs=yes
14291 else
14292   gdb_cv_have_ptrace_getregs=no
14293 fi
14294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14295 fi
14296
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14298 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
14299 if test $gdb_cv_have_ptrace_getregs = yes; then
14300
14301 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
14302
14303 fi
14304
14305 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
14306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14307 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14308 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
14309   $as_echo_n "(cached) " >&6
14310 else
14311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14312 /* end confdefs.h.  */
14313 #include <sys/ptrace.h>
14314 int
14315 main ()
14316 {
14317 PTRACE_GETFPXREGS;
14318   ;
14319   return 0;
14320 }
14321 _ACEOF
14322 if ac_fn_c_try_compile "$LINENO"; then :
14323   gdb_cv_have_ptrace_getfpxregs=yes
14324 else
14325   gdb_cv_have_ptrace_getfpxregs=no
14326 fi
14327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14328 fi
14329
14330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14331 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
14332 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
14333
14334 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
14335
14336 fi
14337
14338 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
14339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14340 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
14341 if ${gdb_cv_have_pt_getdbregs+:} false; then :
14342   $as_echo_n "(cached) " >&6
14343 else
14344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14345 /* end confdefs.h.  */
14346 #include <sys/types.h>
14347 #include <sys/ptrace.h>
14348 int
14349 main ()
14350 {
14351 PT_GETDBREGS;
14352   ;
14353   return 0;
14354 }
14355 _ACEOF
14356 if ac_fn_c_try_compile "$LINENO"; then :
14357   gdb_cv_have_pt_getdbregs=yes
14358 else
14359   gdb_cv_have_pt_getdbregs=no
14360 fi
14361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14362 fi
14363
14364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14365 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
14366 if test $gdb_cv_have_pt_getdbregs = yes; then
14367
14368 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
14369
14370 fi
14371
14372 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
14373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14374 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
14375 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
14376   $as_echo_n "(cached) " >&6
14377 else
14378   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14379 /* end confdefs.h.  */
14380 #include <sys/types.h>
14381 #include <sys/ptrace.h>
14382 int
14383 main ()
14384 {
14385 PT_GETXMMREGS;
14386   ;
14387   return 0;
14388 }
14389 _ACEOF
14390 if ac_fn_c_try_compile "$LINENO"; then :
14391   gdb_cv_have_pt_getxmmregs=yes
14392 else
14393   gdb_cv_have_pt_getxmmregs=no
14394 fi
14395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14396 fi
14397
14398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14399 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
14400 if test $gdb_cv_have_pt_getxmmregs = yes; then
14401
14402 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
14403
14404 fi
14405
14406 # See if <sys/ptrace.h> supports LWP names on FreeBSD
14407 # Older FreeBSD versions don't have the pl_tdname member of
14408 # `struct ptrace_lwpinfo'.
14409 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14410 "
14411 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
14412
14413 cat >>confdefs.h <<_ACEOF
14414 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14415 _ACEOF
14416
14417
14418 fi
14419
14420
14421 # See if <sys/ptrace.h> supports syscall fields on FreeBSD.  The
14422 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14423 # FreeBSD 10.3.
14424 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>
14425 "
14426 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
14427
14428 cat >>confdefs.h <<_ACEOF
14429 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14430 _ACEOF
14431
14432
14433 fi
14434
14435
14436 if test "$ac_cv_header_sys_procfs_h" = yes; then
14437   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14438 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14439  if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14440   $as_echo_n "(cached) " >&6
14441 else
14442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14443 /* end confdefs.h.  */
14444
14445 #define _SYSCALL32
14446 /* Needed for new procfs interface on sparc-solaris.  */
14447 #define _STRUCTURED_PROC 1
14448 #include <sys/procfs.h>
14449 int
14450 main ()
14451 {
14452 gregset_t avar
14453   ;
14454   return 0;
14455 }
14456 _ACEOF
14457 if ac_fn_c_try_compile "$LINENO"; then :
14458   bfd_cv_have_sys_procfs_type_gregset_t=yes
14459 else
14460   bfd_cv_have_sys_procfs_type_gregset_t=no
14461
14462 fi
14463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14464 fi
14465
14466  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14467
14468 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14469
14470  fi
14471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14472 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14473
14474   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14475 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14476  if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14477   $as_echo_n "(cached) " >&6
14478 else
14479   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14480 /* end confdefs.h.  */
14481
14482 #define _SYSCALL32
14483 /* Needed for new procfs interface on sparc-solaris.  */
14484 #define _STRUCTURED_PROC 1
14485 #include <sys/procfs.h>
14486 int
14487 main ()
14488 {
14489 fpregset_t avar
14490   ;
14491   return 0;
14492 }
14493 _ACEOF
14494 if ac_fn_c_try_compile "$LINENO"; then :
14495   bfd_cv_have_sys_procfs_type_fpregset_t=yes
14496 else
14497   bfd_cv_have_sys_procfs_type_fpregset_t=no
14498
14499 fi
14500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14501 fi
14502
14503  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14504
14505 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14506
14507  fi
14508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14509 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14510
14511   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14512 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14513  if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14514   $as_echo_n "(cached) " >&6
14515 else
14516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14517 /* end confdefs.h.  */
14518
14519 #define _SYSCALL32
14520 /* Needed for new procfs interface on sparc-solaris.  */
14521 #define _STRUCTURED_PROC 1
14522 #include <sys/procfs.h>
14523 int
14524 main ()
14525 {
14526 prgregset_t avar
14527   ;
14528   return 0;
14529 }
14530 _ACEOF
14531 if ac_fn_c_try_compile "$LINENO"; then :
14532   bfd_cv_have_sys_procfs_type_prgregset_t=yes
14533 else
14534   bfd_cv_have_sys_procfs_type_prgregset_t=no
14535
14536 fi
14537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14538 fi
14539
14540  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14541
14542 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14543
14544  fi
14545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14546 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14547
14548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14549 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14550  if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
14551   $as_echo_n "(cached) " >&6
14552 else
14553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14554 /* end confdefs.h.  */
14555
14556 #define _SYSCALL32
14557 /* Needed for new procfs interface on sparc-solaris.  */
14558 #define _STRUCTURED_PROC 1
14559 #include <sys/procfs.h>
14560 int
14561 main ()
14562 {
14563 prfpregset_t avar
14564   ;
14565   return 0;
14566 }
14567 _ACEOF
14568 if ac_fn_c_try_compile "$LINENO"; then :
14569   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14570 else
14571   bfd_cv_have_sys_procfs_type_prfpregset_t=no
14572
14573 fi
14574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14575 fi
14576
14577  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14578
14579 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14580
14581  fi
14582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14583 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14584
14585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14586 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14587  if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14588   $as_echo_n "(cached) " >&6
14589 else
14590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14591 /* end confdefs.h.  */
14592
14593 #define _SYSCALL32
14594 /* Needed for new procfs interface on sparc-solaris.  */
14595 #define _STRUCTURED_PROC 1
14596 #include <sys/procfs.h>
14597 int
14598 main ()
14599 {
14600 prgregset32_t avar
14601   ;
14602   return 0;
14603 }
14604 _ACEOF
14605 if ac_fn_c_try_compile "$LINENO"; then :
14606   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14607 else
14608   bfd_cv_have_sys_procfs_type_prgregset32_t=no
14609
14610 fi
14611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14612 fi
14613
14614  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14615
14616 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14617
14618  fi
14619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14620 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14621
14622   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14623 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14624  if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
14625   $as_echo_n "(cached) " >&6
14626 else
14627   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628 /* end confdefs.h.  */
14629
14630 #define _SYSCALL32
14631 /* Needed for new procfs interface on sparc-solaris.  */
14632 #define _STRUCTURED_PROC 1
14633 #include <sys/procfs.h>
14634 int
14635 main ()
14636 {
14637 lwpid_t avar
14638   ;
14639   return 0;
14640 }
14641 _ACEOF
14642 if ac_fn_c_try_compile "$LINENO"; then :
14643   bfd_cv_have_sys_procfs_type_lwpid_t=yes
14644 else
14645   bfd_cv_have_sys_procfs_type_lwpid_t=no
14646
14647 fi
14648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14649 fi
14650
14651  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14652
14653 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14654
14655  fi
14656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14657 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14658
14659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14660 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14661  if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
14662   $as_echo_n "(cached) " >&6
14663 else
14664   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14665 /* end confdefs.h.  */
14666
14667 #define _SYSCALL32
14668 /* Needed for new procfs interface on sparc-solaris.  */
14669 #define _STRUCTURED_PROC 1
14670 #include <sys/procfs.h>
14671 int
14672 main ()
14673 {
14674 psaddr_t avar
14675   ;
14676   return 0;
14677 }
14678 _ACEOF
14679 if ac_fn_c_try_compile "$LINENO"; then :
14680   bfd_cv_have_sys_procfs_type_psaddr_t=yes
14681 else
14682   bfd_cv_have_sys_procfs_type_psaddr_t=no
14683
14684 fi
14685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14686 fi
14687
14688  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14689
14690 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14691
14692  fi
14693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14694 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14695
14696
14697
14698
14699   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14700     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14701 $as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14702     if ${gdb_cv_prfpregset_t_broken+:} false; then :
14703   $as_echo_n "(cached) " >&6
14704 else
14705   if test "$cross_compiling" = yes; then :
14706   gdb_cv_prfpregset_t_broken=yes
14707 else
14708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14709 /* end confdefs.h.  */
14710 #include <sys/procfs.h>
14711        int main ()
14712        {
14713          if (sizeof (prfpregset_t) == sizeof (void *))
14714            return 1;
14715          return 0;
14716        }
14717 _ACEOF
14718 if ac_fn_c_try_run "$LINENO"; then :
14719   gdb_cv_prfpregset_t_broken=no
14720 else
14721   gdb_cv_prfpregset_t_broken=yes
14722 fi
14723 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14724   conftest.$ac_objext conftest.beam conftest.$ac_ext
14725 fi
14726
14727 fi
14728
14729     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14730 $as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
14731     if test $gdb_cv_prfpregset_t_broken = yes; then
14732
14733 $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
14734
14735     fi
14736   fi
14737 fi
14738
14739 # Check if the compiler supports the `long long' type.
14740
14741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14742 $as_echo_n "checking for long long support in compiler... " >&6; }
14743 if ${gdb_cv_c_long_long+:} false; then :
14744   $as_echo_n "(cached) " >&6
14745 else
14746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14747 /* end confdefs.h.  */
14748 extern long long foo;
14749 int
14750 main ()
14751 {
14752 switch (foo & 2) { case 0: return 1; }
14753   ;
14754   return 0;
14755 }
14756 _ACEOF
14757 if ac_fn_c_try_compile "$LINENO"; then :
14758   gdb_cv_c_long_long=yes
14759 else
14760   gdb_cv_c_long_long=no
14761 fi
14762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14763 fi
14764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14765 $as_echo "$gdb_cv_c_long_long" >&6; }
14766 if test $gdb_cv_c_long_long != yes; then
14767   # libdecnumber requires long long.
14768   as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
14769 fi
14770
14771 # Check if the compiler and runtime support printing long longs.
14772
14773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14774 $as_echo_n "checking for long long support in printf... " >&6; }
14775 if ${gdb_cv_printf_has_long_long+:} false; then :
14776   $as_echo_n "(cached) " >&6
14777 else
14778   if test "$cross_compiling" = yes; then :
14779   gdb_cv_printf_has_long_long=no
14780 else
14781   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14782 /* end confdefs.h.  */
14783 $ac_includes_default
14784 int
14785 main ()
14786 {
14787 char buf[32];
14788   long long l = 0;
14789   l = (l << 16) + 0x0123;
14790   l = (l << 16) + 0x4567;
14791   l = (l << 16) + 0x89ab;
14792   l = (l << 16) + 0xcdef;
14793   sprintf (buf, "0x%016llx", l);
14794   return (strcmp ("0x0123456789abcdef", buf));
14795   ;
14796   return 0;
14797 }
14798 _ACEOF
14799 if ac_fn_c_try_run "$LINENO"; then :
14800   gdb_cv_printf_has_long_long=yes
14801 else
14802   gdb_cv_printf_has_long_long=no
14803 fi
14804 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14805   conftest.$ac_objext conftest.beam conftest.$ac_ext
14806 fi
14807
14808 fi
14809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14810 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
14811 if test $gdb_cv_printf_has_long_long = yes; then
14812
14813 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
14814
14815 fi
14816
14817 # Check if the compiler and runtime support printing decfloats.
14818
14819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14820 $as_echo_n "checking for decfloat support in printf... " >&6; }
14821 if ${gdb_cv_printf_has_decfloat+:} false; then :
14822   $as_echo_n "(cached) " >&6
14823 else
14824   if test "$cross_compiling" = yes; then :
14825   gdb_cv_printf_has_decfloat=no
14826 else
14827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14828 /* end confdefs.h.  */
14829 $ac_includes_default
14830 int
14831 main ()
14832 {
14833 char buf[64];
14834   _Decimal32 d32 = 1.2345df;
14835   _Decimal64 d64 = 1.2345dd;
14836   _Decimal128 d128 = 1.2345dl;
14837   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14838   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14839   ;
14840   return 0;
14841 }
14842 _ACEOF
14843 if ac_fn_c_try_run "$LINENO"; then :
14844   gdb_cv_printf_has_decfloat=yes
14845 else
14846   gdb_cv_printf_has_decfloat=no
14847 fi
14848 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14849   conftest.$ac_objext conftest.beam conftest.$ac_ext
14850 fi
14851
14852 fi
14853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14854 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
14855 if test $gdb_cv_printf_has_decfloat = yes; then
14856
14857 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
14858
14859 fi
14860
14861 # Check if the compiler supports the `long double' type.  We can't use
14862 # AC_C_LONG_DOUBLE because that one does additional checks on the
14863 # constants defined in <float.h> that fail on some systems,
14864 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
14865
14866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14867 $as_echo_n "checking for long double support in compiler... " >&6; }
14868 if ${gdb_cv_c_long_double+:} false; then :
14869   $as_echo_n "(cached) " >&6
14870 else
14871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14872 /* end confdefs.h.  */
14873 long double foo;
14874 _ACEOF
14875 if ac_fn_c_try_compile "$LINENO"; then :
14876   gdb_cv_c_long_double=yes
14877 else
14878   gdb_cv_c_long_double=no
14879 fi
14880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14881 fi
14882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14883 $as_echo "$gdb_cv_c_long_double" >&6; }
14884 if test $gdb_cv_c_long_double = yes; then
14885
14886 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
14887
14888 fi
14889
14890 # Check if the compiler and runtime support printing long doubles.
14891
14892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14893 $as_echo_n "checking for long double support in printf... " >&6; }
14894 if ${gdb_cv_printf_has_long_double+:} false; then :
14895   $as_echo_n "(cached) " >&6
14896 else
14897   if test "$cross_compiling" = yes; then :
14898   gdb_cv_printf_has_long_double=no
14899 else
14900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14901 /* end confdefs.h.  */
14902 $ac_includes_default
14903 int
14904 main ()
14905 {
14906 char buf[16];
14907   long double f = 3.141592653;
14908   sprintf (buf, "%Lg", f);
14909   return (strncmp ("3.14159", buf, 7));
14910   ;
14911   return 0;
14912 }
14913 _ACEOF
14914 if ac_fn_c_try_run "$LINENO"; then :
14915   gdb_cv_printf_has_long_double=yes
14916 else
14917   gdb_cv_printf_has_long_double=no
14918 fi
14919 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14920   conftest.$ac_objext conftest.beam conftest.$ac_ext
14921 fi
14922
14923 fi
14924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14925 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
14926 if test $gdb_cv_printf_has_long_double = yes; then
14927
14928 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
14929
14930 fi
14931
14932 # Check if the compiler and runtime support scanning long doubles.
14933
14934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14935 $as_echo_n "checking for long double support in scanf... " >&6; }
14936 if ${gdb_cv_scanf_has_long_double+:} false; then :
14937   $as_echo_n "(cached) " >&6
14938 else
14939   if test "$cross_compiling" = yes; then :
14940   gdb_cv_scanf_has_long_double=no
14941 else
14942   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14943 /* end confdefs.h.  */
14944 #include <stdio.h>
14945 int
14946 main ()
14947 {
14948 char *buf = "3.141592653";
14949   long double f = 0;
14950   sscanf (buf, "%Lg", &f);
14951   return !(f > 3.14159 && f < 3.14160);
14952   ;
14953   return 0;
14954 }
14955 _ACEOF
14956 if ac_fn_c_try_run "$LINENO"; then :
14957   gdb_cv_scanf_has_long_double=yes
14958 else
14959   gdb_cv_scanf_has_long_double=no
14960 fi
14961 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14962   conftest.$ac_objext conftest.beam conftest.$ac_ext
14963 fi
14964
14965 fi
14966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14967 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
14968 if test $gdb_cv_scanf_has_long_double = yes; then
14969
14970 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
14971
14972 fi
14973
14974 case ${host_os} in
14975 aix*)
14976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14977 $as_echo_n "checking for -bbigtoc option... " >&6; }
14978 if ${gdb_cv_bigtoc+:} false; then :
14979   $as_echo_n "(cached) " >&6
14980 else
14981
14982     SAVE_LDFLAGS=$LDFLAGS
14983
14984     case $GCC in
14985     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14986     *) gdb_cv_bigtoc=-bbigtoc ;;
14987     esac
14988
14989     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
14990     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14991 /* end confdefs.h.  */
14992
14993 int
14994 main ()
14995 {
14996 int i;
14997   ;
14998   return 0;
14999 }
15000 _ACEOF
15001 if ac_fn_c_try_link "$LINENO"; then :
15002
15003 else
15004   gdb_cv_bigtoc=
15005 fi
15006 rm -f core conftest.err conftest.$ac_objext \
15007     conftest$ac_exeext conftest.$ac_ext
15008     LDFLAGS="${SAVE_LDFLAGS}"
15009
15010 fi
15011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15012 $as_echo "$gdb_cv_bigtoc" >&6; }
15013   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15014   ;;
15015 esac
15016
15017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
15018 $as_echo_n "checking for the dynamic export flag... " >&6; }
15019 dynamic_list=false
15020 if test "${gdb_native}" = yes; then
15021    # The dynamically loaded libthread_db needs access to symbols in the gdb
15022    # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
15023    # may not be supported there.
15024    old_LDFLAGS="$LDFLAGS"
15025    # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15026    RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15027    LDFLAGS="$LDFLAGS $RDYNAMIC"
15028    if test "${have_libpython}" = no; then
15029      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15030 /* end confdefs.h.  */
15031
15032 int
15033 main ()
15034 {
15035
15036   ;
15037   return 0;
15038 }
15039 _ACEOF
15040 if ac_fn_c_try_link "$LINENO"; then :
15041   dynamic_list=true
15042 fi
15043 rm -f core conftest.err conftest.$ac_objext \
15044     conftest$ac_exeext conftest.$ac_ext
15045    else
15046      # Workaround http://bugs.python.org/issue4434 where static
15047      # libpythonX.Y.a would get its symbols required for
15048      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15049      # Problem does not happen for the recommended libpythonX.Y.so linkage.
15050
15051      # Note the workaround for Python
15052      # http://bugs.python.org/issue10112 earlier has removed
15053      # -export-dynamic from PYTHON_LIBS.  That's exactly what we want
15054      # here too, as otherwise it'd make this -Wl,--dynamic-list test
15055      # always pass.
15056      old_CFLAGS="$CFLAGS"
15057      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
15058      old_LIBS="$LIBS"
15059      LIBS="$LIBS $PYTHON_LIBS"
15060      old_CPPFLAGS="$CPPFLAGS"
15061      CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
15062      if test "$cross_compiling" = yes; then :
15063   true
15064 else
15065   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15066 /* end confdefs.h.  */
15067 #include "Python.h"
15068 int
15069 main ()
15070 {
15071 int err;
15072           Py_Initialize ();
15073           err = PyRun_SimpleString ("import itertools\n");
15074           Py_Finalize ();
15075           return err == 0 ? 0 : 1;
15076   ;
15077   return 0;
15078 }
15079 _ACEOF
15080 if ac_fn_c_try_run "$LINENO"; then :
15081   dynamic_list=true
15082 fi
15083 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15084   conftest.$ac_objext conftest.beam conftest.$ac_ext
15085 fi
15086
15087      LIBS="$old_LIBS"
15088      CFLAGS="$old_CFLAGS"
15089      CPPFLAGS="$old_CPPFLAGS"
15090    fi
15091    LDFLAGS="$old_LDFLAGS"
15092 fi
15093 if $dynamic_list; then
15094   found="-Wl,--dynamic-list"
15095   RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
15096 else
15097   found="-rdynamic"
15098   RDYNAMIC="-rdynamic"
15099 fi
15100
15101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
15102 $as_echo "$found" >&6; }
15103
15104
15105 if test ${build} = ${host} -a ${host} = ${target} ; then
15106    case ${host_os} in
15107    aix*)
15108       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15109 $as_echo_n "checking for AiX thread debugging library... " >&6; }
15110       if ${gdb_cv_have_aix_thread_debug+:} false; then :
15111   $as_echo_n "(cached) " >&6
15112 else
15113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15114 /* end confdefs.h.  */
15115 #include <sys/pthdebug.h>
15116 int
15117 main ()
15118 {
15119 #ifndef PTHDB_VERSION_3
15120                                     #error
15121                                     #endif
15122   ;
15123   return 0;
15124 }
15125 _ACEOF
15126 if ac_fn_c_try_compile "$LINENO"; then :
15127   gdb_cv_have_aix_thread_debug=yes
15128 else
15129   gdb_cv_have_aix_thread_debug=no
15130 fi
15131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15132 fi
15133
15134       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15135 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
15136       if test $gdb_cv_have_aix_thread_debug = yes; then
15137          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
15138          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
15139          LIBS="$LIBS -lpthdebug"
15140
15141          # Older versions of AIX do not provide the declaration for
15142          # the getthrds function (it appears that it was introduced
15143          # with AIX 6.x).
15144          ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15145 "
15146 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
15147   ac_have_decl=1
15148 else
15149   ac_have_decl=0
15150 fi
15151
15152 cat >>confdefs.h <<_ACEOF
15153 #define HAVE_DECL_GETTHRDS $ac_have_decl
15154 _ACEOF
15155
15156       fi
15157       ;;
15158    esac
15159
15160 fi
15161
15162 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
15163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15164 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15165 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
15166   $as_echo_n "(cached) " >&6
15167 else
15168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15169 /* end confdefs.h.  */
15170 #include <thread_db.h>
15171 int
15172 main ()
15173 {
15174 int i = TD_NOTALLOC;
15175   ;
15176   return 0;
15177 }
15178 _ACEOF
15179 if ac_fn_c_try_compile "$LINENO"; then :
15180   gdb_cv_thread_db_h_has_td_notalloc=yes
15181 else
15182   gdb_cv_thread_db_h_has_td_notalloc=no
15183
15184 fi
15185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15186
15187 fi
15188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15189 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15191 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
15192 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
15193   $as_echo_n "(cached) " >&6
15194 else
15195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15196 /* end confdefs.h.  */
15197 #include <thread_db.h>
15198 int
15199 main ()
15200 {
15201 int i = TD_VERSION;
15202   ;
15203   return 0;
15204 }
15205 _ACEOF
15206 if ac_fn_c_try_compile "$LINENO"; then :
15207   gdb_cv_thread_db_h_has_td_version=yes
15208 else
15209   gdb_cv_thread_db_h_has_td_version=no
15210
15211 fi
15212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15213
15214 fi
15215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15216 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15218 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
15219 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
15220   $as_echo_n "(cached) " >&6
15221 else
15222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15223 /* end confdefs.h.  */
15224 #include <thread_db.h>
15225 int
15226 main ()
15227 {
15228 int i = TD_NOTLS;
15229   ;
15230   return 0;
15231 }
15232 _ACEOF
15233 if ac_fn_c_try_compile "$LINENO"; then :
15234   gdb_cv_thread_db_h_has_td_notls=yes
15235 else
15236   gdb_cv_thread_db_h_has_td_notls=no
15237
15238 fi
15239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15240
15241 fi
15242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15243 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
15244 fi
15245 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
15246
15247 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
15248
15249 fi
15250 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15251
15252 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
15253
15254 fi
15255 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15256
15257 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
15258
15259 fi
15260
15261 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15262 "
15263 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
15264   ac_have_decl=1
15265 else
15266   ac_have_decl=0
15267 fi
15268
15269 cat >>confdefs.h <<_ACEOF
15270 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
15271 _ACEOF
15272
15273
15274 if test "$cross_compiling" = yes; then :
15275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15276 /* end confdefs.h.  */
15277 #include <sys/personality.h>
15278 int
15279 main ()
15280 {
15281
15282 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
15283 #       define ADDR_NO_RANDOMIZE 0x0040000
15284 #      endif
15285        /* Test the flag could be set and stays set.  */
15286        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15287        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15288            return 1
15289   ;
15290   return 0;
15291 }
15292 _ACEOF
15293 if ac_fn_c_try_link "$LINENO"; then :
15294   have_personality=true
15295 else
15296   have_personality=false
15297 fi
15298 rm -f core conftest.err conftest.$ac_objext \
15299     conftest$ac_exeext conftest.$ac_ext
15300 else
15301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15302 /* end confdefs.h.  */
15303 #include <sys/personality.h>
15304 int
15305 main ()
15306 {
15307
15308 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
15309 #       define ADDR_NO_RANDOMIZE 0x0040000
15310 #      endif
15311        /* Test the flag could be set and stays set.  */
15312        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15313        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15314            return 1
15315   ;
15316   return 0;
15317 }
15318 _ACEOF
15319 if ac_fn_c_try_run "$LINENO"; then :
15320   have_personality=true
15321 else
15322   have_personality=false
15323 fi
15324 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15325   conftest.$ac_objext conftest.beam conftest.$ac_ext
15326 fi
15327
15328 if $have_personality
15329 then
15330
15331 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
15332
15333 fi
15334
15335 case $host_os in
15336   go32* | *djgpp*)
15337     gdbinit=gdb.ini
15338     ;;
15339   *)
15340     gdbinit=.gdbinit
15341     ;;
15342 esac
15343
15344 cat >>confdefs.h <<_ACEOF
15345 #define GDBINIT "$gdbinit"
15346 _ACEOF
15347
15348
15349
15350 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15351 # except that the argument to --with-sysroot is optional.
15352 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15353 if test "x$with_sysroot" = xyes; then
15354   with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15355 fi
15356
15357 # Check whether --with-sysroot was given.
15358 if test "${with_sysroot+set}" = set; then :
15359   withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15360 else
15361   TARGET_SYSTEM_ROOT=
15362 fi
15363
15364
15365   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15366   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15367   ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15368   ac_define_dir=`eval echo $ac_define_dir`
15369
15370 cat >>confdefs.h <<_ACEOF
15371 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
15372 _ACEOF
15373
15374
15375
15376
15377   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15378      if test "x$prefix" = xNONE; then
15379         test_prefix=/usr/local
15380      else
15381         test_prefix=$prefix
15382      fi
15383   else
15384      test_prefix=$exec_prefix
15385   fi
15386   value=0
15387   case ${ac_define_dir} in
15388      "${test_prefix}"|"${test_prefix}/"*|\
15389         '${exec_prefix}'|'${exec_prefix}/'*)
15390      value=1
15391      ;;
15392   esac
15393
15394 cat >>confdefs.h <<_ACEOF
15395 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15396 _ACEOF
15397
15398
15399
15400
15401
15402 # Check whether --with-system-gdbinit was given.
15403 if test "${with_system_gdbinit+set}" = set; then :
15404   withval=$with_system_gdbinit;
15405     SYSTEM_GDBINIT=$withval
15406 else
15407   SYSTEM_GDBINIT=
15408 fi
15409
15410
15411   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15412   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15413   ac_define_dir=`eval echo $SYSTEM_GDBINIT`
15414   ac_define_dir=`eval echo $ac_define_dir`
15415
15416 cat >>confdefs.h <<_ACEOF
15417 #define SYSTEM_GDBINIT "$ac_define_dir"
15418 _ACEOF
15419
15420
15421
15422
15423   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15424      if test "x$prefix" = xNONE; then
15425         test_prefix=/usr/local
15426      else
15427         test_prefix=$prefix
15428      fi
15429   else
15430      test_prefix=$exec_prefix
15431   fi
15432   value=0
15433   case ${ac_define_dir} in
15434      "${test_prefix}"|"${test_prefix}/"*|\
15435         '${exec_prefix}'|'${exec_prefix}/'*)
15436      value=1
15437      ;;
15438   esac
15439
15440 cat >>confdefs.h <<_ACEOF
15441 #define SYSTEM_GDBINIT_RELOCATABLE $value
15442 _ACEOF
15443
15444
15445
15446
15447
15448 # Check whether --enable-werror was given.
15449 if test "${enable_werror+set}" = set; then :
15450   enableval=$enable_werror; case "${enableval}" in
15451      yes | y) ERROR_ON_WARNING="yes" ;;
15452      no | n)  ERROR_ON_WARNING="no" ;;
15453      *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
15454    esac
15455 fi
15456
15457
15458 # Enable -Werror by default when using gcc.  Turn it off for releases.
15459 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
15460     ERROR_ON_WARNING=yes
15461 fi
15462
15463 WERROR_CFLAGS=""
15464 if test "${ERROR_ON_WARNING}" = yes ; then
15465     WERROR_CFLAGS="-Werror"
15466 fi
15467
15468 # The options we'll try to enable.
15469 build_warnings="-Wall -Wpointer-arith \
15470 -Wno-unused -Wunused-value -Wunused-function \
15471 -Wno-switch -Wno-char-subscripts \
15472 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
15473 -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
15474 -Wno-mismatched-tags \
15475 -Wno-error=deprecated-register \
15476 -Wsuggest-override \
15477 -Wimplicit-fallthrough=3 \
15478 -Wduplicated-cond"
15479
15480 case "${host}" in
15481   *-*-mingw32*)
15482     # Enable -Wno-format by default when using gcc on mingw since many
15483     # GCC versions complain about %I64.
15484     build_warnings="$build_warnings -Wno-format" ;;
15485   *-*-solaris*)
15486     # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15487     # doesn't understand.
15488     build_warnings="$build_warnings -Wno-unknown-pragmas"
15489     # Solaris 11 <unistd.h> marks vfork deprecated.
15490     build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
15491   *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
15492 esac
15493
15494 # Check whether --enable-build-warnings was given.
15495 if test "${enable_build_warnings+set}" = set; then :
15496   enableval=$enable_build_warnings; case "${enableval}" in
15497   yes)  ;;
15498   no)   build_warnings="-w";;
15499   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15500         build_warnings="${build_warnings} ${t}";;
15501   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15502         build_warnings="${t} ${build_warnings}";;
15503   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15504 esac
15505 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15506   echo "Setting compiler warning flags = $build_warnings" 6>&1
15507 fi
15508 fi
15509 # Check whether --enable-gdb-build-warnings was given.
15510 if test "${enable_gdb_build_warnings+set}" = set; then :
15511   enableval=$enable_gdb_build_warnings; case "${enableval}" in
15512   yes)  ;;
15513   no)   build_warnings="-w";;
15514   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15515         build_warnings="${build_warnings} ${t}";;
15516   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15517         build_warnings="${t} ${build_warnings}";;
15518   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15519 esac
15520 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15521   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15522 fi
15523 fi
15524
15525 # The set of warnings supported by a C++ compiler is not the same as
15526 # of the C compiler.
15527 ac_ext=cpp
15528 ac_cpp='$CXXCPP $CPPFLAGS'
15529 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15530 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15531 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15532
15533
15534 WARN_CFLAGS=""
15535 if test "x${build_warnings}" != x -a "x$GCC" = xyes
15536 then
15537     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15538 $as_echo_n "checking compiler warning flags... " >&6; }
15539     # Separate out the -Werror flag as some files just cannot be
15540     # compiled with it enabled.
15541     for w in ${build_warnings}; do
15542         # GCC does not complain about -Wno-unknown-warning.  Invert
15543         # and test -Wunknown-warning instead.
15544         case $w in
15545         -Wno-*)
15546                 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15547         *)
15548                 wtest=$w ;;
15549         esac
15550
15551         case $w in
15552         -Werr*) WERROR_CFLAGS=-Werror ;;
15553         *)
15554             # Check whether GCC accepts it.
15555             saved_CFLAGS="$CFLAGS"
15556             CFLAGS="$CFLAGS -Werror $wtest"
15557             saved_CXXFLAGS="$CXXFLAGS"
15558             CXXFLAGS="$CXXFLAGS -Werror $wtest"
15559             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15560 /* end confdefs.h.  */
15561
15562 int
15563 main ()
15564 {
15565
15566   ;
15567   return 0;
15568 }
15569 _ACEOF
15570 if ac_fn_cxx_try_compile "$LINENO"; then :
15571   WARN_CFLAGS="${WARN_CFLAGS} $w"
15572 fi
15573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15574             CFLAGS="$saved_CFLAGS"
15575             CXXFLAGS="$saved_CXXFLAGS"
15576         esac
15577     done
15578     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15579 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
15580 fi
15581
15582
15583
15584 ac_ext=c
15585 ac_cpp='$CPP $CPPFLAGS'
15586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15589
15590
15591
15592 # In the Cygwin environment, we need some additional flags.
15593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15594 $as_echo_n "checking for cygwin... " >&6; }
15595 if ${gdb_cv_os_cygwin+:} false; then :
15596   $as_echo_n "(cached) " >&6
15597 else
15598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15599 /* end confdefs.h.  */
15600
15601 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
15602 lose
15603 #endif
15604 _ACEOF
15605 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15606   $EGREP "^lose$" >/dev/null 2>&1; then :
15607   gdb_cv_os_cygwin=yes
15608 else
15609   gdb_cv_os_cygwin=no
15610 fi
15611 rm -f conftest*
15612
15613 fi
15614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15615 $as_echo "$gdb_cv_os_cygwin" >&6; }
15616
15617
15618 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
15619 case ${host} in
15620   *go32* ) SER_HARDWIRE=ser-go32.o ;;
15621   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
15622   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
15623 esac
15624
15625
15626 # libreadline needs libuser32.a in a cygwin environment
15627 WIN32LIBS=
15628 if test x$gdb_cv_os_cygwin = xyes; then
15629     WIN32LIBS="-luser32"
15630     case "${target}" in
15631         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15632         ;;
15633     esac
15634 fi
15635
15636 # The ser-tcp.c module requires sockets.
15637 case ${host} in
15638   *mingw32*)
15639
15640 $as_echo "#define USE_WIN32API 1" >>confdefs.h
15641
15642     WIN32LIBS="$WIN32LIBS -lws2_32"
15643     ;;
15644 esac
15645
15646
15647 # Add ELF support to GDB, but only if BFD includes ELF support.
15648
15649   OLD_CFLAGS=$CFLAGS
15650   OLD_LDFLAGS=$LDFLAGS
15651   OLD_LIBS=$LIBS
15652   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15653   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15654   # always want our bfd.
15655   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15656   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15657   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15658   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15659   LIBS="-lbfd -liberty -lz $intl $LIBS"
15660   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15661 $as_echo_n "checking for ELF support in BFD... " >&6; }
15662 if ${gdb_cv_var_elf+:} false; then :
15663   $as_echo_n "(cached) " >&6
15664 else
15665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15666 /* end confdefs.h.  */
15667 #include <stdlib.h>
15668   #include "bfd.h"
15669   #include "elf-bfd.h"
15670
15671 int
15672 main ()
15673 {
15674 return bfd_get_elf_phdr_upper_bound (NULL);
15675   ;
15676   return 0;
15677 }
15678 _ACEOF
15679 if ac_fn_c_try_link "$LINENO"; then :
15680   gdb_cv_var_elf=yes
15681 else
15682   gdb_cv_var_elf=no
15683 fi
15684 rm -f core conftest.err conftest.$ac_objext \
15685     conftest$ac_exeext conftest.$ac_ext
15686 fi
15687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15688 $as_echo "$gdb_cv_var_elf" >&6; }
15689   CFLAGS=$OLD_CFLAGS
15690   LDFLAGS=$OLD_LDFLAGS
15691   LIBS=$OLD_LIBS
15692 if test $gdb_cv_var_elf = yes; then
15693   CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
15694
15695 $as_echo "#define HAVE_ELF 1" >>confdefs.h
15696
15697   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15698   if test "$plugins" = "yes"; then
15699     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15700 $as_echo_n "checking for library containing dlopen... " >&6; }
15701 if ${ac_cv_search_dlopen+:} false; then :
15702   $as_echo_n "(cached) " >&6
15703 else
15704   ac_func_search_save_LIBS=$LIBS
15705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15706 /* end confdefs.h.  */
15707
15708 /* Override any GCC internal prototype to avoid an error.
15709    Use char because int might match the return type of a GCC
15710    builtin and then its argument prototype would still apply.  */
15711 #ifdef __cplusplus
15712 extern "C"
15713 #endif
15714 char dlopen ();
15715 int
15716 main ()
15717 {
15718 return dlopen ();
15719   ;
15720   return 0;
15721 }
15722 _ACEOF
15723 for ac_lib in '' dl; do
15724   if test -z "$ac_lib"; then
15725     ac_res="none required"
15726   else
15727     ac_res=-l$ac_lib
15728     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15729   fi
15730   if ac_fn_c_try_link "$LINENO"; then :
15731   ac_cv_search_dlopen=$ac_res
15732 fi
15733 rm -f core conftest.err conftest.$ac_objext \
15734     conftest$ac_exeext
15735   if ${ac_cv_search_dlopen+:} false; then :
15736   break
15737 fi
15738 done
15739 if ${ac_cv_search_dlopen+:} false; then :
15740
15741 else
15742   ac_cv_search_dlopen=no
15743 fi
15744 rm conftest.$ac_ext
15745 LIBS=$ac_func_search_save_LIBS
15746 fi
15747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15748 $as_echo "$ac_cv_search_dlopen" >&6; }
15749 ac_res=$ac_cv_search_dlopen
15750 if test "$ac_res" != no; then :
15751   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15752
15753 fi
15754
15755   fi
15756 fi
15757
15758 # Add macho support to GDB, but only if BFD includes it.
15759
15760   OLD_CFLAGS=$CFLAGS
15761   OLD_LDFLAGS=$LDFLAGS
15762   OLD_LIBS=$LIBS
15763   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15764   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15765   # always want our bfd.
15766   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15767   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15768   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15769   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15770   LIBS="-lbfd -liberty -lz $intl $LIBS"
15771   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15772 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
15773 if ${gdb_cv_var_macho+:} false; then :
15774   $as_echo_n "(cached) " >&6
15775 else
15776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15777 /* end confdefs.h.  */
15778 #include <stdlib.h>
15779   #include "bfd.h"
15780   #include "mach-o.h"
15781
15782 int
15783 main ()
15784 {
15785 return bfd_mach_o_lookup_command (NULL, 0, NULL);
15786   ;
15787   return 0;
15788 }
15789 _ACEOF
15790 if ac_fn_c_try_link "$LINENO"; then :
15791   gdb_cv_var_macho=yes
15792 else
15793   gdb_cv_var_macho=no
15794 fi
15795 rm -f core conftest.err conftest.$ac_objext \
15796     conftest$ac_exeext conftest.$ac_ext
15797 fi
15798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15799 $as_echo "$gdb_cv_var_macho" >&6; }
15800   CFLAGS=$OLD_CFLAGS
15801   LDFLAGS=$OLD_LDFLAGS
15802   LIBS=$OLD_LIBS
15803 if test $gdb_cv_var_macho = yes; then
15804   CONFIG_OBS="$CONFIG_OBS machoread.o"
15805 fi
15806
15807 # Add any host-specific objects to GDB.
15808 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15809
15810 # If building on ELF, look for lzma support for embedded compressed debug info.
15811 if test $gdb_cv_var_elf = yes; then
15812
15813 # Check whether --with-lzma was given.
15814 if test "${with_lzma+set}" = set; then :
15815   withval=$with_lzma;
15816 else
15817   with_lzma=auto
15818 fi
15819
15820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15821 $as_echo_n "checking whether to use lzma... " >&6; }
15822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15823 $as_echo "$with_lzma" >&6; }
15824
15825   if test "${with_lzma}" != no; then
15826
15827
15828
15829
15830
15831
15832
15833
15834     use_additional=yes
15835
15836   acl_save_prefix="$prefix"
15837   prefix="$acl_final_prefix"
15838   acl_save_exec_prefix="$exec_prefix"
15839   exec_prefix="$acl_final_exec_prefix"
15840
15841     eval additional_includedir=\"$includedir\"
15842     eval additional_libdir=\"$libdir\"
15843
15844   exec_prefix="$acl_save_exec_prefix"
15845   prefix="$acl_save_prefix"
15846
15847
15848 # Check whether --with-liblzma-prefix was given.
15849 if test "${with_liblzma_prefix+set}" = set; then :
15850   withval=$with_liblzma_prefix;
15851     if test "X$withval" = "Xno"; then
15852       use_additional=no
15853     else
15854       if test "X$withval" = "X"; then
15855
15856   acl_save_prefix="$prefix"
15857   prefix="$acl_final_prefix"
15858   acl_save_exec_prefix="$exec_prefix"
15859   exec_prefix="$acl_final_exec_prefix"
15860
15861           eval additional_includedir=\"$includedir\"
15862           eval additional_libdir=\"$libdir\"
15863
15864   exec_prefix="$acl_save_exec_prefix"
15865   prefix="$acl_save_prefix"
15866
15867       else
15868         additional_includedir="$withval/include"
15869         additional_libdir="$withval/lib"
15870       fi
15871     fi
15872
15873 fi
15874
15875       LIBLZMA=
15876   LTLIBLZMA=
15877   INCLZMA=
15878   rpathdirs=
15879   ltrpathdirs=
15880   names_already_handled=
15881   names_next_round='lzma '
15882   while test -n "$names_next_round"; do
15883     names_this_round="$names_next_round"
15884     names_next_round=
15885     for name in $names_this_round; do
15886       already_handled=
15887       for n in $names_already_handled; do
15888         if test "$n" = "$name"; then
15889           already_handled=yes
15890           break
15891         fi
15892       done
15893       if test -z "$already_handled"; then
15894         names_already_handled="$names_already_handled $name"
15895                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15896         eval value=\"\$HAVE_LIB$uppername\"
15897         if test -n "$value"; then
15898           if test "$value" = yes; then
15899             eval value=\"\$LIB$uppername\"
15900             test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15901             eval value=\"\$LTLIB$uppername\"
15902             test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15903           else
15904                                     :
15905           fi
15906         else
15907                               found_dir=
15908           found_la=
15909           found_so=
15910           found_a=
15911           if test $use_additional = yes; then
15912             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15913               found_dir="$additional_libdir"
15914               found_so="$additional_libdir/lib$name.$shlibext"
15915               if test -f "$additional_libdir/lib$name.la"; then
15916                 found_la="$additional_libdir/lib$name.la"
15917               fi
15918             else
15919               if test -f "$additional_libdir/lib$name.$libext"; then
15920                 found_dir="$additional_libdir"
15921                 found_a="$additional_libdir/lib$name.$libext"
15922                 if test -f "$additional_libdir/lib$name.la"; then
15923                   found_la="$additional_libdir/lib$name.la"
15924                 fi
15925               fi
15926             fi
15927           fi
15928           if test "X$found_dir" = "X"; then
15929             for x in $LDFLAGS $LTLIBLZMA; do
15930
15931   acl_save_prefix="$prefix"
15932   prefix="$acl_final_prefix"
15933   acl_save_exec_prefix="$exec_prefix"
15934   exec_prefix="$acl_final_exec_prefix"
15935   eval x=\"$x\"
15936   exec_prefix="$acl_save_exec_prefix"
15937   prefix="$acl_save_prefix"
15938
15939               case "$x" in
15940                 -L*)
15941                   dir=`echo "X$x" | sed -e 's/^X-L//'`
15942                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15943                     found_dir="$dir"
15944                     found_so="$dir/lib$name.$shlibext"
15945                     if test -f "$dir/lib$name.la"; then
15946                       found_la="$dir/lib$name.la"
15947                     fi
15948                   else
15949                     if test -f "$dir/lib$name.$libext"; then
15950                       found_dir="$dir"
15951                       found_a="$dir/lib$name.$libext"
15952                       if test -f "$dir/lib$name.la"; then
15953                         found_la="$dir/lib$name.la"
15954                       fi
15955                     fi
15956                   fi
15957                   ;;
15958               esac
15959               if test "X$found_dir" != "X"; then
15960                 break
15961               fi
15962             done
15963           fi
15964           if test "X$found_dir" != "X"; then
15965                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15966             if test "X$found_so" != "X"; then
15967                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15968                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15969               else
15970                                                                                 haveit=
15971                 for x in $ltrpathdirs; do
15972                   if test "X$x" = "X$found_dir"; then
15973                     haveit=yes
15974                     break
15975                   fi
15976                 done
15977                 if test -z "$haveit"; then
15978                   ltrpathdirs="$ltrpathdirs $found_dir"
15979                 fi
15980                                 if test "$hardcode_direct" = yes; then
15981                                                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15982                 else
15983                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15984                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15985                                                             haveit=
15986                     for x in $rpathdirs; do
15987                       if test "X$x" = "X$found_dir"; then
15988                         haveit=yes
15989                         break
15990                       fi
15991                     done
15992                     if test -z "$haveit"; then
15993                       rpathdirs="$rpathdirs $found_dir"
15994                     fi
15995                   else
15996                                                                                 haveit=
15997                     for x in $LDFLAGS $LIBLZMA; do
15998
15999   acl_save_prefix="$prefix"
16000   prefix="$acl_final_prefix"
16001   acl_save_exec_prefix="$exec_prefix"
16002   exec_prefix="$acl_final_exec_prefix"
16003   eval x=\"$x\"
16004   exec_prefix="$acl_save_exec_prefix"
16005   prefix="$acl_save_prefix"
16006
16007                       if test "X$x" = "X-L$found_dir"; then
16008                         haveit=yes
16009                         break
16010                       fi
16011                     done
16012                     if test -z "$haveit"; then
16013                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16014                     fi
16015                     if test "$hardcode_minus_L" != no; then
16016                                                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16017                     else
16018                                                                                                                                                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16019                     fi
16020                   fi
16021                 fi
16022               fi
16023             else
16024               if test "X$found_a" != "X"; then
16025                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16026               else
16027                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16028               fi
16029             fi
16030                         additional_includedir=
16031             case "$found_dir" in
16032               */lib | */lib/)
16033                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16034                 additional_includedir="$basedir/include"
16035                 ;;
16036             esac
16037             if test "X$additional_includedir" != "X"; then
16038                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
16039                 haveit=
16040                 if test "X$additional_includedir" = "X/usr/local/include"; then
16041                   if test -n "$GCC"; then
16042                     case $host_os in
16043                       linux*) haveit=yes;;
16044                     esac
16045                   fi
16046                 fi
16047                 if test -z "$haveit"; then
16048                   for x in $CPPFLAGS $INCLZMA; do
16049
16050   acl_save_prefix="$prefix"
16051   prefix="$acl_final_prefix"
16052   acl_save_exec_prefix="$exec_prefix"
16053   exec_prefix="$acl_final_exec_prefix"
16054   eval x=\"$x\"
16055   exec_prefix="$acl_save_exec_prefix"
16056   prefix="$acl_save_prefix"
16057
16058                     if test "X$x" = "X-I$additional_includedir"; then
16059                       haveit=yes
16060                       break
16061                     fi
16062                   done
16063                   if test -z "$haveit"; then
16064                     if test -d "$additional_includedir"; then
16065                                             INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16066                     fi
16067                   fi
16068                 fi
16069               fi
16070             fi
16071                         if test -n "$found_la"; then
16072                                                         save_libdir="$libdir"
16073               case "$found_la" in
16074                 */* | *\\*) . "$found_la" ;;
16075                 *) . "./$found_la" ;;
16076               esac
16077               libdir="$save_libdir"
16078                             for dep in $dependency_libs; do
16079                 case "$dep" in
16080                   -L*)
16081                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16082                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
16083                       haveit=
16084                       if test "X$additional_libdir" = "X/usr/local/lib"; then
16085                         if test -n "$GCC"; then
16086                           case $host_os in
16087                             linux*) haveit=yes;;
16088                           esac
16089                         fi
16090                       fi
16091                       if test -z "$haveit"; then
16092                         haveit=
16093                         for x in $LDFLAGS $LIBLZMA; do
16094
16095   acl_save_prefix="$prefix"
16096   prefix="$acl_final_prefix"
16097   acl_save_exec_prefix="$exec_prefix"
16098   exec_prefix="$acl_final_exec_prefix"
16099   eval x=\"$x\"
16100   exec_prefix="$acl_save_exec_prefix"
16101   prefix="$acl_save_prefix"
16102
16103                           if test "X$x" = "X-L$additional_libdir"; then
16104                             haveit=yes
16105                             break
16106                           fi
16107                         done
16108                         if test -z "$haveit"; then
16109                           if test -d "$additional_libdir"; then
16110                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16111                           fi
16112                         fi
16113                         haveit=
16114                         for x in $LDFLAGS $LTLIBLZMA; do
16115
16116   acl_save_prefix="$prefix"
16117   prefix="$acl_final_prefix"
16118   acl_save_exec_prefix="$exec_prefix"
16119   exec_prefix="$acl_final_exec_prefix"
16120   eval x=\"$x\"
16121   exec_prefix="$acl_save_exec_prefix"
16122   prefix="$acl_save_prefix"
16123
16124                           if test "X$x" = "X-L$additional_libdir"; then
16125                             haveit=yes
16126                             break
16127                           fi
16128                         done
16129                         if test -z "$haveit"; then
16130                           if test -d "$additional_libdir"; then
16131                                                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16132                           fi
16133                         fi
16134                       fi
16135                     fi
16136                     ;;
16137                   -R*)
16138                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
16139                     if test "$enable_rpath" != no; then
16140                                                                   haveit=
16141                       for x in $rpathdirs; do
16142                         if test "X$x" = "X$dir"; then
16143                           haveit=yes
16144                           break
16145                         fi
16146                       done
16147                       if test -z "$haveit"; then
16148                         rpathdirs="$rpathdirs $dir"
16149                       fi
16150                                                                   haveit=
16151                       for x in $ltrpathdirs; do
16152                         if test "X$x" = "X$dir"; then
16153                           haveit=yes
16154                           break
16155                         fi
16156                       done
16157                       if test -z "$haveit"; then
16158                         ltrpathdirs="$ltrpathdirs $dir"
16159                       fi
16160                     fi
16161                     ;;
16162                   -l*)
16163                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16164                     ;;
16165                   *.la)
16166                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16167                     ;;
16168                   *)
16169                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16170                     LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16171                     ;;
16172                 esac
16173               done
16174             fi
16175           else
16176                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16177             LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16178           fi
16179         fi
16180       fi
16181     done
16182   done
16183   if test "X$rpathdirs" != "X"; then
16184     if test -n "$hardcode_libdir_separator"; then
16185                         alldirs=
16186       for found_dir in $rpathdirs; do
16187         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16188       done
16189             acl_save_libdir="$libdir"
16190       libdir="$alldirs"
16191       eval flag=\"$hardcode_libdir_flag_spec\"
16192       libdir="$acl_save_libdir"
16193       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16194     else
16195             for found_dir in $rpathdirs; do
16196         acl_save_libdir="$libdir"
16197         libdir="$found_dir"
16198         eval flag=\"$hardcode_libdir_flag_spec\"
16199         libdir="$acl_save_libdir"
16200         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16201       done
16202     fi
16203   fi
16204   if test "X$ltrpathdirs" != "X"; then
16205             for found_dir in $ltrpathdirs; do
16206       LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16207     done
16208   fi
16209
16210
16211         ac_save_CPPFLAGS="$CPPFLAGS"
16212
16213   for element in $INCLZMA; do
16214     haveit=
16215     for x in $CPPFLAGS; do
16216
16217   acl_save_prefix="$prefix"
16218   prefix="$acl_final_prefix"
16219   acl_save_exec_prefix="$exec_prefix"
16220   exec_prefix="$acl_final_exec_prefix"
16221   eval x=\"$x\"
16222   exec_prefix="$acl_save_exec_prefix"
16223   prefix="$acl_save_prefix"
16224
16225       if test "X$x" = "X$element"; then
16226         haveit=yes
16227         break
16228       fi
16229     done
16230     if test -z "$haveit"; then
16231       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16232     fi
16233   done
16234
16235
16236   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16237 $as_echo_n "checking for liblzma... " >&6; }
16238 if ${ac_cv_liblzma+:} false; then :
16239   $as_echo_n "(cached) " >&6
16240 else
16241
16242     ac_save_LIBS="$LIBS"
16243     LIBS="$LIBS $LIBLZMA"
16244     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16245 /* end confdefs.h.  */
16246 #include "lzma.h"
16247 int
16248 main ()
16249 {
16250 lzma_index_iter iter;
16251                            lzma_index_iter_init (&iter, 0);
16252                            lzma_mf_is_supported (LZMA_MF_HC3);
16253   ;
16254   return 0;
16255 }
16256 _ACEOF
16257 if ac_fn_c_try_link "$LINENO"; then :
16258   ac_cv_liblzma=yes
16259 else
16260   ac_cv_liblzma=no
16261 fi
16262 rm -f core conftest.err conftest.$ac_objext \
16263     conftest$ac_exeext conftest.$ac_ext
16264     LIBS="$ac_save_LIBS"
16265
16266 fi
16267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16268 $as_echo "$ac_cv_liblzma" >&6; }
16269   if test "$ac_cv_liblzma" = yes; then
16270     HAVE_LIBLZMA=yes
16271
16272 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16273
16274     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16275 $as_echo_n "checking how to link with liblzma... " >&6; }
16276     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16277 $as_echo "$LIBLZMA" >&6; }
16278   else
16279     HAVE_LIBLZMA=no
16280             CPPFLAGS="$ac_save_CPPFLAGS"
16281     LIBLZMA=
16282     LTLIBLZMA=
16283   fi
16284
16285
16286
16287
16288
16289
16290     if test "$HAVE_LIBLZMA" != yes; then
16291       if test "$with_lzma" = yes; then
16292         as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
16293       fi
16294     fi
16295   fi
16296 fi
16297
16298 LIBGUI="../libgui/src/libgui.a"
16299 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16300
16301
16302
16303 WIN32LDAPP=
16304
16305
16306
16307 case "${host}" in
16308 *-*-cygwin* | *-*-mingw* )
16309     configdir="win"
16310     ;;
16311 *)
16312     configdir="unix"
16313     ;;
16314 esac
16315
16316 GDBTKLIBS=
16317 if test "${enable_gdbtk}" = "yes"; then
16318
16319     # Gdbtk must have an absolute path to srcdir in order to run
16320     # properly when not installed.
16321     here=`pwd`
16322     cd ${srcdir}
16323     GDBTK_SRC_DIR=`pwd`
16324     cd $here
16325
16326
16327     #
16328     # Ok, lets find the tcl configuration
16329     # First, look for one uninstalled.
16330     # the alternative search directory is invoked by --with-tcl
16331     #
16332
16333     if test x"${no_tcl}" = x ; then
16334         # we reset no_tcl in case something fails here
16335         no_tcl=true
16336
16337 # Check whether --with-tcl was given.
16338 if test "${with_tcl+set}" = set; then :
16339   withval=$with_tcl; with_tclconfig=${withval}
16340 fi
16341
16342         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16343 $as_echo_n "checking for Tcl configuration... " >&6; }
16344         if ${ac_cv_c_tclconfig+:} false; then :
16345   $as_echo_n "(cached) " >&6
16346 else
16347
16348
16349             # First check to see if --with-tcl was specified.
16350             case "${host}" in
16351                 *-*-cygwin*) platDir="win" ;;
16352                 *) platDir="unix" ;;
16353             esac
16354             if test x"${with_tclconfig}" != x ; then
16355                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16356                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16357                 else
16358                     as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
16359                 fi
16360             fi
16361
16362             # then check for a private Tcl installation
16363             if test x"${ac_cv_c_tclconfig}" = x ; then
16364                 for i in \
16365                         ../tcl \
16366                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16367                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16368                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16369                         ../../tcl \
16370                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16371                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16372                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16373                         ../../../tcl \
16374                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16375                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16376                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16377                     if test -f "$i/$platDir/tclConfig.sh" ; then
16378                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16379                         break
16380                     fi
16381                 done
16382             fi
16383
16384             # on Darwin, check in Framework installation locations
16385             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16386                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16387                         `ls -d /Library/Frameworks 2>/dev/null` \
16388                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16389                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16390                         ; do
16391                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16392                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16393                         break
16394                     fi
16395                 done
16396             fi
16397
16398             # check in a few common install locations
16399             if test x"${ac_cv_c_tclconfig}" = x ; then
16400                 for i in `ls -d ${libdir} 2>/dev/null` \
16401                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16402                         `ls -d ${prefix}/lib 2>/dev/null` \
16403                         `ls -d /usr/local/lib 2>/dev/null` \
16404                         `ls -d /usr/contrib/lib 2>/dev/null` \
16405                         `ls -d /usr/lib 2>/dev/null` \
16406                         ; do
16407                     if test -f "$i/tclConfig.sh" ; then
16408                         ac_cv_c_tclconfig=`(cd $i; pwd)`
16409                         break
16410                     fi
16411                 done
16412             fi
16413
16414             # check in a few other private locations
16415             if test x"${ac_cv_c_tclconfig}" = x ; then
16416                 for i in \
16417                         ${srcdir}/../tcl \
16418                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16419                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16420                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16421                     if test -f "$i/$platDir/tclConfig.sh" ; then
16422                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16423                     break
16424                 fi
16425                 done
16426             fi
16427
16428 fi
16429
16430
16431         if test x"${ac_cv_c_tclconfig}" = x ; then
16432             TCL_BIN_DIR="# no Tcl configs found"
16433             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16434 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
16435         else
16436             no_tcl=
16437             TCL_BIN_DIR=${ac_cv_c_tclconfig}
16438             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16439 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16440         fi
16441     fi
16442
16443
16444     # If $no_tk is nonempty, then we can't do Tk, and there is no
16445     # point to doing Tcl.
16446
16447     #
16448     # Ok, lets find the tk configuration
16449     # First, look for one uninstalled.
16450     # the alternative search directory is invoked by --with-tk
16451     #
16452
16453     if test x"${no_tk}" = x ; then
16454         # we reset no_tk in case something fails here
16455         no_tk=true
16456
16457 # Check whether --with-tk was given.
16458 if test "${with_tk+set}" = set; then :
16459   withval=$with_tk; with_tkconfig=${withval}
16460 fi
16461
16462         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16463 $as_echo_n "checking for Tk configuration... " >&6; }
16464         if ${ac_cv_c_tkconfig+:} false; then :
16465   $as_echo_n "(cached) " >&6
16466 else
16467
16468
16469             # First check to see if --with-tkconfig was specified.
16470             if test x"${with_tkconfig}" != x ; then
16471                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16472                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16473                 else
16474                     as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
16475                 fi
16476             fi
16477
16478             # then check for a private Tk library
16479             case "${host}" in
16480                 *-*-cygwin*) platDir="win" ;;
16481                 *) platDir="unix" ;;
16482             esac
16483             if test x"${ac_cv_c_tkconfig}" = x ; then
16484                 for i in \
16485                         ../tk \
16486                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16487                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16488                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16489                         ../../tk \
16490                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16491                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16492                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16493                         ../../../tk \
16494                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16495                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16496                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16497                     if test -f "$i/$platDir/tkConfig.sh" ; then
16498                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16499                         break
16500                     fi
16501                 done
16502             fi
16503
16504             # on Darwin, check in Framework installation locations
16505             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16506                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16507                         `ls -d /Library/Frameworks 2>/dev/null` \
16508                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16509                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16510                         ; do
16511                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
16512                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16513                         break
16514                     fi
16515                 done
16516             fi
16517
16518             # check in a few common install locations
16519             if test x"${ac_cv_c_tkconfig}" = x ; then
16520                 for i in `ls -d ${libdir} 2>/dev/null` \
16521                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16522                         `ls -d ${prefix}/lib 2>/dev/null` \
16523                         `ls -d /usr/local/lib 2>/dev/null` \
16524                         `ls -d /usr/contrib/lib 2>/dev/null` \
16525                         `ls -d /usr/lib 2>/dev/null` \
16526                         ; do
16527                     if test -f "$i/tkConfig.sh" ; then
16528                         ac_cv_c_tkconfig=`(cd $i; pwd)`
16529                         break
16530                     fi
16531                 done
16532             fi
16533             # check in a few other private locations
16534             if test x"${ac_cv_c_tkconfig}" = x ; then
16535                 for i in \
16536                         ${srcdir}/../tk \
16537                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16538                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16539                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16540                     if test -f "$i/$platDir/tkConfig.sh" ; then
16541                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16542                         break
16543                     fi
16544                 done
16545             fi
16546
16547 fi
16548
16549
16550         if test x"${ac_cv_c_tkconfig}" = x ; then
16551             TK_BIN_DIR="# no Tk configs found"
16552             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16553 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
16554         else
16555             no_tk=
16556             TK_BIN_DIR=${ac_cv_c_tkconfig}
16557             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16558 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16559         fi
16560     fi
16561
16562
16563     if test -z "${no_tcl}" -a -z "${no_tk}"; then
16564
16565     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16566 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
16567
16568     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
16569         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16570 $as_echo "loading" >&6; }
16571         . ${TCL_BIN_DIR}/tclConfig.sh
16572     else
16573         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16574 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16575     fi
16576
16577     # eval is required to do the TCL_DBGX substitution
16578     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16579     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16580
16581     # If the TCL_BIN_DIR is the build directory (not the install directory),
16582     # then set the common variable name to the value of the build variables.
16583     # For example, the variable TCL_LIB_SPEC will be set to the value
16584     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16585     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16586     # installed and uninstalled version of Tcl.
16587     if test -f "${TCL_BIN_DIR}/Makefile" ; then
16588         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16589         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16590         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16591     elif test "`uname -s`" = "Darwin"; then
16592         # If Tcl was built as a framework, attempt to use the libraries
16593         # from the framework at the given location so that linking works
16594         # against Tcl.framework installed in an arbitrary location.
16595         case ${TCL_DEFS} in
16596             *TCL_FRAMEWORK*)
16597                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16598                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16599                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16600                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16601                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16602                             break
16603                         fi
16604                     done
16605                 fi
16606                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16607                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16608                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16609                 fi
16610                 ;;
16611         esac
16612     fi
16613
16614     # eval is required to do the TCL_DBGX substitution
16615     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16616     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16617     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16618     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634         # Check for in-tree tcl
16635         here=`pwd`
16636         cd ${srcdir}/..
16637         topdir=`pwd`
16638         cd ${here}
16639
16640         intree="no"
16641         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16642           intree="yes"
16643         fi
16644
16645         # Find Tcl private headers
16646         if test x"${intree}" = xno; then
16647
16648   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16649 $as_echo_n "checking for Tcl private headers... " >&6; }
16650   private_dir=""
16651   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16652   if test -f ${dir}/tclInt.h ; then
16653     private_dir=${dir}
16654   fi
16655
16656   if test x"${private_dir}" = x; then
16657     as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
16658   else
16659     TCL_PRIVATE_INCLUDE="-I${private_dir}"
16660     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16661 $as_echo "${private_dir}" >&6; }
16662   fi
16663
16664           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16665           TCL_LIBRARY="${TCL_LIB_SPEC}"
16666           TCL_DEPS=""
16667         else
16668           # If building tcl in the same src tree, private headers
16669           # are not needed, but we need to be sure to use the right
16670           # headers library
16671           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16672           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16673           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16674         fi
16675
16676
16677
16678
16679
16680     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16681 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
16682
16683     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
16684         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16685 $as_echo "loading" >&6; }
16686         . ${TK_BIN_DIR}/tkConfig.sh
16687     else
16688         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16689 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16690     fi
16691
16692     # eval is required to do the TK_DBGX substitution
16693     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16694     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16695
16696     # If the TK_BIN_DIR is the build directory (not the install directory),
16697     # then set the common variable name to the value of the build variables.
16698     # For example, the variable TK_LIB_SPEC will be set to the value
16699     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16700     # instead of TK_BUILD_LIB_SPEC since it will work with both an
16701     # installed and uninstalled version of Tcl.
16702     if test -f "${TK_BIN_DIR}/Makefile" ; then
16703         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16704         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16705         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16706     elif test "`uname -s`" = "Darwin"; then
16707         # If Tk was built as a framework, attempt to use the libraries
16708         # from the framework at the given location so that linking works
16709         # against Tk.framework installed in an arbitrary location.
16710         case ${TK_DEFS} in
16711             *TK_FRAMEWORK*)
16712                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
16713                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
16714                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16715                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16716                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16717                             break
16718                         fi
16719                     done
16720                 fi
16721                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
16722                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16723                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16724                 fi
16725                 ;;
16726         esac
16727     fi
16728
16729     # eval is required to do the TK_DBGX substitution
16730     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16731     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16732     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16733     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748         # Check for in-tree Tk
16749         intree="no"
16750         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16751           intree="yes"
16752         fi
16753
16754         # Find Tk private headers
16755         if test x"${intree}" = xno; then
16756
16757   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16758 $as_echo_n "checking for Tk private headers... " >&6; }
16759   private_dir=""
16760   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16761   if test -f ${dir}/tkInt.h; then
16762     private_dir=${dir}
16763   fi
16764
16765   if test x"${private_dir}" = x; then
16766     as_fn_error $? "could not find Tk private headers" "$LINENO" 5
16767   else
16768     TK_PRIVATE_INCLUDE="-I${private_dir}"
16769     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16770 $as_echo "${private_dir}" >&6; }
16771   fi
16772
16773           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16774           TK_LIBRARY=${TK_LIB_SPEC}
16775           TK_DEPS=""
16776         else
16777           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16778           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16779           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16780         fi
16781
16782
16783
16784
16785
16786         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
16787
16788         # Include some libraries that Tcl and Tk want.
16789         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16790         # Yes, the ordering seems wrong here.  But it isn't.
16791         # TK_LIBS is the list of libraries that need to be linked
16792         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
16793         # were in LIBS then any link tests after this point would
16794         # try to include things like `$(LIBGUI)', which wouldn't work.
16795         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
16796
16797         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16798         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16799         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16800         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16801         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16802         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16803         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
16804
16805         if test x$gdb_cv_os_cygwin = xyes; then
16806           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16807           WIN32LDAPP="-Wl,--subsystem,console"
16808           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
16809         fi
16810
16811         subdirs="$subdirs gdbtk"
16812
16813     fi
16814 fi
16815
16816
16817
16818
16819
16820
16821
16822
16823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16824 $as_echo_n "checking for X... " >&6; }
16825
16826
16827 # Check whether --with-x was given.
16828 if test "${with_x+set}" = set; then :
16829   withval=$with_x;
16830 fi
16831
16832 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16833 if test "x$with_x" = xno; then
16834   # The user explicitly disabled X.
16835   have_x=disabled
16836 else
16837   case $x_includes,$x_libraries in #(
16838     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16839     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
16840   $as_echo_n "(cached) " >&6
16841 else
16842   # One or both of the vars are not set, and there is no cached value.
16843 ac_x_includes=no ac_x_libraries=no
16844 rm -f -r conftest.dir
16845 if mkdir conftest.dir; then
16846   cd conftest.dir
16847   cat >Imakefile <<'_ACEOF'
16848 incroot:
16849         @echo incroot='${INCROOT}'
16850 usrlibdir:
16851         @echo usrlibdir='${USRLIBDIR}'
16852 libdir:
16853         @echo libdir='${LIBDIR}'
16854 _ACEOF
16855   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
16856     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
16857     for ac_var in incroot usrlibdir libdir; do
16858       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16859     done
16860     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
16861     for ac_extension in a so sl dylib la dll; do
16862       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16863          test -f "$ac_im_libdir/libX11.$ac_extension"; then
16864         ac_im_usrlibdir=$ac_im_libdir; break
16865       fi
16866     done
16867     # Screen out bogus values from the imake configuration.  They are
16868     # bogus both because they are the default anyway, and because
16869     # using them would break gcc on systems where it needs fixed includes.
16870     case $ac_im_incroot in
16871         /usr/include) ac_x_includes= ;;
16872         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
16873     esac
16874     case $ac_im_usrlibdir in
16875         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
16876         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
16877     esac
16878   fi
16879   cd ..
16880   rm -f -r conftest.dir
16881 fi
16882
16883 # Standard set of common directories for X headers.
16884 # Check X11 before X11Rn because it is often a symlink to the current release.
16885 ac_x_header_dirs='
16886 /usr/X11/include
16887 /usr/X11R7/include
16888 /usr/X11R6/include
16889 /usr/X11R5/include
16890 /usr/X11R4/include
16891
16892 /usr/include/X11
16893 /usr/include/X11R7
16894 /usr/include/X11R6
16895 /usr/include/X11R5
16896 /usr/include/X11R4
16897
16898 /usr/local/X11/include
16899 /usr/local/X11R7/include
16900 /usr/local/X11R6/include
16901 /usr/local/X11R5/include
16902 /usr/local/X11R4/include
16903
16904 /usr/local/include/X11
16905 /usr/local/include/X11R7
16906 /usr/local/include/X11R6
16907 /usr/local/include/X11R5
16908 /usr/local/include/X11R4
16909
16910 /usr/X386/include
16911 /usr/x386/include
16912 /usr/XFree86/include/X11
16913
16914 /usr/include
16915 /usr/local/include
16916 /usr/unsupported/include
16917 /usr/athena/include
16918 /usr/local/x11r5/include
16919 /usr/lpp/Xamples/include
16920
16921 /usr/openwin/include
16922 /usr/openwin/share/include'
16923
16924 if test "$ac_x_includes" = no; then
16925   # Guess where to find include files, by looking for Xlib.h.
16926   # First, try using that file with no special directory specified.
16927   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16928 /* end confdefs.h.  */
16929 #include <X11/Xlib.h>
16930 _ACEOF
16931 if ac_fn_c_try_cpp "$LINENO"; then :
16932   # We can compile using X headers with no special include directory.
16933 ac_x_includes=
16934 else
16935   for ac_dir in $ac_x_header_dirs; do
16936   if test -r "$ac_dir/X11/Xlib.h"; then
16937     ac_x_includes=$ac_dir
16938     break
16939   fi
16940 done
16941 fi
16942 rm -f conftest.err conftest.i conftest.$ac_ext
16943 fi # $ac_x_includes = no
16944
16945 if test "$ac_x_libraries" = no; then
16946   # Check for the libraries.
16947   # See if we find them without any special options.
16948   # Don't add to $LIBS permanently.
16949   ac_save_LIBS=$LIBS
16950   LIBS="-lX11 $LIBS"
16951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16952 /* end confdefs.h.  */
16953 #include <X11/Xlib.h>
16954 int
16955 main ()
16956 {
16957 XrmInitialize ()
16958   ;
16959   return 0;
16960 }
16961 _ACEOF
16962 if ac_fn_c_try_link "$LINENO"; then :
16963   LIBS=$ac_save_LIBS
16964 # We can link X programs with no special library path.
16965 ac_x_libraries=
16966 else
16967   LIBS=$ac_save_LIBS
16968 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
16969 do
16970   # Don't even attempt the hair of trying to link an X program!
16971   for ac_extension in a so sl dylib la dll; do
16972     if test -r "$ac_dir/libX11.$ac_extension"; then
16973       ac_x_libraries=$ac_dir
16974       break 2
16975     fi
16976   done
16977 done
16978 fi
16979 rm -f core conftest.err conftest.$ac_objext \
16980     conftest$ac_exeext conftest.$ac_ext
16981 fi # $ac_x_libraries = no
16982
16983 case $ac_x_includes,$ac_x_libraries in #(
16984   no,* | *,no | *\'*)
16985     # Didn't find X, or a directory has "'" in its name.
16986     ac_cv_have_x="have_x=no";; #(
16987   *)
16988     # Record where we found X for the cache.
16989     ac_cv_have_x="have_x=yes\
16990         ac_x_includes='$ac_x_includes'\
16991         ac_x_libraries='$ac_x_libraries'"
16992 esac
16993 fi
16994 ;; #(
16995     *) have_x=yes;;
16996   esac
16997   eval "$ac_cv_have_x"
16998 fi # $with_x != no
16999
17000 if test "$have_x" != yes; then
17001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17002 $as_echo "$have_x" >&6; }
17003   no_x=yes
17004 else
17005   # If each of the values was on the command line, it overrides each guess.
17006   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17007   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17008   # Update the cache value to reflect the command line values.
17009   ac_cv_have_x="have_x=yes\
17010         ac_x_includes='$x_includes'\
17011         ac_x_libraries='$x_libraries'"
17012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17013 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
17014 fi
17015
17016
17017 # Unlike the sim directory, whether a simulator is linked is controlled by
17018 # presence of a gdb_sim definition in the target configure.tgt entry.
17019 # This code just checks for a few cases where we'd like to ignore those
17020 # definitions, even when they're present in the '.mt' file.  These cases
17021 # are when --disable-sim is specified, or if the simulator directory is
17022 # not part of the source tree.
17023 #
17024 # Check whether --enable-sim was given.
17025 if test "${enable_sim+set}" = set; then :
17026   enableval=$enable_sim; echo "enable_sim = $enable_sim";
17027  echo "enableval = ${enableval}";
17028  case "${enableval}" in
17029   yes) ignore_sim=false ;;
17030   no)  ignore_sim=true ;;
17031   *)   ignore_sim=false ;;
17032  esac
17033 else
17034   ignore_sim=false
17035 fi
17036
17037
17038 if test ! -d "${srcdir}/../sim"; then
17039   ignore_sim=true
17040 fi
17041
17042 SIM=
17043 SIM_OBS=
17044 if test "${ignore_sim}" = "false"; then
17045   if test x"${gdb_sim}" != x ; then
17046     SIM="${gdb_sim}"
17047     SIM_OBS="remote-sim.o"
17048
17049 $as_echo "#define WITH_SIM 1" >>confdefs.h
17050
17051
17052     # Some tdep code should only be compiled in when the ppc sim is
17053     # built.  PR sim/13418.
17054     case $target in
17055       powerpc*-*-*)
17056
17057 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17058
17059         ;;
17060     esac
17061   fi
17062 fi
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077 # List of host floatformats.
17078
17079 cat >>confdefs.h <<_ACEOF
17080 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
17081 _ACEOF
17082
17083
17084 cat >>confdefs.h <<_ACEOF
17085 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
17086 _ACEOF
17087
17088
17089 cat >>confdefs.h <<_ACEOF
17090 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
17091 _ACEOF
17092
17093
17094 # target_subdir is used by the testsuite to find the target libraries.
17095 target_subdir=
17096 if test "${host}" != "${target}"; then
17097     target_subdir="${target_alias}/"
17098 fi
17099
17100
17101 # Import nat definitions.
17102 nat_makefile_frag=/dev/null
17103 if test "${gdb_native}" = "yes"; then
17104   . ${srcdir}/configure.nat
17105   nativefile=$NAT_FILE
17106 fi
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118 if test x"${gdb_osabi}" != x ; then
17119
17120 cat >>confdefs.h <<_ACEOF
17121 #define GDB_OSABI_DEFAULT $gdb_osabi
17122 _ACEOF
17123
17124 fi
17125
17126 # Enable multi-ice-gdb-server.
17127 # Check whether --enable-multi-ice was given.
17128 if test "${enable_multi_ice+set}" = set; then :
17129   enableval=$enable_multi_ice; case $enableval in
17130     yes | no)
17131       ;;
17132     *) as_fn_error $? "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
17133   esac
17134 fi
17135
17136 if test "x$enable_multi_ice" = xyes; then
17137    subdirs="$subdirs multi-ice"
17138
17139 fi
17140
17141 # Check whether --enable-gdbserver was given.
17142 if test "${enable_gdbserver+set}" = set; then :
17143   enableval=$enable_gdbserver; case "${enableval}" in
17144   yes| no|auto) ;;
17145   *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
17146 esac
17147 else
17148   enable_gdbserver=auto
17149 fi
17150
17151
17152 # We only build gdbserver automatically in a native configuration, and
17153 # only if the user did not explicitly disable its build.
17154 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
17155   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17156 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
17157   if test "x$build_gdbserver" = xyes; then
17158     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17159 $as_echo "yes" >&6; }
17160     subdirs="$subdirs gdbserver"
17161
17162     gdbserver_build_enabled=yes
17163   else
17164     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17165 $as_echo "no" >&6; }
17166   fi
17167 fi
17168
17169 # If the user explicitly request the gdbserver to be built, verify that
17170 # we were in fact able to enable it.
17171 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
17172   as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
17173 fi
17174
17175 # Check for babeltrace and babeltrace-ctf
17176
17177 # Check whether --with-babeltrace was given.
17178 if test "${with_babeltrace+set}" = set; then :
17179   withval=$with_babeltrace;
17180 else
17181   with_babeltrace=auto
17182 fi
17183
17184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17185 $as_echo_n "checking whether to use babeltrace... " >&6; }
17186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17187 $as_echo "$with_babeltrace" >&6; }
17188
17189 if test "x$with_babeltrace" = "xno"; then
17190   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17191 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17192 else
17193   # Append -Werror to CFLAGS so that configure can catch the warning
17194   # "assignment from incompatible pointer type", which is related to
17195   # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
17196   # in GDB, while babeltrace 1.0.3 is broken.
17197   # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17198   # safe to save and restore CFLAGS here.
17199   saved_CFLAGS=$CFLAGS
17200   CFLAGS="$CFLAGS -Werror"
17201
17202
17203
17204
17205
17206
17207
17208
17209     use_additional=yes
17210
17211   acl_save_prefix="$prefix"
17212   prefix="$acl_final_prefix"
17213   acl_save_exec_prefix="$exec_prefix"
17214   exec_prefix="$acl_final_exec_prefix"
17215
17216     eval additional_includedir=\"$includedir\"
17217     eval additional_libdir=\"$libdir\"
17218
17219   exec_prefix="$acl_save_exec_prefix"
17220   prefix="$acl_save_prefix"
17221
17222
17223 # Check whether --with-libbabeltrace-prefix was given.
17224 if test "${with_libbabeltrace_prefix+set}" = set; then :
17225   withval=$with_libbabeltrace_prefix;
17226     if test "X$withval" = "Xno"; then
17227       use_additional=no
17228     else
17229       if test "X$withval" = "X"; then
17230
17231   acl_save_prefix="$prefix"
17232   prefix="$acl_final_prefix"
17233   acl_save_exec_prefix="$exec_prefix"
17234   exec_prefix="$acl_final_exec_prefix"
17235
17236           eval additional_includedir=\"$includedir\"
17237           eval additional_libdir=\"$libdir\"
17238
17239   exec_prefix="$acl_save_exec_prefix"
17240   prefix="$acl_save_prefix"
17241
17242       else
17243         additional_includedir="$withval/include"
17244         additional_libdir="$withval/lib"
17245       fi
17246     fi
17247
17248 fi
17249
17250       LIBBABELTRACE=
17251   LTLIBBABELTRACE=
17252   INCBABELTRACE=
17253   rpathdirs=
17254   ltrpathdirs=
17255   names_already_handled=
17256   names_next_round='babeltrace babeltrace-ctf'
17257   while test -n "$names_next_round"; do
17258     names_this_round="$names_next_round"
17259     names_next_round=
17260     for name in $names_this_round; do
17261       already_handled=
17262       for n in $names_already_handled; do
17263         if test "$n" = "$name"; then
17264           already_handled=yes
17265           break
17266         fi
17267       done
17268       if test -z "$already_handled"; then
17269         names_already_handled="$names_already_handled $name"
17270                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17271         eval value=\"\$HAVE_LIB$uppername\"
17272         if test -n "$value"; then
17273           if test "$value" = yes; then
17274             eval value=\"\$LIB$uppername\"
17275             test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17276             eval value=\"\$LTLIB$uppername\"
17277             test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17278           else
17279                                     :
17280           fi
17281         else
17282                               found_dir=
17283           found_la=
17284           found_so=
17285           found_a=
17286           if test $use_additional = yes; then
17287             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17288               found_dir="$additional_libdir"
17289               found_so="$additional_libdir/lib$name.$shlibext"
17290               if test -f "$additional_libdir/lib$name.la"; then
17291                 found_la="$additional_libdir/lib$name.la"
17292               fi
17293             else
17294               if test -f "$additional_libdir/lib$name.$libext"; then
17295                 found_dir="$additional_libdir"
17296                 found_a="$additional_libdir/lib$name.$libext"
17297                 if test -f "$additional_libdir/lib$name.la"; then
17298                   found_la="$additional_libdir/lib$name.la"
17299                 fi
17300               fi
17301             fi
17302           fi
17303           if test "X$found_dir" = "X"; then
17304             for x in $LDFLAGS $LTLIBBABELTRACE; do
17305
17306   acl_save_prefix="$prefix"
17307   prefix="$acl_final_prefix"
17308   acl_save_exec_prefix="$exec_prefix"
17309   exec_prefix="$acl_final_exec_prefix"
17310   eval x=\"$x\"
17311   exec_prefix="$acl_save_exec_prefix"
17312   prefix="$acl_save_prefix"
17313
17314               case "$x" in
17315                 -L*)
17316                   dir=`echo "X$x" | sed -e 's/^X-L//'`
17317                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17318                     found_dir="$dir"
17319                     found_so="$dir/lib$name.$shlibext"
17320                     if test -f "$dir/lib$name.la"; then
17321                       found_la="$dir/lib$name.la"
17322                     fi
17323                   else
17324                     if test -f "$dir/lib$name.$libext"; then
17325                       found_dir="$dir"
17326                       found_a="$dir/lib$name.$libext"
17327                       if test -f "$dir/lib$name.la"; then
17328                         found_la="$dir/lib$name.la"
17329                       fi
17330                     fi
17331                   fi
17332                   ;;
17333               esac
17334               if test "X$found_dir" != "X"; then
17335                 break
17336               fi
17337             done
17338           fi
17339           if test "X$found_dir" != "X"; then
17340                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17341             if test "X$found_so" != "X"; then
17342                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17343                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17344               else
17345                                                                                 haveit=
17346                 for x in $ltrpathdirs; do
17347                   if test "X$x" = "X$found_dir"; then
17348                     haveit=yes
17349                     break
17350                   fi
17351                 done
17352                 if test -z "$haveit"; then
17353                   ltrpathdirs="$ltrpathdirs $found_dir"
17354                 fi
17355                                 if test "$hardcode_direct" = yes; then
17356                                                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17357                 else
17358                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17359                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17360                                                             haveit=
17361                     for x in $rpathdirs; do
17362                       if test "X$x" = "X$found_dir"; then
17363                         haveit=yes
17364                         break
17365                       fi
17366                     done
17367                     if test -z "$haveit"; then
17368                       rpathdirs="$rpathdirs $found_dir"
17369                     fi
17370                   else
17371                                                                                 haveit=
17372                     for x in $LDFLAGS $LIBBABELTRACE; do
17373
17374   acl_save_prefix="$prefix"
17375   prefix="$acl_final_prefix"
17376   acl_save_exec_prefix="$exec_prefix"
17377   exec_prefix="$acl_final_exec_prefix"
17378   eval x=\"$x\"
17379   exec_prefix="$acl_save_exec_prefix"
17380   prefix="$acl_save_prefix"
17381
17382                       if test "X$x" = "X-L$found_dir"; then
17383                         haveit=yes
17384                         break
17385                       fi
17386                     done
17387                     if test -z "$haveit"; then
17388                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17389                     fi
17390                     if test "$hardcode_minus_L" != no; then
17391                                                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17392                     else
17393                                                                                                                                                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17394                     fi
17395                   fi
17396                 fi
17397               fi
17398             else
17399               if test "X$found_a" != "X"; then
17400                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17401               else
17402                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17403               fi
17404             fi
17405                         additional_includedir=
17406             case "$found_dir" in
17407               */lib | */lib/)
17408                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17409                 additional_includedir="$basedir/include"
17410                 ;;
17411             esac
17412             if test "X$additional_includedir" != "X"; then
17413                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
17414                 haveit=
17415                 if test "X$additional_includedir" = "X/usr/local/include"; then
17416                   if test -n "$GCC"; then
17417                     case $host_os in
17418                       linux*) haveit=yes;;
17419                     esac
17420                   fi
17421                 fi
17422                 if test -z "$haveit"; then
17423                   for x in $CPPFLAGS $INCBABELTRACE; do
17424
17425   acl_save_prefix="$prefix"
17426   prefix="$acl_final_prefix"
17427   acl_save_exec_prefix="$exec_prefix"
17428   exec_prefix="$acl_final_exec_prefix"
17429   eval x=\"$x\"
17430   exec_prefix="$acl_save_exec_prefix"
17431   prefix="$acl_save_prefix"
17432
17433                     if test "X$x" = "X-I$additional_includedir"; then
17434                       haveit=yes
17435                       break
17436                     fi
17437                   done
17438                   if test -z "$haveit"; then
17439                     if test -d "$additional_includedir"; then
17440                                             INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17441                     fi
17442                   fi
17443                 fi
17444               fi
17445             fi
17446                         if test -n "$found_la"; then
17447                                                         save_libdir="$libdir"
17448               case "$found_la" in
17449                 */* | *\\*) . "$found_la" ;;
17450                 *) . "./$found_la" ;;
17451               esac
17452               libdir="$save_libdir"
17453                             for dep in $dependency_libs; do
17454                 case "$dep" in
17455                   -L*)
17456                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17457                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
17458                       haveit=
17459                       if test "X$additional_libdir" = "X/usr/local/lib"; then
17460                         if test -n "$GCC"; then
17461                           case $host_os in
17462                             linux*) haveit=yes;;
17463                           esac
17464                         fi
17465                       fi
17466                       if test -z "$haveit"; then
17467                         haveit=
17468                         for x in $LDFLAGS $LIBBABELTRACE; do
17469
17470   acl_save_prefix="$prefix"
17471   prefix="$acl_final_prefix"
17472   acl_save_exec_prefix="$exec_prefix"
17473   exec_prefix="$acl_final_exec_prefix"
17474   eval x=\"$x\"
17475   exec_prefix="$acl_save_exec_prefix"
17476   prefix="$acl_save_prefix"
17477
17478                           if test "X$x" = "X-L$additional_libdir"; then
17479                             haveit=yes
17480                             break
17481                           fi
17482                         done
17483                         if test -z "$haveit"; then
17484                           if test -d "$additional_libdir"; then
17485                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17486                           fi
17487                         fi
17488                         haveit=
17489                         for x in $LDFLAGS $LTLIBBABELTRACE; do
17490
17491   acl_save_prefix="$prefix"
17492   prefix="$acl_final_prefix"
17493   acl_save_exec_prefix="$exec_prefix"
17494   exec_prefix="$acl_final_exec_prefix"
17495   eval x=\"$x\"
17496   exec_prefix="$acl_save_exec_prefix"
17497   prefix="$acl_save_prefix"
17498
17499                           if test "X$x" = "X-L$additional_libdir"; then
17500                             haveit=yes
17501                             break
17502                           fi
17503                         done
17504                         if test -z "$haveit"; then
17505                           if test -d "$additional_libdir"; then
17506                                                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17507                           fi
17508                         fi
17509                       fi
17510                     fi
17511                     ;;
17512                   -R*)
17513                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
17514                     if test "$enable_rpath" != no; then
17515                                                                   haveit=
17516                       for x in $rpathdirs; do
17517                         if test "X$x" = "X$dir"; then
17518                           haveit=yes
17519                           break
17520                         fi
17521                       done
17522                       if test -z "$haveit"; then
17523                         rpathdirs="$rpathdirs $dir"
17524                       fi
17525                                                                   haveit=
17526                       for x in $ltrpathdirs; do
17527                         if test "X$x" = "X$dir"; then
17528                           haveit=yes
17529                           break
17530                         fi
17531                       done
17532                       if test -z "$haveit"; then
17533                         ltrpathdirs="$ltrpathdirs $dir"
17534                       fi
17535                     fi
17536                     ;;
17537                   -l*)
17538                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17539                     ;;
17540                   *.la)
17541                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17542                     ;;
17543                   *)
17544                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17545                     LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17546                     ;;
17547                 esac
17548               done
17549             fi
17550           else
17551                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17552             LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17553           fi
17554         fi
17555       fi
17556     done
17557   done
17558   if test "X$rpathdirs" != "X"; then
17559     if test -n "$hardcode_libdir_separator"; then
17560                         alldirs=
17561       for found_dir in $rpathdirs; do
17562         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17563       done
17564             acl_save_libdir="$libdir"
17565       libdir="$alldirs"
17566       eval flag=\"$hardcode_libdir_flag_spec\"
17567       libdir="$acl_save_libdir"
17568       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17569     else
17570             for found_dir in $rpathdirs; do
17571         acl_save_libdir="$libdir"
17572         libdir="$found_dir"
17573         eval flag=\"$hardcode_libdir_flag_spec\"
17574         libdir="$acl_save_libdir"
17575         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17576       done
17577     fi
17578   fi
17579   if test "X$ltrpathdirs" != "X"; then
17580             for found_dir in $ltrpathdirs; do
17581       LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17582     done
17583   fi
17584
17585
17586         ac_save_CPPFLAGS="$CPPFLAGS"
17587
17588   for element in $INCBABELTRACE; do
17589     haveit=
17590     for x in $CPPFLAGS; do
17591
17592   acl_save_prefix="$prefix"
17593   prefix="$acl_final_prefix"
17594   acl_save_exec_prefix="$exec_prefix"
17595   exec_prefix="$acl_final_exec_prefix"
17596   eval x=\"$x\"
17597   exec_prefix="$acl_save_exec_prefix"
17598   prefix="$acl_save_prefix"
17599
17600       if test "X$x" = "X$element"; then
17601         haveit=yes
17602         break
17603       fi
17604     done
17605     if test -z "$haveit"; then
17606       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17607     fi
17608   done
17609
17610
17611   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17612 $as_echo_n "checking for libbabeltrace... " >&6; }
17613 if ${ac_cv_libbabeltrace+:} false; then :
17614   $as_echo_n "(cached) " >&6
17615 else
17616
17617     ac_save_LIBS="$LIBS"
17618     LIBS="$LIBS $LIBBABELTRACE"
17619     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17620 /* end confdefs.h.  */
17621 #include <babeltrace/babeltrace.h>
17622                          #include <babeltrace/ctf/events.h>
17623                          #include <babeltrace/ctf/iterator.h>
17624 int
17625 main ()
17626 {
17627 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17628                         struct bt_ctf_event *event = NULL;
17629                         const struct bt_definition *scope;
17630
17631                         pos->type = BT_SEEK_BEGIN;
17632                         bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
17633                         scope = bt_ctf_get_top_level_scope (event,
17634                                                            BT_STREAM_EVENT_HEADER);
17635                         bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17636
17637   ;
17638   return 0;
17639 }
17640 _ACEOF
17641 if ac_fn_c_try_link "$LINENO"; then :
17642   ac_cv_libbabeltrace=yes
17643 else
17644   ac_cv_libbabeltrace=no
17645 fi
17646 rm -f core conftest.err conftest.$ac_objext \
17647     conftest$ac_exeext conftest.$ac_ext
17648     LIBS="$ac_save_LIBS"
17649
17650 fi
17651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17652 $as_echo "$ac_cv_libbabeltrace" >&6; }
17653   if test "$ac_cv_libbabeltrace" = yes; then
17654     HAVE_LIBBABELTRACE=yes
17655
17656 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17657
17658     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17659 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
17660     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17661 $as_echo "$LIBBABELTRACE" >&6; }
17662   else
17663     HAVE_LIBBABELTRACE=no
17664             CPPFLAGS="$ac_save_CPPFLAGS"
17665     LIBBABELTRACE=
17666     LTLIBBABELTRACE=
17667   fi
17668
17669
17670
17671
17672
17673
17674   CFLAGS=$saved_CFLAGS
17675
17676   if test "$HAVE_LIBBABELTRACE" != yes; then
17677      if test "$with_babeltrace" = yes; then
17678        as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
17679      else
17680        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17681 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17682      fi
17683   fi
17684 fi
17685
17686 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17687 # empty version.
17688
17689 files=
17690 links=
17691
17692 rm -f nm.h
17693 if test "${nativefile}" != ""; then
17694     case "${nativefile}" in
17695       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17696       * ) GDB_NM_FILE="${nativefile}"
17697     esac
17698     files="${files} ${GDB_NM_FILE}"
17699     links="${links} nm.h"
17700
17701 cat >>confdefs.h <<_ACEOF
17702 #define GDB_NM_FILE "${GDB_NM_FILE}"
17703 _ACEOF
17704
17705 fi
17706
17707
17708 for ac_prog in xsltproc
17709 do
17710   # Extract the first word of "$ac_prog", so it can be a program name with args.
17711 set dummy $ac_prog; ac_word=$2
17712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17713 $as_echo_n "checking for $ac_word... " >&6; }
17714 if ${ac_cv_path_XSLTPROC+:} false; then :
17715   $as_echo_n "(cached) " >&6
17716 else
17717   case $XSLTPROC in
17718   [\\/]* | ?:[\\/]*)
17719   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17720   ;;
17721   *)
17722   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17723 for as_dir in $PATH
17724 do
17725   IFS=$as_save_IFS
17726   test -z "$as_dir" && as_dir=.
17727     for ac_exec_ext in '' $ac_executable_extensions; do
17728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17729     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17731     break 2
17732   fi
17733 done
17734   done
17735 IFS=$as_save_IFS
17736
17737   ;;
17738 esac
17739 fi
17740 XSLTPROC=$ac_cv_path_XSLTPROC
17741 if test -n "$XSLTPROC"; then
17742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17743 $as_echo "$XSLTPROC" >&6; }
17744 else
17745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17746 $as_echo "no" >&6; }
17747 fi
17748
17749
17750   test -n "$XSLTPROC" && break
17751 done
17752 test -n "$XSLTPROC" || XSLTPROC="missing"
17753
17754 if test "x$USE_MAINTAINER_MODE" = xyes; then
17755   if test "${XSLTPROC}" = missing; then
17756     as_fn_error $? "unable to find xsltproc.  maintainer-mode requires xsltproc." "$LINENO" 5
17757   fi
17758 fi
17759
17760
17761 ac_sources="$files"
17762 ac_dests="$links"
17763 while test -n "$ac_sources"; do
17764   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17765   set $ac_sources; ac_source=$1; shift; ac_sources=$*
17766   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17767 done
17768 ac_config_links="$ac_config_links $ac_config_links_1"
17769
17770
17771
17772
17773
17774 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
17775
17776
17777 if $development; then
17778
17779 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17780
17781   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
17782   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
17783 fi
17784
17785
17786   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17787   GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17788   if test "x$GDB_TRANSFORM_NAME" = x; then
17789      GDB_TRANSFORM_NAME=gdb
17790   fi
17791
17792
17793
17794   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17795   GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17796   if test "x$GCORE_TRANSFORM_NAME" = x; then
17797      GCORE_TRANSFORM_NAME=gcore
17798   fi
17799
17800
17801 ac_config_files="$ac_config_files gcore"
17802
17803 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
17804
17805
17806 cat >confcache <<\_ACEOF
17807 # This file is a shell script that caches the results of configure
17808 # tests run on this system so they can be shared between configure
17809 # scripts and configure runs, see configure's option --config-cache.
17810 # It is not useful on other systems.  If it contains results you don't
17811 # want to keep, you may remove or edit it.
17812 #
17813 # config.status only pays attention to the cache file if you give it
17814 # the --recheck option to rerun configure.
17815 #
17816 # `ac_cv_env_foo' variables (set or unset) will be overridden when
17817 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17818 # following values.
17819
17820 _ACEOF
17821
17822 # The following way of writing the cache mishandles newlines in values,
17823 # but we know of no workaround that is simple, portable, and efficient.
17824 # So, we kill variables containing newlines.
17825 # Ultrix sh set writes to stderr and can't be redirected directly,
17826 # and sets the high bit in the cache file unless we assign to the vars.
17827 (
17828   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17829     eval ac_val=\$$ac_var
17830     case $ac_val in #(
17831     *${as_nl}*)
17832       case $ac_var in #(
17833       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17834 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17835       esac
17836       case $ac_var in #(
17837       _ | IFS | as_nl) ;; #(
17838       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17839       *) { eval $ac_var=; unset $ac_var;} ;;
17840       esac ;;
17841     esac
17842   done
17843
17844   (set) 2>&1 |
17845     case $as_nl`(ac_space=' '; set) 2>&1` in #(
17846     *${as_nl}ac_space=\ *)
17847       # `set' does not quote correctly, so add quotes: double-quote
17848       # substitution turns \\\\ into \\, and sed turns \\ into \.
17849       sed -n \
17850         "s/'/'\\\\''/g;
17851           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17852       ;; #(
17853     *)
17854       # `set' quotes correctly as required by POSIX, so do not add quotes.
17855       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
17856       ;;
17857     esac |
17858     sort
17859 ) |
17860   sed '
17861      /^ac_cv_env_/b end
17862      t clear
17863      :clear
17864      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17865      t end
17866      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17867      :end' >>confcache
17868 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17869   if test -w "$cache_file"; then
17870     if test "x$cache_file" != "x/dev/null"; then
17871       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17872 $as_echo "$as_me: updating cache $cache_file" >&6;}
17873       if test ! -f "$cache_file" || test -h "$cache_file"; then
17874         cat confcache >"$cache_file"
17875       else
17876         case $cache_file in #(
17877         */* | ?:*)
17878           mv -f confcache "$cache_file"$$ &&
17879           mv -f "$cache_file"$$ "$cache_file" ;; #(
17880         *)
17881           mv -f confcache "$cache_file" ;;
17882         esac
17883       fi
17884     fi
17885   else
17886     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17887 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
17888   fi
17889 fi
17890 rm -f confcache
17891
17892 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17893 # Let make expand exec_prefix.
17894 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17895
17896 DEFS=-DHAVE_CONFIG_H
17897
17898 ac_libobjs=
17899 ac_ltlibobjs=
17900 U=
17901 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17902   # 1. Remove the extension, and $U if already installed.
17903   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17904   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17905   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
17906   #    will be set to the directory where LIBOBJS objects are built.
17907   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17908   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
17909 done
17910 LIBOBJS=$ac_libobjs
17911
17912 LTLIBOBJS=$ac_ltlibobjs
17913
17914
17915 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
17916   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
17917 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17918 fi
17919 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17920   as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
17921 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17922 fi
17923 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17924   as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
17925 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17926 fi
17927
17928
17929 : "${CONFIG_STATUS=./config.status}"
17930 ac_write_fail=0
17931 ac_clean_files_save=$ac_clean_files
17932 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17933 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17934 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17935 as_write_fail=0
17936 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
17937 #! $SHELL
17938 # Generated by $as_me.
17939 # Run this file to recreate the current configuration.
17940 # Compiler output produced by configure, useful for debugging
17941 # configure, is in config.log if it exists.
17942
17943 debug=false
17944 ac_cs_recheck=false
17945 ac_cs_silent=false
17946
17947 SHELL=\${CONFIG_SHELL-$SHELL}
17948 export SHELL
17949 _ASEOF
17950 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17951 ## -------------------- ##
17952 ## M4sh Initialization. ##
17953 ## -------------------- ##
17954
17955 # Be more Bourne compatible
17956 DUALCASE=1; export DUALCASE # for MKS sh
17957 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17958   emulate sh
17959   NULLCMD=:
17960   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
17961   # is contrary to our usage.  Disable this feature.
17962   alias -g '${1+"$@"}'='"$@"'
17963   setopt NO_GLOB_SUBST
17964 else
17965   case `(set -o) 2>/dev/null` in #(
17966   *posix*) :
17967     set -o posix ;; #(
17968   *) :
17969      ;;
17970 esac
17971 fi
17972
17973
17974 as_nl='
17975 '
17976 export as_nl
17977 # Printing a long string crashes Solaris 7 /usr/bin/printf.
17978 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17979 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17980 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17981 # Prefer a ksh shell builtin over an external printf program on Solaris,
17982 # but without wasting forks for bash or zsh.
17983 if test -z "$BASH_VERSION$ZSH_VERSION" \
17984     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17985   as_echo='print -r --'
17986   as_echo_n='print -rn --'
17987 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17988   as_echo='printf %s\n'
17989   as_echo_n='printf %s'
17990 else
17991   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17992     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17993     as_echo_n='/usr/ucb/echo -n'
17994   else
17995     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17996     as_echo_n_body='eval
17997       arg=$1;
17998       case $arg in #(
17999       *"$as_nl"*)
18000         expr "X$arg" : "X\\(.*\\)$as_nl";
18001         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18002       esac;
18003       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18004     '
18005     export as_echo_n_body
18006     as_echo_n='sh -c $as_echo_n_body as_echo'
18007   fi
18008   export as_echo_body
18009   as_echo='sh -c $as_echo_body as_echo'
18010 fi
18011
18012 # The user is always right.
18013 if test "${PATH_SEPARATOR+set}" != set; then
18014   PATH_SEPARATOR=:
18015   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18016     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18017       PATH_SEPARATOR=';'
18018   }
18019 fi
18020
18021
18022 # IFS
18023 # We need space, tab and new line, in precisely that order.  Quoting is
18024 # there to prevent editors from complaining about space-tab.
18025 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
18026 # splitting by setting IFS to empty value.)
18027 IFS=" ""        $as_nl"
18028
18029 # Find who we are.  Look in the path if we contain no directory separator.
18030 as_myself=
18031 case $0 in #((
18032   *[\\/]* ) as_myself=$0 ;;
18033   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18034 for as_dir in $PATH
18035 do
18036   IFS=$as_save_IFS
18037   test -z "$as_dir" && as_dir=.
18038     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18039   done
18040 IFS=$as_save_IFS
18041
18042      ;;
18043 esac
18044 # We did not find ourselves, most probably we were run as `sh COMMAND'
18045 # in which case we are not to be found in the path.
18046 if test "x$as_myself" = x; then
18047   as_myself=$0
18048 fi
18049 if test ! -f "$as_myself"; then
18050   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18051   exit 1
18052 fi
18053
18054 # Unset variables that we do not need and which cause bugs (e.g. in
18055 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
18056 # suppresses any "Segmentation fault" message there.  '((' could
18057 # trigger a bug in pdksh 5.2.14.
18058 for as_var in BASH_ENV ENV MAIL MAILPATH
18059 do eval test x\${$as_var+set} = xset \
18060   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18061 done
18062 PS1='$ '
18063 PS2='> '
18064 PS4='+ '
18065
18066 # NLS nuisances.
18067 LC_ALL=C
18068 export LC_ALL
18069 LANGUAGE=C
18070 export LANGUAGE
18071
18072 # CDPATH.
18073 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18074
18075
18076 # as_fn_error STATUS ERROR [LINENO LOG_FD]
18077 # ----------------------------------------
18078 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18079 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
18080 # script with STATUS, using 1 if that was 0.
18081 as_fn_error ()
18082 {
18083   as_status=$1; test $as_status -eq 0 && as_status=1
18084   if test "$4"; then
18085     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18086     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
18087   fi
18088   $as_echo "$as_me: error: $2" >&2
18089   as_fn_exit $as_status
18090 } # as_fn_error
18091
18092
18093 # as_fn_set_status STATUS
18094 # -----------------------
18095 # Set $? to STATUS, without forking.
18096 as_fn_set_status ()
18097 {
18098   return $1
18099 } # as_fn_set_status
18100
18101 # as_fn_exit STATUS
18102 # -----------------
18103 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18104 as_fn_exit ()
18105 {
18106   set +e
18107   as_fn_set_status $1
18108   exit $1
18109 } # as_fn_exit
18110
18111 # as_fn_unset VAR
18112 # ---------------
18113 # Portably unset VAR.
18114 as_fn_unset ()
18115 {
18116   { eval $1=; unset $1;}
18117 }
18118 as_unset=as_fn_unset
18119 # as_fn_append VAR VALUE
18120 # ----------------------
18121 # Append the text in VALUE to the end of the definition contained in VAR. Take
18122 # advantage of any shell optimizations that allow amortized linear growth over
18123 # repeated appends, instead of the typical quadratic growth present in naive
18124 # implementations.
18125 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18126   eval 'as_fn_append ()
18127   {
18128     eval $1+=\$2
18129   }'
18130 else
18131   as_fn_append ()
18132   {
18133     eval $1=\$$1\$2
18134   }
18135 fi # as_fn_append
18136
18137 # as_fn_arith ARG...
18138 # ------------------
18139 # Perform arithmetic evaluation on the ARGs, and store the result in the
18140 # global $as_val. Take advantage of shells that can avoid forks. The arguments
18141 # must be portable across $(()) and expr.
18142 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18143   eval 'as_fn_arith ()
18144   {
18145     as_val=$(( $* ))
18146   }'
18147 else
18148   as_fn_arith ()
18149   {
18150     as_val=`expr "$@" || test $? -eq 1`
18151   }
18152 fi # as_fn_arith
18153
18154
18155 if expr a : '\(a\)' >/dev/null 2>&1 &&
18156    test "X`expr 00001 : '.*\(...\)'`" = X001; then
18157   as_expr=expr
18158 else
18159   as_expr=false
18160 fi
18161
18162 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18163   as_basename=basename
18164 else
18165   as_basename=false
18166 fi
18167
18168 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18169   as_dirname=dirname
18170 else
18171   as_dirname=false
18172 fi
18173
18174 as_me=`$as_basename -- "$0" ||
18175 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18176          X"$0" : 'X\(//\)$' \| \
18177          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18178 $as_echo X/"$0" |
18179     sed '/^.*\/\([^/][^/]*\)\/*$/{
18180             s//\1/
18181             q
18182           }
18183           /^X\/\(\/\/\)$/{
18184             s//\1/
18185             q
18186           }
18187           /^X\/\(\/\).*/{
18188             s//\1/
18189             q
18190           }
18191           s/.*/./; q'`
18192
18193 # Avoid depending upon Character Ranges.
18194 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18195 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18196 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18197 as_cr_digits='0123456789'
18198 as_cr_alnum=$as_cr_Letters$as_cr_digits
18199
18200 ECHO_C= ECHO_N= ECHO_T=
18201 case `echo -n x` in #(((((
18202 -n*)
18203   case `echo 'xy\c'` in
18204   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
18205   xy)  ECHO_C='\c';;
18206   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
18207        ECHO_T=' ';;
18208   esac;;
18209 *)
18210   ECHO_N='-n';;
18211 esac
18212
18213 rm -f conf$$ conf$$.exe conf$$.file
18214 if test -d conf$$.dir; then
18215   rm -f conf$$.dir/conf$$.file
18216 else
18217   rm -f conf$$.dir
18218   mkdir conf$$.dir 2>/dev/null
18219 fi
18220 if (echo >conf$$.file) 2>/dev/null; then
18221   if ln -s conf$$.file conf$$ 2>/dev/null; then
18222     as_ln_s='ln -s'
18223     # ... but there are two gotchas:
18224     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18225     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18226     # In both cases, we have to default to `cp -pR'.
18227     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18228       as_ln_s='cp -pR'
18229   elif ln conf$$.file conf$$ 2>/dev/null; then
18230     as_ln_s=ln
18231   else
18232     as_ln_s='cp -pR'
18233   fi
18234 else
18235   as_ln_s='cp -pR'
18236 fi
18237 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18238 rmdir conf$$.dir 2>/dev/null
18239
18240
18241 # as_fn_mkdir_p
18242 # -------------
18243 # Create "$as_dir" as a directory, including parents if necessary.
18244 as_fn_mkdir_p ()
18245 {
18246
18247   case $as_dir in #(
18248   -*) as_dir=./$as_dir;;
18249   esac
18250   test -d "$as_dir" || eval $as_mkdir_p || {
18251     as_dirs=
18252     while :; do
18253       case $as_dir in #(
18254       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18255       *) as_qdir=$as_dir;;
18256       esac
18257       as_dirs="'$as_qdir' $as_dirs"
18258       as_dir=`$as_dirname -- "$as_dir" ||
18259 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18260          X"$as_dir" : 'X\(//\)[^/]' \| \
18261          X"$as_dir" : 'X\(//\)$' \| \
18262          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18263 $as_echo X"$as_dir" |
18264     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18265             s//\1/
18266             q
18267           }
18268           /^X\(\/\/\)[^/].*/{
18269             s//\1/
18270             q
18271           }
18272           /^X\(\/\/\)$/{
18273             s//\1/
18274             q
18275           }
18276           /^X\(\/\).*/{
18277             s//\1/
18278             q
18279           }
18280           s/.*/./; q'`
18281       test -d "$as_dir" && break
18282     done
18283     test -z "$as_dirs" || eval "mkdir $as_dirs"
18284   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
18285
18286
18287 } # as_fn_mkdir_p
18288 if mkdir -p . 2>/dev/null; then
18289   as_mkdir_p='mkdir -p "$as_dir"'
18290 else
18291   test -d ./-p && rmdir ./-p
18292   as_mkdir_p=false
18293 fi
18294
18295
18296 # as_fn_executable_p FILE
18297 # -----------------------
18298 # Test if FILE is an executable regular file.
18299 as_fn_executable_p ()
18300 {
18301   test -f "$1" && test -x "$1"
18302 } # as_fn_executable_p
18303 as_test_x='test -x'
18304 as_executable_p=as_fn_executable_p
18305
18306 # Sed expression to map a string onto a valid CPP name.
18307 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18308
18309 # Sed expression to map a string onto a valid variable name.
18310 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18311
18312
18313 exec 6>&1
18314 ## ----------------------------------- ##
18315 ## Main body of $CONFIG_STATUS script. ##
18316 ## ----------------------------------- ##
18317 _ASEOF
18318 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18319
18320 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18321 # Save the log message, to keep $0 and so on meaningful, and to
18322 # report actual input values of CONFIG_FILES etc. instead of their
18323 # values after options handling.
18324 ac_log="
18325 This file was extended by $as_me, which was
18326 generated by GNU Autoconf 2.69.  Invocation command line was
18327
18328   CONFIG_FILES    = $CONFIG_FILES
18329   CONFIG_HEADERS  = $CONFIG_HEADERS
18330   CONFIG_LINKS    = $CONFIG_LINKS
18331   CONFIG_COMMANDS = $CONFIG_COMMANDS
18332   $ $0 $@
18333
18334 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18335 "
18336
18337 _ACEOF
18338
18339 case $ac_config_files in *"
18340 "*) set x $ac_config_files; shift; ac_config_files=$*;;
18341 esac
18342
18343 case $ac_config_headers in *"
18344 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18345 esac
18346
18347
18348 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18349 # Files that config.status was made for.
18350 config_files="$ac_config_files"
18351 config_headers="$ac_config_headers"
18352 config_links="$ac_config_links"
18353 config_commands="$ac_config_commands"
18354
18355 _ACEOF
18356
18357 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18358 ac_cs_usage="\
18359 \`$as_me' instantiates files and other configuration actions
18360 from templates according to the current configuration.  Unless the files
18361 and actions are specified as TAGs, all are instantiated by default.
18362
18363 Usage: $0 [OPTION]... [TAG]...
18364
18365   -h, --help       print this help, then exit
18366   -V, --version    print version number and configuration settings, then exit
18367       --config     print configuration, then exit
18368   -q, --quiet, --silent
18369                    do not print progress messages
18370   -d, --debug      don't remove temporary files
18371       --recheck    update $as_me by reconfiguring in the same conditions
18372       --file=FILE[:TEMPLATE]
18373                    instantiate the configuration file FILE
18374       --header=FILE[:TEMPLATE]
18375                    instantiate the configuration header FILE
18376
18377 Configuration files:
18378 $config_files
18379
18380 Configuration headers:
18381 $config_headers
18382
18383 Configuration links:
18384 $config_links
18385
18386 Configuration commands:
18387 $config_commands
18388
18389 Report bugs to the package provider."
18390
18391 _ACEOF
18392 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18393 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
18394 ac_cs_version="\\
18395 config.status
18396 configured by $0, generated by GNU Autoconf 2.69,
18397   with options \\"\$ac_cs_config\\"
18398
18399 Copyright (C) 2012 Free Software Foundation, Inc.
18400 This config.status script is free software; the Free Software Foundation
18401 gives unlimited permission to copy, distribute and modify it."
18402
18403 ac_pwd='$ac_pwd'
18404 srcdir='$srcdir'
18405 INSTALL='$INSTALL'
18406 AWK='$AWK'
18407 test -n "\$AWK" || AWK=awk
18408 _ACEOF
18409
18410 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18411 # The default lists apply if the user does not specify any file.
18412 ac_need_defaults=:
18413 while test $# != 0
18414 do
18415   case $1 in
18416   --*=?*)
18417     ac_option=`expr "X$1" : 'X\([^=]*\)='`
18418     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18419     ac_shift=:
18420     ;;
18421   --*=)
18422     ac_option=`expr "X$1" : 'X\([^=]*\)='`
18423     ac_optarg=
18424     ac_shift=:
18425     ;;
18426   *)
18427     ac_option=$1
18428     ac_optarg=$2
18429     ac_shift=shift
18430     ;;
18431   esac
18432
18433   case $ac_option in
18434   # Handling of the options.
18435   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18436     ac_cs_recheck=: ;;
18437   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18438     $as_echo "$ac_cs_version"; exit ;;
18439   --config | --confi | --conf | --con | --co | --c )
18440     $as_echo "$ac_cs_config"; exit ;;
18441   --debug | --debu | --deb | --de | --d | -d )
18442     debug=: ;;
18443   --file | --fil | --fi | --f )
18444     $ac_shift
18445     case $ac_optarg in
18446     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18447     '') as_fn_error $? "missing file argument" ;;
18448     esac
18449     as_fn_append CONFIG_FILES " '$ac_optarg'"
18450     ac_need_defaults=false;;
18451   --header | --heade | --head | --hea )
18452     $ac_shift
18453     case $ac_optarg in
18454     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18455     esac
18456     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
18457     ac_need_defaults=false;;
18458   --he | --h)
18459     # Conflict between --help and --header
18460     as_fn_error $? "ambiguous option: \`$1'
18461 Try \`$0 --help' for more information.";;
18462   --help | --hel | -h )
18463     $as_echo "$ac_cs_usage"; exit ;;
18464   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18465   | -silent | --silent | --silen | --sile | --sil | --si | --s)
18466     ac_cs_silent=: ;;
18467
18468   # This is an error.
18469   -*) as_fn_error $? "unrecognized option: \`$1'
18470 Try \`$0 --help' for more information." ;;
18471
18472   *) as_fn_append ac_config_targets " $1"
18473      ac_need_defaults=false ;;
18474
18475   esac
18476   shift
18477 done
18478
18479 ac_configure_extra_args=
18480
18481 if $ac_cs_silent; then
18482   exec 6>/dev/null
18483   ac_configure_extra_args="$ac_configure_extra_args --silent"
18484 fi
18485
18486 _ACEOF
18487 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18488 if \$ac_cs_recheck; then
18489   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18490   shift
18491   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18492   CONFIG_SHELL='$SHELL'
18493   export CONFIG_SHELL
18494   exec "\$@"
18495 fi
18496
18497 _ACEOF
18498 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18499 exec 5>>config.log
18500 {
18501   echo
18502   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18503 ## Running $as_me. ##
18504 _ASBOX
18505   $as_echo "$ac_log"
18506 } >&5
18507
18508 _ACEOF
18509 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18510 #
18511 # INIT-COMMANDS
18512 #
18513 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
18514
18515 _ACEOF
18516
18517 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18518
18519 # Handling of arguments.
18520 for ac_config_target in $ac_config_targets
18521 do
18522   case $ac_config_target in
18523     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18524     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
18525     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
18526     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
18527     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
18528     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18529     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
18530     "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
18531     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
18532     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
18533
18534   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
18535   esac
18536 done
18537
18538
18539 # If the user did not use the arguments to specify the items to instantiate,
18540 # then the envvar interface is used.  Set only those that are not.
18541 # We use the long form for the default assignment because of an extremely
18542 # bizarre bug on SunOS 4.1.3.
18543 if $ac_need_defaults; then
18544   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18545   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18546   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18547   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18548 fi
18549
18550 # Have a temporary directory for convenience.  Make it in the build tree
18551 # simply because there is no reason against having it here, and in addition,
18552 # creating and moving files from /tmp can sometimes cause problems.
18553 # Hook for its removal unless debugging.
18554 # Note that there is a small window in which the directory will not be cleaned:
18555 # after its creation but before its name has been assigned to `$tmp'.
18556 $debug ||
18557 {
18558   tmp= ac_tmp=
18559   trap 'exit_status=$?
18560   : "${ac_tmp:=$tmp}"
18561   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
18562 ' 0
18563   trap 'as_fn_exit 1' 1 2 13 15
18564 }
18565 # Create a (secure) tmp directory for tmp files.
18566
18567 {
18568   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18569   test -d "$tmp"
18570 }  ||
18571 {
18572   tmp=./conf$$-$RANDOM
18573   (umask 077 && mkdir "$tmp")
18574 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18575 ac_tmp=$tmp
18576
18577 # Set up the scripts for CONFIG_FILES section.
18578 # No need to generate them if there are no CONFIG_FILES.
18579 # This happens for instance with `./config.status config.h'.
18580 if test -n "$CONFIG_FILES"; then
18581
18582 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18583   ac_cs_awk_getline=:
18584   ac_cs_awk_pipe_init=
18585   ac_cs_awk_read_file='
18586       while ((getline aline < (F[key])) > 0)
18587         print(aline)
18588       close(F[key])'
18589   ac_cs_awk_pipe_fini=
18590 else
18591   ac_cs_awk_getline=false
18592   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18593   ac_cs_awk_read_file='
18594       print "|#_!!_#|"
18595       print "cat " F[key] " &&"
18596       '$ac_cs_awk_pipe_init
18597   # The final `:' finishes the AND list.
18598   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18599 fi
18600 ac_cr=`echo X | tr X '\015'`
18601 # On cygwin, bash can eat \r inside `` if the user requested igncr.
18602 # But we know of no other shell where ac_cr would be empty at this
18603 # point, so we can use a bashism as a fallback.
18604 if test "x$ac_cr" = x; then
18605   eval ac_cr=\$\'\\r\'
18606 fi
18607 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18608 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18609   ac_cs_awk_cr='\\r'
18610 else
18611   ac_cs_awk_cr=$ac_cr
18612 fi
18613
18614 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
18615 _ACEOF
18616
18617 # Create commands to substitute file output variables.
18618 {
18619   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18620   echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
18621   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18622   echo "_ACAWK" &&
18623   echo "_ACEOF"
18624 } >conf$$files.sh &&
18625 . ./conf$$files.sh ||
18626   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18627 rm -f conf$$files.sh
18628
18629 {
18630   echo "cat >conf$$subs.awk <<_ACEOF" &&
18631   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18632   echo "_ACEOF"
18633 } >conf$$subs.sh ||
18634   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18635 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
18636 ac_delim='%!_!# '
18637 for ac_last_try in false false false false false :; do
18638   . ./conf$$subs.sh ||
18639     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18640
18641   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18642   if test $ac_delim_n = $ac_delim_num; then
18643     break
18644   elif $ac_last_try; then
18645     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18646   else
18647     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18648   fi
18649 done
18650 rm -f conf$$subs.sh
18651
18652 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18653 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
18654 _ACEOF
18655 sed -n '
18656 h
18657 s/^/S["/; s/!.*/"]=/
18658 p
18659 g
18660 s/^[^!]*!//
18661 :repl
18662 t repl
18663 s/'"$ac_delim"'$//
18664 t delim
18665 :nl
18666 h
18667 s/\(.\{148\}\)..*/\1/
18668 t more1
18669 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18670 p
18671 n
18672 b repl
18673 :more1
18674 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18675 p
18676 g
18677 s/.\{148\}//
18678 t nl
18679 :delim
18680 h
18681 s/\(.\{148\}\)..*/\1/
18682 t more2
18683 s/["\\]/\\&/g; s/^/"/; s/$/"/
18684 p
18685 b
18686 :more2
18687 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18688 p
18689 g
18690 s/.\{148\}//
18691 t delim
18692 ' <conf$$subs.awk | sed '
18693 /^[^""]/{
18694   N
18695   s/\n//
18696 }
18697 ' >>$CONFIG_STATUS || ac_write_fail=1
18698 rm -f conf$$subs.awk
18699 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18700 _ACAWK
18701 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
18702   for (key in S) S_is_set[key] = 1
18703   FS = "\a"
18704   \$ac_cs_awk_pipe_init
18705 }
18706 {
18707   line = $ 0
18708   nfields = split(line, field, "@")
18709   substed = 0
18710   len = length(field[1])
18711   for (i = 2; i < nfields; i++) {
18712     key = field[i]
18713     keylen = length(key)
18714     if (S_is_set[key]) {
18715       value = S[key]
18716       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18717       len += length(value) + length(field[++i])
18718       substed = 1
18719     } else
18720       len += 1 + keylen
18721   }
18722   if (nfields == 3 && !substed) {
18723     key = field[2]
18724     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
18725       \$ac_cs_awk_read_file
18726       next
18727     }
18728   }
18729   print line
18730 }
18731 \$ac_cs_awk_pipe_fini
18732 _ACAWK
18733 _ACEOF
18734 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18735 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18736   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18737 else
18738   cat
18739 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18740   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
18741 _ACEOF
18742
18743 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18744 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
18745 # trailing colons and then remove the whole line if VPATH becomes empty
18746 # (actually we leave an empty line to preserve line numbers).
18747 if test "x$srcdir" = x.; then
18748   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
18749 h
18750 s///
18751 s/^/:/
18752 s/[      ]*$/:/
18753 s/:\$(srcdir):/:/g
18754 s/:\${srcdir}:/:/g
18755 s/:@srcdir@:/:/g
18756 s/^:*//
18757 s/:*$//
18758 x
18759 s/\(=[   ]*\).*/\1/
18760 G
18761 s/\n//
18762 s/^[^=]*=[       ]*$//
18763 }'
18764 fi
18765
18766 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18767 fi # test -n "$CONFIG_FILES"
18768
18769 # Set up the scripts for CONFIG_HEADERS section.
18770 # No need to generate them if there are no CONFIG_HEADERS.
18771 # This happens for instance with `./config.status Makefile'.
18772 if test -n "$CONFIG_HEADERS"; then
18773 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
18774 BEGIN {
18775 _ACEOF
18776
18777 # Transform confdefs.h into an awk script `defines.awk', embedded as
18778 # here-document in config.status, that substitutes the proper values into
18779 # config.h.in to produce config.h.
18780
18781 # Create a delimiter string that does not exist in confdefs.h, to ease
18782 # handling of long lines.
18783 ac_delim='%!_!# '
18784 for ac_last_try in false false :; do
18785   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18786   if test -z "$ac_tt"; then
18787     break
18788   elif $ac_last_try; then
18789     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
18790   else
18791     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18792   fi
18793 done
18794
18795 # For the awk script, D is an array of macro values keyed by name,
18796 # likewise P contains macro parameters if any.  Preserve backslash
18797 # newline sequences.
18798
18799 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18800 sed -n '
18801 s/.\{148\}/&'"$ac_delim"'/g
18802 t rset
18803 :rset
18804 s/^[     ]*#[    ]*define[       ][      ]*/ /
18805 t def
18806 d
18807 :def
18808 s/\\$//
18809 t bsnl
18810 s/["\\]/\\&/g
18811 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18812 D["\1"]=" \3"/p
18813 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
18814 d
18815 :bsnl
18816 s/["\\]/\\&/g
18817 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18818 D["\1"]=" \3\\\\\\n"\\/p
18819 t cont
18820 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18821 t cont
18822 d
18823 :cont
18824 n
18825 s/.\{148\}/&'"$ac_delim"'/g
18826 t clear
18827 :clear
18828 s/\\$//
18829 t bsnlc
18830 s/["\\]/\\&/g; s/^/"/; s/$/"/p
18831 d
18832 :bsnlc
18833 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18834 b cont
18835 ' <confdefs.h | sed '
18836 s/'"$ac_delim"'/"\\\
18837 "/g' >>$CONFIG_STATUS || ac_write_fail=1
18838
18839 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18840   for (key in D) D_is_set[key] = 1
18841   FS = "\a"
18842 }
18843 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18844   line = \$ 0
18845   split(line, arg, " ")
18846   if (arg[1] == "#") {
18847     defundef = arg[2]
18848     mac1 = arg[3]
18849   } else {
18850     defundef = substr(arg[1], 2)
18851     mac1 = arg[2]
18852   }
18853   split(mac1, mac2, "(") #)
18854   macro = mac2[1]
18855   prefix = substr(line, 1, index(line, defundef) - 1)
18856   if (D_is_set[macro]) {
18857     # Preserve the white space surrounding the "#".
18858     print prefix "define", macro P[macro] D[macro]
18859     next
18860   } else {
18861     # Replace #undef with comments.  This is necessary, for example,
18862     # in the case of _POSIX_SOURCE, which is predefined and required
18863     # on some systems where configure will not decide to define it.
18864     if (defundef == "undef") {
18865       print "/*", prefix defundef, macro, "*/"
18866       next
18867     }
18868   }
18869 }
18870 { print }
18871 _ACAWK
18872 _ACEOF
18873 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18874   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
18875 fi # test -n "$CONFIG_HEADERS"
18876
18877
18878 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
18879 shift
18880 for ac_tag
18881 do
18882   case $ac_tag in
18883   :[FHLC]) ac_mode=$ac_tag; continue;;
18884   esac
18885   case $ac_mode$ac_tag in
18886   :[FHL]*:*);;
18887   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
18888   :[FH]-) ac_tag=-:-;;
18889   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18890   esac
18891   ac_save_IFS=$IFS
18892   IFS=:
18893   set x $ac_tag
18894   IFS=$ac_save_IFS
18895   shift
18896   ac_file=$1
18897   shift
18898
18899   case $ac_mode in
18900   :L) ac_source=$1;;
18901   :[FH])
18902     ac_file_inputs=
18903     for ac_f
18904     do
18905       case $ac_f in
18906       -) ac_f="$ac_tmp/stdin";;
18907       *) # Look for the file first in the build tree, then in the source tree
18908          # (if the path is not absolute).  The absolute path cannot be DOS-style,
18909          # because $ac_f cannot contain `:'.
18910          test -f "$ac_f" ||
18911            case $ac_f in
18912            [\\/$]*) false;;
18913            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18914            esac ||
18915            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18916       esac
18917       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18918       as_fn_append ac_file_inputs " '$ac_f'"
18919     done
18920
18921     # Let's still pretend it is `configure' which instantiates (i.e., don't
18922     # use $as_me), people would be surprised to read:
18923     #    /* config.h.  Generated by config.status.  */
18924     configure_input='Generated from '`
18925           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18926         `' by configure.'
18927     if test x"$ac_file" != x-; then
18928       configure_input="$ac_file.  $configure_input"
18929       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18930 $as_echo "$as_me: creating $ac_file" >&6;}
18931     fi
18932     # Neutralize special characters interpreted by sed in replacement strings.
18933     case $configure_input in #(
18934     *\&* | *\|* | *\\* )
18935        ac_sed_conf_input=`$as_echo "$configure_input" |
18936        sed 's/[\\\\&|]/\\\\&/g'`;; #(
18937     *) ac_sed_conf_input=$configure_input;;
18938     esac
18939
18940     case $ac_tag in
18941     *:-:* | *:-) cat >"$ac_tmp/stdin" \
18942       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
18943     esac
18944     ;;
18945   esac
18946
18947   ac_dir=`$as_dirname -- "$ac_file" ||
18948 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18949          X"$ac_file" : 'X\(//\)[^/]' \| \
18950          X"$ac_file" : 'X\(//\)$' \| \
18951          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18952 $as_echo X"$ac_file" |
18953     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18954             s//\1/
18955             q
18956           }
18957           /^X\(\/\/\)[^/].*/{
18958             s//\1/
18959             q
18960           }
18961           /^X\(\/\/\)$/{
18962             s//\1/
18963             q
18964           }
18965           /^X\(\/\).*/{
18966             s//\1/
18967             q
18968           }
18969           s/.*/./; q'`
18970   as_dir="$ac_dir"; as_fn_mkdir_p
18971   ac_builddir=.
18972
18973 case "$ac_dir" in
18974 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18975 *)
18976   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18977   # A ".." for each directory in $ac_dir_suffix.
18978   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18979   case $ac_top_builddir_sub in
18980   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18981   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18982   esac ;;
18983 esac
18984 ac_abs_top_builddir=$ac_pwd
18985 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18986 # for backward compatibility:
18987 ac_top_builddir=$ac_top_build_prefix
18988
18989 case $srcdir in
18990   .)  # We are building in place.
18991     ac_srcdir=.
18992     ac_top_srcdir=$ac_top_builddir_sub
18993     ac_abs_top_srcdir=$ac_pwd ;;
18994   [\\/]* | ?:[\\/]* )  # Absolute name.
18995     ac_srcdir=$srcdir$ac_dir_suffix;
18996     ac_top_srcdir=$srcdir
18997     ac_abs_top_srcdir=$srcdir ;;
18998   *) # Relative name.
18999     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19000     ac_top_srcdir=$ac_top_build_prefix$srcdir
19001     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19002 esac
19003 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19004
19005
19006   case $ac_mode in
19007   :F)
19008   #
19009   # CONFIG_FILE
19010   #
19011
19012   case $INSTALL in
19013   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19014   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
19015   esac
19016 _ACEOF
19017
19018 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19019 # If the template does not know about datarootdir, expand it.
19020 # FIXME: This hack should be removed a few years after 2.60.
19021 ac_datarootdir_hack=; ac_datarootdir_seen=
19022 ac_sed_dataroot='
19023 /datarootdir/ {
19024   p
19025   q
19026 }
19027 /@datadir@/p
19028 /@docdir@/p
19029 /@infodir@/p
19030 /@localedir@/p
19031 /@mandir@/p'
19032 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19033 *datarootdir*) ac_datarootdir_seen=yes;;
19034 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19035   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19036 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19037 _ACEOF
19038 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19039   ac_datarootdir_hack='
19040   s&@datadir@&$datadir&g
19041   s&@docdir@&$docdir&g
19042   s&@infodir@&$infodir&g
19043   s&@localedir@&$localedir&g
19044   s&@mandir@&$mandir&g
19045   s&\\\${datarootdir}&$datarootdir&g' ;;
19046 esac
19047 _ACEOF
19048
19049 # Neutralize VPATH when `$srcdir' = `.'.
19050 # Shell code in configure.ac might set extrasub.
19051 # FIXME: do we really want to maintain this feature?
19052 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19053 ac_sed_extra="$ac_vpsub
19054 $extrasub
19055 _ACEOF
19056 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19057 :t
19058 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19059 s|@configure_input@|$ac_sed_conf_input|;t t
19060 s&@top_builddir@&$ac_top_builddir_sub&;t t
19061 s&@top_build_prefix@&$ac_top_build_prefix&;t t
19062 s&@srcdir@&$ac_srcdir&;t t
19063 s&@abs_srcdir@&$ac_abs_srcdir&;t t
19064 s&@top_srcdir@&$ac_top_srcdir&;t t
19065 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19066 s&@builddir@&$ac_builddir&;t t
19067 s&@abs_builddir@&$ac_abs_builddir&;t t
19068 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19069 s&@INSTALL@&$ac_INSTALL&;t t
19070 $ac_datarootdir_hack
19071 "
19072 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19073 if $ac_cs_awk_getline; then
19074   $AWK -f "$ac_tmp/subs.awk"
19075 else
19076   $AWK -f "$ac_tmp/subs.awk" | $SHELL
19077 fi \
19078   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19079
19080 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
19081   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19082   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
19083       "$ac_tmp/out"`; test -z "$ac_out"; } &&
19084   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19085 which seems to be undefined.  Please make sure it is defined" >&5
19086 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19087 which seems to be undefined.  Please make sure it is defined" >&2;}
19088
19089   rm -f "$ac_tmp/stdin"
19090   case $ac_file in
19091   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19092   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
19093   esac \
19094   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19095  ;;
19096   :H)
19097   #
19098   # CONFIG_HEADER
19099   #
19100   if test x"$ac_file" != x-; then
19101     {
19102       $as_echo "/* $configure_input  */" \
19103       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19104     } >"$ac_tmp/config.h" \
19105       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19106     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
19107       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19108 $as_echo "$as_me: $ac_file is unchanged" >&6;}
19109     else
19110       rm -f "$ac_file"
19111       mv "$ac_tmp/config.h" "$ac_file" \
19112         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19113     fi
19114   else
19115     $as_echo "/* $configure_input  */" \
19116       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19117       || as_fn_error $? "could not create -" "$LINENO" 5
19118   fi
19119  ;;
19120   :L)
19121   #
19122   # CONFIG_LINK
19123   #
19124
19125   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19126     :
19127   else
19128     # Prefer the file from the source tree if names are identical.
19129     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19130       ac_source=$srcdir/$ac_source
19131     fi
19132
19133     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19134 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
19135
19136     if test ! -r "$ac_source"; then
19137       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
19138     fi
19139     rm -f "$ac_file"
19140
19141     # Try a relative symlink, then a hard link, then a copy.
19142     case $ac_source in
19143     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19144         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19145     esac
19146     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19147       ln "$ac_source" "$ac_file" 2>/dev/null ||
19148       cp -p "$ac_source" "$ac_file" ||
19149       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
19150   fi
19151  ;;
19152   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19153 $as_echo "$as_me: executing $ac_file commands" >&6;}
19154  ;;
19155   esac
19156
19157
19158   case $ac_file$ac_mode in
19159     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
19160     "gcore":F) chmod +x gcore ;;
19161     "Makefile":F)
19162 case x$CONFIG_HEADERS in
19163 xconfig.h:config.in)
19164 echo > stamp-h ;;
19165 esac
19166  ;;
19167     "gdb-gdb.gdb":F)
19168 case x$CONFIG_HEADERS in
19169 xconfig.h:config.in)
19170 echo > stamp-h ;;
19171 esac
19172  ;;
19173     "gdb-gdb.py":F)
19174 case x$CONFIG_HEADERS in
19175 xconfig.h:config.in)
19176 echo > stamp-h ;;
19177 esac
19178  ;;
19179     "doc/Makefile":F)
19180 case x$CONFIG_HEADERS in
19181 xconfig.h:config.in)
19182 echo > stamp-h ;;
19183 esac
19184  ;;
19185     "data-directory/Makefile":F)
19186 case x$CONFIG_HEADERS in
19187 xconfig.h:config.in)
19188 echo > stamp-h ;;
19189 esac
19190  ;;
19191
19192   esac
19193 done # for ac_tag
19194
19195
19196 as_fn_exit 0
19197 _ACEOF
19198 ac_clean_files=$ac_clean_files_save
19199
19200 test $ac_write_fail = 0 ||
19201   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
19202
19203
19204 # configure is writing to config.log, and then calls config.status.
19205 # config.status does its own redirection, appending to config.log.
19206 # Unfortunately, on DOS this fails, as config.log is still kept open
19207 # by configure, so config.status won't be able to write to it; its
19208 # output is simply discarded.  So we exec the FD to /dev/null,
19209 # effectively closing config.log, so it can be properly (re)opened and
19210 # appended to by config.status.  When coming back to configure, we
19211 # need to make the FD available again.
19212 if test "$no_create" != yes; then
19213   ac_cs_success=:
19214   ac_config_status_args=
19215   test "$silent" = yes &&
19216     ac_config_status_args="$ac_config_status_args --quiet"
19217   exec 5>/dev/null
19218   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19219   exec 5>>config.log
19220   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19221   # would make configure fail if this is the last instruction.
19222   $ac_cs_success || as_fn_exit 1
19223 fi
19224
19225 #
19226 # CONFIG_SUBDIRS section.
19227 #
19228 if test "$no_recursion" != yes; then
19229
19230   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19231   # so they do not pile up.
19232   ac_sub_configure_args=
19233   ac_prev=
19234   eval "set x $ac_configure_args"
19235   shift
19236   for ac_arg
19237   do
19238     if test -n "$ac_prev"; then
19239       ac_prev=
19240       continue
19241     fi
19242     case $ac_arg in
19243     -cache-file | --cache-file | --cache-fil | --cache-fi \
19244     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19245       ac_prev=cache_file ;;
19246     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
19247     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19248     | --c=*)
19249       ;;
19250     --config-cache | -C)
19251       ;;
19252     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19253       ac_prev=srcdir ;;
19254     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19255       ;;
19256     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19257       ac_prev=prefix ;;
19258     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19259       ;;
19260     --disable-option-checking)
19261       ;;
19262     *)
19263       case $ac_arg in
19264       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19265       esac
19266       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
19267     esac
19268   done
19269
19270   # Always prepend --prefix to ensure using the same prefix
19271   # in subdir configurations.
19272   ac_arg="--prefix=$prefix"
19273   case $ac_arg in
19274   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19275   esac
19276   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19277
19278   # Pass --silent
19279   if test "$silent" = yes; then
19280     ac_sub_configure_args="--silent $ac_sub_configure_args"
19281   fi
19282
19283   # Always prepend --disable-option-checking to silence warnings, since
19284   # different subdirs can have different --enable and --with options.
19285   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
19286
19287   ac_popdir=`pwd`
19288   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
19289
19290     # Do not complain, so a configure script can configure whichever
19291     # parts of a large source tree are present.
19292     test -d "$srcdir/$ac_dir" || continue
19293
19294     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19295     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19296     $as_echo "$ac_msg" >&6
19297     as_dir="$ac_dir"; as_fn_mkdir_p
19298     ac_builddir=.
19299
19300 case "$ac_dir" in
19301 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19302 *)
19303   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19304   # A ".." for each directory in $ac_dir_suffix.
19305   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19306   case $ac_top_builddir_sub in
19307   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19308   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19309   esac ;;
19310 esac
19311 ac_abs_top_builddir=$ac_pwd
19312 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19313 # for backward compatibility:
19314 ac_top_builddir=$ac_top_build_prefix
19315
19316 case $srcdir in
19317   .)  # We are building in place.
19318     ac_srcdir=.
19319     ac_top_srcdir=$ac_top_builddir_sub
19320     ac_abs_top_srcdir=$ac_pwd ;;
19321   [\\/]* | ?:[\\/]* )  # Absolute name.
19322     ac_srcdir=$srcdir$ac_dir_suffix;
19323     ac_top_srcdir=$srcdir
19324     ac_abs_top_srcdir=$srcdir ;;
19325   *) # Relative name.
19326     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19327     ac_top_srcdir=$ac_top_build_prefix$srcdir
19328     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19329 esac
19330 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19331
19332
19333     cd "$ac_dir"
19334
19335     # Check for guested configure; otherwise get Cygnus style configure.
19336     if test -f "$ac_srcdir/configure.gnu"; then
19337       ac_sub_configure=$ac_srcdir/configure.gnu
19338     elif test -f "$ac_srcdir/configure"; then
19339       ac_sub_configure=$ac_srcdir/configure
19340     elif test -f "$ac_srcdir/configure.in"; then
19341       # This should be Cygnus configure.
19342       ac_sub_configure=$ac_aux_dir/configure
19343     else
19344       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19345 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
19346       ac_sub_configure=
19347     fi
19348
19349     # The recursion is here.
19350     if test -n "$ac_sub_configure"; then
19351       # Make the cache file name correct relative to the subdirectory.
19352       case $cache_file in
19353       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
19354       *) # Relative name.
19355         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
19356       esac
19357
19358       { $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
19359 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
19360       # The eval makes quoting arguments work.
19361       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19362            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
19363         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
19364     fi
19365
19366     cd "$ac_popdir"
19367   done
19368 fi
19369 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19370   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19371 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19372 fi
19373