gdb/riscv: Use legacy register numbers in default target description
[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 SRCHIGH_CFLAGS
705 SRCHIGH_LIBS
706 HAVE_GUILE_FALSE
707 HAVE_GUILE_TRUE
708 GUILE_LIBS
709 GUILE_CPPFLAGS
710 GUILD_TARGET_FLAG
711 GUILD
712 pkg_config_prog_path
713 HAVE_PYTHON_FALSE
714 HAVE_PYTHON_TRUE
715 PYTHON_LIBS
716 PYTHON_CPPFLAGS
717 PYTHON_CFLAGS
718 python_prog_path
719 LTLIBMPFR
720 LIBMPFR
721 HAVE_LIBMPFR
722 LTLIBEXPAT
723 LIBEXPAT
724 HAVE_LIBEXPAT
725 JIT_READER_DIR
726 TARGET_PTR
727 READLINE_TEXI_INCFLAG
728 READLINE_CFLAGS
729 READLINE_DEPS
730 READLINE
731 LTLIBICONV
732 LIBICONV
733 zlibinc
734 zlibdir
735 MIG
736 WINDRES
737 DLLTOOL
738 AR
739 YFLAGS
740 YACC
741 RANLIB
742 LN_S
743 INSTALL_DATA
744 INSTALL_SCRIPT
745 INSTALL_PROGRAM
746 AWK
747 REPORT_BUGS_TEXI
748 REPORT_BUGS_TO
749 PKGVERSION
750 CODESIGN_CERT
751 HAVE_NATIVE_GCORE_TARGET
752 TARGET_OBS
753 subdirs
754 GDB_DATADIR
755 DEBUGDIR
756 MAKEINFO_EXTRA_FLAGS
757 MAKEINFOFLAGS
758 MAKEINFO
759 PACKAGE
760 GNULIB_STDINT_H
761 CATOBJEXT
762 GENCAT
763 INSTOBJEXT
764 DATADIRNAME
765 CATALOGS
766 POSUB
767 GMSGFMT
768 XGETTEXT
769 INCINTL
770 LIBINTL_DEP
771 LIBINTL
772 USE_NLS
773 CCDEPMODE
774 DEPDIR
775 am__leading_dot
776 CXX_DIALECT
777 HAVE_CXX11
778 INSTALL_STRIP_PROGRAM
779 STRIP
780 install_sh
781 target_os
782 target_vendor
783 target_cpu
784 target
785 host_os
786 host_vendor
787 host_cpu
788 host
789 build_os
790 build_vendor
791 build_cpu
792 build
793 EGREP
794 GREP
795 CPP
796 ac_ct_CXX
797 CXXFLAGS
798 CXX
799 OBJEXT
800 EXEEXT
801 ac_ct_CC
802 CPPFLAGS
803 LDFLAGS
804 CFLAGS
805 CC
806 MAINT
807 MAINTAINER_MODE_FALSE
808 MAINTAINER_MODE_TRUE
809 target_alias
810 host_alias
811 build_alias
812 LIBS
813 ECHO_T
814 ECHO_N
815 ECHO_C
816 DEFS
817 mandir
818 localedir
819 libdir
820 psdir
821 pdfdir
822 dvidir
823 htmldir
824 infodir
825 docdir
826 oldincludedir
827 includedir
828 localstatedir
829 sharedstatedir
830 sysconfdir
831 datadir
832 datarootdir
833 libexecdir
834 sbindir
835 bindir
836 program_transform_name
837 prefix
838 exec_prefix
839 PACKAGE_URL
840 PACKAGE_BUGREPORT
841 PACKAGE_STRING
842 PACKAGE_VERSION
843 PACKAGE_TARNAME
844 PACKAGE_NAME
845 PATH_SEPARATOR
846 SHELL'
847 ac_subst_files='nat_makefile_frag'
848 ac_user_opts='
849 enable_option_checking
850 enable_maintainer_mode
851 enable_plugins
852 enable_largefile
853 with_separate_debug_dir
854 with_gdb_datadir
855 with_relocated_sources
856 with_auto_load_dir
857 with_auto_load_safe_path
858 enable_targets
859 enable_64_bit_bfd
860 enable_gdbmi
861 enable_tui
862 enable_gdbtk
863 with_libunwind_ia64
864 with_curses
865 enable_profiling
866 enable_codesign
867 with_pkgversion
868 with_bugurl
869 with_system_zlib
870 with_gnu_ld
871 enable_rpath
872 with_libiconv_prefix
873 with_iconv_bin
874 with_system_readline
875 with_jit_reader_dir
876 with_expat
877 with_libexpat_prefix
878 with_mpfr
879 with_libmpfr_prefix
880 with_python
881 with_guile
882 enable_libmcheck
883 with_intel_pt
884 with_libipt_prefix
885 with_included_regex
886 with_sysroot
887 with_system_gdbinit
888 enable_werror
889 enable_build_warnings
890 enable_gdb_build_warnings
891 enable_ubsan
892 with_lzma
893 with_liblzma_prefix
894 with_tcl
895 with_tk
896 with_x
897 enable_sim
898 enable_gdbserver
899 with_babeltrace
900 with_libbabeltrace_prefix
901 enable_unit_tests
902 '
903       ac_precious_vars='build_alias
904 host_alias
905 target_alias
906 CC
907 CFLAGS
908 LDFLAGS
909 LIBS
910 CPPFLAGS
911 CXX
912 CXXFLAGS
913 CCC
914 CPP
915 MAKEINFO
916 MAKEINFOFLAGS
917 YACC
918 YFLAGS
919 XMKMF'
920 ac_subdirs_all='testsuite
921 gdbtk
922 gdbserver'
923
924 # Initialize some variables set by options.
925 ac_init_help=
926 ac_init_version=false
927 ac_unrecognized_opts=
928 ac_unrecognized_sep=
929 # The variables have the same names as the options, with
930 # dashes changed to underlines.
931 cache_file=/dev/null
932 exec_prefix=NONE
933 no_create=
934 no_recursion=
935 prefix=NONE
936 program_prefix=NONE
937 program_suffix=NONE
938 program_transform_name=s,x,x,
939 silent=
940 site=
941 srcdir=
942 verbose=
943 x_includes=NONE
944 x_libraries=NONE
945
946 # Installation directory options.
947 # These are left unexpanded so users can "make install exec_prefix=/foo"
948 # and all the variables that are supposed to be based on exec_prefix
949 # by default will actually change.
950 # Use braces instead of parens because sh, perl, etc. also accept them.
951 # (The list follows the same order as the GNU Coding Standards.)
952 bindir='${exec_prefix}/bin'
953 sbindir='${exec_prefix}/sbin'
954 libexecdir='${exec_prefix}/libexec'
955 datarootdir='${prefix}/share'
956 datadir='${datarootdir}'
957 sysconfdir='${prefix}/etc'
958 sharedstatedir='${prefix}/com'
959 localstatedir='${prefix}/var'
960 includedir='${prefix}/include'
961 oldincludedir='/usr/include'
962 docdir='${datarootdir}/doc/${PACKAGE}'
963 infodir='${datarootdir}/info'
964 htmldir='${docdir}'
965 dvidir='${docdir}'
966 pdfdir='${docdir}'
967 psdir='${docdir}'
968 libdir='${exec_prefix}/lib'
969 localedir='${datarootdir}/locale'
970 mandir='${datarootdir}/man'
971
972 ac_prev=
973 ac_dashdash=
974 for ac_option
975 do
976   # If the previous option needs an argument, assign it.
977   if test -n "$ac_prev"; then
978     eval $ac_prev=\$ac_option
979     ac_prev=
980     continue
981   fi
982
983   case $ac_option in
984   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
985   *=)   ac_optarg= ;;
986   *)    ac_optarg=yes ;;
987   esac
988
989   # Accept the important Cygnus configure options, so we can diagnose typos.
990
991   case $ac_dashdash$ac_option in
992   --)
993     ac_dashdash=yes ;;
994
995   -bindir | --bindir | --bindi | --bind | --bin | --bi)
996     ac_prev=bindir ;;
997   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
998     bindir=$ac_optarg ;;
999
1000   -build | --build | --buil | --bui | --bu)
1001     ac_prev=build_alias ;;
1002   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1003     build_alias=$ac_optarg ;;
1004
1005   -cache-file | --cache-file | --cache-fil | --cache-fi \
1006   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1007     ac_prev=cache_file ;;
1008   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1009   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1010     cache_file=$ac_optarg ;;
1011
1012   --config-cache | -C)
1013     cache_file=config.cache ;;
1014
1015   -datadir | --datadir | --datadi | --datad)
1016     ac_prev=datadir ;;
1017   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1018     datadir=$ac_optarg ;;
1019
1020   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1021   | --dataroo | --dataro | --datar)
1022     ac_prev=datarootdir ;;
1023   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1024   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1025     datarootdir=$ac_optarg ;;
1026
1027   -disable-* | --disable-*)
1028     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1029     # Reject names that are not valid shell variable names.
1030     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1031       as_fn_error $? "invalid feature name: $ac_useropt"
1032     ac_useropt_orig=$ac_useropt
1033     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1034     case $ac_user_opts in
1035       *"
1036 "enable_$ac_useropt"
1037 "*) ;;
1038       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1039          ac_unrecognized_sep=', ';;
1040     esac
1041     eval enable_$ac_useropt=no ;;
1042
1043   -docdir | --docdir | --docdi | --doc | --do)
1044     ac_prev=docdir ;;
1045   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1046     docdir=$ac_optarg ;;
1047
1048   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1049     ac_prev=dvidir ;;
1050   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1051     dvidir=$ac_optarg ;;
1052
1053   -enable-* | --enable-*)
1054     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1055     # Reject names that are not valid shell variable names.
1056     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1057       as_fn_error $? "invalid feature name: $ac_useropt"
1058     ac_useropt_orig=$ac_useropt
1059     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1060     case $ac_user_opts in
1061       *"
1062 "enable_$ac_useropt"
1063 "*) ;;
1064       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1065          ac_unrecognized_sep=', ';;
1066     esac
1067     eval enable_$ac_useropt=\$ac_optarg ;;
1068
1069   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1070   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1071   | --exec | --exe | --ex)
1072     ac_prev=exec_prefix ;;
1073   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1074   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1075   | --exec=* | --exe=* | --ex=*)
1076     exec_prefix=$ac_optarg ;;
1077
1078   -gas | --gas | --ga | --g)
1079     # Obsolete; use --with-gas.
1080     with_gas=yes ;;
1081
1082   -help | --help | --hel | --he | -h)
1083     ac_init_help=long ;;
1084   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1085     ac_init_help=recursive ;;
1086   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1087     ac_init_help=short ;;
1088
1089   -host | --host | --hos | --ho)
1090     ac_prev=host_alias ;;
1091   -host=* | --host=* | --hos=* | --ho=*)
1092     host_alias=$ac_optarg ;;
1093
1094   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1095     ac_prev=htmldir ;;
1096   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1097   | --ht=*)
1098     htmldir=$ac_optarg ;;
1099
1100   -includedir | --includedir | --includedi | --included | --include \
1101   | --includ | --inclu | --incl | --inc)
1102     ac_prev=includedir ;;
1103   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1104   | --includ=* | --inclu=* | --incl=* | --inc=*)
1105     includedir=$ac_optarg ;;
1106
1107   -infodir | --infodir | --infodi | --infod | --info | --inf)
1108     ac_prev=infodir ;;
1109   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1110     infodir=$ac_optarg ;;
1111
1112   -libdir | --libdir | --libdi | --libd)
1113     ac_prev=libdir ;;
1114   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1115     libdir=$ac_optarg ;;
1116
1117   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1118   | --libexe | --libex | --libe)
1119     ac_prev=libexecdir ;;
1120   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1121   | --libexe=* | --libex=* | --libe=*)
1122     libexecdir=$ac_optarg ;;
1123
1124   -localedir | --localedir | --localedi | --localed | --locale)
1125     ac_prev=localedir ;;
1126   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1127     localedir=$ac_optarg ;;
1128
1129   -localstatedir | --localstatedir | --localstatedi | --localstated \
1130   | --localstate | --localstat | --localsta | --localst | --locals)
1131     ac_prev=localstatedir ;;
1132   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1133   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1134     localstatedir=$ac_optarg ;;
1135
1136   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1137     ac_prev=mandir ;;
1138   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1139     mandir=$ac_optarg ;;
1140
1141   -nfp | --nfp | --nf)
1142     # Obsolete; use --without-fp.
1143     with_fp=no ;;
1144
1145   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1146   | --no-cr | --no-c | -n)
1147     no_create=yes ;;
1148
1149   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1150   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1151     no_recursion=yes ;;
1152
1153   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1154   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1155   | --oldin | --oldi | --old | --ol | --o)
1156     ac_prev=oldincludedir ;;
1157   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1158   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1159   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1160     oldincludedir=$ac_optarg ;;
1161
1162   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1163     ac_prev=prefix ;;
1164   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1165     prefix=$ac_optarg ;;
1166
1167   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1168   | --program-pre | --program-pr | --program-p)
1169     ac_prev=program_prefix ;;
1170   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1171   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1172     program_prefix=$ac_optarg ;;
1173
1174   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1175   | --program-suf | --program-su | --program-s)
1176     ac_prev=program_suffix ;;
1177   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1178   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1179     program_suffix=$ac_optarg ;;
1180
1181   -program-transform-name | --program-transform-name \
1182   | --program-transform-nam | --program-transform-na \
1183   | --program-transform-n | --program-transform- \
1184   | --program-transform | --program-transfor \
1185   | --program-transfo | --program-transf \
1186   | --program-trans | --program-tran \
1187   | --progr-tra | --program-tr | --program-t)
1188     ac_prev=program_transform_name ;;
1189   -program-transform-name=* | --program-transform-name=* \
1190   | --program-transform-nam=* | --program-transform-na=* \
1191   | --program-transform-n=* | --program-transform-=* \
1192   | --program-transform=* | --program-transfor=* \
1193   | --program-transfo=* | --program-transf=* \
1194   | --program-trans=* | --program-tran=* \
1195   | --progr-tra=* | --program-tr=* | --program-t=*)
1196     program_transform_name=$ac_optarg ;;
1197
1198   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1199     ac_prev=pdfdir ;;
1200   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1201     pdfdir=$ac_optarg ;;
1202
1203   -psdir | --psdir | --psdi | --psd | --ps)
1204     ac_prev=psdir ;;
1205   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1206     psdir=$ac_optarg ;;
1207
1208   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1209   | -silent | --silent | --silen | --sile | --sil)
1210     silent=yes ;;
1211
1212   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1213     ac_prev=sbindir ;;
1214   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1215   | --sbi=* | --sb=*)
1216     sbindir=$ac_optarg ;;
1217
1218   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1219   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1220   | --sharedst | --shareds | --shared | --share | --shar \
1221   | --sha | --sh)
1222     ac_prev=sharedstatedir ;;
1223   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1224   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1225   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1226   | --sha=* | --sh=*)
1227     sharedstatedir=$ac_optarg ;;
1228
1229   -site | --site | --sit)
1230     ac_prev=site ;;
1231   -site=* | --site=* | --sit=*)
1232     site=$ac_optarg ;;
1233
1234   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1235     ac_prev=srcdir ;;
1236   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1237     srcdir=$ac_optarg ;;
1238
1239   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1240   | --syscon | --sysco | --sysc | --sys | --sy)
1241     ac_prev=sysconfdir ;;
1242   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1243   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1244     sysconfdir=$ac_optarg ;;
1245
1246   -target | --target | --targe | --targ | --tar | --ta | --t)
1247     ac_prev=target_alias ;;
1248   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1249     target_alias=$ac_optarg ;;
1250
1251   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1252     verbose=yes ;;
1253
1254   -version | --version | --versio | --versi | --vers | -V)
1255     ac_init_version=: ;;
1256
1257   -with-* | --with-*)
1258     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1259     # Reject names that are not valid shell variable names.
1260     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1261       as_fn_error $? "invalid package name: $ac_useropt"
1262     ac_useropt_orig=$ac_useropt
1263     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1264     case $ac_user_opts in
1265       *"
1266 "with_$ac_useropt"
1267 "*) ;;
1268       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1269          ac_unrecognized_sep=', ';;
1270     esac
1271     eval with_$ac_useropt=\$ac_optarg ;;
1272
1273   -without-* | --without-*)
1274     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1275     # Reject names that are not valid shell variable names.
1276     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1277       as_fn_error $? "invalid package name: $ac_useropt"
1278     ac_useropt_orig=$ac_useropt
1279     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1280     case $ac_user_opts in
1281       *"
1282 "with_$ac_useropt"
1283 "*) ;;
1284       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1285          ac_unrecognized_sep=', ';;
1286     esac
1287     eval with_$ac_useropt=no ;;
1288
1289   --x)
1290     # Obsolete; use --with-x.
1291     with_x=yes ;;
1292
1293   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1294   | --x-incl | --x-inc | --x-in | --x-i)
1295     ac_prev=x_includes ;;
1296   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1297   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1298     x_includes=$ac_optarg ;;
1299
1300   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1301   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1302     ac_prev=x_libraries ;;
1303   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1304   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1305     x_libraries=$ac_optarg ;;
1306
1307   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1308 Try \`$0 --help' for more information"
1309     ;;
1310
1311   *=*)
1312     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1313     # Reject names that are not valid shell variable names.
1314     case $ac_envvar in #(
1315       '' | [0-9]* | *[!_$as_cr_alnum]* )
1316       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1317     esac
1318     eval $ac_envvar=\$ac_optarg
1319     export $ac_envvar ;;
1320
1321   *)
1322     # FIXME: should be removed in autoconf 3.0.
1323     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1324     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1325       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1326     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1327     ;;
1328
1329   esac
1330 done
1331
1332 if test -n "$ac_prev"; then
1333   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1334   as_fn_error $? "missing argument to $ac_option"
1335 fi
1336
1337 if test -n "$ac_unrecognized_opts"; then
1338   case $enable_option_checking in
1339     no) ;;
1340     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1341     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1342   esac
1343 fi
1344
1345 # Check all directory arguments for consistency.
1346 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1347                 datadir sysconfdir sharedstatedir localstatedir includedir \
1348                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1349                 libdir localedir mandir
1350 do
1351   eval ac_val=\$$ac_var
1352   # Remove trailing slashes.
1353   case $ac_val in
1354     */ )
1355       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1356       eval $ac_var=\$ac_val;;
1357   esac
1358   # Be sure to have absolute directory names.
1359   case $ac_val in
1360     [\\/$]* | ?:[\\/]* )  continue;;
1361     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1362   esac
1363   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1364 done
1365
1366 # There might be people who depend on the old broken behavior: `$host'
1367 # used to hold the argument of --host etc.
1368 # FIXME: To remove some day.
1369 build=$build_alias
1370 host=$host_alias
1371 target=$target_alias
1372
1373 # FIXME: To remove some day.
1374 if test "x$host_alias" != x; then
1375   if test "x$build_alias" = x; then
1376     cross_compiling=maybe
1377   elif test "x$build_alias" != "x$host_alias"; then
1378     cross_compiling=yes
1379   fi
1380 fi
1381
1382 ac_tool_prefix=
1383 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1384
1385 test "$silent" = yes && exec 6>/dev/null
1386
1387
1388 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1389 ac_ls_di=`ls -di .` &&
1390 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1391   as_fn_error $? "working directory cannot be determined"
1392 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1393   as_fn_error $? "pwd does not report name of working directory"
1394
1395
1396 # Find the source files, if location was not specified.
1397 if test -z "$srcdir"; then
1398   ac_srcdir_defaulted=yes
1399   # Try the directory containing this script, then the parent directory.
1400   ac_confdir=`$as_dirname -- "$as_myself" ||
1401 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1402          X"$as_myself" : 'X\(//\)[^/]' \| \
1403          X"$as_myself" : 'X\(//\)$' \| \
1404          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1405 $as_echo X"$as_myself" |
1406     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1407             s//\1/
1408             q
1409           }
1410           /^X\(\/\/\)[^/].*/{
1411             s//\1/
1412             q
1413           }
1414           /^X\(\/\/\)$/{
1415             s//\1/
1416             q
1417           }
1418           /^X\(\/\).*/{
1419             s//\1/
1420             q
1421           }
1422           s/.*/./; q'`
1423   srcdir=$ac_confdir
1424   if test ! -r "$srcdir/$ac_unique_file"; then
1425     srcdir=..
1426   fi
1427 else
1428   ac_srcdir_defaulted=no
1429 fi
1430 if test ! -r "$srcdir/$ac_unique_file"; then
1431   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1432   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1433 fi
1434 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1435 ac_abs_confdir=`(
1436         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1437         pwd)`
1438 # When building in place, set srcdir=.
1439 if test "$ac_abs_confdir" = "$ac_pwd"; then
1440   srcdir=.
1441 fi
1442 # Remove unnecessary trailing slashes from srcdir.
1443 # Double slashes in file names in object file debugging info
1444 # mess up M-x gdb in Emacs.
1445 case $srcdir in
1446 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1447 esac
1448 for ac_var in $ac_precious_vars; do
1449   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1450   eval ac_env_${ac_var}_value=\$${ac_var}
1451   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1452   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1453 done
1454
1455 #
1456 # Report the --help message.
1457 #
1458 if test "$ac_init_help" = "long"; then
1459   # Omit some internal or obsolete options to make the list less imposing.
1460   # This message is too long to be a string in the A/UX 3.1 sh.
1461   cat <<_ACEOF
1462 \`configure' configures this package to adapt to many kinds of systems.
1463
1464 Usage: $0 [OPTION]... [VAR=VALUE]...
1465
1466 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1467 VAR=VALUE.  See below for descriptions of some of the useful variables.
1468
1469 Defaults for the options are specified in brackets.
1470
1471 Configuration:
1472   -h, --help              display this help and exit
1473       --help=short        display options specific to this package
1474       --help=recursive    display the short help of all the included packages
1475   -V, --version           display version information and exit
1476   -q, --quiet, --silent   do not print \`checking ...' messages
1477       --cache-file=FILE   cache test results in FILE [disabled]
1478   -C, --config-cache      alias for \`--cache-file=config.cache'
1479   -n, --no-create         do not create output files
1480       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1481
1482 Installation directories:
1483   --prefix=PREFIX         install architecture-independent files in PREFIX
1484                           [$ac_default_prefix]
1485   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1486                           [PREFIX]
1487
1488 By default, \`make install' will install all the files in
1489 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1490 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1491 for instance \`--prefix=\$HOME'.
1492
1493 For better control, use the options below.
1494
1495 Fine tuning of the installation directories:
1496   --bindir=DIR            user executables [EPREFIX/bin]
1497   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1498   --libexecdir=DIR        program executables [EPREFIX/libexec]
1499   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1500   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1501   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1502   --libdir=DIR            object code libraries [EPREFIX/lib]
1503   --includedir=DIR        C header files [PREFIX/include]
1504   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1505   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1506   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1507   --infodir=DIR           info documentation [DATAROOTDIR/info]
1508   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1509   --mandir=DIR            man documentation [DATAROOTDIR/man]
1510   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1511   --htmldir=DIR           html documentation [DOCDIR]
1512   --dvidir=DIR            dvi documentation [DOCDIR]
1513   --pdfdir=DIR            pdf documentation [DOCDIR]
1514   --psdir=DIR             ps documentation [DOCDIR]
1515 _ACEOF
1516
1517   cat <<\_ACEOF
1518
1519 Program names:
1520   --program-prefix=PREFIX            prepend PREFIX to installed program names
1521   --program-suffix=SUFFIX            append SUFFIX to installed program names
1522   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1523
1524 X features:
1525   --x-includes=DIR    X include files are in DIR
1526   --x-libraries=DIR   X library files are in DIR
1527
1528 System types:
1529   --build=BUILD     configure for building on BUILD [guessed]
1530   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1531   --target=TARGET   configure for building compilers for TARGET [HOST]
1532 _ACEOF
1533 fi
1534
1535 if test -n "$ac_init_help"; then
1536
1537   cat <<\_ACEOF
1538
1539 Optional Features:
1540   --disable-option-checking  ignore unrecognized --enable/--with options
1541   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1542   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1543   --enable-maintainer-mode
1544                           enable make rules and dependencies not useful (and
1545                           sometimes confusing) to the casual installer
1546   --enable-plugins        Enable support for plugins
1547   --disable-largefile     omit support for large files
1548   --enable-targets=TARGETS
1549                           alternative target configurations
1550   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
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-ubsan          enable undefined behavior sanitizer (auto/yes/no)
1564   --enable-sim            link gdb with simulator
1565   --enable-gdbserver      automatically build gdbserver (yes/no/auto, default
1566                           is auto)
1567   --enable-unit-tests     Enable the inclusion of unit tests when compiling
1568                           GDB
1569
1570 Optional Packages:
1571   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1572   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1573   --with-separate-debug-dir=PATH
1574                           look for global separate debug info in this path
1575                           [LIBDIR/debug]
1576   --with-gdb-datadir=PATH look for global separate data files in this path
1577                           [DATADIR/gdb]
1578   --with-relocated-sources=PATH
1579                           automatically relocate this path for source files
1580   --with-auto-load-dir=PATH
1581                           directories from which to load auto-loaded scripts
1582                           [$debugdir:$datadir/auto-load]
1583   --with-auto-load-safe-path=PATH
1584                           directories safe to hold auto-loaded files
1585                           [--with-auto-load-dir]
1586   --without-auto-load-safe-path
1587                           do not restrict auto-loaded files locations
1588   --with-libunwind-ia64   use libunwind frame unwinding for ia64 targets
1589   --with-curses           use the curses library instead of the termcap
1590                           library
1591   --with-pkgversion=PKG   Use PKG in the version string in place of "GDB"
1592   --with-bugurl=URL       Direct users to URL to report a bug
1593   --with-system-zlib      use installed libz
1594   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1595   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
1596   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
1597   --with-iconv-bin=PATH   specify where to find the iconv program
1598   --with-system-readline  use installed readline library
1599   --with-jit-reader-dir=PATH
1600                           directory to load the JIT readers from
1601   --with-expat            include expat support (auto/yes/no)
1602   --with-libexpat-prefix[=DIR]  search for libexpat in DIR/include and DIR/lib
1603   --without-libexpat-prefix     don't search for libexpat in includedir and libdir
1604   --with-mpfr             include MPFR support (auto/yes/no)
1605   --with-libmpfr-prefix[=DIR]  search for libmpfr in DIR/include and DIR/lib
1606   --without-libmpfr-prefix     don't search for libmpfr in includedir and libdir
1607   --with-python[=PYTHON]  include python support
1608                           (auto/yes/no/<python-program>)
1609   --with-guile[=GUILE]    include guile support
1610                           (auto/yes/no/<guile-version>/<pkg-config-program>)
1611   --with-intel-pt         include Intel Processor Trace support (auto/yes/no)
1612   --with-libipt-prefix[=DIR]  search for libipt in DIR/include and DIR/lib
1613   --without-libipt-prefix     don't search for libipt in includedir and libdir
1614   --without-included-regex
1615                           don't use included regex; this is the default on
1616                           systems with version 2 of the GNU C library (use
1617                           with caution on other system)
1618   --with-sysroot[=DIR]    search for usr/lib et al within DIR
1619   --with-system-gdbinit=PATH
1620                           automatically load a system-wide gdbinit file
1621   --with-lzma             support lzma compression (auto/yes/no)
1622   --with-liblzma-prefix[=DIR]  search for liblzma in DIR/include and DIR/lib
1623   --without-liblzma-prefix     don't search for liblzma in includedir and libdir
1624   --with-tcl              directory containing tcl configuration (tclConfig.sh)
1625   --with-tk               directory containing tk configuration (tkConfig.sh)
1626   --with-x                use the X Window System
1627   --with-babeltrace       include babeltrace support (auto/yes/no)
1628   --with-libbabeltrace-prefix[=DIR]  search for libbabeltrace in DIR/include and DIR/lib
1629   --without-libbabeltrace-prefix     don't search for libbabeltrace in includedir and libdir
1630
1631 Some influential environment variables:
1632   CC          C compiler command
1633   CFLAGS      C compiler flags
1634   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1635               nonstandard directory <lib dir>
1636   LIBS        libraries to pass to the linker, e.g. -l<library>
1637   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1638               you have headers in a nonstandard directory <include dir>
1639   CXX         C++ compiler command
1640   CXXFLAGS    C++ compiler flags
1641   CPP         C preprocessor
1642   MAKEINFO    Parent configure detects if it is of sufficient version.
1643   MAKEINFOFLAGS
1644               Parameters for MAKEINFO.
1645   YACC        The `Yet Another Compiler Compiler' implementation to use.
1646               Defaults to the first program found out of: `bison -y', `byacc',
1647               `yacc'.
1648   YFLAGS      The list of arguments that will be passed by default to $YACC.
1649               This script will default YFLAGS to the empty string to avoid a
1650               default value of `-d' given by some make applications.
1651   XMKMF       Path to xmkmf, Makefile generator for X Window System
1652
1653 Use these variables to override the choices made by `configure' or to help
1654 it to find libraries and programs with nonstandard names/locations.
1655
1656 Report bugs to the package provider.
1657 _ACEOF
1658 ac_status=$?
1659 fi
1660
1661 if test "$ac_init_help" = "recursive"; then
1662   # If there are subdirs, report their specific --help.
1663   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1664     test -d "$ac_dir" ||
1665       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1666       continue
1667     ac_builddir=.
1668
1669 case "$ac_dir" in
1670 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1671 *)
1672   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1673   # A ".." for each directory in $ac_dir_suffix.
1674   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1675   case $ac_top_builddir_sub in
1676   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1677   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1678   esac ;;
1679 esac
1680 ac_abs_top_builddir=$ac_pwd
1681 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1682 # for backward compatibility:
1683 ac_top_builddir=$ac_top_build_prefix
1684
1685 case $srcdir in
1686   .)  # We are building in place.
1687     ac_srcdir=.
1688     ac_top_srcdir=$ac_top_builddir_sub
1689     ac_abs_top_srcdir=$ac_pwd ;;
1690   [\\/]* | ?:[\\/]* )  # Absolute name.
1691     ac_srcdir=$srcdir$ac_dir_suffix;
1692     ac_top_srcdir=$srcdir
1693     ac_abs_top_srcdir=$srcdir ;;
1694   *) # Relative name.
1695     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1696     ac_top_srcdir=$ac_top_build_prefix$srcdir
1697     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1698 esac
1699 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1700
1701     cd "$ac_dir" || { ac_status=$?; continue; }
1702     # Check for guested configure.
1703     if test -f "$ac_srcdir/configure.gnu"; then
1704       echo &&
1705       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1706     elif test -f "$ac_srcdir/configure"; then
1707       echo &&
1708       $SHELL "$ac_srcdir/configure" --help=recursive
1709     else
1710       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1711     fi || ac_status=$?
1712     cd "$ac_pwd" || { ac_status=$?; break; }
1713   done
1714 fi
1715
1716 test -n "$ac_init_help" && exit $ac_status
1717 if $ac_init_version; then
1718   cat <<\_ACEOF
1719 configure
1720 generated by GNU Autoconf 2.69
1721
1722 Copyright (C) 2012 Free Software Foundation, Inc.
1723 This configure script is free software; the Free Software Foundation
1724 gives unlimited permission to copy, distribute and modify it.
1725 _ACEOF
1726   exit
1727 fi
1728
1729 ## ------------------------ ##
1730 ## Autoconf initialization. ##
1731 ## ------------------------ ##
1732
1733 # ac_fn_c_try_compile LINENO
1734 # --------------------------
1735 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1736 ac_fn_c_try_compile ()
1737 {
1738   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1739   rm -f conftest.$ac_objext
1740   if { { ac_try="$ac_compile"
1741 case "(($ac_try" in
1742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1743   *) ac_try_echo=$ac_try;;
1744 esac
1745 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1746 $as_echo "$ac_try_echo"; } >&5
1747   (eval "$ac_compile") 2>conftest.err
1748   ac_status=$?
1749   if test -s conftest.err; then
1750     grep -v '^ *+' conftest.err >conftest.er1
1751     cat conftest.er1 >&5
1752     mv -f conftest.er1 conftest.err
1753   fi
1754   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1755   test $ac_status = 0; } && {
1756          test -z "$ac_c_werror_flag" ||
1757          test ! -s conftest.err
1758        } && test -s conftest.$ac_objext; then :
1759   ac_retval=0
1760 else
1761   $as_echo "$as_me: failed program was:" >&5
1762 sed 's/^/| /' conftest.$ac_ext >&5
1763
1764         ac_retval=1
1765 fi
1766   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1767   as_fn_set_status $ac_retval
1768
1769 } # ac_fn_c_try_compile
1770
1771 # ac_fn_cxx_try_compile LINENO
1772 # ----------------------------
1773 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1774 ac_fn_cxx_try_compile ()
1775 {
1776   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1777   rm -f conftest.$ac_objext
1778   if { { ac_try="$ac_compile"
1779 case "(($ac_try" in
1780   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1781   *) ac_try_echo=$ac_try;;
1782 esac
1783 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1784 $as_echo "$ac_try_echo"; } >&5
1785   (eval "$ac_compile") 2>conftest.err
1786   ac_status=$?
1787   if test -s conftest.err; then
1788     grep -v '^ *+' conftest.err >conftest.er1
1789     cat conftest.er1 >&5
1790     mv -f conftest.er1 conftest.err
1791   fi
1792   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1793   test $ac_status = 0; } && {
1794          test -z "$ac_cxx_werror_flag" ||
1795          test ! -s conftest.err
1796        } && test -s conftest.$ac_objext; then :
1797   ac_retval=0
1798 else
1799   $as_echo "$as_me: failed program was:" >&5
1800 sed 's/^/| /' conftest.$ac_ext >&5
1801
1802         ac_retval=1
1803 fi
1804   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1805   as_fn_set_status $ac_retval
1806
1807 } # ac_fn_cxx_try_compile
1808
1809 # ac_fn_c_try_cpp LINENO
1810 # ----------------------
1811 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1812 ac_fn_c_try_cpp ()
1813 {
1814   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815   if { { ac_try="$ac_cpp conftest.$ac_ext"
1816 case "(($ac_try" in
1817   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1818   *) ac_try_echo=$ac_try;;
1819 esac
1820 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1821 $as_echo "$ac_try_echo"; } >&5
1822   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1823   ac_status=$?
1824   if test -s conftest.err; then
1825     grep -v '^ *+' conftest.err >conftest.er1
1826     cat conftest.er1 >&5
1827     mv -f conftest.er1 conftest.err
1828   fi
1829   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1830   test $ac_status = 0; } > conftest.i && {
1831          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1832          test ! -s conftest.err
1833        }; then :
1834   ac_retval=0
1835 else
1836   $as_echo "$as_me: failed program was:" >&5
1837 sed 's/^/| /' conftest.$ac_ext >&5
1838
1839     ac_retval=1
1840 fi
1841   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1842   as_fn_set_status $ac_retval
1843
1844 } # ac_fn_c_try_cpp
1845
1846 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1847 # -------------------------------------------------------
1848 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1849 # the include files in INCLUDES and setting the cache variable VAR
1850 # accordingly.
1851 ac_fn_c_check_header_mongrel ()
1852 {
1853   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1854   if eval \${$3+:} false; then :
1855   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1856 $as_echo_n "checking for $2... " >&6; }
1857 if eval \${$3+:} false; then :
1858   $as_echo_n "(cached) " >&6
1859 fi
1860 eval ac_res=\$$3
1861                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862 $as_echo "$ac_res" >&6; }
1863 else
1864   # Is the header compilable?
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1866 $as_echo_n "checking $2 usability... " >&6; }
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868 /* end confdefs.h.  */
1869 $4
1870 #include <$2>
1871 _ACEOF
1872 if ac_fn_c_try_compile "$LINENO"; then :
1873   ac_header_compiler=yes
1874 else
1875   ac_header_compiler=no
1876 fi
1877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1879 $as_echo "$ac_header_compiler" >&6; }
1880
1881 # Is the header present?
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1883 $as_echo_n "checking $2 presence... " >&6; }
1884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885 /* end confdefs.h.  */
1886 #include <$2>
1887 _ACEOF
1888 if ac_fn_c_try_cpp "$LINENO"; then :
1889   ac_header_preproc=yes
1890 else
1891   ac_header_preproc=no
1892 fi
1893 rm -f conftest.err conftest.i conftest.$ac_ext
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1895 $as_echo "$ac_header_preproc" >&6; }
1896
1897 # So?  What about this header?
1898 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1899   yes:no: )
1900     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1901 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1902     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1903 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1904     ;;
1905   no:yes:* )
1906     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1907 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1908     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1909 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1910     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1911 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1912     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1913 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1914     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1915 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1916     ;;
1917 esac
1918   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919 $as_echo_n "checking for $2... " >&6; }
1920 if eval \${$3+:} false; then :
1921   $as_echo_n "(cached) " >&6
1922 else
1923   eval "$3=\$ac_header_compiler"
1924 fi
1925 eval ac_res=\$$3
1926                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927 $as_echo "$ac_res" >&6; }
1928 fi
1929   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1930
1931 } # ac_fn_c_check_header_mongrel
1932
1933 # ac_fn_c_try_run LINENO
1934 # ----------------------
1935 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1936 # that executables *can* be run.
1937 ac_fn_c_try_run ()
1938 {
1939   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940   if { { ac_try="$ac_link"
1941 case "(($ac_try" in
1942   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1943   *) ac_try_echo=$ac_try;;
1944 esac
1945 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1946 $as_echo "$ac_try_echo"; } >&5
1947   (eval "$ac_link") 2>&5
1948   ac_status=$?
1949   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1950   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1951   { { case "(($ac_try" in
1952   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1953   *) ac_try_echo=$ac_try;;
1954 esac
1955 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1956 $as_echo "$ac_try_echo"; } >&5
1957   (eval "$ac_try") 2>&5
1958   ac_status=$?
1959   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1960   test $ac_status = 0; }; }; then :
1961   ac_retval=0
1962 else
1963   $as_echo "$as_me: program exited with status $ac_status" >&5
1964        $as_echo "$as_me: failed program was:" >&5
1965 sed 's/^/| /' conftest.$ac_ext >&5
1966
1967        ac_retval=$ac_status
1968 fi
1969   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1970   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1971   as_fn_set_status $ac_retval
1972
1973 } # ac_fn_c_try_run
1974
1975 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1976 # -------------------------------------------------------
1977 # Tests whether HEADER exists and can be compiled using the include files in
1978 # INCLUDES, setting the cache variable VAR accordingly.
1979 ac_fn_c_check_header_compile ()
1980 {
1981   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1983 $as_echo_n "checking for $2... " >&6; }
1984 if eval \${$3+:} false; then :
1985   $as_echo_n "(cached) " >&6
1986 else
1987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988 /* end confdefs.h.  */
1989 $4
1990 #include <$2>
1991 _ACEOF
1992 if ac_fn_c_try_compile "$LINENO"; then :
1993   eval "$3=yes"
1994 else
1995   eval "$3=no"
1996 fi
1997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1998 fi
1999 eval ac_res=\$$3
2000                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001 $as_echo "$ac_res" >&6; }
2002   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2003
2004 } # ac_fn_c_check_header_compile
2005
2006 # ac_fn_c_try_link LINENO
2007 # -----------------------
2008 # Try to link conftest.$ac_ext, and return whether this succeeded.
2009 ac_fn_c_try_link ()
2010 {
2011   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012   rm -f conftest.$ac_objext conftest$ac_exeext
2013   if { { ac_try="$ac_link"
2014 case "(($ac_try" in
2015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2016   *) ac_try_echo=$ac_try;;
2017 esac
2018 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2019 $as_echo "$ac_try_echo"; } >&5
2020   (eval "$ac_link") 2>conftest.err
2021   ac_status=$?
2022   if test -s conftest.err; then
2023     grep -v '^ *+' conftest.err >conftest.er1
2024     cat conftest.er1 >&5
2025     mv -f conftest.er1 conftest.err
2026   fi
2027   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2028   test $ac_status = 0; } && {
2029          test -z "$ac_c_werror_flag" ||
2030          test ! -s conftest.err
2031        } && test -s conftest$ac_exeext && {
2032          test "$cross_compiling" = yes ||
2033          test -x conftest$ac_exeext
2034        }; then :
2035   ac_retval=0
2036 else
2037   $as_echo "$as_me: failed program was:" >&5
2038 sed 's/^/| /' conftest.$ac_ext >&5
2039
2040         ac_retval=1
2041 fi
2042   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2043   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2044   # interfere with the next link command; also delete a directory that is
2045   # left behind by Apple's compiler.  We do this before executing the actions.
2046   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2047   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2048   as_fn_set_status $ac_retval
2049
2050 } # ac_fn_c_try_link
2051
2052 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2053 # --------------------------------------------
2054 # Tries to find the compile-time value of EXPR in a program that includes
2055 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2056 # computed
2057 ac_fn_c_compute_int ()
2058 {
2059   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060   if test "$cross_compiling" = yes; then
2061     # Depending upon the size, compute the lo and hi bounds.
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063 /* end confdefs.h.  */
2064 $4
2065 int
2066 main ()
2067 {
2068 static int test_array [1 - 2 * !(($2) >= 0)];
2069 test_array [0] = 0;
2070 return test_array [0];
2071
2072   ;
2073   return 0;
2074 }
2075 _ACEOF
2076 if ac_fn_c_try_compile "$LINENO"; then :
2077   ac_lo=0 ac_mid=0
2078   while :; do
2079     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080 /* end confdefs.h.  */
2081 $4
2082 int
2083 main ()
2084 {
2085 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2086 test_array [0] = 0;
2087 return test_array [0];
2088
2089   ;
2090   return 0;
2091 }
2092 _ACEOF
2093 if ac_fn_c_try_compile "$LINENO"; then :
2094   ac_hi=$ac_mid; break
2095 else
2096   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2097                         if test $ac_lo -le $ac_mid; then
2098                           ac_lo= ac_hi=
2099                           break
2100                         fi
2101                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2102 fi
2103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104   done
2105 else
2106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107 /* end confdefs.h.  */
2108 $4
2109 int
2110 main ()
2111 {
2112 static int test_array [1 - 2 * !(($2) < 0)];
2113 test_array [0] = 0;
2114 return test_array [0];
2115
2116   ;
2117   return 0;
2118 }
2119 _ACEOF
2120 if ac_fn_c_try_compile "$LINENO"; then :
2121   ac_hi=-1 ac_mid=-1
2122   while :; do
2123     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124 /* end confdefs.h.  */
2125 $4
2126 int
2127 main ()
2128 {
2129 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2130 test_array [0] = 0;
2131 return test_array [0];
2132
2133   ;
2134   return 0;
2135 }
2136 _ACEOF
2137 if ac_fn_c_try_compile "$LINENO"; then :
2138   ac_lo=$ac_mid; break
2139 else
2140   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2141                         if test $ac_mid -le $ac_hi; then
2142                           ac_lo= ac_hi=
2143                           break
2144                         fi
2145                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2146 fi
2147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148   done
2149 else
2150   ac_lo= ac_hi=
2151 fi
2152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153 fi
2154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155 # Binary search between lo and hi bounds.
2156 while test "x$ac_lo" != "x$ac_hi"; do
2157   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159 /* end confdefs.h.  */
2160 $4
2161 int
2162 main ()
2163 {
2164 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2165 test_array [0] = 0;
2166 return test_array [0];
2167
2168   ;
2169   return 0;
2170 }
2171 _ACEOF
2172 if ac_fn_c_try_compile "$LINENO"; then :
2173   ac_hi=$ac_mid
2174 else
2175   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2176 fi
2177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178 done
2179 case $ac_lo in #((
2180 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2181 '') ac_retval=1 ;;
2182 esac
2183   else
2184     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2185 /* end confdefs.h.  */
2186 $4
2187 static long int longval () { return $2; }
2188 static unsigned long int ulongval () { return $2; }
2189 #include <stdio.h>
2190 #include <stdlib.h>
2191 int
2192 main ()
2193 {
2194
2195   FILE *f = fopen ("conftest.val", "w");
2196   if (! f)
2197     return 1;
2198   if (($2) < 0)
2199     {
2200       long int i = longval ();
2201       if (i != ($2))
2202         return 1;
2203       fprintf (f, "%ld", i);
2204     }
2205   else
2206     {
2207       unsigned long int i = ulongval ();
2208       if (i != ($2))
2209         return 1;
2210       fprintf (f, "%lu", i);
2211     }
2212   /* Do not output a trailing newline, as this causes \r\n confusion
2213      on some platforms.  */
2214   return ferror (f) || fclose (f) != 0;
2215
2216   ;
2217   return 0;
2218 }
2219 _ACEOF
2220 if ac_fn_c_try_run "$LINENO"; then :
2221   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2222 else
2223   ac_retval=1
2224 fi
2225 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2226   conftest.$ac_objext conftest.beam conftest.$ac_ext
2227 rm -f conftest.val
2228
2229   fi
2230   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2231   as_fn_set_status $ac_retval
2232
2233 } # ac_fn_c_compute_int
2234
2235 # ac_fn_c_check_func LINENO FUNC VAR
2236 # ----------------------------------
2237 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2238 ac_fn_c_check_func ()
2239 {
2240   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2242 $as_echo_n "checking for $2... " >&6; }
2243 if eval \${$3+:} false; then :
2244   $as_echo_n "(cached) " >&6
2245 else
2246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247 /* end confdefs.h.  */
2248 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2249    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2250 #define $2 innocuous_$2
2251
2252 /* System header to define __stub macros and hopefully few prototypes,
2253     which can conflict with char $2 (); below.
2254     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2255     <limits.h> exists even on freestanding compilers.  */
2256
2257 #ifdef __STDC__
2258 # include <limits.h>
2259 #else
2260 # include <assert.h>
2261 #endif
2262
2263 #undef $2
2264
2265 /* Override any GCC internal prototype to avoid an error.
2266    Use char because int might match the return type of a GCC
2267    builtin and then its argument prototype would still apply.  */
2268 #ifdef __cplusplus
2269 extern "C"
2270 #endif
2271 char $2 ();
2272 /* The GNU C library defines this for functions which it implements
2273     to always fail with ENOSYS.  Some functions are actually named
2274     something starting with __ and the normal name is an alias.  */
2275 #if defined __stub_$2 || defined __stub___$2
2276 choke me
2277 #endif
2278
2279 int
2280 main ()
2281 {
2282 return $2 ();
2283   ;
2284   return 0;
2285 }
2286 _ACEOF
2287 if ac_fn_c_try_link "$LINENO"; then :
2288   eval "$3=yes"
2289 else
2290   eval "$3=no"
2291 fi
2292 rm -f core conftest.err conftest.$ac_objext \
2293     conftest$ac_exeext conftest.$ac_ext
2294 fi
2295 eval ac_res=\$$3
2296                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297 $as_echo "$ac_res" >&6; }
2298   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299
2300 } # ac_fn_c_check_func
2301
2302 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2303 # ----------------------------------------------------
2304 # Tries to find if the field MEMBER exists in type AGGR, after including
2305 # INCLUDES, setting cache variable VAR accordingly.
2306 ac_fn_c_check_member ()
2307 {
2308   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2310 $as_echo_n "checking for $2.$3... " >&6; }
2311 if eval \${$4+:} false; then :
2312   $as_echo_n "(cached) " >&6
2313 else
2314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315 /* end confdefs.h.  */
2316 $5
2317 int
2318 main ()
2319 {
2320 static $2 ac_aggr;
2321 if (ac_aggr.$3)
2322 return 0;
2323   ;
2324   return 0;
2325 }
2326 _ACEOF
2327 if ac_fn_c_try_compile "$LINENO"; then :
2328   eval "$4=yes"
2329 else
2330   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331 /* end confdefs.h.  */
2332 $5
2333 int
2334 main ()
2335 {
2336 static $2 ac_aggr;
2337 if (sizeof ac_aggr.$3)
2338 return 0;
2339   ;
2340   return 0;
2341 }
2342 _ACEOF
2343 if ac_fn_c_try_compile "$LINENO"; then :
2344   eval "$4=yes"
2345 else
2346   eval "$4=no"
2347 fi
2348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349 fi
2350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2351 fi
2352 eval ac_res=\$$4
2353                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2354 $as_echo "$ac_res" >&6; }
2355   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2356
2357 } # ac_fn_c_check_member
2358
2359 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2360 # -------------------------------------------
2361 # Tests whether TYPE exists after having included INCLUDES, setting cache
2362 # variable VAR accordingly.
2363 ac_fn_c_check_type ()
2364 {
2365   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2366   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2367 $as_echo_n "checking for $2... " >&6; }
2368 if eval \${$3+:} false; then :
2369   $as_echo_n "(cached) " >&6
2370 else
2371   eval "$3=no"
2372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373 /* end confdefs.h.  */
2374 $4
2375 int
2376 main ()
2377 {
2378 if (sizeof ($2))
2379          return 0;
2380   ;
2381   return 0;
2382 }
2383 _ACEOF
2384 if ac_fn_c_try_compile "$LINENO"; then :
2385   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386 /* end confdefs.h.  */
2387 $4
2388 int
2389 main ()
2390 {
2391 if (sizeof (($2)))
2392             return 0;
2393   ;
2394   return 0;
2395 }
2396 _ACEOF
2397 if ac_fn_c_try_compile "$LINENO"; then :
2398
2399 else
2400   eval "$3=yes"
2401 fi
2402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403 fi
2404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405 fi
2406 eval ac_res=\$$3
2407                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2408 $as_echo "$ac_res" >&6; }
2409   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2410
2411 } # ac_fn_c_check_type
2412
2413 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2414 # ---------------------------------------------
2415 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2416 # accordingly.
2417 ac_fn_c_check_decl ()
2418 {
2419   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2420   as_decl_name=`echo $2|sed 's/ *(.*//'`
2421   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2422   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2423 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2424 if eval \${$3+:} false; then :
2425   $as_echo_n "(cached) " >&6
2426 else
2427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2428 /* end confdefs.h.  */
2429 $4
2430 int
2431 main ()
2432 {
2433 #ifndef $as_decl_name
2434 #ifdef __cplusplus
2435   (void) $as_decl_use;
2436 #else
2437   (void) $as_decl_name;
2438 #endif
2439 #endif
2440
2441   ;
2442   return 0;
2443 }
2444 _ACEOF
2445 if ac_fn_c_try_compile "$LINENO"; then :
2446   eval "$3=yes"
2447 else
2448   eval "$3=no"
2449 fi
2450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451 fi
2452 eval ac_res=\$$3
2453                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2454 $as_echo "$ac_res" >&6; }
2455   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2456
2457 } # ac_fn_c_check_decl
2458
2459 # ac_fn_cxx_try_link LINENO
2460 # -------------------------
2461 # Try to link conftest.$ac_ext, and return whether this succeeded.
2462 ac_fn_cxx_try_link ()
2463 {
2464   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2465   rm -f conftest.$ac_objext conftest$ac_exeext
2466   if { { ac_try="$ac_link"
2467 case "(($ac_try" in
2468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2469   *) ac_try_echo=$ac_try;;
2470 esac
2471 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2472 $as_echo "$ac_try_echo"; } >&5
2473   (eval "$ac_link") 2>conftest.err
2474   ac_status=$?
2475   if test -s conftest.err; then
2476     grep -v '^ *+' conftest.err >conftest.er1
2477     cat conftest.er1 >&5
2478     mv -f conftest.er1 conftest.err
2479   fi
2480   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2481   test $ac_status = 0; } && {
2482          test -z "$ac_cxx_werror_flag" ||
2483          test ! -s conftest.err
2484        } && test -s conftest$ac_exeext && {
2485          test "$cross_compiling" = yes ||
2486          test -x conftest$ac_exeext
2487        }; then :
2488   ac_retval=0
2489 else
2490   $as_echo "$as_me: failed program was:" >&5
2491 sed 's/^/| /' conftest.$ac_ext >&5
2492
2493         ac_retval=1
2494 fi
2495   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2496   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2497   # interfere with the next link command; also delete a directory that is
2498   # left behind by Apple's compiler.  We do this before executing the actions.
2499   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2500   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2501   as_fn_set_status $ac_retval
2502
2503 } # ac_fn_cxx_try_link
2504 cat >config.log <<_ACEOF
2505 This file contains any messages produced by compilers while
2506 running configure, to aid debugging if configure makes a mistake.
2507
2508 It was created by $as_me, which was
2509 generated by GNU Autoconf 2.69.  Invocation command line was
2510
2511   $ $0 $@
2512
2513 _ACEOF
2514 exec 5>>config.log
2515 {
2516 cat <<_ASUNAME
2517 ## --------- ##
2518 ## Platform. ##
2519 ## --------- ##
2520
2521 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2522 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2523 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2524 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2525 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2526
2527 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2528 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2529
2530 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2531 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2532 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2533 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2534 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2535 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2536 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2537
2538 _ASUNAME
2539
2540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2541 for as_dir in $PATH
2542 do
2543   IFS=$as_save_IFS
2544   test -z "$as_dir" && as_dir=.
2545     $as_echo "PATH: $as_dir"
2546   done
2547 IFS=$as_save_IFS
2548
2549 } >&5
2550
2551 cat >&5 <<_ACEOF
2552
2553
2554 ## ----------- ##
2555 ## Core tests. ##
2556 ## ----------- ##
2557
2558 _ACEOF
2559
2560
2561 # Keep a trace of the command line.
2562 # Strip out --no-create and --no-recursion so they do not pile up.
2563 # Strip out --silent because we don't want to record it for future runs.
2564 # Also quote any args containing shell meta-characters.
2565 # Make two passes to allow for proper duplicate-argument suppression.
2566 ac_configure_args=
2567 ac_configure_args0=
2568 ac_configure_args1=
2569 ac_must_keep_next=false
2570 for ac_pass in 1 2
2571 do
2572   for ac_arg
2573   do
2574     case $ac_arg in
2575     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2576     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2577     | -silent | --silent | --silen | --sile | --sil)
2578       continue ;;
2579     *\'*)
2580       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2581     esac
2582     case $ac_pass in
2583     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2584     2)
2585       as_fn_append ac_configure_args1 " '$ac_arg'"
2586       if test $ac_must_keep_next = true; then
2587         ac_must_keep_next=false # Got value, back to normal.
2588       else
2589         case $ac_arg in
2590           *=* | --config-cache | -C | -disable-* | --disable-* \
2591           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2592           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2593           | -with-* | --with-* | -without-* | --without-* | --x)
2594             case "$ac_configure_args0 " in
2595               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2596             esac
2597             ;;
2598           -* ) ac_must_keep_next=true ;;
2599         esac
2600       fi
2601       as_fn_append ac_configure_args " '$ac_arg'"
2602       ;;
2603     esac
2604   done
2605 done
2606 { ac_configure_args0=; unset ac_configure_args0;}
2607 { ac_configure_args1=; unset ac_configure_args1;}
2608
2609 # When interrupted or exit'd, cleanup temporary files, and complete
2610 # config.log.  We remove comments because anyway the quotes in there
2611 # would cause problems or look ugly.
2612 # WARNING: Use '\'' to represent an apostrophe within the trap.
2613 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2614 trap 'exit_status=$?
2615   # Save into config.log some information that might help in debugging.
2616   {
2617     echo
2618
2619     $as_echo "## ---------------- ##
2620 ## Cache variables. ##
2621 ## ---------------- ##"
2622     echo
2623     # The following way of writing the cache mishandles newlines in values,
2624 (
2625   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2626     eval ac_val=\$$ac_var
2627     case $ac_val in #(
2628     *${as_nl}*)
2629       case $ac_var in #(
2630       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2631 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2632       esac
2633       case $ac_var in #(
2634       _ | IFS | as_nl) ;; #(
2635       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2636       *) { eval $ac_var=; unset $ac_var;} ;;
2637       esac ;;
2638     esac
2639   done
2640   (set) 2>&1 |
2641     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2642     *${as_nl}ac_space=\ *)
2643       sed -n \
2644         "s/'\''/'\''\\\\'\'''\''/g;
2645           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2646       ;; #(
2647     *)
2648       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2649       ;;
2650     esac |
2651     sort
2652 )
2653     echo
2654
2655     $as_echo "## ----------------- ##
2656 ## Output variables. ##
2657 ## ----------------- ##"
2658     echo
2659     for ac_var in $ac_subst_vars
2660     do
2661       eval ac_val=\$$ac_var
2662       case $ac_val in
2663       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2664       esac
2665       $as_echo "$ac_var='\''$ac_val'\''"
2666     done | sort
2667     echo
2668
2669     if test -n "$ac_subst_files"; then
2670       $as_echo "## ------------------- ##
2671 ## File substitutions. ##
2672 ## ------------------- ##"
2673       echo
2674       for ac_var in $ac_subst_files
2675       do
2676         eval ac_val=\$$ac_var
2677         case $ac_val in
2678         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2679         esac
2680         $as_echo "$ac_var='\''$ac_val'\''"
2681       done | sort
2682       echo
2683     fi
2684
2685     if test -s confdefs.h; then
2686       $as_echo "## ----------- ##
2687 ## confdefs.h. ##
2688 ## ----------- ##"
2689       echo
2690       cat confdefs.h
2691       echo
2692     fi
2693     test "$ac_signal" != 0 &&
2694       $as_echo "$as_me: caught signal $ac_signal"
2695     $as_echo "$as_me: exit $exit_status"
2696   } >&5
2697   rm -f core *.core core.conftest.* &&
2698     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2699     exit $exit_status
2700 ' 0
2701 for ac_signal in 1 2 13 15; do
2702   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2703 done
2704 ac_signal=0
2705
2706 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2707 rm -f -r conftest* confdefs.h
2708
2709 $as_echo "/* confdefs.h */" > confdefs.h
2710
2711 # Predefined preprocessor variables.
2712
2713 cat >>confdefs.h <<_ACEOF
2714 #define PACKAGE_NAME "$PACKAGE_NAME"
2715 _ACEOF
2716
2717 cat >>confdefs.h <<_ACEOF
2718 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2719 _ACEOF
2720
2721 cat >>confdefs.h <<_ACEOF
2722 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2723 _ACEOF
2724
2725 cat >>confdefs.h <<_ACEOF
2726 #define PACKAGE_STRING "$PACKAGE_STRING"
2727 _ACEOF
2728
2729 cat >>confdefs.h <<_ACEOF
2730 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2731 _ACEOF
2732
2733 cat >>confdefs.h <<_ACEOF
2734 #define PACKAGE_URL "$PACKAGE_URL"
2735 _ACEOF
2736
2737
2738 # Let the site file select an alternate cache file if it wants to.
2739 # Prefer an explicitly selected file to automatically selected ones.
2740 ac_site_file1=NONE
2741 ac_site_file2=NONE
2742 if test -n "$CONFIG_SITE"; then
2743   # We do not want a PATH search for config.site.
2744   case $CONFIG_SITE in #((
2745     -*)  ac_site_file1=./$CONFIG_SITE;;
2746     */*) ac_site_file1=$CONFIG_SITE;;
2747     *)   ac_site_file1=./$CONFIG_SITE;;
2748   esac
2749 elif test "x$prefix" != xNONE; then
2750   ac_site_file1=$prefix/share/config.site
2751   ac_site_file2=$prefix/etc/config.site
2752 else
2753   ac_site_file1=$ac_default_prefix/share/config.site
2754   ac_site_file2=$ac_default_prefix/etc/config.site
2755 fi
2756 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2757 do
2758   test "x$ac_site_file" = xNONE && continue
2759   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2760     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2761 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2762     sed 's/^/| /' "$ac_site_file" >&5
2763     . "$ac_site_file" \
2764       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2765 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2766 as_fn_error $? "failed to load site script $ac_site_file
2767 See \`config.log' for more details" "$LINENO" 5; }
2768   fi
2769 done
2770
2771 if test -r "$cache_file"; then
2772   # Some versions of bash will fail to source /dev/null (special files
2773   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2774   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2775     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2776 $as_echo "$as_me: loading cache $cache_file" >&6;}
2777     case $cache_file in
2778       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2779       *)                      . "./$cache_file";;
2780     esac
2781   fi
2782 else
2783   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2784 $as_echo "$as_me: creating cache $cache_file" >&6;}
2785   >$cache_file
2786 fi
2787
2788 as_fn_append ac_header_list " stdlib.h"
2789 as_fn_append ac_header_list " unistd.h"
2790 as_fn_append ac_header_list " sys/param.h"
2791 # Check that the precious variables saved in the cache have kept the same
2792 # value.
2793 ac_cache_corrupted=false
2794 for ac_var in $ac_precious_vars; do
2795   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2796   eval ac_new_set=\$ac_env_${ac_var}_set
2797   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2798   eval ac_new_val=\$ac_env_${ac_var}_value
2799   case $ac_old_set,$ac_new_set in
2800     set,)
2801       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2802 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2803       ac_cache_corrupted=: ;;
2804     ,set)
2805       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2806 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2807       ac_cache_corrupted=: ;;
2808     ,);;
2809     *)
2810       if test "x$ac_old_val" != "x$ac_new_val"; then
2811         # differences in whitespace do not lead to failure.
2812         ac_old_val_w=`echo x $ac_old_val`
2813         ac_new_val_w=`echo x $ac_new_val`
2814         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2815           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2816 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2817           ac_cache_corrupted=:
2818         else
2819           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2820 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2821           eval $ac_var=\$ac_old_val
2822         fi
2823         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2824 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2825         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2826 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2827       fi;;
2828   esac
2829   # Pass precious variables to config.status.
2830   if test "$ac_new_set" = set; then
2831     case $ac_new_val in
2832     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2833     *) ac_arg=$ac_var=$ac_new_val ;;
2834     esac
2835     case " $ac_configure_args " in
2836       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2837       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2838     esac
2839   fi
2840 done
2841 if $ac_cache_corrupted; then
2842   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2843 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2844   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2845 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2846   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2847 fi
2848 ## -------------------- ##
2849 ## Main body of script. ##
2850 ## -------------------- ##
2851
2852 ac_ext=c
2853 ac_cpp='$CPP $CPPFLAGS'
2854 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2855 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2856 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2857
2858
2859
2860
2861
2862 ac_config_headers="$ac_config_headers config.h:config.in"
2863
2864
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2866 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2867     # Check whether --enable-maintainer-mode was given.
2868 if test "${enable_maintainer_mode+set}" = set; then :
2869   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2870 else
2871   USE_MAINTAINER_MODE=no
2872 fi
2873
2874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2875 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2876    if test $USE_MAINTAINER_MODE = yes; then
2877   MAINTAINER_MODE_TRUE=
2878   MAINTAINER_MODE_FALSE='#'
2879 else
2880   MAINTAINER_MODE_TRUE='#'
2881   MAINTAINER_MODE_FALSE=
2882 fi
2883
2884   MAINT=$MAINTAINER_MODE_TRUE
2885
2886
2887
2888 # Set the 'development' global.
2889 . $srcdir/../bfd/development.sh
2890
2891 ac_ext=c
2892 ac_cpp='$CPP $CPPFLAGS'
2893 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2894 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2895 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2896 if test -n "$ac_tool_prefix"; then
2897   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2898 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2900 $as_echo_n "checking for $ac_word... " >&6; }
2901 if ${ac_cv_prog_CC+:} false; then :
2902   $as_echo_n "(cached) " >&6
2903 else
2904   if test -n "$CC"; then
2905   ac_cv_prog_CC="$CC" # Let the user override the test.
2906 else
2907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2908 for as_dir in $PATH
2909 do
2910   IFS=$as_save_IFS
2911   test -z "$as_dir" && as_dir=.
2912     for ac_exec_ext in '' $ac_executable_extensions; do
2913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2914     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2916     break 2
2917   fi
2918 done
2919   done
2920 IFS=$as_save_IFS
2921
2922 fi
2923 fi
2924 CC=$ac_cv_prog_CC
2925 if test -n "$CC"; then
2926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2927 $as_echo "$CC" >&6; }
2928 else
2929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2930 $as_echo "no" >&6; }
2931 fi
2932
2933
2934 fi
2935 if test -z "$ac_cv_prog_CC"; then
2936   ac_ct_CC=$CC
2937   # Extract the first word of "gcc", so it can be a program name with args.
2938 set dummy gcc; ac_word=$2
2939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2940 $as_echo_n "checking for $ac_word... " >&6; }
2941 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2942   $as_echo_n "(cached) " >&6
2943 else
2944   if test -n "$ac_ct_CC"; then
2945   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2946 else
2947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2948 for as_dir in $PATH
2949 do
2950   IFS=$as_save_IFS
2951   test -z "$as_dir" && as_dir=.
2952     for ac_exec_ext in '' $ac_executable_extensions; do
2953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2954     ac_cv_prog_ac_ct_CC="gcc"
2955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2956     break 2
2957   fi
2958 done
2959   done
2960 IFS=$as_save_IFS
2961
2962 fi
2963 fi
2964 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2965 if test -n "$ac_ct_CC"; then
2966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2967 $as_echo "$ac_ct_CC" >&6; }
2968 else
2969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2970 $as_echo "no" >&6; }
2971 fi
2972
2973   if test "x$ac_ct_CC" = x; then
2974     CC=""
2975   else
2976     case $cross_compiling:$ac_tool_warned in
2977 yes:)
2978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2979 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2980 ac_tool_warned=yes ;;
2981 esac
2982     CC=$ac_ct_CC
2983   fi
2984 else
2985   CC="$ac_cv_prog_CC"
2986 fi
2987
2988 if test -z "$CC"; then
2989           if test -n "$ac_tool_prefix"; then
2990     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2991 set dummy ${ac_tool_prefix}cc; ac_word=$2
2992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2993 $as_echo_n "checking for $ac_word... " >&6; }
2994 if ${ac_cv_prog_CC+:} false; then :
2995   $as_echo_n "(cached) " >&6
2996 else
2997   if test -n "$CC"; then
2998   ac_cv_prog_CC="$CC" # Let the user override the test.
2999 else
3000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3001 for as_dir in $PATH
3002 do
3003   IFS=$as_save_IFS
3004   test -z "$as_dir" && as_dir=.
3005     for ac_exec_ext in '' $ac_executable_extensions; do
3006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3007     ac_cv_prog_CC="${ac_tool_prefix}cc"
3008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3009     break 2
3010   fi
3011 done
3012   done
3013 IFS=$as_save_IFS
3014
3015 fi
3016 fi
3017 CC=$ac_cv_prog_CC
3018 if test -n "$CC"; then
3019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3020 $as_echo "$CC" >&6; }
3021 else
3022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3023 $as_echo "no" >&6; }
3024 fi
3025
3026
3027   fi
3028 fi
3029 if test -z "$CC"; then
3030   # Extract the first word of "cc", so it can be a program name with args.
3031 set dummy cc; ac_word=$2
3032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3033 $as_echo_n "checking for $ac_word... " >&6; }
3034 if ${ac_cv_prog_CC+:} false; then :
3035   $as_echo_n "(cached) " >&6
3036 else
3037   if test -n "$CC"; then
3038   ac_cv_prog_CC="$CC" # Let the user override the test.
3039 else
3040   ac_prog_rejected=no
3041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3042 for as_dir in $PATH
3043 do
3044   IFS=$as_save_IFS
3045   test -z "$as_dir" && as_dir=.
3046     for ac_exec_ext in '' $ac_executable_extensions; do
3047   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3048     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3049        ac_prog_rejected=yes
3050        continue
3051      fi
3052     ac_cv_prog_CC="cc"
3053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3054     break 2
3055   fi
3056 done
3057   done
3058 IFS=$as_save_IFS
3059
3060 if test $ac_prog_rejected = yes; then
3061   # We found a bogon in the path, so make sure we never use it.
3062   set dummy $ac_cv_prog_CC
3063   shift
3064   if test $# != 0; then
3065     # We chose a different compiler from the bogus one.
3066     # However, it has the same basename, so the bogon will be chosen
3067     # first if we set CC to just the basename; use the full file name.
3068     shift
3069     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3070   fi
3071 fi
3072 fi
3073 fi
3074 CC=$ac_cv_prog_CC
3075 if test -n "$CC"; then
3076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3077 $as_echo "$CC" >&6; }
3078 else
3079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3080 $as_echo "no" >&6; }
3081 fi
3082
3083
3084 fi
3085 if test -z "$CC"; then
3086   if test -n "$ac_tool_prefix"; then
3087   for ac_prog in cl.exe
3088   do
3089     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3090 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3092 $as_echo_n "checking for $ac_word... " >&6; }
3093 if ${ac_cv_prog_CC+:} false; then :
3094   $as_echo_n "(cached) " >&6
3095 else
3096   if test -n "$CC"; then
3097   ac_cv_prog_CC="$CC" # Let the user override the test.
3098 else
3099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3100 for as_dir in $PATH
3101 do
3102   IFS=$as_save_IFS
3103   test -z "$as_dir" && as_dir=.
3104     for ac_exec_ext in '' $ac_executable_extensions; do
3105   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3106     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3107     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3108     break 2
3109   fi
3110 done
3111   done
3112 IFS=$as_save_IFS
3113
3114 fi
3115 fi
3116 CC=$ac_cv_prog_CC
3117 if test -n "$CC"; then
3118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3119 $as_echo "$CC" >&6; }
3120 else
3121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3122 $as_echo "no" >&6; }
3123 fi
3124
3125
3126     test -n "$CC" && break
3127   done
3128 fi
3129 if test -z "$CC"; then
3130   ac_ct_CC=$CC
3131   for ac_prog in cl.exe
3132 do
3133   # Extract the first word of "$ac_prog", so it can be a program name with args.
3134 set dummy $ac_prog; ac_word=$2
3135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3136 $as_echo_n "checking for $ac_word... " >&6; }
3137 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3138   $as_echo_n "(cached) " >&6
3139 else
3140   if test -n "$ac_ct_CC"; then
3141   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3142 else
3143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3144 for as_dir in $PATH
3145 do
3146   IFS=$as_save_IFS
3147   test -z "$as_dir" && as_dir=.
3148     for ac_exec_ext in '' $ac_executable_extensions; do
3149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3150     ac_cv_prog_ac_ct_CC="$ac_prog"
3151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3152     break 2
3153   fi
3154 done
3155   done
3156 IFS=$as_save_IFS
3157
3158 fi
3159 fi
3160 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3161 if test -n "$ac_ct_CC"; then
3162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3163 $as_echo "$ac_ct_CC" >&6; }
3164 else
3165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3166 $as_echo "no" >&6; }
3167 fi
3168
3169
3170   test -n "$ac_ct_CC" && break
3171 done
3172
3173   if test "x$ac_ct_CC" = x; then
3174     CC=""
3175   else
3176     case $cross_compiling:$ac_tool_warned in
3177 yes:)
3178 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3179 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3180 ac_tool_warned=yes ;;
3181 esac
3182     CC=$ac_ct_CC
3183   fi
3184 fi
3185
3186 fi
3187
3188
3189 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3190 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3191 as_fn_error $? "no acceptable C compiler found in \$PATH
3192 See \`config.log' for more details" "$LINENO" 5; }
3193
3194 # Provide some information about the compiler.
3195 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3196 set X $ac_compile
3197 ac_compiler=$2
3198 for ac_option in --version -v -V -qversion; do
3199   { { ac_try="$ac_compiler $ac_option >&5"
3200 case "(($ac_try" in
3201   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3202   *) ac_try_echo=$ac_try;;
3203 esac
3204 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3205 $as_echo "$ac_try_echo"; } >&5
3206   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3207   ac_status=$?
3208   if test -s conftest.err; then
3209     sed '10a\
3210 ... rest of stderr output deleted ...
3211          10q' conftest.err >conftest.er1
3212     cat conftest.er1 >&5
3213   fi
3214   rm -f conftest.er1 conftest.err
3215   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3216   test $ac_status = 0; }
3217 done
3218
3219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3220 /* end confdefs.h.  */
3221
3222 int
3223 main ()
3224 {
3225
3226   ;
3227   return 0;
3228 }
3229 _ACEOF
3230 ac_clean_files_save=$ac_clean_files
3231 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3232 # Try to create an executable without -o first, disregard a.out.
3233 # It will help us diagnose broken compilers, and finding out an intuition
3234 # of exeext.
3235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3236 $as_echo_n "checking whether the C compiler works... " >&6; }
3237 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3238
3239 # The possible output files:
3240 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3241
3242 ac_rmfiles=
3243 for ac_file in $ac_files
3244 do
3245   case $ac_file in
3246     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3247     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3248   esac
3249 done
3250 rm -f $ac_rmfiles
3251
3252 if { { ac_try="$ac_link_default"
3253 case "(($ac_try" in
3254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3255   *) ac_try_echo=$ac_try;;
3256 esac
3257 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3258 $as_echo "$ac_try_echo"; } >&5
3259   (eval "$ac_link_default") 2>&5
3260   ac_status=$?
3261   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3262   test $ac_status = 0; }; then :
3263   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3264 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3265 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3266 # so that the user can short-circuit this test for compilers unknown to
3267 # Autoconf.
3268 for ac_file in $ac_files ''
3269 do
3270   test -f "$ac_file" || continue
3271   case $ac_file in
3272     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3273         ;;
3274     [ab].out )
3275         # We found the default executable, but exeext='' is most
3276         # certainly right.
3277         break;;
3278     *.* )
3279         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3280         then :; else
3281            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3282         fi
3283         # We set ac_cv_exeext here because the later test for it is not
3284         # safe: cross compilers may not add the suffix if given an `-o'
3285         # argument, so we may need to know it at that point already.
3286         # Even if this section looks crufty: it has the advantage of
3287         # actually working.
3288         break;;
3289     * )
3290         break;;
3291   esac
3292 done
3293 test "$ac_cv_exeext" = no && ac_cv_exeext=
3294
3295 else
3296   ac_file=''
3297 fi
3298 if test -z "$ac_file"; then :
3299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3300 $as_echo "no" >&6; }
3301 $as_echo "$as_me: failed program was:" >&5
3302 sed 's/^/| /' conftest.$ac_ext >&5
3303
3304 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3305 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3306 as_fn_error 77 "C compiler cannot create executables
3307 See \`config.log' for more details" "$LINENO" 5; }
3308 else
3309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3310 $as_echo "yes" >&6; }
3311 fi
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3313 $as_echo_n "checking for C compiler default output file name... " >&6; }
3314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3315 $as_echo "$ac_file" >&6; }
3316 ac_exeext=$ac_cv_exeext
3317
3318 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3319 ac_clean_files=$ac_clean_files_save
3320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3321 $as_echo_n "checking for suffix of executables... " >&6; }
3322 if { { ac_try="$ac_link"
3323 case "(($ac_try" in
3324   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3325   *) ac_try_echo=$ac_try;;
3326 esac
3327 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3328 $as_echo "$ac_try_echo"; } >&5
3329   (eval "$ac_link") 2>&5
3330   ac_status=$?
3331   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3332   test $ac_status = 0; }; then :
3333   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3334 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3335 # work properly (i.e., refer to `conftest.exe'), while it won't with
3336 # `rm'.
3337 for ac_file in conftest.exe conftest conftest.*; do
3338   test -f "$ac_file" || continue
3339   case $ac_file in
3340     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3341     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3342           break;;
3343     * ) break;;
3344   esac
3345 done
3346 else
3347   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3348 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3349 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3350 See \`config.log' for more details" "$LINENO" 5; }
3351 fi
3352 rm -f conftest conftest$ac_cv_exeext
3353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3354 $as_echo "$ac_cv_exeext" >&6; }
3355
3356 rm -f conftest.$ac_ext
3357 EXEEXT=$ac_cv_exeext
3358 ac_exeext=$EXEEXT
3359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3360 /* end confdefs.h.  */
3361 #include <stdio.h>
3362 int
3363 main ()
3364 {
3365 FILE *f = fopen ("conftest.out", "w");
3366  return ferror (f) || fclose (f) != 0;
3367
3368   ;
3369   return 0;
3370 }
3371 _ACEOF
3372 ac_clean_files="$ac_clean_files conftest.out"
3373 # Check that the compiler produces executables we can run.  If not, either
3374 # the compiler is broken, or we cross compile.
3375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3376 $as_echo_n "checking whether we are cross compiling... " >&6; }
3377 if test "$cross_compiling" != yes; then
3378   { { ac_try="$ac_link"
3379 case "(($ac_try" in
3380   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3381   *) ac_try_echo=$ac_try;;
3382 esac
3383 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3384 $as_echo "$ac_try_echo"; } >&5
3385   (eval "$ac_link") 2>&5
3386   ac_status=$?
3387   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3388   test $ac_status = 0; }
3389   if { ac_try='./conftest$ac_cv_exeext'
3390   { { case "(($ac_try" in
3391   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3392   *) ac_try_echo=$ac_try;;
3393 esac
3394 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3395 $as_echo "$ac_try_echo"; } >&5
3396   (eval "$ac_try") 2>&5
3397   ac_status=$?
3398   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3399   test $ac_status = 0; }; }; then
3400     cross_compiling=no
3401   else
3402     if test "$cross_compiling" = maybe; then
3403         cross_compiling=yes
3404     else
3405         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3407 as_fn_error $? "cannot run C compiled programs.
3408 If you meant to cross compile, use \`--host'.
3409 See \`config.log' for more details" "$LINENO" 5; }
3410     fi
3411   fi
3412 fi
3413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3414 $as_echo "$cross_compiling" >&6; }
3415
3416 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3417 ac_clean_files=$ac_clean_files_save
3418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3419 $as_echo_n "checking for suffix of object files... " >&6; }
3420 if ${ac_cv_objext+:} false; then :
3421   $as_echo_n "(cached) " >&6
3422 else
3423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3424 /* end confdefs.h.  */
3425
3426 int
3427 main ()
3428 {
3429
3430   ;
3431   return 0;
3432 }
3433 _ACEOF
3434 rm -f conftest.o conftest.obj
3435 if { { ac_try="$ac_compile"
3436 case "(($ac_try" in
3437   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3438   *) ac_try_echo=$ac_try;;
3439 esac
3440 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3441 $as_echo "$ac_try_echo"; } >&5
3442   (eval "$ac_compile") 2>&5
3443   ac_status=$?
3444   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3445   test $ac_status = 0; }; then :
3446   for ac_file in conftest.o conftest.obj conftest.*; do
3447   test -f "$ac_file" || continue;
3448   case $ac_file in
3449     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3450     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3451        break;;
3452   esac
3453 done
3454 else
3455   $as_echo "$as_me: failed program was:" >&5
3456 sed 's/^/| /' conftest.$ac_ext >&5
3457
3458 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3459 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3460 as_fn_error $? "cannot compute suffix of object files: cannot compile
3461 See \`config.log' for more details" "$LINENO" 5; }
3462 fi
3463 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3464 fi
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3466 $as_echo "$ac_cv_objext" >&6; }
3467 OBJEXT=$ac_cv_objext
3468 ac_objext=$OBJEXT
3469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3470 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3471 if ${ac_cv_c_compiler_gnu+:} false; then :
3472   $as_echo_n "(cached) " >&6
3473 else
3474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3475 /* end confdefs.h.  */
3476
3477 int
3478 main ()
3479 {
3480 #ifndef __GNUC__
3481        choke me
3482 #endif
3483
3484   ;
3485   return 0;
3486 }
3487 _ACEOF
3488 if ac_fn_c_try_compile "$LINENO"; then :
3489   ac_compiler_gnu=yes
3490 else
3491   ac_compiler_gnu=no
3492 fi
3493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3494 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3495
3496 fi
3497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3498 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3499 if test $ac_compiler_gnu = yes; then
3500   GCC=yes
3501 else
3502   GCC=
3503 fi
3504 ac_test_CFLAGS=${CFLAGS+set}
3505 ac_save_CFLAGS=$CFLAGS
3506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3507 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3508 if ${ac_cv_prog_cc_g+:} false; then :
3509   $as_echo_n "(cached) " >&6
3510 else
3511   ac_save_c_werror_flag=$ac_c_werror_flag
3512    ac_c_werror_flag=yes
3513    ac_cv_prog_cc_g=no
3514    CFLAGS="-g"
3515    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3516 /* end confdefs.h.  */
3517
3518 int
3519 main ()
3520 {
3521
3522   ;
3523   return 0;
3524 }
3525 _ACEOF
3526 if ac_fn_c_try_compile "$LINENO"; then :
3527   ac_cv_prog_cc_g=yes
3528 else
3529   CFLAGS=""
3530       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3531 /* end confdefs.h.  */
3532
3533 int
3534 main ()
3535 {
3536
3537   ;
3538   return 0;
3539 }
3540 _ACEOF
3541 if ac_fn_c_try_compile "$LINENO"; then :
3542
3543 else
3544   ac_c_werror_flag=$ac_save_c_werror_flag
3545          CFLAGS="-g"
3546          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3547 /* end confdefs.h.  */
3548
3549 int
3550 main ()
3551 {
3552
3553   ;
3554   return 0;
3555 }
3556 _ACEOF
3557 if ac_fn_c_try_compile "$LINENO"; then :
3558   ac_cv_prog_cc_g=yes
3559 fi
3560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3561 fi
3562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3563 fi
3564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3565    ac_c_werror_flag=$ac_save_c_werror_flag
3566 fi
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3568 $as_echo "$ac_cv_prog_cc_g" >&6; }
3569 if test "$ac_test_CFLAGS" = set; then
3570   CFLAGS=$ac_save_CFLAGS
3571 elif test $ac_cv_prog_cc_g = yes; then
3572   if test "$GCC" = yes; then
3573     CFLAGS="-g -O2"
3574   else
3575     CFLAGS="-g"
3576   fi
3577 else
3578   if test "$GCC" = yes; then
3579     CFLAGS="-O2"
3580   else
3581     CFLAGS=
3582   fi
3583 fi
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3585 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3586 if ${ac_cv_prog_cc_c89+:} false; then :
3587   $as_echo_n "(cached) " >&6
3588 else
3589   ac_cv_prog_cc_c89=no
3590 ac_save_CC=$CC
3591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3592 /* end confdefs.h.  */
3593 #include <stdarg.h>
3594 #include <stdio.h>
3595 struct stat;
3596 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3597 struct buf { int x; };
3598 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3599 static char *e (p, i)
3600      char **p;
3601      int i;
3602 {
3603   return p[i];
3604 }
3605 static char *f (char * (*g) (char **, int), char **p, ...)
3606 {
3607   char *s;
3608   va_list v;
3609   va_start (v,p);
3610   s = g (p, va_arg (v,int));
3611   va_end (v);
3612   return s;
3613 }
3614
3615 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3616    function prototypes and stuff, but not '\xHH' hex character constants.
3617    These don't provoke an error unfortunately, instead are silently treated
3618    as 'x'.  The following induces an error, until -std is added to get
3619    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3620    array size at least.  It's necessary to write '\x00'==0 to get something
3621    that's true only with -std.  */
3622 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3623
3624 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3625    inside strings and character constants.  */
3626 #define FOO(x) 'x'
3627 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3628
3629 int test (int i, double x);
3630 struct s1 {int (*f) (int a);};
3631 struct s2 {int (*f) (double a);};
3632 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3633 int argc;
3634 char **argv;
3635 int
3636 main ()
3637 {
3638 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3639   ;
3640   return 0;
3641 }
3642 _ACEOF
3643 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3644         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3645 do
3646   CC="$ac_save_CC $ac_arg"
3647   if ac_fn_c_try_compile "$LINENO"; then :
3648   ac_cv_prog_cc_c89=$ac_arg
3649 fi
3650 rm -f core conftest.err conftest.$ac_objext
3651   test "x$ac_cv_prog_cc_c89" != "xno" && break
3652 done
3653 rm -f conftest.$ac_ext
3654 CC=$ac_save_CC
3655
3656 fi
3657 # AC_CACHE_VAL
3658 case "x$ac_cv_prog_cc_c89" in
3659   x)
3660     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3661 $as_echo "none needed" >&6; } ;;
3662   xno)
3663     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3664 $as_echo "unsupported" >&6; } ;;
3665   *)
3666     CC="$CC $ac_cv_prog_cc_c89"
3667     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3668 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3669 esac
3670 if test "x$ac_cv_prog_cc_c89" != xno; then :
3671
3672 fi
3673
3674 ac_ext=c
3675 ac_cpp='$CPP $CPPFLAGS'
3676 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3677 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3678 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3679
3680 ac_ext=cpp
3681 ac_cpp='$CXXCPP $CPPFLAGS'
3682 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3683 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3684 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3685 if test -z "$CXX"; then
3686   if test -n "$CCC"; then
3687     CXX=$CCC
3688   else
3689     if test -n "$ac_tool_prefix"; then
3690   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3691   do
3692     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3693 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3695 $as_echo_n "checking for $ac_word... " >&6; }
3696 if ${ac_cv_prog_CXX+:} false; then :
3697   $as_echo_n "(cached) " >&6
3698 else
3699   if test -n "$CXX"; then
3700   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3701 else
3702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3703 for as_dir in $PATH
3704 do
3705   IFS=$as_save_IFS
3706   test -z "$as_dir" && as_dir=.
3707     for ac_exec_ext in '' $ac_executable_extensions; do
3708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3709     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3711     break 2
3712   fi
3713 done
3714   done
3715 IFS=$as_save_IFS
3716
3717 fi
3718 fi
3719 CXX=$ac_cv_prog_CXX
3720 if test -n "$CXX"; then
3721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3722 $as_echo "$CXX" >&6; }
3723 else
3724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3725 $as_echo "no" >&6; }
3726 fi
3727
3728
3729     test -n "$CXX" && break
3730   done
3731 fi
3732 if test -z "$CXX"; then
3733   ac_ct_CXX=$CXX
3734   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3735 do
3736   # Extract the first word of "$ac_prog", so it can be a program name with args.
3737 set dummy $ac_prog; ac_word=$2
3738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3739 $as_echo_n "checking for $ac_word... " >&6; }
3740 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3741   $as_echo_n "(cached) " >&6
3742 else
3743   if test -n "$ac_ct_CXX"; then
3744   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3745 else
3746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747 for as_dir in $PATH
3748 do
3749   IFS=$as_save_IFS
3750   test -z "$as_dir" && as_dir=.
3751     for ac_exec_ext in '' $ac_executable_extensions; do
3752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3753     ac_cv_prog_ac_ct_CXX="$ac_prog"
3754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3755     break 2
3756   fi
3757 done
3758   done
3759 IFS=$as_save_IFS
3760
3761 fi
3762 fi
3763 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3764 if test -n "$ac_ct_CXX"; then
3765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3766 $as_echo "$ac_ct_CXX" >&6; }
3767 else
3768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3769 $as_echo "no" >&6; }
3770 fi
3771
3772
3773   test -n "$ac_ct_CXX" && break
3774 done
3775
3776   if test "x$ac_ct_CXX" = x; then
3777     CXX="g++"
3778   else
3779     case $cross_compiling:$ac_tool_warned in
3780 yes:)
3781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3782 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3783 ac_tool_warned=yes ;;
3784 esac
3785     CXX=$ac_ct_CXX
3786   fi
3787 fi
3788
3789   fi
3790 fi
3791 # Provide some information about the compiler.
3792 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3793 set X $ac_compile
3794 ac_compiler=$2
3795 for ac_option in --version -v -V -qversion; do
3796   { { ac_try="$ac_compiler $ac_option >&5"
3797 case "(($ac_try" in
3798   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3799   *) ac_try_echo=$ac_try;;
3800 esac
3801 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3802 $as_echo "$ac_try_echo"; } >&5
3803   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3804   ac_status=$?
3805   if test -s conftest.err; then
3806     sed '10a\
3807 ... rest of stderr output deleted ...
3808          10q' conftest.err >conftest.er1
3809     cat conftest.er1 >&5
3810   fi
3811   rm -f conftest.er1 conftest.err
3812   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3813   test $ac_status = 0; }
3814 done
3815
3816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3817 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3818 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3819   $as_echo_n "(cached) " >&6
3820 else
3821   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3822 /* end confdefs.h.  */
3823
3824 int
3825 main ()
3826 {
3827 #ifndef __GNUC__
3828        choke me
3829 #endif
3830
3831   ;
3832   return 0;
3833 }
3834 _ACEOF
3835 if ac_fn_cxx_try_compile "$LINENO"; then :
3836   ac_compiler_gnu=yes
3837 else
3838   ac_compiler_gnu=no
3839 fi
3840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3841 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3842
3843 fi
3844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3845 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3846 if test $ac_compiler_gnu = yes; then
3847   GXX=yes
3848 else
3849   GXX=
3850 fi
3851 ac_test_CXXFLAGS=${CXXFLAGS+set}
3852 ac_save_CXXFLAGS=$CXXFLAGS
3853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3854 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3855 if ${ac_cv_prog_cxx_g+:} false; then :
3856   $as_echo_n "(cached) " >&6
3857 else
3858   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3859    ac_cxx_werror_flag=yes
3860    ac_cv_prog_cxx_g=no
3861    CXXFLAGS="-g"
3862    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3863 /* end confdefs.h.  */
3864
3865 int
3866 main ()
3867 {
3868
3869   ;
3870   return 0;
3871 }
3872 _ACEOF
3873 if ac_fn_cxx_try_compile "$LINENO"; then :
3874   ac_cv_prog_cxx_g=yes
3875 else
3876   CXXFLAGS=""
3877       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3878 /* end confdefs.h.  */
3879
3880 int
3881 main ()
3882 {
3883
3884   ;
3885   return 0;
3886 }
3887 _ACEOF
3888 if ac_fn_cxx_try_compile "$LINENO"; then :
3889
3890 else
3891   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3892          CXXFLAGS="-g"
3893          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3894 /* end confdefs.h.  */
3895
3896 int
3897 main ()
3898 {
3899
3900   ;
3901   return 0;
3902 }
3903 _ACEOF
3904 if ac_fn_cxx_try_compile "$LINENO"; then :
3905   ac_cv_prog_cxx_g=yes
3906 fi
3907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3908 fi
3909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3910 fi
3911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3912    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3913 fi
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3915 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3916 if test "$ac_test_CXXFLAGS" = set; then
3917   CXXFLAGS=$ac_save_CXXFLAGS
3918 elif test $ac_cv_prog_cxx_g = yes; then
3919   if test "$GXX" = yes; then
3920     CXXFLAGS="-g -O2"
3921   else
3922     CXXFLAGS="-g"
3923   fi
3924 else
3925   if test "$GXX" = yes; then
3926     CXXFLAGS="-O2"
3927   else
3928     CXXFLAGS=
3929   fi
3930 fi
3931 ac_ext=c
3932 ac_cpp='$CPP $CPPFLAGS'
3933 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3934 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3935 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3936
3937
3938
3939 ac_ext=c
3940 ac_cpp='$CPP $CPPFLAGS'
3941 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3942 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3943 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3945 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3946 # On Suns, sometimes $CPP names a directory.
3947 if test -n "$CPP" && test -d "$CPP"; then
3948   CPP=
3949 fi
3950 if test -z "$CPP"; then
3951   if ${ac_cv_prog_CPP+:} false; then :
3952   $as_echo_n "(cached) " >&6
3953 else
3954       # Double quotes because CPP needs to be expanded
3955     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3956     do
3957       ac_preproc_ok=false
3958 for ac_c_preproc_warn_flag in '' yes
3959 do
3960   # Use a header file that comes with gcc, so configuring glibc
3961   # with a fresh cross-compiler works.
3962   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3963   # <limits.h> exists even on freestanding compilers.
3964   # On the NeXT, cc -E runs the code through the compiler's parser,
3965   # not just through cpp. "Syntax error" is here to catch this case.
3966   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3967 /* end confdefs.h.  */
3968 #ifdef __STDC__
3969 # include <limits.h>
3970 #else
3971 # include <assert.h>
3972 #endif
3973                      Syntax error
3974 _ACEOF
3975 if ac_fn_c_try_cpp "$LINENO"; then :
3976
3977 else
3978   # Broken: fails on valid input.
3979 continue
3980 fi
3981 rm -f conftest.err conftest.i conftest.$ac_ext
3982
3983   # OK, works on sane cases.  Now check whether nonexistent headers
3984   # can be detected and how.
3985   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3986 /* end confdefs.h.  */
3987 #include <ac_nonexistent.h>
3988 _ACEOF
3989 if ac_fn_c_try_cpp "$LINENO"; then :
3990   # Broken: success on invalid input.
3991 continue
3992 else
3993   # Passes both tests.
3994 ac_preproc_ok=:
3995 break
3996 fi
3997 rm -f conftest.err conftest.i conftest.$ac_ext
3998
3999 done
4000 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4001 rm -f conftest.i conftest.err conftest.$ac_ext
4002 if $ac_preproc_ok; then :
4003   break
4004 fi
4005
4006     done
4007     ac_cv_prog_CPP=$CPP
4008
4009 fi
4010   CPP=$ac_cv_prog_CPP
4011 else
4012   ac_cv_prog_CPP=$CPP
4013 fi
4014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4015 $as_echo "$CPP" >&6; }
4016 ac_preproc_ok=false
4017 for ac_c_preproc_warn_flag in '' yes
4018 do
4019   # Use a header file that comes with gcc, so configuring glibc
4020   # with a fresh cross-compiler works.
4021   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4022   # <limits.h> exists even on freestanding compilers.
4023   # On the NeXT, cc -E runs the code through the compiler's parser,
4024   # not just through cpp. "Syntax error" is here to catch this case.
4025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4026 /* end confdefs.h.  */
4027 #ifdef __STDC__
4028 # include <limits.h>
4029 #else
4030 # include <assert.h>
4031 #endif
4032                      Syntax error
4033 _ACEOF
4034 if ac_fn_c_try_cpp "$LINENO"; then :
4035
4036 else
4037   # Broken: fails on valid input.
4038 continue
4039 fi
4040 rm -f conftest.err conftest.i conftest.$ac_ext
4041
4042   # OK, works on sane cases.  Now check whether nonexistent headers
4043   # can be detected and how.
4044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4045 /* end confdefs.h.  */
4046 #include <ac_nonexistent.h>
4047 _ACEOF
4048 if ac_fn_c_try_cpp "$LINENO"; then :
4049   # Broken: success on invalid input.
4050 continue
4051 else
4052   # Passes both tests.
4053 ac_preproc_ok=:
4054 break
4055 fi
4056 rm -f conftest.err conftest.i conftest.$ac_ext
4057
4058 done
4059 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4060 rm -f conftest.i conftest.err conftest.$ac_ext
4061 if $ac_preproc_ok; then :
4062
4063 else
4064   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4065 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4066 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4067 See \`config.log' for more details" "$LINENO" 5; }
4068 fi
4069
4070 ac_ext=c
4071 ac_cpp='$CPP $CPPFLAGS'
4072 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4073 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4074 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4075
4076
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4078 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4079 if ${ac_cv_path_GREP+:} false; then :
4080   $as_echo_n "(cached) " >&6
4081 else
4082   if test -z "$GREP"; then
4083   ac_path_GREP_found=false
4084   # Loop through the user's path and test for each of PROGNAME-LIST
4085   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4086 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4087 do
4088   IFS=$as_save_IFS
4089   test -z "$as_dir" && as_dir=.
4090     for ac_prog in grep ggrep; do
4091     for ac_exec_ext in '' $ac_executable_extensions; do
4092       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4093       as_fn_executable_p "$ac_path_GREP" || continue
4094 # Check for GNU ac_path_GREP and select it if it is found.
4095   # Check for GNU $ac_path_GREP
4096 case `"$ac_path_GREP" --version 2>&1` in
4097 *GNU*)
4098   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4099 *)
4100   ac_count=0
4101   $as_echo_n 0123456789 >"conftest.in"
4102   while :
4103   do
4104     cat "conftest.in" "conftest.in" >"conftest.tmp"
4105     mv "conftest.tmp" "conftest.in"
4106     cp "conftest.in" "conftest.nl"
4107     $as_echo 'GREP' >> "conftest.nl"
4108     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4109     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4110     as_fn_arith $ac_count + 1 && ac_count=$as_val
4111     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4112       # Best one so far, save it but keep looking for a better one
4113       ac_cv_path_GREP="$ac_path_GREP"
4114       ac_path_GREP_max=$ac_count
4115     fi
4116     # 10*(2^10) chars as input seems more than enough
4117     test $ac_count -gt 10 && break
4118   done
4119   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4120 esac
4121
4122       $ac_path_GREP_found && break 3
4123     done
4124   done
4125   done
4126 IFS=$as_save_IFS
4127   if test -z "$ac_cv_path_GREP"; then
4128     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4129   fi
4130 else
4131   ac_cv_path_GREP=$GREP
4132 fi
4133
4134 fi
4135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4136 $as_echo "$ac_cv_path_GREP" >&6; }
4137  GREP="$ac_cv_path_GREP"
4138
4139
4140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4141 $as_echo_n "checking for egrep... " >&6; }
4142 if ${ac_cv_path_EGREP+:} false; then :
4143   $as_echo_n "(cached) " >&6
4144 else
4145   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4146    then ac_cv_path_EGREP="$GREP -E"
4147    else
4148      if test -z "$EGREP"; then
4149   ac_path_EGREP_found=false
4150   # Loop through the user's path and test for each of PROGNAME-LIST
4151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4152 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4153 do
4154   IFS=$as_save_IFS
4155   test -z "$as_dir" && as_dir=.
4156     for ac_prog in egrep; do
4157     for ac_exec_ext in '' $ac_executable_extensions; do
4158       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4159       as_fn_executable_p "$ac_path_EGREP" || continue
4160 # Check for GNU ac_path_EGREP and select it if it is found.
4161   # Check for GNU $ac_path_EGREP
4162 case `"$ac_path_EGREP" --version 2>&1` in
4163 *GNU*)
4164   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4165 *)
4166   ac_count=0
4167   $as_echo_n 0123456789 >"conftest.in"
4168   while :
4169   do
4170     cat "conftest.in" "conftest.in" >"conftest.tmp"
4171     mv "conftest.tmp" "conftest.in"
4172     cp "conftest.in" "conftest.nl"
4173     $as_echo 'EGREP' >> "conftest.nl"
4174     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4175     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4176     as_fn_arith $ac_count + 1 && ac_count=$as_val
4177     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4178       # Best one so far, save it but keep looking for a better one
4179       ac_cv_path_EGREP="$ac_path_EGREP"
4180       ac_path_EGREP_max=$ac_count
4181     fi
4182     # 10*(2^10) chars as input seems more than enough
4183     test $ac_count -gt 10 && break
4184   done
4185   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4186 esac
4187
4188       $ac_path_EGREP_found && break 3
4189     done
4190   done
4191   done
4192 IFS=$as_save_IFS
4193   if test -z "$ac_cv_path_EGREP"; then
4194     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4195   fi
4196 else
4197   ac_cv_path_EGREP=$EGREP
4198 fi
4199
4200    fi
4201 fi
4202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4203 $as_echo "$ac_cv_path_EGREP" >&6; }
4204  EGREP="$ac_cv_path_EGREP"
4205
4206
4207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4208 $as_echo_n "checking for ANSI C header files... " >&6; }
4209 if ${ac_cv_header_stdc+:} false; then :
4210   $as_echo_n "(cached) " >&6
4211 else
4212   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4213 /* end confdefs.h.  */
4214 #include <stdlib.h>
4215 #include <stdarg.h>
4216 #include <string.h>
4217 #include <float.h>
4218
4219 int
4220 main ()
4221 {
4222
4223   ;
4224   return 0;
4225 }
4226 _ACEOF
4227 if ac_fn_c_try_compile "$LINENO"; then :
4228   ac_cv_header_stdc=yes
4229 else
4230   ac_cv_header_stdc=no
4231 fi
4232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4233
4234 if test $ac_cv_header_stdc = yes; then
4235   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237 /* end confdefs.h.  */
4238 #include <string.h>
4239
4240 _ACEOF
4241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4242   $EGREP "memchr" >/dev/null 2>&1; then :
4243
4244 else
4245   ac_cv_header_stdc=no
4246 fi
4247 rm -f conftest*
4248
4249 fi
4250
4251 if test $ac_cv_header_stdc = yes; then
4252   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4254 /* end confdefs.h.  */
4255 #include <stdlib.h>
4256
4257 _ACEOF
4258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4259   $EGREP "free" >/dev/null 2>&1; then :
4260
4261 else
4262   ac_cv_header_stdc=no
4263 fi
4264 rm -f conftest*
4265
4266 fi
4267
4268 if test $ac_cv_header_stdc = yes; then
4269   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4270   if test "$cross_compiling" = yes; then :
4271   :
4272 else
4273   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4274 /* end confdefs.h.  */
4275 #include <ctype.h>
4276 #include <stdlib.h>
4277 #if ((' ' & 0x0FF) == 0x020)
4278 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4279 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4280 #else
4281 # define ISLOWER(c) \
4282                    (('a' <= (c) && (c) <= 'i') \
4283                      || ('j' <= (c) && (c) <= 'r') \
4284                      || ('s' <= (c) && (c) <= 'z'))
4285 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4286 #endif
4287
4288 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4289 int
4290 main ()
4291 {
4292   int i;
4293   for (i = 0; i < 256; i++)
4294     if (XOR (islower (i), ISLOWER (i))
4295         || toupper (i) != TOUPPER (i))
4296       return 2;
4297   return 0;
4298 }
4299 _ACEOF
4300 if ac_fn_c_try_run "$LINENO"; then :
4301
4302 else
4303   ac_cv_header_stdc=no
4304 fi
4305 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4306   conftest.$ac_objext conftest.beam conftest.$ac_ext
4307 fi
4308
4309 fi
4310 fi
4311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4312 $as_echo "$ac_cv_header_stdc" >&6; }
4313 if test $ac_cv_header_stdc = yes; then
4314
4315 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4316
4317 fi
4318
4319 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4320 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4321                   inttypes.h stdint.h unistd.h
4322 do :
4323   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4324 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4325 "
4326 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4327   cat >>confdefs.h <<_ACEOF
4328 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4329 _ACEOF
4330
4331 fi
4332
4333 done
4334
4335
4336
4337   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4338 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4339   MINIX=yes
4340 else
4341   MINIX=
4342 fi
4343
4344
4345   if test "$MINIX" = yes; then
4346
4347 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4348
4349
4350 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4351
4352
4353 $as_echo "#define _MINIX 1" >>confdefs.h
4354
4355   fi
4356
4357
4358   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4359 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4360 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4361   $as_echo_n "(cached) " >&6
4362 else
4363   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4364 /* end confdefs.h.  */
4365
4366 #         define __EXTENSIONS__ 1
4367           $ac_includes_default
4368 int
4369 main ()
4370 {
4371
4372   ;
4373   return 0;
4374 }
4375 _ACEOF
4376 if ac_fn_c_try_compile "$LINENO"; then :
4377   ac_cv_safe_to_define___extensions__=yes
4378 else
4379   ac_cv_safe_to_define___extensions__=no
4380 fi
4381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4382 fi
4383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4384 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4385   test $ac_cv_safe_to_define___extensions__ = yes &&
4386     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4387
4388   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4389
4390   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4391
4392   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4393
4394   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4395
4396
4397 ac_aux_dir=
4398 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4399   if test -f "$ac_dir/install-sh"; then
4400     ac_aux_dir=$ac_dir
4401     ac_install_sh="$ac_aux_dir/install-sh -c"
4402     break
4403   elif test -f "$ac_dir/install.sh"; then
4404     ac_aux_dir=$ac_dir
4405     ac_install_sh="$ac_aux_dir/install.sh -c"
4406     break
4407   elif test -f "$ac_dir/shtool"; then
4408     ac_aux_dir=$ac_dir
4409     ac_install_sh="$ac_aux_dir/shtool install -c"
4410     break
4411   fi
4412 done
4413 if test -z "$ac_aux_dir"; then
4414   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4415 fi
4416
4417 # These three variables are undocumented and unsupported,
4418 # and are intended to be withdrawn in a future Autoconf release.
4419 # They can cause serious problems if a builder's source tree is in a directory
4420 # whose full name contains unusual characters.
4421 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4422 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4423 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4424
4425
4426 # Make sure we can run config.sub.
4427 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4428   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4429
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4431 $as_echo_n "checking build system type... " >&6; }
4432 if ${ac_cv_build+:} false; then :
4433   $as_echo_n "(cached) " >&6
4434 else
4435   ac_build_alias=$build_alias
4436 test "x$ac_build_alias" = x &&
4437   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4438 test "x$ac_build_alias" = x &&
4439   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4440 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4441   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4442
4443 fi
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4445 $as_echo "$ac_cv_build" >&6; }
4446 case $ac_cv_build in
4447 *-*-*) ;;
4448 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4449 esac
4450 build=$ac_cv_build
4451 ac_save_IFS=$IFS; IFS='-'
4452 set x $ac_cv_build
4453 shift
4454 build_cpu=$1
4455 build_vendor=$2
4456 shift; shift
4457 # Remember, the first character of IFS is used to create $*,
4458 # except with old shells:
4459 build_os=$*
4460 IFS=$ac_save_IFS
4461 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4462
4463
4464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4465 $as_echo_n "checking host system type... " >&6; }
4466 if ${ac_cv_host+:} false; then :
4467   $as_echo_n "(cached) " >&6
4468 else
4469   if test "x$host_alias" = x; then
4470   ac_cv_host=$ac_cv_build
4471 else
4472   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4473     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4474 fi
4475
4476 fi
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4478 $as_echo "$ac_cv_host" >&6; }
4479 case $ac_cv_host in
4480 *-*-*) ;;
4481 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4482 esac
4483 host=$ac_cv_host
4484 ac_save_IFS=$IFS; IFS='-'
4485 set x $ac_cv_host
4486 shift
4487 host_cpu=$1
4488 host_vendor=$2
4489 shift; shift
4490 # Remember, the first character of IFS is used to create $*,
4491 # except with old shells:
4492 host_os=$*
4493 IFS=$ac_save_IFS
4494 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4495
4496
4497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4498 $as_echo_n "checking target system type... " >&6; }
4499 if ${ac_cv_target+:} false; then :
4500   $as_echo_n "(cached) " >&6
4501 else
4502   if test "x$target_alias" = x; then
4503   ac_cv_target=$ac_cv_host
4504 else
4505   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4506     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4507 fi
4508
4509 fi
4510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4511 $as_echo "$ac_cv_target" >&6; }
4512 case $ac_cv_target in
4513 *-*-*) ;;
4514 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4515 esac
4516 target=$ac_cv_target
4517 ac_save_IFS=$IFS; IFS='-'
4518 set x $ac_cv_target
4519 shift
4520 target_cpu=$1
4521 target_vendor=$2
4522 shift; shift
4523 # Remember, the first character of IFS is used to create $*,
4524 # except with old shells:
4525 target_os=$*
4526 IFS=$ac_save_IFS
4527 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4528
4529
4530 # The aliases save the names the user supplied, while $host etc.
4531 # will get canonicalized.
4532 test -n "$target_alias" &&
4533   test "$program_prefix$program_suffix$program_transform_name" = \
4534     NONENONEs,x,x, &&
4535   program_prefix=${target_alias}-
4536
4537 # The tests for host and target for $enable_largefile require
4538 # canonical names.
4539
4540
4541
4542 # As the $enable_largefile decision depends on --enable-plugins we must set it
4543 # even in directories otherwise not depending on the $plugins option.
4544
4545
4546   maybe_plugins=no
4547   for ac_header in dlfcn.h
4548 do :
4549   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4550 "
4551 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4552   cat >>confdefs.h <<_ACEOF
4553 #define HAVE_DLFCN_H 1
4554 _ACEOF
4555  maybe_plugins=yes
4556 fi
4557
4558 done
4559
4560   for ac_header in windows.h
4561 do :
4562   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4563 "
4564 if test "x$ac_cv_header_windows_h" = xyes; then :
4565   cat >>confdefs.h <<_ACEOF
4566 #define HAVE_WINDOWS_H 1
4567 _ACEOF
4568  maybe_plugins=yes
4569 fi
4570
4571 done
4572
4573
4574   # Check whether --enable-plugins was given.
4575 if test "${enable_plugins+set}" = set; then :
4576   enableval=$enable_plugins; case "${enableval}" in
4577       no) plugins=no ;;
4578       *) plugins=yes
4579          if test "$maybe_plugins" != "yes" ; then
4580            as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4581          fi ;;
4582      esac
4583 else
4584   plugins=$maybe_plugins
4585
4586 fi
4587
4588   if test "$plugins" = "yes"; then
4589     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4590 $as_echo_n "checking for library containing dlsym... " >&6; }
4591 if ${ac_cv_search_dlsym+:} false; then :
4592   $as_echo_n "(cached) " >&6
4593 else
4594   ac_func_search_save_LIBS=$LIBS
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596 /* end confdefs.h.  */
4597
4598 /* Override any GCC internal prototype to avoid an error.
4599    Use char because int might match the return type of a GCC
4600    builtin and then its argument prototype would still apply.  */
4601 #ifdef __cplusplus
4602 extern "C"
4603 #endif
4604 char dlsym ();
4605 int
4606 main ()
4607 {
4608 return dlsym ();
4609   ;
4610   return 0;
4611 }
4612 _ACEOF
4613 for ac_lib in '' dl; do
4614   if test -z "$ac_lib"; then
4615     ac_res="none required"
4616   else
4617     ac_res=-l$ac_lib
4618     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4619   fi
4620   if ac_fn_c_try_link "$LINENO"; then :
4621   ac_cv_search_dlsym=$ac_res
4622 fi
4623 rm -f core conftest.err conftest.$ac_objext \
4624     conftest$ac_exeext
4625   if ${ac_cv_search_dlsym+:} false; then :
4626   break
4627 fi
4628 done
4629 if ${ac_cv_search_dlsym+:} false; then :
4630
4631 else
4632   ac_cv_search_dlsym=no
4633 fi
4634 rm conftest.$ac_ext
4635 LIBS=$ac_func_search_save_LIBS
4636 fi
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4638 $as_echo "$ac_cv_search_dlsym" >&6; }
4639 ac_res=$ac_cv_search_dlsym
4640 if test "$ac_res" != no; then :
4641   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4642
4643 fi
4644
4645   fi
4646
4647
4648 case "${host}" in
4649   sparc-*-solaris*|i[3-7]86-*-solaris*)
4650     # On native 32bit sparc and ia32 solaris, large-file and procfs support
4651     # are mutually exclusive; and without procfs support, the bfd/ elf module
4652     # cannot provide certain routines such as elfcore_write_prpsinfo
4653     # or elfcore_write_prstatus.  So unless the user explicitly requested
4654     # large-file support through the --enable-largefile switch, disable
4655     # large-file support in favor of procfs support.
4656     test "${target}" = "${host}" -a "x$plugins" = xno \
4657       && : ${enable_largefile="no"}
4658     ;;
4659 esac
4660
4661 # Check whether --enable-largefile was given.
4662 if test "${enable_largefile+set}" = set; then :
4663   enableval=$enable_largefile;
4664 fi
4665
4666 if test "$enable_largefile" != no; then
4667
4668   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4669 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4670 if ${ac_cv_sys_largefile_CC+:} false; then :
4671   $as_echo_n "(cached) " >&6
4672 else
4673   ac_cv_sys_largefile_CC=no
4674      if test "$GCC" != yes; then
4675        ac_save_CC=$CC
4676        while :; do
4677          # IRIX 6.2 and later do not support large files by default,
4678          # so use the C compiler's -n32 option if that helps.
4679          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4680 /* end confdefs.h.  */
4681 #include <sys/types.h>
4682  /* Check that off_t can represent 2**63 - 1 correctly.
4683     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4684     since some C++ compilers masquerading as C compilers
4685     incorrectly reject 9223372036854775807.  */
4686 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4687   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4688                        && LARGE_OFF_T % 2147483647 == 1)
4689                       ? 1 : -1];
4690 int
4691 main ()
4692 {
4693
4694   ;
4695   return 0;
4696 }
4697 _ACEOF
4698          if ac_fn_c_try_compile "$LINENO"; then :
4699   break
4700 fi
4701 rm -f core conftest.err conftest.$ac_objext
4702          CC="$CC -n32"
4703          if ac_fn_c_try_compile "$LINENO"; then :
4704   ac_cv_sys_largefile_CC=' -n32'; break
4705 fi
4706 rm -f core conftest.err conftest.$ac_objext
4707          break
4708        done
4709        CC=$ac_save_CC
4710        rm -f conftest.$ac_ext
4711     fi
4712 fi
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4714 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4715   if test "$ac_cv_sys_largefile_CC" != no; then
4716     CC=$CC$ac_cv_sys_largefile_CC
4717   fi
4718
4719   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4720 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4721 if ${ac_cv_sys_file_offset_bits+:} false; then :
4722   $as_echo_n "(cached) " >&6
4723 else
4724   while :; do
4725   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4726 /* end confdefs.h.  */
4727 #include <sys/types.h>
4728  /* Check that off_t can represent 2**63 - 1 correctly.
4729     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4730     since some C++ compilers masquerading as C compilers
4731     incorrectly reject 9223372036854775807.  */
4732 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4733   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4734                        && LARGE_OFF_T % 2147483647 == 1)
4735                       ? 1 : -1];
4736 int
4737 main ()
4738 {
4739
4740   ;
4741   return 0;
4742 }
4743 _ACEOF
4744 if ac_fn_c_try_compile "$LINENO"; then :
4745   ac_cv_sys_file_offset_bits=no; break
4746 fi
4747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4749 /* end confdefs.h.  */
4750 #define _FILE_OFFSET_BITS 64
4751 #include <sys/types.h>
4752  /* Check that off_t can represent 2**63 - 1 correctly.
4753     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4754     since some C++ compilers masquerading as C compilers
4755     incorrectly reject 9223372036854775807.  */
4756 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4757   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4758                        && LARGE_OFF_T % 2147483647 == 1)
4759                       ? 1 : -1];
4760 int
4761 main ()
4762 {
4763
4764   ;
4765   return 0;
4766 }
4767 _ACEOF
4768 if ac_fn_c_try_compile "$LINENO"; then :
4769   ac_cv_sys_file_offset_bits=64; break
4770 fi
4771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4772   ac_cv_sys_file_offset_bits=unknown
4773   break
4774 done
4775 fi
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4777 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4778 case $ac_cv_sys_file_offset_bits in #(
4779   no | unknown) ;;
4780   *)
4781 cat >>confdefs.h <<_ACEOF
4782 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4783 _ACEOF
4784 ;;
4785 esac
4786 rm -rf conftest*
4787   if test $ac_cv_sys_file_offset_bits = unknown; then
4788     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4789 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4790 if ${ac_cv_sys_large_files+:} false; then :
4791   $as_echo_n "(cached) " >&6
4792 else
4793   while :; do
4794   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4795 /* end confdefs.h.  */
4796 #include <sys/types.h>
4797  /* Check that off_t can represent 2**63 - 1 correctly.
4798     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4799     since some C++ compilers masquerading as C compilers
4800     incorrectly reject 9223372036854775807.  */
4801 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4802   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4803                        && LARGE_OFF_T % 2147483647 == 1)
4804                       ? 1 : -1];
4805 int
4806 main ()
4807 {
4808
4809   ;
4810   return 0;
4811 }
4812 _ACEOF
4813 if ac_fn_c_try_compile "$LINENO"; then :
4814   ac_cv_sys_large_files=no; break
4815 fi
4816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4818 /* end confdefs.h.  */
4819 #define _LARGE_FILES 1
4820 #include <sys/types.h>
4821  /* Check that off_t can represent 2**63 - 1 correctly.
4822     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4823     since some C++ compilers masquerading as C compilers
4824     incorrectly reject 9223372036854775807.  */
4825 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4826   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4827                        && LARGE_OFF_T % 2147483647 == 1)
4828                       ? 1 : -1];
4829 int
4830 main ()
4831 {
4832
4833   ;
4834   return 0;
4835 }
4836 _ACEOF
4837 if ac_fn_c_try_compile "$LINENO"; then :
4838   ac_cv_sys_large_files=1; break
4839 fi
4840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4841   ac_cv_sys_large_files=unknown
4842   break
4843 done
4844 fi
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4846 $as_echo "$ac_cv_sys_large_files" >&6; }
4847 case $ac_cv_sys_large_files in #(
4848   no | unknown) ;;
4849   *)
4850 cat >>confdefs.h <<_ACEOF
4851 #define _LARGE_FILES $ac_cv_sys_large_files
4852 _ACEOF
4853 ;;
4854 esac
4855 rm -rf conftest*
4856   fi
4857
4858
4859 fi
4860
4861
4862
4863
4864
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4866 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4867 if ${am_cv_prog_cc_stdc+:} false; then :
4868   $as_echo_n "(cached) " >&6
4869 else
4870   am_cv_prog_cc_stdc=no
4871 ac_save_CC="$CC"
4872 # Don't try gcc -ansi; that turns off useful extensions and
4873 # breaks some systems' header files.
4874 # AIX                   -qlanglvl=ansi
4875 # Ultrix and OSF/1      -std1
4876 # HP-UX 10.20 and later -Ae
4877 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4878 # SVR4                  -Xc -D__EXTENSIONS__
4879 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4880 do
4881   CC="$ac_save_CC $ac_arg"
4882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4883 /* end confdefs.h.  */
4884 #include <stdarg.h>
4885 #include <stdio.h>
4886 #include <sys/types.h>
4887 #include <sys/stat.h>
4888 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4889 struct buf { int x; };
4890 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4891 static char *e (p, i)
4892      char **p;
4893      int i;
4894 {
4895   return p[i];
4896 }
4897 static char *f (char * (*g) (char **, int), char **p, ...)
4898 {
4899   char *s;
4900   va_list v;
4901   va_start (v,p);
4902   s = g (p, va_arg (v,int));
4903   va_end (v);
4904   return s;
4905 }
4906 int test (int i, double x);
4907 struct s1 {int (*f) (int a);};
4908 struct s2 {int (*f) (double a);};
4909 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4910 int argc;
4911 char **argv;
4912
4913 int
4914 main ()
4915 {
4916
4917 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4918
4919   ;
4920   return 0;
4921 }
4922 _ACEOF
4923 if ac_fn_c_try_compile "$LINENO"; then :
4924   am_cv_prog_cc_stdc="$ac_arg"; break
4925 fi
4926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4927 done
4928 CC="$ac_save_CC"
4929
4930 fi
4931
4932 if test -z "$am_cv_prog_cc_stdc"; then
4933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4934 $as_echo "none needed" >&6; }
4935 else
4936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4937 $as_echo "$am_cv_prog_cc_stdc" >&6; }
4938 fi
4939 case "x$am_cv_prog_cc_stdc" in
4940   x|xno) ;;
4941   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4942 esac
4943
4944 # Expand $ac_aux_dir to an absolute path.
4945 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4946
4947 if test x"${install_sh+set}" != xset; then
4948   case $am_aux_dir in
4949   *\ * | *\     *)
4950     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4951   *)
4952     install_sh="\${SHELL} $am_aux_dir/install-sh"
4953   esac
4954 fi
4955
4956 # Installed binaries are usually stripped using 'strip' when the user
4957 # run "make install-strip".  However 'strip' might not be the right
4958 # tool to use in cross-compilation environments, therefore Automake
4959 # will honor the 'STRIP' environment variable to overrule this program.
4960 if test "$cross_compiling" != no; then
4961   if test -n "$ac_tool_prefix"; then
4962   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4963 set dummy ${ac_tool_prefix}strip; ac_word=$2
4964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965 $as_echo_n "checking for $ac_word... " >&6; }
4966 if ${ac_cv_prog_STRIP+:} false; then :
4967   $as_echo_n "(cached) " >&6
4968 else
4969   if test -n "$STRIP"; then
4970   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4971 else
4972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973 for as_dir in $PATH
4974 do
4975   IFS=$as_save_IFS
4976   test -z "$as_dir" && as_dir=.
4977     for ac_exec_ext in '' $ac_executable_extensions; do
4978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4979     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4981     break 2
4982   fi
4983 done
4984   done
4985 IFS=$as_save_IFS
4986
4987 fi
4988 fi
4989 STRIP=$ac_cv_prog_STRIP
4990 if test -n "$STRIP"; then
4991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4992 $as_echo "$STRIP" >&6; }
4993 else
4994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995 $as_echo "no" >&6; }
4996 fi
4997
4998
4999 fi
5000 if test -z "$ac_cv_prog_STRIP"; then
5001   ac_ct_STRIP=$STRIP
5002   # Extract the first word of "strip", so it can be a program name with args.
5003 set dummy strip; ac_word=$2
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005 $as_echo_n "checking for $ac_word... " >&6; }
5006 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5007   $as_echo_n "(cached) " >&6
5008 else
5009   if test -n "$ac_ct_STRIP"; then
5010   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5011 else
5012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013 for as_dir in $PATH
5014 do
5015   IFS=$as_save_IFS
5016   test -z "$as_dir" && as_dir=.
5017     for ac_exec_ext in '' $ac_executable_extensions; do
5018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5019     ac_cv_prog_ac_ct_STRIP="strip"
5020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021     break 2
5022   fi
5023 done
5024   done
5025 IFS=$as_save_IFS
5026
5027 fi
5028 fi
5029 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5030 if test -n "$ac_ct_STRIP"; then
5031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5032 $as_echo "$ac_ct_STRIP" >&6; }
5033 else
5034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035 $as_echo "no" >&6; }
5036 fi
5037
5038   if test "x$ac_ct_STRIP" = x; then
5039     STRIP=":"
5040   else
5041     case $cross_compiling:$ac_tool_warned in
5042 yes:)
5043 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5044 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5045 ac_tool_warned=yes ;;
5046 esac
5047     STRIP=$ac_ct_STRIP
5048   fi
5049 else
5050   STRIP="$ac_cv_prog_STRIP"
5051 fi
5052
5053 fi
5054 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5055
5056
5057 ac_aux_dir=
5058 for ac_dir in .. "$srcdir"/..; do
5059   if test -f "$ac_dir/install-sh"; then
5060     ac_aux_dir=$ac_dir
5061     ac_install_sh="$ac_aux_dir/install-sh -c"
5062     break
5063   elif test -f "$ac_dir/install.sh"; then
5064     ac_aux_dir=$ac_dir
5065     ac_install_sh="$ac_aux_dir/install.sh -c"
5066     break
5067   elif test -f "$ac_dir/shtool"; then
5068     ac_aux_dir=$ac_dir
5069     ac_install_sh="$ac_aux_dir/shtool install -c"
5070     break
5071   fi
5072 done
5073 if test -z "$ac_aux_dir"; then
5074   as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5075 fi
5076
5077 # These three variables are undocumented and unsupported,
5078 # and are intended to be withdrawn in a future Autoconf release.
5079 # They can cause serious problems if a builder's source tree is in a directory
5080 # whose full name contains unusual characters.
5081 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
5082 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
5083 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
5084
5085
5086
5087 test "$program_prefix" != NONE &&
5088   program_transform_name="s&^&$program_prefix&;$program_transform_name"
5089 # Use a double $ so make ignores it.
5090 test "$program_suffix" != NONE &&
5091   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5092 # Double any \ or $.
5093 # By default was `s,x,x', remove it if useless.
5094 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5095 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5096
5097
5098 # We require a C++11 compiler.  Check if one is available, and if
5099 # necessary, set CXX_DIALECT to some -std=xxx switch.
5100
5101   ax_cxx_compile_alternatives="11 0x"    ax_cxx_compile_cxx11_required=true
5102   ac_ext=cpp
5103 ac_cpp='$CXXCPP $CPPFLAGS'
5104 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5105 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5106 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5107   CXX_DIALECT=""
5108   ac_success=no
5109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5110 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5111 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5112   $as_echo_n "(cached) " >&6
5113 else
5114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5115 /* end confdefs.h.  */
5116
5117
5118 // If the compiler admits that it is not ready for C++11, why torture it?
5119 // Hopefully, this will speed up the test.
5120
5121 #ifndef __cplusplus
5122
5123 #error "This is not a C++ compiler"
5124
5125 #elif __cplusplus < 201103L
5126
5127 #error "This is not a C++11 compiler"
5128
5129 #else
5130
5131 namespace cxx11
5132 {
5133
5134   namespace test_static_assert
5135   {
5136
5137     template <typename T>
5138     struct check
5139     {
5140       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5141     };
5142
5143   }
5144
5145   namespace test_final_override
5146   {
5147
5148     struct Base
5149     {
5150       virtual void f() {}
5151     };
5152
5153     struct Derived : public Base
5154     {
5155       virtual void f() override {}
5156     };
5157
5158   }
5159
5160   namespace test_double_right_angle_brackets
5161   {
5162
5163     template < typename T >
5164     struct check {};
5165
5166     typedef check<void> single_type;
5167     typedef check<check<void>> double_type;
5168     typedef check<check<check<void>>> triple_type;
5169     typedef check<check<check<check<void>>>> quadruple_type;
5170
5171   }
5172
5173   namespace test_decltype
5174   {
5175
5176     int
5177     f()
5178     {
5179       int a = 1;
5180       decltype(a) b = 2;
5181       return a + b;
5182     }
5183
5184   }
5185
5186   namespace test_type_deduction
5187   {
5188
5189     template < typename T1, typename T2 >
5190     struct is_same
5191     {
5192       static const bool value = false;
5193     };
5194
5195     template < typename T >
5196     struct is_same<T, T>
5197     {
5198       static const bool value = true;
5199     };
5200
5201     template < typename T1, typename T2 >
5202     auto
5203     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5204     {
5205       return a1 + a2;
5206     }
5207
5208     int
5209     test(const int c, volatile int v)
5210     {
5211       static_assert(is_same<int, decltype(0)>::value == true, "");
5212       static_assert(is_same<int, decltype(c)>::value == false, "");
5213       static_assert(is_same<int, decltype(v)>::value == false, "");
5214       auto ac = c;
5215       auto av = v;
5216       auto sumi = ac + av + 'x';
5217       auto sumf = ac + av + 1.0;
5218       static_assert(is_same<int, decltype(ac)>::value == true, "");
5219       static_assert(is_same<int, decltype(av)>::value == true, "");
5220       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5221       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5222       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5223       return (sumf > 0.0) ? sumi : add(c, v);
5224     }
5225
5226   }
5227
5228   namespace test_noexcept
5229   {
5230
5231     int f() { return 0; }
5232     int g() noexcept { return 0; }
5233
5234     static_assert(noexcept(f()) == false, "");
5235     static_assert(noexcept(g()) == true, "");
5236
5237   }
5238
5239   namespace test_constexpr
5240   {
5241
5242     template < typename CharT >
5243     unsigned long constexpr
5244     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5245     {
5246       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5247     }
5248
5249     template < typename CharT >
5250     unsigned long constexpr
5251     strlen_c(const CharT *const s) noexcept
5252     {
5253       return strlen_c_r(s, 0UL);
5254     }
5255
5256     static_assert(strlen_c("") == 0UL, "");
5257     static_assert(strlen_c("1") == 1UL, "");
5258     static_assert(strlen_c("example") == 7UL, "");
5259     static_assert(strlen_c("another\0example") == 7UL, "");
5260
5261   }
5262
5263   namespace test_rvalue_references
5264   {
5265
5266     template < int N >
5267     struct answer
5268     {
5269       static constexpr int value = N;
5270     };
5271
5272     answer<1> f(int&)       { return answer<1>(); }
5273     answer<2> f(const int&) { return answer<2>(); }
5274     answer<3> f(int&&)      { return answer<3>(); }
5275
5276     void
5277     test()
5278     {
5279       int i = 0;
5280       const int c = 0;
5281       static_assert(decltype(f(i))::value == 1, "");
5282       static_assert(decltype(f(c))::value == 2, "");
5283       static_assert(decltype(f(0))::value == 3, "");
5284     }
5285
5286   }
5287
5288   namespace test_uniform_initialization
5289   {
5290
5291     struct test
5292     {
5293       static const int zero {};
5294       static const int one {1};
5295     };
5296
5297     static_assert(test::zero == 0, "");
5298     static_assert(test::one == 1, "");
5299
5300   }
5301
5302   namespace test_lambdas
5303   {
5304
5305     void
5306     test1()
5307     {
5308       auto lambda1 = [](){};
5309       auto lambda2 = lambda1;
5310       lambda1();
5311       lambda2();
5312     }
5313
5314     int
5315     test2()
5316     {
5317       auto a = [](int i, int j){ return i + j; }(1, 2);
5318       auto b = []() -> int { return '0'; }();
5319       auto c = [=](){ return a + b; }();
5320       auto d = [&](){ return c; }();
5321       auto e = [a, &b](int x) mutable {
5322         const auto identity = [](int y){ return y; };
5323         for (auto i = 0; i < a; ++i)
5324           a += b--;
5325         return x + identity(a + b);
5326       }(0);
5327       return a + b + c + d + e;
5328     }
5329
5330     int
5331     test3()
5332     {
5333       const auto nullary = [](){ return 0; };
5334       const auto unary = [](int x){ return x; };
5335       using nullary_t = decltype(nullary);
5336       using unary_t = decltype(unary);
5337       const auto higher1st = [](nullary_t f){ return f(); };
5338       const auto higher2nd = [unary](nullary_t f1){
5339         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5340       };
5341       return higher1st(nullary) + higher2nd(nullary)(unary);
5342     }
5343
5344   }
5345
5346   namespace test_variadic_templates
5347   {
5348
5349     template <int...>
5350     struct sum;
5351
5352     template <int N0, int... N1toN>
5353     struct sum<N0, N1toN...>
5354     {
5355       static constexpr auto value = N0 + sum<N1toN...>::value;
5356     };
5357
5358     template <>
5359     struct sum<>
5360     {
5361       static constexpr auto value = 0;
5362     };
5363
5364     static_assert(sum<>::value == 0, "");
5365     static_assert(sum<1>::value == 1, "");
5366     static_assert(sum<23>::value == 23, "");
5367     static_assert(sum<1, 2>::value == 3, "");
5368     static_assert(sum<5, 5, 11>::value == 21, "");
5369     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5370
5371   }
5372
5373   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5374   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5375   // because of this.
5376   namespace test_template_alias_sfinae
5377   {
5378
5379     struct foo {};
5380
5381     template<typename T>
5382     using member = typename T::member_type;
5383
5384     template<typename T>
5385     void func(...) {}
5386
5387     template<typename T>
5388     void func(member<T>*) {}
5389
5390     void test();
5391
5392     void test() { func<foo>(0); }
5393
5394   }
5395
5396 }  // namespace cxx11
5397
5398 #endif  // __cplusplus >= 201103L
5399
5400
5401
5402 _ACEOF
5403 if ac_fn_cxx_try_compile "$LINENO"; then :
5404   ax_cv_cxx_compile_cxx11=yes
5405 else
5406   ax_cv_cxx_compile_cxx11=no
5407 fi
5408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5409 fi
5410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5411 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5412   if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5413     ac_success=yes
5414   fi
5415
5416     if test x$ac_success = xno; then
5417     for alternative in ${ax_cxx_compile_alternatives}; do
5418       switch="-std=gnu++${alternative}"
5419       cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5420       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5421 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5422 if eval \${$cachevar+:} false; then :
5423   $as_echo_n "(cached) " >&6
5424 else
5425   ac_save_CXX="$CXX"
5426          CXX="$CXX $switch"
5427          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5428 /* end confdefs.h.  */
5429
5430
5431 // If the compiler admits that it is not ready for C++11, why torture it?
5432 // Hopefully, this will speed up the test.
5433
5434 #ifndef __cplusplus
5435
5436 #error "This is not a C++ compiler"
5437
5438 #elif __cplusplus < 201103L
5439
5440 #error "This is not a C++11 compiler"
5441
5442 #else
5443
5444 namespace cxx11
5445 {
5446
5447   namespace test_static_assert
5448   {
5449
5450     template <typename T>
5451     struct check
5452     {
5453       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5454     };
5455
5456   }
5457
5458   namespace test_final_override
5459   {
5460
5461     struct Base
5462     {
5463       virtual void f() {}
5464     };
5465
5466     struct Derived : public Base
5467     {
5468       virtual void f() override {}
5469     };
5470
5471   }
5472
5473   namespace test_double_right_angle_brackets
5474   {
5475
5476     template < typename T >
5477     struct check {};
5478
5479     typedef check<void> single_type;
5480     typedef check<check<void>> double_type;
5481     typedef check<check<check<void>>> triple_type;
5482     typedef check<check<check<check<void>>>> quadruple_type;
5483
5484   }
5485
5486   namespace test_decltype
5487   {
5488
5489     int
5490     f()
5491     {
5492       int a = 1;
5493       decltype(a) b = 2;
5494       return a + b;
5495     }
5496
5497   }
5498
5499   namespace test_type_deduction
5500   {
5501
5502     template < typename T1, typename T2 >
5503     struct is_same
5504     {
5505       static const bool value = false;
5506     };
5507
5508     template < typename T >
5509     struct is_same<T, T>
5510     {
5511       static const bool value = true;
5512     };
5513
5514     template < typename T1, typename T2 >
5515     auto
5516     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5517     {
5518       return a1 + a2;
5519     }
5520
5521     int
5522     test(const int c, volatile int v)
5523     {
5524       static_assert(is_same<int, decltype(0)>::value == true, "");
5525       static_assert(is_same<int, decltype(c)>::value == false, "");
5526       static_assert(is_same<int, decltype(v)>::value == false, "");
5527       auto ac = c;
5528       auto av = v;
5529       auto sumi = ac + av + 'x';
5530       auto sumf = ac + av + 1.0;
5531       static_assert(is_same<int, decltype(ac)>::value == true, "");
5532       static_assert(is_same<int, decltype(av)>::value == true, "");
5533       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5534       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5535       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5536       return (sumf > 0.0) ? sumi : add(c, v);
5537     }
5538
5539   }
5540
5541   namespace test_noexcept
5542   {
5543
5544     int f() { return 0; }
5545     int g() noexcept { return 0; }
5546
5547     static_assert(noexcept(f()) == false, "");
5548     static_assert(noexcept(g()) == true, "");
5549
5550   }
5551
5552   namespace test_constexpr
5553   {
5554
5555     template < typename CharT >
5556     unsigned long constexpr
5557     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5558     {
5559       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5560     }
5561
5562     template < typename CharT >
5563     unsigned long constexpr
5564     strlen_c(const CharT *const s) noexcept
5565     {
5566       return strlen_c_r(s, 0UL);
5567     }
5568
5569     static_assert(strlen_c("") == 0UL, "");
5570     static_assert(strlen_c("1") == 1UL, "");
5571     static_assert(strlen_c("example") == 7UL, "");
5572     static_assert(strlen_c("another\0example") == 7UL, "");
5573
5574   }
5575
5576   namespace test_rvalue_references
5577   {
5578
5579     template < int N >
5580     struct answer
5581     {
5582       static constexpr int value = N;
5583     };
5584
5585     answer<1> f(int&)       { return answer<1>(); }
5586     answer<2> f(const int&) { return answer<2>(); }
5587     answer<3> f(int&&)      { return answer<3>(); }
5588
5589     void
5590     test()
5591     {
5592       int i = 0;
5593       const int c = 0;
5594       static_assert(decltype(f(i))::value == 1, "");
5595       static_assert(decltype(f(c))::value == 2, "");
5596       static_assert(decltype(f(0))::value == 3, "");
5597     }
5598
5599   }
5600
5601   namespace test_uniform_initialization
5602   {
5603
5604     struct test
5605     {
5606       static const int zero {};
5607       static const int one {1};
5608     };
5609
5610     static_assert(test::zero == 0, "");
5611     static_assert(test::one == 1, "");
5612
5613   }
5614
5615   namespace test_lambdas
5616   {
5617
5618     void
5619     test1()
5620     {
5621       auto lambda1 = [](){};
5622       auto lambda2 = lambda1;
5623       lambda1();
5624       lambda2();
5625     }
5626
5627     int
5628     test2()
5629     {
5630       auto a = [](int i, int j){ return i + j; }(1, 2);
5631       auto b = []() -> int { return '0'; }();
5632       auto c = [=](){ return a + b; }();
5633       auto d = [&](){ return c; }();
5634       auto e = [a, &b](int x) mutable {
5635         const auto identity = [](int y){ return y; };
5636         for (auto i = 0; i < a; ++i)
5637           a += b--;
5638         return x + identity(a + b);
5639       }(0);
5640       return a + b + c + d + e;
5641     }
5642
5643     int
5644     test3()
5645     {
5646       const auto nullary = [](){ return 0; };
5647       const auto unary = [](int x){ return x; };
5648       using nullary_t = decltype(nullary);
5649       using unary_t = decltype(unary);
5650       const auto higher1st = [](nullary_t f){ return f(); };
5651       const auto higher2nd = [unary](nullary_t f1){
5652         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5653       };
5654       return higher1st(nullary) + higher2nd(nullary)(unary);
5655     }
5656
5657   }
5658
5659   namespace test_variadic_templates
5660   {
5661
5662     template <int...>
5663     struct sum;
5664
5665     template <int N0, int... N1toN>
5666     struct sum<N0, N1toN...>
5667     {
5668       static constexpr auto value = N0 + sum<N1toN...>::value;
5669     };
5670
5671     template <>
5672     struct sum<>
5673     {
5674       static constexpr auto value = 0;
5675     };
5676
5677     static_assert(sum<>::value == 0, "");
5678     static_assert(sum<1>::value == 1, "");
5679     static_assert(sum<23>::value == 23, "");
5680     static_assert(sum<1, 2>::value == 3, "");
5681     static_assert(sum<5, 5, 11>::value == 21, "");
5682     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5683
5684   }
5685
5686   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5687   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5688   // because of this.
5689   namespace test_template_alias_sfinae
5690   {
5691
5692     struct foo {};
5693
5694     template<typename T>
5695     using member = typename T::member_type;
5696
5697     template<typename T>
5698     void func(...) {}
5699
5700     template<typename T>
5701     void func(member<T>*) {}
5702
5703     void test();
5704
5705     void test() { func<foo>(0); }
5706
5707   }
5708
5709 }  // namespace cxx11
5710
5711 #endif  // __cplusplus >= 201103L
5712
5713
5714
5715 _ACEOF
5716 if ac_fn_cxx_try_compile "$LINENO"; then :
5717   eval $cachevar=yes
5718 else
5719   eval $cachevar=no
5720 fi
5721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5722          CXX="$ac_save_CXX"
5723 fi
5724 eval ac_res=\$$cachevar
5725                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5726 $as_echo "$ac_res" >&6; }
5727       if eval test x\$$cachevar = xyes; then
5728         CXX_DIALECT="$switch"
5729         ac_success=yes
5730         break
5731       fi
5732     done
5733   fi
5734
5735     if test x$ac_success = xno; then
5736                 for alternative in ${ax_cxx_compile_alternatives}; do
5737       for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5738         cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5739         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5740 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5741 if eval \${$cachevar+:} false; then :
5742   $as_echo_n "(cached) " >&6
5743 else
5744   ac_save_CXX="$CXX"
5745            CXX="$CXX $switch"
5746            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5747 /* end confdefs.h.  */
5748
5749
5750 // If the compiler admits that it is not ready for C++11, why torture it?
5751 // Hopefully, this will speed up the test.
5752
5753 #ifndef __cplusplus
5754
5755 #error "This is not a C++ compiler"
5756
5757 #elif __cplusplus < 201103L
5758
5759 #error "This is not a C++11 compiler"
5760
5761 #else
5762
5763 namespace cxx11
5764 {
5765
5766   namespace test_static_assert
5767   {
5768
5769     template <typename T>
5770     struct check
5771     {
5772       static_assert(sizeof(int) <= sizeof(T), "not big enough");
5773     };
5774
5775   }
5776
5777   namespace test_final_override
5778   {
5779
5780     struct Base
5781     {
5782       virtual void f() {}
5783     };
5784
5785     struct Derived : public Base
5786     {
5787       virtual void f() override {}
5788     };
5789
5790   }
5791
5792   namespace test_double_right_angle_brackets
5793   {
5794
5795     template < typename T >
5796     struct check {};
5797
5798     typedef check<void> single_type;
5799     typedef check<check<void>> double_type;
5800     typedef check<check<check<void>>> triple_type;
5801     typedef check<check<check<check<void>>>> quadruple_type;
5802
5803   }
5804
5805   namespace test_decltype
5806   {
5807
5808     int
5809     f()
5810     {
5811       int a = 1;
5812       decltype(a) b = 2;
5813       return a + b;
5814     }
5815
5816   }
5817
5818   namespace test_type_deduction
5819   {
5820
5821     template < typename T1, typename T2 >
5822     struct is_same
5823     {
5824       static const bool value = false;
5825     };
5826
5827     template < typename T >
5828     struct is_same<T, T>
5829     {
5830       static const bool value = true;
5831     };
5832
5833     template < typename T1, typename T2 >
5834     auto
5835     add(T1 a1, T2 a2) -> decltype(a1 + a2)
5836     {
5837       return a1 + a2;
5838     }
5839
5840     int
5841     test(const int c, volatile int v)
5842     {
5843       static_assert(is_same<int, decltype(0)>::value == true, "");
5844       static_assert(is_same<int, decltype(c)>::value == false, "");
5845       static_assert(is_same<int, decltype(v)>::value == false, "");
5846       auto ac = c;
5847       auto av = v;
5848       auto sumi = ac + av + 'x';
5849       auto sumf = ac + av + 1.0;
5850       static_assert(is_same<int, decltype(ac)>::value == true, "");
5851       static_assert(is_same<int, decltype(av)>::value == true, "");
5852       static_assert(is_same<int, decltype(sumi)>::value == true, "");
5853       static_assert(is_same<int, decltype(sumf)>::value == false, "");
5854       static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5855       return (sumf > 0.0) ? sumi : add(c, v);
5856     }
5857
5858   }
5859
5860   namespace test_noexcept
5861   {
5862
5863     int f() { return 0; }
5864     int g() noexcept { return 0; }
5865
5866     static_assert(noexcept(f()) == false, "");
5867     static_assert(noexcept(g()) == true, "");
5868
5869   }
5870
5871   namespace test_constexpr
5872   {
5873
5874     template < typename CharT >
5875     unsigned long constexpr
5876     strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5877     {
5878       return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5879     }
5880
5881     template < typename CharT >
5882     unsigned long constexpr
5883     strlen_c(const CharT *const s) noexcept
5884     {
5885       return strlen_c_r(s, 0UL);
5886     }
5887
5888     static_assert(strlen_c("") == 0UL, "");
5889     static_assert(strlen_c("1") == 1UL, "");
5890     static_assert(strlen_c("example") == 7UL, "");
5891     static_assert(strlen_c("another\0example") == 7UL, "");
5892
5893   }
5894
5895   namespace test_rvalue_references
5896   {
5897
5898     template < int N >
5899     struct answer
5900     {
5901       static constexpr int value = N;
5902     };
5903
5904     answer<1> f(int&)       { return answer<1>(); }
5905     answer<2> f(const int&) { return answer<2>(); }
5906     answer<3> f(int&&)      { return answer<3>(); }
5907
5908     void
5909     test()
5910     {
5911       int i = 0;
5912       const int c = 0;
5913       static_assert(decltype(f(i))::value == 1, "");
5914       static_assert(decltype(f(c))::value == 2, "");
5915       static_assert(decltype(f(0))::value == 3, "");
5916     }
5917
5918   }
5919
5920   namespace test_uniform_initialization
5921   {
5922
5923     struct test
5924     {
5925       static const int zero {};
5926       static const int one {1};
5927     };
5928
5929     static_assert(test::zero == 0, "");
5930     static_assert(test::one == 1, "");
5931
5932   }
5933
5934   namespace test_lambdas
5935   {
5936
5937     void
5938     test1()
5939     {
5940       auto lambda1 = [](){};
5941       auto lambda2 = lambda1;
5942       lambda1();
5943       lambda2();
5944     }
5945
5946     int
5947     test2()
5948     {
5949       auto a = [](int i, int j){ return i + j; }(1, 2);
5950       auto b = []() -> int { return '0'; }();
5951       auto c = [=](){ return a + b; }();
5952       auto d = [&](){ return c; }();
5953       auto e = [a, &b](int x) mutable {
5954         const auto identity = [](int y){ return y; };
5955         for (auto i = 0; i < a; ++i)
5956           a += b--;
5957         return x + identity(a + b);
5958       }(0);
5959       return a + b + c + d + e;
5960     }
5961
5962     int
5963     test3()
5964     {
5965       const auto nullary = [](){ return 0; };
5966       const auto unary = [](int x){ return x; };
5967       using nullary_t = decltype(nullary);
5968       using unary_t = decltype(unary);
5969       const auto higher1st = [](nullary_t f){ return f(); };
5970       const auto higher2nd = [unary](nullary_t f1){
5971         return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5972       };
5973       return higher1st(nullary) + higher2nd(nullary)(unary);
5974     }
5975
5976   }
5977
5978   namespace test_variadic_templates
5979   {
5980
5981     template <int...>
5982     struct sum;
5983
5984     template <int N0, int... N1toN>
5985     struct sum<N0, N1toN...>
5986     {
5987       static constexpr auto value = N0 + sum<N1toN...>::value;
5988     };
5989
5990     template <>
5991     struct sum<>
5992     {
5993       static constexpr auto value = 0;
5994     };
5995
5996     static_assert(sum<>::value == 0, "");
5997     static_assert(sum<1>::value == 1, "");
5998     static_assert(sum<23>::value == 23, "");
5999     static_assert(sum<1, 2>::value == 3, "");
6000     static_assert(sum<5, 5, 11>::value == 21, "");
6001     static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6002
6003   }
6004
6005   // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6006   // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6007   // because of this.
6008   namespace test_template_alias_sfinae
6009   {
6010
6011     struct foo {};
6012
6013     template<typename T>
6014     using member = typename T::member_type;
6015
6016     template<typename T>
6017     void func(...) {}
6018
6019     template<typename T>
6020     void func(member<T>*) {}
6021
6022     void test();
6023
6024     void test() { func<foo>(0); }
6025
6026   }
6027
6028 }  // namespace cxx11
6029
6030 #endif  // __cplusplus >= 201103L
6031
6032
6033
6034 _ACEOF
6035 if ac_fn_cxx_try_compile "$LINENO"; then :
6036   eval $cachevar=yes
6037 else
6038   eval $cachevar=no
6039 fi
6040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6041            CXX="$ac_save_CXX"
6042 fi
6043 eval ac_res=\$$cachevar
6044                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6045 $as_echo "$ac_res" >&6; }
6046         if eval test x\$$cachevar = xyes; then
6047           CXX_DIALECT="$switch"
6048           ac_success=yes
6049           break
6050         fi
6051       done
6052       if test x$ac_success = xyes; then
6053         break
6054       fi
6055     done
6056   fi
6057   ac_ext=c
6058 ac_cpp='$CPP $CPPFLAGS'
6059 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6060 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6061 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6062
6063   if test x$ax_cxx_compile_cxx11_required = xtrue; then
6064     if test x$ac_success = xno; then
6065       as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6066     fi
6067   fi
6068   if test x$ac_success = xno; then
6069     HAVE_CXX11=0
6070     { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6071 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6072   else
6073     HAVE_CXX11=1
6074
6075 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6076
6077   fi
6078
6079
6080
6081
6082 # Dependency checking.
6083 rm -rf .tst 2>/dev/null
6084 mkdir .tst 2>/dev/null
6085 if test -d .tst; then
6086   am__leading_dot=.
6087 else
6088   am__leading_dot=_
6089 fi
6090 rmdir .tst 2>/dev/null
6091
6092 DEPDIR="${am__leading_dot}deps"
6093
6094 ac_config_commands="$ac_config_commands depdir"
6095
6096
6097 depcc="$CC"   am_compiler_list=
6098
6099 am_depcomp=$ac_aux_dir/depcomp
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6101 $as_echo_n "checking dependency style of $depcc... " >&6; }
6102 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6103   $as_echo_n "(cached) " >&6
6104 else
6105   if test -f "$am_depcomp"; then
6106   # We make a subdir and do the tests there.  Otherwise we can end up
6107   # making bogus files that we don't know about and never remove.  For
6108   # instance it was reported that on HP-UX the gcc test will end up
6109   # making a dummy file named `D' -- because `-MD' means `put the output
6110   # in D'.
6111   mkdir conftest.dir
6112   # Copy depcomp to subdir because otherwise we won't find it if we're
6113   # using a relative directory.
6114   cp "$am_depcomp" conftest.dir
6115   cd conftest.dir
6116   # We will build objects and dependencies in a subdirectory because
6117   # it helps to detect inapplicable dependency modes.  For instance
6118   # both Tru64's cc and ICC support -MD to output dependencies as a
6119   # side effect of compilation, but ICC will put the dependencies in
6120   # the current directory while Tru64 will put them in the object
6121   # directory.
6122   mkdir sub
6123
6124   am_cv_CC_dependencies_compiler_type=none
6125   if test "$am_compiler_list" = ""; then
6126      am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6127   fi
6128   for depmode in $am_compiler_list; do
6129     if test $depmode = none; then break; fi
6130
6131     $as_echo "$as_me:$LINENO: trying $depmode" >&5
6132     # Setup a source with many dependencies, because some compilers
6133     # like to wrap large dependency lists on column 80 (with \), and
6134     # we should not choose a depcomp mode which is confused by this.
6135     #
6136     # We need to recreate these files for each test, as the compiler may
6137     # overwrite some of them when testing with obscure command lines.
6138     # This happens at least with the AIX C compiler.
6139     : > sub/conftest.c
6140     for i in 1 2 3 4 5 6; do
6141       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6142       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6143       # Solaris 8's {/usr,}/bin/sh.
6144       touch sub/conftst$i.h
6145     done
6146     echo "include sub/conftest.Po" > confmf
6147
6148     # We check with `-c' and `-o' for the sake of the "dashmstdout"
6149     # mode.  It turns out that the SunPro C++ compiler does not properly
6150     # handle `-M -o', and we need to detect this.
6151     depcmd="depmode=$depmode \
6152        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6153        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6154        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6155     echo "| $depcmd" | sed -e 's/  */ /g' >&5
6156     if env $depcmd > conftest.err 2>&1 &&
6157        grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6158        grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6159        ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6160       # icc doesn't choke on unknown options, it will just issue warnings
6161       # or remarks (even with -Werror).  So we grep stderr for any message
6162       # that says an option was ignored or not supported.
6163       # When given -MP, icc 7.0 and 7.1 complain thusly:
6164       #   icc: Command line warning: ignoring option '-M'; no argument required
6165       # The diagnosis changed in icc 8.0:
6166       #   icc: Command line remark: option '-MP' not supported
6167       if (grep 'ignoring option' conftest.err ||
6168           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6169         am_cv_CC_dependencies_compiler_type=$depmode
6170         $as_echo "$as_me:$LINENO: success" >&5
6171         break
6172       fi
6173     fi
6174     $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6175     sed -e 's/^/| /' < conftest.err >&5
6176   done
6177
6178   cd ..
6179   rm -rf conftest.dir
6180 else
6181   am_cv_CC_dependencies_compiler_type=none
6182 fi
6183
6184 fi
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6186 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6187 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6188 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6189 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6190
6191 fi
6192
6193
6194 gnulib_extra_configure_args=
6195 # If large-file support is disabled, make sure gnulib does the same.
6196 if test "$enable_largefile" = no; then
6197 gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6198 fi
6199
6200 # Configure gnulib.  We need to build gnulib under some other
6201 # directory not "gnulib", to avoid the problem of both GDB and
6202 # GDBserver wanting to build it in the same directory, when building
6203 # in the source dir.
6204
6205   in_src="gnulib"
6206   in_build="build-gnulib"
6207   in_extra_args="$gnulib_extra_configure_args"
6208
6209   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6210   # so they do not pile up.
6211   ac_sub_configure_args=
6212   ac_prev=
6213   eval "set x $ac_configure_args"
6214   shift
6215   for ac_arg
6216   do
6217     if test -n "$ac_prev"; then
6218       ac_prev=
6219       continue
6220     fi
6221     case $ac_arg in
6222     -cache-file | --cache-file | --cache-fil | --cache-fi \
6223     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6224       ac_prev=cache_file ;;
6225     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6226     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6227     | --c=*)
6228       ;;
6229     --config-cache | -C)
6230       ;;
6231     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6232       ac_prev=srcdir ;;
6233     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6234       ;;
6235     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6236       ac_prev=prefix ;;
6237     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6238       ;;
6239     --disable-option-checking)
6240       ;;
6241     *)
6242       case $ac_arg in
6243       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6244       esac
6245       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6246     esac
6247   done
6248
6249   # Always prepend --prefix to ensure using the same prefix
6250   # in subdir configurations.
6251   ac_arg="--prefix=$prefix"
6252   case $ac_arg in
6253   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6254   esac
6255   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6256
6257   # Pass --silent
6258   if test "$silent" = yes; then
6259     ac_sub_configure_args="--silent $ac_sub_configure_args"
6260   fi
6261
6262   # Always prepend --disable-option-checking to silence warnings, since
6263   # different subdirs can have different --enable and --with options.
6264   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6265
6266   ac_popdir=`pwd`
6267   ac_dir=$in_build
6268
6269   ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6270   $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6271   $as_echo "$ac_msg" >&6
6272   as_dir="$ac_dir"; as_fn_mkdir_p
6273
6274   case $srcdir in
6275   [\\/]* | ?:[\\/]* )
6276     ac_srcdir=$srcdir/$in_src ;;
6277   *) # Relative name.
6278     ac_srcdir=../$srcdir/$in_src ;;
6279   esac
6280
6281   cd "$ac_dir"
6282
6283   ac_sub_configure=$ac_srcdir/configure
6284
6285   # Make the cache file name correct relative to the subdirectory.
6286   case $cache_file in
6287   [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6288   *) # Relative name.
6289     ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6290   esac
6291
6292   if test -n "$in_extra_args"; then
6293     # Add the extra args at the end.
6294     ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6295   fi
6296
6297   { $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
6298 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6299   # The eval makes quoting arguments work.
6300   eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6301        --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6302     as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6303
6304   cd "$ac_popdir"
6305
6306
6307
6308 CONFIG_OBS=
6309 CONFIG_DEPS=
6310 CONFIG_SRCS=
6311 ENABLE_CFLAGS=
6312
6313 CONFIG_ALL=
6314 CONFIG_CLEAN=
6315 CONFIG_INSTALL=
6316 CONFIG_UNINSTALL=
6317
6318 # If we haven't got the data from the intl directory,
6319 # assume NLS is disabled.
6320 USE_NLS=no
6321 LIBINTL=
6322 LIBINTL_DEP=
6323 INCINTL=
6324 XGETTEXT=
6325 GMSGFMT=
6326 POSUB=
6327
6328 if test -f  ../intl/config.intl; then
6329   .  ../intl/config.intl
6330 fi
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6332 $as_echo_n "checking whether NLS is requested... " >&6; }
6333 if test x"$USE_NLS" != xyes; then
6334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335 $as_echo "no" >&6; }
6336 else
6337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6338 $as_echo "yes" >&6; }
6339
6340 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6341
6342
6343   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6344 $as_echo_n "checking for catalogs to be installed... " >&6; }
6345   # Look for .po and .gmo files in the source directory.
6346   CATALOGS=
6347   XLINGUAS=
6348   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6349     # If there aren't any .gmo files the shell will give us the
6350     # literal string "../path/to/srcdir/po/*.gmo" which has to be
6351     # weeded out.
6352     case "$cat" in *\**)
6353       continue;;
6354     esac
6355     # The quadruple backslash is collapsed to a double backslash
6356     # by the backticks, then collapsed again by the double quotes,
6357     # leaving us with one backslash in the sed expression (right
6358     # before the dot that mustn't act as a wildcard).
6359     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6360     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6361     # The user is allowed to set LINGUAS to a list of languages to
6362     # install catalogs for.  If it's empty that means "all of them."
6363     if test "x$LINGUAS" = x; then
6364       CATALOGS="$CATALOGS $cat"
6365       XLINGUAS="$XLINGUAS $lang"
6366     else
6367       case "$LINGUAS" in *$lang*)
6368         CATALOGS="$CATALOGS $cat"
6369         XLINGUAS="$XLINGUAS $lang"
6370         ;;
6371       esac
6372     fi
6373   done
6374   LINGUAS="$XLINGUAS"
6375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6376 $as_echo "$LINGUAS" >&6; }
6377
6378
6379     DATADIRNAME=share
6380
6381   INSTOBJEXT=.mo
6382
6383   GENCAT=gencat
6384
6385   CATOBJEXT=.gmo
6386
6387 fi
6388
6389 localedir='${datadir}/locale'
6390
6391
6392 if test x"$USE_NLS" = xyes; then
6393    CONFIG_ALL="$CONFIG_ALL all-po"
6394    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6395    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6396    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6397 fi
6398
6399 GNULIB=build-gnulib/import
6400
6401 # For Makefile dependencies.
6402 GNULIB_STDINT_H=
6403 if test x"$STDINT_H" != x; then
6404   GNULIB_STDINT_H=$GNULIB/$STDINT_H
6405 fi
6406
6407
6408 PACKAGE=gdb
6409
6410 cat >>confdefs.h <<_ACEOF
6411 #define PACKAGE "$PACKAGE"
6412 _ACEOF
6413
6414
6415
6416 # We never need to detect it in this sub-configure.
6417 # But preserve it for config.status --recheck.
6418
6419
6420
6421 MAKEINFO_EXTRA_FLAGS=""
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6423 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6424 if ${gdb_cv_have_makeinfo_click+:} false; then :
6425   $as_echo_n "(cached) " >&6
6426 else
6427   echo '@clicksequence{a @click{} b}' >conftest.texinfo
6428   if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6429     gdb_cv_have_makeinfo_click=yes
6430   else
6431     gdb_cv_have_makeinfo_click=no
6432   fi
6433 fi
6434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6435 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6436 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6437   MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6438 fi
6439
6440
6441
6442
6443 # Check whether --with-separate-debug-dir was given.
6444 if test "${with_separate_debug_dir+set}" = set; then :
6445   withval=$with_separate_debug_dir;
6446     DEBUGDIR=$withval
6447 else
6448   DEBUGDIR=${libdir}/debug
6449 fi
6450
6451
6452   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6453   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6454   ac_define_dir=`eval echo $DEBUGDIR`
6455   ac_define_dir=`eval echo $ac_define_dir`
6456
6457 cat >>confdefs.h <<_ACEOF
6458 #define DEBUGDIR "$ac_define_dir"
6459 _ACEOF
6460
6461
6462
6463
6464   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6465      if test "x$prefix" = xNONE; then
6466         test_prefix=/usr/local
6467      else
6468         test_prefix=$prefix
6469      fi
6470   else
6471      test_prefix=$exec_prefix
6472   fi
6473   value=0
6474   case ${ac_define_dir} in
6475      "${test_prefix}"|"${test_prefix}/"*|\
6476         '${exec_prefix}'|'${exec_prefix}/'*)
6477      value=1
6478      ;;
6479   esac
6480
6481 cat >>confdefs.h <<_ACEOF
6482 #define DEBUGDIR_RELOCATABLE $value
6483 _ACEOF
6484
6485
6486
6487
6488 # We can't pass paths as command line arguments.
6489 # Mingw32 tries to be clever and will convert the paths for us.
6490 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6491 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6492 # This breaks GDB's relocatable path conversions since paths passed in
6493 # config.h would not get so translated, the path prefixes no longer match.
6494
6495   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6496   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6497   ac_define_dir=`eval echo $bindir`
6498   ac_define_dir=`eval echo $ac_define_dir`
6499
6500 cat >>confdefs.h <<_ACEOF
6501 #define BINDIR "$ac_define_dir"
6502 _ACEOF
6503
6504
6505
6506 # GDB's datadir relocation
6507
6508
6509
6510 # Check whether --with-gdb-datadir was given.
6511 if test "${with_gdb_datadir+set}" = set; then :
6512   withval=$with_gdb_datadir;
6513     GDB_DATADIR=$withval
6514 else
6515   GDB_DATADIR=${datadir}/gdb
6516 fi
6517
6518
6519   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6520   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6521   ac_define_dir=`eval echo $GDB_DATADIR`
6522   ac_define_dir=`eval echo $ac_define_dir`
6523
6524 cat >>confdefs.h <<_ACEOF
6525 #define GDB_DATADIR "$ac_define_dir"
6526 _ACEOF
6527
6528
6529
6530
6531   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6532      if test "x$prefix" = xNONE; then
6533         test_prefix=/usr/local
6534      else
6535         test_prefix=$prefix
6536      fi
6537   else
6538      test_prefix=$exec_prefix
6539   fi
6540   value=0
6541   case ${ac_define_dir} in
6542      "${test_prefix}"|"${test_prefix}/"*|\
6543         '${exec_prefix}'|'${exec_prefix}/'*)
6544      value=1
6545      ;;
6546   esac
6547
6548 cat >>confdefs.h <<_ACEOF
6549 #define GDB_DATADIR_RELOCATABLE $value
6550 _ACEOF
6551
6552
6553
6554
6555
6556 # Check whether --with-relocated-sources was given.
6557 if test "${with_relocated_sources+set}" = set; then :
6558   withval=$with_relocated_sources; reloc_srcdir="${withval}"
6559
6560   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6561   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6562   ac_define_dir=`eval echo $reloc_srcdir`
6563   ac_define_dir=`eval echo $ac_define_dir`
6564
6565 cat >>confdefs.h <<_ACEOF
6566 #define RELOC_SRCDIR "$ac_define_dir"
6567 _ACEOF
6568
6569
6570
6571 fi
6572
6573
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6575 $as_echo_n "checking for default auto-load directory... " >&6; }
6576
6577 # Check whether --with-auto-load-dir was given.
6578 if test "${with_auto_load_dir+set}" = set; then :
6579   withval=$with_auto_load_dir;
6580 else
6581   with_auto_load_dir='$debugdir:$datadir/auto-load'
6582 fi
6583
6584 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6585
6586   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6587   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6588   ac_define_dir=`eval echo $escape_dir`
6589   ac_define_dir=`eval echo $ac_define_dir`
6590
6591 cat >>confdefs.h <<_ACEOF
6592 #define AUTO_LOAD_DIR "$ac_define_dir"
6593 _ACEOF
6594
6595
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6597 $as_echo "$with_auto_load_dir" >&6; }
6598
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6600 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6601
6602 # Check whether --with-auto-load-safe-path was given.
6603 if test "${with_auto_load_safe_path+set}" = set; then :
6604   withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6605      with_auto_load_safe_path="/"
6606      fi
6607 else
6608   with_auto_load_safe_path="$with_auto_load_dir"
6609 fi
6610
6611 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6612
6613   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6614   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6615   ac_define_dir=`eval echo $escape_dir`
6616   ac_define_dir=`eval echo $ac_define_dir`
6617
6618 cat >>confdefs.h <<_ACEOF
6619 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6620 _ACEOF
6621
6622
6623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6624 $as_echo "$with_auto_load_safe_path" >&6; }
6625
6626
6627
6628 subdirs="$subdirs testsuite"
6629
6630
6631 # Check whether to support alternative target configurations
6632 # Check whether --enable-targets was given.
6633 if test "${enable_targets+set}" = set; then :
6634   enableval=$enable_targets; case "${enableval}" in
6635   yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6636             ;;
6637   no)       enable_targets= ;;
6638   *)        enable_targets=$enableval ;;
6639 esac
6640 fi
6641
6642
6643 # Check whether to enable 64-bit support on 32-bit hosts
6644 # Check whether --enable-64-bit-bfd was given.
6645 if test "${enable_64_bit_bfd+set}" = set; then :
6646   enableval=$enable_64_bit_bfd; case "${enableval}" in
6647   yes)  want64=true  ;;
6648   no)   want64=false ;;
6649   *)    as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6650 esac
6651 else
6652   want64=false
6653 fi
6654
6655 # Provide defaults for some variables set by the per-host and per-target
6656 # configuration.
6657 gdb_host_obs=posix-hdep.o
6658
6659 if test "${target}" = "${host}"; then
6660   gdb_native=yes
6661 else
6662   gdb_native=no
6663 fi
6664
6665 . $srcdir/configure.host
6666
6667 # Add in the common host objects.
6668 . $srcdir/common/common.host
6669 gdb_host_obs="$gdb_host_obs $common_host_obs"
6670
6671 # Accumulate some settings from configure.tgt over all enabled targets
6672
6673 TARGET_OBS=
6674 all_targets=
6675 HAVE_NATIVE_GCORE_TARGET=
6676
6677 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6678 do
6679   if test "$targ_alias" = "all"; then
6680     all_targets=true
6681   else
6682     # Canonicalize the secondary target names.
6683     result=`$ac_config_sub $targ_alias 2>/dev/null`
6684     if test -n "$result"; then
6685         targ=$result
6686     else
6687         targ=$targ_alias
6688     fi
6689
6690     . ${srcdir}/configure.tgt
6691
6692     if test -z "${gdb_target_obs}"; then :
6693   as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6694 fi
6695
6696     # Target-specific object files
6697     for i in ${gdb_target_obs}; do
6698         case " $TARGET_OBS " in
6699         *" ${i} "*) ;;
6700         *)
6701           TARGET_OBS="$TARGET_OBS ${i}"
6702           ;;
6703         esac
6704     done
6705
6706     # Check whether this target needs 64-bit CORE_ADDR
6707     if test x${want64} = xfalse; then
6708       . ${srcdir}/../bfd/config.bfd
6709     fi
6710
6711     # Check whether this target is native and supports gcore.
6712     if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6713        && $gdb_have_gcore; then
6714       HAVE_NATIVE_GCORE_TARGET=1
6715     fi
6716   fi
6717 done
6718
6719 if test x${all_targets} = xtrue; then
6720
6721   # We want all 64-bit targets if we either:
6722   #  - run on a 64-bit host  or
6723   #  - already require 64-bit support for some other target  or
6724   #  - the --enable-64-bit-bfd option was supplied
6725   # Otherwise we only support all 32-bit targets.
6726   #
6727   # NOTE: This test must be in sync with the corresponding
6728   #       tests in BFD!
6729
6730   if test x${want64} = xfalse; then
6731     # The cast to long int works around a bug in the HP C Compiler
6732 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6733 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6734 # This bug is HP SR number 8606223364.
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6736 $as_echo_n "checking size of long... " >&6; }
6737 if ${ac_cv_sizeof_long+:} false; then :
6738   $as_echo_n "(cached) " >&6
6739 else
6740   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
6741
6742 else
6743   if test "$ac_cv_type_long" = yes; then
6744      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6745 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6746 as_fn_error 77 "cannot compute sizeof (long)
6747 See \`config.log' for more details" "$LINENO" 5; }
6748    else
6749      ac_cv_sizeof_long=0
6750    fi
6751 fi
6752
6753 fi
6754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6755 $as_echo "$ac_cv_sizeof_long" >&6; }
6756
6757
6758
6759 cat >>confdefs.h <<_ACEOF
6760 #define SIZEOF_LONG $ac_cv_sizeof_long
6761 _ACEOF
6762
6763
6764     if test "x${ac_cv_sizeof_long}" = "x8"; then
6765       want64=true
6766     fi
6767   fi
6768   if test x${want64} = xtrue; then
6769     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6770   else
6771     TARGET_OBS='$(ALL_TARGET_OBS)'
6772   fi
6773 fi
6774
6775
6776
6777
6778 # For other settings, only the main target counts.
6779 gdb_sim=
6780 gdb_osabi=
6781 build_gdbserver=
6782 targ=$target; . ${srcdir}/configure.tgt
6783
6784 # Fetch the default architecture and default target vector from BFD.
6785 targ=$target; . $srcdir/../bfd/config.bfd
6786
6787 # We only want the first architecture, so strip off the others if
6788 # there is more than one.
6789 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6790
6791 if test "x$targ_archs" != x; then
6792
6793 cat >>confdefs.h <<_ACEOF
6794 #define DEFAULT_BFD_ARCH $targ_archs
6795 _ACEOF
6796
6797 fi
6798 if test "x$targ_defvec" != x; then
6799
6800 cat >>confdefs.h <<_ACEOF
6801 #define DEFAULT_BFD_VEC $targ_defvec
6802 _ACEOF
6803
6804 fi
6805
6806 # Enable MI.
6807 # Check whether --enable-gdbmi was given.
6808 if test "${enable_gdbmi+set}" = set; then :
6809   enableval=$enable_gdbmi; case $enableval in
6810     yes | no)
6811       ;;
6812     *)
6813       as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6814   esac
6815 else
6816   enable_gdbmi=yes
6817 fi
6818
6819 if test x"$enable_gdbmi" = xyes; then
6820   if test -d $srcdir/mi; then
6821     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6822     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6823     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6824     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6825   fi
6826 fi
6827
6828 # Enable TUI.
6829 # Check whether --enable-tui was given.
6830 if test "${enable_tui+set}" = set; then :
6831   enableval=$enable_tui; case $enableval in
6832     yes | no | auto)
6833       ;;
6834     *)
6835       as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6836   esac
6837 else
6838   enable_tui=auto
6839 fi
6840
6841
6842 # Enable gdbtk.
6843 # Check whether --enable-gdbtk was given.
6844 if test "${enable_gdbtk+set}" = set; then :
6845   enableval=$enable_gdbtk; case $enableval in
6846     yes | no)
6847       ;;
6848     *)
6849       as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6850   esac
6851 else
6852   if test -d $srcdir/gdbtk; then
6853     enable_gdbtk=yes
6854   else
6855     enable_gdbtk=no
6856   fi
6857 fi
6858
6859 # We unconditionally disable gdbtk tests on selected platforms.
6860 case $host_os in
6861   go32* | windows*)
6862     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6863 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6864     enable_gdbtk=no ;;
6865 esac
6866
6867 # Libunwind support for ia64.
6868
6869
6870 # Check whether --with-libunwind-ia64 was given.
6871 if test "${with_libunwind_ia64+set}" = set; then :
6872   withval=$with_libunwind_ia64;
6873 else
6874   with_libunwind_ia64=auto
6875 fi
6876
6877
6878 # Backward compatibility option.
6879 if test "${with_libunwind+set}" = set; then
6880   if test x"$with_libunwind_ia64" != xauto; then
6881     as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6882   fi
6883   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6884 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6885   with_libunwind_ia64="$with_libunwind"
6886 fi
6887
6888 case "$with_libunwind_ia64" in
6889   yes | no)
6890     ;;
6891   auto)
6892     for ac_header in libunwind-ia64.h
6893 do :
6894   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6895 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6896   cat >>confdefs.h <<_ACEOF
6897 #define HAVE_LIBUNWIND_IA64_H 1
6898 _ACEOF
6899
6900 fi
6901
6902 done
6903
6904     with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6905     ;;
6906   *)
6907     as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6908     ;;
6909 esac
6910
6911 if test x"$with_libunwind_ia64" = xyes; then
6912   for ac_header in libunwind-ia64.h
6913 do :
6914   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6915 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6916   cat >>confdefs.h <<_ACEOF
6917 #define HAVE_LIBUNWIND_IA64_H 1
6918 _ACEOF
6919
6920 fi
6921
6922 done
6923
6924   if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6925     as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6926   fi
6927   CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6928   CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6929   CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6930 fi
6931
6932 opt_curses=no
6933
6934 # Check whether --with-curses was given.
6935 if test "${with_curses+set}" = set; then :
6936   withval=$with_curses; opt_curses=$withval
6937 fi
6938
6939
6940 prefer_curses=no
6941 if test "$opt_curses" = "yes"; then
6942   prefer_curses=yes
6943 fi
6944
6945 # Profiling support.
6946 # Check whether --enable-profiling was given.
6947 if test "${enable_profiling+set}" = set; then :
6948   enableval=$enable_profiling; case $enableval in
6949     yes | no)
6950       ;;
6951     *)
6952       as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6953   esac
6954 else
6955   enable_profiling=no
6956 fi
6957
6958
6959 for ac_func in monstartup _mcleanup
6960 do :
6961   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6962 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6963 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6964   cat >>confdefs.h <<_ACEOF
6965 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6966 _ACEOF
6967
6968 fi
6969 done
6970
6971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6972 $as_echo_n "checking for _etext... " >&6; }
6973 if ${ac_cv_var__etext+:} false; then :
6974   $as_echo_n "(cached) " >&6
6975 else
6976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6977 /* end confdefs.h.  */
6978 #include <stdlib.h>
6979 extern char _etext;
6980
6981 int
6982 main ()
6983 {
6984 free (&_etext);
6985   ;
6986   return 0;
6987 }
6988 _ACEOF
6989 if ac_fn_c_try_link "$LINENO"; then :
6990   ac_cv_var__etext=yes
6991 else
6992   ac_cv_var__etext=no
6993 fi
6994 rm -f core conftest.err conftest.$ac_objext \
6995     conftest$ac_exeext conftest.$ac_ext
6996 fi
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6998 $as_echo "$ac_cv_var__etext" >&6; }
6999 if test $ac_cv_var__etext = yes; then
7000
7001 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7002
7003 fi
7004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7005 $as_echo_n "checking for etext... " >&6; }
7006 if ${ac_cv_var_etext+:} false; then :
7007   $as_echo_n "(cached) " >&6
7008 else
7009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7010 /* end confdefs.h.  */
7011 #include <stdlib.h>
7012 extern char etext;
7013
7014 int
7015 main ()
7016 {
7017 free (&etext);
7018   ;
7019   return 0;
7020 }
7021 _ACEOF
7022 if ac_fn_c_try_link "$LINENO"; then :
7023   ac_cv_var_etext=yes
7024 else
7025   ac_cv_var_etext=no
7026 fi
7027 rm -f core conftest.err conftest.$ac_objext \
7028     conftest$ac_exeext conftest.$ac_ext
7029 fi
7030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7031 $as_echo "$ac_cv_var_etext" >&6; }
7032 if test $ac_cv_var_etext = yes; then
7033
7034 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7035
7036 fi
7037 if test "$enable_profiling" = yes ; then
7038   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
7039     as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7040   fi
7041   PROFILE_CFLAGS=-pg
7042   OLD_CFLAGS="$CFLAGS"
7043   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7044
7045   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7046 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7047 if ${ac_cv_cc_supports_pg+:} false; then :
7048   $as_echo_n "(cached) " >&6
7049 else
7050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7051 /* end confdefs.h.  */
7052
7053 int
7054 main ()
7055 {
7056 int x;
7057   ;
7058   return 0;
7059 }
7060 _ACEOF
7061 if ac_fn_c_try_compile "$LINENO"; then :
7062   ac_cv_cc_supports_pg=yes
7063 else
7064   ac_cv_cc_supports_pg=no
7065 fi
7066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7067 fi
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7069 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7070
7071   if test $ac_cv_cc_supports_pg = no; then
7072     as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7073   fi
7074
7075   CFLAGS="$OLD_CFLAGS"
7076 fi
7077
7078 CODESIGN_CERT=
7079 # Check whether --enable-codesign was given.
7080 if test "${enable_codesign+set}" = set; then :
7081   enableval=$enable_codesign; CODESIGN_CERT=$enableval
7082 fi
7083
7084
7085
7086
7087
7088 # Check whether --with-pkgversion was given.
7089 if test "${with_pkgversion+set}" = set; then :
7090   withval=$with_pkgversion; case "$withval" in
7091       yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7092       no)  PKGVERSION= ;;
7093       *)   PKGVERSION="($withval) " ;;
7094      esac
7095 else
7096   PKGVERSION="(GDB) "
7097
7098 fi
7099
7100
7101
7102
7103
7104 # Check whether --with-bugurl was given.
7105 if test "${with_bugurl+set}" = set; then :
7106   withval=$with_bugurl; case "$withval" in
7107       yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7108       no)  BUGURL=
7109            ;;
7110       *)   BUGURL="$withval"
7111            ;;
7112      esac
7113 else
7114   BUGURL="http://www.gnu.org/software/gdb/bugs/"
7115
7116 fi
7117
7118   case ${BUGURL} in
7119   "")
7120     REPORT_BUGS_TO=
7121     REPORT_BUGS_TEXI=
7122     ;;
7123   *)
7124     REPORT_BUGS_TO="<$BUGURL>"
7125     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7126     ;;
7127   esac;
7128
7129
7130
7131
7132 cat >>confdefs.h <<_ACEOF
7133 #define PKGVERSION "$PKGVERSION"
7134 _ACEOF
7135
7136
7137 cat >>confdefs.h <<_ACEOF
7138 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7139 _ACEOF
7140
7141
7142 # --------------------- #
7143 # Checks for programs.  #
7144 # --------------------- #
7145
7146 for ac_prog in gawk mawk nawk awk
7147 do
7148   # Extract the first word of "$ac_prog", so it can be a program name with args.
7149 set dummy $ac_prog; ac_word=$2
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7151 $as_echo_n "checking for $ac_word... " >&6; }
7152 if ${ac_cv_prog_AWK+:} false; then :
7153   $as_echo_n "(cached) " >&6
7154 else
7155   if test -n "$AWK"; then
7156   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7157 else
7158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7159 for as_dir in $PATH
7160 do
7161   IFS=$as_save_IFS
7162   test -z "$as_dir" && as_dir=.
7163     for ac_exec_ext in '' $ac_executable_extensions; do
7164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7165     ac_cv_prog_AWK="$ac_prog"
7166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7167     break 2
7168   fi
7169 done
7170   done
7171 IFS=$as_save_IFS
7172
7173 fi
7174 fi
7175 AWK=$ac_cv_prog_AWK
7176 if test -n "$AWK"; then
7177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7178 $as_echo "$AWK" >&6; }
7179 else
7180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7181 $as_echo "no" >&6; }
7182 fi
7183
7184
7185   test -n "$AWK" && break
7186 done
7187
7188 # Find a good install program.  We prefer a C program (faster),
7189 # so one script is as good as another.  But avoid the broken or
7190 # incompatible versions:
7191 # SysV /etc/install, /usr/sbin/install
7192 # SunOS /usr/etc/install
7193 # IRIX /sbin/install
7194 # AIX /bin/install
7195 # AmigaOS /C/install, which installs bootblocks on floppy discs
7196 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7197 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7198 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7199 # OS/2's system install, which has a completely different semantic
7200 # ./install, which can be erroneously created by make from ./install.sh.
7201 # Reject install programs that cannot install multiple files.
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7203 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7204 if test -z "$INSTALL"; then
7205 if ${ac_cv_path_install+:} false; then :
7206   $as_echo_n "(cached) " >&6
7207 else
7208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7209 for as_dir in $PATH
7210 do
7211   IFS=$as_save_IFS
7212   test -z "$as_dir" && as_dir=.
7213     # Account for people who put trailing slashes in PATH elements.
7214 case $as_dir/ in #((
7215   ./ | .// | /[cC]/* | \
7216   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7217   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7218   /usr/ucb/* ) ;;
7219   *)
7220     # OSF1 and SCO ODT 3.0 have their own names for install.
7221     # Don't use installbsd from OSF since it installs stuff as root
7222     # by default.
7223     for ac_prog in ginstall scoinst install; do
7224       for ac_exec_ext in '' $ac_executable_extensions; do
7225         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7226           if test $ac_prog = install &&
7227             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7228             # AIX install.  It has an incompatible calling convention.
7229             :
7230           elif test $ac_prog = install &&
7231             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7232             # program-specific install script used by HP pwplus--don't use.
7233             :
7234           else
7235             rm -rf conftest.one conftest.two conftest.dir
7236             echo one > conftest.one
7237             echo two > conftest.two
7238             mkdir conftest.dir
7239             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7240               test -s conftest.one && test -s conftest.two &&
7241               test -s conftest.dir/conftest.one &&
7242               test -s conftest.dir/conftest.two
7243             then
7244               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7245               break 3
7246             fi
7247           fi
7248         fi
7249       done
7250     done
7251     ;;
7252 esac
7253
7254   done
7255 IFS=$as_save_IFS
7256
7257 rm -rf conftest.one conftest.two conftest.dir
7258
7259 fi
7260   if test "${ac_cv_path_install+set}" = set; then
7261     INSTALL=$ac_cv_path_install
7262   else
7263     # As a last resort, use the slow shell script.  Don't cache a
7264     # value for INSTALL within a source directory, because that will
7265     # break other packages using the cache if that directory is
7266     # removed, or if the value is a relative name.
7267     INSTALL=$ac_install_sh
7268   fi
7269 fi
7270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7271 $as_echo "$INSTALL" >&6; }
7272
7273 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7274 # It thinks the first close brace ends the variable substitution.
7275 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7276
7277 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7278
7279 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7280
7281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7282 $as_echo_n "checking whether ln -s works... " >&6; }
7283 LN_S=$as_ln_s
7284 if test "$LN_S" = "ln -s"; then
7285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7286 $as_echo "yes" >&6; }
7287 else
7288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7289 $as_echo "no, using $LN_S" >&6; }
7290 fi
7291
7292 if test -n "$ac_tool_prefix"; then
7293   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7294 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7296 $as_echo_n "checking for $ac_word... " >&6; }
7297 if ${ac_cv_prog_RANLIB+:} false; then :
7298   $as_echo_n "(cached) " >&6
7299 else
7300   if test -n "$RANLIB"; then
7301   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7302 else
7303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7304 for as_dir in $PATH
7305 do
7306   IFS=$as_save_IFS
7307   test -z "$as_dir" && as_dir=.
7308     for ac_exec_ext in '' $ac_executable_extensions; do
7309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7310     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7312     break 2
7313   fi
7314 done
7315   done
7316 IFS=$as_save_IFS
7317
7318 fi
7319 fi
7320 RANLIB=$ac_cv_prog_RANLIB
7321 if test -n "$RANLIB"; then
7322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7323 $as_echo "$RANLIB" >&6; }
7324 else
7325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7326 $as_echo "no" >&6; }
7327 fi
7328
7329
7330 fi
7331 if test -z "$ac_cv_prog_RANLIB"; then
7332   ac_ct_RANLIB=$RANLIB
7333   # Extract the first word of "ranlib", so it can be a program name with args.
7334 set dummy ranlib; ac_word=$2
7335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7336 $as_echo_n "checking for $ac_word... " >&6; }
7337 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7338   $as_echo_n "(cached) " >&6
7339 else
7340   if test -n "$ac_ct_RANLIB"; then
7341   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7342 else
7343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7344 for as_dir in $PATH
7345 do
7346   IFS=$as_save_IFS
7347   test -z "$as_dir" && as_dir=.
7348     for ac_exec_ext in '' $ac_executable_extensions; do
7349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7350     ac_cv_prog_ac_ct_RANLIB="ranlib"
7351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7352     break 2
7353   fi
7354 done
7355   done
7356 IFS=$as_save_IFS
7357
7358 fi
7359 fi
7360 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7361 if test -n "$ac_ct_RANLIB"; then
7362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7363 $as_echo "$ac_ct_RANLIB" >&6; }
7364 else
7365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366 $as_echo "no" >&6; }
7367 fi
7368
7369   if test "x$ac_ct_RANLIB" = x; then
7370     RANLIB=":"
7371   else
7372     case $cross_compiling:$ac_tool_warned in
7373 yes:)
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7375 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7376 ac_tool_warned=yes ;;
7377 esac
7378     RANLIB=$ac_ct_RANLIB
7379   fi
7380 else
7381   RANLIB="$ac_cv_prog_RANLIB"
7382 fi
7383
7384 for ac_prog in 'bison -y' byacc
7385 do
7386   # Extract the first word of "$ac_prog", so it can be a program name with args.
7387 set dummy $ac_prog; ac_word=$2
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7389 $as_echo_n "checking for $ac_word... " >&6; }
7390 if ${ac_cv_prog_YACC+:} false; then :
7391   $as_echo_n "(cached) " >&6
7392 else
7393   if test -n "$YACC"; then
7394   ac_cv_prog_YACC="$YACC" # Let the user override the test.
7395 else
7396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7397 for as_dir in $PATH
7398 do
7399   IFS=$as_save_IFS
7400   test -z "$as_dir" && as_dir=.
7401     for ac_exec_ext in '' $ac_executable_extensions; do
7402   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7403     ac_cv_prog_YACC="$ac_prog"
7404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7405     break 2
7406   fi
7407 done
7408   done
7409 IFS=$as_save_IFS
7410
7411 fi
7412 fi
7413 YACC=$ac_cv_prog_YACC
7414 if test -n "$YACC"; then
7415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7416 $as_echo "$YACC" >&6; }
7417 else
7418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7419 $as_echo "no" >&6; }
7420 fi
7421
7422
7423   test -n "$YACC" && break
7424 done
7425 test -n "$YACC" || YACC="yacc"
7426
7427
7428 if test -n "$ac_tool_prefix"; then
7429   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7430 set dummy ${ac_tool_prefix}ar; ac_word=$2
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432 $as_echo_n "checking for $ac_word... " >&6; }
7433 if ${ac_cv_prog_AR+:} false; then :
7434   $as_echo_n "(cached) " >&6
7435 else
7436   if test -n "$AR"; then
7437   ac_cv_prog_AR="$AR" # Let the user override the test.
7438 else
7439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440 for as_dir in $PATH
7441 do
7442   IFS=$as_save_IFS
7443   test -z "$as_dir" && as_dir=.
7444     for ac_exec_ext in '' $ac_executable_extensions; do
7445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7446     ac_cv_prog_AR="${ac_tool_prefix}ar"
7447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7448     break 2
7449   fi
7450 done
7451   done
7452 IFS=$as_save_IFS
7453
7454 fi
7455 fi
7456 AR=$ac_cv_prog_AR
7457 if test -n "$AR"; then
7458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7459 $as_echo "$AR" >&6; }
7460 else
7461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462 $as_echo "no" >&6; }
7463 fi
7464
7465
7466 fi
7467 if test -z "$ac_cv_prog_AR"; then
7468   ac_ct_AR=$AR
7469   # Extract the first word of "ar", so it can be a program name with args.
7470 set dummy ar; ac_word=$2
7471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7472 $as_echo_n "checking for $ac_word... " >&6; }
7473 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7474   $as_echo_n "(cached) " >&6
7475 else
7476   if test -n "$ac_ct_AR"; then
7477   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7478 else
7479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7480 for as_dir in $PATH
7481 do
7482   IFS=$as_save_IFS
7483   test -z "$as_dir" && as_dir=.
7484     for ac_exec_ext in '' $ac_executable_extensions; do
7485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7486     ac_cv_prog_ac_ct_AR="ar"
7487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7488     break 2
7489   fi
7490 done
7491   done
7492 IFS=$as_save_IFS
7493
7494 fi
7495 fi
7496 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7497 if test -n "$ac_ct_AR"; then
7498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7499 $as_echo "$ac_ct_AR" >&6; }
7500 else
7501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502 $as_echo "no" >&6; }
7503 fi
7504
7505   if test "x$ac_ct_AR" = x; then
7506     AR=""
7507   else
7508     case $cross_compiling:$ac_tool_warned in
7509 yes:)
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7511 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7512 ac_tool_warned=yes ;;
7513 esac
7514     AR=$ac_ct_AR
7515   fi
7516 else
7517   AR="$ac_cv_prog_AR"
7518 fi
7519
7520 if test -n "$ac_tool_prefix"; then
7521   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7522 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524 $as_echo_n "checking for $ac_word... " >&6; }
7525 if ${ac_cv_prog_DLLTOOL+:} false; then :
7526   $as_echo_n "(cached) " >&6
7527 else
7528   if test -n "$DLLTOOL"; then
7529   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7530 else
7531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7532 for as_dir in $PATH
7533 do
7534   IFS=$as_save_IFS
7535   test -z "$as_dir" && as_dir=.
7536     for ac_exec_ext in '' $ac_executable_extensions; do
7537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7538     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7540     break 2
7541   fi
7542 done
7543   done
7544 IFS=$as_save_IFS
7545
7546 fi
7547 fi
7548 DLLTOOL=$ac_cv_prog_DLLTOOL
7549 if test -n "$DLLTOOL"; then
7550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7551 $as_echo "$DLLTOOL" >&6; }
7552 else
7553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554 $as_echo "no" >&6; }
7555 fi
7556
7557
7558 fi
7559 if test -z "$ac_cv_prog_DLLTOOL"; then
7560   ac_ct_DLLTOOL=$DLLTOOL
7561   # Extract the first word of "dlltool", so it can be a program name with args.
7562 set dummy dlltool; ac_word=$2
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7564 $as_echo_n "checking for $ac_word... " >&6; }
7565 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7566   $as_echo_n "(cached) " >&6
7567 else
7568   if test -n "$ac_ct_DLLTOOL"; then
7569   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7570 else
7571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7572 for as_dir in $PATH
7573 do
7574   IFS=$as_save_IFS
7575   test -z "$as_dir" && as_dir=.
7576     for ac_exec_ext in '' $ac_executable_extensions; do
7577   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7578     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7580     break 2
7581   fi
7582 done
7583   done
7584 IFS=$as_save_IFS
7585
7586 fi
7587 fi
7588 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7589 if test -n "$ac_ct_DLLTOOL"; then
7590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7591 $as_echo "$ac_ct_DLLTOOL" >&6; }
7592 else
7593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7594 $as_echo "no" >&6; }
7595 fi
7596
7597   if test "x$ac_ct_DLLTOOL" = x; then
7598     DLLTOOL=""
7599   else
7600     case $cross_compiling:$ac_tool_warned in
7601 yes:)
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7603 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7604 ac_tool_warned=yes ;;
7605 esac
7606     DLLTOOL=$ac_ct_DLLTOOL
7607   fi
7608 else
7609   DLLTOOL="$ac_cv_prog_DLLTOOL"
7610 fi
7611
7612 if test -n "$ac_tool_prefix"; then
7613   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7614 set dummy ${ac_tool_prefix}windres; ac_word=$2
7615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7616 $as_echo_n "checking for $ac_word... " >&6; }
7617 if ${ac_cv_prog_WINDRES+:} false; then :
7618   $as_echo_n "(cached) " >&6
7619 else
7620   if test -n "$WINDRES"; then
7621   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7622 else
7623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7624 for as_dir in $PATH
7625 do
7626   IFS=$as_save_IFS
7627   test -z "$as_dir" && as_dir=.
7628     for ac_exec_ext in '' $ac_executable_extensions; do
7629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7630     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7632     break 2
7633   fi
7634 done
7635   done
7636 IFS=$as_save_IFS
7637
7638 fi
7639 fi
7640 WINDRES=$ac_cv_prog_WINDRES
7641 if test -n "$WINDRES"; then
7642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7643 $as_echo "$WINDRES" >&6; }
7644 else
7645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646 $as_echo "no" >&6; }
7647 fi
7648
7649
7650 fi
7651 if test -z "$ac_cv_prog_WINDRES"; then
7652   ac_ct_WINDRES=$WINDRES
7653   # Extract the first word of "windres", so it can be a program name with args.
7654 set dummy windres; ac_word=$2
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7656 $as_echo_n "checking for $ac_word... " >&6; }
7657 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7658   $as_echo_n "(cached) " >&6
7659 else
7660   if test -n "$ac_ct_WINDRES"; then
7661   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7662 else
7663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7664 for as_dir in $PATH
7665 do
7666   IFS=$as_save_IFS
7667   test -z "$as_dir" && as_dir=.
7668     for ac_exec_ext in '' $ac_executable_extensions; do
7669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7670     ac_cv_prog_ac_ct_WINDRES="windres"
7671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7672     break 2
7673   fi
7674 done
7675   done
7676 IFS=$as_save_IFS
7677
7678 fi
7679 fi
7680 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7681 if test -n "$ac_ct_WINDRES"; then
7682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7683 $as_echo "$ac_ct_WINDRES" >&6; }
7684 else
7685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7686 $as_echo "no" >&6; }
7687 fi
7688
7689   if test "x$ac_ct_WINDRES" = x; then
7690     WINDRES=""
7691   else
7692     case $cross_compiling:$ac_tool_warned in
7693 yes:)
7694 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7695 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7696 ac_tool_warned=yes ;;
7697 esac
7698     WINDRES=$ac_ct_WINDRES
7699   fi
7700 else
7701   WINDRES="$ac_cv_prog_WINDRES"
7702 fi
7703
7704
7705 case $host_os in
7706   gnu*)
7707     # Needed for GNU Hurd hosts.
7708     if test -n "$ac_tool_prefix"; then
7709   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7710 set dummy ${ac_tool_prefix}mig; ac_word=$2
7711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7712 $as_echo_n "checking for $ac_word... " >&6; }
7713 if ${ac_cv_prog_MIG+:} false; then :
7714   $as_echo_n "(cached) " >&6
7715 else
7716   if test -n "$MIG"; then
7717   ac_cv_prog_MIG="$MIG" # Let the user override the test.
7718 else
7719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7720 for as_dir in $PATH
7721 do
7722   IFS=$as_save_IFS
7723   test -z "$as_dir" && as_dir=.
7724     for ac_exec_ext in '' $ac_executable_extensions; do
7725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7726     ac_cv_prog_MIG="${ac_tool_prefix}mig"
7727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7728     break 2
7729   fi
7730 done
7731   done
7732 IFS=$as_save_IFS
7733
7734 fi
7735 fi
7736 MIG=$ac_cv_prog_MIG
7737 if test -n "$MIG"; then
7738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7739 $as_echo "$MIG" >&6; }
7740 else
7741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7742 $as_echo "no" >&6; }
7743 fi
7744
7745
7746 fi
7747 if test -z "$ac_cv_prog_MIG"; then
7748   ac_ct_MIG=$MIG
7749   # Extract the first word of "mig", so it can be a program name with args.
7750 set dummy mig; ac_word=$2
7751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7752 $as_echo_n "checking for $ac_word... " >&6; }
7753 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7754   $as_echo_n "(cached) " >&6
7755 else
7756   if test -n "$ac_ct_MIG"; then
7757   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7758 else
7759 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7760 for as_dir in $PATH
7761 do
7762   IFS=$as_save_IFS
7763   test -z "$as_dir" && as_dir=.
7764     for ac_exec_ext in '' $ac_executable_extensions; do
7765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7766     ac_cv_prog_ac_ct_MIG="mig"
7767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7768     break 2
7769   fi
7770 done
7771   done
7772 IFS=$as_save_IFS
7773
7774 fi
7775 fi
7776 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7777 if test -n "$ac_ct_MIG"; then
7778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7779 $as_echo "$ac_ct_MIG" >&6; }
7780 else
7781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7782 $as_echo "no" >&6; }
7783 fi
7784
7785   if test "x$ac_ct_MIG" = x; then
7786     MIG=""
7787   else
7788     case $cross_compiling:$ac_tool_warned in
7789 yes:)
7790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7791 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7792 ac_tool_warned=yes ;;
7793 esac
7794     MIG=$ac_ct_MIG
7795   fi
7796 else
7797   MIG="$ac_cv_prog_MIG"
7798 fi
7799
7800     if test x"$MIG" = x; then
7801       as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
7802     fi
7803     ;;
7804 esac
7805
7806 # ---------------------- #
7807 # Checks for libraries.  #
7808 # ---------------------- #
7809
7810 # We might need to link with -lm; most simulators need it.
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7812 $as_echo_n "checking for main in -lm... " >&6; }
7813 if ${ac_cv_lib_m_main+:} false; then :
7814   $as_echo_n "(cached) " >&6
7815 else
7816   ac_check_lib_save_LIBS=$LIBS
7817 LIBS="-lm  $LIBS"
7818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7819 /* end confdefs.h.  */
7820
7821
7822 int
7823 main ()
7824 {
7825 return main ();
7826   ;
7827   return 0;
7828 }
7829 _ACEOF
7830 if ac_fn_c_try_link "$LINENO"; then :
7831   ac_cv_lib_m_main=yes
7832 else
7833   ac_cv_lib_m_main=no
7834 fi
7835 rm -f core conftest.err conftest.$ac_objext \
7836     conftest$ac_exeext conftest.$ac_ext
7837 LIBS=$ac_check_lib_save_LIBS
7838 fi
7839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7840 $as_echo "$ac_cv_lib_m_main" >&6; }
7841 if test "x$ac_cv_lib_m_main" = xyes; then :
7842   cat >>confdefs.h <<_ACEOF
7843 #define HAVE_LIBM 1
7844 _ACEOF
7845
7846   LIBS="-lm $LIBS"
7847
7848 fi
7849
7850
7851 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7853 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7854 if ${ac_cv_search_gethostbyname+:} false; then :
7855   $as_echo_n "(cached) " >&6
7856 else
7857   ac_func_search_save_LIBS=$LIBS
7858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7859 /* end confdefs.h.  */
7860
7861 /* Override any GCC internal prototype to avoid an error.
7862    Use char because int might match the return type of a GCC
7863    builtin and then its argument prototype would still apply.  */
7864 #ifdef __cplusplus
7865 extern "C"
7866 #endif
7867 char gethostbyname ();
7868 int
7869 main ()
7870 {
7871 return gethostbyname ();
7872   ;
7873   return 0;
7874 }
7875 _ACEOF
7876 for ac_lib in '' nsl; do
7877   if test -z "$ac_lib"; then
7878     ac_res="none required"
7879   else
7880     ac_res=-l$ac_lib
7881     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7882   fi
7883   if ac_fn_c_try_link "$LINENO"; then :
7884   ac_cv_search_gethostbyname=$ac_res
7885 fi
7886 rm -f core conftest.err conftest.$ac_objext \
7887     conftest$ac_exeext
7888   if ${ac_cv_search_gethostbyname+:} false; then :
7889   break
7890 fi
7891 done
7892 if ${ac_cv_search_gethostbyname+:} false; then :
7893
7894 else
7895   ac_cv_search_gethostbyname=no
7896 fi
7897 rm conftest.$ac_ext
7898 LIBS=$ac_func_search_save_LIBS
7899 fi
7900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7901 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7902 ac_res=$ac_cv_search_gethostbyname
7903 if test "$ac_res" != no; then :
7904   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7905
7906 fi
7907
7908
7909 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7911 $as_echo_n "checking for library containing socketpair... " >&6; }
7912 if ${ac_cv_search_socketpair+:} false; then :
7913   $as_echo_n "(cached) " >&6
7914 else
7915   ac_func_search_save_LIBS=$LIBS
7916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7917 /* end confdefs.h.  */
7918
7919 /* Override any GCC internal prototype to avoid an error.
7920    Use char because int might match the return type of a GCC
7921    builtin and then its argument prototype would still apply.  */
7922 #ifdef __cplusplus
7923 extern "C"
7924 #endif
7925 char socketpair ();
7926 int
7927 main ()
7928 {
7929 return socketpair ();
7930   ;
7931   return 0;
7932 }
7933 _ACEOF
7934 for ac_lib in '' socket; do
7935   if test -z "$ac_lib"; then
7936     ac_res="none required"
7937   else
7938     ac_res=-l$ac_lib
7939     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7940   fi
7941   if ac_fn_c_try_link "$LINENO"; then :
7942   ac_cv_search_socketpair=$ac_res
7943 fi
7944 rm -f core conftest.err conftest.$ac_objext \
7945     conftest$ac_exeext
7946   if ${ac_cv_search_socketpair+:} false; then :
7947   break
7948 fi
7949 done
7950 if ${ac_cv_search_socketpair+:} false; then :
7951
7952 else
7953   ac_cv_search_socketpair=no
7954 fi
7955 rm conftest.$ac_ext
7956 LIBS=$ac_func_search_save_LIBS
7957 fi
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7959 $as_echo "$ac_cv_search_socketpair" >&6; }
7960 ac_res=$ac_cv_search_socketpair
7961 if test "$ac_res" != no; then :
7962   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7963
7964 fi
7965
7966
7967 # Link in zlib if we can.  This allows us to read compressed debug sections.
7968
7969   # Use the system's zlib library.
7970   zlibdir="-L\$(top_builddir)/../zlib"
7971   zlibinc="-I\$(top_srcdir)/../zlib"
7972
7973 # Check whether --with-system-zlib was given.
7974 if test "${with_system_zlib+set}" = set; then :
7975   withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7976     zlibdir=
7977     zlibinc=
7978   fi
7979
7980 fi
7981
7982
7983
7984
7985
7986 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7987 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7989 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7990 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7991   $as_echo_n "(cached) " >&6
7992 else
7993   ac_func_search_save_LIBS=$LIBS
7994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7995 /* end confdefs.h.  */
7996
7997 /* Override any GCC internal prototype to avoid an error.
7998    Use char because int might match the return type of a GCC
7999    builtin and then its argument prototype would still apply.  */
8000 #ifdef __cplusplus
8001 extern "C"
8002 #endif
8003 char kinfo_getvmmap ();
8004 int
8005 main ()
8006 {
8007 return kinfo_getvmmap ();
8008   ;
8009   return 0;
8010 }
8011 _ACEOF
8012 for ac_lib in '' util util-freebsd; do
8013   if test -z "$ac_lib"; then
8014     ac_res="none required"
8015   else
8016     ac_res=-l$ac_lib
8017     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8018   fi
8019   if ac_fn_c_try_link "$LINENO"; then :
8020   ac_cv_search_kinfo_getvmmap=$ac_res
8021 fi
8022 rm -f core conftest.err conftest.$ac_objext \
8023     conftest$ac_exeext
8024   if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8025   break
8026 fi
8027 done
8028 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8029
8030 else
8031   ac_cv_search_kinfo_getvmmap=no
8032 fi
8033 rm conftest.$ac_ext
8034 LIBS=$ac_func_search_save_LIBS
8035 fi
8036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8037 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8038 ac_res=$ac_cv_search_kinfo_getvmmap
8039 if test "$ac_res" != no; then :
8040   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8041
8042 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8043
8044 fi
8045
8046
8047 # fbsd-nat.c can also use kinfo_getfile.
8048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8049 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
8050 if ${ac_cv_search_kinfo_getfile+:} false; then :
8051   $as_echo_n "(cached) " >&6
8052 else
8053   ac_func_search_save_LIBS=$LIBS
8054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8055 /* end confdefs.h.  */
8056
8057 /* Override any GCC internal prototype to avoid an error.
8058    Use char because int might match the return type of a GCC
8059    builtin and then its argument prototype would still apply.  */
8060 #ifdef __cplusplus
8061 extern "C"
8062 #endif
8063 char kinfo_getfile ();
8064 int
8065 main ()
8066 {
8067 return kinfo_getfile ();
8068   ;
8069   return 0;
8070 }
8071 _ACEOF
8072 for ac_lib in '' util util-freebsd; do
8073   if test -z "$ac_lib"; then
8074     ac_res="none required"
8075   else
8076     ac_res=-l$ac_lib
8077     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8078   fi
8079   if ac_fn_c_try_link "$LINENO"; then :
8080   ac_cv_search_kinfo_getfile=$ac_res
8081 fi
8082 rm -f core conftest.err conftest.$ac_objext \
8083     conftest$ac_exeext
8084   if ${ac_cv_search_kinfo_getfile+:} false; then :
8085   break
8086 fi
8087 done
8088 if ${ac_cv_search_kinfo_getfile+:} false; then :
8089
8090 else
8091   ac_cv_search_kinfo_getfile=no
8092 fi
8093 rm conftest.$ac_ext
8094 LIBS=$ac_func_search_save_LIBS
8095 fi
8096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8097 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8098 ac_res=$ac_cv_search_kinfo_getfile
8099 if test "$ac_res" != no; then :
8100   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8101
8102 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8103
8104 fi
8105
8106
8107
8108       if test "X$prefix" = "XNONE"; then
8109     acl_final_prefix="$ac_default_prefix"
8110   else
8111     acl_final_prefix="$prefix"
8112   fi
8113   if test "X$exec_prefix" = "XNONE"; then
8114     acl_final_exec_prefix='${prefix}'
8115   else
8116     acl_final_exec_prefix="$exec_prefix"
8117   fi
8118   acl_save_prefix="$prefix"
8119   prefix="$acl_final_prefix"
8120   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8121   prefix="$acl_save_prefix"
8122
8123
8124 # Check whether --with-gnu-ld was given.
8125 if test "${with_gnu_ld+set}" = set; then :
8126   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8127 else
8128   with_gnu_ld=no
8129 fi
8130
8131 # Prepare PATH_SEPARATOR.
8132 # The user is always right.
8133 if test "${PATH_SEPARATOR+set}" != set; then
8134   echo "#! /bin/sh" >conf$$.sh
8135   echo  "exit 0"   >>conf$$.sh
8136   chmod +x conf$$.sh
8137   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8138     PATH_SEPARATOR=';'
8139   else
8140     PATH_SEPARATOR=:
8141   fi
8142   rm -f conf$$.sh
8143 fi
8144 ac_prog=ld
8145 if test "$GCC" = yes; then
8146   # Check if gcc -print-prog-name=ld gives a path.
8147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8148 $as_echo_n "checking for ld used by GCC... " >&6; }
8149   case $host in
8150   *-*-mingw*)
8151     # gcc leaves a trailing carriage return which upsets mingw
8152     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8153   *)
8154     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8155   esac
8156   case $ac_prog in
8157     # Accept absolute paths.
8158     [\\/]* | [A-Za-z]:[\\/]*)
8159       re_direlt='/[^/][^/]*/\.\./'
8160       # Canonicalize the path of ld
8161       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8162       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8163         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8164       done
8165       test -z "$LD" && LD="$ac_prog"
8166       ;;
8167   "")
8168     # If it fails, then pretend we aren't using GCC.
8169     ac_prog=ld
8170     ;;
8171   *)
8172     # If it is relative, then search for the first ld in PATH.
8173     with_gnu_ld=unknown
8174     ;;
8175   esac
8176 elif test "$with_gnu_ld" = yes; then
8177   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8178 $as_echo_n "checking for GNU ld... " >&6; }
8179 else
8180   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8181 $as_echo_n "checking for non-GNU ld... " >&6; }
8182 fi
8183 if ${acl_cv_path_LD+:} false; then :
8184   $as_echo_n "(cached) " >&6
8185 else
8186   if test -z "$LD"; then
8187   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8188   for ac_dir in $PATH; do
8189     test -z "$ac_dir" && ac_dir=.
8190     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8191       acl_cv_path_LD="$ac_dir/$ac_prog"
8192       # Check to see if the program is GNU ld.  I'd rather use --version,
8193       # but apparently some GNU ld's only accept -v.
8194       # Break only if it was the GNU/non-GNU ld that we prefer.
8195       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8196         test "$with_gnu_ld" != no && break
8197       else
8198         test "$with_gnu_ld" != yes && break
8199       fi
8200     fi
8201   done
8202   IFS="$ac_save_ifs"
8203 else
8204   acl_cv_path_LD="$LD" # Let the user override the test with a path.
8205 fi
8206 fi
8207
8208 LD="$acl_cv_path_LD"
8209 if test -n "$LD"; then
8210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8211 $as_echo "$LD" >&6; }
8212 else
8213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8214 $as_echo "no" >&6; }
8215 fi
8216 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8218 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8219 if ${acl_cv_prog_gnu_ld+:} false; then :
8220   $as_echo_n "(cached) " >&6
8221 else
8222   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8223 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8224   acl_cv_prog_gnu_ld=yes
8225 else
8226   acl_cv_prog_gnu_ld=no
8227 fi
8228 fi
8229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8230 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8231 with_gnu_ld=$acl_cv_prog_gnu_ld
8232
8233
8234
8235                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8236 $as_echo_n "checking for shared library run path origin... " >&6; }
8237 if ${acl_cv_rpath+:} false; then :
8238   $as_echo_n "(cached) " >&6
8239 else
8240
8241     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8242     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8243     . ./conftest.sh
8244     rm -f ./conftest.sh
8245     acl_cv_rpath=done
8246
8247 fi
8248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8249 $as_echo "$acl_cv_rpath" >&6; }
8250   wl="$acl_cv_wl"
8251   libext="$acl_cv_libext"
8252   shlibext="$acl_cv_shlibext"
8253   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8254   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8255   hardcode_direct="$acl_cv_hardcode_direct"
8256   hardcode_minus_L="$acl_cv_hardcode_minus_L"
8257     # Check whether --enable-rpath was given.
8258 if test "${enable_rpath+set}" = set; then :
8259   enableval=$enable_rpath; :
8260 else
8261   enable_rpath=yes
8262 fi
8263
8264
8265
8266
8267
8268
8269
8270
8271     use_additional=yes
8272
8273   acl_save_prefix="$prefix"
8274   prefix="$acl_final_prefix"
8275   acl_save_exec_prefix="$exec_prefix"
8276   exec_prefix="$acl_final_exec_prefix"
8277
8278     eval additional_includedir=\"$includedir\"
8279     eval additional_libdir=\"$libdir\"
8280
8281   exec_prefix="$acl_save_exec_prefix"
8282   prefix="$acl_save_prefix"
8283
8284
8285 # Check whether --with-libiconv-prefix was given.
8286 if test "${with_libiconv_prefix+set}" = set; then :
8287   withval=$with_libiconv_prefix;
8288     if test "X$withval" = "Xno"; then
8289       use_additional=no
8290     else
8291       if test "X$withval" = "X"; then
8292
8293   acl_save_prefix="$prefix"
8294   prefix="$acl_final_prefix"
8295   acl_save_exec_prefix="$exec_prefix"
8296   exec_prefix="$acl_final_exec_prefix"
8297
8298           eval additional_includedir=\"$includedir\"
8299           eval additional_libdir=\"$libdir\"
8300
8301   exec_prefix="$acl_save_exec_prefix"
8302   prefix="$acl_save_prefix"
8303
8304       else
8305         additional_includedir="$withval/include"
8306         additional_libdir="$withval/lib"
8307       fi
8308     fi
8309
8310 fi
8311
8312       LIBICONV=
8313   LTLIBICONV=
8314   INCICONV=
8315   rpathdirs=
8316   ltrpathdirs=
8317   names_already_handled=
8318   names_next_round='iconv '
8319   while test -n "$names_next_round"; do
8320     names_this_round="$names_next_round"
8321     names_next_round=
8322     for name in $names_this_round; do
8323       already_handled=
8324       for n in $names_already_handled; do
8325         if test "$n" = "$name"; then
8326           already_handled=yes
8327           break
8328         fi
8329       done
8330       if test -z "$already_handled"; then
8331         names_already_handled="$names_already_handled $name"
8332                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8333         eval value=\"\$HAVE_LIB$uppername\"
8334         if test -n "$value"; then
8335           if test "$value" = yes; then
8336             eval value=\"\$LIB$uppername\"
8337             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8338             eval value=\"\$LTLIB$uppername\"
8339             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8340           else
8341                                     :
8342           fi
8343         else
8344                               found_dir=
8345           found_la=
8346           found_so=
8347           found_a=
8348           if test $use_additional = yes; then
8349             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8350               found_dir="$additional_libdir"
8351               found_so="$additional_libdir/lib$name.$shlibext"
8352               if test -f "$additional_libdir/lib$name.la"; then
8353                 found_la="$additional_libdir/lib$name.la"
8354               fi
8355             else
8356               if test -f "$additional_libdir/lib$name.$libext"; then
8357                 found_dir="$additional_libdir"
8358                 found_a="$additional_libdir/lib$name.$libext"
8359                 if test -f "$additional_libdir/lib$name.la"; then
8360                   found_la="$additional_libdir/lib$name.la"
8361                 fi
8362               fi
8363             fi
8364           fi
8365           if test "X$found_dir" = "X"; then
8366             for x in $LDFLAGS $LTLIBICONV; do
8367
8368   acl_save_prefix="$prefix"
8369   prefix="$acl_final_prefix"
8370   acl_save_exec_prefix="$exec_prefix"
8371   exec_prefix="$acl_final_exec_prefix"
8372   eval x=\"$x\"
8373   exec_prefix="$acl_save_exec_prefix"
8374   prefix="$acl_save_prefix"
8375
8376               case "$x" in
8377                 -L*)
8378                   dir=`echo "X$x" | sed -e 's/^X-L//'`
8379                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8380                     found_dir="$dir"
8381                     found_so="$dir/lib$name.$shlibext"
8382                     if test -f "$dir/lib$name.la"; then
8383                       found_la="$dir/lib$name.la"
8384                     fi
8385                   else
8386                     if test -f "$dir/lib$name.$libext"; then
8387                       found_dir="$dir"
8388                       found_a="$dir/lib$name.$libext"
8389                       if test -f "$dir/lib$name.la"; then
8390                         found_la="$dir/lib$name.la"
8391                       fi
8392                     fi
8393                   fi
8394                   ;;
8395               esac
8396               if test "X$found_dir" != "X"; then
8397                 break
8398               fi
8399             done
8400           fi
8401           if test "X$found_dir" != "X"; then
8402                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8403             if test "X$found_so" != "X"; then
8404                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8405                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8406               else
8407                                                                                 haveit=
8408                 for x in $ltrpathdirs; do
8409                   if test "X$x" = "X$found_dir"; then
8410                     haveit=yes
8411                     break
8412                   fi
8413                 done
8414                 if test -z "$haveit"; then
8415                   ltrpathdirs="$ltrpathdirs $found_dir"
8416                 fi
8417                                 if test "$hardcode_direct" = yes; then
8418                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8419                 else
8420                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8421                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8422                                                             haveit=
8423                     for x in $rpathdirs; do
8424                       if test "X$x" = "X$found_dir"; then
8425                         haveit=yes
8426                         break
8427                       fi
8428                     done
8429                     if test -z "$haveit"; then
8430                       rpathdirs="$rpathdirs $found_dir"
8431                     fi
8432                   else
8433                                                                                 haveit=
8434                     for x in $LDFLAGS $LIBICONV; do
8435
8436   acl_save_prefix="$prefix"
8437   prefix="$acl_final_prefix"
8438   acl_save_exec_prefix="$exec_prefix"
8439   exec_prefix="$acl_final_exec_prefix"
8440   eval x=\"$x\"
8441   exec_prefix="$acl_save_exec_prefix"
8442   prefix="$acl_save_prefix"
8443
8444                       if test "X$x" = "X-L$found_dir"; then
8445                         haveit=yes
8446                         break
8447                       fi
8448                     done
8449                     if test -z "$haveit"; then
8450                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8451                     fi
8452                     if test "$hardcode_minus_L" != no; then
8453                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8454                     else
8455                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8456                     fi
8457                   fi
8458                 fi
8459               fi
8460             else
8461               if test "X$found_a" != "X"; then
8462                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8463               else
8464                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8465               fi
8466             fi
8467                         additional_includedir=
8468             case "$found_dir" in
8469               */lib | */lib/)
8470                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8471                 additional_includedir="$basedir/include"
8472                 ;;
8473             esac
8474             if test "X$additional_includedir" != "X"; then
8475                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
8476                 haveit=
8477                 if test "X$additional_includedir" = "X/usr/local/include"; then
8478                   if test -n "$GCC"; then
8479                     case $host_os in
8480                       linux*) haveit=yes;;
8481                     esac
8482                   fi
8483                 fi
8484                 if test -z "$haveit"; then
8485                   for x in $CPPFLAGS $INCICONV; do
8486
8487   acl_save_prefix="$prefix"
8488   prefix="$acl_final_prefix"
8489   acl_save_exec_prefix="$exec_prefix"
8490   exec_prefix="$acl_final_exec_prefix"
8491   eval x=\"$x\"
8492   exec_prefix="$acl_save_exec_prefix"
8493   prefix="$acl_save_prefix"
8494
8495                     if test "X$x" = "X-I$additional_includedir"; then
8496                       haveit=yes
8497                       break
8498                     fi
8499                   done
8500                   if test -z "$haveit"; then
8501                     if test -d "$additional_includedir"; then
8502                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8503                     fi
8504                   fi
8505                 fi
8506               fi
8507             fi
8508                         if test -n "$found_la"; then
8509                                                         save_libdir="$libdir"
8510               case "$found_la" in
8511                 */* | *\\*) . "$found_la" ;;
8512                 *) . "./$found_la" ;;
8513               esac
8514               libdir="$save_libdir"
8515                             for dep in $dependency_libs; do
8516                 case "$dep" in
8517                   -L*)
8518                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8519                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
8520                       haveit=
8521                       if test "X$additional_libdir" = "X/usr/local/lib"; then
8522                         if test -n "$GCC"; then
8523                           case $host_os in
8524                             linux*) haveit=yes;;
8525                           esac
8526                         fi
8527                       fi
8528                       if test -z "$haveit"; then
8529                         haveit=
8530                         for x in $LDFLAGS $LIBICONV; do
8531
8532   acl_save_prefix="$prefix"
8533   prefix="$acl_final_prefix"
8534   acl_save_exec_prefix="$exec_prefix"
8535   exec_prefix="$acl_final_exec_prefix"
8536   eval x=\"$x\"
8537   exec_prefix="$acl_save_exec_prefix"
8538   prefix="$acl_save_prefix"
8539
8540                           if test "X$x" = "X-L$additional_libdir"; then
8541                             haveit=yes
8542                             break
8543                           fi
8544                         done
8545                         if test -z "$haveit"; then
8546                           if test -d "$additional_libdir"; then
8547                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8548                           fi
8549                         fi
8550                         haveit=
8551                         for x in $LDFLAGS $LTLIBICONV; do
8552
8553   acl_save_prefix="$prefix"
8554   prefix="$acl_final_prefix"
8555   acl_save_exec_prefix="$exec_prefix"
8556   exec_prefix="$acl_final_exec_prefix"
8557   eval x=\"$x\"
8558   exec_prefix="$acl_save_exec_prefix"
8559   prefix="$acl_save_prefix"
8560
8561                           if test "X$x" = "X-L$additional_libdir"; then
8562                             haveit=yes
8563                             break
8564                           fi
8565                         done
8566                         if test -z "$haveit"; then
8567                           if test -d "$additional_libdir"; then
8568                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8569                           fi
8570                         fi
8571                       fi
8572                     fi
8573                     ;;
8574                   -R*)
8575                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
8576                     if test "$enable_rpath" != no; then
8577                                                                   haveit=
8578                       for x in $rpathdirs; do
8579                         if test "X$x" = "X$dir"; then
8580                           haveit=yes
8581                           break
8582                         fi
8583                       done
8584                       if test -z "$haveit"; then
8585                         rpathdirs="$rpathdirs $dir"
8586                       fi
8587                                                                   haveit=
8588                       for x in $ltrpathdirs; do
8589                         if test "X$x" = "X$dir"; then
8590                           haveit=yes
8591                           break
8592                         fi
8593                       done
8594                       if test -z "$haveit"; then
8595                         ltrpathdirs="$ltrpathdirs $dir"
8596                       fi
8597                     fi
8598                     ;;
8599                   -l*)
8600                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8601                     ;;
8602                   *.la)
8603                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8604                     ;;
8605                   *)
8606                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8607                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8608                     ;;
8609                 esac
8610               done
8611             fi
8612           else
8613                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8614             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8615           fi
8616         fi
8617       fi
8618     done
8619   done
8620   if test "X$rpathdirs" != "X"; then
8621     if test -n "$hardcode_libdir_separator"; then
8622                         alldirs=
8623       for found_dir in $rpathdirs; do
8624         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8625       done
8626             acl_save_libdir="$libdir"
8627       libdir="$alldirs"
8628       eval flag=\"$hardcode_libdir_flag_spec\"
8629       libdir="$acl_save_libdir"
8630       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8631     else
8632             for found_dir in $rpathdirs; do
8633         acl_save_libdir="$libdir"
8634         libdir="$found_dir"
8635         eval flag=\"$hardcode_libdir_flag_spec\"
8636         libdir="$acl_save_libdir"
8637         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8638       done
8639     fi
8640   fi
8641   if test "X$ltrpathdirs" != "X"; then
8642             for found_dir in $ltrpathdirs; do
8643       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8644     done
8645   fi
8646
8647
8648
8649
8650
8651
8652
8653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8654 $as_echo_n "checking for iconv... " >&6; }
8655 if ${am_cv_func_iconv+:} false; then :
8656   $as_echo_n "(cached) " >&6
8657 else
8658
8659     am_cv_func_iconv="no, consider installing GNU libiconv"
8660     am_cv_lib_iconv=no
8661                     am_save_CPPFLAGS="$CPPFLAGS"
8662     CPPFLAGS="$CPPFLAGS $INCICONV"
8663     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8664 /* end confdefs.h.  */
8665 #include <stdlib.h>
8666 #include <iconv.h>
8667 int
8668 main ()
8669 {
8670 iconv_t cd = iconv_open("","");
8671        iconv(cd,NULL,NULL,NULL,NULL);
8672        iconv_close(cd);
8673   ;
8674   return 0;
8675 }
8676 _ACEOF
8677 if ac_fn_c_try_link "$LINENO"; then :
8678   am_cv_func_iconv=yes
8679 fi
8680 rm -f core conftest.err conftest.$ac_objext \
8681     conftest$ac_exeext conftest.$ac_ext
8682     CPPFLAGS="$am_save_CPPFLAGS"
8683
8684     if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8685       for _libs in .libs _libs; do
8686         am_save_CPPFLAGS="$CPPFLAGS"
8687         am_save_LIBS="$LIBS"
8688         CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8689         LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8690         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8691 /* end confdefs.h.  */
8692 #include <stdlib.h>
8693 #include <iconv.h>
8694 int
8695 main ()
8696 {
8697 iconv_t cd = iconv_open("","");
8698            iconv(cd,NULL,NULL,NULL,NULL);
8699            iconv_close(cd);
8700   ;
8701   return 0;
8702 }
8703 _ACEOF
8704 if ac_fn_c_try_link "$LINENO"; then :
8705   INCICONV="-I../libiconv/include"
8706           LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8707           LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8708           am_cv_lib_iconv=yes
8709           am_cv_func_iconv=yes
8710 fi
8711 rm -f core conftest.err conftest.$ac_objext \
8712     conftest$ac_exeext conftest.$ac_ext
8713         CPPFLAGS="$am_save_CPPFLAGS"
8714         LIBS="$am_save_LIBS"
8715         if test "$am_cv_func_iconv" = "yes"; then
8716           break
8717         fi
8718       done
8719     fi
8720
8721     if test "$am_cv_func_iconv" != yes; then
8722       am_save_CPPFLAGS="$CPPFLAGS"
8723       am_save_LIBS="$LIBS"
8724       CPPFLAGS="$CPPFLAGS $INCICONV"
8725       LIBS="$LIBS $LIBICONV"
8726       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8727 /* end confdefs.h.  */
8728 #include <stdlib.h>
8729 #include <iconv.h>
8730 int
8731 main ()
8732 {
8733 iconv_t cd = iconv_open("","");
8734          iconv(cd,NULL,NULL,NULL,NULL);
8735          iconv_close(cd);
8736   ;
8737   return 0;
8738 }
8739 _ACEOF
8740 if ac_fn_c_try_link "$LINENO"; then :
8741   am_cv_lib_iconv=yes
8742         am_cv_func_iconv=yes
8743 fi
8744 rm -f core conftest.err conftest.$ac_objext \
8745     conftest$ac_exeext conftest.$ac_ext
8746       CPPFLAGS="$am_save_CPPFLAGS"
8747       LIBS="$am_save_LIBS"
8748     fi
8749
8750 fi
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8752 $as_echo "$am_cv_func_iconv" >&6; }
8753   if test "$am_cv_func_iconv" = yes; then
8754
8755 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8756
8757   fi
8758   if test "$am_cv_lib_iconv" = yes; then
8759
8760   for element in $INCICONV; do
8761     haveit=
8762     for x in $CPPFLAGS; do
8763
8764   acl_save_prefix="$prefix"
8765   prefix="$acl_final_prefix"
8766   acl_save_exec_prefix="$exec_prefix"
8767   exec_prefix="$acl_final_exec_prefix"
8768   eval x=\"$x\"
8769   exec_prefix="$acl_save_exec_prefix"
8770   prefix="$acl_save_prefix"
8771
8772       if test "X$x" = "X$element"; then
8773         haveit=yes
8774         break
8775       fi
8776     done
8777     if test -z "$haveit"; then
8778       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8779     fi
8780   done
8781
8782     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8783 $as_echo_n "checking how to link with libiconv... " >&6; }
8784     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8785 $as_echo "$LIBICONV" >&6; }
8786   else
8787     LIBICONV=
8788     LTLIBICONV=
8789   fi
8790
8791
8792
8793   if test "$am_cv_func_iconv" = yes; then
8794     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8795 $as_echo_n "checking for iconv declaration... " >&6; }
8796     if ${am_cv_proto_iconv+:} false; then :
8797   $as_echo_n "(cached) " >&6
8798 else
8799
8800       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8801 /* end confdefs.h.  */
8802
8803 #include <stdlib.h>
8804 #include <iconv.h>
8805 extern
8806 #ifdef __cplusplus
8807 "C"
8808 #endif
8809 #if defined(__STDC__) || defined(__cplusplus)
8810 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8811 #else
8812 size_t iconv();
8813 #endif
8814
8815 int
8816 main ()
8817 {
8818
8819   ;
8820   return 0;
8821 }
8822 _ACEOF
8823 if ac_fn_c_try_compile "$LINENO"; then :
8824   am_cv_proto_iconv_arg1=""
8825 else
8826   am_cv_proto_iconv_arg1="const"
8827 fi
8828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8829       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);"
8830 fi
8831
8832     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8833     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8834          }$am_cv_proto_iconv" >&5
8835 $as_echo "${ac_t:-
8836          }$am_cv_proto_iconv" >&6; }
8837
8838 cat >>confdefs.h <<_ACEOF
8839 #define ICONV_CONST $am_cv_proto_iconv_arg1
8840 _ACEOF
8841
8842   fi
8843
8844
8845 # GDB may fork/exec the iconv program to get the list of supported character
8846 # sets.  Allow the user to specify where to find it.
8847 # There are several factors affecting the choice of option name:
8848 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8849 #   the build-time location of libiconv files.
8850 # - The program we need to find is iconv, which comes with glibc.  The user
8851 #   doesn't necessarily have libiconv installed.  Therefore naming this
8852 #   --with-libiconv-foo feels wrong.
8853 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8854 #   defined to work on directories not files (though it really doesn't know
8855 #   the difference).
8856 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8857 #   with --with-libiconv-prefix.
8858 # Putting these together is why the option name is --with-iconv-bin.
8859
8860
8861 # Check whether --with-iconv-bin was given.
8862 if test "${with_iconv_bin+set}" = set; then :
8863   withval=$with_iconv_bin; iconv_bin="${withval}"
8864
8865 cat >>confdefs.h <<_ACEOF
8866 #define ICONV_BIN "${iconv_bin}"
8867 _ACEOF
8868
8869
8870   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8871      if test "x$prefix" = xNONE; then
8872         test_prefix=/usr/local
8873      else
8874         test_prefix=$prefix
8875      fi
8876   else
8877      test_prefix=$exec_prefix
8878   fi
8879   value=0
8880   case ${iconv_bin} in
8881      "${test_prefix}"|"${test_prefix}/"*|\
8882         '${exec_prefix}'|'${exec_prefix}/'*)
8883      value=1
8884      ;;
8885   esac
8886
8887 cat >>confdefs.h <<_ACEOF
8888 #define ICONV_BIN_RELOCATABLE $value
8889 _ACEOF
8890
8891
8892
8893 fi
8894
8895
8896 # For the TUI, we need enhanced curses functionality.
8897 if test x"$enable_tui" != xno; then
8898   prefer_curses=yes
8899 fi
8900
8901 curses_found=no
8902 if test x"$prefer_curses" = xyes; then
8903   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8904   # curses library because the latter might not provide all the
8905   # functionality we need.  However, this leads to problems on systems
8906   # where the linker searches /usr/local/lib, but the compiler doesn't
8907   # search /usr/local/include, if ncurses is installed in /usr/local.  A
8908   # default installation of ncurses on alpha*-dec-osf* will lead to such
8909   # a situation.
8910   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8911 $as_echo_n "checking for library containing waddstr... " >&6; }
8912 if ${ac_cv_search_waddstr+:} false; then :
8913   $as_echo_n "(cached) " >&6
8914 else
8915   ac_func_search_save_LIBS=$LIBS
8916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8917 /* end confdefs.h.  */
8918
8919 /* Override any GCC internal prototype to avoid an error.
8920    Use char because int might match the return type of a GCC
8921    builtin and then its argument prototype would still apply.  */
8922 #ifdef __cplusplus
8923 extern "C"
8924 #endif
8925 char waddstr ();
8926 int
8927 main ()
8928 {
8929 return waddstr ();
8930   ;
8931   return 0;
8932 }
8933 _ACEOF
8934 for ac_lib in '' ncursesw ncurses cursesX curses; do
8935   if test -z "$ac_lib"; then
8936     ac_res="none required"
8937   else
8938     ac_res=-l$ac_lib
8939     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8940   fi
8941   if ac_fn_c_try_link "$LINENO"; then :
8942   ac_cv_search_waddstr=$ac_res
8943 fi
8944 rm -f core conftest.err conftest.$ac_objext \
8945     conftest$ac_exeext
8946   if ${ac_cv_search_waddstr+:} false; then :
8947   break
8948 fi
8949 done
8950 if ${ac_cv_search_waddstr+:} false; then :
8951
8952 else
8953   ac_cv_search_waddstr=no
8954 fi
8955 rm conftest.$ac_ext
8956 LIBS=$ac_func_search_save_LIBS
8957 fi
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8959 $as_echo "$ac_cv_search_waddstr" >&6; }
8960 ac_res=$ac_cv_search_waddstr
8961 if test "$ac_res" != no; then :
8962   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8963
8964 fi
8965
8966
8967   if test "$ac_cv_search_waddstr" != no; then
8968     curses_found=yes
8969   fi
8970 fi
8971
8972 # Check whether we should enable the TUI, but only do so if we really
8973 # can.
8974 if test x"$enable_tui" != xno; then
8975   if test -d $srcdir/tui; then
8976     if test "$curses_found" != no; then
8977       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8978       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8979       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8980       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8981     else
8982       if test x"$enable_tui" = xyes; then
8983         as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
8984       else
8985         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8986 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8987       fi
8988     fi
8989   fi
8990 fi
8991
8992 # Since GDB uses Readline, we need termcap functionality.  In many
8993 # cases this will be provided by the curses library, but some systems
8994 # have a separate termcap library, or no curses library at all.
8995
8996 case $host_os in
8997   cygwin*)
8998     if test -d $srcdir/libtermcap; then
8999       LIBS="../libtermcap/libtermcap.a $LIBS"
9000       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9001     fi ;;
9002   go32* | *djgpp*)
9003     ac_cv_search_tgetent="none required"
9004     ;;
9005 esac
9006
9007 # These are the libraries checked by Readline.
9008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9009 $as_echo_n "checking for library containing tgetent... " >&6; }
9010 if ${ac_cv_search_tgetent+:} false; then :
9011   $as_echo_n "(cached) " >&6
9012 else
9013   ac_func_search_save_LIBS=$LIBS
9014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9015 /* end confdefs.h.  */
9016
9017 /* Override any GCC internal prototype to avoid an error.
9018    Use char because int might match the return type of a GCC
9019    builtin and then its argument prototype would still apply.  */
9020 #ifdef __cplusplus
9021 extern "C"
9022 #endif
9023 char tgetent ();
9024 int
9025 main ()
9026 {
9027 return tgetent ();
9028   ;
9029   return 0;
9030 }
9031 _ACEOF
9032 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
9033   if test -z "$ac_lib"; then
9034     ac_res="none required"
9035   else
9036     ac_res=-l$ac_lib
9037     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9038   fi
9039   if ac_fn_c_try_link "$LINENO"; then :
9040   ac_cv_search_tgetent=$ac_res
9041 fi
9042 rm -f core conftest.err conftest.$ac_objext \
9043     conftest$ac_exeext
9044   if ${ac_cv_search_tgetent+:} false; then :
9045   break
9046 fi
9047 done
9048 if ${ac_cv_search_tgetent+:} false; then :
9049
9050 else
9051   ac_cv_search_tgetent=no
9052 fi
9053 rm conftest.$ac_ext
9054 LIBS=$ac_func_search_save_LIBS
9055 fi
9056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9057 $as_echo "$ac_cv_search_tgetent" >&6; }
9058 ac_res=$ac_cv_search_tgetent
9059 if test "$ac_res" != no; then :
9060   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9061
9062 fi
9063
9064
9065 if test "$ac_cv_search_tgetent" = no; then
9066   CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9067 fi
9068
9069
9070 # Check whether --with-system-readline was given.
9071 if test "${with_system_readline+set}" = set; then :
9072   withval=$with_system_readline;
9073 fi
9074
9075
9076 if test "$with_system_readline" = yes; then
9077   READLINE=-lreadline
9078   READLINE_DEPS=
9079   READLINE_CFLAGS=
9080   READLINE_TEXI_INCFLAG=
9081 else
9082   READLINE='$(READLINE_DIR)/libreadline.a'
9083   READLINE_DEPS='$(READLINE)'
9084   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9085   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9086 fi
9087
9088
9089
9090
9091
9092 # Generate jit-reader.h
9093
9094 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9095 TARGET_PTR=
9096
9097 # The cast to long int works around a bug in the HP C Compiler
9098 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9099 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9100 # This bug is HP SR number 8606223364.
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9102 $as_echo_n "checking size of unsigned long long... " >&6; }
9103 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9104   $as_echo_n "(cached) " >&6
9105 else
9106   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
9107
9108 else
9109   if test "$ac_cv_type_unsigned_long_long" = yes; then
9110      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9111 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9112 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9113 See \`config.log' for more details" "$LINENO" 5; }
9114    else
9115      ac_cv_sizeof_unsigned_long_long=0
9116    fi
9117 fi
9118
9119 fi
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9121 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9122
9123
9124
9125 cat >>confdefs.h <<_ACEOF
9126 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9127 _ACEOF
9128
9129
9130 # The cast to long int works around a bug in the HP C Compiler
9131 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9132 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9133 # This bug is HP SR number 8606223364.
9134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9135 $as_echo_n "checking size of unsigned long... " >&6; }
9136 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9137   $as_echo_n "(cached) " >&6
9138 else
9139   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
9140
9141 else
9142   if test "$ac_cv_type_unsigned_long" = yes; then
9143      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9144 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9145 as_fn_error 77 "cannot compute sizeof (unsigned long)
9146 See \`config.log' for more details" "$LINENO" 5; }
9147    else
9148      ac_cv_sizeof_unsigned_long=0
9149    fi
9150 fi
9151
9152 fi
9153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9154 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9155
9156
9157
9158 cat >>confdefs.h <<_ACEOF
9159 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9160 _ACEOF
9161
9162
9163 # The cast to long int works around a bug in the HP C Compiler
9164 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9165 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9166 # This bug is HP SR number 8606223364.
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9168 $as_echo_n "checking size of unsigned __int128... " >&6; }
9169 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9170   $as_echo_n "(cached) " >&6
9171 else
9172   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
9173
9174 else
9175   if test "$ac_cv_type_unsigned___int128" = yes; then
9176      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9177 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9178 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9179 See \`config.log' for more details" "$LINENO" 5; }
9180    else
9181      ac_cv_sizeof_unsigned___int128=0
9182    fi
9183 fi
9184
9185 fi
9186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9187 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9188
9189
9190
9191 cat >>confdefs.h <<_ACEOF
9192 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9193 _ACEOF
9194
9195
9196
9197 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9198   TARGET_PTR="unsigned long"
9199 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9200   TARGET_PTR="unsigned long long"
9201 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9202   TARGET_PTR="unsigned __int128"
9203 else
9204   TARGET_PTR="unsigned long"
9205 fi
9206
9207
9208 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9209
9210
9211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9212 $as_echo_n "checking for library containing dlopen... " >&6; }
9213 if ${ac_cv_search_dlopen+:} false; then :
9214   $as_echo_n "(cached) " >&6
9215 else
9216   ac_func_search_save_LIBS=$LIBS
9217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9218 /* end confdefs.h.  */
9219
9220 /* Override any GCC internal prototype to avoid an error.
9221    Use char because int might match the return type of a GCC
9222    builtin and then its argument prototype would still apply.  */
9223 #ifdef __cplusplus
9224 extern "C"
9225 #endif
9226 char dlopen ();
9227 int
9228 main ()
9229 {
9230 return dlopen ();
9231   ;
9232   return 0;
9233 }
9234 _ACEOF
9235 for ac_lib in '' dl; do
9236   if test -z "$ac_lib"; then
9237     ac_res="none required"
9238   else
9239     ac_res=-l$ac_lib
9240     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9241   fi
9242   if ac_fn_c_try_link "$LINENO"; then :
9243   ac_cv_search_dlopen=$ac_res
9244 fi
9245 rm -f core conftest.err conftest.$ac_objext \
9246     conftest$ac_exeext
9247   if ${ac_cv_search_dlopen+:} false; then :
9248   break
9249 fi
9250 done
9251 if ${ac_cv_search_dlopen+:} false; then :
9252
9253 else
9254   ac_cv_search_dlopen=no
9255 fi
9256 rm conftest.$ac_ext
9257 LIBS=$ac_func_search_save_LIBS
9258 fi
9259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9260 $as_echo "$ac_cv_search_dlopen" >&6; }
9261 ac_res=$ac_cv_search_dlopen
9262 if test "$ac_res" != no; then :
9263   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9264
9265 fi
9266
9267
9268
9269
9270 # Check whether --with-jit-reader-dir was given.
9271 if test "${with_jit_reader_dir+set}" = set; then :
9272   withval=$with_jit_reader_dir;
9273     JIT_READER_DIR=$withval
9274 else
9275   JIT_READER_DIR=${libdir}/gdb
9276 fi
9277
9278
9279   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9280   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9281   ac_define_dir=`eval echo $JIT_READER_DIR`
9282   ac_define_dir=`eval echo $ac_define_dir`
9283
9284 cat >>confdefs.h <<_ACEOF
9285 #define JIT_READER_DIR "$ac_define_dir"
9286 _ACEOF
9287
9288
9289
9290
9291   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9292      if test "x$prefix" = xNONE; then
9293         test_prefix=/usr/local
9294      else
9295         test_prefix=$prefix
9296      fi
9297   else
9298      test_prefix=$exec_prefix
9299   fi
9300   value=0
9301   case ${ac_define_dir} in
9302      "${test_prefix}"|"${test_prefix}/"*|\
9303         '${exec_prefix}'|'${exec_prefix}/'*)
9304      value=1
9305      ;;
9306   esac
9307
9308 cat >>confdefs.h <<_ACEOF
9309 #define JIT_READER_DIR_RELOCATABLE $value
9310 _ACEOF
9311
9312
9313
9314
9315
9316 # Check whether --with-expat was given.
9317 if test "${with_expat+set}" = set; then :
9318   withval=$with_expat;
9319 else
9320   with_expat=auto
9321 fi
9322
9323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9324 $as_echo_n "checking whether to use expat... " >&6; }
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9326 $as_echo "$with_expat" >&6; }
9327
9328 if test "${with_expat}" = no; then
9329   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9330 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9331   HAVE_LIBEXPAT=no
9332 else
9333
9334
9335
9336
9337
9338
9339
9340
9341     use_additional=yes
9342
9343   acl_save_prefix="$prefix"
9344   prefix="$acl_final_prefix"
9345   acl_save_exec_prefix="$exec_prefix"
9346   exec_prefix="$acl_final_exec_prefix"
9347
9348     eval additional_includedir=\"$includedir\"
9349     eval additional_libdir=\"$libdir\"
9350
9351   exec_prefix="$acl_save_exec_prefix"
9352   prefix="$acl_save_prefix"
9353
9354
9355 # Check whether --with-libexpat-prefix was given.
9356 if test "${with_libexpat_prefix+set}" = set; then :
9357   withval=$with_libexpat_prefix;
9358     if test "X$withval" = "Xno"; then
9359       use_additional=no
9360     else
9361       if test "X$withval" = "X"; then
9362
9363   acl_save_prefix="$prefix"
9364   prefix="$acl_final_prefix"
9365   acl_save_exec_prefix="$exec_prefix"
9366   exec_prefix="$acl_final_exec_prefix"
9367
9368           eval additional_includedir=\"$includedir\"
9369           eval additional_libdir=\"$libdir\"
9370
9371   exec_prefix="$acl_save_exec_prefix"
9372   prefix="$acl_save_prefix"
9373
9374       else
9375         additional_includedir="$withval/include"
9376         additional_libdir="$withval/lib"
9377       fi
9378     fi
9379
9380 fi
9381
9382       LIBEXPAT=
9383   LTLIBEXPAT=
9384   INCEXPAT=
9385   rpathdirs=
9386   ltrpathdirs=
9387   names_already_handled=
9388   names_next_round='expat '
9389   while test -n "$names_next_round"; do
9390     names_this_round="$names_next_round"
9391     names_next_round=
9392     for name in $names_this_round; do
9393       already_handled=
9394       for n in $names_already_handled; do
9395         if test "$n" = "$name"; then
9396           already_handled=yes
9397           break
9398         fi
9399       done
9400       if test -z "$already_handled"; then
9401         names_already_handled="$names_already_handled $name"
9402                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9403         eval value=\"\$HAVE_LIB$uppername\"
9404         if test -n "$value"; then
9405           if test "$value" = yes; then
9406             eval value=\"\$LIB$uppername\"
9407             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9408             eval value=\"\$LTLIB$uppername\"
9409             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9410           else
9411                                     :
9412           fi
9413         else
9414                               found_dir=
9415           found_la=
9416           found_so=
9417           found_a=
9418           if test $use_additional = yes; then
9419             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9420               found_dir="$additional_libdir"
9421               found_so="$additional_libdir/lib$name.$shlibext"
9422               if test -f "$additional_libdir/lib$name.la"; then
9423                 found_la="$additional_libdir/lib$name.la"
9424               fi
9425             else
9426               if test -f "$additional_libdir/lib$name.$libext"; then
9427                 found_dir="$additional_libdir"
9428                 found_a="$additional_libdir/lib$name.$libext"
9429                 if test -f "$additional_libdir/lib$name.la"; then
9430                   found_la="$additional_libdir/lib$name.la"
9431                 fi
9432               fi
9433             fi
9434           fi
9435           if test "X$found_dir" = "X"; then
9436             for x in $LDFLAGS $LTLIBEXPAT; do
9437
9438   acl_save_prefix="$prefix"
9439   prefix="$acl_final_prefix"
9440   acl_save_exec_prefix="$exec_prefix"
9441   exec_prefix="$acl_final_exec_prefix"
9442   eval x=\"$x\"
9443   exec_prefix="$acl_save_exec_prefix"
9444   prefix="$acl_save_prefix"
9445
9446               case "$x" in
9447                 -L*)
9448                   dir=`echo "X$x" | sed -e 's/^X-L//'`
9449                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9450                     found_dir="$dir"
9451                     found_so="$dir/lib$name.$shlibext"
9452                     if test -f "$dir/lib$name.la"; then
9453                       found_la="$dir/lib$name.la"
9454                     fi
9455                   else
9456                     if test -f "$dir/lib$name.$libext"; then
9457                       found_dir="$dir"
9458                       found_a="$dir/lib$name.$libext"
9459                       if test -f "$dir/lib$name.la"; then
9460                         found_la="$dir/lib$name.la"
9461                       fi
9462                     fi
9463                   fi
9464                   ;;
9465               esac
9466               if test "X$found_dir" != "X"; then
9467                 break
9468               fi
9469             done
9470           fi
9471           if test "X$found_dir" != "X"; then
9472                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9473             if test "X$found_so" != "X"; then
9474                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9475                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9476               else
9477                                                                                 haveit=
9478                 for x in $ltrpathdirs; do
9479                   if test "X$x" = "X$found_dir"; then
9480                     haveit=yes
9481                     break
9482                   fi
9483                 done
9484                 if test -z "$haveit"; then
9485                   ltrpathdirs="$ltrpathdirs $found_dir"
9486                 fi
9487                                 if test "$hardcode_direct" = yes; then
9488                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9489                 else
9490                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9491                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9492                                                             haveit=
9493                     for x in $rpathdirs; do
9494                       if test "X$x" = "X$found_dir"; then
9495                         haveit=yes
9496                         break
9497                       fi
9498                     done
9499                     if test -z "$haveit"; then
9500                       rpathdirs="$rpathdirs $found_dir"
9501                     fi
9502                   else
9503                                                                                 haveit=
9504                     for x in $LDFLAGS $LIBEXPAT; do
9505
9506   acl_save_prefix="$prefix"
9507   prefix="$acl_final_prefix"
9508   acl_save_exec_prefix="$exec_prefix"
9509   exec_prefix="$acl_final_exec_prefix"
9510   eval x=\"$x\"
9511   exec_prefix="$acl_save_exec_prefix"
9512   prefix="$acl_save_prefix"
9513
9514                       if test "X$x" = "X-L$found_dir"; then
9515                         haveit=yes
9516                         break
9517                       fi
9518                     done
9519                     if test -z "$haveit"; then
9520                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9521                     fi
9522                     if test "$hardcode_minus_L" != no; then
9523                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9524                     else
9525                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9526                     fi
9527                   fi
9528                 fi
9529               fi
9530             else
9531               if test "X$found_a" != "X"; then
9532                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9533               else
9534                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9535               fi
9536             fi
9537                         additional_includedir=
9538             case "$found_dir" in
9539               */lib | */lib/)
9540                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9541                 additional_includedir="$basedir/include"
9542                 ;;
9543             esac
9544             if test "X$additional_includedir" != "X"; then
9545                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
9546                 haveit=
9547                 if test "X$additional_includedir" = "X/usr/local/include"; then
9548                   if test -n "$GCC"; then
9549                     case $host_os in
9550                       linux*) haveit=yes;;
9551                     esac
9552                   fi
9553                 fi
9554                 if test -z "$haveit"; then
9555                   for x in $CPPFLAGS $INCEXPAT; do
9556
9557   acl_save_prefix="$prefix"
9558   prefix="$acl_final_prefix"
9559   acl_save_exec_prefix="$exec_prefix"
9560   exec_prefix="$acl_final_exec_prefix"
9561   eval x=\"$x\"
9562   exec_prefix="$acl_save_exec_prefix"
9563   prefix="$acl_save_prefix"
9564
9565                     if test "X$x" = "X-I$additional_includedir"; then
9566                       haveit=yes
9567                       break
9568                     fi
9569                   done
9570                   if test -z "$haveit"; then
9571                     if test -d "$additional_includedir"; then
9572                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9573                     fi
9574                   fi
9575                 fi
9576               fi
9577             fi
9578                         if test -n "$found_la"; then
9579                                                         save_libdir="$libdir"
9580               case "$found_la" in
9581                 */* | *\\*) . "$found_la" ;;
9582                 *) . "./$found_la" ;;
9583               esac
9584               libdir="$save_libdir"
9585                             for dep in $dependency_libs; do
9586                 case "$dep" in
9587                   -L*)
9588                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9589                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
9590                       haveit=
9591                       if test "X$additional_libdir" = "X/usr/local/lib"; then
9592                         if test -n "$GCC"; then
9593                           case $host_os in
9594                             linux*) haveit=yes;;
9595                           esac
9596                         fi
9597                       fi
9598                       if test -z "$haveit"; then
9599                         haveit=
9600                         for x in $LDFLAGS $LIBEXPAT; do
9601
9602   acl_save_prefix="$prefix"
9603   prefix="$acl_final_prefix"
9604   acl_save_exec_prefix="$exec_prefix"
9605   exec_prefix="$acl_final_exec_prefix"
9606   eval x=\"$x\"
9607   exec_prefix="$acl_save_exec_prefix"
9608   prefix="$acl_save_prefix"
9609
9610                           if test "X$x" = "X-L$additional_libdir"; then
9611                             haveit=yes
9612                             break
9613                           fi
9614                         done
9615                         if test -z "$haveit"; then
9616                           if test -d "$additional_libdir"; then
9617                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9618                           fi
9619                         fi
9620                         haveit=
9621                         for x in $LDFLAGS $LTLIBEXPAT; do
9622
9623   acl_save_prefix="$prefix"
9624   prefix="$acl_final_prefix"
9625   acl_save_exec_prefix="$exec_prefix"
9626   exec_prefix="$acl_final_exec_prefix"
9627   eval x=\"$x\"
9628   exec_prefix="$acl_save_exec_prefix"
9629   prefix="$acl_save_prefix"
9630
9631                           if test "X$x" = "X-L$additional_libdir"; then
9632                             haveit=yes
9633                             break
9634                           fi
9635                         done
9636                         if test -z "$haveit"; then
9637                           if test -d "$additional_libdir"; then
9638                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9639                           fi
9640                         fi
9641                       fi
9642                     fi
9643                     ;;
9644                   -R*)
9645                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
9646                     if test "$enable_rpath" != no; then
9647                                                                   haveit=
9648                       for x in $rpathdirs; do
9649                         if test "X$x" = "X$dir"; then
9650                           haveit=yes
9651                           break
9652                         fi
9653                       done
9654                       if test -z "$haveit"; then
9655                         rpathdirs="$rpathdirs $dir"
9656                       fi
9657                                                                   haveit=
9658                       for x in $ltrpathdirs; do
9659                         if test "X$x" = "X$dir"; then
9660                           haveit=yes
9661                           break
9662                         fi
9663                       done
9664                       if test -z "$haveit"; then
9665                         ltrpathdirs="$ltrpathdirs $dir"
9666                       fi
9667                     fi
9668                     ;;
9669                   -l*)
9670                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9671                     ;;
9672                   *.la)
9673                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9674                     ;;
9675                   *)
9676                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9677                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9678                     ;;
9679                 esac
9680               done
9681             fi
9682           else
9683                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9684             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9685           fi
9686         fi
9687       fi
9688     done
9689   done
9690   if test "X$rpathdirs" != "X"; then
9691     if test -n "$hardcode_libdir_separator"; then
9692                         alldirs=
9693       for found_dir in $rpathdirs; do
9694         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9695       done
9696             acl_save_libdir="$libdir"
9697       libdir="$alldirs"
9698       eval flag=\"$hardcode_libdir_flag_spec\"
9699       libdir="$acl_save_libdir"
9700       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9701     else
9702             for found_dir in $rpathdirs; do
9703         acl_save_libdir="$libdir"
9704         libdir="$found_dir"
9705         eval flag=\"$hardcode_libdir_flag_spec\"
9706         libdir="$acl_save_libdir"
9707         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9708       done
9709     fi
9710   fi
9711   if test "X$ltrpathdirs" != "X"; then
9712             for found_dir in $ltrpathdirs; do
9713       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9714     done
9715   fi
9716
9717
9718         ac_save_CPPFLAGS="$CPPFLAGS"
9719
9720   for element in $INCEXPAT; do
9721     haveit=
9722     for x in $CPPFLAGS; do
9723
9724   acl_save_prefix="$prefix"
9725   prefix="$acl_final_prefix"
9726   acl_save_exec_prefix="$exec_prefix"
9727   exec_prefix="$acl_final_exec_prefix"
9728   eval x=\"$x\"
9729   exec_prefix="$acl_save_exec_prefix"
9730   prefix="$acl_save_prefix"
9731
9732       if test "X$x" = "X$element"; then
9733         haveit=yes
9734         break
9735       fi
9736     done
9737     if test -z "$haveit"; then
9738       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9739     fi
9740   done
9741
9742
9743   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9744 $as_echo_n "checking for libexpat... " >&6; }
9745 if ${ac_cv_libexpat+:} false; then :
9746   $as_echo_n "(cached) " >&6
9747 else
9748
9749     ac_save_LIBS="$LIBS"
9750     LIBS="$LIBS $LIBEXPAT"
9751     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9752 /* end confdefs.h.  */
9753 #include "expat.h"
9754 int
9755 main ()
9756 {
9757 XML_Parser p = XML_ParserCreate (0);
9758   ;
9759   return 0;
9760 }
9761 _ACEOF
9762 if ac_fn_c_try_link "$LINENO"; then :
9763   ac_cv_libexpat=yes
9764 else
9765   ac_cv_libexpat=no
9766 fi
9767 rm -f core conftest.err conftest.$ac_objext \
9768     conftest$ac_exeext conftest.$ac_ext
9769     LIBS="$ac_save_LIBS"
9770
9771 fi
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9773 $as_echo "$ac_cv_libexpat" >&6; }
9774   if test "$ac_cv_libexpat" = yes; then
9775     HAVE_LIBEXPAT=yes
9776
9777 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9778
9779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9780 $as_echo_n "checking how to link with libexpat... " >&6; }
9781     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9782 $as_echo "$LIBEXPAT" >&6; }
9783   else
9784     HAVE_LIBEXPAT=no
9785             CPPFLAGS="$ac_save_CPPFLAGS"
9786     LIBEXPAT=
9787     LTLIBEXPAT=
9788   fi
9789
9790
9791
9792
9793
9794
9795   if test "$HAVE_LIBEXPAT" != yes; then
9796     if test "$with_expat" = yes; then
9797       as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9798     else
9799       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9800 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9801     fi
9802   else
9803     save_LIBS=$LIBS
9804     LIBS="$LIBS $LIBEXPAT"
9805     for ac_func in XML_StopParser
9806 do :
9807   ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9808 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
9809   cat >>confdefs.h <<_ACEOF
9810 #define HAVE_XML_STOPPARSER 1
9811 _ACEOF
9812
9813 fi
9814 done
9815
9816     LIBS=$save_LIBS
9817   fi
9818 fi
9819
9820
9821 # Check whether --with-mpfr was given.
9822 if test "${with_mpfr+set}" = set; then :
9823   withval=$with_mpfr;
9824 else
9825   with_mpfr=auto
9826 fi
9827
9828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9829 $as_echo_n "checking whether to use MPFR... " >&6; }
9830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9831 $as_echo "$with_mpfr" >&6; }
9832
9833 if test "${with_mpfr}" = no; then
9834   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9835 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9836   HAVE_LIBMPFR=no
9837 else
9838
9839
9840
9841
9842
9843
9844
9845
9846     use_additional=yes
9847
9848   acl_save_prefix="$prefix"
9849   prefix="$acl_final_prefix"
9850   acl_save_exec_prefix="$exec_prefix"
9851   exec_prefix="$acl_final_exec_prefix"
9852
9853     eval additional_includedir=\"$includedir\"
9854     eval additional_libdir=\"$libdir\"
9855
9856   exec_prefix="$acl_save_exec_prefix"
9857   prefix="$acl_save_prefix"
9858
9859
9860 # Check whether --with-libmpfr-prefix was given.
9861 if test "${with_libmpfr_prefix+set}" = set; then :
9862   withval=$with_libmpfr_prefix;
9863     if test "X$withval" = "Xno"; then
9864       use_additional=no
9865     else
9866       if test "X$withval" = "X"; then
9867
9868   acl_save_prefix="$prefix"
9869   prefix="$acl_final_prefix"
9870   acl_save_exec_prefix="$exec_prefix"
9871   exec_prefix="$acl_final_exec_prefix"
9872
9873           eval additional_includedir=\"$includedir\"
9874           eval additional_libdir=\"$libdir\"
9875
9876   exec_prefix="$acl_save_exec_prefix"
9877   prefix="$acl_save_prefix"
9878
9879       else
9880         additional_includedir="$withval/include"
9881         additional_libdir="$withval/lib"
9882       fi
9883     fi
9884
9885 fi
9886
9887       LIBMPFR=
9888   LTLIBMPFR=
9889   INCMPFR=
9890   rpathdirs=
9891   ltrpathdirs=
9892   names_already_handled=
9893   names_next_round='mpfr gmp'
9894   while test -n "$names_next_round"; do
9895     names_this_round="$names_next_round"
9896     names_next_round=
9897     for name in $names_this_round; do
9898       already_handled=
9899       for n in $names_already_handled; do
9900         if test "$n" = "$name"; then
9901           already_handled=yes
9902           break
9903         fi
9904       done
9905       if test -z "$already_handled"; then
9906         names_already_handled="$names_already_handled $name"
9907                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9908         eval value=\"\$HAVE_LIB$uppername\"
9909         if test -n "$value"; then
9910           if test "$value" = yes; then
9911             eval value=\"\$LIB$uppername\"
9912             test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9913             eval value=\"\$LTLIB$uppername\"
9914             test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9915           else
9916                                     :
9917           fi
9918         else
9919                               found_dir=
9920           found_la=
9921           found_so=
9922           found_a=
9923           if test $use_additional = yes; then
9924             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9925               found_dir="$additional_libdir"
9926               found_so="$additional_libdir/lib$name.$shlibext"
9927               if test -f "$additional_libdir/lib$name.la"; then
9928                 found_la="$additional_libdir/lib$name.la"
9929               fi
9930             else
9931               if test -f "$additional_libdir/lib$name.$libext"; then
9932                 found_dir="$additional_libdir"
9933                 found_a="$additional_libdir/lib$name.$libext"
9934                 if test -f "$additional_libdir/lib$name.la"; then
9935                   found_la="$additional_libdir/lib$name.la"
9936                 fi
9937               fi
9938             fi
9939           fi
9940           if test "X$found_dir" = "X"; then
9941             for x in $LDFLAGS $LTLIBMPFR; do
9942
9943   acl_save_prefix="$prefix"
9944   prefix="$acl_final_prefix"
9945   acl_save_exec_prefix="$exec_prefix"
9946   exec_prefix="$acl_final_exec_prefix"
9947   eval x=\"$x\"
9948   exec_prefix="$acl_save_exec_prefix"
9949   prefix="$acl_save_prefix"
9950
9951               case "$x" in
9952                 -L*)
9953                   dir=`echo "X$x" | sed -e 's/^X-L//'`
9954                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9955                     found_dir="$dir"
9956                     found_so="$dir/lib$name.$shlibext"
9957                     if test -f "$dir/lib$name.la"; then
9958                       found_la="$dir/lib$name.la"
9959                     fi
9960                   else
9961                     if test -f "$dir/lib$name.$libext"; then
9962                       found_dir="$dir"
9963                       found_a="$dir/lib$name.$libext"
9964                       if test -f "$dir/lib$name.la"; then
9965                         found_la="$dir/lib$name.la"
9966                       fi
9967                     fi
9968                   fi
9969                   ;;
9970               esac
9971               if test "X$found_dir" != "X"; then
9972                 break
9973               fi
9974             done
9975           fi
9976           if test "X$found_dir" != "X"; then
9977                         LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9978             if test "X$found_so" != "X"; then
9979                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9980                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9981               else
9982                                                                                 haveit=
9983                 for x in $ltrpathdirs; do
9984                   if test "X$x" = "X$found_dir"; then
9985                     haveit=yes
9986                     break
9987                   fi
9988                 done
9989                 if test -z "$haveit"; then
9990                   ltrpathdirs="$ltrpathdirs $found_dir"
9991                 fi
9992                                 if test "$hardcode_direct" = yes; then
9993                                                       LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9994                 else
9995                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9996                                                             LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9997                                                             haveit=
9998                     for x in $rpathdirs; do
9999                       if test "X$x" = "X$found_dir"; then
10000                         haveit=yes
10001                         break
10002                       fi
10003                     done
10004                     if test -z "$haveit"; then
10005                       rpathdirs="$rpathdirs $found_dir"
10006                     fi
10007                   else
10008                                                                                 haveit=
10009                     for x in $LDFLAGS $LIBMPFR; do
10010
10011   acl_save_prefix="$prefix"
10012   prefix="$acl_final_prefix"
10013   acl_save_exec_prefix="$exec_prefix"
10014   exec_prefix="$acl_final_exec_prefix"
10015   eval x=\"$x\"
10016   exec_prefix="$acl_save_exec_prefix"
10017   prefix="$acl_save_prefix"
10018
10019                       if test "X$x" = "X-L$found_dir"; then
10020                         haveit=yes
10021                         break
10022                       fi
10023                     done
10024                     if test -z "$haveit"; then
10025                       LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10026                     fi
10027                     if test "$hardcode_minus_L" != no; then
10028                                                                                         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10029                     else
10030                                                                                                                                                                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10031                     fi
10032                   fi
10033                 fi
10034               fi
10035             else
10036               if test "X$found_a" != "X"; then
10037                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10038               else
10039                                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10040               fi
10041             fi
10042                         additional_includedir=
10043             case "$found_dir" in
10044               */lib | */lib/)
10045                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10046                 additional_includedir="$basedir/include"
10047                 ;;
10048             esac
10049             if test "X$additional_includedir" != "X"; then
10050                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
10051                 haveit=
10052                 if test "X$additional_includedir" = "X/usr/local/include"; then
10053                   if test -n "$GCC"; then
10054                     case $host_os in
10055                       linux*) haveit=yes;;
10056                     esac
10057                   fi
10058                 fi
10059                 if test -z "$haveit"; then
10060                   for x in $CPPFLAGS $INCMPFR; do
10061
10062   acl_save_prefix="$prefix"
10063   prefix="$acl_final_prefix"
10064   acl_save_exec_prefix="$exec_prefix"
10065   exec_prefix="$acl_final_exec_prefix"
10066   eval x=\"$x\"
10067   exec_prefix="$acl_save_exec_prefix"
10068   prefix="$acl_save_prefix"
10069
10070                     if test "X$x" = "X-I$additional_includedir"; then
10071                       haveit=yes
10072                       break
10073                     fi
10074                   done
10075                   if test -z "$haveit"; then
10076                     if test -d "$additional_includedir"; then
10077                                             INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10078                     fi
10079                   fi
10080                 fi
10081               fi
10082             fi
10083                         if test -n "$found_la"; then
10084                                                         save_libdir="$libdir"
10085               case "$found_la" in
10086                 */* | *\\*) . "$found_la" ;;
10087                 *) . "./$found_la" ;;
10088               esac
10089               libdir="$save_libdir"
10090                             for dep in $dependency_libs; do
10091                 case "$dep" in
10092                   -L*)
10093                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10094                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
10095                       haveit=
10096                       if test "X$additional_libdir" = "X/usr/local/lib"; then
10097                         if test -n "$GCC"; then
10098                           case $host_os in
10099                             linux*) haveit=yes;;
10100                           esac
10101                         fi
10102                       fi
10103                       if test -z "$haveit"; then
10104                         haveit=
10105                         for x in $LDFLAGS $LIBMPFR; do
10106
10107   acl_save_prefix="$prefix"
10108   prefix="$acl_final_prefix"
10109   acl_save_exec_prefix="$exec_prefix"
10110   exec_prefix="$acl_final_exec_prefix"
10111   eval x=\"$x\"
10112   exec_prefix="$acl_save_exec_prefix"
10113   prefix="$acl_save_prefix"
10114
10115                           if test "X$x" = "X-L$additional_libdir"; then
10116                             haveit=yes
10117                             break
10118                           fi
10119                         done
10120                         if test -z "$haveit"; then
10121                           if test -d "$additional_libdir"; then
10122                                                         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10123                           fi
10124                         fi
10125                         haveit=
10126                         for x in $LDFLAGS $LTLIBMPFR; do
10127
10128   acl_save_prefix="$prefix"
10129   prefix="$acl_final_prefix"
10130   acl_save_exec_prefix="$exec_prefix"
10131   exec_prefix="$acl_final_exec_prefix"
10132   eval x=\"$x\"
10133   exec_prefix="$acl_save_exec_prefix"
10134   prefix="$acl_save_prefix"
10135
10136                           if test "X$x" = "X-L$additional_libdir"; then
10137                             haveit=yes
10138                             break
10139                           fi
10140                         done
10141                         if test -z "$haveit"; then
10142                           if test -d "$additional_libdir"; then
10143                                                         LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10144                           fi
10145                         fi
10146                       fi
10147                     fi
10148                     ;;
10149                   -R*)
10150                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
10151                     if test "$enable_rpath" != no; then
10152                                                                   haveit=
10153                       for x in $rpathdirs; do
10154                         if test "X$x" = "X$dir"; then
10155                           haveit=yes
10156                           break
10157                         fi
10158                       done
10159                       if test -z "$haveit"; then
10160                         rpathdirs="$rpathdirs $dir"
10161                       fi
10162                                                                   haveit=
10163                       for x in $ltrpathdirs; do
10164                         if test "X$x" = "X$dir"; then
10165                           haveit=yes
10166                           break
10167                         fi
10168                       done
10169                       if test -z "$haveit"; then
10170                         ltrpathdirs="$ltrpathdirs $dir"
10171                       fi
10172                     fi
10173                     ;;
10174                   -l*)
10175                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10176                     ;;
10177                   *.la)
10178                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10179                     ;;
10180                   *)
10181                                         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10182                     LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10183                     ;;
10184                 esac
10185               done
10186             fi
10187           else
10188                                                             LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10189             LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10190           fi
10191         fi
10192       fi
10193     done
10194   done
10195   if test "X$rpathdirs" != "X"; then
10196     if test -n "$hardcode_libdir_separator"; then
10197                         alldirs=
10198       for found_dir in $rpathdirs; do
10199         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10200       done
10201             acl_save_libdir="$libdir"
10202       libdir="$alldirs"
10203       eval flag=\"$hardcode_libdir_flag_spec\"
10204       libdir="$acl_save_libdir"
10205       LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10206     else
10207             for found_dir in $rpathdirs; do
10208         acl_save_libdir="$libdir"
10209         libdir="$found_dir"
10210         eval flag=\"$hardcode_libdir_flag_spec\"
10211         libdir="$acl_save_libdir"
10212         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10213       done
10214     fi
10215   fi
10216   if test "X$ltrpathdirs" != "X"; then
10217             for found_dir in $ltrpathdirs; do
10218       LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10219     done
10220   fi
10221
10222
10223         ac_save_CPPFLAGS="$CPPFLAGS"
10224
10225   for element in $INCMPFR; do
10226     haveit=
10227     for x in $CPPFLAGS; do
10228
10229   acl_save_prefix="$prefix"
10230   prefix="$acl_final_prefix"
10231   acl_save_exec_prefix="$exec_prefix"
10232   exec_prefix="$acl_final_exec_prefix"
10233   eval x=\"$x\"
10234   exec_prefix="$acl_save_exec_prefix"
10235   prefix="$acl_save_prefix"
10236
10237       if test "X$x" = "X$element"; then
10238         haveit=yes
10239         break
10240       fi
10241     done
10242     if test -z "$haveit"; then
10243       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10244     fi
10245   done
10246
10247
10248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10249 $as_echo_n "checking for libmpfr... " >&6; }
10250 if ${ac_cv_libmpfr+:} false; then :
10251   $as_echo_n "(cached) " >&6
10252 else
10253
10254     ac_save_LIBS="$LIBS"
10255     LIBS="$LIBS $LIBMPFR"
10256     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10257 /* end confdefs.h.  */
10258 #include <mpfr.h>
10259 int
10260 main ()
10261 {
10262 mpfr_exp_t exp; mpfr_t x;
10263                          mpfr_frexp (&exp, x, x, MPFR_RNDN);
10264   ;
10265   return 0;
10266 }
10267 _ACEOF
10268 if ac_fn_c_try_link "$LINENO"; then :
10269   ac_cv_libmpfr=yes
10270 else
10271   ac_cv_libmpfr=no
10272 fi
10273 rm -f core conftest.err conftest.$ac_objext \
10274     conftest$ac_exeext conftest.$ac_ext
10275     LIBS="$ac_save_LIBS"
10276
10277 fi
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10279 $as_echo "$ac_cv_libmpfr" >&6; }
10280   if test "$ac_cv_libmpfr" = yes; then
10281     HAVE_LIBMPFR=yes
10282
10283 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10284
10285     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10286 $as_echo_n "checking how to link with libmpfr... " >&6; }
10287     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10288 $as_echo "$LIBMPFR" >&6; }
10289   else
10290     HAVE_LIBMPFR=no
10291             CPPFLAGS="$ac_save_CPPFLAGS"
10292     LIBMPFR=
10293     LTLIBMPFR=
10294   fi
10295
10296
10297
10298
10299
10300
10301   if test "$HAVE_LIBMPFR" != yes; then
10302     if test "$with_mpfr" = yes; then
10303       as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10304     else
10305       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10306 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10307     fi
10308   fi
10309 fi
10310
10311 # --------------------- #
10312 # Check for libpython.  #
10313 # --------------------- #
10314
10315
10316
10317
10318
10319
10320 # Check whether --with-python was given.
10321 if test "${with_python+set}" = set; then :
10322   withval=$with_python;
10323 else
10324   with_python=auto
10325 fi
10326
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10328 $as_echo_n "checking whether to use python... " >&6; }
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10330 $as_echo "$with_python" >&6; }
10331
10332 if test "${with_python}" = no; then
10333   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10334 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10335   have_libpython=no
10336 else
10337   case "${with_python}" in
10338   [\\/]* | ?:[\\/]*)
10339     if test -d ${with_python}; then
10340       # Assume the python binary is ${with_python}/bin/python.
10341       python_prog="${with_python}/bin/python"
10342       python_prefix=
10343       # If python does not exit ${with_python}/bin, then try in
10344       # ${with_python}.  On Windows/MinGW, this is where the Python
10345       # executable is.
10346       if test ! -x "${python_prog}"; then
10347         python_prog="${with_python}/python"
10348         python_prefix=
10349       fi
10350       if test ! -x "${python_prog}"; then
10351         # Fall back to gdb 7.0/7.1 behaviour.
10352         python_prog=missing
10353         python_prefix=${with_python}
10354       fi
10355     elif test -x "${with_python}"; then
10356       # While we can't run python compiled for $host (unless host == build),
10357       # the user could write a script that provides the needed information,
10358       # so we support that.
10359       python_prog=${with_python}
10360       python_prefix=
10361     else
10362       as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10363     fi
10364     ;;
10365   */*)
10366     # Disallow --with-python=foo/bar.
10367     as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10368     ;;
10369   *)
10370     # The user has either specified auto, yes, or the name of the python
10371     # program assumed to be in $PATH.
10372     python_prefix=
10373     case "${with_python}" in
10374     yes | auto)
10375       if test ${build} = ${host}; then
10376         # Extract the first word of "python", so it can be a program name with args.
10377 set dummy python; ac_word=$2
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10379 $as_echo_n "checking for $ac_word... " >&6; }
10380 if ${ac_cv_path_python_prog_path+:} false; then :
10381   $as_echo_n "(cached) " >&6
10382 else
10383   case $python_prog_path in
10384   [\\/]* | ?:[\\/]*)
10385   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10386   ;;
10387   *)
10388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10389 for as_dir in $PATH
10390 do
10391   IFS=$as_save_IFS
10392   test -z "$as_dir" && as_dir=.
10393     for ac_exec_ext in '' $ac_executable_extensions; do
10394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10395     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10397     break 2
10398   fi
10399 done
10400   done
10401 IFS=$as_save_IFS
10402
10403   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10404   ;;
10405 esac
10406 fi
10407 python_prog_path=$ac_cv_path_python_prog_path
10408 if test -n "$python_prog_path"; then
10409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10410 $as_echo "$python_prog_path" >&6; }
10411 else
10412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413 $as_echo "no" >&6; }
10414 fi
10415
10416
10417         if test "${python_prog_path}" = missing; then
10418           python_prog=missing
10419         else
10420           python_prog=${python_prog_path}
10421         fi
10422       else
10423         # Not much we can do except assume the cross-compiler will find the
10424         # right files.
10425         python_prog=missing
10426       fi
10427       ;;
10428     *)
10429       # While we can't run python compiled for $host (unless host == build),
10430       # the user could write a script that provides the needed information,
10431       # so we support that.
10432       python_prog="${with_python}"
10433       # Extract the first word of "${python_prog}", so it can be a program name with args.
10434 set dummy ${python_prog}; ac_word=$2
10435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10436 $as_echo_n "checking for $ac_word... " >&6; }
10437 if ${ac_cv_path_python_prog_path+:} false; then :
10438   $as_echo_n "(cached) " >&6
10439 else
10440   case $python_prog_path in
10441   [\\/]* | ?:[\\/]*)
10442   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10443   ;;
10444   *)
10445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10446 for as_dir in $PATH
10447 do
10448   IFS=$as_save_IFS
10449   test -z "$as_dir" && as_dir=.
10450     for ac_exec_ext in '' $ac_executable_extensions; do
10451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10452     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10454     break 2
10455   fi
10456 done
10457   done
10458 IFS=$as_save_IFS
10459
10460   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10461   ;;
10462 esac
10463 fi
10464 python_prog_path=$ac_cv_path_python_prog_path
10465 if test -n "$python_prog_path"; then
10466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10467 $as_echo "$python_prog_path" >&6; }
10468 else
10469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10470 $as_echo "no" >&6; }
10471 fi
10472
10473
10474       if test "${python_prog_path}" = missing; then
10475         as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10476       fi
10477       ;;
10478     esac
10479   esac
10480
10481   if test "${python_prog}" != missing; then
10482     # We have a python program to use, but it may be too old.
10483     # Don't flag an error for --with-python=auto (the default).
10484     have_python_config=yes
10485     python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10486     if test $? != 0; then
10487       have_python_config=failed
10488       if test "${with_python}" != auto; then
10489         as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10490       fi
10491     fi
10492     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10493     if test $? != 0; then
10494       have_python_config=failed
10495       if test "${with_python}" != auto; then
10496         as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10497       fi
10498     fi
10499     python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10500     if test $? != 0; then
10501       have_python_config=failed
10502       if test "${with_python}" != auto; then
10503         as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10504       fi
10505     fi
10506   else
10507     # We do not have a python executable we can use to determine where
10508     # to find the Python headers and libs.  We cannot guess the include
10509     # path from the python_prefix either, because that include path
10510     # depends on the Python version.  So, there is nothing much we can
10511     # do except assume that the compiler will be able to find those files.
10512     python_includes=
10513     python_libs=
10514     have_python_config=no
10515   fi
10516
10517   # If we have python-config, only try the configuration it provides.
10518   # Otherwise fallback on the old way of trying different versions of
10519   # python in turn.
10520
10521   have_libpython=no
10522   if test "${have_python_config}" = yes; then
10523     # Determine the Python version by extracting "-lpython<version>"
10524     # part of the python_libs. <version> is usually X.Y with X and Y
10525     # being decimal numbers, but can also be XY (seen on Windows).
10526     #
10527     # The extraction is performed using sed with a regular expression.
10528     # Initially, the regexp used was using the '?' quantifier to make
10529     # the dot in the version number optional.  Unfortunately, this
10530     # does not work with non-GNU versions of sed because, because of
10531     # what looks like a limitation (the '?' quantifier does not work
10532     # with back-references).  We work around this limitation by using
10533     # the '*' quantifier instead.  It means that, in theory, we might
10534     # match unexpected version strings such as "-lpython2..7", but
10535     # this seems unlikely in practice.  And even if that happens,
10536     # an error will be triggered later on, when checking that version
10537     # number.
10538     python_version=`echo " ${python_libs} " \
10539                          | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
10540     case "${python_version}" in
10541     python*)
10542
10543   version=${python_version}
10544
10545   new_CPPFLAGS=${python_includes}
10546   new_LIBS=${python_libs}
10547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10548 $as_echo_n "checking for ${version}... " >&6; }
10549   save_CPPFLAGS=$CPPFLAGS
10550   save_LIBS=$LIBS
10551   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10552   LIBS="$new_LIBS $LIBS"
10553   found_usable_python=no
10554   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10555 /* end confdefs.h.  */
10556 #include "Python.h"
10557 int
10558 main ()
10559 {
10560 Py_Initialize ();
10561   ;
10562   return 0;
10563 }
10564 _ACEOF
10565 if ac_fn_c_try_link "$LINENO"; then :
10566   have_libpython=${version}
10567                   found_usable_python=yes
10568                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10569                   PYTHON_LIBS=$new_LIBS
10570 fi
10571 rm -f core conftest.err conftest.$ac_objext \
10572     conftest$ac_exeext conftest.$ac_ext
10573   CPPFLAGS=$save_CPPFLAGS
10574   LIBS=$save_LIBS
10575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10576 $as_echo "${found_usable_python}" >&6; }
10577
10578       ;;
10579     *)
10580       as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
10581       ;;
10582     esac
10583   elif test "${have_python_config}" != failed; then
10584     if test "${have_libpython}" = no; then
10585
10586   version=python2.7
10587
10588   new_CPPFLAGS=${python_includes}
10589   new_LIBS="-lpython2.7 ${python_libs}"
10590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10591 $as_echo_n "checking for ${version}... " >&6; }
10592   save_CPPFLAGS=$CPPFLAGS
10593   save_LIBS=$LIBS
10594   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10595   LIBS="$new_LIBS $LIBS"
10596   found_usable_python=no
10597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10598 /* end confdefs.h.  */
10599 #include "Python.h"
10600 int
10601 main ()
10602 {
10603 Py_Initialize ();
10604   ;
10605   return 0;
10606 }
10607 _ACEOF
10608 if ac_fn_c_try_link "$LINENO"; then :
10609   have_libpython=${version}
10610                   found_usable_python=yes
10611                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10612                   PYTHON_LIBS=$new_LIBS
10613 fi
10614 rm -f core conftest.err conftest.$ac_objext \
10615     conftest$ac_exeext conftest.$ac_ext
10616   CPPFLAGS=$save_CPPFLAGS
10617   LIBS=$save_LIBS
10618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10619 $as_echo "${found_usable_python}" >&6; }
10620
10621     fi
10622     if test "${have_libpython}" = no; then
10623
10624   version=python2.6
10625
10626   new_CPPFLAGS=${python_includes}
10627   new_LIBS="-lpython2.6 ${python_libs}"
10628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10629 $as_echo_n "checking for ${version}... " >&6; }
10630   save_CPPFLAGS=$CPPFLAGS
10631   save_LIBS=$LIBS
10632   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10633   LIBS="$new_LIBS $LIBS"
10634   found_usable_python=no
10635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10636 /* end confdefs.h.  */
10637 #include "Python.h"
10638 int
10639 main ()
10640 {
10641 Py_Initialize ();
10642   ;
10643   return 0;
10644 }
10645 _ACEOF
10646 if ac_fn_c_try_link "$LINENO"; then :
10647   have_libpython=${version}
10648                   found_usable_python=yes
10649                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10650                   PYTHON_LIBS=$new_LIBS
10651 fi
10652 rm -f core conftest.err conftest.$ac_objext \
10653     conftest$ac_exeext conftest.$ac_ext
10654   CPPFLAGS=$save_CPPFLAGS
10655   LIBS=$save_LIBS
10656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10657 $as_echo "${found_usable_python}" >&6; }
10658
10659     fi
10660     if test ${have_libpython} = no; then
10661
10662   version=python2.5
10663
10664   new_CPPFLAGS=${python_includes}
10665   new_LIBS="-lpython2.5 ${python_libs}"
10666   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10667 $as_echo_n "checking for ${version}... " >&6; }
10668   save_CPPFLAGS=$CPPFLAGS
10669   save_LIBS=$LIBS
10670   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10671   LIBS="$new_LIBS $LIBS"
10672   found_usable_python=no
10673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10674 /* end confdefs.h.  */
10675 #include "Python.h"
10676 int
10677 main ()
10678 {
10679 Py_Initialize ();
10680   ;
10681   return 0;
10682 }
10683 _ACEOF
10684 if ac_fn_c_try_link "$LINENO"; then :
10685   have_libpython=${version}
10686                   found_usable_python=yes
10687                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10688                   PYTHON_LIBS=$new_LIBS
10689 fi
10690 rm -f core conftest.err conftest.$ac_objext \
10691     conftest$ac_exeext conftest.$ac_ext
10692   CPPFLAGS=$save_CPPFLAGS
10693   LIBS=$save_LIBS
10694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10695 $as_echo "${found_usable_python}" >&6; }
10696
10697     fi
10698     if test ${have_libpython} = no; then
10699
10700   version=python2.4
10701
10702   new_CPPFLAGS=${python_includes}
10703   new_LIBS="-lpython2.4 ${python_libs}"
10704   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10705 $as_echo_n "checking for ${version}... " >&6; }
10706   save_CPPFLAGS=$CPPFLAGS
10707   save_LIBS=$LIBS
10708   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10709   LIBS="$new_LIBS $LIBS"
10710   found_usable_python=no
10711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10712 /* end confdefs.h.  */
10713 #include "Python.h"
10714 int
10715 main ()
10716 {
10717 Py_Initialize ();
10718   ;
10719   return 0;
10720 }
10721 _ACEOF
10722 if ac_fn_c_try_link "$LINENO"; then :
10723   have_libpython=${version}
10724                   found_usable_python=yes
10725                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10726                   PYTHON_LIBS=$new_LIBS
10727 fi
10728 rm -f core conftest.err conftest.$ac_objext \
10729     conftest$ac_exeext conftest.$ac_ext
10730   CPPFLAGS=$save_CPPFLAGS
10731   LIBS=$save_LIBS
10732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10733 $as_echo "${found_usable_python}" >&6; }
10734
10735     fi
10736   fi
10737   if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
10738
10739 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10740
10741   elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
10742
10743 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10744
10745   elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
10746
10747 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10748
10749   elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
10750
10751 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10752
10753   fi
10754
10755   if test "${have_libpython}" = no; then
10756     case "${with_python}" in
10757     yes)
10758       as_fn_error $? "python is missing or unusable" "$LINENO" 5
10759       ;;
10760     auto)
10761       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10762 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10763       ;;
10764     *)
10765       as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10766       ;;
10767     esac
10768   else
10769     if test -n "${python_prefix}"; then
10770
10771 cat >>confdefs.h <<_ACEOF
10772 #define WITH_PYTHON_PATH "${python_prefix}"
10773 _ACEOF
10774
10775
10776   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10777      if test "x$prefix" = xNONE; then
10778         test_prefix=/usr/local
10779      else
10780         test_prefix=$prefix
10781      fi
10782   else
10783      test_prefix=$exec_prefix
10784   fi
10785   value=0
10786   case ${python_prefix} in
10787      "${test_prefix}"|"${test_prefix}/"*|\
10788         '${exec_prefix}'|'${exec_prefix}/'*)
10789      value=1
10790      ;;
10791   esac
10792
10793 cat >>confdefs.h <<_ACEOF
10794 #define PYTHON_PATH_RELOCATABLE $value
10795 _ACEOF
10796
10797
10798     fi
10799   fi
10800 fi
10801
10802 if test "${have_libpython}" != no; then
10803
10804 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10805
10806   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10807   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10808   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10809   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10810   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10811
10812   # Flags needed to compile Python code (taken from python-config --cflags).
10813   # We cannot call python-config directly because it will output whatever was
10814   # used when compiling the Python interpreter itself, including flags which
10815   # would make the python-related objects be compiled differently from the
10816   # rest of GDB (e.g., -O2 and -fPIC).
10817   if test "${GCC}" = yes; then
10818     tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10819     # Python headers recommend -DNDEBUG, but it's unclear if that just
10820     # refers to building Python itself.  In release mode, though, it
10821     # doesn't hurt for the Python code in gdb to follow.
10822     $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
10823   fi
10824
10825   if test "x${tentative_python_cflags}" != x; then
10826     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10827 $as_echo_n "checking compiler flags for python code... " >&6; }
10828     for flag in ${tentative_python_cflags}; do
10829       # Check that the compiler accepts it
10830       saved_CFLAGS="$CFLAGS"
10831       CFLAGS="$CFLAGS $flag"
10832       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10833 /* end confdefs.h.  */
10834
10835 int
10836 main ()
10837 {
10838
10839   ;
10840   return 0;
10841 }
10842 _ACEOF
10843 if ac_fn_c_try_compile "$LINENO"; then :
10844   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10845 fi
10846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10847       CFLAGS="$saved_CFLAGS"
10848     done
10849     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10850 $as_echo "${PYTHON_CFLAGS}" >&6; }
10851   fi
10852
10853   # On x64 Windows, Python's include headers, and pyconfig.h in
10854   # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10855   # version of Windows.  Unfortunately, MS_WIN64 is only defined if
10856   # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
10857   # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10858   # The issue was reported to the Python community, but still isn't
10859   # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10860
10861   case "$gdb_host" in
10862     mingw64)
10863            if test "${GCC}" = yes; then
10864              CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10865            fi
10866            ;;
10867   esac
10868
10869   # Note that "python -m threading" cannot be used to check for
10870   # threading support due to a bug in Python 2.7.3
10871   # (http://bugs.python.org/issue15567).
10872   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10873 $as_echo_n "checking whether python supports threads... " >&6; }
10874   saved_CPPFLAGS="${CPPFLAGS}"
10875   CPPFLAGS="${PYTHON_CPPFLAGS}"
10876   # Note that the test is reversed so that python_has_threads=yes on
10877   # unexpected failures.
10878   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10879 /* end confdefs.h.  */
10880
10881 #include <Python.h>
10882 #ifdef WITH_THREAD
10883 # error
10884 #endif
10885
10886 _ACEOF
10887 if ac_fn_c_try_cpp "$LINENO"; then :
10888   python_has_threads=no
10889 else
10890   python_has_threads=yes
10891 fi
10892 rm -f conftest.err conftest.i conftest.$ac_ext
10893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10894 $as_echo "${python_has_threads}" >&6; }
10895   CPPFLAGS="${saved_CPPFLAGS}"
10896 else
10897   # Even if Python support is not compiled in, we need to have this file
10898   # included so that the "python" command, et.al., still exists.
10899   CONFIG_OBS="$CONFIG_OBS python/python.o"
10900   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10901 fi
10902
10903 # Work around Python http://bugs.python.org/issue10112.  See also
10904 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10905 # no effect.  Note that the only test after this that uses Python is
10906 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10907 # run without -export-dynamic too.
10908 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10909
10910
10911
10912
10913  if test "${have_libpython}" != no; then
10914   HAVE_PYTHON_TRUE=
10915   HAVE_PYTHON_FALSE='#'
10916 else
10917   HAVE_PYTHON_TRUE='#'
10918   HAVE_PYTHON_FALSE=
10919 fi
10920
10921
10922 # -------------------- #
10923 # Check for libguile.  #
10924 # -------------------- #
10925
10926
10927
10928
10929
10930
10931 # Check whether --with-guile was given.
10932 if test "${with_guile+set}" = set; then :
10933   withval=$with_guile;
10934 else
10935   with_guile=auto
10936 fi
10937
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10939 $as_echo_n "checking whether to use guile... " >&6; }
10940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10941 $as_echo "$with_guile" >&6; }
10942
10943 # Extract the first word of "pkg-config", so it can be a program name with args.
10944 set dummy pkg-config; ac_word=$2
10945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10946 $as_echo_n "checking for $ac_word... " >&6; }
10947 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
10948   $as_echo_n "(cached) " >&6
10949 else
10950   case $pkg_config_prog_path in
10951   [\\/]* | ?:[\\/]*)
10952   ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10953   ;;
10954   *)
10955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10956 for as_dir in $PATH
10957 do
10958   IFS=$as_save_IFS
10959   test -z "$as_dir" && as_dir=.
10960     for ac_exec_ext in '' $ac_executable_extensions; do
10961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10962     ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10964     break 2
10965   fi
10966 done
10967   done
10968 IFS=$as_save_IFS
10969
10970   test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10971   ;;
10972 esac
10973 fi
10974 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10975 if test -n "$pkg_config_prog_path"; then
10976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10977 $as_echo "$pkg_config_prog_path" >&6; }
10978 else
10979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980 $as_echo "no" >&6; }
10981 fi
10982
10983
10984
10985 try_guile_versions="guile-2.0"
10986 have_libguile=no
10987 case "${with_guile}" in
10988 no)
10989   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10990 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10991   ;;
10992 auto)
10993   if test "${pkg_config_prog_path}" = "missing"; then
10994     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10995 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10996   else
10997
10998   pkg_config=${pkg_config_prog_path}
10999   guile_version_list=${try_guile_versions}
11000   flag_errors=no
11001
11002   found_usable_guile=checking
11003   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11004 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11005   for guile_version in ${guile_version_list}; do
11006     ${pkg_config} --exists ${guile_version} 2>/dev/null
11007     if test $? != 0; then
11008       continue
11009     fi
11010             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11011     if test $? != 0; then
11012       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11013     fi
11014     new_LIBS=`${pkg_config} --libs ${guile_version}`
11015     if test $? != 0; then
11016       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11017     fi
11018         found_usable_guile=${guile_version}
11019     break
11020   done
11021   if test "${found_usable_guile}" = "checking"; then
11022     if test "${flag_errors}" = "yes"; then
11023       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11024     else
11025       found_usable_guile=no
11026     fi
11027   fi
11028       if test "${found_usable_guile}" != no; then
11029     save_CPPFLAGS=$CPPFLAGS
11030     save_LIBS=$LIBS
11031     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11032     LIBS="$LIBS $new_LIBS"
11033     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11034 /* end confdefs.h.  */
11035 #include "libguile.h"
11036 int
11037 main ()
11038 {
11039 scm_init_guile ();
11040   ;
11041   return 0;
11042 }
11043 _ACEOF
11044 if ac_fn_c_try_link "$LINENO"; then :
11045   have_libguile=yes
11046                     GUILE_CPPFLAGS=$new_CPPFLAGS
11047                     GUILE_LIBS=$new_LIBS
11048 else
11049   found_usable_guile=no
11050 fi
11051 rm -f core conftest.err conftest.$ac_objext \
11052     conftest$ac_exeext conftest.$ac_ext
11053         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11054 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11055
11056 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11057
11058
11059 fi
11060
11061     CPPFLAGS=$save_CPPFLAGS
11062     LIBS=$save_LIBS
11063     if test "${found_usable_guile}" = no; then
11064       if test "${flag_errors}" = yes; then
11065         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11066 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11067 as_fn_error $? "linking guile version ${guile_version} test program failed
11068 See \`config.log' for more details" "$LINENO" 5; }
11069       fi
11070     fi
11071   fi
11072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11073 $as_echo "${found_usable_guile}" >&6; }
11074
11075   fi
11076   ;;
11077 yes)
11078   if test "${pkg_config_prog_path}" = "missing"; then
11079     as_fn_error $? "pkg-config not found" "$LINENO" 5
11080   fi
11081
11082   pkg_config=${pkg_config_prog_path}
11083   guile_version_list=${try_guile_versions}
11084   flag_errors=yes
11085
11086   found_usable_guile=checking
11087   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11088 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11089   for guile_version in ${guile_version_list}; do
11090     ${pkg_config} --exists ${guile_version} 2>/dev/null
11091     if test $? != 0; then
11092       continue
11093     fi
11094             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11095     if test $? != 0; then
11096       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11097     fi
11098     new_LIBS=`${pkg_config} --libs ${guile_version}`
11099     if test $? != 0; then
11100       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11101     fi
11102         found_usable_guile=${guile_version}
11103     break
11104   done
11105   if test "${found_usable_guile}" = "checking"; then
11106     if test "${flag_errors}" = "yes"; then
11107       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11108     else
11109       found_usable_guile=no
11110     fi
11111   fi
11112       if test "${found_usable_guile}" != no; then
11113     save_CPPFLAGS=$CPPFLAGS
11114     save_LIBS=$LIBS
11115     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11116     LIBS="$LIBS $new_LIBS"
11117     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11118 /* end confdefs.h.  */
11119 #include "libguile.h"
11120 int
11121 main ()
11122 {
11123 scm_init_guile ();
11124   ;
11125   return 0;
11126 }
11127 _ACEOF
11128 if ac_fn_c_try_link "$LINENO"; then :
11129   have_libguile=yes
11130                     GUILE_CPPFLAGS=$new_CPPFLAGS
11131                     GUILE_LIBS=$new_LIBS
11132 else
11133   found_usable_guile=no
11134 fi
11135 rm -f core conftest.err conftest.$ac_objext \
11136     conftest$ac_exeext conftest.$ac_ext
11137         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11138 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11139
11140 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11141
11142
11143 fi
11144
11145     CPPFLAGS=$save_CPPFLAGS
11146     LIBS=$save_LIBS
11147     if test "${found_usable_guile}" = no; then
11148       if test "${flag_errors}" = yes; then
11149         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11150 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11151 as_fn_error $? "linking guile version ${guile_version} test program failed
11152 See \`config.log' for more details" "$LINENO" 5; }
11153       fi
11154     fi
11155   fi
11156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11157 $as_echo "${found_usable_guile}" >&6; }
11158
11159   ;;
11160 [\\/]* | ?:[\\/]*)
11161   if test -x "${with_guile}"; then
11162
11163   pkg_config=${with_guile}
11164   guile_version_list=${try_guile_versions}
11165   flag_errors=yes
11166
11167   found_usable_guile=checking
11168   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11169 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11170   for guile_version in ${guile_version_list}; do
11171     ${pkg_config} --exists ${guile_version} 2>/dev/null
11172     if test $? != 0; then
11173       continue
11174     fi
11175             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11176     if test $? != 0; then
11177       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11178     fi
11179     new_LIBS=`${pkg_config} --libs ${guile_version}`
11180     if test $? != 0; then
11181       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11182     fi
11183         found_usable_guile=${guile_version}
11184     break
11185   done
11186   if test "${found_usable_guile}" = "checking"; then
11187     if test "${flag_errors}" = "yes"; then
11188       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11189     else
11190       found_usable_guile=no
11191     fi
11192   fi
11193       if test "${found_usable_guile}" != no; then
11194     save_CPPFLAGS=$CPPFLAGS
11195     save_LIBS=$LIBS
11196     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11197     LIBS="$LIBS $new_LIBS"
11198     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11199 /* end confdefs.h.  */
11200 #include "libguile.h"
11201 int
11202 main ()
11203 {
11204 scm_init_guile ();
11205   ;
11206   return 0;
11207 }
11208 _ACEOF
11209 if ac_fn_c_try_link "$LINENO"; then :
11210   have_libguile=yes
11211                     GUILE_CPPFLAGS=$new_CPPFLAGS
11212                     GUILE_LIBS=$new_LIBS
11213 else
11214   found_usable_guile=no
11215 fi
11216 rm -f core conftest.err conftest.$ac_objext \
11217     conftest$ac_exeext conftest.$ac_ext
11218         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11219 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11220
11221 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11222
11223
11224 fi
11225
11226     CPPFLAGS=$save_CPPFLAGS
11227     LIBS=$save_LIBS
11228     if test "${found_usable_guile}" = no; then
11229       if test "${flag_errors}" = yes; then
11230         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11231 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11232 as_fn_error $? "linking guile version ${guile_version} test program failed
11233 See \`config.log' for more details" "$LINENO" 5; }
11234       fi
11235     fi
11236   fi
11237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11238 $as_echo "${found_usable_guile}" >&6; }
11239
11240   else
11241     as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11242   fi
11243   ;;
11244 "" | */*)
11245   # Disallow --with=guile="" and --with-guile=foo/bar.
11246   as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11247   ;;
11248 *)
11249   # A space separate list of guile versions to try, in order.
11250   if test "${pkg_config_prog_path}" = "missing"; then
11251     as_fn_error $? "pkg-config not found" "$LINENO" 5
11252   fi
11253
11254   pkg_config=${pkg_config_prog_path}
11255   guile_version_list=${with_guile}
11256   flag_errors=yes
11257
11258   found_usable_guile=checking
11259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11260 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11261   for guile_version in ${guile_version_list}; do
11262     ${pkg_config} --exists ${guile_version} 2>/dev/null
11263     if test $? != 0; then
11264       continue
11265     fi
11266             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11267     if test $? != 0; then
11268       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11269     fi
11270     new_LIBS=`${pkg_config} --libs ${guile_version}`
11271     if test $? != 0; then
11272       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11273     fi
11274         found_usable_guile=${guile_version}
11275     break
11276   done
11277   if test "${found_usable_guile}" = "checking"; then
11278     if test "${flag_errors}" = "yes"; then
11279       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11280     else
11281       found_usable_guile=no
11282     fi
11283   fi
11284       if test "${found_usable_guile}" != no; then
11285     save_CPPFLAGS=$CPPFLAGS
11286     save_LIBS=$LIBS
11287     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11288     LIBS="$LIBS $new_LIBS"
11289     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11290 /* end confdefs.h.  */
11291 #include "libguile.h"
11292 int
11293 main ()
11294 {
11295 scm_init_guile ();
11296   ;
11297   return 0;
11298 }
11299 _ACEOF
11300 if ac_fn_c_try_link "$LINENO"; then :
11301   have_libguile=yes
11302                     GUILE_CPPFLAGS=$new_CPPFLAGS
11303                     GUILE_LIBS=$new_LIBS
11304 else
11305   found_usable_guile=no
11306 fi
11307 rm -f core conftest.err conftest.$ac_objext \
11308     conftest$ac_exeext conftest.$ac_ext
11309         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11310 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11311
11312 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11313
11314
11315 fi
11316
11317     CPPFLAGS=$save_CPPFLAGS
11318     LIBS=$save_LIBS
11319     if test "${found_usable_guile}" = no; then
11320       if test "${flag_errors}" = yes; then
11321         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11322 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11323 as_fn_error $? "linking guile version ${guile_version} test program failed
11324 See \`config.log' for more details" "$LINENO" 5; }
11325       fi
11326     fi
11327   fi
11328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11329 $as_echo "${found_usable_guile}" >&6; }
11330
11331   ;;
11332 esac
11333
11334 if test "${have_libguile}" != no; then
11335     case "${with_guile}" in
11336   [\\/]* | ?:[\\/]*)
11337
11338   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11339 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11340 if ${ac_cv_guild_program_name+:} false; then :
11341   $as_echo_n "(cached) " >&6
11342 else
11343   ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11344
11345      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11346      # the 'guild' and 'bindir' variables.  In that case, try to guess
11347      # what the program name is, at the risk of getting it wrong if
11348      # Guile was configured with '--program-suffix' or similar.
11349      if test "x$ac_cv_guild_program_name" = "x"; then
11350        guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11351        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11352      fi
11353
11354 fi
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11356 $as_echo "$ac_cv_guild_program_name" >&6; }
11357
11358   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11359     as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11360   fi
11361
11362   GUILD="$ac_cv_guild_program_name"
11363
11364
11365     ;;
11366   *)
11367
11368   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11369 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11370 if ${ac_cv_guild_program_name+:} false; then :
11371   $as_echo_n "(cached) " >&6
11372 else
11373   ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11374
11375      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11376      # the 'guild' and 'bindir' variables.  In that case, try to guess
11377      # what the program name is, at the risk of getting it wrong if
11378      # Guile was configured with '--program-suffix' or similar.
11379      if test "x$ac_cv_guild_program_name" = "x"; then
11380        guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11381        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11382      fi
11383
11384 fi
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11386 $as_echo "$ac_cv_guild_program_name" >&6; }
11387
11388   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11389     as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11390   fi
11391
11392   GUILD="$ac_cv_guild_program_name"
11393
11394
11395     ;;
11396   esac
11397
11398
11399   if test "$cross_compiling" = no; then
11400     GUILD_TARGET_FLAG=
11401   else
11402     GUILD_TARGET_FLAG="--target=$host"
11403   fi
11404
11405
11406
11407
11408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11409 $as_echo_n "checking whether guild supports this host... " >&6; }
11410 if ${ac_cv_guild_ok+:} false; then :
11411   $as_echo_n "(cached) " >&6
11412 else
11413   echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11414      if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11415        ac_cv_guild_ok=yes
11416      else
11417        ac_cv_guild_ok=no
11418      fi
11419 fi
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11421 $as_echo "$ac_cv_guild_ok" >&6; }
11422
11423     if test "$ac_cv_guild_ok" = no; then
11424     have_libguile=no
11425     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11426 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11427   fi
11428 fi
11429
11430 if test "${have_libguile}" != no; then
11431
11432 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11433
11434   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11435   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11436   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11437   CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11438   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11439
11440     save_LIBS="$LIBS"
11441   save_CPPFLAGS="$CPPFLAGS"
11442   LIBS="$GUILE_LIBS"
11443   CPPFLAGS="$GUILE_CPPFLAGS"
11444   for ac_func in scm_new_smob
11445 do :
11446   ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11447 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11448   cat >>confdefs.h <<_ACEOF
11449 #define HAVE_SCM_NEW_SMOB 1
11450 _ACEOF
11451
11452 fi
11453 done
11454
11455   LIBS="$save_LIBS"
11456   CPPFLAGS="$save_CPPFLAGS"
11457 else
11458   # Even if Guile support is not compiled in, we need to have these files
11459   # included.
11460   CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11461   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11462 fi
11463
11464
11465  if test "${have_libguile}" != no; then
11466   HAVE_GUILE_TRUE=
11467   HAVE_GUILE_FALSE='#'
11468 else
11469   HAVE_GUILE_TRUE='#'
11470   HAVE_GUILE_FALSE=
11471 fi
11472
11473
11474 # ---------------------------- #
11475 # Check for source highlight.  #
11476 # ---------------------------- #
11477
11478 SRCHIGH_LIBS=
11479 SRCHIGH_CFLAGS=
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for source highlight" >&5
11481 $as_echo_n "checking for source highlight... " >&6; }
11482 if test "${pkg_config_prog_path}" = "missing"; then
11483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
11484 $as_echo "no - pkg-config not found" >&6; }
11485 else
11486    if ${pkg_config_prog_path} --exists source-highlight; then
11487       SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11488       SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11489
11490 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11491
11492       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11493 $as_echo "yes" >&6; }
11494    else
11495       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496 $as_echo "no" >&6; }
11497    fi
11498 fi
11499
11500
11501
11502 # --------------------- #
11503 # Check for libmcheck.  #
11504 # --------------------- #
11505
11506 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
11507 # but turn it off if Python is enabled with threads, since -lmcheck is
11508 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11509 # and for releases.
11510 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11511    && $development; then
11512   libmcheck_default=yes
11513 else
11514   libmcheck_default=no
11515 fi
11516
11517   # Check whether --enable-libmcheck was given.
11518 if test "${enable_libmcheck+set}" = set; then :
11519   enableval=$enable_libmcheck; case "${enableval}" in
11520       yes | y) ENABLE_LIBMCHECK="yes" ;;
11521       no | n)  ENABLE_LIBMCHECK="no" ;;
11522       *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
11523     esac
11524 fi
11525
11526
11527   if test -z "${ENABLE_LIBMCHECK}"; then
11528     ENABLE_LIBMCHECK=${libmcheck_default}
11529   fi
11530
11531   if test "$ENABLE_LIBMCHECK" = "yes" ; then
11532     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
11533 $as_echo_n "checking for main in -lmcheck... " >&6; }
11534 if ${ac_cv_lib_mcheck_main+:} false; then :
11535   $as_echo_n "(cached) " >&6
11536 else
11537   ac_check_lib_save_LIBS=$LIBS
11538 LIBS="-lmcheck  $LIBS"
11539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11540 /* end confdefs.h.  */
11541
11542
11543 int
11544 main ()
11545 {
11546 return main ();
11547   ;
11548   return 0;
11549 }
11550 _ACEOF
11551 if ac_fn_c_try_link "$LINENO"; then :
11552   ac_cv_lib_mcheck_main=yes
11553 else
11554   ac_cv_lib_mcheck_main=no
11555 fi
11556 rm -f core conftest.err conftest.$ac_objext \
11557     conftest$ac_exeext conftest.$ac_ext
11558 LIBS=$ac_check_lib_save_LIBS
11559 fi
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11561 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
11562 if test "x$ac_cv_lib_mcheck_main" = xyes; then :
11563   cat >>confdefs.h <<_ACEOF
11564 #define HAVE_LIBMCHECK 1
11565 _ACEOF
11566
11567   LIBS="-lmcheck $LIBS"
11568
11569 fi
11570
11571   fi
11572
11573
11574 if test "$ENABLE_LIBMCHECK" = "yes" \
11575         -a "${have_libpython}" != "no" \
11576         -a "${python_has_threads}" = "yes" ; then
11577   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11578 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
11579 fi
11580
11581
11582 # Check whether --with-intel_pt was given.
11583 if test "${with_intel_pt+set}" = set; then :
11584   withval=$with_intel_pt;
11585 else
11586   with_intel_pt=auto
11587 fi
11588
11589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11590 $as_echo_n "checking whether to use intel pt... " >&6; }
11591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11592 $as_echo "$with_intel_pt" >&6; }
11593
11594 if test "${with_intel_pt}" = no; then
11595   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11596 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
11597   HAVE_LIBIPT=no
11598 else
11599   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11600 /* end confdefs.h.  */
11601
11602 #include <linux/perf_event.h>
11603 #ifndef PERF_ATTR_SIZE_VER5
11604 # error
11605 #endif
11606
11607 _ACEOF
11608 if ac_fn_c_try_cpp "$LINENO"; then :
11609   perf_event=yes
11610 else
11611   perf_event=no
11612 fi
11613 rm -f conftest.err conftest.i conftest.$ac_ext
11614   if test "$perf_event" != yes; then
11615     if test "$with_intel_pt" = yes; then
11616       as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
11617     else
11618       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11619 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11620     fi
11621   fi
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631     use_additional=yes
11632
11633   acl_save_prefix="$prefix"
11634   prefix="$acl_final_prefix"
11635   acl_save_exec_prefix="$exec_prefix"
11636   exec_prefix="$acl_final_exec_prefix"
11637
11638     eval additional_includedir=\"$includedir\"
11639     eval additional_libdir=\"$libdir\"
11640
11641   exec_prefix="$acl_save_exec_prefix"
11642   prefix="$acl_save_prefix"
11643
11644
11645 # Check whether --with-libipt-prefix was given.
11646 if test "${with_libipt_prefix+set}" = set; then :
11647   withval=$with_libipt_prefix;
11648     if test "X$withval" = "Xno"; then
11649       use_additional=no
11650     else
11651       if test "X$withval" = "X"; then
11652
11653   acl_save_prefix="$prefix"
11654   prefix="$acl_final_prefix"
11655   acl_save_exec_prefix="$exec_prefix"
11656   exec_prefix="$acl_final_exec_prefix"
11657
11658           eval additional_includedir=\"$includedir\"
11659           eval additional_libdir=\"$libdir\"
11660
11661   exec_prefix="$acl_save_exec_prefix"
11662   prefix="$acl_save_prefix"
11663
11664       else
11665         additional_includedir="$withval/include"
11666         additional_libdir="$withval/lib"
11667       fi
11668     fi
11669
11670 fi
11671
11672       LIBIPT=
11673   LTLIBIPT=
11674   INCIPT=
11675   rpathdirs=
11676   ltrpathdirs=
11677   names_already_handled=
11678   names_next_round='ipt '
11679   while test -n "$names_next_round"; do
11680     names_this_round="$names_next_round"
11681     names_next_round=
11682     for name in $names_this_round; do
11683       already_handled=
11684       for n in $names_already_handled; do
11685         if test "$n" = "$name"; then
11686           already_handled=yes
11687           break
11688         fi
11689       done
11690       if test -z "$already_handled"; then
11691         names_already_handled="$names_already_handled $name"
11692                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11693         eval value=\"\$HAVE_LIB$uppername\"
11694         if test -n "$value"; then
11695           if test "$value" = yes; then
11696             eval value=\"\$LIB$uppername\"
11697             test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11698             eval value=\"\$LTLIB$uppername\"
11699             test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11700           else
11701                                     :
11702           fi
11703         else
11704                               found_dir=
11705           found_la=
11706           found_so=
11707           found_a=
11708           if test $use_additional = yes; then
11709             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11710               found_dir="$additional_libdir"
11711               found_so="$additional_libdir/lib$name.$shlibext"
11712               if test -f "$additional_libdir/lib$name.la"; then
11713                 found_la="$additional_libdir/lib$name.la"
11714               fi
11715             else
11716               if test -f "$additional_libdir/lib$name.$libext"; then
11717                 found_dir="$additional_libdir"
11718                 found_a="$additional_libdir/lib$name.$libext"
11719                 if test -f "$additional_libdir/lib$name.la"; then
11720                   found_la="$additional_libdir/lib$name.la"
11721                 fi
11722               fi
11723             fi
11724           fi
11725           if test "X$found_dir" = "X"; then
11726             for x in $LDFLAGS $LTLIBIPT; do
11727
11728   acl_save_prefix="$prefix"
11729   prefix="$acl_final_prefix"
11730   acl_save_exec_prefix="$exec_prefix"
11731   exec_prefix="$acl_final_exec_prefix"
11732   eval x=\"$x\"
11733   exec_prefix="$acl_save_exec_prefix"
11734   prefix="$acl_save_prefix"
11735
11736               case "$x" in
11737                 -L*)
11738                   dir=`echo "X$x" | sed -e 's/^X-L//'`
11739                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11740                     found_dir="$dir"
11741                     found_so="$dir/lib$name.$shlibext"
11742                     if test -f "$dir/lib$name.la"; then
11743                       found_la="$dir/lib$name.la"
11744                     fi
11745                   else
11746                     if test -f "$dir/lib$name.$libext"; then
11747                       found_dir="$dir"
11748                       found_a="$dir/lib$name.$libext"
11749                       if test -f "$dir/lib$name.la"; then
11750                         found_la="$dir/lib$name.la"
11751                       fi
11752                     fi
11753                   fi
11754                   ;;
11755               esac
11756               if test "X$found_dir" != "X"; then
11757                 break
11758               fi
11759             done
11760           fi
11761           if test "X$found_dir" != "X"; then
11762                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11763             if test "X$found_so" != "X"; then
11764                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11765                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11766               else
11767                                                                                 haveit=
11768                 for x in $ltrpathdirs; do
11769                   if test "X$x" = "X$found_dir"; then
11770                     haveit=yes
11771                     break
11772                   fi
11773                 done
11774                 if test -z "$haveit"; then
11775                   ltrpathdirs="$ltrpathdirs $found_dir"
11776                 fi
11777                                 if test "$hardcode_direct" = yes; then
11778                                                       LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11779                 else
11780                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11781                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11782                                                             haveit=
11783                     for x in $rpathdirs; do
11784                       if test "X$x" = "X$found_dir"; then
11785                         haveit=yes
11786                         break
11787                       fi
11788                     done
11789                     if test -z "$haveit"; then
11790                       rpathdirs="$rpathdirs $found_dir"
11791                     fi
11792                   else
11793                                                                                 haveit=
11794                     for x in $LDFLAGS $LIBIPT; do
11795
11796   acl_save_prefix="$prefix"
11797   prefix="$acl_final_prefix"
11798   acl_save_exec_prefix="$exec_prefix"
11799   exec_prefix="$acl_final_exec_prefix"
11800   eval x=\"$x\"
11801   exec_prefix="$acl_save_exec_prefix"
11802   prefix="$acl_save_prefix"
11803
11804                       if test "X$x" = "X-L$found_dir"; then
11805                         haveit=yes
11806                         break
11807                       fi
11808                     done
11809                     if test -z "$haveit"; then
11810                       LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11811                     fi
11812                     if test "$hardcode_minus_L" != no; then
11813                                                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11814                     else
11815                                                                                                                                                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11816                     fi
11817                   fi
11818                 fi
11819               fi
11820             else
11821               if test "X$found_a" != "X"; then
11822                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11823               else
11824                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11825               fi
11826             fi
11827                         additional_includedir=
11828             case "$found_dir" in
11829               */lib | */lib/)
11830                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11831                 additional_includedir="$basedir/include"
11832                 ;;
11833             esac
11834             if test "X$additional_includedir" != "X"; then
11835                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
11836                 haveit=
11837                 if test "X$additional_includedir" = "X/usr/local/include"; then
11838                   if test -n "$GCC"; then
11839                     case $host_os in
11840                       linux*) haveit=yes;;
11841                     esac
11842                   fi
11843                 fi
11844                 if test -z "$haveit"; then
11845                   for x in $CPPFLAGS $INCIPT; do
11846
11847   acl_save_prefix="$prefix"
11848   prefix="$acl_final_prefix"
11849   acl_save_exec_prefix="$exec_prefix"
11850   exec_prefix="$acl_final_exec_prefix"
11851   eval x=\"$x\"
11852   exec_prefix="$acl_save_exec_prefix"
11853   prefix="$acl_save_prefix"
11854
11855                     if test "X$x" = "X-I$additional_includedir"; then
11856                       haveit=yes
11857                       break
11858                     fi
11859                   done
11860                   if test -z "$haveit"; then
11861                     if test -d "$additional_includedir"; then
11862                                             INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11863                     fi
11864                   fi
11865                 fi
11866               fi
11867             fi
11868                         if test -n "$found_la"; then
11869                                                         save_libdir="$libdir"
11870               case "$found_la" in
11871                 */* | *\\*) . "$found_la" ;;
11872                 *) . "./$found_la" ;;
11873               esac
11874               libdir="$save_libdir"
11875                             for dep in $dependency_libs; do
11876                 case "$dep" in
11877                   -L*)
11878                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11879                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
11880                       haveit=
11881                       if test "X$additional_libdir" = "X/usr/local/lib"; then
11882                         if test -n "$GCC"; then
11883                           case $host_os in
11884                             linux*) haveit=yes;;
11885                           esac
11886                         fi
11887                       fi
11888                       if test -z "$haveit"; then
11889                         haveit=
11890                         for x in $LDFLAGS $LIBIPT; do
11891
11892   acl_save_prefix="$prefix"
11893   prefix="$acl_final_prefix"
11894   acl_save_exec_prefix="$exec_prefix"
11895   exec_prefix="$acl_final_exec_prefix"
11896   eval x=\"$x\"
11897   exec_prefix="$acl_save_exec_prefix"
11898   prefix="$acl_save_prefix"
11899
11900                           if test "X$x" = "X-L$additional_libdir"; then
11901                             haveit=yes
11902                             break
11903                           fi
11904                         done
11905                         if test -z "$haveit"; then
11906                           if test -d "$additional_libdir"; then
11907                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11908                           fi
11909                         fi
11910                         haveit=
11911                         for x in $LDFLAGS $LTLIBIPT; do
11912
11913   acl_save_prefix="$prefix"
11914   prefix="$acl_final_prefix"
11915   acl_save_exec_prefix="$exec_prefix"
11916   exec_prefix="$acl_final_exec_prefix"
11917   eval x=\"$x\"
11918   exec_prefix="$acl_save_exec_prefix"
11919   prefix="$acl_save_prefix"
11920
11921                           if test "X$x" = "X-L$additional_libdir"; then
11922                             haveit=yes
11923                             break
11924                           fi
11925                         done
11926                         if test -z "$haveit"; then
11927                           if test -d "$additional_libdir"; then
11928                                                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11929                           fi
11930                         fi
11931                       fi
11932                     fi
11933                     ;;
11934                   -R*)
11935                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
11936                     if test "$enable_rpath" != no; then
11937                                                                   haveit=
11938                       for x in $rpathdirs; do
11939                         if test "X$x" = "X$dir"; then
11940                           haveit=yes
11941                           break
11942                         fi
11943                       done
11944                       if test -z "$haveit"; then
11945                         rpathdirs="$rpathdirs $dir"
11946                       fi
11947                                                                   haveit=
11948                       for x in $ltrpathdirs; do
11949                         if test "X$x" = "X$dir"; then
11950                           haveit=yes
11951                           break
11952                         fi
11953                       done
11954                       if test -z "$haveit"; then
11955                         ltrpathdirs="$ltrpathdirs $dir"
11956                       fi
11957                     fi
11958                     ;;
11959                   -l*)
11960                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11961                     ;;
11962                   *.la)
11963                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11964                     ;;
11965                   *)
11966                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11967                     LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11968                     ;;
11969                 esac
11970               done
11971             fi
11972           else
11973                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11974             LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11975           fi
11976         fi
11977       fi
11978     done
11979   done
11980   if test "X$rpathdirs" != "X"; then
11981     if test -n "$hardcode_libdir_separator"; then
11982                         alldirs=
11983       for found_dir in $rpathdirs; do
11984         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11985       done
11986             acl_save_libdir="$libdir"
11987       libdir="$alldirs"
11988       eval flag=\"$hardcode_libdir_flag_spec\"
11989       libdir="$acl_save_libdir"
11990       LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11991     else
11992             for found_dir in $rpathdirs; do
11993         acl_save_libdir="$libdir"
11994         libdir="$found_dir"
11995         eval flag=\"$hardcode_libdir_flag_spec\"
11996         libdir="$acl_save_libdir"
11997         LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11998       done
11999     fi
12000   fi
12001   if test "X$ltrpathdirs" != "X"; then
12002             for found_dir in $ltrpathdirs; do
12003       LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
12004     done
12005   fi
12006
12007
12008         ac_save_CPPFLAGS="$CPPFLAGS"
12009
12010   for element in $INCIPT; do
12011     haveit=
12012     for x in $CPPFLAGS; do
12013
12014   acl_save_prefix="$prefix"
12015   prefix="$acl_final_prefix"
12016   acl_save_exec_prefix="$exec_prefix"
12017   exec_prefix="$acl_final_exec_prefix"
12018   eval x=\"$x\"
12019   exec_prefix="$acl_save_exec_prefix"
12020   prefix="$acl_save_prefix"
12021
12022       if test "X$x" = "X$element"; then
12023         haveit=yes
12024         break
12025       fi
12026     done
12027     if test -z "$haveit"; then
12028       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12029     fi
12030   done
12031
12032
12033   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
12034 $as_echo_n "checking for libipt... " >&6; }
12035 if ${ac_cv_libipt+:} false; then :
12036   $as_echo_n "(cached) " >&6
12037 else
12038
12039     ac_save_LIBS="$LIBS"
12040     LIBS="$LIBS $LIBIPT"
12041     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12042 /* end confdefs.h.  */
12043 #include "intel-pt.h"
12044 int
12045 main ()
12046 {
12047 pt_insn_alloc_decoder (0);
12048   ;
12049   return 0;
12050 }
12051 _ACEOF
12052 if ac_fn_c_try_link "$LINENO"; then :
12053   ac_cv_libipt=yes
12054 else
12055   ac_cv_libipt=no
12056 fi
12057 rm -f core conftest.err conftest.$ac_objext \
12058     conftest$ac_exeext conftest.$ac_ext
12059     LIBS="$ac_save_LIBS"
12060
12061 fi
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
12063 $as_echo "$ac_cv_libipt" >&6; }
12064   if test "$ac_cv_libipt" = yes; then
12065     HAVE_LIBIPT=yes
12066
12067 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
12068
12069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
12070 $as_echo_n "checking how to link with libipt... " >&6; }
12071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
12072 $as_echo "$LIBIPT" >&6; }
12073   else
12074     HAVE_LIBIPT=no
12075             CPPFLAGS="$ac_save_CPPFLAGS"
12076     LIBIPT=
12077     LTLIBIPT=
12078   fi
12079
12080
12081
12082
12083
12084
12085   if test "$HAVE_LIBIPT" != yes; then
12086     if test "$with_intel_pt" = yes; then
12087       as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
12088     else
12089       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
12090 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
12091     fi
12092   else
12093     save_LIBS=$LIBS
12094     LIBS="$LIBS $LIBIPT"
12095     for ac_func in pt_insn_event
12096 do :
12097   ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
12098 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
12099   cat >>confdefs.h <<_ACEOF
12100 #define HAVE_PT_INSN_EVENT 1
12101 _ACEOF
12102
12103 fi
12104 done
12105
12106     ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
12107 "
12108 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
12109
12110 cat >>confdefs.h <<_ACEOF
12111 #define HAVE_STRUCT_PT_INSN_ENABLED 1
12112 _ACEOF
12113
12114
12115 fi
12116 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12117 "
12118 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
12119
12120 cat >>confdefs.h <<_ACEOF
12121 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
12122 _ACEOF
12123
12124
12125 fi
12126
12127     LIBS=$save_LIBS
12128   fi
12129 fi
12130
12131 # ------------------------- #
12132 # Checks for header files.  #
12133 # ------------------------- #
12134
12135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12136 $as_echo_n "checking for ANSI C header files... " >&6; }
12137 if ${ac_cv_header_stdc+:} false; then :
12138   $as_echo_n "(cached) " >&6
12139 else
12140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12141 /* end confdefs.h.  */
12142 #include <stdlib.h>
12143 #include <stdarg.h>
12144 #include <string.h>
12145 #include <float.h>
12146
12147 int
12148 main ()
12149 {
12150
12151   ;
12152   return 0;
12153 }
12154 _ACEOF
12155 if ac_fn_c_try_compile "$LINENO"; then :
12156   ac_cv_header_stdc=yes
12157 else
12158   ac_cv_header_stdc=no
12159 fi
12160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12161
12162 if test $ac_cv_header_stdc = yes; then
12163   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12165 /* end confdefs.h.  */
12166 #include <string.h>
12167
12168 _ACEOF
12169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12170   $EGREP "memchr" >/dev/null 2>&1; then :
12171
12172 else
12173   ac_cv_header_stdc=no
12174 fi
12175 rm -f conftest*
12176
12177 fi
12178
12179 if test $ac_cv_header_stdc = yes; then
12180   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12182 /* end confdefs.h.  */
12183 #include <stdlib.h>
12184
12185 _ACEOF
12186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12187   $EGREP "free" >/dev/null 2>&1; then :
12188
12189 else
12190   ac_cv_header_stdc=no
12191 fi
12192 rm -f conftest*
12193
12194 fi
12195
12196 if test $ac_cv_header_stdc = yes; then
12197   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12198   if test "$cross_compiling" = yes; then :
12199   :
12200 else
12201   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12202 /* end confdefs.h.  */
12203 #include <ctype.h>
12204 #include <stdlib.h>
12205 #if ((' ' & 0x0FF) == 0x020)
12206 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12207 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12208 #else
12209 # define ISLOWER(c) \
12210                    (('a' <= (c) && (c) <= 'i') \
12211                      || ('j' <= (c) && (c) <= 'r') \
12212                      || ('s' <= (c) && (c) <= 'z'))
12213 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12214 #endif
12215
12216 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12217 int
12218 main ()
12219 {
12220   int i;
12221   for (i = 0; i < 256; i++)
12222     if (XOR (islower (i), ISLOWER (i))
12223         || toupper (i) != TOUPPER (i))
12224       return 2;
12225   return 0;
12226 }
12227 _ACEOF
12228 if ac_fn_c_try_run "$LINENO"; then :
12229
12230 else
12231   ac_cv_header_stdc=no
12232 fi
12233 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12234   conftest.$ac_objext conftest.beam conftest.$ac_ext
12235 fi
12236
12237 fi
12238 fi
12239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12240 $as_echo "$ac_cv_header_stdc" >&6; }
12241 if test $ac_cv_header_stdc = yes; then
12242
12243 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12244
12245 fi
12246
12247 # elf_hp.h is for HP/UX 64-bit shared library support.
12248 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12249                   thread_db.h linux/elf.h \
12250                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12251                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12252                   sys/reg.h sys/debugreg.h sys/select.h \
12253                   termios.h elf_hp.h \
12254                   dlfcn.h
12255 do :
12256   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12257 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12258 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12259   cat >>confdefs.h <<_ACEOF
12260 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12261 _ACEOF
12262
12263 fi
12264
12265 done
12266
12267 for ac_header in sys/user.h
12268 do :
12269   ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12270 # include <sys/param.h>
12271 #endif
12272
12273 "
12274 if test "x$ac_cv_header_sys_user_h" = xyes; then :
12275   cat >>confdefs.h <<_ACEOF
12276 #define HAVE_SYS_USER_H 1
12277 _ACEOF
12278
12279 fi
12280
12281 done
12282
12283
12284 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12285 do :
12286   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12287 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12288 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12289   cat >>confdefs.h <<_ACEOF
12290 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12291 _ACEOF
12292
12293 fi
12294
12295 done
12296
12297 for ac_header in term.h
12298 do :
12299   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12300 # include <curses.h>
12301 #endif
12302
12303 "
12304 if test "x$ac_cv_header_term_h" = xyes; then :
12305   cat >>confdefs.h <<_ACEOF
12306 #define HAVE_TERM_H 1
12307 _ACEOF
12308
12309 fi
12310
12311 done
12312
12313
12314 # ------------------------- #
12315 # Checks for declarations.  #
12316 # ------------------------- #
12317
12318
12319   # Check for presence and size of long long.
12320   ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12321 if test "x$ac_cv_type_long_long" = xyes; then :
12322
12323 cat >>confdefs.h <<_ACEOF
12324 #define HAVE_LONG_LONG 1
12325 _ACEOF
12326
12327 # The cast to long int works around a bug in the HP C Compiler
12328 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12329 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12330 # This bug is HP SR number 8606223364.
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12332 $as_echo_n "checking size of long long... " >&6; }
12333 if ${ac_cv_sizeof_long_long+:} false; then :
12334   $as_echo_n "(cached) " >&6
12335 else
12336   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
12337
12338 else
12339   if test "$ac_cv_type_long_long" = yes; then
12340      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12341 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12342 as_fn_error 77 "cannot compute sizeof (long long)
12343 See \`config.log' for more details" "$LINENO" 5; }
12344    else
12345      ac_cv_sizeof_long_long=0
12346    fi
12347 fi
12348
12349 fi
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12351 $as_echo "$ac_cv_sizeof_long_long" >&6; }
12352
12353
12354
12355 cat >>confdefs.h <<_ACEOF
12356 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12357 _ACEOF
12358
12359
12360 fi
12361
12362
12363   as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12364 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12365 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12366   ac_have_decl=1
12367 else
12368   ac_have_decl=0
12369 fi
12370
12371 cat >>confdefs.h <<_ACEOF
12372 #define HAVE_DECL_BASENAME $ac_have_decl
12373 _ACEOF
12374 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12375 if test "x$ac_cv_have_decl_ffs" = xyes; then :
12376   ac_have_decl=1
12377 else
12378   ac_have_decl=0
12379 fi
12380
12381 cat >>confdefs.h <<_ACEOF
12382 #define HAVE_DECL_FFS $ac_have_decl
12383 _ACEOF
12384 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12385 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12386   ac_have_decl=1
12387 else
12388   ac_have_decl=0
12389 fi
12390
12391 cat >>confdefs.h <<_ACEOF
12392 #define HAVE_DECL_ASPRINTF $ac_have_decl
12393 _ACEOF
12394 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12395 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12396   ac_have_decl=1
12397 else
12398   ac_have_decl=0
12399 fi
12400
12401 cat >>confdefs.h <<_ACEOF
12402 #define HAVE_DECL_VASPRINTF $ac_have_decl
12403 _ACEOF
12404 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12405 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12406   ac_have_decl=1
12407 else
12408   ac_have_decl=0
12409 fi
12410
12411 cat >>confdefs.h <<_ACEOF
12412 #define HAVE_DECL_SNPRINTF $ac_have_decl
12413 _ACEOF
12414 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12415 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12416   ac_have_decl=1
12417 else
12418   ac_have_decl=0
12419 fi
12420
12421 cat >>confdefs.h <<_ACEOF
12422 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12423 _ACEOF
12424
12425   ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12426 if test "x$ac_cv_have_decl_strtol" = 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_STRTOL $ac_have_decl
12434 _ACEOF
12435 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12436 if test "x$ac_cv_have_decl_strtoul" = 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_STRTOUL $ac_have_decl
12444 _ACEOF
12445 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12446 if test "x$ac_cv_have_decl_strtoll" = 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_STRTOLL $ac_have_decl
12454 _ACEOF
12455 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12456 if test "x$ac_cv_have_decl_strtoull" = 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_STRTOULL $ac_have_decl
12464 _ACEOF
12465
12466   ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12467 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12468   ac_have_decl=1
12469 else
12470   ac_have_decl=0
12471 fi
12472
12473 cat >>confdefs.h <<_ACEOF
12474 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12475 _ACEOF
12476
12477
12478
12479 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12480 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12481   ac_have_decl=1
12482 else
12483   ac_have_decl=0
12484 fi
12485
12486 cat >>confdefs.h <<_ACEOF
12487 #define HAVE_DECL_SNPRINTF $ac_have_decl
12488 _ACEOF
12489
12490
12491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12492 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12493 if ${am_cv_val_LC_MESSAGES+:} false; then :
12494   $as_echo_n "(cached) " >&6
12495 else
12496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12497 /* end confdefs.h.  */
12498 #include <locale.h>
12499 int
12500 main ()
12501 {
12502 return LC_MESSAGES
12503   ;
12504   return 0;
12505 }
12506 _ACEOF
12507 if ac_fn_c_try_link "$LINENO"; then :
12508   am_cv_val_LC_MESSAGES=yes
12509 else
12510   am_cv_val_LC_MESSAGES=no
12511 fi
12512 rm -f core conftest.err conftest.$ac_objext \
12513     conftest$ac_exeext conftest.$ac_ext
12514 fi
12515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12516 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12517   if test $am_cv_val_LC_MESSAGES = yes; then
12518
12519 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12520
12521   fi
12522
12523
12524 # ----------------------- #
12525 # Checks for structures.  #
12526 # ----------------------- #
12527
12528 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
12529 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
12530
12531 cat >>confdefs.h <<_ACEOF
12532 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
12533 _ACEOF
12534
12535
12536 fi
12537 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
12538 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
12539
12540 cat >>confdefs.h <<_ACEOF
12541 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12542 _ACEOF
12543
12544
12545 fi
12546
12547
12548 # ------------------ #
12549 # Checks for types.  #
12550 # ------------------ #
12551
12552 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12553 #include <sys/socket.h>
12554
12555 "
12556 if test "x$ac_cv_type_socklen_t" = xyes; then :
12557
12558 cat >>confdefs.h <<_ACEOF
12559 #define HAVE_SOCKLEN_T 1
12560 _ACEOF
12561
12562
12563 fi
12564
12565
12566 # ------------------------------------- #
12567 # Checks for compiler characteristics.  #
12568 # ------------------------------------- #
12569
12570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12571 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12572 if ${ac_cv_c_const+:} false; then :
12573   $as_echo_n "(cached) " >&6
12574 else
12575   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12576 /* end confdefs.h.  */
12577
12578 int
12579 main ()
12580 {
12581
12582 #ifndef __cplusplus
12583   /* Ultrix mips cc rejects this sort of thing.  */
12584   typedef int charset[2];
12585   const charset cs = { 0, 0 };
12586   /* SunOS 4.1.1 cc rejects this.  */
12587   char const *const *pcpcc;
12588   char **ppc;
12589   /* NEC SVR4.0.2 mips cc rejects this.  */
12590   struct point {int x, y;};
12591   static struct point const zero = {0,0};
12592   /* AIX XL C 1.02.0.0 rejects this.
12593      It does not let you subtract one const X* pointer from another in
12594      an arm of an if-expression whose if-part is not a constant
12595      expression */
12596   const char *g = "string";
12597   pcpcc = &g + (g ? g-g : 0);
12598   /* HPUX 7.0 cc rejects these. */
12599   ++pcpcc;
12600   ppc = (char**) pcpcc;
12601   pcpcc = (char const *const *) ppc;
12602   { /* SCO 3.2v4 cc rejects this sort of thing.  */
12603     char tx;
12604     char *t = &tx;
12605     char const *s = 0 ? (char *) 0 : (char const *) 0;
12606
12607     *t++ = 0;
12608     if (s) return 0;
12609   }
12610   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12611     int x[] = {25, 17};
12612     const int *foo = &x[0];
12613     ++foo;
12614   }
12615   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12616     typedef const int *iptr;
12617     iptr p = 0;
12618     ++p;
12619   }
12620   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12621        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12622     struct s { int j; const int *ap[3]; } bx;
12623     struct s *b = &bx; b->j = 5;
12624   }
12625   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12626     const int foo = 10;
12627     if (!foo) return 0;
12628   }
12629   return !cs[0] && !zero.x;
12630 #endif
12631
12632   ;
12633   return 0;
12634 }
12635 _ACEOF
12636 if ac_fn_c_try_compile "$LINENO"; then :
12637   ac_cv_c_const=yes
12638 else
12639   ac_cv_c_const=no
12640 fi
12641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12642 fi
12643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12644 $as_echo "$ac_cv_c_const" >&6; }
12645 if test $ac_cv_c_const = no; then
12646
12647 $as_echo "#define const /**/" >>confdefs.h
12648
12649 fi
12650
12651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12652 $as_echo_n "checking for inline... " >&6; }
12653 if ${ac_cv_c_inline+:} false; then :
12654   $as_echo_n "(cached) " >&6
12655 else
12656   ac_cv_c_inline=no
12657 for ac_kw in inline __inline__ __inline; do
12658   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12659 /* end confdefs.h.  */
12660 #ifndef __cplusplus
12661 typedef int foo_t;
12662 static $ac_kw foo_t static_foo () {return 0; }
12663 $ac_kw foo_t foo () {return 0; }
12664 #endif
12665
12666 _ACEOF
12667 if ac_fn_c_try_compile "$LINENO"; then :
12668   ac_cv_c_inline=$ac_kw
12669 fi
12670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12671   test "$ac_cv_c_inline" != no && break
12672 done
12673
12674 fi
12675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12676 $as_echo "$ac_cv_c_inline" >&6; }
12677
12678 case $ac_cv_c_inline in
12679   inline | yes) ;;
12680   *)
12681     case $ac_cv_c_inline in
12682       no) ac_val=;;
12683       *) ac_val=$ac_cv_c_inline;;
12684     esac
12685     cat >>confdefs.h <<_ACEOF
12686 #ifndef __cplusplus
12687 #define inline $ac_val
12688 #endif
12689 _ACEOF
12690     ;;
12691 esac
12692
12693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12694 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12695 if ${ac_cv_c_bigendian+:} false; then :
12696   $as_echo_n "(cached) " >&6
12697 else
12698   ac_cv_c_bigendian=unknown
12699     # See if we're dealing with a universal compiler.
12700     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12701 /* end confdefs.h.  */
12702 #ifndef __APPLE_CC__
12703                not a universal capable compiler
12704              #endif
12705              typedef int dummy;
12706
12707 _ACEOF
12708 if ac_fn_c_try_compile "$LINENO"; then :
12709
12710         # Check for potential -arch flags.  It is not universal unless
12711         # there are at least two -arch flags with different values.
12712         ac_arch=
12713         ac_prev=
12714         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12715          if test -n "$ac_prev"; then
12716            case $ac_word in
12717              i?86 | x86_64 | ppc | ppc64)
12718                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12719                  ac_arch=$ac_word
12720                else
12721                  ac_cv_c_bigendian=universal
12722                  break
12723                fi
12724                ;;
12725            esac
12726            ac_prev=
12727          elif test "x$ac_word" = "x-arch"; then
12728            ac_prev=arch
12729          fi
12730        done
12731 fi
12732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12733     if test $ac_cv_c_bigendian = unknown; then
12734       # See if sys/param.h defines the BYTE_ORDER macro.
12735       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12736 /* end confdefs.h.  */
12737 #include <sys/types.h>
12738              #include <sys/param.h>
12739
12740 int
12741 main ()
12742 {
12743 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12744                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12745                      && LITTLE_ENDIAN)
12746               bogus endian macros
12747              #endif
12748
12749   ;
12750   return 0;
12751 }
12752 _ACEOF
12753 if ac_fn_c_try_compile "$LINENO"; then :
12754   # It does; now see whether it defined to BIG_ENDIAN or not.
12755          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756 /* end confdefs.h.  */
12757 #include <sys/types.h>
12758                 #include <sys/param.h>
12759
12760 int
12761 main ()
12762 {
12763 #if BYTE_ORDER != BIG_ENDIAN
12764                  not big endian
12765                 #endif
12766
12767   ;
12768   return 0;
12769 }
12770 _ACEOF
12771 if ac_fn_c_try_compile "$LINENO"; then :
12772   ac_cv_c_bigendian=yes
12773 else
12774   ac_cv_c_bigendian=no
12775 fi
12776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12777 fi
12778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12779     fi
12780     if test $ac_cv_c_bigendian = unknown; then
12781       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12782       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12783 /* end confdefs.h.  */
12784 #include <limits.h>
12785
12786 int
12787 main ()
12788 {
12789 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12790               bogus endian macros
12791              #endif
12792
12793   ;
12794   return 0;
12795 }
12796 _ACEOF
12797 if ac_fn_c_try_compile "$LINENO"; then :
12798   # It does; now see whether it defined to _BIG_ENDIAN or not.
12799          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12800 /* end confdefs.h.  */
12801 #include <limits.h>
12802
12803 int
12804 main ()
12805 {
12806 #ifndef _BIG_ENDIAN
12807                  not big endian
12808                 #endif
12809
12810   ;
12811   return 0;
12812 }
12813 _ACEOF
12814 if ac_fn_c_try_compile "$LINENO"; then :
12815   ac_cv_c_bigendian=yes
12816 else
12817   ac_cv_c_bigendian=no
12818 fi
12819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12820 fi
12821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12822     fi
12823     if test $ac_cv_c_bigendian = unknown; then
12824       # Compile a test program.
12825       if test "$cross_compiling" = yes; then :
12826   # Try to guess by grepping values from an object file.
12827          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12828 /* end confdefs.h.  */
12829 short int ascii_mm[] =
12830                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12831                 short int ascii_ii[] =
12832                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12833                 int use_ascii (int i) {
12834                   return ascii_mm[i] + ascii_ii[i];
12835                 }
12836                 short int ebcdic_ii[] =
12837                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12838                 short int ebcdic_mm[] =
12839                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12840                 int use_ebcdic (int i) {
12841                   return ebcdic_mm[i] + ebcdic_ii[i];
12842                 }
12843                 extern int foo;
12844
12845 int
12846 main ()
12847 {
12848 return use_ascii (foo) == use_ebcdic (foo);
12849   ;
12850   return 0;
12851 }
12852 _ACEOF
12853 if ac_fn_c_try_compile "$LINENO"; then :
12854   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12855               ac_cv_c_bigendian=yes
12856             fi
12857             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12858               if test "$ac_cv_c_bigendian" = unknown; then
12859                 ac_cv_c_bigendian=no
12860               else
12861                 # finding both strings is unlikely to happen, but who knows?
12862                 ac_cv_c_bigendian=unknown
12863               fi
12864             fi
12865 fi
12866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12867 else
12868   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12869 /* end confdefs.h.  */
12870 $ac_includes_default
12871 int
12872 main ()
12873 {
12874
12875              /* Are we little or big endian?  From Harbison&Steele.  */
12876              union
12877              {
12878                long int l;
12879                char c[sizeof (long int)];
12880              } u;
12881              u.l = 1;
12882              return u.c[sizeof (long int) - 1] == 1;
12883
12884   ;
12885   return 0;
12886 }
12887 _ACEOF
12888 if ac_fn_c_try_run "$LINENO"; then :
12889   ac_cv_c_bigendian=no
12890 else
12891   ac_cv_c_bigendian=yes
12892 fi
12893 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12894   conftest.$ac_objext conftest.beam conftest.$ac_ext
12895 fi
12896
12897     fi
12898 fi
12899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12900 $as_echo "$ac_cv_c_bigendian" >&6; }
12901  case $ac_cv_c_bigendian in #(
12902    yes)
12903      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12904 ;; #(
12905    no)
12906       ;; #(
12907    universal)
12908
12909 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12910
12911      ;; #(
12912    *)
12913      as_fn_error $? "unknown endianness
12914  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12915  esac
12916
12917
12918 # ------------------------------ #
12919 # Checks for library functions.  #
12920 # ------------------------------ #
12921
12922
12923
12924
12925   for ac_header in $ac_header_list
12926 do :
12927   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12928 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12929 "
12930 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12931   cat >>confdefs.h <<_ACEOF
12932 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12933 _ACEOF
12934
12935 fi
12936
12937 done
12938
12939
12940
12941
12942
12943
12944
12945
12946 for ac_func in getpagesize
12947 do :
12948   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12949 if test "x$ac_cv_func_getpagesize" = xyes; then :
12950   cat >>confdefs.h <<_ACEOF
12951 #define HAVE_GETPAGESIZE 1
12952 _ACEOF
12953
12954 fi
12955 done
12956
12957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12958 $as_echo_n "checking for working mmap... " >&6; }
12959 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
12960   $as_echo_n "(cached) " >&6
12961 else
12962   if test "$cross_compiling" = yes; then :
12963   ac_cv_func_mmap_fixed_mapped=no
12964 else
12965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12966 /* end confdefs.h.  */
12967 $ac_includes_default
12968 /* malloc might have been renamed as rpl_malloc. */
12969 #undef malloc
12970
12971 /* Thanks to Mike Haertel and Jim Avera for this test.
12972    Here is a matrix of mmap possibilities:
12973         mmap private not fixed
12974         mmap private fixed at somewhere currently unmapped
12975         mmap private fixed at somewhere already mapped
12976         mmap shared not fixed
12977         mmap shared fixed at somewhere currently unmapped
12978         mmap shared fixed at somewhere already mapped
12979    For private mappings, we should verify that changes cannot be read()
12980    back from the file, nor mmap's back from the file at a different
12981    address.  (There have been systems where private was not correctly
12982    implemented like the infamous i386 svr4.0, and systems where the
12983    VM page cache was not coherent with the file system buffer cache
12984    like early versions of FreeBSD and possibly contemporary NetBSD.)
12985    For shared mappings, we should conversely verify that changes get
12986    propagated back to all the places they're supposed to be.
12987
12988    Grep wants private fixed already mapped.
12989    The main things grep needs to know about mmap are:
12990    * does it exist and is it safe to write into the mmap'd area
12991    * how to use it (BSD variants)  */
12992
12993 #include <fcntl.h>
12994 #include <sys/mman.h>
12995
12996 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12997 char *malloc ();
12998 #endif
12999
13000 /* This mess was copied from the GNU getpagesize.h.  */
13001 #ifndef HAVE_GETPAGESIZE
13002 # ifdef _SC_PAGESIZE
13003 #  define getpagesize() sysconf(_SC_PAGESIZE)
13004 # else /* no _SC_PAGESIZE */
13005 #  ifdef HAVE_SYS_PARAM_H
13006 #   include <sys/param.h>
13007 #   ifdef EXEC_PAGESIZE
13008 #    define getpagesize() EXEC_PAGESIZE
13009 #   else /* no EXEC_PAGESIZE */
13010 #    ifdef NBPG
13011 #     define getpagesize() NBPG * CLSIZE
13012 #     ifndef CLSIZE
13013 #      define CLSIZE 1
13014 #     endif /* no CLSIZE */
13015 #    else /* no NBPG */
13016 #     ifdef NBPC
13017 #      define getpagesize() NBPC
13018 #     else /* no NBPC */
13019 #      ifdef PAGESIZE
13020 #       define getpagesize() PAGESIZE
13021 #      endif /* PAGESIZE */
13022 #     endif /* no NBPC */
13023 #    endif /* no NBPG */
13024 #   endif /* no EXEC_PAGESIZE */
13025 #  else /* no HAVE_SYS_PARAM_H */
13026 #   define getpagesize() 8192   /* punt totally */
13027 #  endif /* no HAVE_SYS_PARAM_H */
13028 # endif /* no _SC_PAGESIZE */
13029
13030 #endif /* no HAVE_GETPAGESIZE */
13031
13032 int
13033 main ()
13034 {
13035   char *data, *data2, *data3;
13036   const char *cdata2;
13037   int i, pagesize;
13038   int fd, fd2;
13039
13040   pagesize = getpagesize ();
13041
13042   /* First, make a file with some known garbage in it. */
13043   data = (char *) malloc (pagesize);
13044   if (!data)
13045     return 1;
13046   for (i = 0; i < pagesize; ++i)
13047     *(data + i) = rand ();
13048   umask (0);
13049   fd = creat ("conftest.mmap", 0600);
13050   if (fd < 0)
13051     return 2;
13052   if (write (fd, data, pagesize) != pagesize)
13053     return 3;
13054   close (fd);
13055
13056   /* Next, check that the tail of a page is zero-filled.  File must have
13057      non-zero length, otherwise we risk SIGBUS for entire page.  */
13058   fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13059   if (fd2 < 0)
13060     return 4;
13061   cdata2 = "";
13062   if (write (fd2, cdata2, 1) != 1)
13063     return 5;
13064   data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13065   if (data2 == MAP_FAILED)
13066     return 6;
13067   for (i = 0; i < pagesize; ++i)
13068     if (*(data2 + i))
13069       return 7;
13070   close (fd2);
13071   if (munmap (data2, pagesize))
13072     return 8;
13073
13074   /* Next, try to mmap the file at a fixed address which already has
13075      something else allocated at it.  If we can, also make sure that
13076      we see the same garbage.  */
13077   fd = open ("conftest.mmap", O_RDWR);
13078   if (fd < 0)
13079     return 9;
13080   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13081                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
13082     return 10;
13083   for (i = 0; i < pagesize; ++i)
13084     if (*(data + i) != *(data2 + i))
13085       return 11;
13086
13087   /* Finally, make sure that changes to the mapped area do not
13088      percolate back to the file as seen by read().  (This is a bug on
13089      some variants of i386 svr4.0.)  */
13090   for (i = 0; i < pagesize; ++i)
13091     *(data2 + i) = *(data2 + i) + 1;
13092   data3 = (char *) malloc (pagesize);
13093   if (!data3)
13094     return 12;
13095   if (read (fd, data3, pagesize) != pagesize)
13096     return 13;
13097   for (i = 0; i < pagesize; ++i)
13098     if (*(data + i) != *(data3 + i))
13099       return 14;
13100   close (fd);
13101   return 0;
13102 }
13103 _ACEOF
13104 if ac_fn_c_try_run "$LINENO"; then :
13105   ac_cv_func_mmap_fixed_mapped=yes
13106 else
13107   ac_cv_func_mmap_fixed_mapped=no
13108 fi
13109 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13110   conftest.$ac_objext conftest.beam conftest.$ac_ext
13111 fi
13112
13113 fi
13114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13115 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13116 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13117
13118 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
13119
13120 fi
13121 rm -f conftest.mmap conftest.txt
13122
13123 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13124 if test "x$ac_cv_type_pid_t" = xyes; then :
13125
13126 else
13127
13128 cat >>confdefs.h <<_ACEOF
13129 #define pid_t int
13130 _ACEOF
13131
13132 fi
13133
13134 for ac_header in vfork.h
13135 do :
13136   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13137 if test "x$ac_cv_header_vfork_h" = xyes; then :
13138   cat >>confdefs.h <<_ACEOF
13139 #define HAVE_VFORK_H 1
13140 _ACEOF
13141
13142 fi
13143
13144 done
13145
13146 for ac_func in fork vfork
13147 do :
13148   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13149 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13150 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13151   cat >>confdefs.h <<_ACEOF
13152 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13153 _ACEOF
13154
13155 fi
13156 done
13157
13158 if test "x$ac_cv_func_fork" = xyes; then
13159   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13160 $as_echo_n "checking for working fork... " >&6; }
13161 if ${ac_cv_func_fork_works+:} false; then :
13162   $as_echo_n "(cached) " >&6
13163 else
13164   if test "$cross_compiling" = yes; then :
13165   ac_cv_func_fork_works=cross
13166 else
13167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13168 /* end confdefs.h.  */
13169 $ac_includes_default
13170 int
13171 main ()
13172 {
13173
13174           /* By Ruediger Kuhlmann. */
13175           return fork () < 0;
13176
13177   ;
13178   return 0;
13179 }
13180 _ACEOF
13181 if ac_fn_c_try_run "$LINENO"; then :
13182   ac_cv_func_fork_works=yes
13183 else
13184   ac_cv_func_fork_works=no
13185 fi
13186 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13187   conftest.$ac_objext conftest.beam conftest.$ac_ext
13188 fi
13189
13190 fi
13191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13192 $as_echo "$ac_cv_func_fork_works" >&6; }
13193
13194 else
13195   ac_cv_func_fork_works=$ac_cv_func_fork
13196 fi
13197 if test "x$ac_cv_func_fork_works" = xcross; then
13198   case $host in
13199     *-*-amigaos* | *-*-msdosdjgpp*)
13200       # Override, as these systems have only a dummy fork() stub
13201       ac_cv_func_fork_works=no
13202       ;;
13203     *)
13204       ac_cv_func_fork_works=yes
13205       ;;
13206   esac
13207   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13208 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13209 fi
13210 ac_cv_func_vfork_works=$ac_cv_func_vfork
13211 if test "x$ac_cv_func_vfork" = xyes; then
13212   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13213 $as_echo_n "checking for working vfork... " >&6; }
13214 if ${ac_cv_func_vfork_works+:} false; then :
13215   $as_echo_n "(cached) " >&6
13216 else
13217   if test "$cross_compiling" = yes; then :
13218   ac_cv_func_vfork_works=cross
13219 else
13220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13221 /* end confdefs.h.  */
13222 /* Thanks to Paul Eggert for this test.  */
13223 $ac_includes_default
13224 #include <sys/wait.h>
13225 #ifdef HAVE_VFORK_H
13226 # include <vfork.h>
13227 #endif
13228 /* On some sparc systems, changes by the child to local and incoming
13229    argument registers are propagated back to the parent.  The compiler
13230    is told about this with #include <vfork.h>, but some compilers
13231    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
13232    static variable whose address is put into a register that is
13233    clobbered by the vfork.  */
13234 static void
13235 #ifdef __cplusplus
13236 sparc_address_test (int arg)
13237 # else
13238 sparc_address_test (arg) int arg;
13239 #endif
13240 {
13241   static pid_t child;
13242   if (!child) {
13243     child = vfork ();
13244     if (child < 0) {
13245       perror ("vfork");
13246       _exit(2);
13247     }
13248     if (!child) {
13249       arg = getpid();
13250       write(-1, "", 0);
13251       _exit (arg);
13252     }
13253   }
13254 }
13255
13256 int
13257 main ()
13258 {
13259   pid_t parent = getpid ();
13260   pid_t child;
13261
13262   sparc_address_test (0);
13263
13264   child = vfork ();
13265
13266   if (child == 0) {
13267     /* Here is another test for sparc vfork register problems.  This
13268        test uses lots of local variables, at least as many local
13269        variables as main has allocated so far including compiler
13270        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
13271        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
13272        reuse the register of parent for one of the local variables,
13273        since it will think that parent can't possibly be used any more
13274        in this routine.  Assigning to the local variable will thus
13275        munge parent in the parent process.  */
13276     pid_t
13277       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13278       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13279     /* Convince the compiler that p..p7 are live; otherwise, it might
13280        use the same hardware register for all 8 local variables.  */
13281     if (p != p1 || p != p2 || p != p3 || p != p4
13282         || p != p5 || p != p6 || p != p7)
13283       _exit(1);
13284
13285     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13286        from child file descriptors.  If the child closes a descriptor
13287        before it execs or exits, this munges the parent's descriptor
13288        as well.  Test for this by closing stdout in the child.  */
13289     _exit(close(fileno(stdout)) != 0);
13290   } else {
13291     int status;
13292     struct stat st;
13293
13294     while (wait(&status) != child)
13295       ;
13296     return (
13297          /* Was there some problem with vforking?  */
13298          child < 0
13299
13300          /* Did the child fail?  (This shouldn't happen.)  */
13301          || status
13302
13303          /* Did the vfork/compiler bug occur?  */
13304          || parent != getpid()
13305
13306          /* Did the file descriptor bug occur?  */
13307          || fstat(fileno(stdout), &st) != 0
13308          );
13309   }
13310 }
13311 _ACEOF
13312 if ac_fn_c_try_run "$LINENO"; then :
13313   ac_cv_func_vfork_works=yes
13314 else
13315   ac_cv_func_vfork_works=no
13316 fi
13317 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13318   conftest.$ac_objext conftest.beam conftest.$ac_ext
13319 fi
13320
13321 fi
13322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13323 $as_echo "$ac_cv_func_vfork_works" >&6; }
13324
13325 fi;
13326 if test "x$ac_cv_func_fork_works" = xcross; then
13327   ac_cv_func_vfork_works=$ac_cv_func_vfork
13328   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13329 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13330 fi
13331
13332 if test "x$ac_cv_func_vfork_works" = xyes; then
13333
13334 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13335
13336 else
13337
13338 $as_echo "#define vfork fork" >>confdefs.h
13339
13340 fi
13341 if test "x$ac_cv_func_fork_works" = xyes; then
13342
13343 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13344
13345 fi
13346
13347 for ac_func in getauxval getrusage getuid getgid \
13348                 pipe poll pread pread64 pwrite resize_term \
13349                 sbrk getpgid setpgid setpgrp setsid \
13350                 sigaction sigprocmask sigsetmask socketpair \
13351                 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
13352                 setrlimit getrlimit posix_madvise waitpid \
13353                 ptrace64 sigaltstack setns use_default_colors
13354 do :
13355   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13356 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13357 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13358   cat >>confdefs.h <<_ACEOF
13359 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13360 _ACEOF
13361
13362 fi
13363 done
13364
13365
13366   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13367 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13368 if ${am_cv_langinfo_codeset+:} false; then :
13369   $as_echo_n "(cached) " >&6
13370 else
13371   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13372 /* end confdefs.h.  */
13373 #include <langinfo.h>
13374 int
13375 main ()
13376 {
13377 char* cs = nl_langinfo(CODESET);
13378   ;
13379   return 0;
13380 }
13381 _ACEOF
13382 if ac_fn_c_try_link "$LINENO"; then :
13383   am_cv_langinfo_codeset=yes
13384 else
13385   am_cv_langinfo_codeset=no
13386 fi
13387 rm -f core conftest.err conftest.$ac_objext \
13388     conftest$ac_exeext conftest.$ac_ext
13389
13390 fi
13391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13392 $as_echo "$am_cv_langinfo_codeset" >&6; }
13393   if test $am_cv_langinfo_codeset = yes; then
13394
13395 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13396
13397   fi
13398
13399 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13400 if test "x$ac_cv_type_size_t" = xyes; then :
13401
13402 else
13403
13404 cat >>confdefs.h <<_ACEOF
13405 #define size_t unsigned int
13406 _ACEOF
13407
13408 fi
13409
13410
13411   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13412 $as_echo_n "checking for ANSI C header files... " >&6; }
13413 if ${ac_cv_header_stdc+:} false; then :
13414   $as_echo_n "(cached) " >&6
13415 else
13416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13417 /* end confdefs.h.  */
13418 #include <stdlib.h>
13419 #include <stdarg.h>
13420 #include <string.h>
13421 #include <float.h>
13422
13423 int
13424 main ()
13425 {
13426
13427   ;
13428   return 0;
13429 }
13430 _ACEOF
13431 if ac_fn_c_try_compile "$LINENO"; then :
13432   ac_cv_header_stdc=yes
13433 else
13434   ac_cv_header_stdc=no
13435 fi
13436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13437
13438 if test $ac_cv_header_stdc = yes; then
13439   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13441 /* end confdefs.h.  */
13442 #include <string.h>
13443
13444 _ACEOF
13445 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13446   $EGREP "memchr" >/dev/null 2>&1; then :
13447
13448 else
13449   ac_cv_header_stdc=no
13450 fi
13451 rm -f conftest*
13452
13453 fi
13454
13455 if test $ac_cv_header_stdc = yes; then
13456   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13458 /* end confdefs.h.  */
13459 #include <stdlib.h>
13460
13461 _ACEOF
13462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13463   $EGREP "free" >/dev/null 2>&1; then :
13464
13465 else
13466   ac_cv_header_stdc=no
13467 fi
13468 rm -f conftest*
13469
13470 fi
13471
13472 if test $ac_cv_header_stdc = yes; then
13473   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13474   if test "$cross_compiling" = yes; then :
13475   :
13476 else
13477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13478 /* end confdefs.h.  */
13479 #include <ctype.h>
13480 #include <stdlib.h>
13481 #if ((' ' & 0x0FF) == 0x020)
13482 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13483 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13484 #else
13485 # define ISLOWER(c) \
13486                    (('a' <= (c) && (c) <= 'i') \
13487                      || ('j' <= (c) && (c) <= 'r') \
13488                      || ('s' <= (c) && (c) <= 'z'))
13489 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13490 #endif
13491
13492 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13493 int
13494 main ()
13495 {
13496   int i;
13497   for (i = 0; i < 256; i++)
13498     if (XOR (islower (i), ISLOWER (i))
13499         || toupper (i) != TOUPPER (i))
13500       return 2;
13501   return 0;
13502 }
13503 _ACEOF
13504 if ac_fn_c_try_run "$LINENO"; then :
13505
13506 else
13507   ac_cv_header_stdc=no
13508 fi
13509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13510   conftest.$ac_objext conftest.beam conftest.$ac_ext
13511 fi
13512
13513 fi
13514 fi
13515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13516 $as_echo "$ac_cv_header_stdc" >&6; }
13517 if test $ac_cv_header_stdc = yes; then
13518
13519 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13520
13521 fi
13522
13523   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13524 # for constant arguments.  Useless!
13525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13526 $as_echo_n "checking for working alloca.h... " >&6; }
13527 if ${ac_cv_working_alloca_h+:} false; then :
13528   $as_echo_n "(cached) " >&6
13529 else
13530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13531 /* end confdefs.h.  */
13532 #include <alloca.h>
13533 int
13534 main ()
13535 {
13536 char *p = (char *) alloca (2 * sizeof (int));
13537                           if (p) return 0;
13538   ;
13539   return 0;
13540 }
13541 _ACEOF
13542 if ac_fn_c_try_link "$LINENO"; then :
13543   ac_cv_working_alloca_h=yes
13544 else
13545   ac_cv_working_alloca_h=no
13546 fi
13547 rm -f core conftest.err conftest.$ac_objext \
13548     conftest$ac_exeext conftest.$ac_ext
13549 fi
13550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13551 $as_echo "$ac_cv_working_alloca_h" >&6; }
13552 if test $ac_cv_working_alloca_h = yes; then
13553
13554 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13555
13556 fi
13557
13558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13559 $as_echo_n "checking for alloca... " >&6; }
13560 if ${ac_cv_func_alloca_works+:} false; then :
13561   $as_echo_n "(cached) " >&6
13562 else
13563   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13564 /* end confdefs.h.  */
13565 #ifdef __GNUC__
13566 # define alloca __builtin_alloca
13567 #else
13568 # ifdef _MSC_VER
13569 #  include <malloc.h>
13570 #  define alloca _alloca
13571 # else
13572 #  ifdef HAVE_ALLOCA_H
13573 #   include <alloca.h>
13574 #  else
13575 #   ifdef _AIX
13576  #pragma alloca
13577 #   else
13578 #    ifndef alloca /* predefined by HP cc +Olibcalls */
13579 void *alloca (size_t);
13580 #    endif
13581 #   endif
13582 #  endif
13583 # endif
13584 #endif
13585
13586 int
13587 main ()
13588 {
13589 char *p = (char *) alloca (1);
13590                                     if (p) return 0;
13591   ;
13592   return 0;
13593 }
13594 _ACEOF
13595 if ac_fn_c_try_link "$LINENO"; then :
13596   ac_cv_func_alloca_works=yes
13597 else
13598   ac_cv_func_alloca_works=no
13599 fi
13600 rm -f core conftest.err conftest.$ac_objext \
13601     conftest$ac_exeext conftest.$ac_ext
13602 fi
13603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13604 $as_echo "$ac_cv_func_alloca_works" >&6; }
13605
13606 if test $ac_cv_func_alloca_works = yes; then
13607
13608 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13609
13610 else
13611   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13612 # that cause trouble.  Some versions do not even contain alloca or
13613 # contain a buggy version.  If you still want to use their alloca,
13614 # use ar to extract alloca.o from them instead of compiling alloca.c.
13615
13616 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13617
13618 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13619
13620
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13622 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13623 if ${ac_cv_os_cray+:} false; then :
13624   $as_echo_n "(cached) " >&6
13625 else
13626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13627 /* end confdefs.h.  */
13628 #if defined CRAY && ! defined CRAY2
13629 webecray
13630 #else
13631 wenotbecray
13632 #endif
13633
13634 _ACEOF
13635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13636   $EGREP "webecray" >/dev/null 2>&1; then :
13637   ac_cv_os_cray=yes
13638 else
13639   ac_cv_os_cray=no
13640 fi
13641 rm -f conftest*
13642
13643 fi
13644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13645 $as_echo "$ac_cv_os_cray" >&6; }
13646 if test $ac_cv_os_cray = yes; then
13647   for ac_func in _getb67 GETB67 getb67; do
13648     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13649 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13650 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13651
13652 cat >>confdefs.h <<_ACEOF
13653 #define CRAY_STACKSEG_END $ac_func
13654 _ACEOF
13655
13656     break
13657 fi
13658
13659   done
13660 fi
13661
13662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13663 $as_echo_n "checking stack direction for C alloca... " >&6; }
13664 if ${ac_cv_c_stack_direction+:} false; then :
13665   $as_echo_n "(cached) " >&6
13666 else
13667   if test "$cross_compiling" = yes; then :
13668   ac_cv_c_stack_direction=0
13669 else
13670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13671 /* end confdefs.h.  */
13672 $ac_includes_default
13673 int
13674 find_stack_direction (int *addr, int depth)
13675 {
13676   int dir, dummy = 0;
13677   if (! addr)
13678     addr = &dummy;
13679   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13680   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13681   return dir + dummy;
13682 }
13683
13684 int
13685 main (int argc, char **argv)
13686 {
13687   return find_stack_direction (0, argc + !argv + 20) < 0;
13688 }
13689 _ACEOF
13690 if ac_fn_c_try_run "$LINENO"; then :
13691   ac_cv_c_stack_direction=1
13692 else
13693   ac_cv_c_stack_direction=-1
13694 fi
13695 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13696   conftest.$ac_objext conftest.beam conftest.$ac_ext
13697 fi
13698
13699 fi
13700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13701 $as_echo "$ac_cv_c_stack_direction" >&6; }
13702 cat >>confdefs.h <<_ACEOF
13703 #define STACK_DIRECTION $ac_cv_c_stack_direction
13704 _ACEOF
13705
13706
13707 fi
13708
13709
13710
13711   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13712 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13713 if ${am_cv_langinfo_codeset+:} false; then :
13714   $as_echo_n "(cached) " >&6
13715 else
13716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13717 /* end confdefs.h.  */
13718 #include <langinfo.h>
13719 int
13720 main ()
13721 {
13722 char* cs = nl_langinfo(CODESET);
13723   ;
13724   return 0;
13725 }
13726 _ACEOF
13727 if ac_fn_c_try_link "$LINENO"; then :
13728   am_cv_langinfo_codeset=yes
13729 else
13730   am_cv_langinfo_codeset=no
13731 fi
13732 rm -f core conftest.err conftest.$ac_objext \
13733     conftest$ac_exeext conftest.$ac_ext
13734
13735 fi
13736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13737 $as_echo "$am_cv_langinfo_codeset" >&6; }
13738   if test $am_cv_langinfo_codeset = yes; then
13739
13740 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13741
13742   fi
13743
13744
13745   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
13746 do :
13747   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13748 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13749 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13750   cat >>confdefs.h <<_ACEOF
13751 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13752 _ACEOF
13753
13754 fi
13755
13756 done
13757
13758
13759   for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
13760 do :
13761   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13762 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13763 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13764   cat >>confdefs.h <<_ACEOF
13765 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13766 _ACEOF
13767
13768 fi
13769 done
13770
13771
13772   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13773 if test "x$ac_cv_have_decl_strerror" = xyes; then :
13774   ac_have_decl=1
13775 else
13776   ac_have_decl=0
13777 fi
13778
13779 cat >>confdefs.h <<_ACEOF
13780 #define HAVE_DECL_STRERROR $ac_have_decl
13781 _ACEOF
13782 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13783 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13784   ac_have_decl=1
13785 else
13786   ac_have_decl=0
13787 fi
13788
13789 cat >>confdefs.h <<_ACEOF
13790 #define HAVE_DECL_STRSTR $ac_have_decl
13791 _ACEOF
13792
13793
13794     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13795 $as_echo_n "checking for sigsetjmp... " >&6; }
13796 if ${gdb_cv_func_sigsetjmp+:} false; then :
13797   $as_echo_n "(cached) " >&6
13798 else
13799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13800 /* end confdefs.h.  */
13801
13802 #include <setjmp.h>
13803
13804 int
13805 main ()
13806 {
13807 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13808   ;
13809   return 0;
13810 }
13811 _ACEOF
13812 if ac_fn_c_try_compile "$LINENO"; then :
13813   gdb_cv_func_sigsetjmp=yes
13814 else
13815   gdb_cv_func_sigsetjmp=no
13816 fi
13817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13818 fi
13819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13820 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13821 if test $gdb_cv_func_sigsetjmp = yes; then
13822
13823 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13824
13825 fi
13826
13827
13828 # Check the return and argument types of ptrace.
13829
13830
13831 for ac_header in sys/ptrace.h ptrace.h
13832 do :
13833   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13834 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13835 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13836   cat >>confdefs.h <<_ACEOF
13837 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13838 _ACEOF
13839
13840 fi
13841
13842 done
13843
13844
13845 gdb_ptrace_headers='
13846 #include <sys/types.h>
13847 #if HAVE_SYS_PTRACE_H
13848 # include <sys/ptrace.h>
13849 #endif
13850 #if HAVE_UNISTD_H
13851 # include <unistd.h>
13852 #endif
13853 '
13854 # There is no point in checking if we don't have a prototype.
13855 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
13856 "
13857 if test "x$ac_cv_have_decl_ptrace" = xyes; then :
13858   ac_have_decl=1
13859 else
13860   ac_have_decl=0
13861 fi
13862
13863 cat >>confdefs.h <<_ACEOF
13864 #define HAVE_DECL_PTRACE $ac_have_decl
13865 _ACEOF
13866 if test $ac_have_decl = 1; then :
13867
13868 else
13869
13870   : ${gdb_cv_func_ptrace_ret='int'}
13871   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13872
13873 fi
13874
13875 # Check return type.  Varargs (used on GNU/Linux) conflict with the
13876 # empty argument list, so check for that explicitly.
13877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13878 $as_echo_n "checking return type of ptrace... " >&6; }
13879 if ${gdb_cv_func_ptrace_ret+:} false; then :
13880   $as_echo_n "(cached) " >&6
13881 else
13882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13883 /* end confdefs.h.  */
13884 $gdb_ptrace_headers
13885 int
13886 main ()
13887 {
13888 extern long ptrace (enum __ptrace_request, ...);
13889   ;
13890   return 0;
13891 }
13892 _ACEOF
13893 if ac_fn_c_try_compile "$LINENO"; then :
13894   gdb_cv_func_ptrace_ret='long'
13895 else
13896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13897 /* end confdefs.h.  */
13898 $gdb_ptrace_headers
13899 int
13900 main ()
13901 {
13902 extern int ptrace ();
13903   ;
13904   return 0;
13905 }
13906 _ACEOF
13907 if ac_fn_c_try_compile "$LINENO"; then :
13908   gdb_cv_func_ptrace_ret='int'
13909 else
13910   gdb_cv_func_ptrace_ret='long'
13911 fi
13912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13913 fi
13914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13915 fi
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13917 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13918
13919 cat >>confdefs.h <<_ACEOF
13920 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13921 _ACEOF
13922
13923 # Check argument types.
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13925 $as_echo_n "checking types of arguments for ptrace... " >&6; }
13926 if ${gdb_cv_func_ptrace_args+:} false; then :
13927   $as_echo_n "(cached) " >&6
13928 else
13929
13930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13931 /* end confdefs.h.  */
13932 $gdb_ptrace_headers
13933 int
13934 main ()
13935 {
13936 extern long ptrace (enum __ptrace_request, ...);
13937   ;
13938   return 0;
13939 }
13940 _ACEOF
13941 if ac_fn_c_try_compile "$LINENO"; then :
13942   gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
13943 else
13944
13945 for gdb_arg1 in 'int' 'long'; do
13946  for gdb_arg2 in 'pid_t' 'int' 'long'; do
13947   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13948    for gdb_arg4 in 'int' 'long' 'void *'; do
13949      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13950 /* end confdefs.h.  */
13951 $gdb_ptrace_headers
13952 int
13953 main ()
13954 {
13955
13956 extern $gdb_cv_func_ptrace_ret
13957   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13958
13959   ;
13960   return 0;
13961 }
13962 _ACEOF
13963 if ac_fn_c_try_compile "$LINENO"; then :
13964   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13965     break 4;
13966 fi
13967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13968     for gdb_arg5 in 'int *' 'int' 'long'; do
13969      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13970 /* end confdefs.h.  */
13971 $gdb_ptrace_headers
13972 int
13973 main ()
13974 {
13975
13976 extern $gdb_cv_func_ptrace_ret
13977   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13978
13979   ;
13980   return 0;
13981 }
13982 _ACEOF
13983 if ac_fn_c_try_compile "$LINENO"; then :
13984
13985 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13986     break 5;
13987 fi
13988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13989     done
13990    done
13991   done
13992  done
13993 done
13994 # Provide a safe default value.
13995 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13996
13997 fi
13998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13999 fi
14000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
14001 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
14002 ac_save_IFS=$IFS; IFS=','
14003 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
14004 IFS=$ac_save_IFS
14005 shift
14006
14007 cat >>confdefs.h <<_ACEOF
14008 #define PTRACE_TYPE_ARG1 $1
14009 _ACEOF
14010
14011
14012 cat >>confdefs.h <<_ACEOF
14013 #define PTRACE_TYPE_ARG3 $3
14014 _ACEOF
14015
14016
14017 cat >>confdefs.h <<_ACEOF
14018 #define PTRACE_TYPE_ARG4 $4
14019 _ACEOF
14020
14021 if test -n "$5"; then
14022
14023 cat >>confdefs.h <<_ACEOF
14024 #define PTRACE_TYPE_ARG5 $5
14025 _ACEOF
14026
14027 fi
14028
14029
14030 if test "$cross_compiling" = no; then
14031   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14032 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14033 if ${ac_cv_func_setpgrp_void+:} false; then :
14034   $as_echo_n "(cached) " >&6
14035 else
14036   if test "$cross_compiling" = yes; then :
14037   as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
14038 else
14039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14040 /* end confdefs.h.  */
14041 $ac_includes_default
14042 int
14043 main ()
14044 {
14045 /* If this system has a BSD-style setpgrp which takes arguments,
14046   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14047   exit successfully. */
14048   return setpgrp (1,1) != -1;
14049   ;
14050   return 0;
14051 }
14052 _ACEOF
14053 if ac_fn_c_try_run "$LINENO"; then :
14054   ac_cv_func_setpgrp_void=no
14055 else
14056   ac_cv_func_setpgrp_void=yes
14057 fi
14058 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14059   conftest.$ac_objext conftest.beam conftest.$ac_ext
14060 fi
14061
14062 fi
14063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14064 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
14065 if test $ac_cv_func_setpgrp_void = yes; then
14066
14067 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
14068
14069 fi
14070
14071 else
14072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14073 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14074 if ${ac_cv_func_setpgrp_void+:} false; then :
14075   $as_echo_n "(cached) " >&6
14076 else
14077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14078 /* end confdefs.h.  */
14079
14080 #include <unistd.h>
14081
14082 int
14083 main ()
14084 {
14085
14086   if (setpgrp(1,1) == -1)
14087     exit (0);
14088   else
14089     exit (1);
14090
14091   ;
14092   return 0;
14093 }
14094 _ACEOF
14095 if ac_fn_c_try_compile "$LINENO"; then :
14096   ac_cv_func_setpgrp_void=no
14097 else
14098   ac_cv_func_setpgrp_void=yes
14099 fi
14100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14101 fi
14102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14103 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
14104 if test $ac_cv_func_setpgrp_void = yes; then
14105   $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
14106
14107 fi
14108 fi
14109
14110 # Assume we'll default to using the included libiberty regex.
14111 gdb_use_included_regex=yes
14112
14113 # However, if the system regex is GNU regex, then default to *not*
14114 # using the included regex.
14115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14116 $as_echo_n "checking for GNU regex... " >&6; }
14117 if ${gdb_cv_have_gnu_regex+:} false; then :
14118   $as_echo_n "(cached) " >&6
14119 else
14120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14121 /* end confdefs.h.  */
14122 #include <gnu-versions.h>
14123 int
14124 main ()
14125 {
14126 #define REGEX_INTERFACE_VERSION 1
14127 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14128 # error "Version mismatch"
14129 #endif
14130   ;
14131   return 0;
14132 }
14133 _ACEOF
14134 if ac_fn_c_try_compile "$LINENO"; then :
14135   gdb_cv_have_gnu_regex=yes
14136 else
14137   gdb_cv_have_gnu_regex=no
14138 fi
14139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14140 fi
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14142 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
14143 if test $gdb_cv_have_gnu_regex = yes; then
14144   gdb_use_included_regex=no
14145 fi
14146
14147
14148 # Check whether --with-included-regex was given.
14149 if test "${with_included_regex+set}" = set; then :
14150   withval=$with_included_regex; gdb_with_regex=$withval
14151 else
14152   gdb_with_regex=$gdb_use_included_regex
14153 fi
14154
14155 if test "$gdb_with_regex" = yes; then
14156
14157 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14158
14159 fi
14160
14161 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14162 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14163 #include <sys/proc.h>
14164
14165 "
14166 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
14167
14168 cat >>confdefs.h <<_ACEOF
14169 #define HAVE_STRUCT_THREAD_TD_PCB 1
14170 _ACEOF
14171
14172
14173 fi
14174
14175
14176 # See if <sys/lwp.h> defines `struct lwp`.
14177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14178 $as_echo_n "checking for struct lwp... " >&6; }
14179 if ${gdb_cv_struct_lwp+:} false; then :
14180   $as_echo_n "(cached) " >&6
14181 else
14182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14183 /* end confdefs.h.  */
14184 #include <sys/param.h>
14185 #define _KMEMUSER
14186 #include <sys/lwp.h>
14187 int
14188 main ()
14189 {
14190 struct lwp l;
14191   ;
14192   return 0;
14193 }
14194 _ACEOF
14195 if ac_fn_c_try_compile "$LINENO"; then :
14196   gdb_cv_struct_lwp=yes
14197 else
14198   gdb_cv_struct_lwp=no
14199 fi
14200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14201 fi
14202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14203 $as_echo "$gdb_cv_struct_lwp" >&6; }
14204 if test $gdb_cv_struct_lwp = yes; then
14205
14206 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
14207
14208 fi
14209
14210 # See if <machine/reg.h> degines `struct reg'.
14211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14212 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
14213 if ${gdb_cv_struct_reg+:} false; then :
14214   $as_echo_n "(cached) " >&6
14215 else
14216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14217 /* end confdefs.h.  */
14218 #include <sys/types.h>
14219 #include <machine/reg.h>
14220 int
14221 main ()
14222 {
14223 struct reg r;
14224   ;
14225   return 0;
14226 }
14227 _ACEOF
14228 if ac_fn_c_try_compile "$LINENO"; then :
14229   gdb_cv_struct_reg=yes
14230 else
14231   gdb_cv_struct_reg=no
14232 fi
14233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14234 fi
14235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14236 $as_echo "$gdb_cv_struct_reg" >&6; }
14237 if test $gdb_cv_struct_reg = yes; then
14238
14239 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
14240
14241 fi
14242
14243 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14244 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
14245 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14246 #include <machine/reg.h>
14247 "
14248 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
14249
14250 cat >>confdefs.h <<_ACEOF
14251 #define HAVE_STRUCT_REG_R_FS 1
14252 _ACEOF
14253
14254
14255 fi
14256 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14257 #include <machine/reg.h>
14258 "
14259 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
14260
14261 cat >>confdefs.h <<_ACEOF
14262 #define HAVE_STRUCT_REG_R_GS 1
14263 _ACEOF
14264
14265
14266 fi
14267
14268
14269 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14270 # Older amd64 Linux's don't have the fs_base and gs_base members of
14271 # `struct user_regs_struct'.
14272 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>
14273 #include <sys/user.h>
14274 "
14275 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
14276
14277 cat >>confdefs.h <<_ACEOF
14278 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14279 _ACEOF
14280
14281
14282 fi
14283 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>
14284 #include <sys/user.h>
14285 "
14286 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
14287
14288 cat >>confdefs.h <<_ACEOF
14289 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14290 _ACEOF
14291
14292
14293 fi
14294
14295
14296 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14298 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
14299 if ${gdb_cv_have_ptrace_getregs+:} false; then :
14300   $as_echo_n "(cached) " >&6
14301 else
14302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14303 /* end confdefs.h.  */
14304 #include <sys/ptrace.h>
14305 int
14306 main ()
14307 {
14308 PTRACE_GETREGS;
14309   ;
14310   return 0;
14311 }
14312 _ACEOF
14313 if ac_fn_c_try_compile "$LINENO"; then :
14314   gdb_cv_have_ptrace_getregs=yes
14315 else
14316   gdb_cv_have_ptrace_getregs=no
14317 fi
14318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14319 fi
14320
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14322 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
14323 if test $gdb_cv_have_ptrace_getregs = yes; then
14324
14325 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
14326
14327 fi
14328
14329 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
14330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14331 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14332 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
14333   $as_echo_n "(cached) " >&6
14334 else
14335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14336 /* end confdefs.h.  */
14337 #include <sys/ptrace.h>
14338 int
14339 main ()
14340 {
14341 PTRACE_GETFPXREGS;
14342   ;
14343   return 0;
14344 }
14345 _ACEOF
14346 if ac_fn_c_try_compile "$LINENO"; then :
14347   gdb_cv_have_ptrace_getfpxregs=yes
14348 else
14349   gdb_cv_have_ptrace_getfpxregs=no
14350 fi
14351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14352 fi
14353
14354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14355 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
14356 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
14357
14358 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
14359
14360 fi
14361
14362 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
14363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14364 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
14365 if ${gdb_cv_have_pt_getdbregs+:} false; then :
14366   $as_echo_n "(cached) " >&6
14367 else
14368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14369 /* end confdefs.h.  */
14370 #include <sys/types.h>
14371 #include <sys/ptrace.h>
14372 int
14373 main ()
14374 {
14375 PT_GETDBREGS;
14376   ;
14377   return 0;
14378 }
14379 _ACEOF
14380 if ac_fn_c_try_compile "$LINENO"; then :
14381   gdb_cv_have_pt_getdbregs=yes
14382 else
14383   gdb_cv_have_pt_getdbregs=no
14384 fi
14385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14386 fi
14387
14388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14389 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
14390 if test $gdb_cv_have_pt_getdbregs = yes; then
14391
14392 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
14393
14394 fi
14395
14396 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14398 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
14399 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
14400   $as_echo_n "(cached) " >&6
14401 else
14402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14403 /* end confdefs.h.  */
14404 #include <sys/types.h>
14405 #include <sys/ptrace.h>
14406 int
14407 main ()
14408 {
14409 PT_GETXMMREGS;
14410   ;
14411   return 0;
14412 }
14413 _ACEOF
14414 if ac_fn_c_try_compile "$LINENO"; then :
14415   gdb_cv_have_pt_getxmmregs=yes
14416 else
14417   gdb_cv_have_pt_getxmmregs=no
14418 fi
14419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14420 fi
14421
14422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14423 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
14424 if test $gdb_cv_have_pt_getxmmregs = yes; then
14425
14426 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
14427
14428 fi
14429
14430 # See if <sys/ptrace.h> supports LWP names on FreeBSD
14431 # Older FreeBSD versions don't have the pl_tdname member of
14432 # `struct ptrace_lwpinfo'.
14433 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14434 "
14435 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
14436
14437 cat >>confdefs.h <<_ACEOF
14438 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14439 _ACEOF
14440
14441
14442 fi
14443
14444
14445 # See if <sys/ptrace.h> supports syscall fields on FreeBSD.  The
14446 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14447 # FreeBSD 10.3.
14448 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>
14449 "
14450 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
14451
14452 cat >>confdefs.h <<_ACEOF
14453 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14454 _ACEOF
14455
14456
14457 fi
14458
14459
14460 if test "$ac_cv_header_sys_procfs_h" = yes; then
14461   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14462 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14463  if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14464   $as_echo_n "(cached) " >&6
14465 else
14466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14467 /* end confdefs.h.  */
14468
14469 #define _SYSCALL32
14470 /* Needed for new procfs interface on sparc-solaris.  */
14471 #define _STRUCTURED_PROC 1
14472 #include <sys/procfs.h>
14473 int
14474 main ()
14475 {
14476 gregset_t avar
14477   ;
14478   return 0;
14479 }
14480 _ACEOF
14481 if ac_fn_c_try_compile "$LINENO"; then :
14482   bfd_cv_have_sys_procfs_type_gregset_t=yes
14483 else
14484   bfd_cv_have_sys_procfs_type_gregset_t=no
14485
14486 fi
14487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14488 fi
14489
14490  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14491
14492 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14493
14494  fi
14495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14496 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14497
14498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14499 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14500  if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14501   $as_echo_n "(cached) " >&6
14502 else
14503   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14504 /* end confdefs.h.  */
14505
14506 #define _SYSCALL32
14507 /* Needed for new procfs interface on sparc-solaris.  */
14508 #define _STRUCTURED_PROC 1
14509 #include <sys/procfs.h>
14510 int
14511 main ()
14512 {
14513 fpregset_t avar
14514   ;
14515   return 0;
14516 }
14517 _ACEOF
14518 if ac_fn_c_try_compile "$LINENO"; then :
14519   bfd_cv_have_sys_procfs_type_fpregset_t=yes
14520 else
14521   bfd_cv_have_sys_procfs_type_fpregset_t=no
14522
14523 fi
14524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14525 fi
14526
14527  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14528
14529 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14530
14531  fi
14532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14533 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14534
14535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14536 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14537  if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14538   $as_echo_n "(cached) " >&6
14539 else
14540   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14541 /* end confdefs.h.  */
14542
14543 #define _SYSCALL32
14544 /* Needed for new procfs interface on sparc-solaris.  */
14545 #define _STRUCTURED_PROC 1
14546 #include <sys/procfs.h>
14547 int
14548 main ()
14549 {
14550 prgregset_t avar
14551   ;
14552   return 0;
14553 }
14554 _ACEOF
14555 if ac_fn_c_try_compile "$LINENO"; then :
14556   bfd_cv_have_sys_procfs_type_prgregset_t=yes
14557 else
14558   bfd_cv_have_sys_procfs_type_prgregset_t=no
14559
14560 fi
14561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14562 fi
14563
14564  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14565
14566 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14567
14568  fi
14569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14570 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14571
14572   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14573 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14574  if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
14575   $as_echo_n "(cached) " >&6
14576 else
14577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14578 /* end confdefs.h.  */
14579
14580 #define _SYSCALL32
14581 /* Needed for new procfs interface on sparc-solaris.  */
14582 #define _STRUCTURED_PROC 1
14583 #include <sys/procfs.h>
14584 int
14585 main ()
14586 {
14587 prfpregset_t avar
14588   ;
14589   return 0;
14590 }
14591 _ACEOF
14592 if ac_fn_c_try_compile "$LINENO"; then :
14593   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14594 else
14595   bfd_cv_have_sys_procfs_type_prfpregset_t=no
14596
14597 fi
14598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14599 fi
14600
14601  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14602
14603 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14604
14605  fi
14606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14607 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14608
14609   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14610 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14611  if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14612   $as_echo_n "(cached) " >&6
14613 else
14614   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14615 /* end confdefs.h.  */
14616
14617 #define _SYSCALL32
14618 /* Needed for new procfs interface on sparc-solaris.  */
14619 #define _STRUCTURED_PROC 1
14620 #include <sys/procfs.h>
14621 int
14622 main ()
14623 {
14624 prgregset32_t avar
14625   ;
14626   return 0;
14627 }
14628 _ACEOF
14629 if ac_fn_c_try_compile "$LINENO"; then :
14630   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14631 else
14632   bfd_cv_have_sys_procfs_type_prgregset32_t=no
14633
14634 fi
14635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14636 fi
14637
14638  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14639
14640 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14641
14642  fi
14643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14644 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14645
14646   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14647 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14648  if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
14649   $as_echo_n "(cached) " >&6
14650 else
14651   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14652 /* end confdefs.h.  */
14653
14654 #define _SYSCALL32
14655 /* Needed for new procfs interface on sparc-solaris.  */
14656 #define _STRUCTURED_PROC 1
14657 #include <sys/procfs.h>
14658 int
14659 main ()
14660 {
14661 lwpid_t avar
14662   ;
14663   return 0;
14664 }
14665 _ACEOF
14666 if ac_fn_c_try_compile "$LINENO"; then :
14667   bfd_cv_have_sys_procfs_type_lwpid_t=yes
14668 else
14669   bfd_cv_have_sys_procfs_type_lwpid_t=no
14670
14671 fi
14672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14673 fi
14674
14675  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14676
14677 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14678
14679  fi
14680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14681 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14682
14683   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14684 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14685  if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
14686   $as_echo_n "(cached) " >&6
14687 else
14688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14689 /* end confdefs.h.  */
14690
14691 #define _SYSCALL32
14692 /* Needed for new procfs interface on sparc-solaris.  */
14693 #define _STRUCTURED_PROC 1
14694 #include <sys/procfs.h>
14695 int
14696 main ()
14697 {
14698 psaddr_t avar
14699   ;
14700   return 0;
14701 }
14702 _ACEOF
14703 if ac_fn_c_try_compile "$LINENO"; then :
14704   bfd_cv_have_sys_procfs_type_psaddr_t=yes
14705 else
14706   bfd_cv_have_sys_procfs_type_psaddr_t=no
14707
14708 fi
14709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14710 fi
14711
14712  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14713
14714 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14715
14716  fi
14717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14718 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14719
14720   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14721 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14722  if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14723   $as_echo_n "(cached) " >&6
14724 else
14725   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14726 /* end confdefs.h.  */
14727
14728 #define _SYSCALL32
14729 /* Needed for new procfs interface on sparc-solaris.  */
14730 #define _STRUCTURED_PROC 1
14731 #include <sys/procfs.h>
14732 int
14733 main ()
14734 {
14735 elf_fpregset_t avar
14736   ;
14737   return 0;
14738 }
14739 _ACEOF
14740 if ac_fn_c_try_compile "$LINENO"; then :
14741   bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14742 else
14743   bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14744
14745 fi
14746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14747 fi
14748
14749  if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14750
14751 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14752
14753  fi
14754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14755 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14756
14757 fi
14758
14759 # Check if the compiler supports the `long long' type.
14760
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14762 $as_echo_n "checking for long long support in compiler... " >&6; }
14763 if ${gdb_cv_c_long_long+:} false; then :
14764   $as_echo_n "(cached) " >&6
14765 else
14766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14767 /* end confdefs.h.  */
14768 extern long long foo;
14769 int
14770 main ()
14771 {
14772 switch (foo & 2) { case 0: return 1; }
14773   ;
14774   return 0;
14775 }
14776 _ACEOF
14777 if ac_fn_c_try_compile "$LINENO"; then :
14778   gdb_cv_c_long_long=yes
14779 else
14780   gdb_cv_c_long_long=no
14781 fi
14782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14783 fi
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14785 $as_echo "$gdb_cv_c_long_long" >&6; }
14786 if test $gdb_cv_c_long_long != yes; then
14787   # libdecnumber requires long long.
14788   as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
14789 fi
14790
14791 # Check if the compiler and runtime support printing long longs.
14792
14793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14794 $as_echo_n "checking for long long support in printf... " >&6; }
14795 if ${gdb_cv_printf_has_long_long+:} false; then :
14796   $as_echo_n "(cached) " >&6
14797 else
14798   if test "$cross_compiling" = yes; then :
14799   gdb_cv_printf_has_long_long=no
14800 else
14801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14802 /* end confdefs.h.  */
14803 $ac_includes_default
14804 int
14805 main ()
14806 {
14807 char buf[32];
14808   long long l = 0;
14809   l = (l << 16) + 0x0123;
14810   l = (l << 16) + 0x4567;
14811   l = (l << 16) + 0x89ab;
14812   l = (l << 16) + 0xcdef;
14813   sprintf (buf, "0x%016llx", l);
14814   return (strcmp ("0x0123456789abcdef", buf));
14815   ;
14816   return 0;
14817 }
14818 _ACEOF
14819 if ac_fn_c_try_run "$LINENO"; then :
14820   gdb_cv_printf_has_long_long=yes
14821 else
14822   gdb_cv_printf_has_long_long=no
14823 fi
14824 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14825   conftest.$ac_objext conftest.beam conftest.$ac_ext
14826 fi
14827
14828 fi
14829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14830 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
14831 if test $gdb_cv_printf_has_long_long = yes; then
14832
14833 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
14834
14835 fi
14836
14837 # Check if the compiler and runtime support printing decfloats.
14838
14839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14840 $as_echo_n "checking for decfloat support in printf... " >&6; }
14841 if ${gdb_cv_printf_has_decfloat+:} false; then :
14842   $as_echo_n "(cached) " >&6
14843 else
14844   if test "$cross_compiling" = yes; then :
14845   gdb_cv_printf_has_decfloat=no
14846 else
14847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14848 /* end confdefs.h.  */
14849 $ac_includes_default
14850 int
14851 main ()
14852 {
14853 char buf[64];
14854   _Decimal32 d32 = 1.2345df;
14855   _Decimal64 d64 = 1.2345dd;
14856   _Decimal128 d128 = 1.2345dl;
14857   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14858   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14859   ;
14860   return 0;
14861 }
14862 _ACEOF
14863 if ac_fn_c_try_run "$LINENO"; then :
14864   gdb_cv_printf_has_decfloat=yes
14865 else
14866   gdb_cv_printf_has_decfloat=no
14867 fi
14868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14869   conftest.$ac_objext conftest.beam conftest.$ac_ext
14870 fi
14871
14872 fi
14873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14874 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
14875 if test $gdb_cv_printf_has_decfloat = yes; then
14876
14877 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
14878
14879 fi
14880
14881 # Check if the compiler supports the `long double' type.  We can't use
14882 # AC_C_LONG_DOUBLE because that one does additional checks on the
14883 # constants defined in <float.h> that fail on some systems,
14884 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
14885
14886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14887 $as_echo_n "checking for long double support in compiler... " >&6; }
14888 if ${gdb_cv_c_long_double+:} false; then :
14889   $as_echo_n "(cached) " >&6
14890 else
14891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14892 /* end confdefs.h.  */
14893 long double foo;
14894 _ACEOF
14895 if ac_fn_c_try_compile "$LINENO"; then :
14896   gdb_cv_c_long_double=yes
14897 else
14898   gdb_cv_c_long_double=no
14899 fi
14900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14901 fi
14902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14903 $as_echo "$gdb_cv_c_long_double" >&6; }
14904 if test $gdb_cv_c_long_double = yes; then
14905
14906 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
14907
14908 fi
14909
14910 # Check if the compiler and runtime support printing long doubles.
14911
14912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14913 $as_echo_n "checking for long double support in printf... " >&6; }
14914 if ${gdb_cv_printf_has_long_double+:} false; then :
14915   $as_echo_n "(cached) " >&6
14916 else
14917   if test "$cross_compiling" = yes; then :
14918   gdb_cv_printf_has_long_double=no
14919 else
14920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14921 /* end confdefs.h.  */
14922 $ac_includes_default
14923 int
14924 main ()
14925 {
14926 char buf[16];
14927   long double f = 3.141592653;
14928   sprintf (buf, "%Lg", f);
14929   return (strncmp ("3.14159", buf, 7));
14930   ;
14931   return 0;
14932 }
14933 _ACEOF
14934 if ac_fn_c_try_run "$LINENO"; then :
14935   gdb_cv_printf_has_long_double=yes
14936 else
14937   gdb_cv_printf_has_long_double=no
14938 fi
14939 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14940   conftest.$ac_objext conftest.beam conftest.$ac_ext
14941 fi
14942
14943 fi
14944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14945 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
14946 if test $gdb_cv_printf_has_long_double = yes; then
14947
14948 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
14949
14950 fi
14951
14952 # Check if the compiler and runtime support scanning long doubles.
14953
14954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14955 $as_echo_n "checking for long double support in scanf... " >&6; }
14956 if ${gdb_cv_scanf_has_long_double+:} false; then :
14957   $as_echo_n "(cached) " >&6
14958 else
14959   if test "$cross_compiling" = yes; then :
14960   gdb_cv_scanf_has_long_double=no
14961 else
14962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14963 /* end confdefs.h.  */
14964 #include <stdio.h>
14965 int
14966 main ()
14967 {
14968 char *buf = "3.141592653";
14969   long double f = 0;
14970   sscanf (buf, "%Lg", &f);
14971   return !(f > 3.14159 && f < 3.14160);
14972   ;
14973   return 0;
14974 }
14975 _ACEOF
14976 if ac_fn_c_try_run "$LINENO"; then :
14977   gdb_cv_scanf_has_long_double=yes
14978 else
14979   gdb_cv_scanf_has_long_double=no
14980 fi
14981 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14982   conftest.$ac_objext conftest.beam conftest.$ac_ext
14983 fi
14984
14985 fi
14986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14987 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
14988 if test $gdb_cv_scanf_has_long_double = yes; then
14989
14990 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
14991
14992 fi
14993
14994 case ${host_os} in
14995 aix*)
14996   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14997 $as_echo_n "checking for -bbigtoc option... " >&6; }
14998 if ${gdb_cv_bigtoc+:} false; then :
14999   $as_echo_n "(cached) " >&6
15000 else
15001
15002     SAVE_LDFLAGS=$LDFLAGS
15003
15004     case $GCC in
15005     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15006     *) gdb_cv_bigtoc=-bbigtoc ;;
15007     esac
15008
15009     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
15010     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15011 /* end confdefs.h.  */
15012
15013 int
15014 main ()
15015 {
15016 int i;
15017   ;
15018   return 0;
15019 }
15020 _ACEOF
15021 if ac_fn_c_try_link "$LINENO"; then :
15022
15023 else
15024   gdb_cv_bigtoc=
15025 fi
15026 rm -f core conftest.err conftest.$ac_objext \
15027     conftest$ac_exeext conftest.$ac_ext
15028     LDFLAGS="${SAVE_LDFLAGS}"
15029
15030 fi
15031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15032 $as_echo "$gdb_cv_bigtoc" >&6; }
15033   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15034   ;;
15035 esac
15036
15037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
15038 $as_echo_n "checking for the dynamic export flag... " >&6; }
15039 dynamic_list=false
15040 if test "${gdb_native}" = yes; then
15041    # The dynamically loaded libthread_db needs access to symbols in the gdb
15042    # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
15043    # may not be supported there.
15044    old_LDFLAGS="$LDFLAGS"
15045    # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15046    RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15047    LDFLAGS="$LDFLAGS $RDYNAMIC"
15048    if test "${have_libpython}" = no; then
15049      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15050 /* end confdefs.h.  */
15051
15052 int
15053 main ()
15054 {
15055
15056   ;
15057   return 0;
15058 }
15059 _ACEOF
15060 if ac_fn_c_try_link "$LINENO"; then :
15061   dynamic_list=true
15062 fi
15063 rm -f core conftest.err conftest.$ac_objext \
15064     conftest$ac_exeext conftest.$ac_ext
15065    else
15066      # Workaround http://bugs.python.org/issue4434 where static
15067      # libpythonX.Y.a would get its symbols required for
15068      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15069      # Problem does not happen for the recommended libpythonX.Y.so linkage.
15070
15071      # Note the workaround for Python
15072      # http://bugs.python.org/issue10112 earlier has removed
15073      # -export-dynamic from PYTHON_LIBS.  That's exactly what we want
15074      # here too, as otherwise it'd make this -Wl,--dynamic-list test
15075      # always pass.
15076      old_CFLAGS="$CFLAGS"
15077      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
15078      old_LIBS="$LIBS"
15079      LIBS="$LIBS $PYTHON_LIBS"
15080      old_CPPFLAGS="$CPPFLAGS"
15081      CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
15082      if test "$cross_compiling" = yes; then :
15083   true
15084 else
15085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15086 /* end confdefs.h.  */
15087 #include "Python.h"
15088 int
15089 main ()
15090 {
15091 int err;
15092           Py_Initialize ();
15093           err = PyRun_SimpleString ("import itertools\n");
15094           Py_Finalize ();
15095           return err == 0 ? 0 : 1;
15096   ;
15097   return 0;
15098 }
15099 _ACEOF
15100 if ac_fn_c_try_run "$LINENO"; then :
15101   dynamic_list=true
15102 fi
15103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15104   conftest.$ac_objext conftest.beam conftest.$ac_ext
15105 fi
15106
15107      LIBS="$old_LIBS"
15108      CFLAGS="$old_CFLAGS"
15109      CPPFLAGS="$old_CPPFLAGS"
15110    fi
15111    LDFLAGS="$old_LDFLAGS"
15112 fi
15113 if $dynamic_list; then
15114   found="-Wl,--dynamic-list"
15115   RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
15116 else
15117   found="-rdynamic"
15118   RDYNAMIC="-rdynamic"
15119 fi
15120
15121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
15122 $as_echo "$found" >&6; }
15123
15124
15125 if test ${build} = ${host} -a ${host} = ${target} ; then
15126    case ${host_os} in
15127    aix*)
15128       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15129 $as_echo_n "checking for AiX thread debugging library... " >&6; }
15130       if ${gdb_cv_have_aix_thread_debug+:} false; then :
15131   $as_echo_n "(cached) " >&6
15132 else
15133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15134 /* end confdefs.h.  */
15135 #include <sys/pthdebug.h>
15136 int
15137 main ()
15138 {
15139 #ifndef PTHDB_VERSION_3
15140                                     #error
15141                                     #endif
15142   ;
15143   return 0;
15144 }
15145 _ACEOF
15146 if ac_fn_c_try_compile "$LINENO"; then :
15147   gdb_cv_have_aix_thread_debug=yes
15148 else
15149   gdb_cv_have_aix_thread_debug=no
15150 fi
15151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15152 fi
15153
15154       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15155 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
15156       if test $gdb_cv_have_aix_thread_debug = yes; then
15157          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
15158          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
15159          LIBS="$LIBS -lpthdebug"
15160
15161          # Older versions of AIX do not provide the declaration for
15162          # the getthrds function (it appears that it was introduced
15163          # with AIX 6.x).
15164          ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15165 "
15166 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
15167   ac_have_decl=1
15168 else
15169   ac_have_decl=0
15170 fi
15171
15172 cat >>confdefs.h <<_ACEOF
15173 #define HAVE_DECL_GETTHRDS $ac_have_decl
15174 _ACEOF
15175
15176       fi
15177       ;;
15178    esac
15179
15180 fi
15181
15182 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
15183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15184 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15185 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
15186   $as_echo_n "(cached) " >&6
15187 else
15188   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15189 /* end confdefs.h.  */
15190 #include <thread_db.h>
15191 int
15192 main ()
15193 {
15194 int i = TD_NOTALLOC;
15195   ;
15196   return 0;
15197 }
15198 _ACEOF
15199 if ac_fn_c_try_compile "$LINENO"; then :
15200   gdb_cv_thread_db_h_has_td_notalloc=yes
15201 else
15202   gdb_cv_thread_db_h_has_td_notalloc=no
15203
15204 fi
15205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15206
15207 fi
15208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15209 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15211 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
15212 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
15213   $as_echo_n "(cached) " >&6
15214 else
15215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15216 /* end confdefs.h.  */
15217 #include <thread_db.h>
15218 int
15219 main ()
15220 {
15221 int i = TD_VERSION;
15222   ;
15223   return 0;
15224 }
15225 _ACEOF
15226 if ac_fn_c_try_compile "$LINENO"; then :
15227   gdb_cv_thread_db_h_has_td_version=yes
15228 else
15229   gdb_cv_thread_db_h_has_td_version=no
15230
15231 fi
15232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15233
15234 fi
15235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15236 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15238 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
15239 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
15240   $as_echo_n "(cached) " >&6
15241 else
15242   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15243 /* end confdefs.h.  */
15244 #include <thread_db.h>
15245 int
15246 main ()
15247 {
15248 int i = TD_NOTLS;
15249   ;
15250   return 0;
15251 }
15252 _ACEOF
15253 if ac_fn_c_try_compile "$LINENO"; then :
15254   gdb_cv_thread_db_h_has_td_notls=yes
15255 else
15256   gdb_cv_thread_db_h_has_td_notls=no
15257
15258 fi
15259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15260
15261 fi
15262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15263 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
15264 fi
15265 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
15266
15267 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
15268
15269 fi
15270 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15271
15272 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
15273
15274 fi
15275 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15276
15277 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
15278
15279 fi
15280
15281 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15282 "
15283 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
15284   ac_have_decl=1
15285 else
15286   ac_have_decl=0
15287 fi
15288
15289 cat >>confdefs.h <<_ACEOF
15290 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
15291 _ACEOF
15292
15293
15294 if test "$cross_compiling" = yes; then :
15295   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15296 /* end confdefs.h.  */
15297 #include <sys/personality.h>
15298 int
15299 main ()
15300 {
15301
15302 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
15303 #       define ADDR_NO_RANDOMIZE 0x0040000
15304 #      endif
15305        /* Test the flag could be set and stays set.  */
15306        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15307        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15308            return 1
15309   ;
15310   return 0;
15311 }
15312 _ACEOF
15313 if ac_fn_c_try_link "$LINENO"; then :
15314   have_personality=true
15315 else
15316   have_personality=false
15317 fi
15318 rm -f core conftest.err conftest.$ac_objext \
15319     conftest$ac_exeext conftest.$ac_ext
15320 else
15321   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15322 /* end confdefs.h.  */
15323 #include <sys/personality.h>
15324 int
15325 main ()
15326 {
15327
15328 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
15329 #       define ADDR_NO_RANDOMIZE 0x0040000
15330 #      endif
15331        /* Test the flag could be set and stays set.  */
15332        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15333        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15334            return 1
15335   ;
15336   return 0;
15337 }
15338 _ACEOF
15339 if ac_fn_c_try_run "$LINENO"; then :
15340   have_personality=true
15341 else
15342   have_personality=false
15343 fi
15344 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15345   conftest.$ac_objext conftest.beam conftest.$ac_ext
15346 fi
15347
15348 if $have_personality
15349 then
15350
15351 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
15352
15353 fi
15354
15355 case $host_os in
15356   go32* | *djgpp*)
15357     gdbinit=gdb.ini
15358     ;;
15359   *)
15360     gdbinit=.gdbinit
15361     ;;
15362 esac
15363
15364 cat >>confdefs.h <<_ACEOF
15365 #define GDBINIT "$gdbinit"
15366 _ACEOF
15367
15368
15369
15370 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15371 # except that the argument to --with-sysroot is optional.
15372 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15373 if test "x$with_sysroot" = xyes; then
15374   with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15375 fi
15376
15377 # Check whether --with-sysroot was given.
15378 if test "${with_sysroot+set}" = set; then :
15379   withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15380 else
15381   TARGET_SYSTEM_ROOT=
15382 fi
15383
15384
15385   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15386   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15387   ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15388   ac_define_dir=`eval echo $ac_define_dir`
15389
15390 cat >>confdefs.h <<_ACEOF
15391 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
15392 _ACEOF
15393
15394
15395
15396
15397   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15398      if test "x$prefix" = xNONE; then
15399         test_prefix=/usr/local
15400      else
15401         test_prefix=$prefix
15402      fi
15403   else
15404      test_prefix=$exec_prefix
15405   fi
15406   value=0
15407   case ${ac_define_dir} in
15408      "${test_prefix}"|"${test_prefix}/"*|\
15409         '${exec_prefix}'|'${exec_prefix}/'*)
15410      value=1
15411      ;;
15412   esac
15413
15414 cat >>confdefs.h <<_ACEOF
15415 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15416 _ACEOF
15417
15418
15419
15420
15421
15422 # Check whether --with-system-gdbinit was given.
15423 if test "${with_system_gdbinit+set}" = set; then :
15424   withval=$with_system_gdbinit;
15425     SYSTEM_GDBINIT=$withval
15426 else
15427   SYSTEM_GDBINIT=
15428 fi
15429
15430
15431   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15432   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15433   ac_define_dir=`eval echo $SYSTEM_GDBINIT`
15434   ac_define_dir=`eval echo $ac_define_dir`
15435
15436 cat >>confdefs.h <<_ACEOF
15437 #define SYSTEM_GDBINIT "$ac_define_dir"
15438 _ACEOF
15439
15440
15441
15442
15443   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15444      if test "x$prefix" = xNONE; then
15445         test_prefix=/usr/local
15446      else
15447         test_prefix=$prefix
15448      fi
15449   else
15450      test_prefix=$exec_prefix
15451   fi
15452   value=0
15453   case ${ac_define_dir} in
15454      "${test_prefix}"|"${test_prefix}/"*|\
15455         '${exec_prefix}'|'${exec_prefix}/'*)
15456      value=1
15457      ;;
15458   esac
15459
15460 cat >>confdefs.h <<_ACEOF
15461 #define SYSTEM_GDBINIT_RELOCATABLE $value
15462 _ACEOF
15463
15464
15465
15466
15467
15468 # Check whether --enable-werror was given.
15469 if test "${enable_werror+set}" = set; then :
15470   enableval=$enable_werror; case "${enableval}" in
15471      yes | y) ERROR_ON_WARNING="yes" ;;
15472      no | n)  ERROR_ON_WARNING="no" ;;
15473      *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
15474    esac
15475 fi
15476
15477
15478 # Enable -Werror by default when using gcc.  Turn it off for releases.
15479 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
15480     ERROR_ON_WARNING=yes
15481 fi
15482
15483 WERROR_CFLAGS=""
15484 if test "${ERROR_ON_WARNING}" = yes ; then
15485     WERROR_CFLAGS="-Werror"
15486 fi
15487
15488 # The options we'll try to enable.
15489 build_warnings="-Wall -Wpointer-arith \
15490 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
15491 -Wno-switch -Wno-char-subscripts \
15492 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
15493 -Wno-sign-compare -Wno-error=maybe-uninitialized \
15494 -Wno-mismatched-tags \
15495 -Wno-error=deprecated-register \
15496 -Wsuggest-override \
15497 -Wimplicit-fallthrough=3 \
15498 -Wduplicated-cond \
15499 -Wshadow=local"
15500
15501 case "${host}" in
15502   *-*-mingw32*)
15503     # Enable -Wno-format by default when using gcc on mingw since many
15504     # GCC versions complain about %I64.
15505     build_warnings="$build_warnings -Wno-format" ;;
15506   *-*-solaris*)
15507     # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15508     # doesn't understand.
15509     build_warnings="$build_warnings -Wno-unknown-pragmas"
15510     # Solaris 11 <unistd.h> marks vfork deprecated.
15511     build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
15512   *)
15513     # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15514     # but there's a special case for this below.
15515     build_warnings="$build_warnings -Wformat-nonliteral" ;;
15516 esac
15517
15518 # Check whether --enable-build-warnings was given.
15519 if test "${enable_build_warnings+set}" = set; then :
15520   enableval=$enable_build_warnings; case "${enableval}" in
15521   yes)  ;;
15522   no)   build_warnings="-w";;
15523   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15524         build_warnings="${build_warnings} ${t}";;
15525   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15526         build_warnings="${t} ${build_warnings}";;
15527   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15528 esac
15529 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15530   echo "Setting compiler warning flags = $build_warnings" 6>&1
15531 fi
15532 fi
15533 # Check whether --enable-gdb-build-warnings was given.
15534 if test "${enable_gdb_build_warnings+set}" = set; then :
15535   enableval=$enable_gdb_build_warnings; case "${enableval}" in
15536   yes)  ;;
15537   no)   build_warnings="-w";;
15538   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15539         build_warnings="${build_warnings} ${t}";;
15540   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15541         build_warnings="${t} ${build_warnings}";;
15542   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15543 esac
15544 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15545   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15546 fi
15547 fi
15548
15549 # The set of warnings supported by a C++ compiler is not the same as
15550 # of the C compiler.
15551 ac_ext=cpp
15552 ac_cpp='$CXXCPP $CPPFLAGS'
15553 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15554 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15555 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15556
15557
15558 WARN_CFLAGS=""
15559 if test "x${build_warnings}" != x -a "x$GCC" = xyes
15560 then
15561     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15562 $as_echo_n "checking compiler warning flags... " >&6; }
15563     # Separate out the -Werror flag as some files just cannot be
15564     # compiled with it enabled.
15565     for w in ${build_warnings}; do
15566         # GCC does not complain about -Wno-unknown-warning.  Invert
15567         # and test -Wunknown-warning instead.
15568         case $w in
15569         -Wno-*)
15570                 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15571         -Wformat-nonliteral)
15572                 # gcc requires -Wformat before -Wformat-nonliteral
15573                 # will work, so stick them together.
15574                 w="-Wformat $w"
15575                 wtest="$w"
15576                 ;;
15577         *)
15578                 wtest=$w ;;
15579         esac
15580
15581         case $w in
15582         -Werr*) WERROR_CFLAGS=-Werror ;;
15583         *)
15584             # Check whether GCC accepts it.
15585             saved_CFLAGS="$CFLAGS"
15586             CFLAGS="$CFLAGS -Werror $wtest"
15587             saved_CXXFLAGS="$CXXFLAGS"
15588             CXXFLAGS="$CXXFLAGS -Werror $wtest"
15589             if test "x$w" = "x-Wunused-variable"; then
15590               # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15591               # fixed in GCC 4.9.  This test is derived from the gdb
15592               # source code that triggered this bug in GCC.
15593               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15594 /* end confdefs.h.  */
15595 struct scoped_restore_base {};
15596                  struct scoped_restore_tmpl : public scoped_restore_base {
15597                    ~scoped_restore_tmpl() {}
15598                  };
15599 int
15600 main ()
15601 {
15602 const scoped_restore_base &b = scoped_restore_tmpl();
15603   ;
15604   return 0;
15605 }
15606 _ACEOF
15607 if ac_fn_cxx_try_compile "$LINENO"; then :
15608   WARN_CFLAGS="${WARN_CFLAGS} $w"
15609 fi
15610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15611             else
15612               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15613 /* end confdefs.h.  */
15614
15615 int
15616 main ()
15617 {
15618
15619   ;
15620   return 0;
15621 }
15622 _ACEOF
15623 if ac_fn_cxx_try_compile "$LINENO"; then :
15624   WARN_CFLAGS="${WARN_CFLAGS} $w"
15625 fi
15626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15627             fi
15628             CFLAGS="$saved_CFLAGS"
15629             CXXFLAGS="$saved_CXXFLAGS"
15630         esac
15631     done
15632     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15633 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
15634 fi
15635
15636
15637
15638 ac_ext=c
15639 ac_cpp='$CPP $CPPFLAGS'
15640 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15641 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15642 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15643
15644
15645
15646 # Check whether --enable-ubsan was given.
15647 if test "${enable_ubsan+set}" = set; then :
15648   enableval=$enable_ubsan;
15649 else
15650   enable_ubsan=no
15651 fi
15652
15653 if test "x$enable_ubsan" = xauto; then
15654   if $development; then
15655     enable_ubsan=yes
15656   fi
15657 fi
15658 ac_ext=cpp
15659 ac_cpp='$CXXCPP $CPPFLAGS'
15660 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15661 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15662 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15663
15664 if test "x$enable_ubsan" = xyes; then
15665   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15666 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15667   saved_CXXFLAGS="$CXXFLAGS"
15668   CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15669         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15670 /* end confdefs.h.  */
15671
15672 int
15673 main ()
15674 {
15675
15676   ;
15677   return 0;
15678 }
15679 _ACEOF
15680 if ac_fn_cxx_try_link "$LINENO"; then :
15681   enable_ubsan=yes
15682 else
15683   enable_ubsan=no
15684 fi
15685 rm -f core conftest.err conftest.$ac_objext \
15686     conftest$ac_exeext conftest.$ac_ext
15687   CXXFLAGS="$saved_CXXFLAGS"
15688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15689 $as_echo "$enable_ubsan" >&6; }
15690   if test "x$enable_ubsan" = xyes; then
15691     WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15692     CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15693   fi
15694 fi
15695 ac_ext=c
15696 ac_cpp='$CPP $CPPFLAGS'
15697 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15698 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15699 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15700
15701
15702
15703 # In the Cygwin environment, we need some additional flags.
15704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15705 $as_echo_n "checking for cygwin... " >&6; }
15706 if ${gdb_cv_os_cygwin+:} false; then :
15707   $as_echo_n "(cached) " >&6
15708 else
15709   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15710 /* end confdefs.h.  */
15711
15712 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
15713 lose
15714 #endif
15715 _ACEOF
15716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15717   $EGREP "^lose$" >/dev/null 2>&1; then :
15718   gdb_cv_os_cygwin=yes
15719 else
15720   gdb_cv_os_cygwin=no
15721 fi
15722 rm -f conftest*
15723
15724 fi
15725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15726 $as_echo "$gdb_cv_os_cygwin" >&6; }
15727
15728
15729 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
15730 case ${host} in
15731   *go32* ) SER_HARDWIRE=ser-go32.o ;;
15732   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
15733   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
15734   *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
15735 esac
15736
15737
15738 # libreadline needs libuser32.a in a cygwin environment
15739 WIN32LIBS=
15740 if test x$gdb_cv_os_cygwin = xyes; then
15741     WIN32LIBS="-luser32"
15742     case "${target}" in
15743         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15744         ;;
15745     esac
15746 fi
15747
15748 # The ser-tcp.c module requires sockets.
15749 case ${host} in
15750   *mingw32*)
15751
15752 $as_echo "#define USE_WIN32API 1" >>confdefs.h
15753
15754     WIN32LIBS="$WIN32LIBS -lws2_32"
15755     ;;
15756 esac
15757
15758
15759 # Add ELF support to GDB, but only if BFD includes ELF support.
15760
15761   OLD_CFLAGS=$CFLAGS
15762   OLD_LDFLAGS=$LDFLAGS
15763   OLD_LIBS=$LIBS
15764   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15765   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15766   # always want our bfd.
15767   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15768   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15769   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15770   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15771   LIBS="-lbfd -liberty -lz $intl $LIBS"
15772   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15773 $as_echo_n "checking for ELF support in BFD... " >&6; }
15774 if ${gdb_cv_var_elf+:} false; then :
15775   $as_echo_n "(cached) " >&6
15776 else
15777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15778 /* end confdefs.h.  */
15779 #include <stdlib.h>
15780   #include "bfd.h"
15781   #include "elf-bfd.h"
15782
15783 int
15784 main ()
15785 {
15786 return bfd_get_elf_phdr_upper_bound (NULL);
15787   ;
15788   return 0;
15789 }
15790 _ACEOF
15791 if ac_fn_c_try_link "$LINENO"; then :
15792   gdb_cv_var_elf=yes
15793 else
15794   gdb_cv_var_elf=no
15795 fi
15796 rm -f core conftest.err conftest.$ac_objext \
15797     conftest$ac_exeext conftest.$ac_ext
15798 fi
15799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15800 $as_echo "$gdb_cv_var_elf" >&6; }
15801   CFLAGS=$OLD_CFLAGS
15802   LDFLAGS=$OLD_LDFLAGS
15803   LIBS=$OLD_LIBS
15804 if test $gdb_cv_var_elf = yes; then
15805   CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
15806
15807 $as_echo "#define HAVE_ELF 1" >>confdefs.h
15808
15809   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15810   if test "$plugins" = "yes"; then
15811     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15812 $as_echo_n "checking for library containing dlopen... " >&6; }
15813 if ${ac_cv_search_dlopen+:} false; then :
15814   $as_echo_n "(cached) " >&6
15815 else
15816   ac_func_search_save_LIBS=$LIBS
15817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15818 /* end confdefs.h.  */
15819
15820 /* Override any GCC internal prototype to avoid an error.
15821    Use char because int might match the return type of a GCC
15822    builtin and then its argument prototype would still apply.  */
15823 #ifdef __cplusplus
15824 extern "C"
15825 #endif
15826 char dlopen ();
15827 int
15828 main ()
15829 {
15830 return dlopen ();
15831   ;
15832   return 0;
15833 }
15834 _ACEOF
15835 for ac_lib in '' dl; do
15836   if test -z "$ac_lib"; then
15837     ac_res="none required"
15838   else
15839     ac_res=-l$ac_lib
15840     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15841   fi
15842   if ac_fn_c_try_link "$LINENO"; then :
15843   ac_cv_search_dlopen=$ac_res
15844 fi
15845 rm -f core conftest.err conftest.$ac_objext \
15846     conftest$ac_exeext
15847   if ${ac_cv_search_dlopen+:} false; then :
15848   break
15849 fi
15850 done
15851 if ${ac_cv_search_dlopen+:} false; then :
15852
15853 else
15854   ac_cv_search_dlopen=no
15855 fi
15856 rm conftest.$ac_ext
15857 LIBS=$ac_func_search_save_LIBS
15858 fi
15859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15860 $as_echo "$ac_cv_search_dlopen" >&6; }
15861 ac_res=$ac_cv_search_dlopen
15862 if test "$ac_res" != no; then :
15863   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15864
15865 fi
15866
15867   fi
15868 fi
15869
15870 # Add macho support to GDB, but only if BFD includes it.
15871
15872   OLD_CFLAGS=$CFLAGS
15873   OLD_LDFLAGS=$LDFLAGS
15874   OLD_LIBS=$LIBS
15875   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15876   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15877   # always want our bfd.
15878   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15879   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15880   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15881   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15882   LIBS="-lbfd -liberty -lz $intl $LIBS"
15883   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15884 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
15885 if ${gdb_cv_var_macho+:} false; then :
15886   $as_echo_n "(cached) " >&6
15887 else
15888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15889 /* end confdefs.h.  */
15890 #include <stdlib.h>
15891   #include "bfd.h"
15892   #include "mach-o.h"
15893
15894 int
15895 main ()
15896 {
15897 return bfd_mach_o_lookup_command (NULL, 0, NULL);
15898   ;
15899   return 0;
15900 }
15901 _ACEOF
15902 if ac_fn_c_try_link "$LINENO"; then :
15903   gdb_cv_var_macho=yes
15904 else
15905   gdb_cv_var_macho=no
15906 fi
15907 rm -f core conftest.err conftest.$ac_objext \
15908     conftest$ac_exeext conftest.$ac_ext
15909 fi
15910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15911 $as_echo "$gdb_cv_var_macho" >&6; }
15912   CFLAGS=$OLD_CFLAGS
15913   LDFLAGS=$OLD_LDFLAGS
15914   LIBS=$OLD_LIBS
15915 if test $gdb_cv_var_macho = yes; then
15916   CONFIG_OBS="$CONFIG_OBS machoread.o"
15917 fi
15918
15919 # Add any host-specific objects to GDB.
15920 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15921
15922 # If building on ELF, look for lzma support for embedded compressed debug info.
15923 if test $gdb_cv_var_elf = yes; then
15924
15925 # Check whether --with-lzma was given.
15926 if test "${with_lzma+set}" = set; then :
15927   withval=$with_lzma;
15928 else
15929   with_lzma=auto
15930 fi
15931
15932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15933 $as_echo_n "checking whether to use lzma... " >&6; }
15934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15935 $as_echo "$with_lzma" >&6; }
15936
15937   if test "${with_lzma}" != no; then
15938
15939
15940
15941
15942
15943
15944
15945
15946     use_additional=yes
15947
15948   acl_save_prefix="$prefix"
15949   prefix="$acl_final_prefix"
15950   acl_save_exec_prefix="$exec_prefix"
15951   exec_prefix="$acl_final_exec_prefix"
15952
15953     eval additional_includedir=\"$includedir\"
15954     eval additional_libdir=\"$libdir\"
15955
15956   exec_prefix="$acl_save_exec_prefix"
15957   prefix="$acl_save_prefix"
15958
15959
15960 # Check whether --with-liblzma-prefix was given.
15961 if test "${with_liblzma_prefix+set}" = set; then :
15962   withval=$with_liblzma_prefix;
15963     if test "X$withval" = "Xno"; then
15964       use_additional=no
15965     else
15966       if test "X$withval" = "X"; then
15967
15968   acl_save_prefix="$prefix"
15969   prefix="$acl_final_prefix"
15970   acl_save_exec_prefix="$exec_prefix"
15971   exec_prefix="$acl_final_exec_prefix"
15972
15973           eval additional_includedir=\"$includedir\"
15974           eval additional_libdir=\"$libdir\"
15975
15976   exec_prefix="$acl_save_exec_prefix"
15977   prefix="$acl_save_prefix"
15978
15979       else
15980         additional_includedir="$withval/include"
15981         additional_libdir="$withval/lib"
15982       fi
15983     fi
15984
15985 fi
15986
15987       LIBLZMA=
15988   LTLIBLZMA=
15989   INCLZMA=
15990   rpathdirs=
15991   ltrpathdirs=
15992   names_already_handled=
15993   names_next_round='lzma '
15994   while test -n "$names_next_round"; do
15995     names_this_round="$names_next_round"
15996     names_next_round=
15997     for name in $names_this_round; do
15998       already_handled=
15999       for n in $names_already_handled; do
16000         if test "$n" = "$name"; then
16001           already_handled=yes
16002           break
16003         fi
16004       done
16005       if test -z "$already_handled"; then
16006         names_already_handled="$names_already_handled $name"
16007                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16008         eval value=\"\$HAVE_LIB$uppername\"
16009         if test -n "$value"; then
16010           if test "$value" = yes; then
16011             eval value=\"\$LIB$uppername\"
16012             test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16013             eval value=\"\$LTLIB$uppername\"
16014             test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16015           else
16016                                     :
16017           fi
16018         else
16019                               found_dir=
16020           found_la=
16021           found_so=
16022           found_a=
16023           if test $use_additional = yes; then
16024             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16025               found_dir="$additional_libdir"
16026               found_so="$additional_libdir/lib$name.$shlibext"
16027               if test -f "$additional_libdir/lib$name.la"; then
16028                 found_la="$additional_libdir/lib$name.la"
16029               fi
16030             else
16031               if test -f "$additional_libdir/lib$name.$libext"; then
16032                 found_dir="$additional_libdir"
16033                 found_a="$additional_libdir/lib$name.$libext"
16034                 if test -f "$additional_libdir/lib$name.la"; then
16035                   found_la="$additional_libdir/lib$name.la"
16036                 fi
16037               fi
16038             fi
16039           fi
16040           if test "X$found_dir" = "X"; then
16041             for x in $LDFLAGS $LTLIBLZMA; do
16042
16043   acl_save_prefix="$prefix"
16044   prefix="$acl_final_prefix"
16045   acl_save_exec_prefix="$exec_prefix"
16046   exec_prefix="$acl_final_exec_prefix"
16047   eval x=\"$x\"
16048   exec_prefix="$acl_save_exec_prefix"
16049   prefix="$acl_save_prefix"
16050
16051               case "$x" in
16052                 -L*)
16053                   dir=`echo "X$x" | sed -e 's/^X-L//'`
16054                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16055                     found_dir="$dir"
16056                     found_so="$dir/lib$name.$shlibext"
16057                     if test -f "$dir/lib$name.la"; then
16058                       found_la="$dir/lib$name.la"
16059                     fi
16060                   else
16061                     if test -f "$dir/lib$name.$libext"; then
16062                       found_dir="$dir"
16063                       found_a="$dir/lib$name.$libext"
16064                       if test -f "$dir/lib$name.la"; then
16065                         found_la="$dir/lib$name.la"
16066                       fi
16067                     fi
16068                   fi
16069                   ;;
16070               esac
16071               if test "X$found_dir" != "X"; then
16072                 break
16073               fi
16074             done
16075           fi
16076           if test "X$found_dir" != "X"; then
16077                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16078             if test "X$found_so" != "X"; then
16079                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16080                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16081               else
16082                                                                                 haveit=
16083                 for x in $ltrpathdirs; do
16084                   if test "X$x" = "X$found_dir"; then
16085                     haveit=yes
16086                     break
16087                   fi
16088                 done
16089                 if test -z "$haveit"; then
16090                   ltrpathdirs="$ltrpathdirs $found_dir"
16091                 fi
16092                                 if test "$hardcode_direct" = yes; then
16093                                                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16094                 else
16095                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16096                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16097                                                             haveit=
16098                     for x in $rpathdirs; do
16099                       if test "X$x" = "X$found_dir"; then
16100                         haveit=yes
16101                         break
16102                       fi
16103                     done
16104                     if test -z "$haveit"; then
16105                       rpathdirs="$rpathdirs $found_dir"
16106                     fi
16107                   else
16108                                                                                 haveit=
16109                     for x in $LDFLAGS $LIBLZMA; do
16110
16111   acl_save_prefix="$prefix"
16112   prefix="$acl_final_prefix"
16113   acl_save_exec_prefix="$exec_prefix"
16114   exec_prefix="$acl_final_exec_prefix"
16115   eval x=\"$x\"
16116   exec_prefix="$acl_save_exec_prefix"
16117   prefix="$acl_save_prefix"
16118
16119                       if test "X$x" = "X-L$found_dir"; then
16120                         haveit=yes
16121                         break
16122                       fi
16123                     done
16124                     if test -z "$haveit"; then
16125                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16126                     fi
16127                     if test "$hardcode_minus_L" != no; then
16128                                                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16129                     else
16130                                                                                                                                                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16131                     fi
16132                   fi
16133                 fi
16134               fi
16135             else
16136               if test "X$found_a" != "X"; then
16137                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16138               else
16139                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16140               fi
16141             fi
16142                         additional_includedir=
16143             case "$found_dir" in
16144               */lib | */lib/)
16145                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16146                 additional_includedir="$basedir/include"
16147                 ;;
16148             esac
16149             if test "X$additional_includedir" != "X"; then
16150                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
16151                 haveit=
16152                 if test "X$additional_includedir" = "X/usr/local/include"; then
16153                   if test -n "$GCC"; then
16154                     case $host_os in
16155                       linux*) haveit=yes;;
16156                     esac
16157                   fi
16158                 fi
16159                 if test -z "$haveit"; then
16160                   for x in $CPPFLAGS $INCLZMA; do
16161
16162   acl_save_prefix="$prefix"
16163   prefix="$acl_final_prefix"
16164   acl_save_exec_prefix="$exec_prefix"
16165   exec_prefix="$acl_final_exec_prefix"
16166   eval x=\"$x\"
16167   exec_prefix="$acl_save_exec_prefix"
16168   prefix="$acl_save_prefix"
16169
16170                     if test "X$x" = "X-I$additional_includedir"; then
16171                       haveit=yes
16172                       break
16173                     fi
16174                   done
16175                   if test -z "$haveit"; then
16176                     if test -d "$additional_includedir"; then
16177                                             INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16178                     fi
16179                   fi
16180                 fi
16181               fi
16182             fi
16183                         if test -n "$found_la"; then
16184                                                         save_libdir="$libdir"
16185               case "$found_la" in
16186                 */* | *\\*) . "$found_la" ;;
16187                 *) . "./$found_la" ;;
16188               esac
16189               libdir="$save_libdir"
16190                             for dep in $dependency_libs; do
16191                 case "$dep" in
16192                   -L*)
16193                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16194                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
16195                       haveit=
16196                       if test "X$additional_libdir" = "X/usr/local/lib"; then
16197                         if test -n "$GCC"; then
16198                           case $host_os in
16199                             linux*) haveit=yes;;
16200                           esac
16201                         fi
16202                       fi
16203                       if test -z "$haveit"; then
16204                         haveit=
16205                         for x in $LDFLAGS $LIBLZMA; do
16206
16207   acl_save_prefix="$prefix"
16208   prefix="$acl_final_prefix"
16209   acl_save_exec_prefix="$exec_prefix"
16210   exec_prefix="$acl_final_exec_prefix"
16211   eval x=\"$x\"
16212   exec_prefix="$acl_save_exec_prefix"
16213   prefix="$acl_save_prefix"
16214
16215                           if test "X$x" = "X-L$additional_libdir"; then
16216                             haveit=yes
16217                             break
16218                           fi
16219                         done
16220                         if test -z "$haveit"; then
16221                           if test -d "$additional_libdir"; then
16222                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16223                           fi
16224                         fi
16225                         haveit=
16226                         for x in $LDFLAGS $LTLIBLZMA; do
16227
16228   acl_save_prefix="$prefix"
16229   prefix="$acl_final_prefix"
16230   acl_save_exec_prefix="$exec_prefix"
16231   exec_prefix="$acl_final_exec_prefix"
16232   eval x=\"$x\"
16233   exec_prefix="$acl_save_exec_prefix"
16234   prefix="$acl_save_prefix"
16235
16236                           if test "X$x" = "X-L$additional_libdir"; then
16237                             haveit=yes
16238                             break
16239                           fi
16240                         done
16241                         if test -z "$haveit"; then
16242                           if test -d "$additional_libdir"; then
16243                                                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16244                           fi
16245                         fi
16246                       fi
16247                     fi
16248                     ;;
16249                   -R*)
16250                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
16251                     if test "$enable_rpath" != no; then
16252                                                                   haveit=
16253                       for x in $rpathdirs; do
16254                         if test "X$x" = "X$dir"; then
16255                           haveit=yes
16256                           break
16257                         fi
16258                       done
16259                       if test -z "$haveit"; then
16260                         rpathdirs="$rpathdirs $dir"
16261                       fi
16262                                                                   haveit=
16263                       for x in $ltrpathdirs; do
16264                         if test "X$x" = "X$dir"; then
16265                           haveit=yes
16266                           break
16267                         fi
16268                       done
16269                       if test -z "$haveit"; then
16270                         ltrpathdirs="$ltrpathdirs $dir"
16271                       fi
16272                     fi
16273                     ;;
16274                   -l*)
16275                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16276                     ;;
16277                   *.la)
16278                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16279                     ;;
16280                   *)
16281                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16282                     LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16283                     ;;
16284                 esac
16285               done
16286             fi
16287           else
16288                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16289             LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16290           fi
16291         fi
16292       fi
16293     done
16294   done
16295   if test "X$rpathdirs" != "X"; then
16296     if test -n "$hardcode_libdir_separator"; then
16297                         alldirs=
16298       for found_dir in $rpathdirs; do
16299         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16300       done
16301             acl_save_libdir="$libdir"
16302       libdir="$alldirs"
16303       eval flag=\"$hardcode_libdir_flag_spec\"
16304       libdir="$acl_save_libdir"
16305       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16306     else
16307             for found_dir in $rpathdirs; do
16308         acl_save_libdir="$libdir"
16309         libdir="$found_dir"
16310         eval flag=\"$hardcode_libdir_flag_spec\"
16311         libdir="$acl_save_libdir"
16312         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16313       done
16314     fi
16315   fi
16316   if test "X$ltrpathdirs" != "X"; then
16317             for found_dir in $ltrpathdirs; do
16318       LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16319     done
16320   fi
16321
16322
16323         ac_save_CPPFLAGS="$CPPFLAGS"
16324
16325   for element in $INCLZMA; do
16326     haveit=
16327     for x in $CPPFLAGS; do
16328
16329   acl_save_prefix="$prefix"
16330   prefix="$acl_final_prefix"
16331   acl_save_exec_prefix="$exec_prefix"
16332   exec_prefix="$acl_final_exec_prefix"
16333   eval x=\"$x\"
16334   exec_prefix="$acl_save_exec_prefix"
16335   prefix="$acl_save_prefix"
16336
16337       if test "X$x" = "X$element"; then
16338         haveit=yes
16339         break
16340       fi
16341     done
16342     if test -z "$haveit"; then
16343       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16344     fi
16345   done
16346
16347
16348   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16349 $as_echo_n "checking for liblzma... " >&6; }
16350 if ${ac_cv_liblzma+:} false; then :
16351   $as_echo_n "(cached) " >&6
16352 else
16353
16354     ac_save_LIBS="$LIBS"
16355     LIBS="$LIBS $LIBLZMA"
16356     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16357 /* end confdefs.h.  */
16358 #include "lzma.h"
16359 int
16360 main ()
16361 {
16362 lzma_index_iter iter;
16363                            lzma_index_iter_init (&iter, 0);
16364                            lzma_mf_is_supported (LZMA_MF_HC3);
16365   ;
16366   return 0;
16367 }
16368 _ACEOF
16369 if ac_fn_c_try_link "$LINENO"; then :
16370   ac_cv_liblzma=yes
16371 else
16372   ac_cv_liblzma=no
16373 fi
16374 rm -f core conftest.err conftest.$ac_objext \
16375     conftest$ac_exeext conftest.$ac_ext
16376     LIBS="$ac_save_LIBS"
16377
16378 fi
16379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16380 $as_echo "$ac_cv_liblzma" >&6; }
16381   if test "$ac_cv_liblzma" = yes; then
16382     HAVE_LIBLZMA=yes
16383
16384 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16385
16386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16387 $as_echo_n "checking how to link with liblzma... " >&6; }
16388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16389 $as_echo "$LIBLZMA" >&6; }
16390   else
16391     HAVE_LIBLZMA=no
16392             CPPFLAGS="$ac_save_CPPFLAGS"
16393     LIBLZMA=
16394     LTLIBLZMA=
16395   fi
16396
16397
16398
16399
16400
16401
16402     if test "$HAVE_LIBLZMA" != yes; then
16403       if test "$with_lzma" = yes; then
16404         as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
16405       fi
16406     fi
16407   fi
16408 fi
16409
16410 LIBGUI="../libgui/src/libgui.a"
16411 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16412
16413
16414
16415 WIN32LDAPP=
16416
16417
16418
16419 case "${host}" in
16420 *-*-cygwin* | *-*-mingw* )
16421     configdir="win"
16422     ;;
16423 *)
16424     configdir="unix"
16425     ;;
16426 esac
16427
16428 GDBTKLIBS=
16429 if test "${enable_gdbtk}" = "yes"; then
16430
16431     # Gdbtk must have an absolute path to srcdir in order to run
16432     # properly when not installed.
16433     here=`pwd`
16434     cd ${srcdir}
16435     GDBTK_SRC_DIR=`pwd`
16436     cd $here
16437
16438
16439     #
16440     # Ok, lets find the tcl configuration
16441     # First, look for one uninstalled.
16442     # the alternative search directory is invoked by --with-tcl
16443     #
16444
16445     if test x"${no_tcl}" = x ; then
16446         # we reset no_tcl in case something fails here
16447         no_tcl=true
16448
16449 # Check whether --with-tcl was given.
16450 if test "${with_tcl+set}" = set; then :
16451   withval=$with_tcl; with_tclconfig=${withval}
16452 fi
16453
16454         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16455 $as_echo_n "checking for Tcl configuration... " >&6; }
16456         if ${ac_cv_c_tclconfig+:} false; then :
16457   $as_echo_n "(cached) " >&6
16458 else
16459
16460
16461             # First check to see if --with-tcl was specified.
16462             case "${host}" in
16463                 *-*-cygwin*) platDir="win" ;;
16464                 *) platDir="unix" ;;
16465             esac
16466             if test x"${with_tclconfig}" != x ; then
16467                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16468                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16469                 else
16470                     as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
16471                 fi
16472             fi
16473
16474             # then check for a private Tcl installation
16475             if test x"${ac_cv_c_tclconfig}" = x ; then
16476                 for i in \
16477                         ../tcl \
16478                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16479                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16480                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16481                         ../../tcl \
16482                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16483                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16484                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16485                         ../../../tcl \
16486                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16487                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16488                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16489                     if test -f "$i/$platDir/tclConfig.sh" ; then
16490                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16491                         break
16492                     fi
16493                 done
16494             fi
16495
16496             # on Darwin, check in Framework installation locations
16497             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16498                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16499                         `ls -d /Library/Frameworks 2>/dev/null` \
16500                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16501                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16502                         ; do
16503                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16504                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16505                         break
16506                     fi
16507                 done
16508             fi
16509
16510             # check in a few common install locations
16511             if test x"${ac_cv_c_tclconfig}" = x ; then
16512                 for i in `ls -d ${libdir} 2>/dev/null` \
16513                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16514                         `ls -d ${prefix}/lib 2>/dev/null` \
16515                         `ls -d /usr/local/lib 2>/dev/null` \
16516                         `ls -d /usr/contrib/lib 2>/dev/null` \
16517                         `ls -d /usr/lib 2>/dev/null` \
16518                         ; do
16519                     if test -f "$i/tclConfig.sh" ; then
16520                         ac_cv_c_tclconfig=`(cd $i; pwd)`
16521                         break
16522                     fi
16523                 done
16524             fi
16525
16526             # check in a few other private locations
16527             if test x"${ac_cv_c_tclconfig}" = x ; then
16528                 for i in \
16529                         ${srcdir}/../tcl \
16530                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16531                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16532                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16533                     if test -f "$i/$platDir/tclConfig.sh" ; then
16534                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16535                     break
16536                 fi
16537                 done
16538             fi
16539
16540 fi
16541
16542
16543         if test x"${ac_cv_c_tclconfig}" = x ; then
16544             TCL_BIN_DIR="# no Tcl configs found"
16545             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16546 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
16547         else
16548             no_tcl=
16549             TCL_BIN_DIR=${ac_cv_c_tclconfig}
16550             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16551 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16552         fi
16553     fi
16554
16555
16556     # If $no_tk is nonempty, then we can't do Tk, and there is no
16557     # point to doing Tcl.
16558
16559     #
16560     # Ok, lets find the tk configuration
16561     # First, look for one uninstalled.
16562     # the alternative search directory is invoked by --with-tk
16563     #
16564
16565     if test x"${no_tk}" = x ; then
16566         # we reset no_tk in case something fails here
16567         no_tk=true
16568
16569 # Check whether --with-tk was given.
16570 if test "${with_tk+set}" = set; then :
16571   withval=$with_tk; with_tkconfig=${withval}
16572 fi
16573
16574         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16575 $as_echo_n "checking for Tk configuration... " >&6; }
16576         if ${ac_cv_c_tkconfig+:} false; then :
16577   $as_echo_n "(cached) " >&6
16578 else
16579
16580
16581             # First check to see if --with-tkconfig was specified.
16582             if test x"${with_tkconfig}" != x ; then
16583                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16584                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16585                 else
16586                     as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
16587                 fi
16588             fi
16589
16590             # then check for a private Tk library
16591             case "${host}" in
16592                 *-*-cygwin*) platDir="win" ;;
16593                 *) platDir="unix" ;;
16594             esac
16595             if test x"${ac_cv_c_tkconfig}" = x ; then
16596                 for i in \
16597                         ../tk \
16598                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16599                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16600                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16601                         ../../tk \
16602                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16603                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16604                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16605                         ../../../tk \
16606                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16607                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16608                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16609                     if test -f "$i/$platDir/tkConfig.sh" ; then
16610                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16611                         break
16612                     fi
16613                 done
16614             fi
16615
16616             # on Darwin, check in Framework installation locations
16617             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16618                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16619                         `ls -d /Library/Frameworks 2>/dev/null` \
16620                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16621                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16622                         ; do
16623                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
16624                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16625                         break
16626                     fi
16627                 done
16628             fi
16629
16630             # check in a few common install locations
16631             if test x"${ac_cv_c_tkconfig}" = x ; then
16632                 for i in `ls -d ${libdir} 2>/dev/null` \
16633                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16634                         `ls -d ${prefix}/lib 2>/dev/null` \
16635                         `ls -d /usr/local/lib 2>/dev/null` \
16636                         `ls -d /usr/contrib/lib 2>/dev/null` \
16637                         `ls -d /usr/lib 2>/dev/null` \
16638                         ; do
16639                     if test -f "$i/tkConfig.sh" ; then
16640                         ac_cv_c_tkconfig=`(cd $i; pwd)`
16641                         break
16642                     fi
16643                 done
16644             fi
16645             # check in a few other private locations
16646             if test x"${ac_cv_c_tkconfig}" = x ; then
16647                 for i in \
16648                         ${srcdir}/../tk \
16649                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16650                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16651                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16652                     if test -f "$i/$platDir/tkConfig.sh" ; then
16653                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16654                         break
16655                     fi
16656                 done
16657             fi
16658
16659 fi
16660
16661
16662         if test x"${ac_cv_c_tkconfig}" = x ; then
16663             TK_BIN_DIR="# no Tk configs found"
16664             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16665 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
16666         else
16667             no_tk=
16668             TK_BIN_DIR=${ac_cv_c_tkconfig}
16669             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16670 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16671         fi
16672     fi
16673
16674
16675     if test -z "${no_tcl}" -a -z "${no_tk}"; then
16676
16677     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16678 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
16679
16680     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
16681         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16682 $as_echo "loading" >&6; }
16683         . ${TCL_BIN_DIR}/tclConfig.sh
16684     else
16685         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16686 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16687     fi
16688
16689     # eval is required to do the TCL_DBGX substitution
16690     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16691     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16692
16693     # If the TCL_BIN_DIR is the build directory (not the install directory),
16694     # then set the common variable name to the value of the build variables.
16695     # For example, the variable TCL_LIB_SPEC will be set to the value
16696     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16697     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16698     # installed and uninstalled version of Tcl.
16699     if test -f "${TCL_BIN_DIR}/Makefile" ; then
16700         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16701         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16702         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16703     elif test "`uname -s`" = "Darwin"; then
16704         # If Tcl was built as a framework, attempt to use the libraries
16705         # from the framework at the given location so that linking works
16706         # against Tcl.framework installed in an arbitrary location.
16707         case ${TCL_DEFS} in
16708             *TCL_FRAMEWORK*)
16709                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16710                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16711                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16712                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16713                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16714                             break
16715                         fi
16716                     done
16717                 fi
16718                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16719                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16720                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16721                 fi
16722                 ;;
16723         esac
16724     fi
16725
16726     # eval is required to do the TCL_DBGX substitution
16727     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16728     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16729     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16730     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746         # Check for in-tree tcl
16747         here=`pwd`
16748         cd ${srcdir}/..
16749         topdir=`pwd`
16750         cd ${here}
16751
16752         intree="no"
16753         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16754           intree="yes"
16755         fi
16756
16757         # Find Tcl private headers
16758         if test x"${intree}" = xno; then
16759
16760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16761 $as_echo_n "checking for Tcl private headers... " >&6; }
16762   private_dir=""
16763   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16764   if test -f ${dir}/tclInt.h ; then
16765     private_dir=${dir}
16766   fi
16767
16768   if test x"${private_dir}" = x; then
16769     as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
16770   else
16771     TCL_PRIVATE_INCLUDE="-I${private_dir}"
16772     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16773 $as_echo "${private_dir}" >&6; }
16774   fi
16775
16776           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16777           TCL_LIBRARY="${TCL_LIB_SPEC}"
16778           TCL_DEPS=""
16779         else
16780           # If building tcl in the same src tree, private headers
16781           # are not needed, but we need to be sure to use the right
16782           # headers library
16783           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16784           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16785           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16786         fi
16787
16788
16789
16790
16791
16792     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16793 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
16794
16795     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
16796         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16797 $as_echo "loading" >&6; }
16798         . ${TK_BIN_DIR}/tkConfig.sh
16799     else
16800         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16801 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16802     fi
16803
16804     # eval is required to do the TK_DBGX substitution
16805     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16806     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16807
16808     # If the TK_BIN_DIR is the build directory (not the install directory),
16809     # then set the common variable name to the value of the build variables.
16810     # For example, the variable TK_LIB_SPEC will be set to the value
16811     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16812     # instead of TK_BUILD_LIB_SPEC since it will work with both an
16813     # installed and uninstalled version of Tcl.
16814     if test -f "${TK_BIN_DIR}/Makefile" ; then
16815         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16816         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16817         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16818     elif test "`uname -s`" = "Darwin"; then
16819         # If Tk was built as a framework, attempt to use the libraries
16820         # from the framework at the given location so that linking works
16821         # against Tk.framework installed in an arbitrary location.
16822         case ${TK_DEFS} in
16823             *TK_FRAMEWORK*)
16824                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
16825                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
16826                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16827                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16828                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16829                             break
16830                         fi
16831                     done
16832                 fi
16833                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
16834                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16835                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16836                 fi
16837                 ;;
16838         esac
16839     fi
16840
16841     # eval is required to do the TK_DBGX substitution
16842     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16843     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16844     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16845     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860         # Check for in-tree Tk
16861         intree="no"
16862         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16863           intree="yes"
16864         fi
16865
16866         # Find Tk private headers
16867         if test x"${intree}" = xno; then
16868
16869   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16870 $as_echo_n "checking for Tk private headers... " >&6; }
16871   private_dir=""
16872   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16873   if test -f ${dir}/tkInt.h; then
16874     private_dir=${dir}
16875   fi
16876
16877   if test x"${private_dir}" = x; then
16878     as_fn_error $? "could not find Tk private headers" "$LINENO" 5
16879   else
16880     TK_PRIVATE_INCLUDE="-I${private_dir}"
16881     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16882 $as_echo "${private_dir}" >&6; }
16883   fi
16884
16885           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16886           TK_LIBRARY=${TK_LIB_SPEC}
16887           TK_DEPS=""
16888         else
16889           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16890           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16891           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16892         fi
16893
16894
16895
16896
16897
16898         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
16899
16900         # Include some libraries that Tcl and Tk want.
16901         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16902         # Yes, the ordering seems wrong here.  But it isn't.
16903         # TK_LIBS is the list of libraries that need to be linked
16904         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
16905         # were in LIBS then any link tests after this point would
16906         # try to include things like `$(LIBGUI)', which wouldn't work.
16907         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
16908
16909         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16910         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16911         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16912         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16913         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16914         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16915         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
16916
16917         if test x$gdb_cv_os_cygwin = xyes; then
16918           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16919           WIN32LDAPP="-Wl,--subsystem,console"
16920           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
16921         fi
16922
16923         subdirs="$subdirs gdbtk"
16924
16925     fi
16926 fi
16927
16928
16929
16930
16931
16932
16933
16934
16935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16936 $as_echo_n "checking for X... " >&6; }
16937
16938
16939 # Check whether --with-x was given.
16940 if test "${with_x+set}" = set; then :
16941   withval=$with_x;
16942 fi
16943
16944 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16945 if test "x$with_x" = xno; then
16946   # The user explicitly disabled X.
16947   have_x=disabled
16948 else
16949   case $x_includes,$x_libraries in #(
16950     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16951     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
16952   $as_echo_n "(cached) " >&6
16953 else
16954   # One or both of the vars are not set, and there is no cached value.
16955 ac_x_includes=no ac_x_libraries=no
16956 rm -f -r conftest.dir
16957 if mkdir conftest.dir; then
16958   cd conftest.dir
16959   cat >Imakefile <<'_ACEOF'
16960 incroot:
16961         @echo incroot='${INCROOT}'
16962 usrlibdir:
16963         @echo usrlibdir='${USRLIBDIR}'
16964 libdir:
16965         @echo libdir='${LIBDIR}'
16966 _ACEOF
16967   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
16968     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
16969     for ac_var in incroot usrlibdir libdir; do
16970       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16971     done
16972     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
16973     for ac_extension in a so sl dylib la dll; do
16974       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16975          test -f "$ac_im_libdir/libX11.$ac_extension"; then
16976         ac_im_usrlibdir=$ac_im_libdir; break
16977       fi
16978     done
16979     # Screen out bogus values from the imake configuration.  They are
16980     # bogus both because they are the default anyway, and because
16981     # using them would break gcc on systems where it needs fixed includes.
16982     case $ac_im_incroot in
16983         /usr/include) ac_x_includes= ;;
16984         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
16985     esac
16986     case $ac_im_usrlibdir in
16987         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
16988         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
16989     esac
16990   fi
16991   cd ..
16992   rm -f -r conftest.dir
16993 fi
16994
16995 # Standard set of common directories for X headers.
16996 # Check X11 before X11Rn because it is often a symlink to the current release.
16997 ac_x_header_dirs='
16998 /usr/X11/include
16999 /usr/X11R7/include
17000 /usr/X11R6/include
17001 /usr/X11R5/include
17002 /usr/X11R4/include
17003
17004 /usr/include/X11
17005 /usr/include/X11R7
17006 /usr/include/X11R6
17007 /usr/include/X11R5
17008 /usr/include/X11R4
17009
17010 /usr/local/X11/include
17011 /usr/local/X11R7/include
17012 /usr/local/X11R6/include
17013 /usr/local/X11R5/include
17014 /usr/local/X11R4/include
17015
17016 /usr/local/include/X11
17017 /usr/local/include/X11R7
17018 /usr/local/include/X11R6
17019 /usr/local/include/X11R5
17020 /usr/local/include/X11R4
17021
17022 /usr/X386/include
17023 /usr/x386/include
17024 /usr/XFree86/include/X11
17025
17026 /usr/include
17027 /usr/local/include
17028 /usr/unsupported/include
17029 /usr/athena/include
17030 /usr/local/x11r5/include
17031 /usr/lpp/Xamples/include
17032
17033 /usr/openwin/include
17034 /usr/openwin/share/include'
17035
17036 if test "$ac_x_includes" = no; then
17037   # Guess where to find include files, by looking for Xlib.h.
17038   # First, try using that file with no special directory specified.
17039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17040 /* end confdefs.h.  */
17041 #include <X11/Xlib.h>
17042 _ACEOF
17043 if ac_fn_c_try_cpp "$LINENO"; then :
17044   # We can compile using X headers with no special include directory.
17045 ac_x_includes=
17046 else
17047   for ac_dir in $ac_x_header_dirs; do
17048   if test -r "$ac_dir/X11/Xlib.h"; then
17049     ac_x_includes=$ac_dir
17050     break
17051   fi
17052 done
17053 fi
17054 rm -f conftest.err conftest.i conftest.$ac_ext
17055 fi # $ac_x_includes = no
17056
17057 if test "$ac_x_libraries" = no; then
17058   # Check for the libraries.
17059   # See if we find them without any special options.
17060   # Don't add to $LIBS permanently.
17061   ac_save_LIBS=$LIBS
17062   LIBS="-lX11 $LIBS"
17063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17064 /* end confdefs.h.  */
17065 #include <X11/Xlib.h>
17066 int
17067 main ()
17068 {
17069 XrmInitialize ()
17070   ;
17071   return 0;
17072 }
17073 _ACEOF
17074 if ac_fn_c_try_link "$LINENO"; then :
17075   LIBS=$ac_save_LIBS
17076 # We can link X programs with no special library path.
17077 ac_x_libraries=
17078 else
17079   LIBS=$ac_save_LIBS
17080 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
17081 do
17082   # Don't even attempt the hair of trying to link an X program!
17083   for ac_extension in a so sl dylib la dll; do
17084     if test -r "$ac_dir/libX11.$ac_extension"; then
17085       ac_x_libraries=$ac_dir
17086       break 2
17087     fi
17088   done
17089 done
17090 fi
17091 rm -f core conftest.err conftest.$ac_objext \
17092     conftest$ac_exeext conftest.$ac_ext
17093 fi # $ac_x_libraries = no
17094
17095 case $ac_x_includes,$ac_x_libraries in #(
17096   no,* | *,no | *\'*)
17097     # Didn't find X, or a directory has "'" in its name.
17098     ac_cv_have_x="have_x=no";; #(
17099   *)
17100     # Record where we found X for the cache.
17101     ac_cv_have_x="have_x=yes\
17102         ac_x_includes='$ac_x_includes'\
17103         ac_x_libraries='$ac_x_libraries'"
17104 esac
17105 fi
17106 ;; #(
17107     *) have_x=yes;;
17108   esac
17109   eval "$ac_cv_have_x"
17110 fi # $with_x != no
17111
17112 if test "$have_x" != yes; then
17113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17114 $as_echo "$have_x" >&6; }
17115   no_x=yes
17116 else
17117   # If each of the values was on the command line, it overrides each guess.
17118   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17119   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17120   # Update the cache value to reflect the command line values.
17121   ac_cv_have_x="have_x=yes\
17122         ac_x_includes='$x_includes'\
17123         ac_x_libraries='$x_libraries'"
17124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17125 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
17126 fi
17127
17128
17129 # Unlike the sim directory, whether a simulator is linked is controlled by
17130 # presence of a gdb_sim definition in the target configure.tgt entry.
17131 # This code just checks for a few cases where we'd like to ignore those
17132 # definitions, even when they're present in the '.mt' file.  These cases
17133 # are when --disable-sim is specified, or if the simulator directory is
17134 # not part of the source tree.
17135 #
17136 # Check whether --enable-sim was given.
17137 if test "${enable_sim+set}" = set; then :
17138   enableval=$enable_sim; echo "enable_sim = $enable_sim";
17139  echo "enableval = ${enableval}";
17140  case "${enableval}" in
17141   yes) ignore_sim=false ;;
17142   no)  ignore_sim=true ;;
17143   *)   ignore_sim=false ;;
17144  esac
17145 else
17146   ignore_sim=false
17147 fi
17148
17149
17150 if test ! -d "${srcdir}/../sim"; then
17151   ignore_sim=true
17152 fi
17153
17154 SIM=
17155 SIM_OBS=
17156 if test "${ignore_sim}" = "false"; then
17157   if test x"${gdb_sim}" != x ; then
17158     SIM="${gdb_sim}"
17159     SIM_OBS="remote-sim.o"
17160
17161 $as_echo "#define WITH_SIM 1" >>confdefs.h
17162
17163
17164     # Some tdep code should only be compiled in when the ppc sim is
17165     # built.  PR sim/13418.
17166     case $target in
17167       powerpc*-*-*)
17168
17169 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17170
17171         ;;
17172     esac
17173   fi
17174 fi
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189 # List of host floatformats.
17190
17191 cat >>confdefs.h <<_ACEOF
17192 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
17193 _ACEOF
17194
17195
17196 cat >>confdefs.h <<_ACEOF
17197 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
17198 _ACEOF
17199
17200
17201 cat >>confdefs.h <<_ACEOF
17202 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
17203 _ACEOF
17204
17205
17206 # target_subdir is used by the testsuite to find the target libraries.
17207 target_subdir=
17208 if test "${host}" != "${target}"; then
17209     target_subdir="${target_alias}/"
17210 fi
17211
17212
17213 # Import nat definitions.
17214 nat_makefile_frag=/dev/null
17215 if test "${gdb_native}" = "yes"; then
17216   . ${srcdir}/configure.nat
17217   nativefile=$NAT_FILE
17218 fi
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230 if test x"${gdb_osabi}" != x ; then
17231
17232 cat >>confdefs.h <<_ACEOF
17233 #define GDB_OSABI_DEFAULT $gdb_osabi
17234 _ACEOF
17235
17236 fi
17237
17238 # Check whether --enable-gdbserver was given.
17239 if test "${enable_gdbserver+set}" = set; then :
17240   enableval=$enable_gdbserver; case "${enableval}" in
17241   yes| no|auto) ;;
17242   *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
17243 esac
17244 else
17245   enable_gdbserver=auto
17246 fi
17247
17248
17249 # We only build gdbserver automatically in a native configuration, and
17250 # only if the user did not explicitly disable its build.
17251 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
17252   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17253 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
17254   if test "x$build_gdbserver" = xyes; then
17255     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17256 $as_echo "yes" >&6; }
17257     subdirs="$subdirs gdbserver"
17258
17259     gdbserver_build_enabled=yes
17260   else
17261     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17262 $as_echo "no" >&6; }
17263   fi
17264 fi
17265
17266 # If the user explicitly request the gdbserver to be built, verify that
17267 # we were in fact able to enable it.
17268 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
17269   as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
17270 fi
17271
17272 # Check for babeltrace and babeltrace-ctf
17273
17274 # Check whether --with-babeltrace was given.
17275 if test "${with_babeltrace+set}" = set; then :
17276   withval=$with_babeltrace;
17277 else
17278   with_babeltrace=auto
17279 fi
17280
17281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17282 $as_echo_n "checking whether to use babeltrace... " >&6; }
17283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17284 $as_echo "$with_babeltrace" >&6; }
17285
17286 if test "x$with_babeltrace" = "xno"; then
17287   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17288 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17289 else
17290   # Append -Werror to CFLAGS so that configure can catch the warning
17291   # "assignment from incompatible pointer type", which is related to
17292   # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
17293   # in GDB, while babeltrace 1.0.3 is broken.
17294   # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17295   # safe to save and restore CFLAGS here.
17296   saved_CFLAGS=$CFLAGS
17297   CFLAGS="$CFLAGS -Werror"
17298
17299
17300
17301
17302
17303
17304
17305
17306     use_additional=yes
17307
17308   acl_save_prefix="$prefix"
17309   prefix="$acl_final_prefix"
17310   acl_save_exec_prefix="$exec_prefix"
17311   exec_prefix="$acl_final_exec_prefix"
17312
17313     eval additional_includedir=\"$includedir\"
17314     eval additional_libdir=\"$libdir\"
17315
17316   exec_prefix="$acl_save_exec_prefix"
17317   prefix="$acl_save_prefix"
17318
17319
17320 # Check whether --with-libbabeltrace-prefix was given.
17321 if test "${with_libbabeltrace_prefix+set}" = set; then :
17322   withval=$with_libbabeltrace_prefix;
17323     if test "X$withval" = "Xno"; then
17324       use_additional=no
17325     else
17326       if test "X$withval" = "X"; then
17327
17328   acl_save_prefix="$prefix"
17329   prefix="$acl_final_prefix"
17330   acl_save_exec_prefix="$exec_prefix"
17331   exec_prefix="$acl_final_exec_prefix"
17332
17333           eval additional_includedir=\"$includedir\"
17334           eval additional_libdir=\"$libdir\"
17335
17336   exec_prefix="$acl_save_exec_prefix"
17337   prefix="$acl_save_prefix"
17338
17339       else
17340         additional_includedir="$withval/include"
17341         additional_libdir="$withval/lib"
17342       fi
17343     fi
17344
17345 fi
17346
17347       LIBBABELTRACE=
17348   LTLIBBABELTRACE=
17349   INCBABELTRACE=
17350   rpathdirs=
17351   ltrpathdirs=
17352   names_already_handled=
17353   names_next_round='babeltrace babeltrace-ctf'
17354   while test -n "$names_next_round"; do
17355     names_this_round="$names_next_round"
17356     names_next_round=
17357     for name in $names_this_round; do
17358       already_handled=
17359       for n in $names_already_handled; do
17360         if test "$n" = "$name"; then
17361           already_handled=yes
17362           break
17363         fi
17364       done
17365       if test -z "$already_handled"; then
17366         names_already_handled="$names_already_handled $name"
17367                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17368         eval value=\"\$HAVE_LIB$uppername\"
17369         if test -n "$value"; then
17370           if test "$value" = yes; then
17371             eval value=\"\$LIB$uppername\"
17372             test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17373             eval value=\"\$LTLIB$uppername\"
17374             test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17375           else
17376                                     :
17377           fi
17378         else
17379                               found_dir=
17380           found_la=
17381           found_so=
17382           found_a=
17383           if test $use_additional = yes; then
17384             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17385               found_dir="$additional_libdir"
17386               found_so="$additional_libdir/lib$name.$shlibext"
17387               if test -f "$additional_libdir/lib$name.la"; then
17388                 found_la="$additional_libdir/lib$name.la"
17389               fi
17390             else
17391               if test -f "$additional_libdir/lib$name.$libext"; then
17392                 found_dir="$additional_libdir"
17393                 found_a="$additional_libdir/lib$name.$libext"
17394                 if test -f "$additional_libdir/lib$name.la"; then
17395                   found_la="$additional_libdir/lib$name.la"
17396                 fi
17397               fi
17398             fi
17399           fi
17400           if test "X$found_dir" = "X"; then
17401             for x in $LDFLAGS $LTLIBBABELTRACE; do
17402
17403   acl_save_prefix="$prefix"
17404   prefix="$acl_final_prefix"
17405   acl_save_exec_prefix="$exec_prefix"
17406   exec_prefix="$acl_final_exec_prefix"
17407   eval x=\"$x\"
17408   exec_prefix="$acl_save_exec_prefix"
17409   prefix="$acl_save_prefix"
17410
17411               case "$x" in
17412                 -L*)
17413                   dir=`echo "X$x" | sed -e 's/^X-L//'`
17414                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17415                     found_dir="$dir"
17416                     found_so="$dir/lib$name.$shlibext"
17417                     if test -f "$dir/lib$name.la"; then
17418                       found_la="$dir/lib$name.la"
17419                     fi
17420                   else
17421                     if test -f "$dir/lib$name.$libext"; then
17422                       found_dir="$dir"
17423                       found_a="$dir/lib$name.$libext"
17424                       if test -f "$dir/lib$name.la"; then
17425                         found_la="$dir/lib$name.la"
17426                       fi
17427                     fi
17428                   fi
17429                   ;;
17430               esac
17431               if test "X$found_dir" != "X"; then
17432                 break
17433               fi
17434             done
17435           fi
17436           if test "X$found_dir" != "X"; then
17437                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17438             if test "X$found_so" != "X"; then
17439                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17440                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17441               else
17442                                                                                 haveit=
17443                 for x in $ltrpathdirs; do
17444                   if test "X$x" = "X$found_dir"; then
17445                     haveit=yes
17446                     break
17447                   fi
17448                 done
17449                 if test -z "$haveit"; then
17450                   ltrpathdirs="$ltrpathdirs $found_dir"
17451                 fi
17452                                 if test "$hardcode_direct" = yes; then
17453                                                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17454                 else
17455                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17456                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17457                                                             haveit=
17458                     for x in $rpathdirs; do
17459                       if test "X$x" = "X$found_dir"; then
17460                         haveit=yes
17461                         break
17462                       fi
17463                     done
17464                     if test -z "$haveit"; then
17465                       rpathdirs="$rpathdirs $found_dir"
17466                     fi
17467                   else
17468                                                                                 haveit=
17469                     for x in $LDFLAGS $LIBBABELTRACE; do
17470
17471   acl_save_prefix="$prefix"
17472   prefix="$acl_final_prefix"
17473   acl_save_exec_prefix="$exec_prefix"
17474   exec_prefix="$acl_final_exec_prefix"
17475   eval x=\"$x\"
17476   exec_prefix="$acl_save_exec_prefix"
17477   prefix="$acl_save_prefix"
17478
17479                       if test "X$x" = "X-L$found_dir"; then
17480                         haveit=yes
17481                         break
17482                       fi
17483                     done
17484                     if test -z "$haveit"; then
17485                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17486                     fi
17487                     if test "$hardcode_minus_L" != no; then
17488                                                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17489                     else
17490                                                                                                                                                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17491                     fi
17492                   fi
17493                 fi
17494               fi
17495             else
17496               if test "X$found_a" != "X"; then
17497                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17498               else
17499                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17500               fi
17501             fi
17502                         additional_includedir=
17503             case "$found_dir" in
17504               */lib | */lib/)
17505                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17506                 additional_includedir="$basedir/include"
17507                 ;;
17508             esac
17509             if test "X$additional_includedir" != "X"; then
17510                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
17511                 haveit=
17512                 if test "X$additional_includedir" = "X/usr/local/include"; then
17513                   if test -n "$GCC"; then
17514                     case $host_os in
17515                       linux*) haveit=yes;;
17516                     esac
17517                   fi
17518                 fi
17519                 if test -z "$haveit"; then
17520                   for x in $CPPFLAGS $INCBABELTRACE; do
17521
17522   acl_save_prefix="$prefix"
17523   prefix="$acl_final_prefix"
17524   acl_save_exec_prefix="$exec_prefix"
17525   exec_prefix="$acl_final_exec_prefix"
17526   eval x=\"$x\"
17527   exec_prefix="$acl_save_exec_prefix"
17528   prefix="$acl_save_prefix"
17529
17530                     if test "X$x" = "X-I$additional_includedir"; then
17531                       haveit=yes
17532                       break
17533                     fi
17534                   done
17535                   if test -z "$haveit"; then
17536                     if test -d "$additional_includedir"; then
17537                                             INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17538                     fi
17539                   fi
17540                 fi
17541               fi
17542             fi
17543                         if test -n "$found_la"; then
17544                                                         save_libdir="$libdir"
17545               case "$found_la" in
17546                 */* | *\\*) . "$found_la" ;;
17547                 *) . "./$found_la" ;;
17548               esac
17549               libdir="$save_libdir"
17550                             for dep in $dependency_libs; do
17551                 case "$dep" in
17552                   -L*)
17553                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17554                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
17555                       haveit=
17556                       if test "X$additional_libdir" = "X/usr/local/lib"; then
17557                         if test -n "$GCC"; then
17558                           case $host_os in
17559                             linux*) haveit=yes;;
17560                           esac
17561                         fi
17562                       fi
17563                       if test -z "$haveit"; then
17564                         haveit=
17565                         for x in $LDFLAGS $LIBBABELTRACE; do
17566
17567   acl_save_prefix="$prefix"
17568   prefix="$acl_final_prefix"
17569   acl_save_exec_prefix="$exec_prefix"
17570   exec_prefix="$acl_final_exec_prefix"
17571   eval x=\"$x\"
17572   exec_prefix="$acl_save_exec_prefix"
17573   prefix="$acl_save_prefix"
17574
17575                           if test "X$x" = "X-L$additional_libdir"; then
17576                             haveit=yes
17577                             break
17578                           fi
17579                         done
17580                         if test -z "$haveit"; then
17581                           if test -d "$additional_libdir"; then
17582                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17583                           fi
17584                         fi
17585                         haveit=
17586                         for x in $LDFLAGS $LTLIBBABELTRACE; do
17587
17588   acl_save_prefix="$prefix"
17589   prefix="$acl_final_prefix"
17590   acl_save_exec_prefix="$exec_prefix"
17591   exec_prefix="$acl_final_exec_prefix"
17592   eval x=\"$x\"
17593   exec_prefix="$acl_save_exec_prefix"
17594   prefix="$acl_save_prefix"
17595
17596                           if test "X$x" = "X-L$additional_libdir"; then
17597                             haveit=yes
17598                             break
17599                           fi
17600                         done
17601                         if test -z "$haveit"; then
17602                           if test -d "$additional_libdir"; then
17603                                                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17604                           fi
17605                         fi
17606                       fi
17607                     fi
17608                     ;;
17609                   -R*)
17610                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
17611                     if test "$enable_rpath" != no; then
17612                                                                   haveit=
17613                       for x in $rpathdirs; do
17614                         if test "X$x" = "X$dir"; then
17615                           haveit=yes
17616                           break
17617                         fi
17618                       done
17619                       if test -z "$haveit"; then
17620                         rpathdirs="$rpathdirs $dir"
17621                       fi
17622                                                                   haveit=
17623                       for x in $ltrpathdirs; do
17624                         if test "X$x" = "X$dir"; then
17625                           haveit=yes
17626                           break
17627                         fi
17628                       done
17629                       if test -z "$haveit"; then
17630                         ltrpathdirs="$ltrpathdirs $dir"
17631                       fi
17632                     fi
17633                     ;;
17634                   -l*)
17635                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17636                     ;;
17637                   *.la)
17638                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17639                     ;;
17640                   *)
17641                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17642                     LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17643                     ;;
17644                 esac
17645               done
17646             fi
17647           else
17648                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17649             LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17650           fi
17651         fi
17652       fi
17653     done
17654   done
17655   if test "X$rpathdirs" != "X"; then
17656     if test -n "$hardcode_libdir_separator"; then
17657                         alldirs=
17658       for found_dir in $rpathdirs; do
17659         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17660       done
17661             acl_save_libdir="$libdir"
17662       libdir="$alldirs"
17663       eval flag=\"$hardcode_libdir_flag_spec\"
17664       libdir="$acl_save_libdir"
17665       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17666     else
17667             for found_dir in $rpathdirs; do
17668         acl_save_libdir="$libdir"
17669         libdir="$found_dir"
17670         eval flag=\"$hardcode_libdir_flag_spec\"
17671         libdir="$acl_save_libdir"
17672         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17673       done
17674     fi
17675   fi
17676   if test "X$ltrpathdirs" != "X"; then
17677             for found_dir in $ltrpathdirs; do
17678       LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17679     done
17680   fi
17681
17682
17683         ac_save_CPPFLAGS="$CPPFLAGS"
17684
17685   for element in $INCBABELTRACE; do
17686     haveit=
17687     for x in $CPPFLAGS; do
17688
17689   acl_save_prefix="$prefix"
17690   prefix="$acl_final_prefix"
17691   acl_save_exec_prefix="$exec_prefix"
17692   exec_prefix="$acl_final_exec_prefix"
17693   eval x=\"$x\"
17694   exec_prefix="$acl_save_exec_prefix"
17695   prefix="$acl_save_prefix"
17696
17697       if test "X$x" = "X$element"; then
17698         haveit=yes
17699         break
17700       fi
17701     done
17702     if test -z "$haveit"; then
17703       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17704     fi
17705   done
17706
17707
17708   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17709 $as_echo_n "checking for libbabeltrace... " >&6; }
17710 if ${ac_cv_libbabeltrace+:} false; then :
17711   $as_echo_n "(cached) " >&6
17712 else
17713
17714     ac_save_LIBS="$LIBS"
17715     LIBS="$LIBS $LIBBABELTRACE"
17716     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17717 /* end confdefs.h.  */
17718 #include <babeltrace/babeltrace.h>
17719                          #include <babeltrace/ctf/events.h>
17720                          #include <babeltrace/ctf/iterator.h>
17721 int
17722 main ()
17723 {
17724 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17725                         struct bt_ctf_event *event = NULL;
17726                         const struct bt_definition *scope;
17727
17728                         pos->type = BT_SEEK_BEGIN;
17729                         bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
17730                         scope = bt_ctf_get_top_level_scope (event,
17731                                                            BT_STREAM_EVENT_HEADER);
17732                         bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17733
17734   ;
17735   return 0;
17736 }
17737 _ACEOF
17738 if ac_fn_c_try_link "$LINENO"; then :
17739   ac_cv_libbabeltrace=yes
17740 else
17741   ac_cv_libbabeltrace=no
17742 fi
17743 rm -f core conftest.err conftest.$ac_objext \
17744     conftest$ac_exeext conftest.$ac_ext
17745     LIBS="$ac_save_LIBS"
17746
17747 fi
17748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17749 $as_echo "$ac_cv_libbabeltrace" >&6; }
17750   if test "$ac_cv_libbabeltrace" = yes; then
17751     HAVE_LIBBABELTRACE=yes
17752
17753 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17754
17755     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17756 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
17757     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17758 $as_echo "$LIBBABELTRACE" >&6; }
17759   else
17760     HAVE_LIBBABELTRACE=no
17761             CPPFLAGS="$ac_save_CPPFLAGS"
17762     LIBBABELTRACE=
17763     LTLIBBABELTRACE=
17764   fi
17765
17766
17767
17768
17769
17770
17771   CFLAGS=$saved_CFLAGS
17772
17773   if test "$HAVE_LIBBABELTRACE" != yes; then
17774      if test "$with_babeltrace" = yes; then
17775        as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
17776      else
17777        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17778 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17779      fi
17780   fi
17781 fi
17782
17783 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17784 # empty version.
17785
17786 files=
17787 links=
17788
17789 rm -f nm.h
17790 if test "${nativefile}" != ""; then
17791     case "${nativefile}" in
17792       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17793       * ) GDB_NM_FILE="${nativefile}"
17794     esac
17795     files="${files} ${GDB_NM_FILE}"
17796     links="${links} nm.h"
17797
17798 cat >>confdefs.h <<_ACEOF
17799 #define GDB_NM_FILE "${GDB_NM_FILE}"
17800 _ACEOF
17801
17802 fi
17803
17804
17805 for ac_prog in xsltproc
17806 do
17807   # Extract the first word of "$ac_prog", so it can be a program name with args.
17808 set dummy $ac_prog; ac_word=$2
17809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17810 $as_echo_n "checking for $ac_word... " >&6; }
17811 if ${ac_cv_path_XSLTPROC+:} false; then :
17812   $as_echo_n "(cached) " >&6
17813 else
17814   case $XSLTPROC in
17815   [\\/]* | ?:[\\/]*)
17816   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17817   ;;
17818   *)
17819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17820 for as_dir in $PATH
17821 do
17822   IFS=$as_save_IFS
17823   test -z "$as_dir" && as_dir=.
17824     for ac_exec_ext in '' $ac_executable_extensions; do
17825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17826     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17828     break 2
17829   fi
17830 done
17831   done
17832 IFS=$as_save_IFS
17833
17834   ;;
17835 esac
17836 fi
17837 XSLTPROC=$ac_cv_path_XSLTPROC
17838 if test -n "$XSLTPROC"; then
17839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17840 $as_echo "$XSLTPROC" >&6; }
17841 else
17842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17843 $as_echo "no" >&6; }
17844 fi
17845
17846
17847   test -n "$XSLTPROC" && break
17848 done
17849 test -n "$XSLTPROC" || XSLTPROC="missing"
17850
17851 if test "x$USE_MAINTAINER_MODE" = xyes; then
17852   if test "${XSLTPROC}" = missing; then
17853     as_fn_error $? "unable to find xsltproc.  maintainer-mode requires xsltproc." "$LINENO" 5
17854   fi
17855 fi
17856
17857
17858 ac_sources="$files"
17859 ac_dests="$links"
17860 while test -n "$ac_sources"; do
17861   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17862   set $ac_sources; ac_source=$1; shift; ac_sources=$*
17863   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17864 done
17865 ac_config_links="$ac_config_links $ac_config_links_1"
17866
17867
17868
17869
17870
17871 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
17872
17873
17874
17875 # Check whether we will enable the inclusion of unit tests when
17876 # compiling GDB.
17877 #
17878 # The default value of this option changes depending whether we're on
17879 # development mode (in which case it's "true") or not (in which case
17880 # it's "false").
17881 # Check whether --enable-unit-tests was given.
17882 if test "${enable_unit_tests+set}" = set; then :
17883   enableval=$enable_unit_tests; case "${enableval}" in
17884   yes)  enable_unittests=true  ;;
17885   no)   enable_unittests=false ;;
17886   *)    as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
17887 esac
17888 else
17889   enable_unittests=$development
17890 fi
17891
17892
17893 if $enable_unittests; then
17894
17895 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17896
17897
17898   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
17899   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
17900
17901 fi
17902
17903
17904
17905   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17906   GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17907   if test "x$GDB_TRANSFORM_NAME" = x; then
17908      GDB_TRANSFORM_NAME=gdb
17909   fi
17910
17911
17912
17913   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17914   GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17915   if test "x$GCORE_TRANSFORM_NAME" = x; then
17916      GCORE_TRANSFORM_NAME=gcore
17917   fi
17918
17919
17920 ac_config_files="$ac_config_files gcore"
17921
17922 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
17923
17924
17925 cat >confcache <<\_ACEOF
17926 # This file is a shell script that caches the results of configure
17927 # tests run on this system so they can be shared between configure
17928 # scripts and configure runs, see configure's option --config-cache.
17929 # It is not useful on other systems.  If it contains results you don't
17930 # want to keep, you may remove or edit it.
17931 #
17932 # config.status only pays attention to the cache file if you give it
17933 # the --recheck option to rerun configure.
17934 #
17935 # `ac_cv_env_foo' variables (set or unset) will be overridden when
17936 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17937 # following values.
17938
17939 _ACEOF
17940
17941 # The following way of writing the cache mishandles newlines in values,
17942 # but we know of no workaround that is simple, portable, and efficient.
17943 # So, we kill variables containing newlines.
17944 # Ultrix sh set writes to stderr and can't be redirected directly,
17945 # and sets the high bit in the cache file unless we assign to the vars.
17946 (
17947   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17948     eval ac_val=\$$ac_var
17949     case $ac_val in #(
17950     *${as_nl}*)
17951       case $ac_var in #(
17952       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17953 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17954       esac
17955       case $ac_var in #(
17956       _ | IFS | as_nl) ;; #(
17957       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17958       *) { eval $ac_var=; unset $ac_var;} ;;
17959       esac ;;
17960     esac
17961   done
17962
17963   (set) 2>&1 |
17964     case $as_nl`(ac_space=' '; set) 2>&1` in #(
17965     *${as_nl}ac_space=\ *)
17966       # `set' does not quote correctly, so add quotes: double-quote
17967       # substitution turns \\\\ into \\, and sed turns \\ into \.
17968       sed -n \
17969         "s/'/'\\\\''/g;
17970           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17971       ;; #(
17972     *)
17973       # `set' quotes correctly as required by POSIX, so do not add quotes.
17974       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
17975       ;;
17976     esac |
17977     sort
17978 ) |
17979   sed '
17980      /^ac_cv_env_/b end
17981      t clear
17982      :clear
17983      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17984      t end
17985      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17986      :end' >>confcache
17987 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17988   if test -w "$cache_file"; then
17989     if test "x$cache_file" != "x/dev/null"; then
17990       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17991 $as_echo "$as_me: updating cache $cache_file" >&6;}
17992       if test ! -f "$cache_file" || test -h "$cache_file"; then
17993         cat confcache >"$cache_file"
17994       else
17995         case $cache_file in #(
17996         */* | ?:*)
17997           mv -f confcache "$cache_file"$$ &&
17998           mv -f "$cache_file"$$ "$cache_file" ;; #(
17999         *)
18000           mv -f confcache "$cache_file" ;;
18001         esac
18002       fi
18003     fi
18004   else
18005     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18006 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18007   fi
18008 fi
18009 rm -f confcache
18010
18011 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18012 # Let make expand exec_prefix.
18013 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18014
18015 DEFS=-DHAVE_CONFIG_H
18016
18017 ac_libobjs=
18018 ac_ltlibobjs=
18019 U=
18020 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18021   # 1. Remove the extension, and $U if already installed.
18022   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18023   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18024   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
18025   #    will be set to the directory where LIBOBJS objects are built.
18026   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18027   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18028 done
18029 LIBOBJS=$ac_libobjs
18030
18031 LTLIBOBJS=$ac_ltlibobjs
18032
18033
18034 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
18035   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
18036 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18037 fi
18038 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
18039   as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
18040 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18041 fi
18042 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
18043   as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
18044 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18045 fi
18046
18047
18048 : "${CONFIG_STATUS=./config.status}"
18049 ac_write_fail=0
18050 ac_clean_files_save=$ac_clean_files
18051 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18052 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18053 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18054 as_write_fail=0
18055 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18056 #! $SHELL
18057 # Generated by $as_me.
18058 # Run this file to recreate the current configuration.
18059 # Compiler output produced by configure, useful for debugging
18060 # configure, is in config.log if it exists.
18061
18062 debug=false
18063 ac_cs_recheck=false
18064 ac_cs_silent=false
18065
18066 SHELL=\${CONFIG_SHELL-$SHELL}
18067 export SHELL
18068 _ASEOF
18069 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18070 ## -------------------- ##
18071 ## M4sh Initialization. ##
18072 ## -------------------- ##
18073
18074 # Be more Bourne compatible
18075 DUALCASE=1; export DUALCASE # for MKS sh
18076 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18077   emulate sh
18078   NULLCMD=:
18079   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18080   # is contrary to our usage.  Disable this feature.
18081   alias -g '${1+"$@"}'='"$@"'
18082   setopt NO_GLOB_SUBST
18083 else
18084   case `(set -o) 2>/dev/null` in #(
18085   *posix*) :
18086     set -o posix ;; #(
18087   *) :
18088      ;;
18089 esac
18090 fi
18091
18092
18093 as_nl='
18094 '
18095 export as_nl
18096 # Printing a long string crashes Solaris 7 /usr/bin/printf.
18097 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18098 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18099 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18100 # Prefer a ksh shell builtin over an external printf program on Solaris,
18101 # but without wasting forks for bash or zsh.
18102 if test -z "$BASH_VERSION$ZSH_VERSION" \
18103     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18104   as_echo='print -r --'
18105   as_echo_n='print -rn --'
18106 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18107   as_echo='printf %s\n'
18108   as_echo_n='printf %s'
18109 else
18110   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18111     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18112     as_echo_n='/usr/ucb/echo -n'
18113   else
18114     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18115     as_echo_n_body='eval
18116       arg=$1;
18117       case $arg in #(
18118       *"$as_nl"*)
18119         expr "X$arg" : "X\\(.*\\)$as_nl";
18120         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18121       esac;
18122       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18123     '
18124     export as_echo_n_body
18125     as_echo_n='sh -c $as_echo_n_body as_echo'
18126   fi
18127   export as_echo_body
18128   as_echo='sh -c $as_echo_body as_echo'
18129 fi
18130
18131 # The user is always right.
18132 if test "${PATH_SEPARATOR+set}" != set; then
18133   PATH_SEPARATOR=:
18134   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18135     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18136       PATH_SEPARATOR=';'
18137   }
18138 fi
18139
18140
18141 # IFS
18142 # We need space, tab and new line, in precisely that order.  Quoting is
18143 # there to prevent editors from complaining about space-tab.
18144 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
18145 # splitting by setting IFS to empty value.)
18146 IFS=" ""        $as_nl"
18147
18148 # Find who we are.  Look in the path if we contain no directory separator.
18149 as_myself=
18150 case $0 in #((
18151   *[\\/]* ) as_myself=$0 ;;
18152   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18153 for as_dir in $PATH
18154 do
18155   IFS=$as_save_IFS
18156   test -z "$as_dir" && as_dir=.
18157     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18158   done
18159 IFS=$as_save_IFS
18160
18161      ;;
18162 esac
18163 # We did not find ourselves, most probably we were run as `sh COMMAND'
18164 # in which case we are not to be found in the path.
18165 if test "x$as_myself" = x; then
18166   as_myself=$0
18167 fi
18168 if test ! -f "$as_myself"; then
18169   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18170   exit 1
18171 fi
18172
18173 # Unset variables that we do not need and which cause bugs (e.g. in
18174 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
18175 # suppresses any "Segmentation fault" message there.  '((' could
18176 # trigger a bug in pdksh 5.2.14.
18177 for as_var in BASH_ENV ENV MAIL MAILPATH
18178 do eval test x\${$as_var+set} = xset \
18179   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18180 done
18181 PS1='$ '
18182 PS2='> '
18183 PS4='+ '
18184
18185 # NLS nuisances.
18186 LC_ALL=C
18187 export LC_ALL
18188 LANGUAGE=C
18189 export LANGUAGE
18190
18191 # CDPATH.
18192 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18193
18194
18195 # as_fn_error STATUS ERROR [LINENO LOG_FD]
18196 # ----------------------------------------
18197 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18198 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
18199 # script with STATUS, using 1 if that was 0.
18200 as_fn_error ()
18201 {
18202   as_status=$1; test $as_status -eq 0 && as_status=1
18203   if test "$4"; then
18204     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18205     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
18206   fi
18207   $as_echo "$as_me: error: $2" >&2
18208   as_fn_exit $as_status
18209 } # as_fn_error
18210
18211
18212 # as_fn_set_status STATUS
18213 # -----------------------
18214 # Set $? to STATUS, without forking.
18215 as_fn_set_status ()
18216 {
18217   return $1
18218 } # as_fn_set_status
18219
18220 # as_fn_exit STATUS
18221 # -----------------
18222 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18223 as_fn_exit ()
18224 {
18225   set +e
18226   as_fn_set_status $1
18227   exit $1
18228 } # as_fn_exit
18229
18230 # as_fn_unset VAR
18231 # ---------------
18232 # Portably unset VAR.
18233 as_fn_unset ()
18234 {
18235   { eval $1=; unset $1;}
18236 }
18237 as_unset=as_fn_unset
18238 # as_fn_append VAR VALUE
18239 # ----------------------
18240 # Append the text in VALUE to the end of the definition contained in VAR. Take
18241 # advantage of any shell optimizations that allow amortized linear growth over
18242 # repeated appends, instead of the typical quadratic growth present in naive
18243 # implementations.
18244 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18245   eval 'as_fn_append ()
18246   {
18247     eval $1+=\$2
18248   }'
18249 else
18250   as_fn_append ()
18251   {
18252     eval $1=\$$1\$2
18253   }
18254 fi # as_fn_append
18255
18256 # as_fn_arith ARG...
18257 # ------------------
18258 # Perform arithmetic evaluation on the ARGs, and store the result in the
18259 # global $as_val. Take advantage of shells that can avoid forks. The arguments
18260 # must be portable across $(()) and expr.
18261 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18262   eval 'as_fn_arith ()
18263   {
18264     as_val=$(( $* ))
18265   }'
18266 else
18267   as_fn_arith ()
18268   {
18269     as_val=`expr "$@" || test $? -eq 1`
18270   }
18271 fi # as_fn_arith
18272
18273
18274 if expr a : '\(a\)' >/dev/null 2>&1 &&
18275    test "X`expr 00001 : '.*\(...\)'`" = X001; then
18276   as_expr=expr
18277 else
18278   as_expr=false
18279 fi
18280
18281 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18282   as_basename=basename
18283 else
18284   as_basename=false
18285 fi
18286
18287 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18288   as_dirname=dirname
18289 else
18290   as_dirname=false
18291 fi
18292
18293 as_me=`$as_basename -- "$0" ||
18294 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18295          X"$0" : 'X\(//\)$' \| \
18296          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18297 $as_echo X/"$0" |
18298     sed '/^.*\/\([^/][^/]*\)\/*$/{
18299             s//\1/
18300             q
18301           }
18302           /^X\/\(\/\/\)$/{
18303             s//\1/
18304             q
18305           }
18306           /^X\/\(\/\).*/{
18307             s//\1/
18308             q
18309           }
18310           s/.*/./; q'`
18311
18312 # Avoid depending upon Character Ranges.
18313 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18314 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18315 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18316 as_cr_digits='0123456789'
18317 as_cr_alnum=$as_cr_Letters$as_cr_digits
18318
18319 ECHO_C= ECHO_N= ECHO_T=
18320 case `echo -n x` in #(((((
18321 -n*)
18322   case `echo 'xy\c'` in
18323   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
18324   xy)  ECHO_C='\c';;
18325   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
18326        ECHO_T=' ';;
18327   esac;;
18328 *)
18329   ECHO_N='-n';;
18330 esac
18331
18332 rm -f conf$$ conf$$.exe conf$$.file
18333 if test -d conf$$.dir; then
18334   rm -f conf$$.dir/conf$$.file
18335 else
18336   rm -f conf$$.dir
18337   mkdir conf$$.dir 2>/dev/null
18338 fi
18339 if (echo >conf$$.file) 2>/dev/null; then
18340   if ln -s conf$$.file conf$$ 2>/dev/null; then
18341     as_ln_s='ln -s'
18342     # ... but there are two gotchas:
18343     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18344     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18345     # In both cases, we have to default to `cp -pR'.
18346     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18347       as_ln_s='cp -pR'
18348   elif ln conf$$.file conf$$ 2>/dev/null; then
18349     as_ln_s=ln
18350   else
18351     as_ln_s='cp -pR'
18352   fi
18353 else
18354   as_ln_s='cp -pR'
18355 fi
18356 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18357 rmdir conf$$.dir 2>/dev/null
18358
18359
18360 # as_fn_mkdir_p
18361 # -------------
18362 # Create "$as_dir" as a directory, including parents if necessary.
18363 as_fn_mkdir_p ()
18364 {
18365
18366   case $as_dir in #(
18367   -*) as_dir=./$as_dir;;
18368   esac
18369   test -d "$as_dir" || eval $as_mkdir_p || {
18370     as_dirs=
18371     while :; do
18372       case $as_dir in #(
18373       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18374       *) as_qdir=$as_dir;;
18375       esac
18376       as_dirs="'$as_qdir' $as_dirs"
18377       as_dir=`$as_dirname -- "$as_dir" ||
18378 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18379          X"$as_dir" : 'X\(//\)[^/]' \| \
18380          X"$as_dir" : 'X\(//\)$' \| \
18381          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18382 $as_echo X"$as_dir" |
18383     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18384             s//\1/
18385             q
18386           }
18387           /^X\(\/\/\)[^/].*/{
18388             s//\1/
18389             q
18390           }
18391           /^X\(\/\/\)$/{
18392             s//\1/
18393             q
18394           }
18395           /^X\(\/\).*/{
18396             s//\1/
18397             q
18398           }
18399           s/.*/./; q'`
18400       test -d "$as_dir" && break
18401     done
18402     test -z "$as_dirs" || eval "mkdir $as_dirs"
18403   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
18404
18405
18406 } # as_fn_mkdir_p
18407 if mkdir -p . 2>/dev/null; then
18408   as_mkdir_p='mkdir -p "$as_dir"'
18409 else
18410   test -d ./-p && rmdir ./-p
18411   as_mkdir_p=false
18412 fi
18413
18414
18415 # as_fn_executable_p FILE
18416 # -----------------------
18417 # Test if FILE is an executable regular file.
18418 as_fn_executable_p ()
18419 {
18420   test -f "$1" && test -x "$1"
18421 } # as_fn_executable_p
18422 as_test_x='test -x'
18423 as_executable_p=as_fn_executable_p
18424
18425 # Sed expression to map a string onto a valid CPP name.
18426 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18427
18428 # Sed expression to map a string onto a valid variable name.
18429 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18430
18431
18432 exec 6>&1
18433 ## ----------------------------------- ##
18434 ## Main body of $CONFIG_STATUS script. ##
18435 ## ----------------------------------- ##
18436 _ASEOF
18437 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18438
18439 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18440 # Save the log message, to keep $0 and so on meaningful, and to
18441 # report actual input values of CONFIG_FILES etc. instead of their
18442 # values after options handling.
18443 ac_log="
18444 This file was extended by $as_me, which was
18445 generated by GNU Autoconf 2.69.  Invocation command line was
18446
18447   CONFIG_FILES    = $CONFIG_FILES
18448   CONFIG_HEADERS  = $CONFIG_HEADERS
18449   CONFIG_LINKS    = $CONFIG_LINKS
18450   CONFIG_COMMANDS = $CONFIG_COMMANDS
18451   $ $0 $@
18452
18453 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18454 "
18455
18456 _ACEOF
18457
18458 case $ac_config_files in *"
18459 "*) set x $ac_config_files; shift; ac_config_files=$*;;
18460 esac
18461
18462 case $ac_config_headers in *"
18463 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18464 esac
18465
18466
18467 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18468 # Files that config.status was made for.
18469 config_files="$ac_config_files"
18470 config_headers="$ac_config_headers"
18471 config_links="$ac_config_links"
18472 config_commands="$ac_config_commands"
18473
18474 _ACEOF
18475
18476 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18477 ac_cs_usage="\
18478 \`$as_me' instantiates files and other configuration actions
18479 from templates according to the current configuration.  Unless the files
18480 and actions are specified as TAGs, all are instantiated by default.
18481
18482 Usage: $0 [OPTION]... [TAG]...
18483
18484   -h, --help       print this help, then exit
18485   -V, --version    print version number and configuration settings, then exit
18486       --config     print configuration, then exit
18487   -q, --quiet, --silent
18488                    do not print progress messages
18489   -d, --debug      don't remove temporary files
18490       --recheck    update $as_me by reconfiguring in the same conditions
18491       --file=FILE[:TEMPLATE]
18492                    instantiate the configuration file FILE
18493       --header=FILE[:TEMPLATE]
18494                    instantiate the configuration header FILE
18495
18496 Configuration files:
18497 $config_files
18498
18499 Configuration headers:
18500 $config_headers
18501
18502 Configuration links:
18503 $config_links
18504
18505 Configuration commands:
18506 $config_commands
18507
18508 Report bugs to the package provider."
18509
18510 _ACEOF
18511 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18512 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
18513 ac_cs_version="\\
18514 config.status
18515 configured by $0, generated by GNU Autoconf 2.69,
18516   with options \\"\$ac_cs_config\\"
18517
18518 Copyright (C) 2012 Free Software Foundation, Inc.
18519 This config.status script is free software; the Free Software Foundation
18520 gives unlimited permission to copy, distribute and modify it."
18521
18522 ac_pwd='$ac_pwd'
18523 srcdir='$srcdir'
18524 INSTALL='$INSTALL'
18525 AWK='$AWK'
18526 test -n "\$AWK" || AWK=awk
18527 _ACEOF
18528
18529 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18530 # The default lists apply if the user does not specify any file.
18531 ac_need_defaults=:
18532 while test $# != 0
18533 do
18534   case $1 in
18535   --*=?*)
18536     ac_option=`expr "X$1" : 'X\([^=]*\)='`
18537     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18538     ac_shift=:
18539     ;;
18540   --*=)
18541     ac_option=`expr "X$1" : 'X\([^=]*\)='`
18542     ac_optarg=
18543     ac_shift=:
18544     ;;
18545   *)
18546     ac_option=$1
18547     ac_optarg=$2
18548     ac_shift=shift
18549     ;;
18550   esac
18551
18552   case $ac_option in
18553   # Handling of the options.
18554   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18555     ac_cs_recheck=: ;;
18556   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18557     $as_echo "$ac_cs_version"; exit ;;
18558   --config | --confi | --conf | --con | --co | --c )
18559     $as_echo "$ac_cs_config"; exit ;;
18560   --debug | --debu | --deb | --de | --d | -d )
18561     debug=: ;;
18562   --file | --fil | --fi | --f )
18563     $ac_shift
18564     case $ac_optarg in
18565     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18566     '') as_fn_error $? "missing file argument" ;;
18567     esac
18568     as_fn_append CONFIG_FILES " '$ac_optarg'"
18569     ac_need_defaults=false;;
18570   --header | --heade | --head | --hea )
18571     $ac_shift
18572     case $ac_optarg in
18573     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18574     esac
18575     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
18576     ac_need_defaults=false;;
18577   --he | --h)
18578     # Conflict between --help and --header
18579     as_fn_error $? "ambiguous option: \`$1'
18580 Try \`$0 --help' for more information.";;
18581   --help | --hel | -h )
18582     $as_echo "$ac_cs_usage"; exit ;;
18583   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18584   | -silent | --silent | --silen | --sile | --sil | --si | --s)
18585     ac_cs_silent=: ;;
18586
18587   # This is an error.
18588   -*) as_fn_error $? "unrecognized option: \`$1'
18589 Try \`$0 --help' for more information." ;;
18590
18591   *) as_fn_append ac_config_targets " $1"
18592      ac_need_defaults=false ;;
18593
18594   esac
18595   shift
18596 done
18597
18598 ac_configure_extra_args=
18599
18600 if $ac_cs_silent; then
18601   exec 6>/dev/null
18602   ac_configure_extra_args="$ac_configure_extra_args --silent"
18603 fi
18604
18605 _ACEOF
18606 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18607 if \$ac_cs_recheck; then
18608   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18609   shift
18610   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18611   CONFIG_SHELL='$SHELL'
18612   export CONFIG_SHELL
18613   exec "\$@"
18614 fi
18615
18616 _ACEOF
18617 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18618 exec 5>>config.log
18619 {
18620   echo
18621   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18622 ## Running $as_me. ##
18623 _ASBOX
18624   $as_echo "$ac_log"
18625 } >&5
18626
18627 _ACEOF
18628 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18629 #
18630 # INIT-COMMANDS
18631 #
18632 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
18633
18634 _ACEOF
18635
18636 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18637
18638 # Handling of arguments.
18639 for ac_config_target in $ac_config_targets
18640 do
18641   case $ac_config_target in
18642     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18643     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
18644     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
18645     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
18646     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
18647     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18648     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
18649     "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
18650     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
18651     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
18652
18653   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
18654   esac
18655 done
18656
18657
18658 # If the user did not use the arguments to specify the items to instantiate,
18659 # then the envvar interface is used.  Set only those that are not.
18660 # We use the long form for the default assignment because of an extremely
18661 # bizarre bug on SunOS 4.1.3.
18662 if $ac_need_defaults; then
18663   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18664   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18665   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18666   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18667 fi
18668
18669 # Have a temporary directory for convenience.  Make it in the build tree
18670 # simply because there is no reason against having it here, and in addition,
18671 # creating and moving files from /tmp can sometimes cause problems.
18672 # Hook for its removal unless debugging.
18673 # Note that there is a small window in which the directory will not be cleaned:
18674 # after its creation but before its name has been assigned to `$tmp'.
18675 $debug ||
18676 {
18677   tmp= ac_tmp=
18678   trap 'exit_status=$?
18679   : "${ac_tmp:=$tmp}"
18680   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
18681 ' 0
18682   trap 'as_fn_exit 1' 1 2 13 15
18683 }
18684 # Create a (secure) tmp directory for tmp files.
18685
18686 {
18687   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18688   test -d "$tmp"
18689 }  ||
18690 {
18691   tmp=./conf$$-$RANDOM
18692   (umask 077 && mkdir "$tmp")
18693 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18694 ac_tmp=$tmp
18695
18696 # Set up the scripts for CONFIG_FILES section.
18697 # No need to generate them if there are no CONFIG_FILES.
18698 # This happens for instance with `./config.status config.h'.
18699 if test -n "$CONFIG_FILES"; then
18700
18701 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18702   ac_cs_awk_getline=:
18703   ac_cs_awk_pipe_init=
18704   ac_cs_awk_read_file='
18705       while ((getline aline < (F[key])) > 0)
18706         print(aline)
18707       close(F[key])'
18708   ac_cs_awk_pipe_fini=
18709 else
18710   ac_cs_awk_getline=false
18711   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18712   ac_cs_awk_read_file='
18713       print "|#_!!_#|"
18714       print "cat " F[key] " &&"
18715       '$ac_cs_awk_pipe_init
18716   # The final `:' finishes the AND list.
18717   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18718 fi
18719 ac_cr=`echo X | tr X '\015'`
18720 # On cygwin, bash can eat \r inside `` if the user requested igncr.
18721 # But we know of no other shell where ac_cr would be empty at this
18722 # point, so we can use a bashism as a fallback.
18723 if test "x$ac_cr" = x; then
18724   eval ac_cr=\$\'\\r\'
18725 fi
18726 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18727 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18728   ac_cs_awk_cr='\\r'
18729 else
18730   ac_cs_awk_cr=$ac_cr
18731 fi
18732
18733 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
18734 _ACEOF
18735
18736 # Create commands to substitute file output variables.
18737 {
18738   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18739   echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
18740   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18741   echo "_ACAWK" &&
18742   echo "_ACEOF"
18743 } >conf$$files.sh &&
18744 . ./conf$$files.sh ||
18745   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18746 rm -f conf$$files.sh
18747
18748 {
18749   echo "cat >conf$$subs.awk <<_ACEOF" &&
18750   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18751   echo "_ACEOF"
18752 } >conf$$subs.sh ||
18753   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18754 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
18755 ac_delim='%!_!# '
18756 for ac_last_try in false false false false false :; do
18757   . ./conf$$subs.sh ||
18758     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18759
18760   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18761   if test $ac_delim_n = $ac_delim_num; then
18762     break
18763   elif $ac_last_try; then
18764     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18765   else
18766     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18767   fi
18768 done
18769 rm -f conf$$subs.sh
18770
18771 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18772 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
18773 _ACEOF
18774 sed -n '
18775 h
18776 s/^/S["/; s/!.*/"]=/
18777 p
18778 g
18779 s/^[^!]*!//
18780 :repl
18781 t repl
18782 s/'"$ac_delim"'$//
18783 t delim
18784 :nl
18785 h
18786 s/\(.\{148\}\)..*/\1/
18787 t more1
18788 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18789 p
18790 n
18791 b repl
18792 :more1
18793 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18794 p
18795 g
18796 s/.\{148\}//
18797 t nl
18798 :delim
18799 h
18800 s/\(.\{148\}\)..*/\1/
18801 t more2
18802 s/["\\]/\\&/g; s/^/"/; s/$/"/
18803 p
18804 b
18805 :more2
18806 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18807 p
18808 g
18809 s/.\{148\}//
18810 t delim
18811 ' <conf$$subs.awk | sed '
18812 /^[^""]/{
18813   N
18814   s/\n//
18815 }
18816 ' >>$CONFIG_STATUS || ac_write_fail=1
18817 rm -f conf$$subs.awk
18818 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18819 _ACAWK
18820 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
18821   for (key in S) S_is_set[key] = 1
18822   FS = "\a"
18823   \$ac_cs_awk_pipe_init
18824 }
18825 {
18826   line = $ 0
18827   nfields = split(line, field, "@")
18828   substed = 0
18829   len = length(field[1])
18830   for (i = 2; i < nfields; i++) {
18831     key = field[i]
18832     keylen = length(key)
18833     if (S_is_set[key]) {
18834       value = S[key]
18835       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18836       len += length(value) + length(field[++i])
18837       substed = 1
18838     } else
18839       len += 1 + keylen
18840   }
18841   if (nfields == 3 && !substed) {
18842     key = field[2]
18843     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
18844       \$ac_cs_awk_read_file
18845       next
18846     }
18847   }
18848   print line
18849 }
18850 \$ac_cs_awk_pipe_fini
18851 _ACAWK
18852 _ACEOF
18853 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18854 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18855   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18856 else
18857   cat
18858 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18859   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
18860 _ACEOF
18861
18862 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18863 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
18864 # trailing colons and then remove the whole line if VPATH becomes empty
18865 # (actually we leave an empty line to preserve line numbers).
18866 if test "x$srcdir" = x.; then
18867   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
18868 h
18869 s///
18870 s/^/:/
18871 s/[      ]*$/:/
18872 s/:\$(srcdir):/:/g
18873 s/:\${srcdir}:/:/g
18874 s/:@srcdir@:/:/g
18875 s/^:*//
18876 s/:*$//
18877 x
18878 s/\(=[   ]*\).*/\1/
18879 G
18880 s/\n//
18881 s/^[^=]*=[       ]*$//
18882 }'
18883 fi
18884
18885 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18886 fi # test -n "$CONFIG_FILES"
18887
18888 # Set up the scripts for CONFIG_HEADERS section.
18889 # No need to generate them if there are no CONFIG_HEADERS.
18890 # This happens for instance with `./config.status Makefile'.
18891 if test -n "$CONFIG_HEADERS"; then
18892 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
18893 BEGIN {
18894 _ACEOF
18895
18896 # Transform confdefs.h into an awk script `defines.awk', embedded as
18897 # here-document in config.status, that substitutes the proper values into
18898 # config.h.in to produce config.h.
18899
18900 # Create a delimiter string that does not exist in confdefs.h, to ease
18901 # handling of long lines.
18902 ac_delim='%!_!# '
18903 for ac_last_try in false false :; do
18904   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18905   if test -z "$ac_tt"; then
18906     break
18907   elif $ac_last_try; then
18908     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
18909   else
18910     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18911   fi
18912 done
18913
18914 # For the awk script, D is an array of macro values keyed by name,
18915 # likewise P contains macro parameters if any.  Preserve backslash
18916 # newline sequences.
18917
18918 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18919 sed -n '
18920 s/.\{148\}/&'"$ac_delim"'/g
18921 t rset
18922 :rset
18923 s/^[     ]*#[    ]*define[       ][      ]*/ /
18924 t def
18925 d
18926 :def
18927 s/\\$//
18928 t bsnl
18929 s/["\\]/\\&/g
18930 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18931 D["\1"]=" \3"/p
18932 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
18933 d
18934 :bsnl
18935 s/["\\]/\\&/g
18936 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18937 D["\1"]=" \3\\\\\\n"\\/p
18938 t cont
18939 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18940 t cont
18941 d
18942 :cont
18943 n
18944 s/.\{148\}/&'"$ac_delim"'/g
18945 t clear
18946 :clear
18947 s/\\$//
18948 t bsnlc
18949 s/["\\]/\\&/g; s/^/"/; s/$/"/p
18950 d
18951 :bsnlc
18952 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18953 b cont
18954 ' <confdefs.h | sed '
18955 s/'"$ac_delim"'/"\\\
18956 "/g' >>$CONFIG_STATUS || ac_write_fail=1
18957
18958 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18959   for (key in D) D_is_set[key] = 1
18960   FS = "\a"
18961 }
18962 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18963   line = \$ 0
18964   split(line, arg, " ")
18965   if (arg[1] == "#") {
18966     defundef = arg[2]
18967     mac1 = arg[3]
18968   } else {
18969     defundef = substr(arg[1], 2)
18970     mac1 = arg[2]
18971   }
18972   split(mac1, mac2, "(") #)
18973   macro = mac2[1]
18974   prefix = substr(line, 1, index(line, defundef) - 1)
18975   if (D_is_set[macro]) {
18976     # Preserve the white space surrounding the "#".
18977     print prefix "define", macro P[macro] D[macro]
18978     next
18979   } else {
18980     # Replace #undef with comments.  This is necessary, for example,
18981     # in the case of _POSIX_SOURCE, which is predefined and required
18982     # on some systems where configure will not decide to define it.
18983     if (defundef == "undef") {
18984       print "/*", prefix defundef, macro, "*/"
18985       next
18986     }
18987   }
18988 }
18989 { print }
18990 _ACAWK
18991 _ACEOF
18992 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18993   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
18994 fi # test -n "$CONFIG_HEADERS"
18995
18996
18997 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
18998 shift
18999 for ac_tag
19000 do
19001   case $ac_tag in
19002   :[FHLC]) ac_mode=$ac_tag; continue;;
19003   esac
19004   case $ac_mode$ac_tag in
19005   :[FHL]*:*);;
19006   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
19007   :[FH]-) ac_tag=-:-;;
19008   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19009   esac
19010   ac_save_IFS=$IFS
19011   IFS=:
19012   set x $ac_tag
19013   IFS=$ac_save_IFS
19014   shift
19015   ac_file=$1
19016   shift
19017
19018   case $ac_mode in
19019   :L) ac_source=$1;;
19020   :[FH])
19021     ac_file_inputs=
19022     for ac_f
19023     do
19024       case $ac_f in
19025       -) ac_f="$ac_tmp/stdin";;
19026       *) # Look for the file first in the build tree, then in the source tree
19027          # (if the path is not absolute).  The absolute path cannot be DOS-style,
19028          # because $ac_f cannot contain `:'.
19029          test -f "$ac_f" ||
19030            case $ac_f in
19031            [\\/$]*) false;;
19032            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19033            esac ||
19034            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19035       esac
19036       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19037       as_fn_append ac_file_inputs " '$ac_f'"
19038     done
19039
19040     # Let's still pretend it is `configure' which instantiates (i.e., don't
19041     # use $as_me), people would be surprised to read:
19042     #    /* config.h.  Generated by config.status.  */
19043     configure_input='Generated from '`
19044           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19045         `' by configure.'
19046     if test x"$ac_file" != x-; then
19047       configure_input="$ac_file.  $configure_input"
19048       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19049 $as_echo "$as_me: creating $ac_file" >&6;}
19050     fi
19051     # Neutralize special characters interpreted by sed in replacement strings.
19052     case $configure_input in #(
19053     *\&* | *\|* | *\\* )
19054        ac_sed_conf_input=`$as_echo "$configure_input" |
19055        sed 's/[\\\\&|]/\\\\&/g'`;; #(
19056     *) ac_sed_conf_input=$configure_input;;
19057     esac
19058
19059     case $ac_tag in
19060     *:-:* | *:-) cat >"$ac_tmp/stdin" \
19061       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
19062     esac
19063     ;;
19064   esac
19065
19066   ac_dir=`$as_dirname -- "$ac_file" ||
19067 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19068          X"$ac_file" : 'X\(//\)[^/]' \| \
19069          X"$ac_file" : 'X\(//\)$' \| \
19070          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19071 $as_echo X"$ac_file" |
19072     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19073             s//\1/
19074             q
19075           }
19076           /^X\(\/\/\)[^/].*/{
19077             s//\1/
19078             q
19079           }
19080           /^X\(\/\/\)$/{
19081             s//\1/
19082             q
19083           }
19084           /^X\(\/\).*/{
19085             s//\1/
19086             q
19087           }
19088           s/.*/./; q'`
19089   as_dir="$ac_dir"; as_fn_mkdir_p
19090   ac_builddir=.
19091
19092 case "$ac_dir" in
19093 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19094 *)
19095   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19096   # A ".." for each directory in $ac_dir_suffix.
19097   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19098   case $ac_top_builddir_sub in
19099   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19100   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19101   esac ;;
19102 esac
19103 ac_abs_top_builddir=$ac_pwd
19104 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19105 # for backward compatibility:
19106 ac_top_builddir=$ac_top_build_prefix
19107
19108 case $srcdir in
19109   .)  # We are building in place.
19110     ac_srcdir=.
19111     ac_top_srcdir=$ac_top_builddir_sub
19112     ac_abs_top_srcdir=$ac_pwd ;;
19113   [\\/]* | ?:[\\/]* )  # Absolute name.
19114     ac_srcdir=$srcdir$ac_dir_suffix;
19115     ac_top_srcdir=$srcdir
19116     ac_abs_top_srcdir=$srcdir ;;
19117   *) # Relative name.
19118     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19119     ac_top_srcdir=$ac_top_build_prefix$srcdir
19120     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19121 esac
19122 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19123
19124
19125   case $ac_mode in
19126   :F)
19127   #
19128   # CONFIG_FILE
19129   #
19130
19131   case $INSTALL in
19132   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19133   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
19134   esac
19135 _ACEOF
19136
19137 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19138 # If the template does not know about datarootdir, expand it.
19139 # FIXME: This hack should be removed a few years after 2.60.
19140 ac_datarootdir_hack=; ac_datarootdir_seen=
19141 ac_sed_dataroot='
19142 /datarootdir/ {
19143   p
19144   q
19145 }
19146 /@datadir@/p
19147 /@docdir@/p
19148 /@infodir@/p
19149 /@localedir@/p
19150 /@mandir@/p'
19151 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19152 *datarootdir*) ac_datarootdir_seen=yes;;
19153 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19154   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19155 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19156 _ACEOF
19157 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19158   ac_datarootdir_hack='
19159   s&@datadir@&$datadir&g
19160   s&@docdir@&$docdir&g
19161   s&@infodir@&$infodir&g
19162   s&@localedir@&$localedir&g
19163   s&@mandir@&$mandir&g
19164   s&\\\${datarootdir}&$datarootdir&g' ;;
19165 esac
19166 _ACEOF
19167
19168 # Neutralize VPATH when `$srcdir' = `.'.
19169 # Shell code in configure.ac might set extrasub.
19170 # FIXME: do we really want to maintain this feature?
19171 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19172 ac_sed_extra="$ac_vpsub
19173 $extrasub
19174 _ACEOF
19175 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19176 :t
19177 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19178 s|@configure_input@|$ac_sed_conf_input|;t t
19179 s&@top_builddir@&$ac_top_builddir_sub&;t t
19180 s&@top_build_prefix@&$ac_top_build_prefix&;t t
19181 s&@srcdir@&$ac_srcdir&;t t
19182 s&@abs_srcdir@&$ac_abs_srcdir&;t t
19183 s&@top_srcdir@&$ac_top_srcdir&;t t
19184 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19185 s&@builddir@&$ac_builddir&;t t
19186 s&@abs_builddir@&$ac_abs_builddir&;t t
19187 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19188 s&@INSTALL@&$ac_INSTALL&;t t
19189 $ac_datarootdir_hack
19190 "
19191 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19192 if $ac_cs_awk_getline; then
19193   $AWK -f "$ac_tmp/subs.awk"
19194 else
19195   $AWK -f "$ac_tmp/subs.awk" | $SHELL
19196 fi \
19197   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19198
19199 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
19200   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19201   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
19202       "$ac_tmp/out"`; test -z "$ac_out"; } &&
19203   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19204 which seems to be undefined.  Please make sure it is defined" >&5
19205 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19206 which seems to be undefined.  Please make sure it is defined" >&2;}
19207
19208   rm -f "$ac_tmp/stdin"
19209   case $ac_file in
19210   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19211   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
19212   esac \
19213   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19214  ;;
19215   :H)
19216   #
19217   # CONFIG_HEADER
19218   #
19219   if test x"$ac_file" != x-; then
19220     {
19221       $as_echo "/* $configure_input  */" \
19222       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19223     } >"$ac_tmp/config.h" \
19224       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19225     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
19226       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19227 $as_echo "$as_me: $ac_file is unchanged" >&6;}
19228     else
19229       rm -f "$ac_file"
19230       mv "$ac_tmp/config.h" "$ac_file" \
19231         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19232     fi
19233   else
19234     $as_echo "/* $configure_input  */" \
19235       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19236       || as_fn_error $? "could not create -" "$LINENO" 5
19237   fi
19238  ;;
19239   :L)
19240   #
19241   # CONFIG_LINK
19242   #
19243
19244   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19245     :
19246   else
19247     # Prefer the file from the source tree if names are identical.
19248     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19249       ac_source=$srcdir/$ac_source
19250     fi
19251
19252     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19253 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
19254
19255     if test ! -r "$ac_source"; then
19256       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
19257     fi
19258     rm -f "$ac_file"
19259
19260     # Try a relative symlink, then a hard link, then a copy.
19261     case $ac_source in
19262     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19263         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19264     esac
19265     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19266       ln "$ac_source" "$ac_file" 2>/dev/null ||
19267       cp -p "$ac_source" "$ac_file" ||
19268       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
19269   fi
19270  ;;
19271   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19272 $as_echo "$as_me: executing $ac_file commands" >&6;}
19273  ;;
19274   esac
19275
19276
19277   case $ac_file$ac_mode in
19278     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
19279     "gcore":F) chmod +x gcore ;;
19280     "Makefile":F)
19281 case x$CONFIG_HEADERS in
19282 xconfig.h:config.in)
19283 echo > stamp-h ;;
19284 esac
19285  ;;
19286     "gdb-gdb.gdb":F)
19287 case x$CONFIG_HEADERS in
19288 xconfig.h:config.in)
19289 echo > stamp-h ;;
19290 esac
19291  ;;
19292     "gdb-gdb.py":F)
19293 case x$CONFIG_HEADERS in
19294 xconfig.h:config.in)
19295 echo > stamp-h ;;
19296 esac
19297  ;;
19298     "doc/Makefile":F)
19299 case x$CONFIG_HEADERS in
19300 xconfig.h:config.in)
19301 echo > stamp-h ;;
19302 esac
19303  ;;
19304     "data-directory/Makefile":F)
19305 case x$CONFIG_HEADERS in
19306 xconfig.h:config.in)
19307 echo > stamp-h ;;
19308 esac
19309  ;;
19310
19311   esac
19312 done # for ac_tag
19313
19314
19315 as_fn_exit 0
19316 _ACEOF
19317 ac_clean_files=$ac_clean_files_save
19318
19319 test $ac_write_fail = 0 ||
19320   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
19321
19322
19323 # configure is writing to config.log, and then calls config.status.
19324 # config.status does its own redirection, appending to config.log.
19325 # Unfortunately, on DOS this fails, as config.log is still kept open
19326 # by configure, so config.status won't be able to write to it; its
19327 # output is simply discarded.  So we exec the FD to /dev/null,
19328 # effectively closing config.log, so it can be properly (re)opened and
19329 # appended to by config.status.  When coming back to configure, we
19330 # need to make the FD available again.
19331 if test "$no_create" != yes; then
19332   ac_cs_success=:
19333   ac_config_status_args=
19334   test "$silent" = yes &&
19335     ac_config_status_args="$ac_config_status_args --quiet"
19336   exec 5>/dev/null
19337   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19338   exec 5>>config.log
19339   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19340   # would make configure fail if this is the last instruction.
19341   $ac_cs_success || as_fn_exit 1
19342 fi
19343
19344 #
19345 # CONFIG_SUBDIRS section.
19346 #
19347 if test "$no_recursion" != yes; then
19348
19349   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19350   # so they do not pile up.
19351   ac_sub_configure_args=
19352   ac_prev=
19353   eval "set x $ac_configure_args"
19354   shift
19355   for ac_arg
19356   do
19357     if test -n "$ac_prev"; then
19358       ac_prev=
19359       continue
19360     fi
19361     case $ac_arg in
19362     -cache-file | --cache-file | --cache-fil | --cache-fi \
19363     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19364       ac_prev=cache_file ;;
19365     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
19366     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19367     | --c=*)
19368       ;;
19369     --config-cache | -C)
19370       ;;
19371     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19372       ac_prev=srcdir ;;
19373     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19374       ;;
19375     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19376       ac_prev=prefix ;;
19377     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19378       ;;
19379     --disable-option-checking)
19380       ;;
19381     *)
19382       case $ac_arg in
19383       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19384       esac
19385       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
19386     esac
19387   done
19388
19389   # Always prepend --prefix to ensure using the same prefix
19390   # in subdir configurations.
19391   ac_arg="--prefix=$prefix"
19392   case $ac_arg in
19393   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19394   esac
19395   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19396
19397   # Pass --silent
19398   if test "$silent" = yes; then
19399     ac_sub_configure_args="--silent $ac_sub_configure_args"
19400   fi
19401
19402   # Always prepend --disable-option-checking to silence warnings, since
19403   # different subdirs can have different --enable and --with options.
19404   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
19405
19406   ac_popdir=`pwd`
19407   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
19408
19409     # Do not complain, so a configure script can configure whichever
19410     # parts of a large source tree are present.
19411     test -d "$srcdir/$ac_dir" || continue
19412
19413     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19414     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19415     $as_echo "$ac_msg" >&6
19416     as_dir="$ac_dir"; as_fn_mkdir_p
19417     ac_builddir=.
19418
19419 case "$ac_dir" in
19420 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19421 *)
19422   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19423   # A ".." for each directory in $ac_dir_suffix.
19424   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19425   case $ac_top_builddir_sub in
19426   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19427   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19428   esac ;;
19429 esac
19430 ac_abs_top_builddir=$ac_pwd
19431 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19432 # for backward compatibility:
19433 ac_top_builddir=$ac_top_build_prefix
19434
19435 case $srcdir in
19436   .)  # We are building in place.
19437     ac_srcdir=.
19438     ac_top_srcdir=$ac_top_builddir_sub
19439     ac_abs_top_srcdir=$ac_pwd ;;
19440   [\\/]* | ?:[\\/]* )  # Absolute name.
19441     ac_srcdir=$srcdir$ac_dir_suffix;
19442     ac_top_srcdir=$srcdir
19443     ac_abs_top_srcdir=$srcdir ;;
19444   *) # Relative name.
19445     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19446     ac_top_srcdir=$ac_top_build_prefix$srcdir
19447     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19448 esac
19449 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19450
19451
19452     cd "$ac_dir"
19453
19454     # Check for guested configure; otherwise get Cygnus style configure.
19455     if test -f "$ac_srcdir/configure.gnu"; then
19456       ac_sub_configure=$ac_srcdir/configure.gnu
19457     elif test -f "$ac_srcdir/configure"; then
19458       ac_sub_configure=$ac_srcdir/configure
19459     elif test -f "$ac_srcdir/configure.in"; then
19460       # This should be Cygnus configure.
19461       ac_sub_configure=$ac_aux_dir/configure
19462     else
19463       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19464 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
19465       ac_sub_configure=
19466     fi
19467
19468     # The recursion is here.
19469     if test -n "$ac_sub_configure"; then
19470       # Make the cache file name correct relative to the subdirectory.
19471       case $cache_file in
19472       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
19473       *) # Relative name.
19474         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
19475       esac
19476
19477       { $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
19478 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
19479       # The eval makes quoting arguments work.
19480       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19481            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
19482         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
19483     fi
19484
19485     cd "$ac_popdir"
19486   done
19487 fi
19488 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19489   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19490 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19491 fi
19492