Require readline 7 or newer
[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 CATOBJEXT
761 GENCAT
762 INSTOBJEXT
763 DATADIRNAME
764 CATALOGS
765 POSUB
766 GMSGFMT
767 XGETTEXT
768 INCINTL
769 LIBINTL_DEP
770 LIBINTL
771 USE_NLS
772 CCDEPMODE
773 DEPDIR
774 am__leading_dot
775 CXX_DIALECT
776 HAVE_CXX11
777 INSTALL_STRIP_PROGRAM
778 STRIP
779 install_sh
780 target_os
781 target_vendor
782 target_cpu
783 target
784 host_os
785 host_vendor
786 host_cpu
787 host
788 build_os
789 build_vendor
790 build_cpu
791 build
792 EGREP
793 GREP
794 CPP
795 ac_ct_CXX
796 CXXFLAGS
797 CXX
798 OBJEXT
799 EXEEXT
800 ac_ct_CC
801 CPPFLAGS
802 LDFLAGS
803 CFLAGS
804 CC
805 MAINT
806 MAINTAINER_MODE_FALSE
807 MAINTAINER_MODE_TRUE
808 target_alias
809 host_alias
810 build_alias
811 LIBS
812 ECHO_T
813 ECHO_N
814 ECHO_C
815 DEFS
816 mandir
817 localedir
818 libdir
819 psdir
820 pdfdir
821 dvidir
822 htmldir
823 infodir
824 docdir
825 oldincludedir
826 includedir
827 localstatedir
828 sharedstatedir
829 sysconfdir
830 datadir
831 datarootdir
832 libexecdir
833 sbindir
834 bindir
835 program_transform_name
836 prefix
837 exec_prefix
838 PACKAGE_URL
839 PACKAGE_BUGREPORT
840 PACKAGE_STRING
841 PACKAGE_VERSION
842 PACKAGE_TARNAME
843 PACKAGE_NAME
844 PATH_SEPARATOR
845 SHELL'
846 ac_subst_files='nat_makefile_frag'
847 ac_user_opts='
848 enable_option_checking
849 enable_maintainer_mode
850 enable_plugins
851 enable_largefile
852 with_separate_debug_dir
853 with_gdb_datadir
854 with_relocated_sources
855 with_auto_load_dir
856 with_auto_load_safe_path
857 enable_targets
858 enable_64_bit_bfd
859 enable_gdbmi
860 enable_tui
861 enable_gdbtk
862 with_libunwind_ia64
863 with_curses
864 enable_profiling
865 enable_codesign
866 with_pkgversion
867 with_bugurl
868 with_system_zlib
869 with_gnu_ld
870 enable_rpath
871 with_libiconv_prefix
872 with_iconv_bin
873 with_system_readline
874 with_jit_reader_dir
875 with_expat
876 with_libexpat_prefix
877 with_mpfr
878 with_libmpfr_prefix
879 with_python
880 with_guile
881 enable_source_highlight
882 with_intel_pt
883 with_libipt_prefix
884 with_included_regex
885 with_sysroot
886 with_system_gdbinit
887 enable_werror
888 enable_build_warnings
889 enable_gdb_build_warnings
890 enable_ubsan
891 with_lzma
892 with_liblzma_prefix
893 with_tcl
894 with_tk
895 with_x
896 enable_sim
897 enable_gdbserver
898 with_babeltrace
899 with_libbabeltrace_prefix
900 enable_unit_tests
901 '
902       ac_precious_vars='build_alias
903 host_alias
904 target_alias
905 CC
906 CFLAGS
907 LDFLAGS
908 LIBS
909 CPPFLAGS
910 CXX
911 CXXFLAGS
912 CCC
913 CPP
914 MAKEINFO
915 MAKEINFOFLAGS
916 YACC
917 YFLAGS
918 XMKMF'
919 ac_subdirs_all='testsuite
920 gdbtk
921 gdbserver'
922
923 # Initialize some variables set by options.
924 ac_init_help=
925 ac_init_version=false
926 ac_unrecognized_opts=
927 ac_unrecognized_sep=
928 # The variables have the same names as the options, with
929 # dashes changed to underlines.
930 cache_file=/dev/null
931 exec_prefix=NONE
932 no_create=
933 no_recursion=
934 prefix=NONE
935 program_prefix=NONE
936 program_suffix=NONE
937 program_transform_name=s,x,x,
938 silent=
939 site=
940 srcdir=
941 verbose=
942 x_includes=NONE
943 x_libraries=NONE
944
945 # Installation directory options.
946 # These are left unexpanded so users can "make install exec_prefix=/foo"
947 # and all the variables that are supposed to be based on exec_prefix
948 # by default will actually change.
949 # Use braces instead of parens because sh, perl, etc. also accept them.
950 # (The list follows the same order as the GNU Coding Standards.)
951 bindir='${exec_prefix}/bin'
952 sbindir='${exec_prefix}/sbin'
953 libexecdir='${exec_prefix}/libexec'
954 datarootdir='${prefix}/share'
955 datadir='${datarootdir}'
956 sysconfdir='${prefix}/etc'
957 sharedstatedir='${prefix}/com'
958 localstatedir='${prefix}/var'
959 includedir='${prefix}/include'
960 oldincludedir='/usr/include'
961 docdir='${datarootdir}/doc/${PACKAGE}'
962 infodir='${datarootdir}/info'
963 htmldir='${docdir}'
964 dvidir='${docdir}'
965 pdfdir='${docdir}'
966 psdir='${docdir}'
967 libdir='${exec_prefix}/lib'
968 localedir='${datarootdir}/locale'
969 mandir='${datarootdir}/man'
970
971 ac_prev=
972 ac_dashdash=
973 for ac_option
974 do
975   # If the previous option needs an argument, assign it.
976   if test -n "$ac_prev"; then
977     eval $ac_prev=\$ac_option
978     ac_prev=
979     continue
980   fi
981
982   case $ac_option in
983   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
984   *=)   ac_optarg= ;;
985   *)    ac_optarg=yes ;;
986   esac
987
988   # Accept the important Cygnus configure options, so we can diagnose typos.
989
990   case $ac_dashdash$ac_option in
991   --)
992     ac_dashdash=yes ;;
993
994   -bindir | --bindir | --bindi | --bind | --bin | --bi)
995     ac_prev=bindir ;;
996   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
997     bindir=$ac_optarg ;;
998
999   -build | --build | --buil | --bui | --bu)
1000     ac_prev=build_alias ;;
1001   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1002     build_alias=$ac_optarg ;;
1003
1004   -cache-file | --cache-file | --cache-fil | --cache-fi \
1005   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1006     ac_prev=cache_file ;;
1007   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1008   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1009     cache_file=$ac_optarg ;;
1010
1011   --config-cache | -C)
1012     cache_file=config.cache ;;
1013
1014   -datadir | --datadir | --datadi | --datad)
1015     ac_prev=datadir ;;
1016   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1017     datadir=$ac_optarg ;;
1018
1019   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1020   | --dataroo | --dataro | --datar)
1021     ac_prev=datarootdir ;;
1022   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1023   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1024     datarootdir=$ac_optarg ;;
1025
1026   -disable-* | --disable-*)
1027     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1028     # Reject names that are not valid shell variable names.
1029     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1030       as_fn_error $? "invalid feature name: $ac_useropt"
1031     ac_useropt_orig=$ac_useropt
1032     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1033     case $ac_user_opts in
1034       *"
1035 "enable_$ac_useropt"
1036 "*) ;;
1037       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1038          ac_unrecognized_sep=', ';;
1039     esac
1040     eval enable_$ac_useropt=no ;;
1041
1042   -docdir | --docdir | --docdi | --doc | --do)
1043     ac_prev=docdir ;;
1044   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1045     docdir=$ac_optarg ;;
1046
1047   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1048     ac_prev=dvidir ;;
1049   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1050     dvidir=$ac_optarg ;;
1051
1052   -enable-* | --enable-*)
1053     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1054     # Reject names that are not valid shell variable names.
1055     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1056       as_fn_error $? "invalid feature name: $ac_useropt"
1057     ac_useropt_orig=$ac_useropt
1058     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1059     case $ac_user_opts in
1060       *"
1061 "enable_$ac_useropt"
1062 "*) ;;
1063       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1064          ac_unrecognized_sep=', ';;
1065     esac
1066     eval enable_$ac_useropt=\$ac_optarg ;;
1067
1068   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1069   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1070   | --exec | --exe | --ex)
1071     ac_prev=exec_prefix ;;
1072   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1073   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1074   | --exec=* | --exe=* | --ex=*)
1075     exec_prefix=$ac_optarg ;;
1076
1077   -gas | --gas | --ga | --g)
1078     # Obsolete; use --with-gas.
1079     with_gas=yes ;;
1080
1081   -help | --help | --hel | --he | -h)
1082     ac_init_help=long ;;
1083   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1084     ac_init_help=recursive ;;
1085   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1086     ac_init_help=short ;;
1087
1088   -host | --host | --hos | --ho)
1089     ac_prev=host_alias ;;
1090   -host=* | --host=* | --hos=* | --ho=*)
1091     host_alias=$ac_optarg ;;
1092
1093   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1094     ac_prev=htmldir ;;
1095   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1096   | --ht=*)
1097     htmldir=$ac_optarg ;;
1098
1099   -includedir | --includedir | --includedi | --included | --include \
1100   | --includ | --inclu | --incl | --inc)
1101     ac_prev=includedir ;;
1102   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1103   | --includ=* | --inclu=* | --incl=* | --inc=*)
1104     includedir=$ac_optarg ;;
1105
1106   -infodir | --infodir | --infodi | --infod | --info | --inf)
1107     ac_prev=infodir ;;
1108   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1109     infodir=$ac_optarg ;;
1110
1111   -libdir | --libdir | --libdi | --libd)
1112     ac_prev=libdir ;;
1113   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1114     libdir=$ac_optarg ;;
1115
1116   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1117   | --libexe | --libex | --libe)
1118     ac_prev=libexecdir ;;
1119   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1120   | --libexe=* | --libex=* | --libe=*)
1121     libexecdir=$ac_optarg ;;
1122
1123   -localedir | --localedir | --localedi | --localed | --locale)
1124     ac_prev=localedir ;;
1125   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1126     localedir=$ac_optarg ;;
1127
1128   -localstatedir | --localstatedir | --localstatedi | --localstated \
1129   | --localstate | --localstat | --localsta | --localst | --locals)
1130     ac_prev=localstatedir ;;
1131   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1132   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1133     localstatedir=$ac_optarg ;;
1134
1135   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1136     ac_prev=mandir ;;
1137   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1138     mandir=$ac_optarg ;;
1139
1140   -nfp | --nfp | --nf)
1141     # Obsolete; use --without-fp.
1142     with_fp=no ;;
1143
1144   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1145   | --no-cr | --no-c | -n)
1146     no_create=yes ;;
1147
1148   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1149   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1150     no_recursion=yes ;;
1151
1152   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1153   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1154   | --oldin | --oldi | --old | --ol | --o)
1155     ac_prev=oldincludedir ;;
1156   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1157   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1158   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1159     oldincludedir=$ac_optarg ;;
1160
1161   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1162     ac_prev=prefix ;;
1163   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1164     prefix=$ac_optarg ;;
1165
1166   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1167   | --program-pre | --program-pr | --program-p)
1168     ac_prev=program_prefix ;;
1169   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1170   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1171     program_prefix=$ac_optarg ;;
1172
1173   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1174   | --program-suf | --program-su | --program-s)
1175     ac_prev=program_suffix ;;
1176   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1177   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1178     program_suffix=$ac_optarg ;;
1179
1180   -program-transform-name | --program-transform-name \
1181   | --program-transform-nam | --program-transform-na \
1182   | --program-transform-n | --program-transform- \
1183   | --program-transform | --program-transfor \
1184   | --program-transfo | --program-transf \
1185   | --program-trans | --program-tran \
1186   | --progr-tra | --program-tr | --program-t)
1187     ac_prev=program_transform_name ;;
1188   -program-transform-name=* | --program-transform-name=* \
1189   | --program-transform-nam=* | --program-transform-na=* \
1190   | --program-transform-n=* | --program-transform-=* \
1191   | --program-transform=* | --program-transfor=* \
1192   | --program-transfo=* | --program-transf=* \
1193   | --program-trans=* | --program-tran=* \
1194   | --progr-tra=* | --program-tr=* | --program-t=*)
1195     program_transform_name=$ac_optarg ;;
1196
1197   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1198     ac_prev=pdfdir ;;
1199   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1200     pdfdir=$ac_optarg ;;
1201
1202   -psdir | --psdir | --psdi | --psd | --ps)
1203     ac_prev=psdir ;;
1204   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1205     psdir=$ac_optarg ;;
1206
1207   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1208   | -silent | --silent | --silen | --sile | --sil)
1209     silent=yes ;;
1210
1211   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1212     ac_prev=sbindir ;;
1213   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1214   | --sbi=* | --sb=*)
1215     sbindir=$ac_optarg ;;
1216
1217   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1218   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1219   | --sharedst | --shareds | --shared | --share | --shar \
1220   | --sha | --sh)
1221     ac_prev=sharedstatedir ;;
1222   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1223   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1224   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1225   | --sha=* | --sh=*)
1226     sharedstatedir=$ac_optarg ;;
1227
1228   -site | --site | --sit)
1229     ac_prev=site ;;
1230   -site=* | --site=* | --sit=*)
1231     site=$ac_optarg ;;
1232
1233   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1234     ac_prev=srcdir ;;
1235   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1236     srcdir=$ac_optarg ;;
1237
1238   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1239   | --syscon | --sysco | --sysc | --sys | --sy)
1240     ac_prev=sysconfdir ;;
1241   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1242   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1243     sysconfdir=$ac_optarg ;;
1244
1245   -target | --target | --targe | --targ | --tar | --ta | --t)
1246     ac_prev=target_alias ;;
1247   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1248     target_alias=$ac_optarg ;;
1249
1250   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1251     verbose=yes ;;
1252
1253   -version | --version | --versio | --versi | --vers | -V)
1254     ac_init_version=: ;;
1255
1256   -with-* | --with-*)
1257     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1258     # Reject names that are not valid shell variable names.
1259     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1260       as_fn_error $? "invalid package name: $ac_useropt"
1261     ac_useropt_orig=$ac_useropt
1262     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1263     case $ac_user_opts in
1264       *"
1265 "with_$ac_useropt"
1266 "*) ;;
1267       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1268          ac_unrecognized_sep=', ';;
1269     esac
1270     eval with_$ac_useropt=\$ac_optarg ;;
1271
1272   -without-* | --without-*)
1273     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1274     # Reject names that are not valid shell variable names.
1275     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1276       as_fn_error $? "invalid package name: $ac_useropt"
1277     ac_useropt_orig=$ac_useropt
1278     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1279     case $ac_user_opts in
1280       *"
1281 "with_$ac_useropt"
1282 "*) ;;
1283       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1284          ac_unrecognized_sep=', ';;
1285     esac
1286     eval with_$ac_useropt=no ;;
1287
1288   --x)
1289     # Obsolete; use --with-x.
1290     with_x=yes ;;
1291
1292   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1293   | --x-incl | --x-inc | --x-in | --x-i)
1294     ac_prev=x_includes ;;
1295   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1296   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1297     x_includes=$ac_optarg ;;
1298
1299   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1300   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1301     ac_prev=x_libraries ;;
1302   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1303   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1304     x_libraries=$ac_optarg ;;
1305
1306   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1307 Try \`$0 --help' for more information"
1308     ;;
1309
1310   *=*)
1311     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1312     # Reject names that are not valid shell variable names.
1313     case $ac_envvar in #(
1314       '' | [0-9]* | *[!_$as_cr_alnum]* )
1315       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1316     esac
1317     eval $ac_envvar=\$ac_optarg
1318     export $ac_envvar ;;
1319
1320   *)
1321     # FIXME: should be removed in autoconf 3.0.
1322     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1323     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1324       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1325     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1326     ;;
1327
1328   esac
1329 done
1330
1331 if test -n "$ac_prev"; then
1332   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1333   as_fn_error $? "missing argument to $ac_option"
1334 fi
1335
1336 if test -n "$ac_unrecognized_opts"; then
1337   case $enable_option_checking in
1338     no) ;;
1339     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1340     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1341   esac
1342 fi
1343
1344 # Check all directory arguments for consistency.
1345 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1346                 datadir sysconfdir sharedstatedir localstatedir includedir \
1347                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1348                 libdir localedir mandir
1349 do
1350   eval ac_val=\$$ac_var
1351   # Remove trailing slashes.
1352   case $ac_val in
1353     */ )
1354       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1355       eval $ac_var=\$ac_val;;
1356   esac
1357   # Be sure to have absolute directory names.
1358   case $ac_val in
1359     [\\/$]* | ?:[\\/]* )  continue;;
1360     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1361   esac
1362   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1363 done
1364
1365 # There might be people who depend on the old broken behavior: `$host'
1366 # used to hold the argument of --host etc.
1367 # FIXME: To remove some day.
1368 build=$build_alias
1369 host=$host_alias
1370 target=$target_alias
1371
1372 # FIXME: To remove some day.
1373 if test "x$host_alias" != x; then
1374   if test "x$build_alias" = x; then
1375     cross_compiling=maybe
1376   elif test "x$build_alias" != "x$host_alias"; then
1377     cross_compiling=yes
1378   fi
1379 fi
1380
1381 ac_tool_prefix=
1382 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1383
1384 test "$silent" = yes && exec 6>/dev/null
1385
1386
1387 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1388 ac_ls_di=`ls -di .` &&
1389 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1390   as_fn_error $? "working directory cannot be determined"
1391 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1392   as_fn_error $? "pwd does not report name of working directory"
1393
1394
1395 # Find the source files, if location was not specified.
1396 if test -z "$srcdir"; then
1397   ac_srcdir_defaulted=yes
1398   # Try the directory containing this script, then the parent directory.
1399   ac_confdir=`$as_dirname -- "$as_myself" ||
1400 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1401          X"$as_myself" : 'X\(//\)[^/]' \| \
1402          X"$as_myself" : 'X\(//\)$' \| \
1403          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1404 $as_echo X"$as_myself" |
1405     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1406             s//\1/
1407             q
1408           }
1409           /^X\(\/\/\)[^/].*/{
1410             s//\1/
1411             q
1412           }
1413           /^X\(\/\/\)$/{
1414             s//\1/
1415             q
1416           }
1417           /^X\(\/\).*/{
1418             s//\1/
1419             q
1420           }
1421           s/.*/./; q'`
1422   srcdir=$ac_confdir
1423   if test ! -r "$srcdir/$ac_unique_file"; then
1424     srcdir=..
1425   fi
1426 else
1427   ac_srcdir_defaulted=no
1428 fi
1429 if test ! -r "$srcdir/$ac_unique_file"; then
1430   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1431   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1432 fi
1433 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1434 ac_abs_confdir=`(
1435         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1436         pwd)`
1437 # When building in place, set srcdir=.
1438 if test "$ac_abs_confdir" = "$ac_pwd"; then
1439   srcdir=.
1440 fi
1441 # Remove unnecessary trailing slashes from srcdir.
1442 # Double slashes in file names in object file debugging info
1443 # mess up M-x gdb in Emacs.
1444 case $srcdir in
1445 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1446 esac
1447 for ac_var in $ac_precious_vars; do
1448   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1449   eval ac_env_${ac_var}_value=\$${ac_var}
1450   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1451   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1452 done
1453
1454 #
1455 # Report the --help message.
1456 #
1457 if test "$ac_init_help" = "long"; then
1458   # Omit some internal or obsolete options to make the list less imposing.
1459   # This message is too long to be a string in the A/UX 3.1 sh.
1460   cat <<_ACEOF
1461 \`configure' configures this package to adapt to many kinds of systems.
1462
1463 Usage: $0 [OPTION]... [VAR=VALUE]...
1464
1465 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1466 VAR=VALUE.  See below for descriptions of some of the useful variables.
1467
1468 Defaults for the options are specified in brackets.
1469
1470 Configuration:
1471   -h, --help              display this help and exit
1472       --help=short        display options specific to this package
1473       --help=recursive    display the short help of all the included packages
1474   -V, --version           display version information and exit
1475   -q, --quiet, --silent   do not print \`checking ...' messages
1476       --cache-file=FILE   cache test results in FILE [disabled]
1477   -C, --config-cache      alias for \`--cache-file=config.cache'
1478   -n, --no-create         do not create output files
1479       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1480
1481 Installation directories:
1482   --prefix=PREFIX         install architecture-independent files in PREFIX
1483                           [$ac_default_prefix]
1484   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1485                           [PREFIX]
1486
1487 By default, \`make install' will install all the files in
1488 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1489 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1490 for instance \`--prefix=\$HOME'.
1491
1492 For better control, use the options below.
1493
1494 Fine tuning of the installation directories:
1495   --bindir=DIR            user executables [EPREFIX/bin]
1496   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1497   --libexecdir=DIR        program executables [EPREFIX/libexec]
1498   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1499   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1500   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1501   --libdir=DIR            object code libraries [EPREFIX/lib]
1502   --includedir=DIR        C header files [PREFIX/include]
1503   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1504   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1505   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1506   --infodir=DIR           info documentation [DATAROOTDIR/info]
1507   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1508   --mandir=DIR            man documentation [DATAROOTDIR/man]
1509   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1510   --htmldir=DIR           html documentation [DOCDIR]
1511   --dvidir=DIR            dvi documentation [DOCDIR]
1512   --pdfdir=DIR            pdf documentation [DOCDIR]
1513   --psdir=DIR             ps documentation [DOCDIR]
1514 _ACEOF
1515
1516   cat <<\_ACEOF
1517
1518 Program names:
1519   --program-prefix=PREFIX            prepend PREFIX to installed program names
1520   --program-suffix=SUFFIX            append SUFFIX to installed program names
1521   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1522
1523 X features:
1524   --x-includes=DIR    X include files are in DIR
1525   --x-libraries=DIR   X library files are in DIR
1526
1527 System types:
1528   --build=BUILD     configure for building on BUILD [guessed]
1529   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1530   --target=TARGET   configure for building compilers for TARGET [HOST]
1531 _ACEOF
1532 fi
1533
1534 if test -n "$ac_init_help"; then
1535
1536   cat <<\_ACEOF
1537
1538 Optional Features:
1539   --disable-option-checking  ignore unrecognized --enable/--with options
1540   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1541   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1542   --enable-maintainer-mode
1543                           enable make rules and dependencies not useful (and
1544                           sometimes confusing) to the casual installer
1545   --enable-plugins        Enable support for plugins
1546   --disable-largefile     omit support for large files
1547   --enable-targets=TARGETS
1548                           alternative target configurations
1549   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
1550   --disable-gdbmi         disable machine-interface (MI)
1551   --enable-tui            enable full-screen terminal user interface (TUI)
1552   --enable-gdbtk          enable gdbtk graphical user interface (GUI)
1553   --enable-profiling      enable profiling of GDB
1554   --enable-codesign=CERT  sign gdb with 'codesign -s CERT'
1555   --disable-rpath         do not hardcode runtime library paths
1556   --enable-source-highlight
1557                           enable source-highlight for source listings
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
6195 CONFIG_OBS=
6196 CONFIG_DEPS=
6197 CONFIG_SRCS=
6198 ENABLE_CFLAGS=
6199
6200 CONFIG_ALL=
6201 CONFIG_CLEAN=
6202 CONFIG_INSTALL=
6203 CONFIG_UNINSTALL=
6204
6205 # If we haven't got the data from the intl directory,
6206 # assume NLS is disabled.
6207 USE_NLS=no
6208 LIBINTL=
6209 LIBINTL_DEP=
6210 INCINTL=
6211 XGETTEXT=
6212 GMSGFMT=
6213 POSUB=
6214
6215 if test -f  ../intl/config.intl; then
6216   .  ../intl/config.intl
6217 fi
6218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6219 $as_echo_n "checking whether NLS is requested... " >&6; }
6220 if test x"$USE_NLS" != xyes; then
6221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6222 $as_echo "no" >&6; }
6223 else
6224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6225 $as_echo "yes" >&6; }
6226
6227 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6228
6229
6230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6231 $as_echo_n "checking for catalogs to be installed... " >&6; }
6232   # Look for .po and .gmo files in the source directory.
6233   CATALOGS=
6234   XLINGUAS=
6235   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6236     # If there aren't any .gmo files the shell will give us the
6237     # literal string "../path/to/srcdir/po/*.gmo" which has to be
6238     # weeded out.
6239     case "$cat" in *\**)
6240       continue;;
6241     esac
6242     # The quadruple backslash is collapsed to a double backslash
6243     # by the backticks, then collapsed again by the double quotes,
6244     # leaving us with one backslash in the sed expression (right
6245     # before the dot that mustn't act as a wildcard).
6246     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6247     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6248     # The user is allowed to set LINGUAS to a list of languages to
6249     # install catalogs for.  If it's empty that means "all of them."
6250     if test "x$LINGUAS" = x; then
6251       CATALOGS="$CATALOGS $cat"
6252       XLINGUAS="$XLINGUAS $lang"
6253     else
6254       case "$LINGUAS" in *$lang*)
6255         CATALOGS="$CATALOGS $cat"
6256         XLINGUAS="$XLINGUAS $lang"
6257         ;;
6258       esac
6259     fi
6260   done
6261   LINGUAS="$XLINGUAS"
6262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6263 $as_echo "$LINGUAS" >&6; }
6264
6265
6266     DATADIRNAME=share
6267
6268   INSTOBJEXT=.mo
6269
6270   GENCAT=gencat
6271
6272   CATOBJEXT=.gmo
6273
6274 fi
6275
6276 localedir='${datadir}/locale'
6277
6278
6279 if test x"$USE_NLS" = xyes; then
6280    CONFIG_ALL="$CONFIG_ALL all-po"
6281    CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6282    CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6283    CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6284 fi
6285
6286 PACKAGE=gdb
6287
6288 cat >>confdefs.h <<_ACEOF
6289 #define PACKAGE "$PACKAGE"
6290 _ACEOF
6291
6292
6293
6294 # We never need to detect it in this sub-configure.
6295 # But preserve it for config.status --recheck.
6296
6297
6298
6299 MAKEINFO_EXTRA_FLAGS=""
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6301 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6302 if ${gdb_cv_have_makeinfo_click+:} false; then :
6303   $as_echo_n "(cached) " >&6
6304 else
6305   echo '@clicksequence{a @click{} b}' >conftest.texinfo
6306   if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6307     gdb_cv_have_makeinfo_click=yes
6308   else
6309     gdb_cv_have_makeinfo_click=no
6310   fi
6311 fi
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6313 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6314 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6315   MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6316 fi
6317
6318
6319
6320
6321 # Check whether --with-separate-debug-dir was given.
6322 if test "${with_separate_debug_dir+set}" = set; then :
6323   withval=$with_separate_debug_dir;
6324     DEBUGDIR=$withval
6325 else
6326   DEBUGDIR=${libdir}/debug
6327 fi
6328
6329
6330   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6331   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6332   ac_define_dir=`eval echo $DEBUGDIR`
6333   ac_define_dir=`eval echo $ac_define_dir`
6334
6335 cat >>confdefs.h <<_ACEOF
6336 #define DEBUGDIR "$ac_define_dir"
6337 _ACEOF
6338
6339
6340
6341
6342   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6343      if test "x$prefix" = xNONE; then
6344         test_prefix=/usr/local
6345      else
6346         test_prefix=$prefix
6347      fi
6348   else
6349      test_prefix=$exec_prefix
6350   fi
6351   value=0
6352   case ${ac_define_dir} in
6353      "${test_prefix}"|"${test_prefix}/"*|\
6354         '${exec_prefix}'|'${exec_prefix}/'*)
6355      value=1
6356      ;;
6357   esac
6358
6359 cat >>confdefs.h <<_ACEOF
6360 #define DEBUGDIR_RELOCATABLE $value
6361 _ACEOF
6362
6363
6364
6365
6366 # We can't pass paths as command line arguments.
6367 # Mingw32 tries to be clever and will convert the paths for us.
6368 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6369 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6370 # This breaks GDB's relocatable path conversions since paths passed in
6371 # config.h would not get so translated, the path prefixes no longer match.
6372
6373   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6374   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6375   ac_define_dir=`eval echo $bindir`
6376   ac_define_dir=`eval echo $ac_define_dir`
6377
6378 cat >>confdefs.h <<_ACEOF
6379 #define BINDIR "$ac_define_dir"
6380 _ACEOF
6381
6382
6383
6384 # GDB's datadir relocation
6385
6386
6387
6388 # Check whether --with-gdb-datadir was given.
6389 if test "${with_gdb_datadir+set}" = set; then :
6390   withval=$with_gdb_datadir;
6391     GDB_DATADIR=$withval
6392 else
6393   GDB_DATADIR=${datadir}/gdb
6394 fi
6395
6396
6397   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6398   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6399   ac_define_dir=`eval echo $GDB_DATADIR`
6400   ac_define_dir=`eval echo $ac_define_dir`
6401
6402 cat >>confdefs.h <<_ACEOF
6403 #define GDB_DATADIR "$ac_define_dir"
6404 _ACEOF
6405
6406
6407
6408
6409   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6410      if test "x$prefix" = xNONE; then
6411         test_prefix=/usr/local
6412      else
6413         test_prefix=$prefix
6414      fi
6415   else
6416      test_prefix=$exec_prefix
6417   fi
6418   value=0
6419   case ${ac_define_dir} in
6420      "${test_prefix}"|"${test_prefix}/"*|\
6421         '${exec_prefix}'|'${exec_prefix}/'*)
6422      value=1
6423      ;;
6424   esac
6425
6426 cat >>confdefs.h <<_ACEOF
6427 #define GDB_DATADIR_RELOCATABLE $value
6428 _ACEOF
6429
6430
6431
6432
6433
6434 # Check whether --with-relocated-sources was given.
6435 if test "${with_relocated_sources+set}" = set; then :
6436   withval=$with_relocated_sources; reloc_srcdir="${withval}"
6437
6438   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6439   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6440   ac_define_dir=`eval echo $reloc_srcdir`
6441   ac_define_dir=`eval echo $ac_define_dir`
6442
6443 cat >>confdefs.h <<_ACEOF
6444 #define RELOC_SRCDIR "$ac_define_dir"
6445 _ACEOF
6446
6447
6448
6449 fi
6450
6451
6452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6453 $as_echo_n "checking for default auto-load directory... " >&6; }
6454
6455 # Check whether --with-auto-load-dir was given.
6456 if test "${with_auto_load_dir+set}" = set; then :
6457   withval=$with_auto_load_dir;
6458 else
6459   with_auto_load_dir='$debugdir:$datadir/auto-load'
6460 fi
6461
6462 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6463
6464   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6465   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6466   ac_define_dir=`eval echo $escape_dir`
6467   ac_define_dir=`eval echo $ac_define_dir`
6468
6469 cat >>confdefs.h <<_ACEOF
6470 #define AUTO_LOAD_DIR "$ac_define_dir"
6471 _ACEOF
6472
6473
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6475 $as_echo "$with_auto_load_dir" >&6; }
6476
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6478 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6479
6480 # Check whether --with-auto-load-safe-path was given.
6481 if test "${with_auto_load_safe_path+set}" = set; then :
6482   withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6483      with_auto_load_safe_path="/"
6484      fi
6485 else
6486   with_auto_load_safe_path="$with_auto_load_dir"
6487 fi
6488
6489 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6490
6491   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6492   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6493   ac_define_dir=`eval echo $escape_dir`
6494   ac_define_dir=`eval echo $ac_define_dir`
6495
6496 cat >>confdefs.h <<_ACEOF
6497 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6498 _ACEOF
6499
6500
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6502 $as_echo "$with_auto_load_safe_path" >&6; }
6503
6504
6505
6506 subdirs="$subdirs testsuite"
6507
6508
6509 # Check whether to support alternative target configurations
6510 # Check whether --enable-targets was given.
6511 if test "${enable_targets+set}" = set; then :
6512   enableval=$enable_targets; case "${enableval}" in
6513   yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6514             ;;
6515   no)       enable_targets= ;;
6516   *)        enable_targets=$enableval ;;
6517 esac
6518 fi
6519
6520
6521 # Check whether to enable 64-bit support on 32-bit hosts
6522 # Check whether --enable-64-bit-bfd was given.
6523 if test "${enable_64_bit_bfd+set}" = set; then :
6524   enableval=$enable_64_bit_bfd; case "${enableval}" in
6525   yes)  want64=true  ;;
6526   no)   want64=false ;;
6527   *)    as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6528 esac
6529 else
6530   want64=false
6531 fi
6532
6533 # Provide defaults for some variables set by the per-host and per-target
6534 # configuration.
6535 gdb_host_obs=posix-hdep.o
6536
6537 if test "${target}" = "${host}"; then
6538   gdb_native=yes
6539 else
6540   gdb_native=no
6541 fi
6542
6543 . $srcdir/configure.host
6544
6545 # Add in the common host objects.
6546 . $srcdir/gdbsupport/common.host
6547 gdb_host_obs="$gdb_host_obs $common_host_obs"
6548
6549 # Accumulate some settings from configure.tgt over all enabled targets
6550
6551 TARGET_OBS=
6552 all_targets=
6553 HAVE_NATIVE_GCORE_TARGET=
6554
6555 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6556 do
6557   if test "$targ_alias" = "all"; then
6558     all_targets=true
6559   else
6560     # Canonicalize the secondary target names.
6561     result=`$ac_config_sub $targ_alias 2>/dev/null`
6562     if test -n "$result"; then
6563         targ=$result
6564     else
6565         targ=$targ_alias
6566     fi
6567
6568     . ${srcdir}/configure.tgt
6569
6570     if test -z "${gdb_target_obs}"; then :
6571   as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6572 fi
6573
6574     # Target-specific object files
6575     for i in ${gdb_target_obs}; do
6576         case " $TARGET_OBS " in
6577         *" ${i} "*) ;;
6578         *)
6579           TARGET_OBS="$TARGET_OBS ${i}"
6580           ;;
6581         esac
6582     done
6583
6584     # Check whether this target needs 64-bit CORE_ADDR
6585     if test x${want64} = xfalse; then
6586       . ${srcdir}/../bfd/config.bfd
6587     fi
6588
6589     # Check whether this target is native and supports gcore.
6590     if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6591        && $gdb_have_gcore; then
6592       HAVE_NATIVE_GCORE_TARGET=1
6593     fi
6594   fi
6595 done
6596
6597 if test x${all_targets} = xtrue; then
6598
6599   # We want all 64-bit targets if we either:
6600   #  - run on a 64-bit host  or
6601   #  - already require 64-bit support for some other target  or
6602   #  - the --enable-64-bit-bfd option was supplied
6603   # Otherwise we only support all 32-bit targets.
6604   #
6605   # NOTE: This test must be in sync with the corresponding
6606   #       tests in BFD!
6607
6608   if test x${want64} = xfalse; then
6609     # The cast to long int works around a bug in the HP C Compiler
6610 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6611 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6612 # This bug is HP SR number 8606223364.
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6614 $as_echo_n "checking size of long... " >&6; }
6615 if ${ac_cv_sizeof_long+:} false; then :
6616   $as_echo_n "(cached) " >&6
6617 else
6618   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
6619
6620 else
6621   if test "$ac_cv_type_long" = yes; then
6622      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6623 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6624 as_fn_error 77 "cannot compute sizeof (long)
6625 See \`config.log' for more details" "$LINENO" 5; }
6626    else
6627      ac_cv_sizeof_long=0
6628    fi
6629 fi
6630
6631 fi
6632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6633 $as_echo "$ac_cv_sizeof_long" >&6; }
6634
6635
6636
6637 cat >>confdefs.h <<_ACEOF
6638 #define SIZEOF_LONG $ac_cv_sizeof_long
6639 _ACEOF
6640
6641
6642     if test "x${ac_cv_sizeof_long}" = "x8"; then
6643       want64=true
6644     fi
6645   fi
6646   if test x${want64} = xtrue; then
6647     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6648   else
6649     TARGET_OBS='$(ALL_TARGET_OBS)'
6650   fi
6651 fi
6652
6653
6654
6655
6656 # For other settings, only the main target counts.
6657 gdb_sim=
6658 gdb_osabi=
6659 build_gdbserver=
6660 targ=$target; . ${srcdir}/configure.tgt
6661
6662 # Fetch the default architecture and default target vector from BFD.
6663 targ=$target; . $srcdir/../bfd/config.bfd
6664
6665 # We only want the first architecture, so strip off the others if
6666 # there is more than one.
6667 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6668
6669 if test "x$targ_archs" != x; then
6670
6671 cat >>confdefs.h <<_ACEOF
6672 #define DEFAULT_BFD_ARCH $targ_archs
6673 _ACEOF
6674
6675 fi
6676 if test "x$targ_defvec" != x; then
6677
6678 cat >>confdefs.h <<_ACEOF
6679 #define DEFAULT_BFD_VEC $targ_defvec
6680 _ACEOF
6681
6682 fi
6683
6684 # Enable MI.
6685 # Check whether --enable-gdbmi was given.
6686 if test "${enable_gdbmi+set}" = set; then :
6687   enableval=$enable_gdbmi; case $enableval in
6688     yes | no)
6689       ;;
6690     *)
6691       as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6692   esac
6693 else
6694   enable_gdbmi=yes
6695 fi
6696
6697 if test x"$enable_gdbmi" = xyes; then
6698   if test -d $srcdir/mi; then
6699     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6700     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6701     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6702     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6703   fi
6704 fi
6705
6706 # Enable TUI.
6707 # Check whether --enable-tui was given.
6708 if test "${enable_tui+set}" = set; then :
6709   enableval=$enable_tui; case $enableval in
6710     yes | no | auto)
6711       ;;
6712     *)
6713       as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6714   esac
6715 else
6716   enable_tui=auto
6717 fi
6718
6719
6720 # Enable gdbtk.
6721 # Check whether --enable-gdbtk was given.
6722 if test "${enable_gdbtk+set}" = set; then :
6723   enableval=$enable_gdbtk; case $enableval in
6724     yes | no)
6725       ;;
6726     *)
6727       as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6728   esac
6729 else
6730   if test -d $srcdir/gdbtk; then
6731     enable_gdbtk=yes
6732   else
6733     enable_gdbtk=no
6734   fi
6735 fi
6736
6737 # We unconditionally disable gdbtk tests on selected platforms.
6738 case $host_os in
6739   go32* | windows*)
6740     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6741 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6742     enable_gdbtk=no ;;
6743 esac
6744
6745 # Libunwind support for ia64.
6746
6747
6748 # Check whether --with-libunwind-ia64 was given.
6749 if test "${with_libunwind_ia64+set}" = set; then :
6750   withval=$with_libunwind_ia64;
6751 else
6752   with_libunwind_ia64=auto
6753 fi
6754
6755
6756 # Backward compatibility option.
6757 if test "${with_libunwind+set}" = set; then
6758   if test x"$with_libunwind_ia64" != xauto; then
6759     as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6760   fi
6761   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6762 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6763   with_libunwind_ia64="$with_libunwind"
6764 fi
6765
6766 case "$with_libunwind_ia64" in
6767   yes | no)
6768     ;;
6769   auto)
6770     for ac_header in libunwind-ia64.h
6771 do :
6772   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6773 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6774   cat >>confdefs.h <<_ACEOF
6775 #define HAVE_LIBUNWIND_IA64_H 1
6776 _ACEOF
6777
6778 fi
6779
6780 done
6781
6782     with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6783     ;;
6784   *)
6785     as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6786     ;;
6787 esac
6788
6789 if test x"$with_libunwind_ia64" = xyes; then
6790   for ac_header in libunwind-ia64.h
6791 do :
6792   ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6793 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6794   cat >>confdefs.h <<_ACEOF
6795 #define HAVE_LIBUNWIND_IA64_H 1
6796 _ACEOF
6797
6798 fi
6799
6800 done
6801
6802   if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6803     as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6804   fi
6805   CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6806   CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6807   CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6808 fi
6809
6810 opt_curses=no
6811
6812 # Check whether --with-curses was given.
6813 if test "${with_curses+set}" = set; then :
6814   withval=$with_curses; opt_curses=$withval
6815 fi
6816
6817
6818 prefer_curses=no
6819 if test "$opt_curses" = "yes"; then
6820   prefer_curses=yes
6821 fi
6822
6823 # Profiling support.
6824 # Check whether --enable-profiling was given.
6825 if test "${enable_profiling+set}" = set; then :
6826   enableval=$enable_profiling; case $enableval in
6827     yes | no)
6828       ;;
6829     *)
6830       as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6831   esac
6832 else
6833   enable_profiling=no
6834 fi
6835
6836
6837 for ac_func in monstartup _mcleanup
6838 do :
6839   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6840 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6841 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6842   cat >>confdefs.h <<_ACEOF
6843 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6844 _ACEOF
6845
6846 fi
6847 done
6848
6849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6850 $as_echo_n "checking for _etext... " >&6; }
6851 if ${ac_cv_var__etext+:} false; then :
6852   $as_echo_n "(cached) " >&6
6853 else
6854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6855 /* end confdefs.h.  */
6856 #include <stdlib.h>
6857 extern char _etext;
6858
6859 int
6860 main ()
6861 {
6862 free (&_etext);
6863   ;
6864   return 0;
6865 }
6866 _ACEOF
6867 if ac_fn_c_try_link "$LINENO"; then :
6868   ac_cv_var__etext=yes
6869 else
6870   ac_cv_var__etext=no
6871 fi
6872 rm -f core conftest.err conftest.$ac_objext \
6873     conftest$ac_exeext conftest.$ac_ext
6874 fi
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6876 $as_echo "$ac_cv_var__etext" >&6; }
6877 if test $ac_cv_var__etext = yes; then
6878
6879 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
6880
6881 fi
6882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6883 $as_echo_n "checking for etext... " >&6; }
6884 if ${ac_cv_var_etext+:} false; then :
6885   $as_echo_n "(cached) " >&6
6886 else
6887   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6888 /* end confdefs.h.  */
6889 #include <stdlib.h>
6890 extern char etext;
6891
6892 int
6893 main ()
6894 {
6895 free (&etext);
6896   ;
6897   return 0;
6898 }
6899 _ACEOF
6900 if ac_fn_c_try_link "$LINENO"; then :
6901   ac_cv_var_etext=yes
6902 else
6903   ac_cv_var_etext=no
6904 fi
6905 rm -f core conftest.err conftest.$ac_objext \
6906     conftest$ac_exeext conftest.$ac_ext
6907 fi
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6909 $as_echo "$ac_cv_var_etext" >&6; }
6910 if test $ac_cv_var_etext = yes; then
6911
6912 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
6913
6914 fi
6915 if test "$enable_profiling" = yes ; then
6916   if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
6917     as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
6918   fi
6919   PROFILE_CFLAGS=-pg
6920   OLD_CFLAGS="$CFLAGS"
6921   CFLAGS="$CFLAGS $PROFILE_CFLAGS"
6922
6923   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6924 $as_echo_n "checking whether $CC supports -pg... " >&6; }
6925 if ${ac_cv_cc_supports_pg+:} false; then :
6926   $as_echo_n "(cached) " >&6
6927 else
6928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6929 /* end confdefs.h.  */
6930
6931 int
6932 main ()
6933 {
6934 int x;
6935   ;
6936   return 0;
6937 }
6938 _ACEOF
6939 if ac_fn_c_try_compile "$LINENO"; then :
6940   ac_cv_cc_supports_pg=yes
6941 else
6942   ac_cv_cc_supports_pg=no
6943 fi
6944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6945 fi
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6947 $as_echo "$ac_cv_cc_supports_pg" >&6; }
6948
6949   if test $ac_cv_cc_supports_pg = no; then
6950     as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
6951   fi
6952
6953   CFLAGS="$OLD_CFLAGS"
6954 fi
6955
6956 CODESIGN_CERT=
6957 # Check whether --enable-codesign was given.
6958 if test "${enable_codesign+set}" = set; then :
6959   enableval=$enable_codesign; CODESIGN_CERT=$enableval
6960 fi
6961
6962
6963
6964
6965
6966 # Check whether --with-pkgversion was given.
6967 if test "${with_pkgversion+set}" = set; then :
6968   withval=$with_pkgversion; case "$withval" in
6969       yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
6970       no)  PKGVERSION= ;;
6971       *)   PKGVERSION="($withval) " ;;
6972      esac
6973 else
6974   PKGVERSION="(GDB) "
6975
6976 fi
6977
6978
6979
6980
6981
6982 # Check whether --with-bugurl was given.
6983 if test "${with_bugurl+set}" = set; then :
6984   withval=$with_bugurl; case "$withval" in
6985       yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
6986       no)  BUGURL=
6987            ;;
6988       *)   BUGURL="$withval"
6989            ;;
6990      esac
6991 else
6992   BUGURL="http://www.gnu.org/software/gdb/bugs/"
6993
6994 fi
6995
6996   case ${BUGURL} in
6997   "")
6998     REPORT_BUGS_TO=
6999     REPORT_BUGS_TEXI=
7000     ;;
7001   *)
7002     REPORT_BUGS_TO="<$BUGURL>"
7003     REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7004     ;;
7005   esac;
7006
7007
7008
7009
7010 cat >>confdefs.h <<_ACEOF
7011 #define PKGVERSION "$PKGVERSION"
7012 _ACEOF
7013
7014
7015 cat >>confdefs.h <<_ACEOF
7016 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7017 _ACEOF
7018
7019
7020 # --------------------- #
7021 # Checks for programs.  #
7022 # --------------------- #
7023
7024 for ac_prog in gawk mawk nawk awk
7025 do
7026   # Extract the first word of "$ac_prog", so it can be a program name with args.
7027 set dummy $ac_prog; ac_word=$2
7028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7029 $as_echo_n "checking for $ac_word... " >&6; }
7030 if ${ac_cv_prog_AWK+:} false; then :
7031   $as_echo_n "(cached) " >&6
7032 else
7033   if test -n "$AWK"; then
7034   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7035 else
7036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7037 for as_dir in $PATH
7038 do
7039   IFS=$as_save_IFS
7040   test -z "$as_dir" && as_dir=.
7041     for ac_exec_ext in '' $ac_executable_extensions; do
7042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7043     ac_cv_prog_AWK="$ac_prog"
7044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7045     break 2
7046   fi
7047 done
7048   done
7049 IFS=$as_save_IFS
7050
7051 fi
7052 fi
7053 AWK=$ac_cv_prog_AWK
7054 if test -n "$AWK"; then
7055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7056 $as_echo "$AWK" >&6; }
7057 else
7058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7059 $as_echo "no" >&6; }
7060 fi
7061
7062
7063   test -n "$AWK" && break
7064 done
7065
7066 # Find a good install program.  We prefer a C program (faster),
7067 # so one script is as good as another.  But avoid the broken or
7068 # incompatible versions:
7069 # SysV /etc/install, /usr/sbin/install
7070 # SunOS /usr/etc/install
7071 # IRIX /sbin/install
7072 # AIX /bin/install
7073 # AmigaOS /C/install, which installs bootblocks on floppy discs
7074 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7075 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7076 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7077 # OS/2's system install, which has a completely different semantic
7078 # ./install, which can be erroneously created by make from ./install.sh.
7079 # Reject install programs that cannot install multiple files.
7080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7081 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7082 if test -z "$INSTALL"; then
7083 if ${ac_cv_path_install+:} false; then :
7084   $as_echo_n "(cached) " >&6
7085 else
7086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7087 for as_dir in $PATH
7088 do
7089   IFS=$as_save_IFS
7090   test -z "$as_dir" && as_dir=.
7091     # Account for people who put trailing slashes in PATH elements.
7092 case $as_dir/ in #((
7093   ./ | .// | /[cC]/* | \
7094   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7095   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7096   /usr/ucb/* ) ;;
7097   *)
7098     # OSF1 and SCO ODT 3.0 have their own names for install.
7099     # Don't use installbsd from OSF since it installs stuff as root
7100     # by default.
7101     for ac_prog in ginstall scoinst install; do
7102       for ac_exec_ext in '' $ac_executable_extensions; do
7103         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7104           if test $ac_prog = install &&
7105             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7106             # AIX install.  It has an incompatible calling convention.
7107             :
7108           elif test $ac_prog = install &&
7109             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7110             # program-specific install script used by HP pwplus--don't use.
7111             :
7112           else
7113             rm -rf conftest.one conftest.two conftest.dir
7114             echo one > conftest.one
7115             echo two > conftest.two
7116             mkdir conftest.dir
7117             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7118               test -s conftest.one && test -s conftest.two &&
7119               test -s conftest.dir/conftest.one &&
7120               test -s conftest.dir/conftest.two
7121             then
7122               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7123               break 3
7124             fi
7125           fi
7126         fi
7127       done
7128     done
7129     ;;
7130 esac
7131
7132   done
7133 IFS=$as_save_IFS
7134
7135 rm -rf conftest.one conftest.two conftest.dir
7136
7137 fi
7138   if test "${ac_cv_path_install+set}" = set; then
7139     INSTALL=$ac_cv_path_install
7140   else
7141     # As a last resort, use the slow shell script.  Don't cache a
7142     # value for INSTALL within a source directory, because that will
7143     # break other packages using the cache if that directory is
7144     # removed, or if the value is a relative name.
7145     INSTALL=$ac_install_sh
7146   fi
7147 fi
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7149 $as_echo "$INSTALL" >&6; }
7150
7151 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7152 # It thinks the first close brace ends the variable substitution.
7153 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7154
7155 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7156
7157 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7158
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7160 $as_echo_n "checking whether ln -s works... " >&6; }
7161 LN_S=$as_ln_s
7162 if test "$LN_S" = "ln -s"; then
7163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7164 $as_echo "yes" >&6; }
7165 else
7166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7167 $as_echo "no, using $LN_S" >&6; }
7168 fi
7169
7170 if test -n "$ac_tool_prefix"; then
7171   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7172 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7174 $as_echo_n "checking for $ac_word... " >&6; }
7175 if ${ac_cv_prog_RANLIB+:} false; then :
7176   $as_echo_n "(cached) " >&6
7177 else
7178   if test -n "$RANLIB"; then
7179   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7180 else
7181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7182 for as_dir in $PATH
7183 do
7184   IFS=$as_save_IFS
7185   test -z "$as_dir" && as_dir=.
7186     for ac_exec_ext in '' $ac_executable_extensions; do
7187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7188     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7190     break 2
7191   fi
7192 done
7193   done
7194 IFS=$as_save_IFS
7195
7196 fi
7197 fi
7198 RANLIB=$ac_cv_prog_RANLIB
7199 if test -n "$RANLIB"; then
7200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7201 $as_echo "$RANLIB" >&6; }
7202 else
7203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7204 $as_echo "no" >&6; }
7205 fi
7206
7207
7208 fi
7209 if test -z "$ac_cv_prog_RANLIB"; then
7210   ac_ct_RANLIB=$RANLIB
7211   # Extract the first word of "ranlib", so it can be a program name with args.
7212 set dummy ranlib; ac_word=$2
7213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7214 $as_echo_n "checking for $ac_word... " >&6; }
7215 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7216   $as_echo_n "(cached) " >&6
7217 else
7218   if test -n "$ac_ct_RANLIB"; then
7219   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7220 else
7221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7222 for as_dir in $PATH
7223 do
7224   IFS=$as_save_IFS
7225   test -z "$as_dir" && as_dir=.
7226     for ac_exec_ext in '' $ac_executable_extensions; do
7227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7228     ac_cv_prog_ac_ct_RANLIB="ranlib"
7229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7230     break 2
7231   fi
7232 done
7233   done
7234 IFS=$as_save_IFS
7235
7236 fi
7237 fi
7238 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7239 if test -n "$ac_ct_RANLIB"; then
7240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7241 $as_echo "$ac_ct_RANLIB" >&6; }
7242 else
7243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244 $as_echo "no" >&6; }
7245 fi
7246
7247   if test "x$ac_ct_RANLIB" = x; then
7248     RANLIB=":"
7249   else
7250     case $cross_compiling:$ac_tool_warned in
7251 yes:)
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7253 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7254 ac_tool_warned=yes ;;
7255 esac
7256     RANLIB=$ac_ct_RANLIB
7257   fi
7258 else
7259   RANLIB="$ac_cv_prog_RANLIB"
7260 fi
7261
7262 for ac_prog in 'bison -y' byacc
7263 do
7264   # Extract the first word of "$ac_prog", so it can be a program name with args.
7265 set dummy $ac_prog; ac_word=$2
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7267 $as_echo_n "checking for $ac_word... " >&6; }
7268 if ${ac_cv_prog_YACC+:} false; then :
7269   $as_echo_n "(cached) " >&6
7270 else
7271   if test -n "$YACC"; then
7272   ac_cv_prog_YACC="$YACC" # Let the user override the test.
7273 else
7274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275 for as_dir in $PATH
7276 do
7277   IFS=$as_save_IFS
7278   test -z "$as_dir" && as_dir=.
7279     for ac_exec_ext in '' $ac_executable_extensions; do
7280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281     ac_cv_prog_YACC="$ac_prog"
7282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283     break 2
7284   fi
7285 done
7286   done
7287 IFS=$as_save_IFS
7288
7289 fi
7290 fi
7291 YACC=$ac_cv_prog_YACC
7292 if test -n "$YACC"; then
7293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7294 $as_echo "$YACC" >&6; }
7295 else
7296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7297 $as_echo "no" >&6; }
7298 fi
7299
7300
7301   test -n "$YACC" && break
7302 done
7303 test -n "$YACC" || YACC="yacc"
7304
7305
7306 if test -n "$ac_tool_prefix"; then
7307   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7308 set dummy ${ac_tool_prefix}ar; ac_word=$2
7309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7310 $as_echo_n "checking for $ac_word... " >&6; }
7311 if ${ac_cv_prog_AR+:} false; then :
7312   $as_echo_n "(cached) " >&6
7313 else
7314   if test -n "$AR"; then
7315   ac_cv_prog_AR="$AR" # Let the user override the test.
7316 else
7317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7318 for as_dir in $PATH
7319 do
7320   IFS=$as_save_IFS
7321   test -z "$as_dir" && as_dir=.
7322     for ac_exec_ext in '' $ac_executable_extensions; do
7323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7324     ac_cv_prog_AR="${ac_tool_prefix}ar"
7325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7326     break 2
7327   fi
7328 done
7329   done
7330 IFS=$as_save_IFS
7331
7332 fi
7333 fi
7334 AR=$ac_cv_prog_AR
7335 if test -n "$AR"; then
7336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7337 $as_echo "$AR" >&6; }
7338 else
7339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7340 $as_echo "no" >&6; }
7341 fi
7342
7343
7344 fi
7345 if test -z "$ac_cv_prog_AR"; then
7346   ac_ct_AR=$AR
7347   # Extract the first word of "ar", so it can be a program name with args.
7348 set dummy ar; ac_word=$2
7349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7350 $as_echo_n "checking for $ac_word... " >&6; }
7351 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7352   $as_echo_n "(cached) " >&6
7353 else
7354   if test -n "$ac_ct_AR"; then
7355   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7356 else
7357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7358 for as_dir in $PATH
7359 do
7360   IFS=$as_save_IFS
7361   test -z "$as_dir" && as_dir=.
7362     for ac_exec_ext in '' $ac_executable_extensions; do
7363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7364     ac_cv_prog_ac_ct_AR="ar"
7365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7366     break 2
7367   fi
7368 done
7369   done
7370 IFS=$as_save_IFS
7371
7372 fi
7373 fi
7374 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7375 if test -n "$ac_ct_AR"; then
7376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7377 $as_echo "$ac_ct_AR" >&6; }
7378 else
7379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7380 $as_echo "no" >&6; }
7381 fi
7382
7383   if test "x$ac_ct_AR" = x; then
7384     AR=""
7385   else
7386     case $cross_compiling:$ac_tool_warned in
7387 yes:)
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7389 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7390 ac_tool_warned=yes ;;
7391 esac
7392     AR=$ac_ct_AR
7393   fi
7394 else
7395   AR="$ac_cv_prog_AR"
7396 fi
7397
7398 if test -n "$ac_tool_prefix"; then
7399   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7400 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7402 $as_echo_n "checking for $ac_word... " >&6; }
7403 if ${ac_cv_prog_DLLTOOL+:} false; then :
7404   $as_echo_n "(cached) " >&6
7405 else
7406   if test -n "$DLLTOOL"; then
7407   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7408 else
7409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7410 for as_dir in $PATH
7411 do
7412   IFS=$as_save_IFS
7413   test -z "$as_dir" && as_dir=.
7414     for ac_exec_ext in '' $ac_executable_extensions; do
7415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7416     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7418     break 2
7419   fi
7420 done
7421   done
7422 IFS=$as_save_IFS
7423
7424 fi
7425 fi
7426 DLLTOOL=$ac_cv_prog_DLLTOOL
7427 if test -n "$DLLTOOL"; then
7428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7429 $as_echo "$DLLTOOL" >&6; }
7430 else
7431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7432 $as_echo "no" >&6; }
7433 fi
7434
7435
7436 fi
7437 if test -z "$ac_cv_prog_DLLTOOL"; then
7438   ac_ct_DLLTOOL=$DLLTOOL
7439   # Extract the first word of "dlltool", so it can be a program name with args.
7440 set dummy dlltool; ac_word=$2
7441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7442 $as_echo_n "checking for $ac_word... " >&6; }
7443 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7444   $as_echo_n "(cached) " >&6
7445 else
7446   if test -n "$ac_ct_DLLTOOL"; then
7447   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7448 else
7449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7450 for as_dir in $PATH
7451 do
7452   IFS=$as_save_IFS
7453   test -z "$as_dir" && as_dir=.
7454     for ac_exec_ext in '' $ac_executable_extensions; do
7455   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7456     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7458     break 2
7459   fi
7460 done
7461   done
7462 IFS=$as_save_IFS
7463
7464 fi
7465 fi
7466 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7467 if test -n "$ac_ct_DLLTOOL"; then
7468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7469 $as_echo "$ac_ct_DLLTOOL" >&6; }
7470 else
7471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7472 $as_echo "no" >&6; }
7473 fi
7474
7475   if test "x$ac_ct_DLLTOOL" = x; then
7476     DLLTOOL=""
7477   else
7478     case $cross_compiling:$ac_tool_warned in
7479 yes:)
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7481 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7482 ac_tool_warned=yes ;;
7483 esac
7484     DLLTOOL=$ac_ct_DLLTOOL
7485   fi
7486 else
7487   DLLTOOL="$ac_cv_prog_DLLTOOL"
7488 fi
7489
7490 if test -n "$ac_tool_prefix"; then
7491   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7492 set dummy ${ac_tool_prefix}windres; ac_word=$2
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7494 $as_echo_n "checking for $ac_word... " >&6; }
7495 if ${ac_cv_prog_WINDRES+:} false; then :
7496   $as_echo_n "(cached) " >&6
7497 else
7498   if test -n "$WINDRES"; then
7499   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7500 else
7501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7502 for as_dir in $PATH
7503 do
7504   IFS=$as_save_IFS
7505   test -z "$as_dir" && as_dir=.
7506     for ac_exec_ext in '' $ac_executable_extensions; do
7507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7508     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7510     break 2
7511   fi
7512 done
7513   done
7514 IFS=$as_save_IFS
7515
7516 fi
7517 fi
7518 WINDRES=$ac_cv_prog_WINDRES
7519 if test -n "$WINDRES"; then
7520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7521 $as_echo "$WINDRES" >&6; }
7522 else
7523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7524 $as_echo "no" >&6; }
7525 fi
7526
7527
7528 fi
7529 if test -z "$ac_cv_prog_WINDRES"; then
7530   ac_ct_WINDRES=$WINDRES
7531   # Extract the first word of "windres", so it can be a program name with args.
7532 set dummy windres; ac_word=$2
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7534 $as_echo_n "checking for $ac_word... " >&6; }
7535 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7536   $as_echo_n "(cached) " >&6
7537 else
7538   if test -n "$ac_ct_WINDRES"; then
7539   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7540 else
7541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7542 for as_dir in $PATH
7543 do
7544   IFS=$as_save_IFS
7545   test -z "$as_dir" && as_dir=.
7546     for ac_exec_ext in '' $ac_executable_extensions; do
7547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7548     ac_cv_prog_ac_ct_WINDRES="windres"
7549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7550     break 2
7551   fi
7552 done
7553   done
7554 IFS=$as_save_IFS
7555
7556 fi
7557 fi
7558 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7559 if test -n "$ac_ct_WINDRES"; then
7560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7561 $as_echo "$ac_ct_WINDRES" >&6; }
7562 else
7563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7564 $as_echo "no" >&6; }
7565 fi
7566
7567   if test "x$ac_ct_WINDRES" = x; then
7568     WINDRES=""
7569   else
7570     case $cross_compiling:$ac_tool_warned in
7571 yes:)
7572 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7573 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7574 ac_tool_warned=yes ;;
7575 esac
7576     WINDRES=$ac_ct_WINDRES
7577   fi
7578 else
7579   WINDRES="$ac_cv_prog_WINDRES"
7580 fi
7581
7582
7583 case $host_os in
7584   gnu*)
7585     # Needed for GNU Hurd hosts.
7586     if test -n "$ac_tool_prefix"; then
7587   # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7588 set dummy ${ac_tool_prefix}mig; ac_word=$2
7589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7590 $as_echo_n "checking for $ac_word... " >&6; }
7591 if ${ac_cv_prog_MIG+:} false; then :
7592   $as_echo_n "(cached) " >&6
7593 else
7594   if test -n "$MIG"; then
7595   ac_cv_prog_MIG="$MIG" # Let the user override the test.
7596 else
7597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7598 for as_dir in $PATH
7599 do
7600   IFS=$as_save_IFS
7601   test -z "$as_dir" && as_dir=.
7602     for ac_exec_ext in '' $ac_executable_extensions; do
7603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7604     ac_cv_prog_MIG="${ac_tool_prefix}mig"
7605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7606     break 2
7607   fi
7608 done
7609   done
7610 IFS=$as_save_IFS
7611
7612 fi
7613 fi
7614 MIG=$ac_cv_prog_MIG
7615 if test -n "$MIG"; then
7616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7617 $as_echo "$MIG" >&6; }
7618 else
7619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7620 $as_echo "no" >&6; }
7621 fi
7622
7623
7624 fi
7625 if test -z "$ac_cv_prog_MIG"; then
7626   ac_ct_MIG=$MIG
7627   # Extract the first word of "mig", so it can be a program name with args.
7628 set dummy mig; ac_word=$2
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7630 $as_echo_n "checking for $ac_word... " >&6; }
7631 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7632   $as_echo_n "(cached) " >&6
7633 else
7634   if test -n "$ac_ct_MIG"; then
7635   ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7636 else
7637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7638 for as_dir in $PATH
7639 do
7640   IFS=$as_save_IFS
7641   test -z "$as_dir" && as_dir=.
7642     for ac_exec_ext in '' $ac_executable_extensions; do
7643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7644     ac_cv_prog_ac_ct_MIG="mig"
7645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7646     break 2
7647   fi
7648 done
7649   done
7650 IFS=$as_save_IFS
7651
7652 fi
7653 fi
7654 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7655 if test -n "$ac_ct_MIG"; then
7656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7657 $as_echo "$ac_ct_MIG" >&6; }
7658 else
7659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7660 $as_echo "no" >&6; }
7661 fi
7662
7663   if test "x$ac_ct_MIG" = x; then
7664     MIG=""
7665   else
7666     case $cross_compiling:$ac_tool_warned in
7667 yes:)
7668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7669 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7670 ac_tool_warned=yes ;;
7671 esac
7672     MIG=$ac_ct_MIG
7673   fi
7674 else
7675   MIG="$ac_cv_prog_MIG"
7676 fi
7677
7678     if test x"$MIG" = x; then
7679       as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
7680     fi
7681     ;;
7682 esac
7683
7684 # ---------------------- #
7685 # Checks for libraries.  #
7686 # ---------------------- #
7687
7688 # We might need to link with -lm; most simulators need it.
7689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7690 $as_echo_n "checking for main in -lm... " >&6; }
7691 if ${ac_cv_lib_m_main+:} false; then :
7692   $as_echo_n "(cached) " >&6
7693 else
7694   ac_check_lib_save_LIBS=$LIBS
7695 LIBS="-lm  $LIBS"
7696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7697 /* end confdefs.h.  */
7698
7699
7700 int
7701 main ()
7702 {
7703 return main ();
7704   ;
7705   return 0;
7706 }
7707 _ACEOF
7708 if ac_fn_c_try_link "$LINENO"; then :
7709   ac_cv_lib_m_main=yes
7710 else
7711   ac_cv_lib_m_main=no
7712 fi
7713 rm -f core conftest.err conftest.$ac_objext \
7714     conftest$ac_exeext conftest.$ac_ext
7715 LIBS=$ac_check_lib_save_LIBS
7716 fi
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7718 $as_echo "$ac_cv_lib_m_main" >&6; }
7719 if test "x$ac_cv_lib_m_main" = xyes; then :
7720   cat >>confdefs.h <<_ACEOF
7721 #define HAVE_LIBM 1
7722 _ACEOF
7723
7724   LIBS="-lm $LIBS"
7725
7726 fi
7727
7728
7729 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7731 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7732 if ${ac_cv_search_gethostbyname+:} false; then :
7733   $as_echo_n "(cached) " >&6
7734 else
7735   ac_func_search_save_LIBS=$LIBS
7736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7737 /* end confdefs.h.  */
7738
7739 /* Override any GCC internal prototype to avoid an error.
7740    Use char because int might match the return type of a GCC
7741    builtin and then its argument prototype would still apply.  */
7742 #ifdef __cplusplus
7743 extern "C"
7744 #endif
7745 char gethostbyname ();
7746 int
7747 main ()
7748 {
7749 return gethostbyname ();
7750   ;
7751   return 0;
7752 }
7753 _ACEOF
7754 for ac_lib in '' nsl; do
7755   if test -z "$ac_lib"; then
7756     ac_res="none required"
7757   else
7758     ac_res=-l$ac_lib
7759     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7760   fi
7761   if ac_fn_c_try_link "$LINENO"; then :
7762   ac_cv_search_gethostbyname=$ac_res
7763 fi
7764 rm -f core conftest.err conftest.$ac_objext \
7765     conftest$ac_exeext
7766   if ${ac_cv_search_gethostbyname+:} false; then :
7767   break
7768 fi
7769 done
7770 if ${ac_cv_search_gethostbyname+:} false; then :
7771
7772 else
7773   ac_cv_search_gethostbyname=no
7774 fi
7775 rm conftest.$ac_ext
7776 LIBS=$ac_func_search_save_LIBS
7777 fi
7778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7779 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7780 ac_res=$ac_cv_search_gethostbyname
7781 if test "$ac_res" != no; then :
7782   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7783
7784 fi
7785
7786
7787 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7789 $as_echo_n "checking for library containing socketpair... " >&6; }
7790 if ${ac_cv_search_socketpair+:} false; then :
7791   $as_echo_n "(cached) " >&6
7792 else
7793   ac_func_search_save_LIBS=$LIBS
7794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7795 /* end confdefs.h.  */
7796
7797 /* Override any GCC internal prototype to avoid an error.
7798    Use char because int might match the return type of a GCC
7799    builtin and then its argument prototype would still apply.  */
7800 #ifdef __cplusplus
7801 extern "C"
7802 #endif
7803 char socketpair ();
7804 int
7805 main ()
7806 {
7807 return socketpair ();
7808   ;
7809   return 0;
7810 }
7811 _ACEOF
7812 for ac_lib in '' socket; do
7813   if test -z "$ac_lib"; then
7814     ac_res="none required"
7815   else
7816     ac_res=-l$ac_lib
7817     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7818   fi
7819   if ac_fn_c_try_link "$LINENO"; then :
7820   ac_cv_search_socketpair=$ac_res
7821 fi
7822 rm -f core conftest.err conftest.$ac_objext \
7823     conftest$ac_exeext
7824   if ${ac_cv_search_socketpair+:} false; then :
7825   break
7826 fi
7827 done
7828 if ${ac_cv_search_socketpair+:} false; then :
7829
7830 else
7831   ac_cv_search_socketpair=no
7832 fi
7833 rm conftest.$ac_ext
7834 LIBS=$ac_func_search_save_LIBS
7835 fi
7836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7837 $as_echo "$ac_cv_search_socketpair" >&6; }
7838 ac_res=$ac_cv_search_socketpair
7839 if test "$ac_res" != no; then :
7840   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7841
7842 fi
7843
7844
7845 # Link in zlib if we can.  This allows us to read compressed debug sections.
7846
7847   # Use the system's zlib library.
7848   zlibdir="-L\$(top_builddir)/../zlib"
7849   zlibinc="-I\$(top_srcdir)/../zlib"
7850
7851 # Check whether --with-system-zlib was given.
7852 if test "${with_system_zlib+set}" = set; then :
7853   withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7854     zlibdir=
7855     zlibinc=
7856   fi
7857
7858 fi
7859
7860
7861
7862
7863
7864 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7865 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7867 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7868 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7869   $as_echo_n "(cached) " >&6
7870 else
7871   ac_func_search_save_LIBS=$LIBS
7872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7873 /* end confdefs.h.  */
7874
7875 /* Override any GCC internal prototype to avoid an error.
7876    Use char because int might match the return type of a GCC
7877    builtin and then its argument prototype would still apply.  */
7878 #ifdef __cplusplus
7879 extern "C"
7880 #endif
7881 char kinfo_getvmmap ();
7882 int
7883 main ()
7884 {
7885 return kinfo_getvmmap ();
7886   ;
7887   return 0;
7888 }
7889 _ACEOF
7890 for ac_lib in '' util util-freebsd; do
7891   if test -z "$ac_lib"; then
7892     ac_res="none required"
7893   else
7894     ac_res=-l$ac_lib
7895     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7896   fi
7897   if ac_fn_c_try_link "$LINENO"; then :
7898   ac_cv_search_kinfo_getvmmap=$ac_res
7899 fi
7900 rm -f core conftest.err conftest.$ac_objext \
7901     conftest$ac_exeext
7902   if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7903   break
7904 fi
7905 done
7906 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7907
7908 else
7909   ac_cv_search_kinfo_getvmmap=no
7910 fi
7911 rm conftest.$ac_ext
7912 LIBS=$ac_func_search_save_LIBS
7913 fi
7914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7915 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7916 ac_res=$ac_cv_search_kinfo_getvmmap
7917 if test "$ac_res" != no; then :
7918   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7919
7920 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7921
7922 fi
7923
7924
7925 # fbsd-nat.c can also use kinfo_getfile.
7926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7927 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
7928 if ${ac_cv_search_kinfo_getfile+:} false; then :
7929   $as_echo_n "(cached) " >&6
7930 else
7931   ac_func_search_save_LIBS=$LIBS
7932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7933 /* end confdefs.h.  */
7934
7935 /* Override any GCC internal prototype to avoid an error.
7936    Use char because int might match the return type of a GCC
7937    builtin and then its argument prototype would still apply.  */
7938 #ifdef __cplusplus
7939 extern "C"
7940 #endif
7941 char kinfo_getfile ();
7942 int
7943 main ()
7944 {
7945 return kinfo_getfile ();
7946   ;
7947   return 0;
7948 }
7949 _ACEOF
7950 for ac_lib in '' util util-freebsd; do
7951   if test -z "$ac_lib"; then
7952     ac_res="none required"
7953   else
7954     ac_res=-l$ac_lib
7955     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7956   fi
7957   if ac_fn_c_try_link "$LINENO"; then :
7958   ac_cv_search_kinfo_getfile=$ac_res
7959 fi
7960 rm -f core conftest.err conftest.$ac_objext \
7961     conftest$ac_exeext
7962   if ${ac_cv_search_kinfo_getfile+:} false; then :
7963   break
7964 fi
7965 done
7966 if ${ac_cv_search_kinfo_getfile+:} false; then :
7967
7968 else
7969   ac_cv_search_kinfo_getfile=no
7970 fi
7971 rm conftest.$ac_ext
7972 LIBS=$ac_func_search_save_LIBS
7973 fi
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7975 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7976 ac_res=$ac_cv_search_kinfo_getfile
7977 if test "$ac_res" != no; then :
7978   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7979
7980 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
7981
7982 fi
7983
7984
7985
7986       if test "X$prefix" = "XNONE"; then
7987     acl_final_prefix="$ac_default_prefix"
7988   else
7989     acl_final_prefix="$prefix"
7990   fi
7991   if test "X$exec_prefix" = "XNONE"; then
7992     acl_final_exec_prefix='${prefix}'
7993   else
7994     acl_final_exec_prefix="$exec_prefix"
7995   fi
7996   acl_save_prefix="$prefix"
7997   prefix="$acl_final_prefix"
7998   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7999   prefix="$acl_save_prefix"
8000
8001
8002 # Check whether --with-gnu-ld was given.
8003 if test "${with_gnu_ld+set}" = set; then :
8004   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8005 else
8006   with_gnu_ld=no
8007 fi
8008
8009 # Prepare PATH_SEPARATOR.
8010 # The user is always right.
8011 if test "${PATH_SEPARATOR+set}" != set; then
8012   echo "#! /bin/sh" >conf$$.sh
8013   echo  "exit 0"   >>conf$$.sh
8014   chmod +x conf$$.sh
8015   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8016     PATH_SEPARATOR=';'
8017   else
8018     PATH_SEPARATOR=:
8019   fi
8020   rm -f conf$$.sh
8021 fi
8022 ac_prog=ld
8023 if test "$GCC" = yes; then
8024   # Check if gcc -print-prog-name=ld gives a path.
8025   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8026 $as_echo_n "checking for ld used by GCC... " >&6; }
8027   case $host in
8028   *-*-mingw*)
8029     # gcc leaves a trailing carriage return which upsets mingw
8030     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8031   *)
8032     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8033   esac
8034   case $ac_prog in
8035     # Accept absolute paths.
8036     [\\/]* | [A-Za-z]:[\\/]*)
8037       re_direlt='/[^/][^/]*/\.\./'
8038       # Canonicalize the path of ld
8039       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8040       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8041         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8042       done
8043       test -z "$LD" && LD="$ac_prog"
8044       ;;
8045   "")
8046     # If it fails, then pretend we aren't using GCC.
8047     ac_prog=ld
8048     ;;
8049   *)
8050     # If it is relative, then search for the first ld in PATH.
8051     with_gnu_ld=unknown
8052     ;;
8053   esac
8054 elif test "$with_gnu_ld" = yes; then
8055   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8056 $as_echo_n "checking for GNU ld... " >&6; }
8057 else
8058   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8059 $as_echo_n "checking for non-GNU ld... " >&6; }
8060 fi
8061 if ${acl_cv_path_LD+:} false; then :
8062   $as_echo_n "(cached) " >&6
8063 else
8064   if test -z "$LD"; then
8065   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8066   for ac_dir in $PATH; do
8067     test -z "$ac_dir" && ac_dir=.
8068     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8069       acl_cv_path_LD="$ac_dir/$ac_prog"
8070       # Check to see if the program is GNU ld.  I'd rather use --version,
8071       # but apparently some GNU ld's only accept -v.
8072       # Break only if it was the GNU/non-GNU ld that we prefer.
8073       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8074         test "$with_gnu_ld" != no && break
8075       else
8076         test "$with_gnu_ld" != yes && break
8077       fi
8078     fi
8079   done
8080   IFS="$ac_save_ifs"
8081 else
8082   acl_cv_path_LD="$LD" # Let the user override the test with a path.
8083 fi
8084 fi
8085
8086 LD="$acl_cv_path_LD"
8087 if test -n "$LD"; then
8088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8089 $as_echo "$LD" >&6; }
8090 else
8091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8092 $as_echo "no" >&6; }
8093 fi
8094 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8096 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8097 if ${acl_cv_prog_gnu_ld+:} false; then :
8098   $as_echo_n "(cached) " >&6
8099 else
8100   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8101 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8102   acl_cv_prog_gnu_ld=yes
8103 else
8104   acl_cv_prog_gnu_ld=no
8105 fi
8106 fi
8107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8108 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8109 with_gnu_ld=$acl_cv_prog_gnu_ld
8110
8111
8112
8113                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8114 $as_echo_n "checking for shared library run path origin... " >&6; }
8115 if ${acl_cv_rpath+:} false; then :
8116   $as_echo_n "(cached) " >&6
8117 else
8118
8119     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8120     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8121     . ./conftest.sh
8122     rm -f ./conftest.sh
8123     acl_cv_rpath=done
8124
8125 fi
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8127 $as_echo "$acl_cv_rpath" >&6; }
8128   wl="$acl_cv_wl"
8129   libext="$acl_cv_libext"
8130   shlibext="$acl_cv_shlibext"
8131   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8132   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8133   hardcode_direct="$acl_cv_hardcode_direct"
8134   hardcode_minus_L="$acl_cv_hardcode_minus_L"
8135     # Check whether --enable-rpath was given.
8136 if test "${enable_rpath+set}" = set; then :
8137   enableval=$enable_rpath; :
8138 else
8139   enable_rpath=yes
8140 fi
8141
8142
8143
8144
8145
8146
8147
8148
8149     use_additional=yes
8150
8151   acl_save_prefix="$prefix"
8152   prefix="$acl_final_prefix"
8153   acl_save_exec_prefix="$exec_prefix"
8154   exec_prefix="$acl_final_exec_prefix"
8155
8156     eval additional_includedir=\"$includedir\"
8157     eval additional_libdir=\"$libdir\"
8158
8159   exec_prefix="$acl_save_exec_prefix"
8160   prefix="$acl_save_prefix"
8161
8162
8163 # Check whether --with-libiconv-prefix was given.
8164 if test "${with_libiconv_prefix+set}" = set; then :
8165   withval=$with_libiconv_prefix;
8166     if test "X$withval" = "Xno"; then
8167       use_additional=no
8168     else
8169       if test "X$withval" = "X"; then
8170
8171   acl_save_prefix="$prefix"
8172   prefix="$acl_final_prefix"
8173   acl_save_exec_prefix="$exec_prefix"
8174   exec_prefix="$acl_final_exec_prefix"
8175
8176           eval additional_includedir=\"$includedir\"
8177           eval additional_libdir=\"$libdir\"
8178
8179   exec_prefix="$acl_save_exec_prefix"
8180   prefix="$acl_save_prefix"
8181
8182       else
8183         additional_includedir="$withval/include"
8184         additional_libdir="$withval/lib"
8185       fi
8186     fi
8187
8188 fi
8189
8190       LIBICONV=
8191   LTLIBICONV=
8192   INCICONV=
8193   rpathdirs=
8194   ltrpathdirs=
8195   names_already_handled=
8196   names_next_round='iconv '
8197   while test -n "$names_next_round"; do
8198     names_this_round="$names_next_round"
8199     names_next_round=
8200     for name in $names_this_round; do
8201       already_handled=
8202       for n in $names_already_handled; do
8203         if test "$n" = "$name"; then
8204           already_handled=yes
8205           break
8206         fi
8207       done
8208       if test -z "$already_handled"; then
8209         names_already_handled="$names_already_handled $name"
8210                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8211         eval value=\"\$HAVE_LIB$uppername\"
8212         if test -n "$value"; then
8213           if test "$value" = yes; then
8214             eval value=\"\$LIB$uppername\"
8215             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8216             eval value=\"\$LTLIB$uppername\"
8217             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8218           else
8219                                     :
8220           fi
8221         else
8222                               found_dir=
8223           found_la=
8224           found_so=
8225           found_a=
8226           if test $use_additional = yes; then
8227             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8228               found_dir="$additional_libdir"
8229               found_so="$additional_libdir/lib$name.$shlibext"
8230               if test -f "$additional_libdir/lib$name.la"; then
8231                 found_la="$additional_libdir/lib$name.la"
8232               fi
8233             else
8234               if test -f "$additional_libdir/lib$name.$libext"; then
8235                 found_dir="$additional_libdir"
8236                 found_a="$additional_libdir/lib$name.$libext"
8237                 if test -f "$additional_libdir/lib$name.la"; then
8238                   found_la="$additional_libdir/lib$name.la"
8239                 fi
8240               fi
8241             fi
8242           fi
8243           if test "X$found_dir" = "X"; then
8244             for x in $LDFLAGS $LTLIBICONV; do
8245
8246   acl_save_prefix="$prefix"
8247   prefix="$acl_final_prefix"
8248   acl_save_exec_prefix="$exec_prefix"
8249   exec_prefix="$acl_final_exec_prefix"
8250   eval x=\"$x\"
8251   exec_prefix="$acl_save_exec_prefix"
8252   prefix="$acl_save_prefix"
8253
8254               case "$x" in
8255                 -L*)
8256                   dir=`echo "X$x" | sed -e 's/^X-L//'`
8257                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8258                     found_dir="$dir"
8259                     found_so="$dir/lib$name.$shlibext"
8260                     if test -f "$dir/lib$name.la"; then
8261                       found_la="$dir/lib$name.la"
8262                     fi
8263                   else
8264                     if test -f "$dir/lib$name.$libext"; then
8265                       found_dir="$dir"
8266                       found_a="$dir/lib$name.$libext"
8267                       if test -f "$dir/lib$name.la"; then
8268                         found_la="$dir/lib$name.la"
8269                       fi
8270                     fi
8271                   fi
8272                   ;;
8273               esac
8274               if test "X$found_dir" != "X"; then
8275                 break
8276               fi
8277             done
8278           fi
8279           if test "X$found_dir" != "X"; then
8280                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8281             if test "X$found_so" != "X"; then
8282                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8283                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8284               else
8285                                                                                 haveit=
8286                 for x in $ltrpathdirs; do
8287                   if test "X$x" = "X$found_dir"; then
8288                     haveit=yes
8289                     break
8290                   fi
8291                 done
8292                 if test -z "$haveit"; then
8293                   ltrpathdirs="$ltrpathdirs $found_dir"
8294                 fi
8295                                 if test "$hardcode_direct" = yes; then
8296                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8297                 else
8298                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8299                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8300                                                             haveit=
8301                     for x in $rpathdirs; do
8302                       if test "X$x" = "X$found_dir"; then
8303                         haveit=yes
8304                         break
8305                       fi
8306                     done
8307                     if test -z "$haveit"; then
8308                       rpathdirs="$rpathdirs $found_dir"
8309                     fi
8310                   else
8311                                                                                 haveit=
8312                     for x in $LDFLAGS $LIBICONV; do
8313
8314   acl_save_prefix="$prefix"
8315   prefix="$acl_final_prefix"
8316   acl_save_exec_prefix="$exec_prefix"
8317   exec_prefix="$acl_final_exec_prefix"
8318   eval x=\"$x\"
8319   exec_prefix="$acl_save_exec_prefix"
8320   prefix="$acl_save_prefix"
8321
8322                       if test "X$x" = "X-L$found_dir"; then
8323                         haveit=yes
8324                         break
8325                       fi
8326                     done
8327                     if test -z "$haveit"; then
8328                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8329                     fi
8330                     if test "$hardcode_minus_L" != no; then
8331                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8332                     else
8333                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8334                     fi
8335                   fi
8336                 fi
8337               fi
8338             else
8339               if test "X$found_a" != "X"; then
8340                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8341               else
8342                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8343               fi
8344             fi
8345                         additional_includedir=
8346             case "$found_dir" in
8347               */lib | */lib/)
8348                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8349                 additional_includedir="$basedir/include"
8350                 ;;
8351             esac
8352             if test "X$additional_includedir" != "X"; then
8353                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
8354                 haveit=
8355                 if test "X$additional_includedir" = "X/usr/local/include"; then
8356                   if test -n "$GCC"; then
8357                     case $host_os in
8358                       linux*) haveit=yes;;
8359                     esac
8360                   fi
8361                 fi
8362                 if test -z "$haveit"; then
8363                   for x in $CPPFLAGS $INCICONV; do
8364
8365   acl_save_prefix="$prefix"
8366   prefix="$acl_final_prefix"
8367   acl_save_exec_prefix="$exec_prefix"
8368   exec_prefix="$acl_final_exec_prefix"
8369   eval x=\"$x\"
8370   exec_prefix="$acl_save_exec_prefix"
8371   prefix="$acl_save_prefix"
8372
8373                     if test "X$x" = "X-I$additional_includedir"; then
8374                       haveit=yes
8375                       break
8376                     fi
8377                   done
8378                   if test -z "$haveit"; then
8379                     if test -d "$additional_includedir"; then
8380                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8381                     fi
8382                   fi
8383                 fi
8384               fi
8385             fi
8386                         if test -n "$found_la"; then
8387                                                         save_libdir="$libdir"
8388               case "$found_la" in
8389                 */* | *\\*) . "$found_la" ;;
8390                 *) . "./$found_la" ;;
8391               esac
8392               libdir="$save_libdir"
8393                             for dep in $dependency_libs; do
8394                 case "$dep" in
8395                   -L*)
8396                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8397                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
8398                       haveit=
8399                       if test "X$additional_libdir" = "X/usr/local/lib"; then
8400                         if test -n "$GCC"; then
8401                           case $host_os in
8402                             linux*) haveit=yes;;
8403                           esac
8404                         fi
8405                       fi
8406                       if test -z "$haveit"; then
8407                         haveit=
8408                         for x in $LDFLAGS $LIBICONV; do
8409
8410   acl_save_prefix="$prefix"
8411   prefix="$acl_final_prefix"
8412   acl_save_exec_prefix="$exec_prefix"
8413   exec_prefix="$acl_final_exec_prefix"
8414   eval x=\"$x\"
8415   exec_prefix="$acl_save_exec_prefix"
8416   prefix="$acl_save_prefix"
8417
8418                           if test "X$x" = "X-L$additional_libdir"; then
8419                             haveit=yes
8420                             break
8421                           fi
8422                         done
8423                         if test -z "$haveit"; then
8424                           if test -d "$additional_libdir"; then
8425                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8426                           fi
8427                         fi
8428                         haveit=
8429                         for x in $LDFLAGS $LTLIBICONV; do
8430
8431   acl_save_prefix="$prefix"
8432   prefix="$acl_final_prefix"
8433   acl_save_exec_prefix="$exec_prefix"
8434   exec_prefix="$acl_final_exec_prefix"
8435   eval x=\"$x\"
8436   exec_prefix="$acl_save_exec_prefix"
8437   prefix="$acl_save_prefix"
8438
8439                           if test "X$x" = "X-L$additional_libdir"; then
8440                             haveit=yes
8441                             break
8442                           fi
8443                         done
8444                         if test -z "$haveit"; then
8445                           if test -d "$additional_libdir"; then
8446                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8447                           fi
8448                         fi
8449                       fi
8450                     fi
8451                     ;;
8452                   -R*)
8453                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
8454                     if test "$enable_rpath" != no; then
8455                                                                   haveit=
8456                       for x in $rpathdirs; do
8457                         if test "X$x" = "X$dir"; then
8458                           haveit=yes
8459                           break
8460                         fi
8461                       done
8462                       if test -z "$haveit"; then
8463                         rpathdirs="$rpathdirs $dir"
8464                       fi
8465                                                                   haveit=
8466                       for x in $ltrpathdirs; do
8467                         if test "X$x" = "X$dir"; then
8468                           haveit=yes
8469                           break
8470                         fi
8471                       done
8472                       if test -z "$haveit"; then
8473                         ltrpathdirs="$ltrpathdirs $dir"
8474                       fi
8475                     fi
8476                     ;;
8477                   -l*)
8478                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8479                     ;;
8480                   *.la)
8481                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8482                     ;;
8483                   *)
8484                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8485                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8486                     ;;
8487                 esac
8488               done
8489             fi
8490           else
8491                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8492             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8493           fi
8494         fi
8495       fi
8496     done
8497   done
8498   if test "X$rpathdirs" != "X"; then
8499     if test -n "$hardcode_libdir_separator"; then
8500                         alldirs=
8501       for found_dir in $rpathdirs; do
8502         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8503       done
8504             acl_save_libdir="$libdir"
8505       libdir="$alldirs"
8506       eval flag=\"$hardcode_libdir_flag_spec\"
8507       libdir="$acl_save_libdir"
8508       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8509     else
8510             for found_dir in $rpathdirs; do
8511         acl_save_libdir="$libdir"
8512         libdir="$found_dir"
8513         eval flag=\"$hardcode_libdir_flag_spec\"
8514         libdir="$acl_save_libdir"
8515         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8516       done
8517     fi
8518   fi
8519   if test "X$ltrpathdirs" != "X"; then
8520             for found_dir in $ltrpathdirs; do
8521       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8522     done
8523   fi
8524
8525
8526
8527
8528
8529
8530
8531   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8532 $as_echo_n "checking for iconv... " >&6; }
8533 if ${am_cv_func_iconv+:} false; then :
8534   $as_echo_n "(cached) " >&6
8535 else
8536
8537     am_cv_func_iconv="no, consider installing GNU libiconv"
8538     am_cv_lib_iconv=no
8539                     am_save_CPPFLAGS="$CPPFLAGS"
8540     CPPFLAGS="$CPPFLAGS $INCICONV"
8541     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8542 /* end confdefs.h.  */
8543 #include <stdlib.h>
8544 #include <iconv.h>
8545 int
8546 main ()
8547 {
8548 iconv_t cd = iconv_open("","");
8549        iconv(cd,NULL,NULL,NULL,NULL);
8550        iconv_close(cd);
8551   ;
8552   return 0;
8553 }
8554 _ACEOF
8555 if ac_fn_c_try_link "$LINENO"; then :
8556   am_cv_func_iconv=yes
8557 fi
8558 rm -f core conftest.err conftest.$ac_objext \
8559     conftest$ac_exeext conftest.$ac_ext
8560     CPPFLAGS="$am_save_CPPFLAGS"
8561
8562     if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8563       for _libs in .libs _libs; do
8564         am_save_CPPFLAGS="$CPPFLAGS"
8565         am_save_LIBS="$LIBS"
8566         CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8567         LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8568         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8569 /* end confdefs.h.  */
8570 #include <stdlib.h>
8571 #include <iconv.h>
8572 int
8573 main ()
8574 {
8575 iconv_t cd = iconv_open("","");
8576            iconv(cd,NULL,NULL,NULL,NULL);
8577            iconv_close(cd);
8578   ;
8579   return 0;
8580 }
8581 _ACEOF
8582 if ac_fn_c_try_link "$LINENO"; then :
8583   INCICONV="-I../libiconv/include"
8584           LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8585           LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8586           am_cv_lib_iconv=yes
8587           am_cv_func_iconv=yes
8588 fi
8589 rm -f core conftest.err conftest.$ac_objext \
8590     conftest$ac_exeext conftest.$ac_ext
8591         CPPFLAGS="$am_save_CPPFLAGS"
8592         LIBS="$am_save_LIBS"
8593         if test "$am_cv_func_iconv" = "yes"; then
8594           break
8595         fi
8596       done
8597     fi
8598
8599     if test "$am_cv_func_iconv" != yes; then
8600       am_save_CPPFLAGS="$CPPFLAGS"
8601       am_save_LIBS="$LIBS"
8602       CPPFLAGS="$CPPFLAGS $INCICONV"
8603       LIBS="$LIBS $LIBICONV"
8604       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8605 /* end confdefs.h.  */
8606 #include <stdlib.h>
8607 #include <iconv.h>
8608 int
8609 main ()
8610 {
8611 iconv_t cd = iconv_open("","");
8612          iconv(cd,NULL,NULL,NULL,NULL);
8613          iconv_close(cd);
8614   ;
8615   return 0;
8616 }
8617 _ACEOF
8618 if ac_fn_c_try_link "$LINENO"; then :
8619   am_cv_lib_iconv=yes
8620         am_cv_func_iconv=yes
8621 fi
8622 rm -f core conftest.err conftest.$ac_objext \
8623     conftest$ac_exeext conftest.$ac_ext
8624       CPPFLAGS="$am_save_CPPFLAGS"
8625       LIBS="$am_save_LIBS"
8626     fi
8627
8628 fi
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8630 $as_echo "$am_cv_func_iconv" >&6; }
8631   if test "$am_cv_func_iconv" = yes; then
8632
8633 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8634
8635   fi
8636   if test "$am_cv_lib_iconv" = yes; then
8637
8638   for element in $INCICONV; do
8639     haveit=
8640     for x in $CPPFLAGS; do
8641
8642   acl_save_prefix="$prefix"
8643   prefix="$acl_final_prefix"
8644   acl_save_exec_prefix="$exec_prefix"
8645   exec_prefix="$acl_final_exec_prefix"
8646   eval x=\"$x\"
8647   exec_prefix="$acl_save_exec_prefix"
8648   prefix="$acl_save_prefix"
8649
8650       if test "X$x" = "X$element"; then
8651         haveit=yes
8652         break
8653       fi
8654     done
8655     if test -z "$haveit"; then
8656       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8657     fi
8658   done
8659
8660     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8661 $as_echo_n "checking how to link with libiconv... " >&6; }
8662     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8663 $as_echo "$LIBICONV" >&6; }
8664   else
8665     LIBICONV=
8666     LTLIBICONV=
8667   fi
8668
8669
8670
8671   if test "$am_cv_func_iconv" = yes; then
8672     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8673 $as_echo_n "checking for iconv declaration... " >&6; }
8674     if ${am_cv_proto_iconv+:} false; then :
8675   $as_echo_n "(cached) " >&6
8676 else
8677
8678       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8679 /* end confdefs.h.  */
8680
8681 #include <stdlib.h>
8682 #include <iconv.h>
8683 extern
8684 #ifdef __cplusplus
8685 "C"
8686 #endif
8687 #if defined(__STDC__) || defined(__cplusplus)
8688 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8689 #else
8690 size_t iconv();
8691 #endif
8692
8693 int
8694 main ()
8695 {
8696
8697   ;
8698   return 0;
8699 }
8700 _ACEOF
8701 if ac_fn_c_try_compile "$LINENO"; then :
8702   am_cv_proto_iconv_arg1=""
8703 else
8704   am_cv_proto_iconv_arg1="const"
8705 fi
8706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8707       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);"
8708 fi
8709
8710     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8711     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8712          }$am_cv_proto_iconv" >&5
8713 $as_echo "${ac_t:-
8714          }$am_cv_proto_iconv" >&6; }
8715
8716 cat >>confdefs.h <<_ACEOF
8717 #define ICONV_CONST $am_cv_proto_iconv_arg1
8718 _ACEOF
8719
8720   fi
8721
8722
8723 # GDB may fork/exec the iconv program to get the list of supported character
8724 # sets.  Allow the user to specify where to find it.
8725 # There are several factors affecting the choice of option name:
8726 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8727 #   the build-time location of libiconv files.
8728 # - The program we need to find is iconv, which comes with glibc.  The user
8729 #   doesn't necessarily have libiconv installed.  Therefore naming this
8730 #   --with-libiconv-foo feels wrong.
8731 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8732 #   defined to work on directories not files (though it really doesn't know
8733 #   the difference).
8734 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8735 #   with --with-libiconv-prefix.
8736 # Putting these together is why the option name is --with-iconv-bin.
8737
8738
8739 # Check whether --with-iconv-bin was given.
8740 if test "${with_iconv_bin+set}" = set; then :
8741   withval=$with_iconv_bin; iconv_bin="${withval}"
8742
8743 cat >>confdefs.h <<_ACEOF
8744 #define ICONV_BIN "${iconv_bin}"
8745 _ACEOF
8746
8747
8748   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8749      if test "x$prefix" = xNONE; then
8750         test_prefix=/usr/local
8751      else
8752         test_prefix=$prefix
8753      fi
8754   else
8755      test_prefix=$exec_prefix
8756   fi
8757   value=0
8758   case ${iconv_bin} in
8759      "${test_prefix}"|"${test_prefix}/"*|\
8760         '${exec_prefix}'|'${exec_prefix}/'*)
8761      value=1
8762      ;;
8763   esac
8764
8765 cat >>confdefs.h <<_ACEOF
8766 #define ICONV_BIN_RELOCATABLE $value
8767 _ACEOF
8768
8769
8770
8771 fi
8772
8773
8774 # For the TUI, we need enhanced curses functionality.
8775 if test x"$enable_tui" != xno; then
8776   prefer_curses=yes
8777 fi
8778
8779 curses_found=no
8780 if test x"$prefer_curses" = xyes; then
8781   # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8782   # curses library because the latter might not provide all the
8783   # functionality we need.  However, this leads to problems on systems
8784   # where the linker searches /usr/local/lib, but the compiler doesn't
8785   # search /usr/local/include, if ncurses is installed in /usr/local.  A
8786   # default installation of ncurses on alpha*-dec-osf* will lead to such
8787   # a situation.
8788   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8789 $as_echo_n "checking for library containing waddstr... " >&6; }
8790 if ${ac_cv_search_waddstr+:} false; then :
8791   $as_echo_n "(cached) " >&6
8792 else
8793   ac_func_search_save_LIBS=$LIBS
8794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8795 /* end confdefs.h.  */
8796
8797 /* Override any GCC internal prototype to avoid an error.
8798    Use char because int might match the return type of a GCC
8799    builtin and then its argument prototype would still apply.  */
8800 #ifdef __cplusplus
8801 extern "C"
8802 #endif
8803 char waddstr ();
8804 int
8805 main ()
8806 {
8807 return waddstr ();
8808   ;
8809   return 0;
8810 }
8811 _ACEOF
8812 for ac_lib in '' ncursesw ncurses cursesX curses; do
8813   if test -z "$ac_lib"; then
8814     ac_res="none required"
8815   else
8816     ac_res=-l$ac_lib
8817     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8818   fi
8819   if ac_fn_c_try_link "$LINENO"; then :
8820   ac_cv_search_waddstr=$ac_res
8821 fi
8822 rm -f core conftest.err conftest.$ac_objext \
8823     conftest$ac_exeext
8824   if ${ac_cv_search_waddstr+:} false; then :
8825   break
8826 fi
8827 done
8828 if ${ac_cv_search_waddstr+:} false; then :
8829
8830 else
8831   ac_cv_search_waddstr=no
8832 fi
8833 rm conftest.$ac_ext
8834 LIBS=$ac_func_search_save_LIBS
8835 fi
8836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8837 $as_echo "$ac_cv_search_waddstr" >&6; }
8838 ac_res=$ac_cv_search_waddstr
8839 if test "$ac_res" != no; then :
8840   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8841
8842 fi
8843
8844
8845   if test "$ac_cv_search_waddstr" != no; then
8846     curses_found=yes
8847   fi
8848 fi
8849
8850 # Check whether we should enable the TUI, but only do so if we really
8851 # can.
8852 if test x"$enable_tui" != xno; then
8853   if test -d $srcdir/tui; then
8854     if test "$curses_found" != no; then
8855       CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8856       CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8857       CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8858       ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8859     else
8860       if test x"$enable_tui" = xyes; then
8861         as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
8862       else
8863         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8864 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8865       fi
8866     fi
8867   fi
8868 fi
8869
8870 # Since GDB uses Readline, we need termcap functionality.  In many
8871 # cases this will be provided by the curses library, but some systems
8872 # have a separate termcap library, or no curses library at all.
8873
8874 case $host_os in
8875   cygwin*)
8876     if test -d $srcdir/libtermcap; then
8877       LIBS="../libtermcap/libtermcap.a $LIBS"
8878       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8879     fi ;;
8880   go32* | *djgpp*)
8881     ac_cv_search_tgetent="none required"
8882     ;;
8883 esac
8884
8885 # These are the libraries checked by Readline.
8886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8887 $as_echo_n "checking for library containing tgetent... " >&6; }
8888 if ${ac_cv_search_tgetent+:} false; then :
8889   $as_echo_n "(cached) " >&6
8890 else
8891   ac_func_search_save_LIBS=$LIBS
8892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8893 /* end confdefs.h.  */
8894
8895 /* Override any GCC internal prototype to avoid an error.
8896    Use char because int might match the return type of a GCC
8897    builtin and then its argument prototype would still apply.  */
8898 #ifdef __cplusplus
8899 extern "C"
8900 #endif
8901 char tgetent ();
8902 int
8903 main ()
8904 {
8905 return tgetent ();
8906   ;
8907   return 0;
8908 }
8909 _ACEOF
8910 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
8911   if test -z "$ac_lib"; then
8912     ac_res="none required"
8913   else
8914     ac_res=-l$ac_lib
8915     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8916   fi
8917   if ac_fn_c_try_link "$LINENO"; then :
8918   ac_cv_search_tgetent=$ac_res
8919 fi
8920 rm -f core conftest.err conftest.$ac_objext \
8921     conftest$ac_exeext
8922   if ${ac_cv_search_tgetent+:} false; then :
8923   break
8924 fi
8925 done
8926 if ${ac_cv_search_tgetent+:} false; then :
8927
8928 else
8929   ac_cv_search_tgetent=no
8930 fi
8931 rm conftest.$ac_ext
8932 LIBS=$ac_func_search_save_LIBS
8933 fi
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8935 $as_echo "$ac_cv_search_tgetent" >&6; }
8936 ac_res=$ac_cv_search_tgetent
8937 if test "$ac_res" != no; then :
8938   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8939
8940 fi
8941
8942
8943 if test "$ac_cv_search_tgetent" = no; then
8944   CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8945 fi
8946
8947
8948 # Check whether --with-system-readline was given.
8949 if test "${with_system_readline+set}" = set; then :
8950   withval=$with_system_readline;
8951 fi
8952
8953
8954 if test "$with_system_readline" = yes; then
8955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
8956 $as_echo_n "checking whether system readline is new enough... " >&6; }
8957 if ${gdb_cv_readline_ok+:} false; then :
8958   $as_echo_n "(cached) " >&6
8959 else
8960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8961 /* end confdefs.h.  */
8962 #include <stdio.h>
8963 #include <readline/readline.h>
8964 int
8965 main ()
8966 {
8967 #if RL_VERSION_MAJOR < 7
8968 # error "readline version 7 required"
8969 #endif
8970   ;
8971   return 0;
8972 }
8973 _ACEOF
8974 if ac_fn_c_try_compile "$LINENO"; then :
8975   gdb_cv_readline_ok=yes
8976 else
8977   gdb_cv_readline_ok=no
8978 fi
8979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8980 fi
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
8982 $as_echo "$gdb_cv_readline_ok" >&6; }
8983   if test "$gdb_cv_readline_ok" != yes; then
8984     as_fn_error $? "system readline is not new enough" "$LINENO" 5
8985   fi
8986
8987   READLINE=-lreadline
8988   READLINE_DEPS=
8989   READLINE_CFLAGS=
8990   READLINE_TEXI_INCFLAG=
8991 else
8992   READLINE='$(READLINE_DIR)/libreadline.a'
8993   READLINE_DEPS='$(READLINE)'
8994   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
8995   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
8996 fi
8997
8998
8999
9000
9001
9002 # Generate jit-reader.h
9003
9004 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9005 TARGET_PTR=
9006
9007 # The cast to long int works around a bug in the HP C Compiler
9008 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9009 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9010 # This bug is HP SR number 8606223364.
9011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9012 $as_echo_n "checking size of unsigned long long... " >&6; }
9013 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9014   $as_echo_n "(cached) " >&6
9015 else
9016   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :
9017
9018 else
9019   if test "$ac_cv_type_unsigned_long_long" = yes; then
9020      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9021 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9022 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9023 See \`config.log' for more details" "$LINENO" 5; }
9024    else
9025      ac_cv_sizeof_unsigned_long_long=0
9026    fi
9027 fi
9028
9029 fi
9030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9031 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9032
9033
9034
9035 cat >>confdefs.h <<_ACEOF
9036 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9037 _ACEOF
9038
9039
9040 # The cast to long int works around a bug in the HP C Compiler
9041 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9042 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9043 # This bug is HP SR number 8606223364.
9044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9045 $as_echo_n "checking size of unsigned long... " >&6; }
9046 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9047   $as_echo_n "(cached) " >&6
9048 else
9049   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
9050
9051 else
9052   if test "$ac_cv_type_unsigned_long" = yes; then
9053      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9054 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9055 as_fn_error 77 "cannot compute sizeof (unsigned long)
9056 See \`config.log' for more details" "$LINENO" 5; }
9057    else
9058      ac_cv_sizeof_unsigned_long=0
9059    fi
9060 fi
9061
9062 fi
9063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9064 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9065
9066
9067
9068 cat >>confdefs.h <<_ACEOF
9069 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9070 _ACEOF
9071
9072
9073 # The cast to long int works around a bug in the HP C Compiler
9074 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9075 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9076 # This bug is HP SR number 8606223364.
9077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9078 $as_echo_n "checking size of unsigned __int128... " >&6; }
9079 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9080   $as_echo_n "(cached) " >&6
9081 else
9082   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128"        "$ac_includes_default"; then :
9083
9084 else
9085   if test "$ac_cv_type_unsigned___int128" = yes; then
9086      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9087 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9088 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9089 See \`config.log' for more details" "$LINENO" 5; }
9090    else
9091      ac_cv_sizeof_unsigned___int128=0
9092    fi
9093 fi
9094
9095 fi
9096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9097 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9098
9099
9100
9101 cat >>confdefs.h <<_ACEOF
9102 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9103 _ACEOF
9104
9105
9106
9107 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9108   TARGET_PTR="unsigned long"
9109 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9110   TARGET_PTR="unsigned long long"
9111 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9112   TARGET_PTR="unsigned __int128"
9113 else
9114   TARGET_PTR="unsigned long"
9115 fi
9116
9117
9118 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9119
9120
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9122 $as_echo_n "checking for library containing dlopen... " >&6; }
9123 if ${ac_cv_search_dlopen+:} false; then :
9124   $as_echo_n "(cached) " >&6
9125 else
9126   ac_func_search_save_LIBS=$LIBS
9127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9128 /* end confdefs.h.  */
9129
9130 /* Override any GCC internal prototype to avoid an error.
9131    Use char because int might match the return type of a GCC
9132    builtin and then its argument prototype would still apply.  */
9133 #ifdef __cplusplus
9134 extern "C"
9135 #endif
9136 char dlopen ();
9137 int
9138 main ()
9139 {
9140 return dlopen ();
9141   ;
9142   return 0;
9143 }
9144 _ACEOF
9145 for ac_lib in '' dl; do
9146   if test -z "$ac_lib"; then
9147     ac_res="none required"
9148   else
9149     ac_res=-l$ac_lib
9150     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9151   fi
9152   if ac_fn_c_try_link "$LINENO"; then :
9153   ac_cv_search_dlopen=$ac_res
9154 fi
9155 rm -f core conftest.err conftest.$ac_objext \
9156     conftest$ac_exeext
9157   if ${ac_cv_search_dlopen+:} false; then :
9158   break
9159 fi
9160 done
9161 if ${ac_cv_search_dlopen+:} false; then :
9162
9163 else
9164   ac_cv_search_dlopen=no
9165 fi
9166 rm conftest.$ac_ext
9167 LIBS=$ac_func_search_save_LIBS
9168 fi
9169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9170 $as_echo "$ac_cv_search_dlopen" >&6; }
9171 ac_res=$ac_cv_search_dlopen
9172 if test "$ac_res" != no; then :
9173   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9174
9175 fi
9176
9177
9178
9179
9180 # Check whether --with-jit-reader-dir was given.
9181 if test "${with_jit_reader_dir+set}" = set; then :
9182   withval=$with_jit_reader_dir;
9183     JIT_READER_DIR=$withval
9184 else
9185   JIT_READER_DIR=${libdir}/gdb
9186 fi
9187
9188
9189   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9190   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9191   ac_define_dir=`eval echo $JIT_READER_DIR`
9192   ac_define_dir=`eval echo $ac_define_dir`
9193
9194 cat >>confdefs.h <<_ACEOF
9195 #define JIT_READER_DIR "$ac_define_dir"
9196 _ACEOF
9197
9198
9199
9200
9201   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9202      if test "x$prefix" = xNONE; then
9203         test_prefix=/usr/local
9204      else
9205         test_prefix=$prefix
9206      fi
9207   else
9208      test_prefix=$exec_prefix
9209   fi
9210   value=0
9211   case ${ac_define_dir} in
9212      "${test_prefix}"|"${test_prefix}/"*|\
9213         '${exec_prefix}'|'${exec_prefix}/'*)
9214      value=1
9215      ;;
9216   esac
9217
9218 cat >>confdefs.h <<_ACEOF
9219 #define JIT_READER_DIR_RELOCATABLE $value
9220 _ACEOF
9221
9222
9223
9224
9225
9226 # Check whether --with-expat was given.
9227 if test "${with_expat+set}" = set; then :
9228   withval=$with_expat;
9229 else
9230   with_expat=auto
9231 fi
9232
9233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9234 $as_echo_n "checking whether to use expat... " >&6; }
9235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9236 $as_echo "$with_expat" >&6; }
9237
9238 if test "${with_expat}" = no; then
9239   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9240 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9241   HAVE_LIBEXPAT=no
9242 else
9243
9244
9245
9246
9247
9248
9249
9250
9251     use_additional=yes
9252
9253   acl_save_prefix="$prefix"
9254   prefix="$acl_final_prefix"
9255   acl_save_exec_prefix="$exec_prefix"
9256   exec_prefix="$acl_final_exec_prefix"
9257
9258     eval additional_includedir=\"$includedir\"
9259     eval additional_libdir=\"$libdir\"
9260
9261   exec_prefix="$acl_save_exec_prefix"
9262   prefix="$acl_save_prefix"
9263
9264
9265 # Check whether --with-libexpat-prefix was given.
9266 if test "${with_libexpat_prefix+set}" = set; then :
9267   withval=$with_libexpat_prefix;
9268     if test "X$withval" = "Xno"; then
9269       use_additional=no
9270     else
9271       if test "X$withval" = "X"; then
9272
9273   acl_save_prefix="$prefix"
9274   prefix="$acl_final_prefix"
9275   acl_save_exec_prefix="$exec_prefix"
9276   exec_prefix="$acl_final_exec_prefix"
9277
9278           eval additional_includedir=\"$includedir\"
9279           eval additional_libdir=\"$libdir\"
9280
9281   exec_prefix="$acl_save_exec_prefix"
9282   prefix="$acl_save_prefix"
9283
9284       else
9285         additional_includedir="$withval/include"
9286         additional_libdir="$withval/lib"
9287       fi
9288     fi
9289
9290 fi
9291
9292       LIBEXPAT=
9293   LTLIBEXPAT=
9294   INCEXPAT=
9295   rpathdirs=
9296   ltrpathdirs=
9297   names_already_handled=
9298   names_next_round='expat '
9299   while test -n "$names_next_round"; do
9300     names_this_round="$names_next_round"
9301     names_next_round=
9302     for name in $names_this_round; do
9303       already_handled=
9304       for n in $names_already_handled; do
9305         if test "$n" = "$name"; then
9306           already_handled=yes
9307           break
9308         fi
9309       done
9310       if test -z "$already_handled"; then
9311         names_already_handled="$names_already_handled $name"
9312                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9313         eval value=\"\$HAVE_LIB$uppername\"
9314         if test -n "$value"; then
9315           if test "$value" = yes; then
9316             eval value=\"\$LIB$uppername\"
9317             test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9318             eval value=\"\$LTLIB$uppername\"
9319             test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9320           else
9321                                     :
9322           fi
9323         else
9324                               found_dir=
9325           found_la=
9326           found_so=
9327           found_a=
9328           if test $use_additional = yes; then
9329             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9330               found_dir="$additional_libdir"
9331               found_so="$additional_libdir/lib$name.$shlibext"
9332               if test -f "$additional_libdir/lib$name.la"; then
9333                 found_la="$additional_libdir/lib$name.la"
9334               fi
9335             else
9336               if test -f "$additional_libdir/lib$name.$libext"; then
9337                 found_dir="$additional_libdir"
9338                 found_a="$additional_libdir/lib$name.$libext"
9339                 if test -f "$additional_libdir/lib$name.la"; then
9340                   found_la="$additional_libdir/lib$name.la"
9341                 fi
9342               fi
9343             fi
9344           fi
9345           if test "X$found_dir" = "X"; then
9346             for x in $LDFLAGS $LTLIBEXPAT; do
9347
9348   acl_save_prefix="$prefix"
9349   prefix="$acl_final_prefix"
9350   acl_save_exec_prefix="$exec_prefix"
9351   exec_prefix="$acl_final_exec_prefix"
9352   eval x=\"$x\"
9353   exec_prefix="$acl_save_exec_prefix"
9354   prefix="$acl_save_prefix"
9355
9356               case "$x" in
9357                 -L*)
9358                   dir=`echo "X$x" | sed -e 's/^X-L//'`
9359                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9360                     found_dir="$dir"
9361                     found_so="$dir/lib$name.$shlibext"
9362                     if test -f "$dir/lib$name.la"; then
9363                       found_la="$dir/lib$name.la"
9364                     fi
9365                   else
9366                     if test -f "$dir/lib$name.$libext"; then
9367                       found_dir="$dir"
9368                       found_a="$dir/lib$name.$libext"
9369                       if test -f "$dir/lib$name.la"; then
9370                         found_la="$dir/lib$name.la"
9371                       fi
9372                     fi
9373                   fi
9374                   ;;
9375               esac
9376               if test "X$found_dir" != "X"; then
9377                 break
9378               fi
9379             done
9380           fi
9381           if test "X$found_dir" != "X"; then
9382                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9383             if test "X$found_so" != "X"; then
9384                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9385                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9386               else
9387                                                                                 haveit=
9388                 for x in $ltrpathdirs; do
9389                   if test "X$x" = "X$found_dir"; then
9390                     haveit=yes
9391                     break
9392                   fi
9393                 done
9394                 if test -z "$haveit"; then
9395                   ltrpathdirs="$ltrpathdirs $found_dir"
9396                 fi
9397                                 if test "$hardcode_direct" = yes; then
9398                                                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9399                 else
9400                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9401                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9402                                                             haveit=
9403                     for x in $rpathdirs; do
9404                       if test "X$x" = "X$found_dir"; then
9405                         haveit=yes
9406                         break
9407                       fi
9408                     done
9409                     if test -z "$haveit"; then
9410                       rpathdirs="$rpathdirs $found_dir"
9411                     fi
9412                   else
9413                                                                                 haveit=
9414                     for x in $LDFLAGS $LIBEXPAT; do
9415
9416   acl_save_prefix="$prefix"
9417   prefix="$acl_final_prefix"
9418   acl_save_exec_prefix="$exec_prefix"
9419   exec_prefix="$acl_final_exec_prefix"
9420   eval x=\"$x\"
9421   exec_prefix="$acl_save_exec_prefix"
9422   prefix="$acl_save_prefix"
9423
9424                       if test "X$x" = "X-L$found_dir"; then
9425                         haveit=yes
9426                         break
9427                       fi
9428                     done
9429                     if test -z "$haveit"; then
9430                       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9431                     fi
9432                     if test "$hardcode_minus_L" != no; then
9433                                                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9434                     else
9435                                                                                                                                                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9436                     fi
9437                   fi
9438                 fi
9439               fi
9440             else
9441               if test "X$found_a" != "X"; then
9442                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9443               else
9444                                                 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9445               fi
9446             fi
9447                         additional_includedir=
9448             case "$found_dir" in
9449               */lib | */lib/)
9450                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9451                 additional_includedir="$basedir/include"
9452                 ;;
9453             esac
9454             if test "X$additional_includedir" != "X"; then
9455                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
9456                 haveit=
9457                 if test "X$additional_includedir" = "X/usr/local/include"; then
9458                   if test -n "$GCC"; then
9459                     case $host_os in
9460                       linux*) haveit=yes;;
9461                     esac
9462                   fi
9463                 fi
9464                 if test -z "$haveit"; then
9465                   for x in $CPPFLAGS $INCEXPAT; do
9466
9467   acl_save_prefix="$prefix"
9468   prefix="$acl_final_prefix"
9469   acl_save_exec_prefix="$exec_prefix"
9470   exec_prefix="$acl_final_exec_prefix"
9471   eval x=\"$x\"
9472   exec_prefix="$acl_save_exec_prefix"
9473   prefix="$acl_save_prefix"
9474
9475                     if test "X$x" = "X-I$additional_includedir"; then
9476                       haveit=yes
9477                       break
9478                     fi
9479                   done
9480                   if test -z "$haveit"; then
9481                     if test -d "$additional_includedir"; then
9482                                             INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9483                     fi
9484                   fi
9485                 fi
9486               fi
9487             fi
9488                         if test -n "$found_la"; then
9489                                                         save_libdir="$libdir"
9490               case "$found_la" in
9491                 */* | *\\*) . "$found_la" ;;
9492                 *) . "./$found_la" ;;
9493               esac
9494               libdir="$save_libdir"
9495                             for dep in $dependency_libs; do
9496                 case "$dep" in
9497                   -L*)
9498                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9499                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
9500                       haveit=
9501                       if test "X$additional_libdir" = "X/usr/local/lib"; then
9502                         if test -n "$GCC"; then
9503                           case $host_os in
9504                             linux*) haveit=yes;;
9505                           esac
9506                         fi
9507                       fi
9508                       if test -z "$haveit"; then
9509                         haveit=
9510                         for x in $LDFLAGS $LIBEXPAT; do
9511
9512   acl_save_prefix="$prefix"
9513   prefix="$acl_final_prefix"
9514   acl_save_exec_prefix="$exec_prefix"
9515   exec_prefix="$acl_final_exec_prefix"
9516   eval x=\"$x\"
9517   exec_prefix="$acl_save_exec_prefix"
9518   prefix="$acl_save_prefix"
9519
9520                           if test "X$x" = "X-L$additional_libdir"; then
9521                             haveit=yes
9522                             break
9523                           fi
9524                         done
9525                         if test -z "$haveit"; then
9526                           if test -d "$additional_libdir"; then
9527                                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9528                           fi
9529                         fi
9530                         haveit=
9531                         for x in $LDFLAGS $LTLIBEXPAT; do
9532
9533   acl_save_prefix="$prefix"
9534   prefix="$acl_final_prefix"
9535   acl_save_exec_prefix="$exec_prefix"
9536   exec_prefix="$acl_final_exec_prefix"
9537   eval x=\"$x\"
9538   exec_prefix="$acl_save_exec_prefix"
9539   prefix="$acl_save_prefix"
9540
9541                           if test "X$x" = "X-L$additional_libdir"; then
9542                             haveit=yes
9543                             break
9544                           fi
9545                         done
9546                         if test -z "$haveit"; then
9547                           if test -d "$additional_libdir"; then
9548                                                         LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9549                           fi
9550                         fi
9551                       fi
9552                     fi
9553                     ;;
9554                   -R*)
9555                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
9556                     if test "$enable_rpath" != no; then
9557                                                                   haveit=
9558                       for x in $rpathdirs; do
9559                         if test "X$x" = "X$dir"; then
9560                           haveit=yes
9561                           break
9562                         fi
9563                       done
9564                       if test -z "$haveit"; then
9565                         rpathdirs="$rpathdirs $dir"
9566                       fi
9567                                                                   haveit=
9568                       for x in $ltrpathdirs; do
9569                         if test "X$x" = "X$dir"; then
9570                           haveit=yes
9571                           break
9572                         fi
9573                       done
9574                       if test -z "$haveit"; then
9575                         ltrpathdirs="$ltrpathdirs $dir"
9576                       fi
9577                     fi
9578                     ;;
9579                   -l*)
9580                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9581                     ;;
9582                   *.la)
9583                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9584                     ;;
9585                   *)
9586                                         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9587                     LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9588                     ;;
9589                 esac
9590               done
9591             fi
9592           else
9593                                                             LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9594             LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9595           fi
9596         fi
9597       fi
9598     done
9599   done
9600   if test "X$rpathdirs" != "X"; then
9601     if test -n "$hardcode_libdir_separator"; then
9602                         alldirs=
9603       for found_dir in $rpathdirs; do
9604         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9605       done
9606             acl_save_libdir="$libdir"
9607       libdir="$alldirs"
9608       eval flag=\"$hardcode_libdir_flag_spec\"
9609       libdir="$acl_save_libdir"
9610       LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9611     else
9612             for found_dir in $rpathdirs; do
9613         acl_save_libdir="$libdir"
9614         libdir="$found_dir"
9615         eval flag=\"$hardcode_libdir_flag_spec\"
9616         libdir="$acl_save_libdir"
9617         LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9618       done
9619     fi
9620   fi
9621   if test "X$ltrpathdirs" != "X"; then
9622             for found_dir in $ltrpathdirs; do
9623       LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9624     done
9625   fi
9626
9627
9628         ac_save_CPPFLAGS="$CPPFLAGS"
9629
9630   for element in $INCEXPAT; do
9631     haveit=
9632     for x in $CPPFLAGS; do
9633
9634   acl_save_prefix="$prefix"
9635   prefix="$acl_final_prefix"
9636   acl_save_exec_prefix="$exec_prefix"
9637   exec_prefix="$acl_final_exec_prefix"
9638   eval x=\"$x\"
9639   exec_prefix="$acl_save_exec_prefix"
9640   prefix="$acl_save_prefix"
9641
9642       if test "X$x" = "X$element"; then
9643         haveit=yes
9644         break
9645       fi
9646     done
9647     if test -z "$haveit"; then
9648       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9649     fi
9650   done
9651
9652
9653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9654 $as_echo_n "checking for libexpat... " >&6; }
9655 if ${ac_cv_libexpat+:} false; then :
9656   $as_echo_n "(cached) " >&6
9657 else
9658
9659     ac_save_LIBS="$LIBS"
9660     LIBS="$LIBS $LIBEXPAT"
9661     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9662 /* end confdefs.h.  */
9663 #include "expat.h"
9664 int
9665 main ()
9666 {
9667 XML_Parser p = XML_ParserCreate (0);
9668   ;
9669   return 0;
9670 }
9671 _ACEOF
9672 if ac_fn_c_try_link "$LINENO"; then :
9673   ac_cv_libexpat=yes
9674 else
9675   ac_cv_libexpat=no
9676 fi
9677 rm -f core conftest.err conftest.$ac_objext \
9678     conftest$ac_exeext conftest.$ac_ext
9679     LIBS="$ac_save_LIBS"
9680
9681 fi
9682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9683 $as_echo "$ac_cv_libexpat" >&6; }
9684   if test "$ac_cv_libexpat" = yes; then
9685     HAVE_LIBEXPAT=yes
9686
9687 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9688
9689     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9690 $as_echo_n "checking how to link with libexpat... " >&6; }
9691     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9692 $as_echo "$LIBEXPAT" >&6; }
9693   else
9694     HAVE_LIBEXPAT=no
9695             CPPFLAGS="$ac_save_CPPFLAGS"
9696     LIBEXPAT=
9697     LTLIBEXPAT=
9698   fi
9699
9700
9701
9702
9703
9704
9705   if test "$HAVE_LIBEXPAT" != yes; then
9706     if test "$with_expat" = yes; then
9707       as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9708     else
9709       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9710 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9711     fi
9712   else
9713     save_LIBS=$LIBS
9714     LIBS="$LIBS $LIBEXPAT"
9715     for ac_func in XML_StopParser
9716 do :
9717   ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9718 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
9719   cat >>confdefs.h <<_ACEOF
9720 #define HAVE_XML_STOPPARSER 1
9721 _ACEOF
9722
9723 fi
9724 done
9725
9726     LIBS=$save_LIBS
9727   fi
9728 fi
9729
9730
9731 # Check whether --with-mpfr was given.
9732 if test "${with_mpfr+set}" = set; then :
9733   withval=$with_mpfr;
9734 else
9735   with_mpfr=auto
9736 fi
9737
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9739 $as_echo_n "checking whether to use MPFR... " >&6; }
9740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9741 $as_echo "$with_mpfr" >&6; }
9742
9743 if test "${with_mpfr}" = no; then
9744   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9745 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9746   HAVE_LIBMPFR=no
9747 else
9748
9749
9750
9751
9752
9753
9754
9755
9756     use_additional=yes
9757
9758   acl_save_prefix="$prefix"
9759   prefix="$acl_final_prefix"
9760   acl_save_exec_prefix="$exec_prefix"
9761   exec_prefix="$acl_final_exec_prefix"
9762
9763     eval additional_includedir=\"$includedir\"
9764     eval additional_libdir=\"$libdir\"
9765
9766   exec_prefix="$acl_save_exec_prefix"
9767   prefix="$acl_save_prefix"
9768
9769
9770 # Check whether --with-libmpfr-prefix was given.
9771 if test "${with_libmpfr_prefix+set}" = set; then :
9772   withval=$with_libmpfr_prefix;
9773     if test "X$withval" = "Xno"; then
9774       use_additional=no
9775     else
9776       if test "X$withval" = "X"; then
9777
9778   acl_save_prefix="$prefix"
9779   prefix="$acl_final_prefix"
9780   acl_save_exec_prefix="$exec_prefix"
9781   exec_prefix="$acl_final_exec_prefix"
9782
9783           eval additional_includedir=\"$includedir\"
9784           eval additional_libdir=\"$libdir\"
9785
9786   exec_prefix="$acl_save_exec_prefix"
9787   prefix="$acl_save_prefix"
9788
9789       else
9790         additional_includedir="$withval/include"
9791         additional_libdir="$withval/lib"
9792       fi
9793     fi
9794
9795 fi
9796
9797       LIBMPFR=
9798   LTLIBMPFR=
9799   INCMPFR=
9800   rpathdirs=
9801   ltrpathdirs=
9802   names_already_handled=
9803   names_next_round='mpfr gmp'
9804   while test -n "$names_next_round"; do
9805     names_this_round="$names_next_round"
9806     names_next_round=
9807     for name in $names_this_round; do
9808       already_handled=
9809       for n in $names_already_handled; do
9810         if test "$n" = "$name"; then
9811           already_handled=yes
9812           break
9813         fi
9814       done
9815       if test -z "$already_handled"; then
9816         names_already_handled="$names_already_handled $name"
9817                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9818         eval value=\"\$HAVE_LIB$uppername\"
9819         if test -n "$value"; then
9820           if test "$value" = yes; then
9821             eval value=\"\$LIB$uppername\"
9822             test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9823             eval value=\"\$LTLIB$uppername\"
9824             test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9825           else
9826                                     :
9827           fi
9828         else
9829                               found_dir=
9830           found_la=
9831           found_so=
9832           found_a=
9833           if test $use_additional = yes; then
9834             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9835               found_dir="$additional_libdir"
9836               found_so="$additional_libdir/lib$name.$shlibext"
9837               if test -f "$additional_libdir/lib$name.la"; then
9838                 found_la="$additional_libdir/lib$name.la"
9839               fi
9840             else
9841               if test -f "$additional_libdir/lib$name.$libext"; then
9842                 found_dir="$additional_libdir"
9843                 found_a="$additional_libdir/lib$name.$libext"
9844                 if test -f "$additional_libdir/lib$name.la"; then
9845                   found_la="$additional_libdir/lib$name.la"
9846                 fi
9847               fi
9848             fi
9849           fi
9850           if test "X$found_dir" = "X"; then
9851             for x in $LDFLAGS $LTLIBMPFR; do
9852
9853   acl_save_prefix="$prefix"
9854   prefix="$acl_final_prefix"
9855   acl_save_exec_prefix="$exec_prefix"
9856   exec_prefix="$acl_final_exec_prefix"
9857   eval x=\"$x\"
9858   exec_prefix="$acl_save_exec_prefix"
9859   prefix="$acl_save_prefix"
9860
9861               case "$x" in
9862                 -L*)
9863                   dir=`echo "X$x" | sed -e 's/^X-L//'`
9864                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9865                     found_dir="$dir"
9866                     found_so="$dir/lib$name.$shlibext"
9867                     if test -f "$dir/lib$name.la"; then
9868                       found_la="$dir/lib$name.la"
9869                     fi
9870                   else
9871                     if test -f "$dir/lib$name.$libext"; then
9872                       found_dir="$dir"
9873                       found_a="$dir/lib$name.$libext"
9874                       if test -f "$dir/lib$name.la"; then
9875                         found_la="$dir/lib$name.la"
9876                       fi
9877                     fi
9878                   fi
9879                   ;;
9880               esac
9881               if test "X$found_dir" != "X"; then
9882                 break
9883               fi
9884             done
9885           fi
9886           if test "X$found_dir" != "X"; then
9887                         LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9888             if test "X$found_so" != "X"; then
9889                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9890                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9891               else
9892                                                                                 haveit=
9893                 for x in $ltrpathdirs; do
9894                   if test "X$x" = "X$found_dir"; then
9895                     haveit=yes
9896                     break
9897                   fi
9898                 done
9899                 if test -z "$haveit"; then
9900                   ltrpathdirs="$ltrpathdirs $found_dir"
9901                 fi
9902                                 if test "$hardcode_direct" = yes; then
9903                                                       LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9904                 else
9905                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9906                                                             LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9907                                                             haveit=
9908                     for x in $rpathdirs; do
9909                       if test "X$x" = "X$found_dir"; then
9910                         haveit=yes
9911                         break
9912                       fi
9913                     done
9914                     if test -z "$haveit"; then
9915                       rpathdirs="$rpathdirs $found_dir"
9916                     fi
9917                   else
9918                                                                                 haveit=
9919                     for x in $LDFLAGS $LIBMPFR; do
9920
9921   acl_save_prefix="$prefix"
9922   prefix="$acl_final_prefix"
9923   acl_save_exec_prefix="$exec_prefix"
9924   exec_prefix="$acl_final_exec_prefix"
9925   eval x=\"$x\"
9926   exec_prefix="$acl_save_exec_prefix"
9927   prefix="$acl_save_prefix"
9928
9929                       if test "X$x" = "X-L$found_dir"; then
9930                         haveit=yes
9931                         break
9932                       fi
9933                     done
9934                     if test -z "$haveit"; then
9935                       LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9936                     fi
9937                     if test "$hardcode_minus_L" != no; then
9938                                                                                         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9939                     else
9940                                                                                                                                                                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9941                     fi
9942                   fi
9943                 fi
9944               fi
9945             else
9946               if test "X$found_a" != "X"; then
9947                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9948               else
9949                                                 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9950               fi
9951             fi
9952                         additional_includedir=
9953             case "$found_dir" in
9954               */lib | */lib/)
9955                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9956                 additional_includedir="$basedir/include"
9957                 ;;
9958             esac
9959             if test "X$additional_includedir" != "X"; then
9960                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
9961                 haveit=
9962                 if test "X$additional_includedir" = "X/usr/local/include"; then
9963                   if test -n "$GCC"; then
9964                     case $host_os in
9965                       linux*) haveit=yes;;
9966                     esac
9967                   fi
9968                 fi
9969                 if test -z "$haveit"; then
9970                   for x in $CPPFLAGS $INCMPFR; do
9971
9972   acl_save_prefix="$prefix"
9973   prefix="$acl_final_prefix"
9974   acl_save_exec_prefix="$exec_prefix"
9975   exec_prefix="$acl_final_exec_prefix"
9976   eval x=\"$x\"
9977   exec_prefix="$acl_save_exec_prefix"
9978   prefix="$acl_save_prefix"
9979
9980                     if test "X$x" = "X-I$additional_includedir"; then
9981                       haveit=yes
9982                       break
9983                     fi
9984                   done
9985                   if test -z "$haveit"; then
9986                     if test -d "$additional_includedir"; then
9987                                             INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
9988                     fi
9989                   fi
9990                 fi
9991               fi
9992             fi
9993                         if test -n "$found_la"; then
9994                                                         save_libdir="$libdir"
9995               case "$found_la" in
9996                 */* | *\\*) . "$found_la" ;;
9997                 *) . "./$found_la" ;;
9998               esac
9999               libdir="$save_libdir"
10000                             for dep in $dependency_libs; do
10001                 case "$dep" in
10002                   -L*)
10003                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10004                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
10005                       haveit=
10006                       if test "X$additional_libdir" = "X/usr/local/lib"; then
10007                         if test -n "$GCC"; then
10008                           case $host_os in
10009                             linux*) haveit=yes;;
10010                           esac
10011                         fi
10012                       fi
10013                       if test -z "$haveit"; then
10014                         haveit=
10015                         for x in $LDFLAGS $LIBMPFR; do
10016
10017   acl_save_prefix="$prefix"
10018   prefix="$acl_final_prefix"
10019   acl_save_exec_prefix="$exec_prefix"
10020   exec_prefix="$acl_final_exec_prefix"
10021   eval x=\"$x\"
10022   exec_prefix="$acl_save_exec_prefix"
10023   prefix="$acl_save_prefix"
10024
10025                           if test "X$x" = "X-L$additional_libdir"; then
10026                             haveit=yes
10027                             break
10028                           fi
10029                         done
10030                         if test -z "$haveit"; then
10031                           if test -d "$additional_libdir"; then
10032                                                         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10033                           fi
10034                         fi
10035                         haveit=
10036                         for x in $LDFLAGS $LTLIBMPFR; do
10037
10038   acl_save_prefix="$prefix"
10039   prefix="$acl_final_prefix"
10040   acl_save_exec_prefix="$exec_prefix"
10041   exec_prefix="$acl_final_exec_prefix"
10042   eval x=\"$x\"
10043   exec_prefix="$acl_save_exec_prefix"
10044   prefix="$acl_save_prefix"
10045
10046                           if test "X$x" = "X-L$additional_libdir"; then
10047                             haveit=yes
10048                             break
10049                           fi
10050                         done
10051                         if test -z "$haveit"; then
10052                           if test -d "$additional_libdir"; then
10053                                                         LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10054                           fi
10055                         fi
10056                       fi
10057                     fi
10058                     ;;
10059                   -R*)
10060                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
10061                     if test "$enable_rpath" != no; then
10062                                                                   haveit=
10063                       for x in $rpathdirs; do
10064                         if test "X$x" = "X$dir"; then
10065                           haveit=yes
10066                           break
10067                         fi
10068                       done
10069                       if test -z "$haveit"; then
10070                         rpathdirs="$rpathdirs $dir"
10071                       fi
10072                                                                   haveit=
10073                       for x in $ltrpathdirs; do
10074                         if test "X$x" = "X$dir"; then
10075                           haveit=yes
10076                           break
10077                         fi
10078                       done
10079                       if test -z "$haveit"; then
10080                         ltrpathdirs="$ltrpathdirs $dir"
10081                       fi
10082                     fi
10083                     ;;
10084                   -l*)
10085                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10086                     ;;
10087                   *.la)
10088                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10089                     ;;
10090                   *)
10091                                         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10092                     LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10093                     ;;
10094                 esac
10095               done
10096             fi
10097           else
10098                                                             LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10099             LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10100           fi
10101         fi
10102       fi
10103     done
10104   done
10105   if test "X$rpathdirs" != "X"; then
10106     if test -n "$hardcode_libdir_separator"; then
10107                         alldirs=
10108       for found_dir in $rpathdirs; do
10109         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10110       done
10111             acl_save_libdir="$libdir"
10112       libdir="$alldirs"
10113       eval flag=\"$hardcode_libdir_flag_spec\"
10114       libdir="$acl_save_libdir"
10115       LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10116     else
10117             for found_dir in $rpathdirs; do
10118         acl_save_libdir="$libdir"
10119         libdir="$found_dir"
10120         eval flag=\"$hardcode_libdir_flag_spec\"
10121         libdir="$acl_save_libdir"
10122         LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10123       done
10124     fi
10125   fi
10126   if test "X$ltrpathdirs" != "X"; then
10127             for found_dir in $ltrpathdirs; do
10128       LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10129     done
10130   fi
10131
10132
10133         ac_save_CPPFLAGS="$CPPFLAGS"
10134
10135   for element in $INCMPFR; do
10136     haveit=
10137     for x in $CPPFLAGS; do
10138
10139   acl_save_prefix="$prefix"
10140   prefix="$acl_final_prefix"
10141   acl_save_exec_prefix="$exec_prefix"
10142   exec_prefix="$acl_final_exec_prefix"
10143   eval x=\"$x\"
10144   exec_prefix="$acl_save_exec_prefix"
10145   prefix="$acl_save_prefix"
10146
10147       if test "X$x" = "X$element"; then
10148         haveit=yes
10149         break
10150       fi
10151     done
10152     if test -z "$haveit"; then
10153       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10154     fi
10155   done
10156
10157
10158   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10159 $as_echo_n "checking for libmpfr... " >&6; }
10160 if ${ac_cv_libmpfr+:} false; then :
10161   $as_echo_n "(cached) " >&6
10162 else
10163
10164     ac_save_LIBS="$LIBS"
10165     LIBS="$LIBS $LIBMPFR"
10166     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10167 /* end confdefs.h.  */
10168 #include <mpfr.h>
10169 int
10170 main ()
10171 {
10172 mpfr_exp_t exp; mpfr_t x;
10173                          mpfr_frexp (&exp, x, x, MPFR_RNDN);
10174   ;
10175   return 0;
10176 }
10177 _ACEOF
10178 if ac_fn_c_try_link "$LINENO"; then :
10179   ac_cv_libmpfr=yes
10180 else
10181   ac_cv_libmpfr=no
10182 fi
10183 rm -f core conftest.err conftest.$ac_objext \
10184     conftest$ac_exeext conftest.$ac_ext
10185     LIBS="$ac_save_LIBS"
10186
10187 fi
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10189 $as_echo "$ac_cv_libmpfr" >&6; }
10190   if test "$ac_cv_libmpfr" = yes; then
10191     HAVE_LIBMPFR=yes
10192
10193 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10194
10195     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10196 $as_echo_n "checking how to link with libmpfr... " >&6; }
10197     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10198 $as_echo "$LIBMPFR" >&6; }
10199   else
10200     HAVE_LIBMPFR=no
10201             CPPFLAGS="$ac_save_CPPFLAGS"
10202     LIBMPFR=
10203     LTLIBMPFR=
10204   fi
10205
10206
10207
10208
10209
10210
10211   if test "$HAVE_LIBMPFR" != yes; then
10212     if test "$with_mpfr" = yes; then
10213       as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10214     else
10215       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10216 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10217     fi
10218   fi
10219 fi
10220
10221 # --------------------- #
10222 # Check for libpython.  #
10223 # --------------------- #
10224
10225
10226
10227
10228
10229
10230 # Check whether --with-python was given.
10231 if test "${with_python+set}" = set; then :
10232   withval=$with_python;
10233 else
10234   with_python=auto
10235 fi
10236
10237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10238 $as_echo_n "checking whether to use python... " >&6; }
10239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10240 $as_echo "$with_python" >&6; }
10241
10242 if test "${with_python}" = no; then
10243   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10244 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10245   have_libpython=no
10246 else
10247   case "${with_python}" in
10248   [\\/]* | ?:[\\/]*)
10249     if test -d ${with_python}; then
10250       # Assume the python binary is ${with_python}/bin/python.
10251       python_prog="${with_python}/bin/python"
10252       python_prefix=
10253       # If python does not exit ${with_python}/bin, then try in
10254       # ${with_python}.  On Windows/MinGW, this is where the Python
10255       # executable is.
10256       if test ! -x "${python_prog}"; then
10257         python_prog="${with_python}/python"
10258         python_prefix=
10259       fi
10260       if test ! -x "${python_prog}"; then
10261         # Fall back to gdb 7.0/7.1 behaviour.
10262         python_prog=missing
10263         python_prefix=${with_python}
10264       fi
10265     elif test -x "${with_python}"; then
10266       # While we can't run python compiled for $host (unless host == build),
10267       # the user could write a script that provides the needed information,
10268       # so we support that.
10269       python_prog=${with_python}
10270       python_prefix=
10271     else
10272       as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10273     fi
10274     ;;
10275   */*)
10276     # Disallow --with-python=foo/bar.
10277     as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10278     ;;
10279   *)
10280     # The user has either specified auto, yes, or the name of the python
10281     # program assumed to be in $PATH.
10282     python_prefix=
10283     case "${with_python}" in
10284     yes | auto)
10285       if test ${build} = ${host}; then
10286         # Extract the first word of "python", so it can be a program name with args.
10287 set dummy python; ac_word=$2
10288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10289 $as_echo_n "checking for $ac_word... " >&6; }
10290 if ${ac_cv_path_python_prog_path+:} false; then :
10291   $as_echo_n "(cached) " >&6
10292 else
10293   case $python_prog_path in
10294   [\\/]* | ?:[\\/]*)
10295   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10296   ;;
10297   *)
10298   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10299 for as_dir in $PATH
10300 do
10301   IFS=$as_save_IFS
10302   test -z "$as_dir" && as_dir=.
10303     for ac_exec_ext in '' $ac_executable_extensions; do
10304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10305     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10307     break 2
10308   fi
10309 done
10310   done
10311 IFS=$as_save_IFS
10312
10313   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10314   ;;
10315 esac
10316 fi
10317 python_prog_path=$ac_cv_path_python_prog_path
10318 if test -n "$python_prog_path"; then
10319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10320 $as_echo "$python_prog_path" >&6; }
10321 else
10322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323 $as_echo "no" >&6; }
10324 fi
10325
10326
10327         if test "${python_prog_path}" = missing; then
10328           python_prog=missing
10329         else
10330           python_prog=${python_prog_path}
10331         fi
10332       else
10333         # Not much we can do except assume the cross-compiler will find the
10334         # right files.
10335         python_prog=missing
10336       fi
10337       ;;
10338     *)
10339       # While we can't run python compiled for $host (unless host == build),
10340       # the user could write a script that provides the needed information,
10341       # so we support that.
10342       python_prog="${with_python}"
10343       # Extract the first word of "${python_prog}", so it can be a program name with args.
10344 set dummy ${python_prog}; ac_word=$2
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10346 $as_echo_n "checking for $ac_word... " >&6; }
10347 if ${ac_cv_path_python_prog_path+:} false; then :
10348   $as_echo_n "(cached) " >&6
10349 else
10350   case $python_prog_path in
10351   [\\/]* | ?:[\\/]*)
10352   ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10353   ;;
10354   *)
10355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10356 for as_dir in $PATH
10357 do
10358   IFS=$as_save_IFS
10359   test -z "$as_dir" && as_dir=.
10360     for ac_exec_ext in '' $ac_executable_extensions; do
10361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10362     ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10364     break 2
10365   fi
10366 done
10367   done
10368 IFS=$as_save_IFS
10369
10370   test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10371   ;;
10372 esac
10373 fi
10374 python_prog_path=$ac_cv_path_python_prog_path
10375 if test -n "$python_prog_path"; then
10376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10377 $as_echo "$python_prog_path" >&6; }
10378 else
10379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380 $as_echo "no" >&6; }
10381 fi
10382
10383
10384       if test "${python_prog_path}" = missing; then
10385         as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10386       fi
10387       ;;
10388     esac
10389   esac
10390
10391   if test "${python_prog}" != missing; then
10392     # We have a python program to use, but it may be too old.
10393     # Don't flag an error for --with-python=auto (the default).
10394     have_python_config=yes
10395     python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10396     if test $? != 0; then
10397       have_python_config=failed
10398       if test "${with_python}" != auto; then
10399         as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10400       fi
10401     fi
10402     python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10403     if test $? != 0; then
10404       have_python_config=failed
10405       if test "${with_python}" != auto; then
10406         as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10407       fi
10408     fi
10409     python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10410     if test $? != 0; then
10411       have_python_config=failed
10412       if test "${with_python}" != auto; then
10413         as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10414       fi
10415     fi
10416   else
10417     # We do not have a python executable we can use to determine where
10418     # to find the Python headers and libs.  We cannot guess the include
10419     # path from the python_prefix either, because that include path
10420     # depends on the Python version.  So, there is nothing much we can
10421     # do except assume that the compiler will be able to find those files.
10422     python_includes=
10423     python_libs=
10424     have_python_config=no
10425   fi
10426
10427   # If we have python-config, only try the configuration it provides.
10428   # Otherwise fallback on the old way of trying different versions of
10429   # python in turn.
10430
10431   have_libpython=no
10432   if test "${have_python_config}" = yes; then
10433     # Determine the Python version by extracting "-lpython<version>"
10434     # part of the python_libs. <version> is usually X.Y with X and Y
10435     # being decimal numbers, but can also be XY (seen on Windows).
10436     #
10437     # The extraction is performed using sed with a regular expression.
10438     # Initially, the regexp used was using the '?' quantifier to make
10439     # the dot in the version number optional.  Unfortunately, this
10440     # does not work with non-GNU versions of sed because, because of
10441     # what looks like a limitation (the '?' quantifier does not work
10442     # with back-references).  We work around this limitation by using
10443     # the '*' quantifier instead.  It means that, in theory, we might
10444     # match unexpected version strings such as "-lpython2..7", but
10445     # this seems unlikely in practice.  And even if that happens,
10446     # an error will be triggered later on, when checking that version
10447     # number.
10448     python_version=`echo " ${python_libs} " \
10449                          | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
10450     case "${python_version}" in
10451     python*)
10452
10453   version=${python_version}
10454
10455   new_CPPFLAGS=${python_includes}
10456   new_LIBS=${python_libs}
10457   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10458 $as_echo_n "checking for ${version}... " >&6; }
10459   save_CPPFLAGS=$CPPFLAGS
10460   save_LIBS=$LIBS
10461   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10462   LIBS="$new_LIBS $LIBS"
10463   found_usable_python=no
10464   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10465 /* end confdefs.h.  */
10466 #include "Python.h"
10467 int
10468 main ()
10469 {
10470 Py_Initialize ();
10471   ;
10472   return 0;
10473 }
10474 _ACEOF
10475 if ac_fn_c_try_link "$LINENO"; then :
10476   have_libpython=${version}
10477                   found_usable_python=yes
10478                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10479                   PYTHON_LIBS=$new_LIBS
10480 fi
10481 rm -f core conftest.err conftest.$ac_objext \
10482     conftest$ac_exeext conftest.$ac_ext
10483   CPPFLAGS=$save_CPPFLAGS
10484   LIBS=$save_LIBS
10485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10486 $as_echo "${found_usable_python}" >&6; }
10487
10488       ;;
10489     *)
10490       as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
10491       ;;
10492     esac
10493   elif test "${have_python_config}" != failed; then
10494     if test "${have_libpython}" = no; then
10495
10496   version=python2.7
10497
10498   new_CPPFLAGS=${python_includes}
10499   new_LIBS="-lpython2.7 ${python_libs}"
10500   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10501 $as_echo_n "checking for ${version}... " >&6; }
10502   save_CPPFLAGS=$CPPFLAGS
10503   save_LIBS=$LIBS
10504   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10505   LIBS="$new_LIBS $LIBS"
10506   found_usable_python=no
10507   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10508 /* end confdefs.h.  */
10509 #include "Python.h"
10510 int
10511 main ()
10512 {
10513 Py_Initialize ();
10514   ;
10515   return 0;
10516 }
10517 _ACEOF
10518 if ac_fn_c_try_link "$LINENO"; then :
10519   have_libpython=${version}
10520                   found_usable_python=yes
10521                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10522                   PYTHON_LIBS=$new_LIBS
10523 fi
10524 rm -f core conftest.err conftest.$ac_objext \
10525     conftest$ac_exeext conftest.$ac_ext
10526   CPPFLAGS=$save_CPPFLAGS
10527   LIBS=$save_LIBS
10528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10529 $as_echo "${found_usable_python}" >&6; }
10530
10531     fi
10532     if test "${have_libpython}" = no; then
10533
10534   version=python2.6
10535
10536   new_CPPFLAGS=${python_includes}
10537   new_LIBS="-lpython2.6 ${python_libs}"
10538   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10539 $as_echo_n "checking for ${version}... " >&6; }
10540   save_CPPFLAGS=$CPPFLAGS
10541   save_LIBS=$LIBS
10542   CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10543   LIBS="$new_LIBS $LIBS"
10544   found_usable_python=no
10545   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10546 /* end confdefs.h.  */
10547 #include "Python.h"
10548 int
10549 main ()
10550 {
10551 Py_Initialize ();
10552   ;
10553   return 0;
10554 }
10555 _ACEOF
10556 if ac_fn_c_try_link "$LINENO"; then :
10557   have_libpython=${version}
10558                   found_usable_python=yes
10559                   PYTHON_CPPFLAGS=$new_CPPFLAGS
10560                   PYTHON_LIBS=$new_LIBS
10561 fi
10562 rm -f core conftest.err conftest.$ac_objext \
10563     conftest$ac_exeext conftest.$ac_ext
10564   CPPFLAGS=$save_CPPFLAGS
10565   LIBS=$save_LIBS
10566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10567 $as_echo "${found_usable_python}" >&6; }
10568
10569     fi
10570   fi
10571   if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
10572
10573 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10574
10575   elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
10576
10577 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10578
10579   fi
10580
10581   if test "${have_libpython}" = no; then
10582     case "${with_python}" in
10583     yes)
10584       as_fn_error $? "python is missing or unusable" "$LINENO" 5
10585       ;;
10586     auto)
10587       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10588 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10589       ;;
10590     *)
10591       as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10592       ;;
10593     esac
10594   else
10595     if test -n "${python_prefix}"; then
10596
10597 cat >>confdefs.h <<_ACEOF
10598 #define WITH_PYTHON_PATH "${python_prefix}"
10599 _ACEOF
10600
10601
10602   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10603      if test "x$prefix" = xNONE; then
10604         test_prefix=/usr/local
10605      else
10606         test_prefix=$prefix
10607      fi
10608   else
10609      test_prefix=$exec_prefix
10610   fi
10611   value=0
10612   case ${python_prefix} in
10613      "${test_prefix}"|"${test_prefix}/"*|\
10614         '${exec_prefix}'|'${exec_prefix}/'*)
10615      value=1
10616      ;;
10617   esac
10618
10619 cat >>confdefs.h <<_ACEOF
10620 #define PYTHON_PATH_RELOCATABLE $value
10621 _ACEOF
10622
10623
10624     fi
10625   fi
10626 fi
10627
10628 if test "${have_libpython}" != no; then
10629
10630 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10631
10632   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10633   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10634   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10635   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10636   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10637
10638   # Flags needed to compile Python code (taken from python-config --cflags).
10639   # We cannot call python-config directly because it will output whatever was
10640   # used when compiling the Python interpreter itself, including flags which
10641   # would make the python-related objects be compiled differently from the
10642   # rest of GDB (e.g., -O2 and -fPIC).
10643   if test "${GCC}" = yes; then
10644     tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10645     # Python headers recommend -DNDEBUG, but it's unclear if that just
10646     # refers to building Python itself.  In release mode, though, it
10647     # doesn't hurt for the Python code in gdb to follow.
10648     $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
10649   fi
10650
10651   if test "x${tentative_python_cflags}" != x; then
10652     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10653 $as_echo_n "checking compiler flags for python code... " >&6; }
10654     for flag in ${tentative_python_cflags}; do
10655       # Check that the compiler accepts it
10656       saved_CFLAGS="$CFLAGS"
10657       CFLAGS="$CFLAGS $flag"
10658       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10659 /* end confdefs.h.  */
10660
10661 int
10662 main ()
10663 {
10664
10665   ;
10666   return 0;
10667 }
10668 _ACEOF
10669 if ac_fn_c_try_compile "$LINENO"; then :
10670   PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10671 fi
10672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10673       CFLAGS="$saved_CFLAGS"
10674     done
10675     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10676 $as_echo "${PYTHON_CFLAGS}" >&6; }
10677   fi
10678
10679   # On x64 Windows, Python's include headers, and pyconfig.h in
10680   # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10681   # version of Windows.  Unfortunately, MS_WIN64 is only defined if
10682   # _MSC_VER, a Microsoft-specific macro, is defined.  So, when
10683   # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10684   # The issue was reported to the Python community, but still isn't
10685   # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10686
10687   case "$gdb_host" in
10688     mingw64)
10689            if test "${GCC}" = yes; then
10690              CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10691            fi
10692            ;;
10693   esac
10694
10695   # Note that "python -m threading" cannot be used to check for
10696   # threading support due to a bug in Python 2.7.3
10697   # (http://bugs.python.org/issue15567).
10698   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10699 $as_echo_n "checking whether python supports threads... " >&6; }
10700   saved_CPPFLAGS="${CPPFLAGS}"
10701   CPPFLAGS="${PYTHON_CPPFLAGS}"
10702   # Note that the test is reversed so that python_has_threads=yes on
10703   # unexpected failures.
10704   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10705 /* end confdefs.h.  */
10706
10707 #include <Python.h>
10708 #ifdef WITH_THREAD
10709 # error
10710 #endif
10711
10712 _ACEOF
10713 if ac_fn_c_try_cpp "$LINENO"; then :
10714   python_has_threads=no
10715 else
10716   python_has_threads=yes
10717 fi
10718 rm -f conftest.err conftest.i conftest.$ac_ext
10719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10720 $as_echo "${python_has_threads}" >&6; }
10721   CPPFLAGS="${saved_CPPFLAGS}"
10722 else
10723   # Even if Python support is not compiled in, we need to have this file
10724   # included so that the "python" command, et.al., still exists.
10725   CONFIG_OBS="$CONFIG_OBS python/python.o"
10726   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10727 fi
10728
10729 # Work around Python http://bugs.python.org/issue10112.  See also
10730 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10731 # no effect.  Note that the only test after this that uses Python is
10732 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10733 # run without -export-dynamic too.
10734 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10735
10736
10737
10738
10739  if test "${have_libpython}" != no; then
10740   HAVE_PYTHON_TRUE=
10741   HAVE_PYTHON_FALSE='#'
10742 else
10743   HAVE_PYTHON_TRUE='#'
10744   HAVE_PYTHON_FALSE=
10745 fi
10746
10747
10748 # -------------------- #
10749 # Check for libguile.  #
10750 # -------------------- #
10751
10752
10753
10754
10755
10756
10757 # Check whether --with-guile was given.
10758 if test "${with_guile+set}" = set; then :
10759   withval=$with_guile;
10760 else
10761   with_guile=auto
10762 fi
10763
10764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10765 $as_echo_n "checking whether to use guile... " >&6; }
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10767 $as_echo "$with_guile" >&6; }
10768
10769 # Extract the first word of "pkg-config", so it can be a program name with args.
10770 set dummy pkg-config; ac_word=$2
10771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10772 $as_echo_n "checking for $ac_word... " >&6; }
10773 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
10774   $as_echo_n "(cached) " >&6
10775 else
10776   case $pkg_config_prog_path in
10777   [\\/]* | ?:[\\/]*)
10778   ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10779   ;;
10780   *)
10781   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10782 for as_dir in $PATH
10783 do
10784   IFS=$as_save_IFS
10785   test -z "$as_dir" && as_dir=.
10786     for ac_exec_ext in '' $ac_executable_extensions; do
10787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10788     ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10790     break 2
10791   fi
10792 done
10793   done
10794 IFS=$as_save_IFS
10795
10796   test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10797   ;;
10798 esac
10799 fi
10800 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10801 if test -n "$pkg_config_prog_path"; then
10802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10803 $as_echo "$pkg_config_prog_path" >&6; }
10804 else
10805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10806 $as_echo "no" >&6; }
10807 fi
10808
10809
10810
10811 try_guile_versions="guile-2.0"
10812 have_libguile=no
10813 case "${with_guile}" in
10814 no)
10815   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10816 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10817   ;;
10818 auto)
10819   if test "${pkg_config_prog_path}" = "missing"; then
10820     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10821 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10822   else
10823
10824   pkg_config=${pkg_config_prog_path}
10825   guile_version_list=${try_guile_versions}
10826   flag_errors=no
10827
10828   found_usable_guile=checking
10829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10830 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10831   for guile_version in ${guile_version_list}; do
10832     ${pkg_config} --exists ${guile_version} 2>/dev/null
10833     if test $? != 0; then
10834       continue
10835     fi
10836             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10837     if test $? != 0; then
10838       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10839     fi
10840     new_LIBS=`${pkg_config} --libs ${guile_version}`
10841     if test $? != 0; then
10842       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10843     fi
10844         found_usable_guile=${guile_version}
10845     break
10846   done
10847   if test "${found_usable_guile}" = "checking"; then
10848     if test "${flag_errors}" = "yes"; then
10849       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10850     else
10851       found_usable_guile=no
10852     fi
10853   fi
10854       if test "${found_usable_guile}" != no; then
10855     save_CPPFLAGS=$CPPFLAGS
10856     save_LIBS=$LIBS
10857     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10858     LIBS="$LIBS $new_LIBS"
10859     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10860 /* end confdefs.h.  */
10861 #include "libguile.h"
10862 int
10863 main ()
10864 {
10865 scm_init_guile ();
10866   ;
10867   return 0;
10868 }
10869 _ACEOF
10870 if ac_fn_c_try_link "$LINENO"; then :
10871   have_libguile=yes
10872                     GUILE_CPPFLAGS=$new_CPPFLAGS
10873                     GUILE_LIBS=$new_LIBS
10874 else
10875   found_usable_guile=no
10876 fi
10877 rm -f core conftest.err conftest.$ac_objext \
10878     conftest$ac_exeext conftest.$ac_ext
10879         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10880 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
10881
10882 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10883
10884
10885 fi
10886
10887     CPPFLAGS=$save_CPPFLAGS
10888     LIBS=$save_LIBS
10889     if test "${found_usable_guile}" = no; then
10890       if test "${flag_errors}" = yes; then
10891         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10892 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10893 as_fn_error $? "linking guile version ${guile_version} test program failed
10894 See \`config.log' for more details" "$LINENO" 5; }
10895       fi
10896     fi
10897   fi
10898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10899 $as_echo "${found_usable_guile}" >&6; }
10900
10901   fi
10902   ;;
10903 yes)
10904   if test "${pkg_config_prog_path}" = "missing"; then
10905     as_fn_error $? "pkg-config not found" "$LINENO" 5
10906   fi
10907
10908   pkg_config=${pkg_config_prog_path}
10909   guile_version_list=${try_guile_versions}
10910   flag_errors=yes
10911
10912   found_usable_guile=checking
10913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10914 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10915   for guile_version in ${guile_version_list}; do
10916     ${pkg_config} --exists ${guile_version} 2>/dev/null
10917     if test $? != 0; then
10918       continue
10919     fi
10920             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10921     if test $? != 0; then
10922       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10923     fi
10924     new_LIBS=`${pkg_config} --libs ${guile_version}`
10925     if test $? != 0; then
10926       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10927     fi
10928         found_usable_guile=${guile_version}
10929     break
10930   done
10931   if test "${found_usable_guile}" = "checking"; then
10932     if test "${flag_errors}" = "yes"; then
10933       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10934     else
10935       found_usable_guile=no
10936     fi
10937   fi
10938       if test "${found_usable_guile}" != no; then
10939     save_CPPFLAGS=$CPPFLAGS
10940     save_LIBS=$LIBS
10941     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10942     LIBS="$LIBS $new_LIBS"
10943     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10944 /* end confdefs.h.  */
10945 #include "libguile.h"
10946 int
10947 main ()
10948 {
10949 scm_init_guile ();
10950   ;
10951   return 0;
10952 }
10953 _ACEOF
10954 if ac_fn_c_try_link "$LINENO"; then :
10955   have_libguile=yes
10956                     GUILE_CPPFLAGS=$new_CPPFLAGS
10957                     GUILE_LIBS=$new_LIBS
10958 else
10959   found_usable_guile=no
10960 fi
10961 rm -f core conftest.err conftest.$ac_objext \
10962     conftest$ac_exeext conftest.$ac_ext
10963         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10964 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
10965
10966 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10967
10968
10969 fi
10970
10971     CPPFLAGS=$save_CPPFLAGS
10972     LIBS=$save_LIBS
10973     if test "${found_usable_guile}" = no; then
10974       if test "${flag_errors}" = yes; then
10975         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10976 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10977 as_fn_error $? "linking guile version ${guile_version} test program failed
10978 See \`config.log' for more details" "$LINENO" 5; }
10979       fi
10980     fi
10981   fi
10982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10983 $as_echo "${found_usable_guile}" >&6; }
10984
10985   ;;
10986 [\\/]* | ?:[\\/]*)
10987   if test -x "${with_guile}"; then
10988
10989   pkg_config=${with_guile}
10990   guile_version_list=${try_guile_versions}
10991   flag_errors=yes
10992
10993   found_usable_guile=checking
10994   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10995 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10996   for guile_version in ${guile_version_list}; do
10997     ${pkg_config} --exists ${guile_version} 2>/dev/null
10998     if test $? != 0; then
10999       continue
11000     fi
11001             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11002     if test $? != 0; then
11003       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11004     fi
11005     new_LIBS=`${pkg_config} --libs ${guile_version}`
11006     if test $? != 0; then
11007       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11008     fi
11009         found_usable_guile=${guile_version}
11010     break
11011   done
11012   if test "${found_usable_guile}" = "checking"; then
11013     if test "${flag_errors}" = "yes"; then
11014       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11015     else
11016       found_usable_guile=no
11017     fi
11018   fi
11019       if test "${found_usable_guile}" != no; then
11020     save_CPPFLAGS=$CPPFLAGS
11021     save_LIBS=$LIBS
11022     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11023     LIBS="$LIBS $new_LIBS"
11024     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11025 /* end confdefs.h.  */
11026 #include "libguile.h"
11027 int
11028 main ()
11029 {
11030 scm_init_guile ();
11031   ;
11032   return 0;
11033 }
11034 _ACEOF
11035 if ac_fn_c_try_link "$LINENO"; then :
11036   have_libguile=yes
11037                     GUILE_CPPFLAGS=$new_CPPFLAGS
11038                     GUILE_LIBS=$new_LIBS
11039 else
11040   found_usable_guile=no
11041 fi
11042 rm -f core conftest.err conftest.$ac_objext \
11043     conftest$ac_exeext conftest.$ac_ext
11044         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11045 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11046
11047 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11048
11049
11050 fi
11051
11052     CPPFLAGS=$save_CPPFLAGS
11053     LIBS=$save_LIBS
11054     if test "${found_usable_guile}" = no; then
11055       if test "${flag_errors}" = yes; then
11056         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11057 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11058 as_fn_error $? "linking guile version ${guile_version} test program failed
11059 See \`config.log' for more details" "$LINENO" 5; }
11060       fi
11061     fi
11062   fi
11063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11064 $as_echo "${found_usable_guile}" >&6; }
11065
11066   else
11067     as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11068   fi
11069   ;;
11070 "" | */*)
11071   # Disallow --with=guile="" and --with-guile=foo/bar.
11072   as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11073   ;;
11074 *)
11075   # A space separate list of guile versions to try, in order.
11076   if test "${pkg_config_prog_path}" = "missing"; then
11077     as_fn_error $? "pkg-config not found" "$LINENO" 5
11078   fi
11079
11080   pkg_config=${pkg_config_prog_path}
11081   guile_version_list=${with_guile}
11082   flag_errors=yes
11083
11084   found_usable_guile=checking
11085   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11086 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11087   for guile_version in ${guile_version_list}; do
11088     ${pkg_config} --exists ${guile_version} 2>/dev/null
11089     if test $? != 0; then
11090       continue
11091     fi
11092             new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11093     if test $? != 0; then
11094       as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11095     fi
11096     new_LIBS=`${pkg_config} --libs ${guile_version}`
11097     if test $? != 0; then
11098       as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11099     fi
11100         found_usable_guile=${guile_version}
11101     break
11102   done
11103   if test "${found_usable_guile}" = "checking"; then
11104     if test "${flag_errors}" = "yes"; then
11105       as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11106     else
11107       found_usable_guile=no
11108     fi
11109   fi
11110       if test "${found_usable_guile}" != no; then
11111     save_CPPFLAGS=$CPPFLAGS
11112     save_LIBS=$LIBS
11113     CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11114     LIBS="$LIBS $new_LIBS"
11115     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11116 /* end confdefs.h.  */
11117 #include "libguile.h"
11118 int
11119 main ()
11120 {
11121 scm_init_guile ();
11122   ;
11123   return 0;
11124 }
11125 _ACEOF
11126 if ac_fn_c_try_link "$LINENO"; then :
11127   have_libguile=yes
11128                     GUILE_CPPFLAGS=$new_CPPFLAGS
11129                     GUILE_LIBS=$new_LIBS
11130 else
11131   found_usable_guile=no
11132 fi
11133 rm -f core conftest.err conftest.$ac_objext \
11134     conftest$ac_exeext conftest.$ac_ext
11135         ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11136 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11137
11138 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11139
11140
11141 fi
11142
11143     CPPFLAGS=$save_CPPFLAGS
11144     LIBS=$save_LIBS
11145     if test "${found_usable_guile}" = no; then
11146       if test "${flag_errors}" = yes; then
11147         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11148 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11149 as_fn_error $? "linking guile version ${guile_version} test program failed
11150 See \`config.log' for more details" "$LINENO" 5; }
11151       fi
11152     fi
11153   fi
11154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11155 $as_echo "${found_usable_guile}" >&6; }
11156
11157   ;;
11158 esac
11159
11160 if test "${have_libguile}" != no; then
11161     case "${with_guile}" in
11162   [\\/]* | ?:[\\/]*)
11163
11164   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11165 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11166 if ${ac_cv_guild_program_name+:} false; then :
11167   $as_echo_n "(cached) " >&6
11168 else
11169   ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11170
11171      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11172      # the 'guild' and 'bindir' variables.  In that case, try to guess
11173      # what the program name is, at the risk of getting it wrong if
11174      # Guile was configured with '--program-suffix' or similar.
11175      if test "x$ac_cv_guild_program_name" = "x"; then
11176        guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11177        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11178      fi
11179
11180 fi
11181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11182 $as_echo "$ac_cv_guild_program_name" >&6; }
11183
11184   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11185     as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11186   fi
11187
11188   GUILD="$ac_cv_guild_program_name"
11189
11190
11191     ;;
11192   *)
11193
11194   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11195 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11196 if ${ac_cv_guild_program_name+:} false; then :
11197   $as_echo_n "(cached) " >&6
11198 else
11199   ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11200
11201      # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11202      # the 'guild' and 'bindir' variables.  In that case, try to guess
11203      # what the program name is, at the risk of getting it wrong if
11204      # Guile was configured with '--program-suffix' or similar.
11205      if test "x$ac_cv_guild_program_name" = "x"; then
11206        guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11207        ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11208      fi
11209
11210 fi
11211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11212 $as_echo "$ac_cv_guild_program_name" >&6; }
11213
11214   if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11215     as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11216   fi
11217
11218   GUILD="$ac_cv_guild_program_name"
11219
11220
11221     ;;
11222   esac
11223
11224
11225   if test "$cross_compiling" = no; then
11226     GUILD_TARGET_FLAG=
11227   else
11228     GUILD_TARGET_FLAG="--target=$host"
11229   fi
11230
11231
11232
11233
11234   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11235 $as_echo_n "checking whether guild supports this host... " >&6; }
11236 if ${ac_cv_guild_ok+:} false; then :
11237   $as_echo_n "(cached) " >&6
11238 else
11239   echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11240      if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11241        ac_cv_guild_ok=yes
11242      else
11243        ac_cv_guild_ok=no
11244      fi
11245 fi
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11247 $as_echo "$ac_cv_guild_ok" >&6; }
11248
11249     if test "$ac_cv_guild_ok" = no; then
11250     have_libguile=no
11251     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11252 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11253   fi
11254 fi
11255
11256 if test "${have_libguile}" != no; then
11257
11258 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11259
11260   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11261   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11262   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11263   CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11264   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11265
11266     save_LIBS="$LIBS"
11267   save_CPPFLAGS="$CPPFLAGS"
11268   LIBS="$GUILE_LIBS"
11269   CPPFLAGS="$GUILE_CPPFLAGS"
11270   for ac_func in scm_new_smob
11271 do :
11272   ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11273 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11274   cat >>confdefs.h <<_ACEOF
11275 #define HAVE_SCM_NEW_SMOB 1
11276 _ACEOF
11277
11278 fi
11279 done
11280
11281   LIBS="$save_LIBS"
11282   CPPFLAGS="$save_CPPFLAGS"
11283 else
11284   # Even if Guile support is not compiled in, we need to have these files
11285   # included.
11286   CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11287   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11288 fi
11289
11290
11291  if test "${have_libguile}" != no; then
11292   HAVE_GUILE_TRUE=
11293   HAVE_GUILE_FALSE='#'
11294 else
11295   HAVE_GUILE_TRUE='#'
11296   HAVE_GUILE_FALSE=
11297 fi
11298
11299
11300 # ---------------------------- #
11301 # Check for source highlight.  #
11302 # ---------------------------- #
11303
11304 SRCHIGH_LIBS=
11305 SRCHIGH_CFLAGS=
11306
11307 # Check whether --enable-source-highlight was given.
11308 if test "${enable_source_highlight+set}" = set; then :
11309   enableval=$enable_source_highlight; case "${enableval}" in
11310   yes)  enable_source_highlight=yes ;;
11311   no)   enable_source_highlight=no  ;;
11312   *)    as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11313 esac
11314 else
11315   enable_source_highlight=auto
11316 fi
11317
11318
11319 if test "${enable_source_highlight}" != "no"; then
11320   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
11321 $as_echo_n "checking for the source-highlight library... " >&6; }
11322   if test "${pkg_config_prog_path}" = "missing"; then
11323     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
11324 $as_echo "no - pkg-config not found" >&6; }
11325     if test "${enable_source_highlight}" = "yes"; then
11326       as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11327     fi
11328   else
11329     if ${pkg_config_prog_path} --exists source-highlight; then
11330       SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11331       SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11332
11333 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11334
11335       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11336 $as_echo "yes" >&6; }
11337     else
11338       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11339 $as_echo "no" >&6; }
11340       if test "${enable_source_highlight}" = "yes"; then
11341         as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11342       fi
11343     fi
11344   fi
11345 fi
11346
11347
11348
11349
11350 # Check whether --with-intel_pt was given.
11351 if test "${with_intel_pt+set}" = set; then :
11352   withval=$with_intel_pt;
11353 else
11354   with_intel_pt=auto
11355 fi
11356
11357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11358 $as_echo_n "checking whether to use intel pt... " >&6; }
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11360 $as_echo "$with_intel_pt" >&6; }
11361
11362 if test "${with_intel_pt}" = no; then
11363   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11364 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
11365   HAVE_LIBIPT=no
11366 else
11367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11368 /* end confdefs.h.  */
11369
11370 #include <linux/perf_event.h>
11371 #ifndef PERF_ATTR_SIZE_VER5
11372 # error
11373 #endif
11374
11375 _ACEOF
11376 if ac_fn_c_try_cpp "$LINENO"; then :
11377   perf_event=yes
11378 else
11379   perf_event=no
11380 fi
11381 rm -f conftest.err conftest.i conftest.$ac_ext
11382   if test "$perf_event" != yes; then
11383     if test "$with_intel_pt" = yes; then
11384       as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
11385     else
11386       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11387 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11388     fi
11389   fi
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399     use_additional=yes
11400
11401   acl_save_prefix="$prefix"
11402   prefix="$acl_final_prefix"
11403   acl_save_exec_prefix="$exec_prefix"
11404   exec_prefix="$acl_final_exec_prefix"
11405
11406     eval additional_includedir=\"$includedir\"
11407     eval additional_libdir=\"$libdir\"
11408
11409   exec_prefix="$acl_save_exec_prefix"
11410   prefix="$acl_save_prefix"
11411
11412
11413 # Check whether --with-libipt-prefix was given.
11414 if test "${with_libipt_prefix+set}" = set; then :
11415   withval=$with_libipt_prefix;
11416     if test "X$withval" = "Xno"; then
11417       use_additional=no
11418     else
11419       if test "X$withval" = "X"; then
11420
11421   acl_save_prefix="$prefix"
11422   prefix="$acl_final_prefix"
11423   acl_save_exec_prefix="$exec_prefix"
11424   exec_prefix="$acl_final_exec_prefix"
11425
11426           eval additional_includedir=\"$includedir\"
11427           eval additional_libdir=\"$libdir\"
11428
11429   exec_prefix="$acl_save_exec_prefix"
11430   prefix="$acl_save_prefix"
11431
11432       else
11433         additional_includedir="$withval/include"
11434         additional_libdir="$withval/lib"
11435       fi
11436     fi
11437
11438 fi
11439
11440       LIBIPT=
11441   LTLIBIPT=
11442   INCIPT=
11443   rpathdirs=
11444   ltrpathdirs=
11445   names_already_handled=
11446   names_next_round='ipt '
11447   while test -n "$names_next_round"; do
11448     names_this_round="$names_next_round"
11449     names_next_round=
11450     for name in $names_this_round; do
11451       already_handled=
11452       for n in $names_already_handled; do
11453         if test "$n" = "$name"; then
11454           already_handled=yes
11455           break
11456         fi
11457       done
11458       if test -z "$already_handled"; then
11459         names_already_handled="$names_already_handled $name"
11460                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11461         eval value=\"\$HAVE_LIB$uppername\"
11462         if test -n "$value"; then
11463           if test "$value" = yes; then
11464             eval value=\"\$LIB$uppername\"
11465             test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11466             eval value=\"\$LTLIB$uppername\"
11467             test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11468           else
11469                                     :
11470           fi
11471         else
11472                               found_dir=
11473           found_la=
11474           found_so=
11475           found_a=
11476           if test $use_additional = yes; then
11477             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11478               found_dir="$additional_libdir"
11479               found_so="$additional_libdir/lib$name.$shlibext"
11480               if test -f "$additional_libdir/lib$name.la"; then
11481                 found_la="$additional_libdir/lib$name.la"
11482               fi
11483             else
11484               if test -f "$additional_libdir/lib$name.$libext"; then
11485                 found_dir="$additional_libdir"
11486                 found_a="$additional_libdir/lib$name.$libext"
11487                 if test -f "$additional_libdir/lib$name.la"; then
11488                   found_la="$additional_libdir/lib$name.la"
11489                 fi
11490               fi
11491             fi
11492           fi
11493           if test "X$found_dir" = "X"; then
11494             for x in $LDFLAGS $LTLIBIPT; do
11495
11496   acl_save_prefix="$prefix"
11497   prefix="$acl_final_prefix"
11498   acl_save_exec_prefix="$exec_prefix"
11499   exec_prefix="$acl_final_exec_prefix"
11500   eval x=\"$x\"
11501   exec_prefix="$acl_save_exec_prefix"
11502   prefix="$acl_save_prefix"
11503
11504               case "$x" in
11505                 -L*)
11506                   dir=`echo "X$x" | sed -e 's/^X-L//'`
11507                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11508                     found_dir="$dir"
11509                     found_so="$dir/lib$name.$shlibext"
11510                     if test -f "$dir/lib$name.la"; then
11511                       found_la="$dir/lib$name.la"
11512                     fi
11513                   else
11514                     if test -f "$dir/lib$name.$libext"; then
11515                       found_dir="$dir"
11516                       found_a="$dir/lib$name.$libext"
11517                       if test -f "$dir/lib$name.la"; then
11518                         found_la="$dir/lib$name.la"
11519                       fi
11520                     fi
11521                   fi
11522                   ;;
11523               esac
11524               if test "X$found_dir" != "X"; then
11525                 break
11526               fi
11527             done
11528           fi
11529           if test "X$found_dir" != "X"; then
11530                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11531             if test "X$found_so" != "X"; then
11532                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11533                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11534               else
11535                                                                                 haveit=
11536                 for x in $ltrpathdirs; do
11537                   if test "X$x" = "X$found_dir"; then
11538                     haveit=yes
11539                     break
11540                   fi
11541                 done
11542                 if test -z "$haveit"; then
11543                   ltrpathdirs="$ltrpathdirs $found_dir"
11544                 fi
11545                                 if test "$hardcode_direct" = yes; then
11546                                                       LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11547                 else
11548                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11549                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11550                                                             haveit=
11551                     for x in $rpathdirs; do
11552                       if test "X$x" = "X$found_dir"; then
11553                         haveit=yes
11554                         break
11555                       fi
11556                     done
11557                     if test -z "$haveit"; then
11558                       rpathdirs="$rpathdirs $found_dir"
11559                     fi
11560                   else
11561                                                                                 haveit=
11562                     for x in $LDFLAGS $LIBIPT; do
11563
11564   acl_save_prefix="$prefix"
11565   prefix="$acl_final_prefix"
11566   acl_save_exec_prefix="$exec_prefix"
11567   exec_prefix="$acl_final_exec_prefix"
11568   eval x=\"$x\"
11569   exec_prefix="$acl_save_exec_prefix"
11570   prefix="$acl_save_prefix"
11571
11572                       if test "X$x" = "X-L$found_dir"; then
11573                         haveit=yes
11574                         break
11575                       fi
11576                     done
11577                     if test -z "$haveit"; then
11578                       LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11579                     fi
11580                     if test "$hardcode_minus_L" != no; then
11581                                                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11582                     else
11583                                                                                                                                                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11584                     fi
11585                   fi
11586                 fi
11587               fi
11588             else
11589               if test "X$found_a" != "X"; then
11590                                 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11591               else
11592                                                 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11593               fi
11594             fi
11595                         additional_includedir=
11596             case "$found_dir" in
11597               */lib | */lib/)
11598                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11599                 additional_includedir="$basedir/include"
11600                 ;;
11601             esac
11602             if test "X$additional_includedir" != "X"; then
11603                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
11604                 haveit=
11605                 if test "X$additional_includedir" = "X/usr/local/include"; then
11606                   if test -n "$GCC"; then
11607                     case $host_os in
11608                       linux*) haveit=yes;;
11609                     esac
11610                   fi
11611                 fi
11612                 if test -z "$haveit"; then
11613                   for x in $CPPFLAGS $INCIPT; do
11614
11615   acl_save_prefix="$prefix"
11616   prefix="$acl_final_prefix"
11617   acl_save_exec_prefix="$exec_prefix"
11618   exec_prefix="$acl_final_exec_prefix"
11619   eval x=\"$x\"
11620   exec_prefix="$acl_save_exec_prefix"
11621   prefix="$acl_save_prefix"
11622
11623                     if test "X$x" = "X-I$additional_includedir"; then
11624                       haveit=yes
11625                       break
11626                     fi
11627                   done
11628                   if test -z "$haveit"; then
11629                     if test -d "$additional_includedir"; then
11630                                             INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11631                     fi
11632                   fi
11633                 fi
11634               fi
11635             fi
11636                         if test -n "$found_la"; then
11637                                                         save_libdir="$libdir"
11638               case "$found_la" in
11639                 */* | *\\*) . "$found_la" ;;
11640                 *) . "./$found_la" ;;
11641               esac
11642               libdir="$save_libdir"
11643                             for dep in $dependency_libs; do
11644                 case "$dep" in
11645                   -L*)
11646                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11647                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
11648                       haveit=
11649                       if test "X$additional_libdir" = "X/usr/local/lib"; then
11650                         if test -n "$GCC"; then
11651                           case $host_os in
11652                             linux*) haveit=yes;;
11653                           esac
11654                         fi
11655                       fi
11656                       if test -z "$haveit"; then
11657                         haveit=
11658                         for x in $LDFLAGS $LIBIPT; do
11659
11660   acl_save_prefix="$prefix"
11661   prefix="$acl_final_prefix"
11662   acl_save_exec_prefix="$exec_prefix"
11663   exec_prefix="$acl_final_exec_prefix"
11664   eval x=\"$x\"
11665   exec_prefix="$acl_save_exec_prefix"
11666   prefix="$acl_save_prefix"
11667
11668                           if test "X$x" = "X-L$additional_libdir"; then
11669                             haveit=yes
11670                             break
11671                           fi
11672                         done
11673                         if test -z "$haveit"; then
11674                           if test -d "$additional_libdir"; then
11675                                                         LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11676                           fi
11677                         fi
11678                         haveit=
11679                         for x in $LDFLAGS $LTLIBIPT; do
11680
11681   acl_save_prefix="$prefix"
11682   prefix="$acl_final_prefix"
11683   acl_save_exec_prefix="$exec_prefix"
11684   exec_prefix="$acl_final_exec_prefix"
11685   eval x=\"$x\"
11686   exec_prefix="$acl_save_exec_prefix"
11687   prefix="$acl_save_prefix"
11688
11689                           if test "X$x" = "X-L$additional_libdir"; then
11690                             haveit=yes
11691                             break
11692                           fi
11693                         done
11694                         if test -z "$haveit"; then
11695                           if test -d "$additional_libdir"; then
11696                                                         LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11697                           fi
11698                         fi
11699                       fi
11700                     fi
11701                     ;;
11702                   -R*)
11703                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
11704                     if test "$enable_rpath" != no; then
11705                                                                   haveit=
11706                       for x in $rpathdirs; do
11707                         if test "X$x" = "X$dir"; then
11708                           haveit=yes
11709                           break
11710                         fi
11711                       done
11712                       if test -z "$haveit"; then
11713                         rpathdirs="$rpathdirs $dir"
11714                       fi
11715                                                                   haveit=
11716                       for x in $ltrpathdirs; do
11717                         if test "X$x" = "X$dir"; then
11718                           haveit=yes
11719                           break
11720                         fi
11721                       done
11722                       if test -z "$haveit"; then
11723                         ltrpathdirs="$ltrpathdirs $dir"
11724                       fi
11725                     fi
11726                     ;;
11727                   -l*)
11728                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11729                     ;;
11730                   *.la)
11731                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11732                     ;;
11733                   *)
11734                                         LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11735                     LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11736                     ;;
11737                 esac
11738               done
11739             fi
11740           else
11741                                                             LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11742             LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11743           fi
11744         fi
11745       fi
11746     done
11747   done
11748   if test "X$rpathdirs" != "X"; then
11749     if test -n "$hardcode_libdir_separator"; then
11750                         alldirs=
11751       for found_dir in $rpathdirs; do
11752         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11753       done
11754             acl_save_libdir="$libdir"
11755       libdir="$alldirs"
11756       eval flag=\"$hardcode_libdir_flag_spec\"
11757       libdir="$acl_save_libdir"
11758       LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11759     else
11760             for found_dir in $rpathdirs; do
11761         acl_save_libdir="$libdir"
11762         libdir="$found_dir"
11763         eval flag=\"$hardcode_libdir_flag_spec\"
11764         libdir="$acl_save_libdir"
11765         LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11766       done
11767     fi
11768   fi
11769   if test "X$ltrpathdirs" != "X"; then
11770             for found_dir in $ltrpathdirs; do
11771       LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11772     done
11773   fi
11774
11775
11776         ac_save_CPPFLAGS="$CPPFLAGS"
11777
11778   for element in $INCIPT; do
11779     haveit=
11780     for x in $CPPFLAGS; do
11781
11782   acl_save_prefix="$prefix"
11783   prefix="$acl_final_prefix"
11784   acl_save_exec_prefix="$exec_prefix"
11785   exec_prefix="$acl_final_exec_prefix"
11786   eval x=\"$x\"
11787   exec_prefix="$acl_save_exec_prefix"
11788   prefix="$acl_save_prefix"
11789
11790       if test "X$x" = "X$element"; then
11791         haveit=yes
11792         break
11793       fi
11794     done
11795     if test -z "$haveit"; then
11796       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11797     fi
11798   done
11799
11800
11801   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11802 $as_echo_n "checking for libipt... " >&6; }
11803 if ${ac_cv_libipt+:} false; then :
11804   $as_echo_n "(cached) " >&6
11805 else
11806
11807     ac_save_LIBS="$LIBS"
11808     LIBS="$LIBS $LIBIPT"
11809     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11810 /* end confdefs.h.  */
11811 #include "intel-pt.h"
11812 int
11813 main ()
11814 {
11815 pt_insn_alloc_decoder (0);
11816   ;
11817   return 0;
11818 }
11819 _ACEOF
11820 if ac_fn_c_try_link "$LINENO"; then :
11821   ac_cv_libipt=yes
11822 else
11823   ac_cv_libipt=no
11824 fi
11825 rm -f core conftest.err conftest.$ac_objext \
11826     conftest$ac_exeext conftest.$ac_ext
11827     LIBS="$ac_save_LIBS"
11828
11829 fi
11830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11831 $as_echo "$ac_cv_libipt" >&6; }
11832   if test "$ac_cv_libipt" = yes; then
11833     HAVE_LIBIPT=yes
11834
11835 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11836
11837     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11838 $as_echo_n "checking how to link with libipt... " >&6; }
11839     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11840 $as_echo "$LIBIPT" >&6; }
11841   else
11842     HAVE_LIBIPT=no
11843             CPPFLAGS="$ac_save_CPPFLAGS"
11844     LIBIPT=
11845     LTLIBIPT=
11846   fi
11847
11848
11849
11850
11851
11852
11853   if test "$HAVE_LIBIPT" != yes; then
11854     if test "$with_intel_pt" = yes; then
11855       as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
11856     else
11857       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11858 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11859     fi
11860   else
11861     save_LIBS=$LIBS
11862     LIBS="$LIBS $LIBIPT"
11863     for ac_func in pt_insn_event
11864 do :
11865   ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
11866 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
11867   cat >>confdefs.h <<_ACEOF
11868 #define HAVE_PT_INSN_EVENT 1
11869 _ACEOF
11870
11871 fi
11872 done
11873
11874     ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11875 "
11876 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
11877
11878 cat >>confdefs.h <<_ACEOF
11879 #define HAVE_STRUCT_PT_INSN_ENABLED 1
11880 _ACEOF
11881
11882
11883 fi
11884 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11885 "
11886 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
11887
11888 cat >>confdefs.h <<_ACEOF
11889 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
11890 _ACEOF
11891
11892
11893 fi
11894
11895     LIBS=$save_LIBS
11896   fi
11897 fi
11898
11899 # ------------------------- #
11900 # Checks for header files.  #
11901 # ------------------------- #
11902
11903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11904 $as_echo_n "checking for ANSI C header files... " >&6; }
11905 if ${ac_cv_header_stdc+:} false; then :
11906   $as_echo_n "(cached) " >&6
11907 else
11908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11909 /* end confdefs.h.  */
11910 #include <stdlib.h>
11911 #include <stdarg.h>
11912 #include <string.h>
11913 #include <float.h>
11914
11915 int
11916 main ()
11917 {
11918
11919   ;
11920   return 0;
11921 }
11922 _ACEOF
11923 if ac_fn_c_try_compile "$LINENO"; then :
11924   ac_cv_header_stdc=yes
11925 else
11926   ac_cv_header_stdc=no
11927 fi
11928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11929
11930 if test $ac_cv_header_stdc = yes; then
11931   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11933 /* end confdefs.h.  */
11934 #include <string.h>
11935
11936 _ACEOF
11937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11938   $EGREP "memchr" >/dev/null 2>&1; then :
11939
11940 else
11941   ac_cv_header_stdc=no
11942 fi
11943 rm -f conftest*
11944
11945 fi
11946
11947 if test $ac_cv_header_stdc = yes; then
11948   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11950 /* end confdefs.h.  */
11951 #include <stdlib.h>
11952
11953 _ACEOF
11954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11955   $EGREP "free" >/dev/null 2>&1; then :
11956
11957 else
11958   ac_cv_header_stdc=no
11959 fi
11960 rm -f conftest*
11961
11962 fi
11963
11964 if test $ac_cv_header_stdc = yes; then
11965   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11966   if test "$cross_compiling" = yes; then :
11967   :
11968 else
11969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11970 /* end confdefs.h.  */
11971 #include <ctype.h>
11972 #include <stdlib.h>
11973 #if ((' ' & 0x0FF) == 0x020)
11974 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11975 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11976 #else
11977 # define ISLOWER(c) \
11978                    (('a' <= (c) && (c) <= 'i') \
11979                      || ('j' <= (c) && (c) <= 'r') \
11980                      || ('s' <= (c) && (c) <= 'z'))
11981 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11982 #endif
11983
11984 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11985 int
11986 main ()
11987 {
11988   int i;
11989   for (i = 0; i < 256; i++)
11990     if (XOR (islower (i), ISLOWER (i))
11991         || toupper (i) != TOUPPER (i))
11992       return 2;
11993   return 0;
11994 }
11995 _ACEOF
11996 if ac_fn_c_try_run "$LINENO"; then :
11997
11998 else
11999   ac_cv_header_stdc=no
12000 fi
12001 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12002   conftest.$ac_objext conftest.beam conftest.$ac_ext
12003 fi
12004
12005 fi
12006 fi
12007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12008 $as_echo "$ac_cv_header_stdc" >&6; }
12009 if test $ac_cv_header_stdc = yes; then
12010
12011 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12012
12013 fi
12014
12015 # elf_hp.h is for HP/UX 64-bit shared library support.
12016 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12017                   thread_db.h linux/elf.h \
12018                   sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12019                   sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12020                   sys/reg.h sys/debugreg.h sys/select.h \
12021                   termios.h elf_hp.h \
12022                   dlfcn.h
12023 do :
12024   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12025 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12026 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12027   cat >>confdefs.h <<_ACEOF
12028 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12029 _ACEOF
12030
12031 fi
12032
12033 done
12034
12035 for ac_header in sys/user.h
12036 do :
12037   ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12038 # include <sys/param.h>
12039 #endif
12040
12041 "
12042 if test "x$ac_cv_header_sys_user_h" = xyes; then :
12043   cat >>confdefs.h <<_ACEOF
12044 #define HAVE_SYS_USER_H 1
12045 _ACEOF
12046
12047 fi
12048
12049 done
12050
12051
12052 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12053 do :
12054   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12055 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12056 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12057   cat >>confdefs.h <<_ACEOF
12058 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12059 _ACEOF
12060
12061 fi
12062
12063 done
12064
12065 for ac_header in term.h
12066 do :
12067   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12068 # include <curses.h>
12069 #endif
12070
12071 "
12072 if test "x$ac_cv_header_term_h" = xyes; then :
12073   cat >>confdefs.h <<_ACEOF
12074 #define HAVE_TERM_H 1
12075 _ACEOF
12076
12077 fi
12078
12079 done
12080
12081
12082 # ------------------------- #
12083 # Checks for declarations.  #
12084 # ------------------------- #
12085
12086
12087   # Check for presence and size of long long.
12088   ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12089 if test "x$ac_cv_type_long_long" = xyes; then :
12090
12091 cat >>confdefs.h <<_ACEOF
12092 #define HAVE_LONG_LONG 1
12093 _ACEOF
12094
12095 # The cast to long int works around a bug in the HP C Compiler
12096 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12097 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12098 # This bug is HP SR number 8606223364.
12099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12100 $as_echo_n "checking size of long long... " >&6; }
12101 if ${ac_cv_sizeof_long_long+:} false; then :
12102   $as_echo_n "(cached) " >&6
12103 else
12104   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
12105
12106 else
12107   if test "$ac_cv_type_long_long" = yes; then
12108      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12109 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12110 as_fn_error 77 "cannot compute sizeof (long long)
12111 See \`config.log' for more details" "$LINENO" 5; }
12112    else
12113      ac_cv_sizeof_long_long=0
12114    fi
12115 fi
12116
12117 fi
12118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12119 $as_echo "$ac_cv_sizeof_long_long" >&6; }
12120
12121
12122
12123 cat >>confdefs.h <<_ACEOF
12124 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12125 _ACEOF
12126
12127
12128 fi
12129
12130
12131   as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12132 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12133 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12134   ac_have_decl=1
12135 else
12136   ac_have_decl=0
12137 fi
12138
12139 cat >>confdefs.h <<_ACEOF
12140 #define HAVE_DECL_BASENAME $ac_have_decl
12141 _ACEOF
12142 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12143 if test "x$ac_cv_have_decl_ffs" = xyes; then :
12144   ac_have_decl=1
12145 else
12146   ac_have_decl=0
12147 fi
12148
12149 cat >>confdefs.h <<_ACEOF
12150 #define HAVE_DECL_FFS $ac_have_decl
12151 _ACEOF
12152 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12153 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12154   ac_have_decl=1
12155 else
12156   ac_have_decl=0
12157 fi
12158
12159 cat >>confdefs.h <<_ACEOF
12160 #define HAVE_DECL_ASPRINTF $ac_have_decl
12161 _ACEOF
12162 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12163 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12164   ac_have_decl=1
12165 else
12166   ac_have_decl=0
12167 fi
12168
12169 cat >>confdefs.h <<_ACEOF
12170 #define HAVE_DECL_VASPRINTF $ac_have_decl
12171 _ACEOF
12172 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12173 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12174   ac_have_decl=1
12175 else
12176   ac_have_decl=0
12177 fi
12178
12179 cat >>confdefs.h <<_ACEOF
12180 #define HAVE_DECL_SNPRINTF $ac_have_decl
12181 _ACEOF
12182 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12183 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12184   ac_have_decl=1
12185 else
12186   ac_have_decl=0
12187 fi
12188
12189 cat >>confdefs.h <<_ACEOF
12190 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12191 _ACEOF
12192
12193   ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12194 if test "x$ac_cv_have_decl_strtol" = xyes; then :
12195   ac_have_decl=1
12196 else
12197   ac_have_decl=0
12198 fi
12199
12200 cat >>confdefs.h <<_ACEOF
12201 #define HAVE_DECL_STRTOL $ac_have_decl
12202 _ACEOF
12203 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12204 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12205   ac_have_decl=1
12206 else
12207   ac_have_decl=0
12208 fi
12209
12210 cat >>confdefs.h <<_ACEOF
12211 #define HAVE_DECL_STRTOUL $ac_have_decl
12212 _ACEOF
12213 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12214 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12215   ac_have_decl=1
12216 else
12217   ac_have_decl=0
12218 fi
12219
12220 cat >>confdefs.h <<_ACEOF
12221 #define HAVE_DECL_STRTOLL $ac_have_decl
12222 _ACEOF
12223 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12224 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12225   ac_have_decl=1
12226 else
12227   ac_have_decl=0
12228 fi
12229
12230 cat >>confdefs.h <<_ACEOF
12231 #define HAVE_DECL_STRTOULL $ac_have_decl
12232 _ACEOF
12233
12234   ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12235 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12236   ac_have_decl=1
12237 else
12238   ac_have_decl=0
12239 fi
12240
12241 cat >>confdefs.h <<_ACEOF
12242 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12243 _ACEOF
12244
12245
12246
12247 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12248 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12249   ac_have_decl=1
12250 else
12251   ac_have_decl=0
12252 fi
12253
12254 cat >>confdefs.h <<_ACEOF
12255 #define HAVE_DECL_SNPRINTF $ac_have_decl
12256 _ACEOF
12257
12258
12259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12260 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12261 if ${am_cv_val_LC_MESSAGES+:} false; then :
12262   $as_echo_n "(cached) " >&6
12263 else
12264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12265 /* end confdefs.h.  */
12266 #include <locale.h>
12267 int
12268 main ()
12269 {
12270 return LC_MESSAGES
12271   ;
12272   return 0;
12273 }
12274 _ACEOF
12275 if ac_fn_c_try_link "$LINENO"; then :
12276   am_cv_val_LC_MESSAGES=yes
12277 else
12278   am_cv_val_LC_MESSAGES=no
12279 fi
12280 rm -f core conftest.err conftest.$ac_objext \
12281     conftest$ac_exeext conftest.$ac_ext
12282 fi
12283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12284 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12285   if test $am_cv_val_LC_MESSAGES = yes; then
12286
12287 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12288
12289   fi
12290
12291
12292 # ----------------------- #
12293 # Checks for structures.  #
12294 # ----------------------- #
12295
12296 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
12297 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
12298
12299 cat >>confdefs.h <<_ACEOF
12300 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
12301 _ACEOF
12302
12303
12304 fi
12305 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
12306 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
12307
12308 cat >>confdefs.h <<_ACEOF
12309 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12310 _ACEOF
12311
12312
12313 fi
12314
12315
12316 # ------------------ #
12317 # Checks for types.  #
12318 # ------------------ #
12319
12320 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12321 #include <sys/socket.h>
12322
12323 "
12324 if test "x$ac_cv_type_socklen_t" = xyes; then :
12325
12326 cat >>confdefs.h <<_ACEOF
12327 #define HAVE_SOCKLEN_T 1
12328 _ACEOF
12329
12330
12331 fi
12332
12333
12334 # ------------------------------------- #
12335 # Checks for compiler characteristics.  #
12336 # ------------------------------------- #
12337
12338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12339 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12340 if ${ac_cv_c_const+:} false; then :
12341   $as_echo_n "(cached) " >&6
12342 else
12343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12344 /* end confdefs.h.  */
12345
12346 int
12347 main ()
12348 {
12349
12350 #ifndef __cplusplus
12351   /* Ultrix mips cc rejects this sort of thing.  */
12352   typedef int charset[2];
12353   const charset cs = { 0, 0 };
12354   /* SunOS 4.1.1 cc rejects this.  */
12355   char const *const *pcpcc;
12356   char **ppc;
12357   /* NEC SVR4.0.2 mips cc rejects this.  */
12358   struct point {int x, y;};
12359   static struct point const zero = {0,0};
12360   /* AIX XL C 1.02.0.0 rejects this.
12361      It does not let you subtract one const X* pointer from another in
12362      an arm of an if-expression whose if-part is not a constant
12363      expression */
12364   const char *g = "string";
12365   pcpcc = &g + (g ? g-g : 0);
12366   /* HPUX 7.0 cc rejects these. */
12367   ++pcpcc;
12368   ppc = (char**) pcpcc;
12369   pcpcc = (char const *const *) ppc;
12370   { /* SCO 3.2v4 cc rejects this sort of thing.  */
12371     char tx;
12372     char *t = &tx;
12373     char const *s = 0 ? (char *) 0 : (char const *) 0;
12374
12375     *t++ = 0;
12376     if (s) return 0;
12377   }
12378   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12379     int x[] = {25, 17};
12380     const int *foo = &x[0];
12381     ++foo;
12382   }
12383   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12384     typedef const int *iptr;
12385     iptr p = 0;
12386     ++p;
12387   }
12388   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12389        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12390     struct s { int j; const int *ap[3]; } bx;
12391     struct s *b = &bx; b->j = 5;
12392   }
12393   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12394     const int foo = 10;
12395     if (!foo) return 0;
12396   }
12397   return !cs[0] && !zero.x;
12398 #endif
12399
12400   ;
12401   return 0;
12402 }
12403 _ACEOF
12404 if ac_fn_c_try_compile "$LINENO"; then :
12405   ac_cv_c_const=yes
12406 else
12407   ac_cv_c_const=no
12408 fi
12409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12410 fi
12411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12412 $as_echo "$ac_cv_c_const" >&6; }
12413 if test $ac_cv_c_const = no; then
12414
12415 $as_echo "#define const /**/" >>confdefs.h
12416
12417 fi
12418
12419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12420 $as_echo_n "checking for inline... " >&6; }
12421 if ${ac_cv_c_inline+:} false; then :
12422   $as_echo_n "(cached) " >&6
12423 else
12424   ac_cv_c_inline=no
12425 for ac_kw in inline __inline__ __inline; do
12426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12427 /* end confdefs.h.  */
12428 #ifndef __cplusplus
12429 typedef int foo_t;
12430 static $ac_kw foo_t static_foo () {return 0; }
12431 $ac_kw foo_t foo () {return 0; }
12432 #endif
12433
12434 _ACEOF
12435 if ac_fn_c_try_compile "$LINENO"; then :
12436   ac_cv_c_inline=$ac_kw
12437 fi
12438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12439   test "$ac_cv_c_inline" != no && break
12440 done
12441
12442 fi
12443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12444 $as_echo "$ac_cv_c_inline" >&6; }
12445
12446 case $ac_cv_c_inline in
12447   inline | yes) ;;
12448   *)
12449     case $ac_cv_c_inline in
12450       no) ac_val=;;
12451       *) ac_val=$ac_cv_c_inline;;
12452     esac
12453     cat >>confdefs.h <<_ACEOF
12454 #ifndef __cplusplus
12455 #define inline $ac_val
12456 #endif
12457 _ACEOF
12458     ;;
12459 esac
12460
12461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12462 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12463 if ${ac_cv_c_bigendian+:} false; then :
12464   $as_echo_n "(cached) " >&6
12465 else
12466   ac_cv_c_bigendian=unknown
12467     # See if we're dealing with a universal compiler.
12468     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12469 /* end confdefs.h.  */
12470 #ifndef __APPLE_CC__
12471                not a universal capable compiler
12472              #endif
12473              typedef int dummy;
12474
12475 _ACEOF
12476 if ac_fn_c_try_compile "$LINENO"; then :
12477
12478         # Check for potential -arch flags.  It is not universal unless
12479         # there are at least two -arch flags with different values.
12480         ac_arch=
12481         ac_prev=
12482         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12483          if test -n "$ac_prev"; then
12484            case $ac_word in
12485              i?86 | x86_64 | ppc | ppc64)
12486                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12487                  ac_arch=$ac_word
12488                else
12489                  ac_cv_c_bigendian=universal
12490                  break
12491                fi
12492                ;;
12493            esac
12494            ac_prev=
12495          elif test "x$ac_word" = "x-arch"; then
12496            ac_prev=arch
12497          fi
12498        done
12499 fi
12500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12501     if test $ac_cv_c_bigendian = unknown; then
12502       # See if sys/param.h defines the BYTE_ORDER macro.
12503       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12504 /* end confdefs.h.  */
12505 #include <sys/types.h>
12506              #include <sys/param.h>
12507
12508 int
12509 main ()
12510 {
12511 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12512                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12513                      && LITTLE_ENDIAN)
12514               bogus endian macros
12515              #endif
12516
12517   ;
12518   return 0;
12519 }
12520 _ACEOF
12521 if ac_fn_c_try_compile "$LINENO"; then :
12522   # It does; now see whether it defined to BIG_ENDIAN or not.
12523          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12524 /* end confdefs.h.  */
12525 #include <sys/types.h>
12526                 #include <sys/param.h>
12527
12528 int
12529 main ()
12530 {
12531 #if BYTE_ORDER != BIG_ENDIAN
12532                  not big endian
12533                 #endif
12534
12535   ;
12536   return 0;
12537 }
12538 _ACEOF
12539 if ac_fn_c_try_compile "$LINENO"; then :
12540   ac_cv_c_bigendian=yes
12541 else
12542   ac_cv_c_bigendian=no
12543 fi
12544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12545 fi
12546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12547     fi
12548     if test $ac_cv_c_bigendian = unknown; then
12549       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12550       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12551 /* end confdefs.h.  */
12552 #include <limits.h>
12553
12554 int
12555 main ()
12556 {
12557 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12558               bogus endian macros
12559              #endif
12560
12561   ;
12562   return 0;
12563 }
12564 _ACEOF
12565 if ac_fn_c_try_compile "$LINENO"; then :
12566   # It does; now see whether it defined to _BIG_ENDIAN or not.
12567          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12568 /* end confdefs.h.  */
12569 #include <limits.h>
12570
12571 int
12572 main ()
12573 {
12574 #ifndef _BIG_ENDIAN
12575                  not big endian
12576                 #endif
12577
12578   ;
12579   return 0;
12580 }
12581 _ACEOF
12582 if ac_fn_c_try_compile "$LINENO"; then :
12583   ac_cv_c_bigendian=yes
12584 else
12585   ac_cv_c_bigendian=no
12586 fi
12587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12588 fi
12589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12590     fi
12591     if test $ac_cv_c_bigendian = unknown; then
12592       # Compile a test program.
12593       if test "$cross_compiling" = yes; then :
12594   # Try to guess by grepping values from an object file.
12595          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12596 /* end confdefs.h.  */
12597 short int ascii_mm[] =
12598                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12599                 short int ascii_ii[] =
12600                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12601                 int use_ascii (int i) {
12602                   return ascii_mm[i] + ascii_ii[i];
12603                 }
12604                 short int ebcdic_ii[] =
12605                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12606                 short int ebcdic_mm[] =
12607                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12608                 int use_ebcdic (int i) {
12609                   return ebcdic_mm[i] + ebcdic_ii[i];
12610                 }
12611                 extern int foo;
12612
12613 int
12614 main ()
12615 {
12616 return use_ascii (foo) == use_ebcdic (foo);
12617   ;
12618   return 0;
12619 }
12620 _ACEOF
12621 if ac_fn_c_try_compile "$LINENO"; then :
12622   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12623               ac_cv_c_bigendian=yes
12624             fi
12625             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12626               if test "$ac_cv_c_bigendian" = unknown; then
12627                 ac_cv_c_bigendian=no
12628               else
12629                 # finding both strings is unlikely to happen, but who knows?
12630                 ac_cv_c_bigendian=unknown
12631               fi
12632             fi
12633 fi
12634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12635 else
12636   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12637 /* end confdefs.h.  */
12638 $ac_includes_default
12639 int
12640 main ()
12641 {
12642
12643              /* Are we little or big endian?  From Harbison&Steele.  */
12644              union
12645              {
12646                long int l;
12647                char c[sizeof (long int)];
12648              } u;
12649              u.l = 1;
12650              return u.c[sizeof (long int) - 1] == 1;
12651
12652   ;
12653   return 0;
12654 }
12655 _ACEOF
12656 if ac_fn_c_try_run "$LINENO"; then :
12657   ac_cv_c_bigendian=no
12658 else
12659   ac_cv_c_bigendian=yes
12660 fi
12661 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12662   conftest.$ac_objext conftest.beam conftest.$ac_ext
12663 fi
12664
12665     fi
12666 fi
12667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12668 $as_echo "$ac_cv_c_bigendian" >&6; }
12669  case $ac_cv_c_bigendian in #(
12670    yes)
12671      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12672 ;; #(
12673    no)
12674       ;; #(
12675    universal)
12676
12677 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12678
12679      ;; #(
12680    *)
12681      as_fn_error $? "unknown endianness
12682  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12683  esac
12684
12685
12686 # ------------------------------ #
12687 # Checks for library functions.  #
12688 # ------------------------------ #
12689
12690
12691
12692
12693   for ac_header in $ac_header_list
12694 do :
12695   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12696 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12697 "
12698 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12699   cat >>confdefs.h <<_ACEOF
12700 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12701 _ACEOF
12702
12703 fi
12704
12705 done
12706
12707
12708
12709
12710
12711
12712
12713
12714 for ac_func in getpagesize
12715 do :
12716   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12717 if test "x$ac_cv_func_getpagesize" = xyes; then :
12718   cat >>confdefs.h <<_ACEOF
12719 #define HAVE_GETPAGESIZE 1
12720 _ACEOF
12721
12722 fi
12723 done
12724
12725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12726 $as_echo_n "checking for working mmap... " >&6; }
12727 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
12728   $as_echo_n "(cached) " >&6
12729 else
12730   if test "$cross_compiling" = yes; then :
12731   ac_cv_func_mmap_fixed_mapped=no
12732 else
12733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12734 /* end confdefs.h.  */
12735 $ac_includes_default
12736 /* malloc might have been renamed as rpl_malloc. */
12737 #undef malloc
12738
12739 /* Thanks to Mike Haertel and Jim Avera for this test.
12740    Here is a matrix of mmap possibilities:
12741         mmap private not fixed
12742         mmap private fixed at somewhere currently unmapped
12743         mmap private fixed at somewhere already mapped
12744         mmap shared not fixed
12745         mmap shared fixed at somewhere currently unmapped
12746         mmap shared fixed at somewhere already mapped
12747    For private mappings, we should verify that changes cannot be read()
12748    back from the file, nor mmap's back from the file at a different
12749    address.  (There have been systems where private was not correctly
12750    implemented like the infamous i386 svr4.0, and systems where the
12751    VM page cache was not coherent with the file system buffer cache
12752    like early versions of FreeBSD and possibly contemporary NetBSD.)
12753    For shared mappings, we should conversely verify that changes get
12754    propagated back to all the places they're supposed to be.
12755
12756    Grep wants private fixed already mapped.
12757    The main things grep needs to know about mmap are:
12758    * does it exist and is it safe to write into the mmap'd area
12759    * how to use it (BSD variants)  */
12760
12761 #include <fcntl.h>
12762 #include <sys/mman.h>
12763
12764 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12765 char *malloc ();
12766 #endif
12767
12768 /* This mess was copied from the GNU getpagesize.h.  */
12769 #ifndef HAVE_GETPAGESIZE
12770 # ifdef _SC_PAGESIZE
12771 #  define getpagesize() sysconf(_SC_PAGESIZE)
12772 # else /* no _SC_PAGESIZE */
12773 #  ifdef HAVE_SYS_PARAM_H
12774 #   include <sys/param.h>
12775 #   ifdef EXEC_PAGESIZE
12776 #    define getpagesize() EXEC_PAGESIZE
12777 #   else /* no EXEC_PAGESIZE */
12778 #    ifdef NBPG
12779 #     define getpagesize() NBPG * CLSIZE
12780 #     ifndef CLSIZE
12781 #      define CLSIZE 1
12782 #     endif /* no CLSIZE */
12783 #    else /* no NBPG */
12784 #     ifdef NBPC
12785 #      define getpagesize() NBPC
12786 #     else /* no NBPC */
12787 #      ifdef PAGESIZE
12788 #       define getpagesize() PAGESIZE
12789 #      endif /* PAGESIZE */
12790 #     endif /* no NBPC */
12791 #    endif /* no NBPG */
12792 #   endif /* no EXEC_PAGESIZE */
12793 #  else /* no HAVE_SYS_PARAM_H */
12794 #   define getpagesize() 8192   /* punt totally */
12795 #  endif /* no HAVE_SYS_PARAM_H */
12796 # endif /* no _SC_PAGESIZE */
12797
12798 #endif /* no HAVE_GETPAGESIZE */
12799
12800 int
12801 main ()
12802 {
12803   char *data, *data2, *data3;
12804   const char *cdata2;
12805   int i, pagesize;
12806   int fd, fd2;
12807
12808   pagesize = getpagesize ();
12809
12810   /* First, make a file with some known garbage in it. */
12811   data = (char *) malloc (pagesize);
12812   if (!data)
12813     return 1;
12814   for (i = 0; i < pagesize; ++i)
12815     *(data + i) = rand ();
12816   umask (0);
12817   fd = creat ("conftest.mmap", 0600);
12818   if (fd < 0)
12819     return 2;
12820   if (write (fd, data, pagesize) != pagesize)
12821     return 3;
12822   close (fd);
12823
12824   /* Next, check that the tail of a page is zero-filled.  File must have
12825      non-zero length, otherwise we risk SIGBUS for entire page.  */
12826   fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12827   if (fd2 < 0)
12828     return 4;
12829   cdata2 = "";
12830   if (write (fd2, cdata2, 1) != 1)
12831     return 5;
12832   data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12833   if (data2 == MAP_FAILED)
12834     return 6;
12835   for (i = 0; i < pagesize; ++i)
12836     if (*(data2 + i))
12837       return 7;
12838   close (fd2);
12839   if (munmap (data2, pagesize))
12840     return 8;
12841
12842   /* Next, try to mmap the file at a fixed address which already has
12843      something else allocated at it.  If we can, also make sure that
12844      we see the same garbage.  */
12845   fd = open ("conftest.mmap", O_RDWR);
12846   if (fd < 0)
12847     return 9;
12848   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12849                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
12850     return 10;
12851   for (i = 0; i < pagesize; ++i)
12852     if (*(data + i) != *(data2 + i))
12853       return 11;
12854
12855   /* Finally, make sure that changes to the mapped area do not
12856      percolate back to the file as seen by read().  (This is a bug on
12857      some variants of i386 svr4.0.)  */
12858   for (i = 0; i < pagesize; ++i)
12859     *(data2 + i) = *(data2 + i) + 1;
12860   data3 = (char *) malloc (pagesize);
12861   if (!data3)
12862     return 12;
12863   if (read (fd, data3, pagesize) != pagesize)
12864     return 13;
12865   for (i = 0; i < pagesize; ++i)
12866     if (*(data + i) != *(data3 + i))
12867       return 14;
12868   close (fd);
12869   return 0;
12870 }
12871 _ACEOF
12872 if ac_fn_c_try_run "$LINENO"; then :
12873   ac_cv_func_mmap_fixed_mapped=yes
12874 else
12875   ac_cv_func_mmap_fixed_mapped=no
12876 fi
12877 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12878   conftest.$ac_objext conftest.beam conftest.$ac_ext
12879 fi
12880
12881 fi
12882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12883 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
12884 if test $ac_cv_func_mmap_fixed_mapped = yes; then
12885
12886 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
12887
12888 fi
12889 rm -f conftest.mmap conftest.txt
12890
12891 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12892 if test "x$ac_cv_type_pid_t" = xyes; then :
12893
12894 else
12895
12896 cat >>confdefs.h <<_ACEOF
12897 #define pid_t int
12898 _ACEOF
12899
12900 fi
12901
12902 for ac_header in vfork.h
12903 do :
12904   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12905 if test "x$ac_cv_header_vfork_h" = xyes; then :
12906   cat >>confdefs.h <<_ACEOF
12907 #define HAVE_VFORK_H 1
12908 _ACEOF
12909
12910 fi
12911
12912 done
12913
12914 for ac_func in fork vfork
12915 do :
12916   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12917 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12918 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12919   cat >>confdefs.h <<_ACEOF
12920 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12921 _ACEOF
12922
12923 fi
12924 done
12925
12926 if test "x$ac_cv_func_fork" = xyes; then
12927   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12928 $as_echo_n "checking for working fork... " >&6; }
12929 if ${ac_cv_func_fork_works+:} false; then :
12930   $as_echo_n "(cached) " >&6
12931 else
12932   if test "$cross_compiling" = yes; then :
12933   ac_cv_func_fork_works=cross
12934 else
12935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12936 /* end confdefs.h.  */
12937 $ac_includes_default
12938 int
12939 main ()
12940 {
12941
12942           /* By Ruediger Kuhlmann. */
12943           return fork () < 0;
12944
12945   ;
12946   return 0;
12947 }
12948 _ACEOF
12949 if ac_fn_c_try_run "$LINENO"; then :
12950   ac_cv_func_fork_works=yes
12951 else
12952   ac_cv_func_fork_works=no
12953 fi
12954 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12955   conftest.$ac_objext conftest.beam conftest.$ac_ext
12956 fi
12957
12958 fi
12959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12960 $as_echo "$ac_cv_func_fork_works" >&6; }
12961
12962 else
12963   ac_cv_func_fork_works=$ac_cv_func_fork
12964 fi
12965 if test "x$ac_cv_func_fork_works" = xcross; then
12966   case $host in
12967     *-*-amigaos* | *-*-msdosdjgpp*)
12968       # Override, as these systems have only a dummy fork() stub
12969       ac_cv_func_fork_works=no
12970       ;;
12971     *)
12972       ac_cv_func_fork_works=yes
12973       ;;
12974   esac
12975   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12976 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
12977 fi
12978 ac_cv_func_vfork_works=$ac_cv_func_vfork
12979 if test "x$ac_cv_func_vfork" = xyes; then
12980   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12981 $as_echo_n "checking for working vfork... " >&6; }
12982 if ${ac_cv_func_vfork_works+:} false; then :
12983   $as_echo_n "(cached) " >&6
12984 else
12985   if test "$cross_compiling" = yes; then :
12986   ac_cv_func_vfork_works=cross
12987 else
12988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12989 /* end confdefs.h.  */
12990 /* Thanks to Paul Eggert for this test.  */
12991 $ac_includes_default
12992 #include <sys/wait.h>
12993 #ifdef HAVE_VFORK_H
12994 # include <vfork.h>
12995 #endif
12996 /* On some sparc systems, changes by the child to local and incoming
12997    argument registers are propagated back to the parent.  The compiler
12998    is told about this with #include <vfork.h>, but some compilers
12999    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
13000    static variable whose address is put into a register that is
13001    clobbered by the vfork.  */
13002 static void
13003 #ifdef __cplusplus
13004 sparc_address_test (int arg)
13005 # else
13006 sparc_address_test (arg) int arg;
13007 #endif
13008 {
13009   static pid_t child;
13010   if (!child) {
13011     child = vfork ();
13012     if (child < 0) {
13013       perror ("vfork");
13014       _exit(2);
13015     }
13016     if (!child) {
13017       arg = getpid();
13018       write(-1, "", 0);
13019       _exit (arg);
13020     }
13021   }
13022 }
13023
13024 int
13025 main ()
13026 {
13027   pid_t parent = getpid ();
13028   pid_t child;
13029
13030   sparc_address_test (0);
13031
13032   child = vfork ();
13033
13034   if (child == 0) {
13035     /* Here is another test for sparc vfork register problems.  This
13036        test uses lots of local variables, at least as many local
13037        variables as main has allocated so far including compiler
13038        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
13039        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
13040        reuse the register of parent for one of the local variables,
13041        since it will think that parent can't possibly be used any more
13042        in this routine.  Assigning to the local variable will thus
13043        munge parent in the parent process.  */
13044     pid_t
13045       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13046       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13047     /* Convince the compiler that p..p7 are live; otherwise, it might
13048        use the same hardware register for all 8 local variables.  */
13049     if (p != p1 || p != p2 || p != p3 || p != p4
13050         || p != p5 || p != p6 || p != p7)
13051       _exit(1);
13052
13053     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13054        from child file descriptors.  If the child closes a descriptor
13055        before it execs or exits, this munges the parent's descriptor
13056        as well.  Test for this by closing stdout in the child.  */
13057     _exit(close(fileno(stdout)) != 0);
13058   } else {
13059     int status;
13060     struct stat st;
13061
13062     while (wait(&status) != child)
13063       ;
13064     return (
13065          /* Was there some problem with vforking?  */
13066          child < 0
13067
13068          /* Did the child fail?  (This shouldn't happen.)  */
13069          || status
13070
13071          /* Did the vfork/compiler bug occur?  */
13072          || parent != getpid()
13073
13074          /* Did the file descriptor bug occur?  */
13075          || fstat(fileno(stdout), &st) != 0
13076          );
13077   }
13078 }
13079 _ACEOF
13080 if ac_fn_c_try_run "$LINENO"; then :
13081   ac_cv_func_vfork_works=yes
13082 else
13083   ac_cv_func_vfork_works=no
13084 fi
13085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13086   conftest.$ac_objext conftest.beam conftest.$ac_ext
13087 fi
13088
13089 fi
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13091 $as_echo "$ac_cv_func_vfork_works" >&6; }
13092
13093 fi;
13094 if test "x$ac_cv_func_fork_works" = xcross; then
13095   ac_cv_func_vfork_works=$ac_cv_func_vfork
13096   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13097 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13098 fi
13099
13100 if test "x$ac_cv_func_vfork_works" = xyes; then
13101
13102 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13103
13104 else
13105
13106 $as_echo "#define vfork fork" >>confdefs.h
13107
13108 fi
13109 if test "x$ac_cv_func_fork_works" = xyes; then
13110
13111 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13112
13113 fi
13114
13115 for ac_func in getauxval getrusage getuid getgid \
13116                 pipe poll pread pread64 pwrite resize_term \
13117                 sbrk getpgid setpgid setpgrp setsid \
13118                 sigaction sigprocmask sigsetmask socketpair \
13119                 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
13120                 setrlimit getrlimit posix_madvise waitpid \
13121                 ptrace64 sigaltstack setns use_default_colors
13122 do :
13123   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13124 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13125 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13126   cat >>confdefs.h <<_ACEOF
13127 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13128 _ACEOF
13129
13130 fi
13131 done
13132
13133
13134   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13135 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13136 if ${am_cv_langinfo_codeset+:} false; then :
13137   $as_echo_n "(cached) " >&6
13138 else
13139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13140 /* end confdefs.h.  */
13141 #include <langinfo.h>
13142 int
13143 main ()
13144 {
13145 char* cs = nl_langinfo(CODESET);
13146   ;
13147   return 0;
13148 }
13149 _ACEOF
13150 if ac_fn_c_try_link "$LINENO"; then :
13151   am_cv_langinfo_codeset=yes
13152 else
13153   am_cv_langinfo_codeset=no
13154 fi
13155 rm -f core conftest.err conftest.$ac_objext \
13156     conftest$ac_exeext conftest.$ac_ext
13157
13158 fi
13159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13160 $as_echo "$am_cv_langinfo_codeset" >&6; }
13161   if test $am_cv_langinfo_codeset = yes; then
13162
13163 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13164
13165   fi
13166
13167 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13168 if test "x$ac_cv_type_size_t" = xyes; then :
13169
13170 else
13171
13172 cat >>confdefs.h <<_ACEOF
13173 #define size_t unsigned int
13174 _ACEOF
13175
13176 fi
13177
13178
13179   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13180 $as_echo_n "checking for ANSI C header files... " >&6; }
13181 if ${ac_cv_header_stdc+:} false; then :
13182   $as_echo_n "(cached) " >&6
13183 else
13184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13185 /* end confdefs.h.  */
13186 #include <stdlib.h>
13187 #include <stdarg.h>
13188 #include <string.h>
13189 #include <float.h>
13190
13191 int
13192 main ()
13193 {
13194
13195   ;
13196   return 0;
13197 }
13198 _ACEOF
13199 if ac_fn_c_try_compile "$LINENO"; then :
13200   ac_cv_header_stdc=yes
13201 else
13202   ac_cv_header_stdc=no
13203 fi
13204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13205
13206 if test $ac_cv_header_stdc = yes; then
13207   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13209 /* end confdefs.h.  */
13210 #include <string.h>
13211
13212 _ACEOF
13213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13214   $EGREP "memchr" >/dev/null 2>&1; then :
13215
13216 else
13217   ac_cv_header_stdc=no
13218 fi
13219 rm -f conftest*
13220
13221 fi
13222
13223 if test $ac_cv_header_stdc = yes; then
13224   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13226 /* end confdefs.h.  */
13227 #include <stdlib.h>
13228
13229 _ACEOF
13230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13231   $EGREP "free" >/dev/null 2>&1; then :
13232
13233 else
13234   ac_cv_header_stdc=no
13235 fi
13236 rm -f conftest*
13237
13238 fi
13239
13240 if test $ac_cv_header_stdc = yes; then
13241   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13242   if test "$cross_compiling" = yes; then :
13243   :
13244 else
13245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13246 /* end confdefs.h.  */
13247 #include <ctype.h>
13248 #include <stdlib.h>
13249 #if ((' ' & 0x0FF) == 0x020)
13250 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13251 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13252 #else
13253 # define ISLOWER(c) \
13254                    (('a' <= (c) && (c) <= 'i') \
13255                      || ('j' <= (c) && (c) <= 'r') \
13256                      || ('s' <= (c) && (c) <= 'z'))
13257 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13258 #endif
13259
13260 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13261 int
13262 main ()
13263 {
13264   int i;
13265   for (i = 0; i < 256; i++)
13266     if (XOR (islower (i), ISLOWER (i))
13267         || toupper (i) != TOUPPER (i))
13268       return 2;
13269   return 0;
13270 }
13271 _ACEOF
13272 if ac_fn_c_try_run "$LINENO"; then :
13273
13274 else
13275   ac_cv_header_stdc=no
13276 fi
13277 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13278   conftest.$ac_objext conftest.beam conftest.$ac_ext
13279 fi
13280
13281 fi
13282 fi
13283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13284 $as_echo "$ac_cv_header_stdc" >&6; }
13285 if test $ac_cv_header_stdc = yes; then
13286
13287 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13288
13289 fi
13290
13291   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13292 # for constant arguments.  Useless!
13293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13294 $as_echo_n "checking for working alloca.h... " >&6; }
13295 if ${ac_cv_working_alloca_h+:} false; then :
13296   $as_echo_n "(cached) " >&6
13297 else
13298   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13299 /* end confdefs.h.  */
13300 #include <alloca.h>
13301 int
13302 main ()
13303 {
13304 char *p = (char *) alloca (2 * sizeof (int));
13305                           if (p) return 0;
13306   ;
13307   return 0;
13308 }
13309 _ACEOF
13310 if ac_fn_c_try_link "$LINENO"; then :
13311   ac_cv_working_alloca_h=yes
13312 else
13313   ac_cv_working_alloca_h=no
13314 fi
13315 rm -f core conftest.err conftest.$ac_objext \
13316     conftest$ac_exeext conftest.$ac_ext
13317 fi
13318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13319 $as_echo "$ac_cv_working_alloca_h" >&6; }
13320 if test $ac_cv_working_alloca_h = yes; then
13321
13322 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13323
13324 fi
13325
13326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13327 $as_echo_n "checking for alloca... " >&6; }
13328 if ${ac_cv_func_alloca_works+:} false; then :
13329   $as_echo_n "(cached) " >&6
13330 else
13331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13332 /* end confdefs.h.  */
13333 #ifdef __GNUC__
13334 # define alloca __builtin_alloca
13335 #else
13336 # ifdef _MSC_VER
13337 #  include <malloc.h>
13338 #  define alloca _alloca
13339 # else
13340 #  ifdef HAVE_ALLOCA_H
13341 #   include <alloca.h>
13342 #  else
13343 #   ifdef _AIX
13344  #pragma alloca
13345 #   else
13346 #    ifndef alloca /* predefined by HP cc +Olibcalls */
13347 void *alloca (size_t);
13348 #    endif
13349 #   endif
13350 #  endif
13351 # endif
13352 #endif
13353
13354 int
13355 main ()
13356 {
13357 char *p = (char *) alloca (1);
13358                                     if (p) return 0;
13359   ;
13360   return 0;
13361 }
13362 _ACEOF
13363 if ac_fn_c_try_link "$LINENO"; then :
13364   ac_cv_func_alloca_works=yes
13365 else
13366   ac_cv_func_alloca_works=no
13367 fi
13368 rm -f core conftest.err conftest.$ac_objext \
13369     conftest$ac_exeext conftest.$ac_ext
13370 fi
13371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13372 $as_echo "$ac_cv_func_alloca_works" >&6; }
13373
13374 if test $ac_cv_func_alloca_works = yes; then
13375
13376 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13377
13378 else
13379   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13380 # that cause trouble.  Some versions do not even contain alloca or
13381 # contain a buggy version.  If you still want to use their alloca,
13382 # use ar to extract alloca.o from them instead of compiling alloca.c.
13383
13384 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13385
13386 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13387
13388
13389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13390 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13391 if ${ac_cv_os_cray+:} false; then :
13392   $as_echo_n "(cached) " >&6
13393 else
13394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13395 /* end confdefs.h.  */
13396 #if defined CRAY && ! defined CRAY2
13397 webecray
13398 #else
13399 wenotbecray
13400 #endif
13401
13402 _ACEOF
13403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13404   $EGREP "webecray" >/dev/null 2>&1; then :
13405   ac_cv_os_cray=yes
13406 else
13407   ac_cv_os_cray=no
13408 fi
13409 rm -f conftest*
13410
13411 fi
13412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13413 $as_echo "$ac_cv_os_cray" >&6; }
13414 if test $ac_cv_os_cray = yes; then
13415   for ac_func in _getb67 GETB67 getb67; do
13416     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13417 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13418 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13419
13420 cat >>confdefs.h <<_ACEOF
13421 #define CRAY_STACKSEG_END $ac_func
13422 _ACEOF
13423
13424     break
13425 fi
13426
13427   done
13428 fi
13429
13430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13431 $as_echo_n "checking stack direction for C alloca... " >&6; }
13432 if ${ac_cv_c_stack_direction+:} false; then :
13433   $as_echo_n "(cached) " >&6
13434 else
13435   if test "$cross_compiling" = yes; then :
13436   ac_cv_c_stack_direction=0
13437 else
13438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13439 /* end confdefs.h.  */
13440 $ac_includes_default
13441 int
13442 find_stack_direction (int *addr, int depth)
13443 {
13444   int dir, dummy = 0;
13445   if (! addr)
13446     addr = &dummy;
13447   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13448   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13449   return dir + dummy;
13450 }
13451
13452 int
13453 main (int argc, char **argv)
13454 {
13455   return find_stack_direction (0, argc + !argv + 20) < 0;
13456 }
13457 _ACEOF
13458 if ac_fn_c_try_run "$LINENO"; then :
13459   ac_cv_c_stack_direction=1
13460 else
13461   ac_cv_c_stack_direction=-1
13462 fi
13463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13464   conftest.$ac_objext conftest.beam conftest.$ac_ext
13465 fi
13466
13467 fi
13468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13469 $as_echo "$ac_cv_c_stack_direction" >&6; }
13470 cat >>confdefs.h <<_ACEOF
13471 #define STACK_DIRECTION $ac_cv_c_stack_direction
13472 _ACEOF
13473
13474
13475 fi
13476
13477
13478
13479   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13480 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13481 if ${am_cv_langinfo_codeset+:} false; then :
13482   $as_echo_n "(cached) " >&6
13483 else
13484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13485 /* end confdefs.h.  */
13486 #include <langinfo.h>
13487 int
13488 main ()
13489 {
13490 char* cs = nl_langinfo(CODESET);
13491   ;
13492   return 0;
13493 }
13494 _ACEOF
13495 if ac_fn_c_try_link "$LINENO"; then :
13496   am_cv_langinfo_codeset=yes
13497 else
13498   am_cv_langinfo_codeset=no
13499 fi
13500 rm -f core conftest.err conftest.$ac_objext \
13501     conftest$ac_exeext conftest.$ac_ext
13502
13503 fi
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13505 $as_echo "$am_cv_langinfo_codeset" >&6; }
13506   if test $am_cv_langinfo_codeset = yes; then
13507
13508 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13509
13510   fi
13511
13512
13513   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
13514 do :
13515   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13516 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13517 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13518   cat >>confdefs.h <<_ACEOF
13519 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13520 _ACEOF
13521
13522 fi
13523
13524 done
13525
13526
13527   for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
13528 do :
13529   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13530 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13531 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13532   cat >>confdefs.h <<_ACEOF
13533 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13534 _ACEOF
13535
13536 fi
13537 done
13538
13539
13540   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13541 if test "x$ac_cv_have_decl_strerror" = xyes; then :
13542   ac_have_decl=1
13543 else
13544   ac_have_decl=0
13545 fi
13546
13547 cat >>confdefs.h <<_ACEOF
13548 #define HAVE_DECL_STRERROR $ac_have_decl
13549 _ACEOF
13550 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13551 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13552   ac_have_decl=1
13553 else
13554   ac_have_decl=0
13555 fi
13556
13557 cat >>confdefs.h <<_ACEOF
13558 #define HAVE_DECL_STRSTR $ac_have_decl
13559 _ACEOF
13560
13561
13562     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13563 $as_echo_n "checking for sigsetjmp... " >&6; }
13564 if ${gdb_cv_func_sigsetjmp+:} false; then :
13565   $as_echo_n "(cached) " >&6
13566 else
13567   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13568 /* end confdefs.h.  */
13569
13570 #include <setjmp.h>
13571
13572 int
13573 main ()
13574 {
13575 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13576   ;
13577   return 0;
13578 }
13579 _ACEOF
13580 if ac_fn_c_try_compile "$LINENO"; then :
13581   gdb_cv_func_sigsetjmp=yes
13582 else
13583   gdb_cv_func_sigsetjmp=no
13584 fi
13585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13586 fi
13587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13588 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13589 if test $gdb_cv_func_sigsetjmp = yes; then
13590
13591 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13592
13593 fi
13594
13595
13596 # Check the return and argument types of ptrace.
13597
13598
13599 for ac_header in sys/ptrace.h ptrace.h
13600 do :
13601   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13602 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13603 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13604   cat >>confdefs.h <<_ACEOF
13605 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13606 _ACEOF
13607
13608 fi
13609
13610 done
13611
13612
13613 gdb_ptrace_headers='
13614 #include <sys/types.h>
13615 #if HAVE_SYS_PTRACE_H
13616 # include <sys/ptrace.h>
13617 #endif
13618 #if HAVE_UNISTD_H
13619 # include <unistd.h>
13620 #endif
13621 '
13622 # There is no point in checking if we don't have a prototype.
13623 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
13624 "
13625 if test "x$ac_cv_have_decl_ptrace" = xyes; then :
13626   ac_have_decl=1
13627 else
13628   ac_have_decl=0
13629 fi
13630
13631 cat >>confdefs.h <<_ACEOF
13632 #define HAVE_DECL_PTRACE $ac_have_decl
13633 _ACEOF
13634 if test $ac_have_decl = 1; then :
13635
13636 else
13637
13638   : ${gdb_cv_func_ptrace_ret='int'}
13639   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13640
13641 fi
13642
13643 # Check return type.  Varargs (used on GNU/Linux) conflict with the
13644 # empty argument list, so check for that explicitly.
13645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13646 $as_echo_n "checking return type of ptrace... " >&6; }
13647 if ${gdb_cv_func_ptrace_ret+:} false; then :
13648   $as_echo_n "(cached) " >&6
13649 else
13650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13651 /* end confdefs.h.  */
13652 $gdb_ptrace_headers
13653 int
13654 main ()
13655 {
13656 extern long ptrace (enum __ptrace_request, ...);
13657   ;
13658   return 0;
13659 }
13660 _ACEOF
13661 if ac_fn_c_try_compile "$LINENO"; then :
13662   gdb_cv_func_ptrace_ret='long'
13663 else
13664   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13665 /* end confdefs.h.  */
13666 $gdb_ptrace_headers
13667 int
13668 main ()
13669 {
13670 extern int ptrace ();
13671   ;
13672   return 0;
13673 }
13674 _ACEOF
13675 if ac_fn_c_try_compile "$LINENO"; then :
13676   gdb_cv_func_ptrace_ret='int'
13677 else
13678   gdb_cv_func_ptrace_ret='long'
13679 fi
13680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13681 fi
13682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13683 fi
13684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13685 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13686
13687 cat >>confdefs.h <<_ACEOF
13688 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13689 _ACEOF
13690
13691 # Check argument types.
13692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13693 $as_echo_n "checking types of arguments for ptrace... " >&6; }
13694 if ${gdb_cv_func_ptrace_args+:} false; then :
13695   $as_echo_n "(cached) " >&6
13696 else
13697
13698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13699 /* end confdefs.h.  */
13700 $gdb_ptrace_headers
13701 int
13702 main ()
13703 {
13704 extern long ptrace (enum __ptrace_request, ...);
13705   ;
13706   return 0;
13707 }
13708 _ACEOF
13709 if ac_fn_c_try_compile "$LINENO"; then :
13710   gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
13711 else
13712
13713 for gdb_arg1 in 'int' 'long'; do
13714  for gdb_arg2 in 'pid_t' 'int' 'long'; do
13715   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13716    for gdb_arg4 in 'int' 'long' 'void *'; do
13717      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13718 /* end confdefs.h.  */
13719 $gdb_ptrace_headers
13720 int
13721 main ()
13722 {
13723
13724 extern $gdb_cv_func_ptrace_ret
13725   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13726
13727   ;
13728   return 0;
13729 }
13730 _ACEOF
13731 if ac_fn_c_try_compile "$LINENO"; then :
13732   gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13733     break 4;
13734 fi
13735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13736     for gdb_arg5 in 'int *' 'int' 'long'; do
13737      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13738 /* end confdefs.h.  */
13739 $gdb_ptrace_headers
13740 int
13741 main ()
13742 {
13743
13744 extern $gdb_cv_func_ptrace_ret
13745   ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13746
13747   ;
13748   return 0;
13749 }
13750 _ACEOF
13751 if ac_fn_c_try_compile "$LINENO"; then :
13752
13753 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13754     break 5;
13755 fi
13756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13757     done
13758    done
13759   done
13760  done
13761 done
13762 # Provide a safe default value.
13763 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13764
13765 fi
13766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13767 fi
13768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13769 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
13770 ac_save_IFS=$IFS; IFS=','
13771 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13772 IFS=$ac_save_IFS
13773 shift
13774
13775 cat >>confdefs.h <<_ACEOF
13776 #define PTRACE_TYPE_ARG1 $1
13777 _ACEOF
13778
13779
13780 cat >>confdefs.h <<_ACEOF
13781 #define PTRACE_TYPE_ARG3 $3
13782 _ACEOF
13783
13784
13785 cat >>confdefs.h <<_ACEOF
13786 #define PTRACE_TYPE_ARG4 $4
13787 _ACEOF
13788
13789 if test -n "$5"; then
13790
13791 cat >>confdefs.h <<_ACEOF
13792 #define PTRACE_TYPE_ARG5 $5
13793 _ACEOF
13794
13795 fi
13796
13797
13798 if test "$cross_compiling" = no; then
13799   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13800 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13801 if ${ac_cv_func_setpgrp_void+:} false; then :
13802   $as_echo_n "(cached) " >&6
13803 else
13804   if test "$cross_compiling" = yes; then :
13805   as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
13806 else
13807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13808 /* end confdefs.h.  */
13809 $ac_includes_default
13810 int
13811 main ()
13812 {
13813 /* If this system has a BSD-style setpgrp which takes arguments,
13814   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13815   exit successfully. */
13816   return setpgrp (1,1) != -1;
13817   ;
13818   return 0;
13819 }
13820 _ACEOF
13821 if ac_fn_c_try_run "$LINENO"; then :
13822   ac_cv_func_setpgrp_void=no
13823 else
13824   ac_cv_func_setpgrp_void=yes
13825 fi
13826 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13827   conftest.$ac_objext conftest.beam conftest.$ac_ext
13828 fi
13829
13830 fi
13831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13832 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
13833 if test $ac_cv_func_setpgrp_void = yes; then
13834
13835 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
13836
13837 fi
13838
13839 else
13840   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13841 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13842 if ${ac_cv_func_setpgrp_void+:} false; then :
13843   $as_echo_n "(cached) " >&6
13844 else
13845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13846 /* end confdefs.h.  */
13847
13848 #include <unistd.h>
13849
13850 int
13851 main ()
13852 {
13853
13854   if (setpgrp(1,1) == -1)
13855     exit (0);
13856   else
13857     exit (1);
13858
13859   ;
13860   return 0;
13861 }
13862 _ACEOF
13863 if ac_fn_c_try_compile "$LINENO"; then :
13864   ac_cv_func_setpgrp_void=no
13865 else
13866   ac_cv_func_setpgrp_void=yes
13867 fi
13868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13869 fi
13870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13871 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
13872 if test $ac_cv_func_setpgrp_void = yes; then
13873   $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
13874
13875 fi
13876 fi
13877
13878 # Assume we'll default to using the included libiberty regex.
13879 gdb_use_included_regex=yes
13880
13881 # However, if the system regex is GNU regex, then default to *not*
13882 # using the included regex.
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13884 $as_echo_n "checking for GNU regex... " >&6; }
13885 if ${gdb_cv_have_gnu_regex+:} false; then :
13886   $as_echo_n "(cached) " >&6
13887 else
13888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13889 /* end confdefs.h.  */
13890 #include <gnu-versions.h>
13891 int
13892 main ()
13893 {
13894 #define REGEX_INTERFACE_VERSION 1
13895 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13896 # error "Version mismatch"
13897 #endif
13898   ;
13899   return 0;
13900 }
13901 _ACEOF
13902 if ac_fn_c_try_compile "$LINENO"; then :
13903   gdb_cv_have_gnu_regex=yes
13904 else
13905   gdb_cv_have_gnu_regex=no
13906 fi
13907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13908 fi
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13910 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
13911 if test $gdb_cv_have_gnu_regex = yes; then
13912   gdb_use_included_regex=no
13913 fi
13914
13915
13916 # Check whether --with-included-regex was given.
13917 if test "${with_included_regex+set}" = set; then :
13918   withval=$with_included_regex; gdb_with_regex=$withval
13919 else
13920   gdb_with_regex=$gdb_use_included_regex
13921 fi
13922
13923 if test "$gdb_with_regex" = yes; then
13924
13925 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13926
13927 fi
13928
13929 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13930 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13931 #include <sys/proc.h>
13932
13933 "
13934 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
13935
13936 cat >>confdefs.h <<_ACEOF
13937 #define HAVE_STRUCT_THREAD_TD_PCB 1
13938 _ACEOF
13939
13940
13941 fi
13942
13943
13944 # See if <sys/lwp.h> defines `struct lwp`.
13945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13946 $as_echo_n "checking for struct lwp... " >&6; }
13947 if ${gdb_cv_struct_lwp+:} false; then :
13948   $as_echo_n "(cached) " >&6
13949 else
13950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13951 /* end confdefs.h.  */
13952 #include <sys/param.h>
13953 #define _KMEMUSER
13954 #include <sys/lwp.h>
13955 int
13956 main ()
13957 {
13958 struct lwp l;
13959   ;
13960   return 0;
13961 }
13962 _ACEOF
13963 if ac_fn_c_try_compile "$LINENO"; then :
13964   gdb_cv_struct_lwp=yes
13965 else
13966   gdb_cv_struct_lwp=no
13967 fi
13968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13969 fi
13970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13971 $as_echo "$gdb_cv_struct_lwp" >&6; }
13972 if test $gdb_cv_struct_lwp = yes; then
13973
13974 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
13975
13976 fi
13977
13978 # See if <machine/reg.h> degines `struct reg'.
13979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13980 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13981 if ${gdb_cv_struct_reg+:} false; then :
13982   $as_echo_n "(cached) " >&6
13983 else
13984   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13985 /* end confdefs.h.  */
13986 #include <sys/types.h>
13987 #include <machine/reg.h>
13988 int
13989 main ()
13990 {
13991 struct reg r;
13992   ;
13993   return 0;
13994 }
13995 _ACEOF
13996 if ac_fn_c_try_compile "$LINENO"; then :
13997   gdb_cv_struct_reg=yes
13998 else
13999   gdb_cv_struct_reg=no
14000 fi
14001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14002 fi
14003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14004 $as_echo "$gdb_cv_struct_reg" >&6; }
14005 if test $gdb_cv_struct_reg = yes; then
14006
14007 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
14008
14009 fi
14010
14011 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14012 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
14013 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14014 #include <machine/reg.h>
14015 "
14016 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
14017
14018 cat >>confdefs.h <<_ACEOF
14019 #define HAVE_STRUCT_REG_R_FS 1
14020 _ACEOF
14021
14022
14023 fi
14024 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14025 #include <machine/reg.h>
14026 "
14027 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
14028
14029 cat >>confdefs.h <<_ACEOF
14030 #define HAVE_STRUCT_REG_R_GS 1
14031 _ACEOF
14032
14033
14034 fi
14035
14036
14037 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14038 # Older amd64 Linux's don't have the fs_base and gs_base members of
14039 # `struct user_regs_struct'.
14040 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>
14041 #include <sys/user.h>
14042 "
14043 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
14044
14045 cat >>confdefs.h <<_ACEOF
14046 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14047 _ACEOF
14048
14049
14050 fi
14051 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>
14052 #include <sys/user.h>
14053 "
14054 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
14055
14056 cat >>confdefs.h <<_ACEOF
14057 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14058 _ACEOF
14059
14060
14061 fi
14062
14063
14064 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
14065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14066 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
14067 if ${gdb_cv_have_ptrace_getregs+:} false; then :
14068   $as_echo_n "(cached) " >&6
14069 else
14070   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14071 /* end confdefs.h.  */
14072 #include <sys/ptrace.h>
14073 int
14074 main ()
14075 {
14076 PTRACE_GETREGS;
14077   ;
14078   return 0;
14079 }
14080 _ACEOF
14081 if ac_fn_c_try_compile "$LINENO"; then :
14082   gdb_cv_have_ptrace_getregs=yes
14083 else
14084   gdb_cv_have_ptrace_getregs=no
14085 fi
14086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14087 fi
14088
14089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14090 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
14091 if test $gdb_cv_have_ptrace_getregs = yes; then
14092
14093 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
14094
14095 fi
14096
14097 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
14098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14099 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14100 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
14101   $as_echo_n "(cached) " >&6
14102 else
14103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14104 /* end confdefs.h.  */
14105 #include <sys/ptrace.h>
14106 int
14107 main ()
14108 {
14109 PTRACE_GETFPXREGS;
14110   ;
14111   return 0;
14112 }
14113 _ACEOF
14114 if ac_fn_c_try_compile "$LINENO"; then :
14115   gdb_cv_have_ptrace_getfpxregs=yes
14116 else
14117   gdb_cv_have_ptrace_getfpxregs=no
14118 fi
14119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14120 fi
14121
14122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14123 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
14124 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
14125
14126 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
14127
14128 fi
14129
14130 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
14131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14132 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
14133 if ${gdb_cv_have_pt_getdbregs+:} false; then :
14134   $as_echo_n "(cached) " >&6
14135 else
14136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14137 /* end confdefs.h.  */
14138 #include <sys/types.h>
14139 #include <sys/ptrace.h>
14140 int
14141 main ()
14142 {
14143 PT_GETDBREGS;
14144   ;
14145   return 0;
14146 }
14147 _ACEOF
14148 if ac_fn_c_try_compile "$LINENO"; then :
14149   gdb_cv_have_pt_getdbregs=yes
14150 else
14151   gdb_cv_have_pt_getdbregs=no
14152 fi
14153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14154 fi
14155
14156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14157 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
14158 if test $gdb_cv_have_pt_getdbregs = yes; then
14159
14160 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
14161
14162 fi
14163
14164 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
14165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14166 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
14167 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
14168   $as_echo_n "(cached) " >&6
14169 else
14170   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14171 /* end confdefs.h.  */
14172 #include <sys/types.h>
14173 #include <sys/ptrace.h>
14174 int
14175 main ()
14176 {
14177 PT_GETXMMREGS;
14178   ;
14179   return 0;
14180 }
14181 _ACEOF
14182 if ac_fn_c_try_compile "$LINENO"; then :
14183   gdb_cv_have_pt_getxmmregs=yes
14184 else
14185   gdb_cv_have_pt_getxmmregs=no
14186 fi
14187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14188 fi
14189
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14191 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
14192 if test $gdb_cv_have_pt_getxmmregs = yes; then
14193
14194 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
14195
14196 fi
14197
14198 # See if <sys/ptrace.h> supports LWP names on FreeBSD
14199 # Older FreeBSD versions don't have the pl_tdname member of
14200 # `struct ptrace_lwpinfo'.
14201 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14202 "
14203 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
14204
14205 cat >>confdefs.h <<_ACEOF
14206 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14207 _ACEOF
14208
14209
14210 fi
14211
14212
14213 # See if <sys/ptrace.h> supports syscall fields on FreeBSD.  The
14214 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14215 # FreeBSD 10.3.
14216 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>
14217 "
14218 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
14219
14220 cat >>confdefs.h <<_ACEOF
14221 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14222 _ACEOF
14223
14224
14225 fi
14226
14227
14228 if test "$ac_cv_header_sys_procfs_h" = yes; then
14229   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14230 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14231  if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14232   $as_echo_n "(cached) " >&6
14233 else
14234   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14235 /* end confdefs.h.  */
14236
14237 #define _SYSCALL32
14238 /* Needed for new procfs interface on sparc-solaris.  */
14239 #define _STRUCTURED_PROC 1
14240 #include <sys/procfs.h>
14241 int
14242 main ()
14243 {
14244 gregset_t avar
14245   ;
14246   return 0;
14247 }
14248 _ACEOF
14249 if ac_fn_c_try_compile "$LINENO"; then :
14250   bfd_cv_have_sys_procfs_type_gregset_t=yes
14251 else
14252   bfd_cv_have_sys_procfs_type_gregset_t=no
14253
14254 fi
14255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14256 fi
14257
14258  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14259
14260 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14261
14262  fi
14263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14264 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14265
14266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14267 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14268  if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14269   $as_echo_n "(cached) " >&6
14270 else
14271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14272 /* end confdefs.h.  */
14273
14274 #define _SYSCALL32
14275 /* Needed for new procfs interface on sparc-solaris.  */
14276 #define _STRUCTURED_PROC 1
14277 #include <sys/procfs.h>
14278 int
14279 main ()
14280 {
14281 fpregset_t avar
14282   ;
14283   return 0;
14284 }
14285 _ACEOF
14286 if ac_fn_c_try_compile "$LINENO"; then :
14287   bfd_cv_have_sys_procfs_type_fpregset_t=yes
14288 else
14289   bfd_cv_have_sys_procfs_type_fpregset_t=no
14290
14291 fi
14292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14293 fi
14294
14295  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14296
14297 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14298
14299  fi
14300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14301 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14302
14303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14304 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14305  if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14306   $as_echo_n "(cached) " >&6
14307 else
14308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14309 /* end confdefs.h.  */
14310
14311 #define _SYSCALL32
14312 /* Needed for new procfs interface on sparc-solaris.  */
14313 #define _STRUCTURED_PROC 1
14314 #include <sys/procfs.h>
14315 int
14316 main ()
14317 {
14318 prgregset_t avar
14319   ;
14320   return 0;
14321 }
14322 _ACEOF
14323 if ac_fn_c_try_compile "$LINENO"; then :
14324   bfd_cv_have_sys_procfs_type_prgregset_t=yes
14325 else
14326   bfd_cv_have_sys_procfs_type_prgregset_t=no
14327
14328 fi
14329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14330 fi
14331
14332  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14333
14334 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14335
14336  fi
14337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14338 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14339
14340   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14341 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14342  if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
14343   $as_echo_n "(cached) " >&6
14344 else
14345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14346 /* end confdefs.h.  */
14347
14348 #define _SYSCALL32
14349 /* Needed for new procfs interface on sparc-solaris.  */
14350 #define _STRUCTURED_PROC 1
14351 #include <sys/procfs.h>
14352 int
14353 main ()
14354 {
14355 prfpregset_t avar
14356   ;
14357   return 0;
14358 }
14359 _ACEOF
14360 if ac_fn_c_try_compile "$LINENO"; then :
14361   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14362 else
14363   bfd_cv_have_sys_procfs_type_prfpregset_t=no
14364
14365 fi
14366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14367 fi
14368
14369  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14370
14371 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14372
14373  fi
14374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14375 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14376
14377   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14378 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14379  if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14380   $as_echo_n "(cached) " >&6
14381 else
14382   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14383 /* end confdefs.h.  */
14384
14385 #define _SYSCALL32
14386 /* Needed for new procfs interface on sparc-solaris.  */
14387 #define _STRUCTURED_PROC 1
14388 #include <sys/procfs.h>
14389 int
14390 main ()
14391 {
14392 prgregset32_t avar
14393   ;
14394   return 0;
14395 }
14396 _ACEOF
14397 if ac_fn_c_try_compile "$LINENO"; then :
14398   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14399 else
14400   bfd_cv_have_sys_procfs_type_prgregset32_t=no
14401
14402 fi
14403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14404 fi
14405
14406  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14407
14408 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14409
14410  fi
14411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14412 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14413
14414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14415 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14416  if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
14417   $as_echo_n "(cached) " >&6
14418 else
14419   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14420 /* end confdefs.h.  */
14421
14422 #define _SYSCALL32
14423 /* Needed for new procfs interface on sparc-solaris.  */
14424 #define _STRUCTURED_PROC 1
14425 #include <sys/procfs.h>
14426 int
14427 main ()
14428 {
14429 lwpid_t avar
14430   ;
14431   return 0;
14432 }
14433 _ACEOF
14434 if ac_fn_c_try_compile "$LINENO"; then :
14435   bfd_cv_have_sys_procfs_type_lwpid_t=yes
14436 else
14437   bfd_cv_have_sys_procfs_type_lwpid_t=no
14438
14439 fi
14440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14441 fi
14442
14443  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14444
14445 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14446
14447  fi
14448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14449 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14450
14451   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14452 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14453  if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
14454   $as_echo_n "(cached) " >&6
14455 else
14456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14457 /* end confdefs.h.  */
14458
14459 #define _SYSCALL32
14460 /* Needed for new procfs interface on sparc-solaris.  */
14461 #define _STRUCTURED_PROC 1
14462 #include <sys/procfs.h>
14463 int
14464 main ()
14465 {
14466 psaddr_t avar
14467   ;
14468   return 0;
14469 }
14470 _ACEOF
14471 if ac_fn_c_try_compile "$LINENO"; then :
14472   bfd_cv_have_sys_procfs_type_psaddr_t=yes
14473 else
14474   bfd_cv_have_sys_procfs_type_psaddr_t=no
14475
14476 fi
14477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14478 fi
14479
14480  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14481
14482 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14483
14484  fi
14485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14486 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14487
14488   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14489 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14490  if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14491   $as_echo_n "(cached) " >&6
14492 else
14493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14494 /* end confdefs.h.  */
14495
14496 #define _SYSCALL32
14497 /* Needed for new procfs interface on sparc-solaris.  */
14498 #define _STRUCTURED_PROC 1
14499 #include <sys/procfs.h>
14500 int
14501 main ()
14502 {
14503 elf_fpregset_t avar
14504   ;
14505   return 0;
14506 }
14507 _ACEOF
14508 if ac_fn_c_try_compile "$LINENO"; then :
14509   bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14510 else
14511   bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14512
14513 fi
14514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14515 fi
14516
14517  if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14518
14519 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14520
14521  fi
14522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14523 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14524
14525 fi
14526
14527 # Check if the compiler supports the `long long' type.
14528
14529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14530 $as_echo_n "checking for long long support in compiler... " >&6; }
14531 if ${gdb_cv_c_long_long+:} false; then :
14532   $as_echo_n "(cached) " >&6
14533 else
14534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14535 /* end confdefs.h.  */
14536 extern long long foo;
14537 int
14538 main ()
14539 {
14540 switch (foo & 2) { case 0: return 1; }
14541   ;
14542   return 0;
14543 }
14544 _ACEOF
14545 if ac_fn_c_try_compile "$LINENO"; then :
14546   gdb_cv_c_long_long=yes
14547 else
14548   gdb_cv_c_long_long=no
14549 fi
14550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14551 fi
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14553 $as_echo "$gdb_cv_c_long_long" >&6; }
14554 if test $gdb_cv_c_long_long != yes; then
14555   # libdecnumber requires long long.
14556   as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
14557 fi
14558
14559 # Check if the compiler and runtime support printing long longs.
14560
14561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14562 $as_echo_n "checking for long long support in printf... " >&6; }
14563 if ${gdb_cv_printf_has_long_long+:} false; then :
14564   $as_echo_n "(cached) " >&6
14565 else
14566   if test "$cross_compiling" = yes; then :
14567   gdb_cv_printf_has_long_long=no
14568 else
14569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14570 /* end confdefs.h.  */
14571 $ac_includes_default
14572 int
14573 main ()
14574 {
14575 char buf[32];
14576   long long l = 0;
14577   l = (l << 16) + 0x0123;
14578   l = (l << 16) + 0x4567;
14579   l = (l << 16) + 0x89ab;
14580   l = (l << 16) + 0xcdef;
14581   sprintf (buf, "0x%016llx", l);
14582   return (strcmp ("0x0123456789abcdef", buf));
14583   ;
14584   return 0;
14585 }
14586 _ACEOF
14587 if ac_fn_c_try_run "$LINENO"; then :
14588   gdb_cv_printf_has_long_long=yes
14589 else
14590   gdb_cv_printf_has_long_long=no
14591 fi
14592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14593   conftest.$ac_objext conftest.beam conftest.$ac_ext
14594 fi
14595
14596 fi
14597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14598 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
14599 if test $gdb_cv_printf_has_long_long = yes; then
14600
14601 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
14602
14603 fi
14604
14605 # Check if the compiler and runtime support printing decfloats.
14606
14607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14608 $as_echo_n "checking for decfloat support in printf... " >&6; }
14609 if ${gdb_cv_printf_has_decfloat+:} false; then :
14610   $as_echo_n "(cached) " >&6
14611 else
14612   if test "$cross_compiling" = yes; then :
14613   gdb_cv_printf_has_decfloat=no
14614 else
14615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616 /* end confdefs.h.  */
14617 $ac_includes_default
14618 int
14619 main ()
14620 {
14621 char buf[64];
14622   _Decimal32 d32 = 1.2345df;
14623   _Decimal64 d64 = 1.2345dd;
14624   _Decimal128 d128 = 1.2345dl;
14625   sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14626   return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14627   ;
14628   return 0;
14629 }
14630 _ACEOF
14631 if ac_fn_c_try_run "$LINENO"; then :
14632   gdb_cv_printf_has_decfloat=yes
14633 else
14634   gdb_cv_printf_has_decfloat=no
14635 fi
14636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14637   conftest.$ac_objext conftest.beam conftest.$ac_ext
14638 fi
14639
14640 fi
14641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14642 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
14643 if test $gdb_cv_printf_has_decfloat = yes; then
14644
14645 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
14646
14647 fi
14648
14649 # Check if the compiler supports the `long double' type.  We can't use
14650 # AC_C_LONG_DOUBLE because that one does additional checks on the
14651 # constants defined in <float.h> that fail on some systems,
14652 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
14653
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14655 $as_echo_n "checking for long double support in compiler... " >&6; }
14656 if ${gdb_cv_c_long_double+:} false; then :
14657   $as_echo_n "(cached) " >&6
14658 else
14659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14660 /* end confdefs.h.  */
14661 long double foo;
14662 _ACEOF
14663 if ac_fn_c_try_compile "$LINENO"; then :
14664   gdb_cv_c_long_double=yes
14665 else
14666   gdb_cv_c_long_double=no
14667 fi
14668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14669 fi
14670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14671 $as_echo "$gdb_cv_c_long_double" >&6; }
14672 if test $gdb_cv_c_long_double = yes; then
14673
14674 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
14675
14676 fi
14677
14678 # Check if the compiler and runtime support printing long doubles.
14679
14680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14681 $as_echo_n "checking for long double support in printf... " >&6; }
14682 if ${gdb_cv_printf_has_long_double+:} false; then :
14683   $as_echo_n "(cached) " >&6
14684 else
14685   if test "$cross_compiling" = yes; then :
14686   gdb_cv_printf_has_long_double=no
14687 else
14688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14689 /* end confdefs.h.  */
14690 $ac_includes_default
14691 int
14692 main ()
14693 {
14694 char buf[16];
14695   long double f = 3.141592653;
14696   sprintf (buf, "%Lg", f);
14697   return (strncmp ("3.14159", buf, 7));
14698   ;
14699   return 0;
14700 }
14701 _ACEOF
14702 if ac_fn_c_try_run "$LINENO"; then :
14703   gdb_cv_printf_has_long_double=yes
14704 else
14705   gdb_cv_printf_has_long_double=no
14706 fi
14707 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14708   conftest.$ac_objext conftest.beam conftest.$ac_ext
14709 fi
14710
14711 fi
14712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14713 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
14714 if test $gdb_cv_printf_has_long_double = yes; then
14715
14716 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
14717
14718 fi
14719
14720 # Check if the compiler and runtime support scanning long doubles.
14721
14722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14723 $as_echo_n "checking for long double support in scanf... " >&6; }
14724 if ${gdb_cv_scanf_has_long_double+:} false; then :
14725   $as_echo_n "(cached) " >&6
14726 else
14727   if test "$cross_compiling" = yes; then :
14728   gdb_cv_scanf_has_long_double=no
14729 else
14730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14731 /* end confdefs.h.  */
14732 #include <stdio.h>
14733 int
14734 main ()
14735 {
14736 char *buf = "3.141592653";
14737   long double f = 0;
14738   sscanf (buf, "%Lg", &f);
14739   return !(f > 3.14159 && f < 3.14160);
14740   ;
14741   return 0;
14742 }
14743 _ACEOF
14744 if ac_fn_c_try_run "$LINENO"; then :
14745   gdb_cv_scanf_has_long_double=yes
14746 else
14747   gdb_cv_scanf_has_long_double=no
14748 fi
14749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14750   conftest.$ac_objext conftest.beam conftest.$ac_ext
14751 fi
14752
14753 fi
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14755 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
14756 if test $gdb_cv_scanf_has_long_double = yes; then
14757
14758 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
14759
14760 fi
14761
14762 case ${host_os} in
14763 aix*)
14764   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14765 $as_echo_n "checking for -bbigtoc option... " >&6; }
14766 if ${gdb_cv_bigtoc+:} false; then :
14767   $as_echo_n "(cached) " >&6
14768 else
14769
14770     SAVE_LDFLAGS=$LDFLAGS
14771
14772     case $GCC in
14773     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14774     *) gdb_cv_bigtoc=-bbigtoc ;;
14775     esac
14776
14777     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
14778     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14779 /* end confdefs.h.  */
14780
14781 int
14782 main ()
14783 {
14784 int i;
14785   ;
14786   return 0;
14787 }
14788 _ACEOF
14789 if ac_fn_c_try_link "$LINENO"; then :
14790
14791 else
14792   gdb_cv_bigtoc=
14793 fi
14794 rm -f core conftest.err conftest.$ac_objext \
14795     conftest$ac_exeext conftest.$ac_ext
14796     LDFLAGS="${SAVE_LDFLAGS}"
14797
14798 fi
14799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14800 $as_echo "$gdb_cv_bigtoc" >&6; }
14801   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14802   ;;
14803 esac
14804
14805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
14806 $as_echo_n "checking for the dynamic export flag... " >&6; }
14807 dynamic_list=false
14808 if test "${gdb_native}" = yes; then
14809    # The dynamically loaded libthread_db needs access to symbols in the gdb
14810    # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
14811    # may not be supported there.
14812    old_LDFLAGS="$LDFLAGS"
14813    # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14814    RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14815    LDFLAGS="$LDFLAGS $RDYNAMIC"
14816    if test "${have_libpython}" = no; then
14817      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14818 /* end confdefs.h.  */
14819
14820 int
14821 main ()
14822 {
14823
14824   ;
14825   return 0;
14826 }
14827 _ACEOF
14828 if ac_fn_c_try_link "$LINENO"; then :
14829   dynamic_list=true
14830 fi
14831 rm -f core conftest.err conftest.$ac_objext \
14832     conftest$ac_exeext conftest.$ac_ext
14833    else
14834      # Workaround http://bugs.python.org/issue4434 where static
14835      # libpythonX.Y.a would get its symbols required for
14836      # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14837      # Problem does not happen for the recommended libpythonX.Y.so linkage.
14838
14839      # Note the workaround for Python
14840      # http://bugs.python.org/issue10112 earlier has removed
14841      # -export-dynamic from PYTHON_LIBS.  That's exactly what we want
14842      # here too, as otherwise it'd make this -Wl,--dynamic-list test
14843      # always pass.
14844      old_CFLAGS="$CFLAGS"
14845      CFLAGS="$CFLAGS $PYTHON_CFLAGS"
14846      old_LIBS="$LIBS"
14847      LIBS="$LIBS $PYTHON_LIBS"
14848      old_CPPFLAGS="$CPPFLAGS"
14849      CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
14850      if test "$cross_compiling" = yes; then :
14851   true
14852 else
14853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14854 /* end confdefs.h.  */
14855 #include "Python.h"
14856 int
14857 main ()
14858 {
14859 int err;
14860           Py_Initialize ();
14861           err = PyRun_SimpleString ("import itertools\n");
14862           Py_Finalize ();
14863           return err == 0 ? 0 : 1;
14864   ;
14865   return 0;
14866 }
14867 _ACEOF
14868 if ac_fn_c_try_run "$LINENO"; then :
14869   dynamic_list=true
14870 fi
14871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14872   conftest.$ac_objext conftest.beam conftest.$ac_ext
14873 fi
14874
14875      LIBS="$old_LIBS"
14876      CFLAGS="$old_CFLAGS"
14877      CPPFLAGS="$old_CPPFLAGS"
14878    fi
14879    LDFLAGS="$old_LDFLAGS"
14880 fi
14881 if $dynamic_list; then
14882   found="-Wl,--dynamic-list"
14883   RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
14884 else
14885   found="-rdynamic"
14886   RDYNAMIC="-rdynamic"
14887 fi
14888
14889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
14890 $as_echo "$found" >&6; }
14891
14892
14893 if test ${build} = ${host} -a ${host} = ${target} ; then
14894    case ${host_os} in
14895    aix*)
14896       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14897 $as_echo_n "checking for AiX thread debugging library... " >&6; }
14898       if ${gdb_cv_have_aix_thread_debug+:} false; then :
14899   $as_echo_n "(cached) " >&6
14900 else
14901   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14902 /* end confdefs.h.  */
14903 #include <sys/pthdebug.h>
14904 int
14905 main ()
14906 {
14907 #ifndef PTHDB_VERSION_3
14908                                     #error
14909                                     #endif
14910   ;
14911   return 0;
14912 }
14913 _ACEOF
14914 if ac_fn_c_try_compile "$LINENO"; then :
14915   gdb_cv_have_aix_thread_debug=yes
14916 else
14917   gdb_cv_have_aix_thread_debug=no
14918 fi
14919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14920 fi
14921
14922       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14923 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
14924       if test $gdb_cv_have_aix_thread_debug = yes; then
14925          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
14926          CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
14927          LIBS="$LIBS -lpthdebug"
14928
14929          # Older versions of AIX do not provide the declaration for
14930          # the getthrds function (it appears that it was introduced
14931          # with AIX 6.x).
14932          ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14933 "
14934 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
14935   ac_have_decl=1
14936 else
14937   ac_have_decl=0
14938 fi
14939
14940 cat >>confdefs.h <<_ACEOF
14941 #define HAVE_DECL_GETTHRDS $ac_have_decl
14942 _ACEOF
14943
14944       fi
14945       ;;
14946    esac
14947
14948 fi
14949
14950 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
14951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14952 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14953 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
14954   $as_echo_n "(cached) " >&6
14955 else
14956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14957 /* end confdefs.h.  */
14958 #include <thread_db.h>
14959 int
14960 main ()
14961 {
14962 int i = TD_NOTALLOC;
14963   ;
14964   return 0;
14965 }
14966 _ACEOF
14967 if ac_fn_c_try_compile "$LINENO"; then :
14968   gdb_cv_thread_db_h_has_td_notalloc=yes
14969 else
14970   gdb_cv_thread_db_h_has_td_notalloc=no
14971
14972 fi
14973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14974
14975 fi
14976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14977 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14979 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14980 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
14981   $as_echo_n "(cached) " >&6
14982 else
14983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14984 /* end confdefs.h.  */
14985 #include <thread_db.h>
14986 int
14987 main ()
14988 {
14989 int i = TD_VERSION;
14990   ;
14991   return 0;
14992 }
14993 _ACEOF
14994 if ac_fn_c_try_compile "$LINENO"; then :
14995   gdb_cv_thread_db_h_has_td_version=yes
14996 else
14997   gdb_cv_thread_db_h_has_td_version=no
14998
14999 fi
15000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15001
15002 fi
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15004 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15006 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
15007 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
15008   $as_echo_n "(cached) " >&6
15009 else
15010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15011 /* end confdefs.h.  */
15012 #include <thread_db.h>
15013 int
15014 main ()
15015 {
15016 int i = TD_NOTLS;
15017   ;
15018   return 0;
15019 }
15020 _ACEOF
15021 if ac_fn_c_try_compile "$LINENO"; then :
15022   gdb_cv_thread_db_h_has_td_notls=yes
15023 else
15024   gdb_cv_thread_db_h_has_td_notls=no
15025
15026 fi
15027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15028
15029 fi
15030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15031 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
15032 fi
15033 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
15034
15035 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
15036
15037 fi
15038 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15039
15040 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
15041
15042 fi
15043 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15044
15045 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
15046
15047 fi
15048
15049 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15050 "
15051 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
15052   ac_have_decl=1
15053 else
15054   ac_have_decl=0
15055 fi
15056
15057 cat >>confdefs.h <<_ACEOF
15058 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
15059 _ACEOF
15060
15061
15062 if test "$cross_compiling" = yes; then :
15063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15064 /* end confdefs.h.  */
15065 #include <sys/personality.h>
15066 int
15067 main ()
15068 {
15069
15070 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
15071 #       define ADDR_NO_RANDOMIZE 0x0040000
15072 #      endif
15073        /* Test the flag could be set and stays set.  */
15074        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15075        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15076            return 1
15077   ;
15078   return 0;
15079 }
15080 _ACEOF
15081 if ac_fn_c_try_link "$LINENO"; then :
15082   have_personality=true
15083 else
15084   have_personality=false
15085 fi
15086 rm -f core conftest.err conftest.$ac_objext \
15087     conftest$ac_exeext conftest.$ac_ext
15088 else
15089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15090 /* end confdefs.h.  */
15091 #include <sys/personality.h>
15092 int
15093 main ()
15094 {
15095
15096 #      if !HAVE_DECL_ADDR_NO_RANDOMIZE
15097 #       define ADDR_NO_RANDOMIZE 0x0040000
15098 #      endif
15099        /* Test the flag could be set and stays set.  */
15100        personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15101        if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15102            return 1
15103   ;
15104   return 0;
15105 }
15106 _ACEOF
15107 if ac_fn_c_try_run "$LINENO"; then :
15108   have_personality=true
15109 else
15110   have_personality=false
15111 fi
15112 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15113   conftest.$ac_objext conftest.beam conftest.$ac_ext
15114 fi
15115
15116 if $have_personality
15117 then
15118
15119 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
15120
15121 fi
15122
15123 case $host_os in
15124   go32* | *djgpp*)
15125     gdbinit=gdb.ini
15126     ;;
15127   *)
15128     gdbinit=.gdbinit
15129     ;;
15130 esac
15131
15132 cat >>confdefs.h <<_ACEOF
15133 #define GDBINIT "$gdbinit"
15134 _ACEOF
15135
15136
15137
15138 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15139 # except that the argument to --with-sysroot is optional.
15140 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15141 if test "x$with_sysroot" = xyes; then
15142   with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15143 fi
15144
15145 # Check whether --with-sysroot was given.
15146 if test "${with_sysroot+set}" = set; then :
15147   withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15148 else
15149   TARGET_SYSTEM_ROOT=
15150 fi
15151
15152
15153   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15154   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15155   ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15156   ac_define_dir=`eval echo $ac_define_dir`
15157
15158 cat >>confdefs.h <<_ACEOF
15159 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
15160 _ACEOF
15161
15162
15163
15164
15165   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15166      if test "x$prefix" = xNONE; then
15167         test_prefix=/usr/local
15168      else
15169         test_prefix=$prefix
15170      fi
15171   else
15172      test_prefix=$exec_prefix
15173   fi
15174   value=0
15175   case ${ac_define_dir} in
15176      "${test_prefix}"|"${test_prefix}/"*|\
15177         '${exec_prefix}'|'${exec_prefix}/'*)
15178      value=1
15179      ;;
15180   esac
15181
15182 cat >>confdefs.h <<_ACEOF
15183 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15184 _ACEOF
15185
15186
15187
15188
15189
15190 # Check whether --with-system-gdbinit was given.
15191 if test "${with_system_gdbinit+set}" = set; then :
15192   withval=$with_system_gdbinit;
15193     SYSTEM_GDBINIT=$withval
15194 else
15195   SYSTEM_GDBINIT=
15196 fi
15197
15198
15199   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15200   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15201   ac_define_dir=`eval echo $SYSTEM_GDBINIT`
15202   ac_define_dir=`eval echo $ac_define_dir`
15203
15204 cat >>confdefs.h <<_ACEOF
15205 #define SYSTEM_GDBINIT "$ac_define_dir"
15206 _ACEOF
15207
15208
15209
15210
15211   if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15212      if test "x$prefix" = xNONE; then
15213         test_prefix=/usr/local
15214      else
15215         test_prefix=$prefix
15216      fi
15217   else
15218      test_prefix=$exec_prefix
15219   fi
15220   value=0
15221   case ${ac_define_dir} in
15222      "${test_prefix}"|"${test_prefix}/"*|\
15223         '${exec_prefix}'|'${exec_prefix}/'*)
15224      value=1
15225      ;;
15226   esac
15227
15228 cat >>confdefs.h <<_ACEOF
15229 #define SYSTEM_GDBINIT_RELOCATABLE $value
15230 _ACEOF
15231
15232
15233
15234
15235
15236 # Check whether --enable-werror was given.
15237 if test "${enable_werror+set}" = set; then :
15238   enableval=$enable_werror; case "${enableval}" in
15239      yes | y) ERROR_ON_WARNING="yes" ;;
15240      no | n)  ERROR_ON_WARNING="no" ;;
15241      *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
15242    esac
15243 fi
15244
15245
15246 # Enable -Werror by default when using gcc.  Turn it off for releases.
15247 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
15248     ERROR_ON_WARNING=yes
15249 fi
15250
15251 WERROR_CFLAGS=""
15252 if test "${ERROR_ON_WARNING}" = yes ; then
15253     WERROR_CFLAGS="-Werror"
15254 fi
15255
15256 # The options we'll try to enable.
15257 build_warnings="-Wall -Wpointer-arith \
15258 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
15259 -Wno-switch -Wno-char-subscripts \
15260 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
15261 -Wno-sign-compare -Wno-error=maybe-uninitialized \
15262 -Wno-mismatched-tags \
15263 -Wno-error=deprecated-register \
15264 -Wsuggest-override \
15265 -Wimplicit-fallthrough=3 \
15266 -Wduplicated-cond \
15267 -Wshadow=local \
15268 -Wdeprecated-copy \
15269 -Wdeprecated-copy-dtor \
15270 -Wredundant-move"
15271
15272 case "${host}" in
15273   *-*-mingw32*)
15274     # Enable -Wno-format by default when using gcc on mingw since many
15275     # GCC versions complain about %I64.
15276     build_warnings="$build_warnings -Wno-format" ;;
15277   *-*-solaris*)
15278     # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15279     # doesn't understand.
15280     build_warnings="$build_warnings -Wno-unknown-pragmas"
15281     # Solaris 11 <unistd.h> marks vfork deprecated.
15282     build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
15283   *)
15284     # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15285     # but there's a special case for this below.
15286     build_warnings="$build_warnings -Wformat-nonliteral" ;;
15287 esac
15288
15289 # Check whether --enable-build-warnings was given.
15290 if test "${enable_build_warnings+set}" = set; then :
15291   enableval=$enable_build_warnings; case "${enableval}" in
15292   yes)  ;;
15293   no)   build_warnings="-w";;
15294   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15295         build_warnings="${build_warnings} ${t}";;
15296   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15297         build_warnings="${t} ${build_warnings}";;
15298   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15299 esac
15300 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15301   echo "Setting compiler warning flags = $build_warnings" 6>&1
15302 fi
15303 fi
15304 # Check whether --enable-gdb-build-warnings was given.
15305 if test "${enable_gdb_build_warnings+set}" = set; then :
15306   enableval=$enable_gdb_build_warnings; case "${enableval}" in
15307   yes)  ;;
15308   no)   build_warnings="-w";;
15309   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15310         build_warnings="${build_warnings} ${t}";;
15311   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
15312         build_warnings="${t} ${build_warnings}";;
15313   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15314 esac
15315 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15316   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15317 fi
15318 fi
15319
15320 # The set of warnings supported by a C++ compiler is not the same as
15321 # of the C compiler.
15322 ac_ext=cpp
15323 ac_cpp='$CXXCPP $CPPFLAGS'
15324 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15325 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15326 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15327
15328
15329 WARN_CFLAGS=""
15330 if test "x${build_warnings}" != x -a "x$GCC" = xyes
15331 then
15332     { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15333 $as_echo_n "checking compiler warning flags... " >&6; }
15334     # Separate out the -Werror flag as some files just cannot be
15335     # compiled with it enabled.
15336     for w in ${build_warnings}; do
15337         # GCC does not complain about -Wno-unknown-warning.  Invert
15338         # and test -Wunknown-warning instead.
15339         case $w in
15340         -Wno-*)
15341                 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15342         -Wformat-nonliteral)
15343                 # gcc requires -Wformat before -Wformat-nonliteral
15344                 # will work, so stick them together.
15345                 w="-Wformat $w"
15346                 wtest="$w"
15347                 ;;
15348         *)
15349                 wtest=$w ;;
15350         esac
15351
15352         case $w in
15353         -Werr*) WERROR_CFLAGS=-Werror ;;
15354         *)
15355             # Check whether GCC accepts it.
15356             saved_CFLAGS="$CFLAGS"
15357             CFLAGS="$CFLAGS -Werror $wtest"
15358             saved_CXXFLAGS="$CXXFLAGS"
15359             CXXFLAGS="$CXXFLAGS -Werror $wtest"
15360             if test "x$w" = "x-Wunused-variable"; then
15361               # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15362               # fixed in GCC 4.9.  This test is derived from the gdb
15363               # source code that triggered this bug in GCC.
15364               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365 /* end confdefs.h.  */
15366 struct scoped_restore_base {};
15367                  struct scoped_restore_tmpl : public scoped_restore_base {
15368                    ~scoped_restore_tmpl() {}
15369                  };
15370 int
15371 main ()
15372 {
15373 const scoped_restore_base &b = scoped_restore_tmpl();
15374   ;
15375   return 0;
15376 }
15377 _ACEOF
15378 if ac_fn_cxx_try_compile "$LINENO"; then :
15379   WARN_CFLAGS="${WARN_CFLAGS} $w"
15380 fi
15381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15382             else
15383               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15384 /* end confdefs.h.  */
15385
15386 int
15387 main ()
15388 {
15389
15390   ;
15391   return 0;
15392 }
15393 _ACEOF
15394 if ac_fn_cxx_try_compile "$LINENO"; then :
15395   WARN_CFLAGS="${WARN_CFLAGS} $w"
15396 fi
15397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15398             fi
15399             CFLAGS="$saved_CFLAGS"
15400             CXXFLAGS="$saved_CXXFLAGS"
15401         esac
15402     done
15403     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15404 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
15405 fi
15406
15407
15408
15409 ac_ext=c
15410 ac_cpp='$CPP $CPPFLAGS'
15411 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15412 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15413 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15414
15415
15416
15417 # Check whether --enable-ubsan was given.
15418 if test "${enable_ubsan+set}" = set; then :
15419   enableval=$enable_ubsan;
15420 else
15421   enable_ubsan=no
15422 fi
15423
15424 if test "x$enable_ubsan" = xauto; then
15425   if $development; then
15426     enable_ubsan=yes
15427   fi
15428 fi
15429 ac_ext=cpp
15430 ac_cpp='$CXXCPP $CPPFLAGS'
15431 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15432 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15433 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15434
15435 if test "x$enable_ubsan" = xyes; then
15436   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15437 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15438   saved_CXXFLAGS="$CXXFLAGS"
15439   CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15440         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15441 /* end confdefs.h.  */
15442
15443 int
15444 main ()
15445 {
15446
15447   ;
15448   return 0;
15449 }
15450 _ACEOF
15451 if ac_fn_cxx_try_link "$LINENO"; then :
15452   enable_ubsan=yes
15453 else
15454   enable_ubsan=no
15455 fi
15456 rm -f core conftest.err conftest.$ac_objext \
15457     conftest$ac_exeext conftest.$ac_ext
15458   CXXFLAGS="$saved_CXXFLAGS"
15459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15460 $as_echo "$enable_ubsan" >&6; }
15461   if test "x$enable_ubsan" = xyes; then
15462     WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15463     CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15464   fi
15465 fi
15466 ac_ext=c
15467 ac_cpp='$CPP $CPPFLAGS'
15468 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15469 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15470 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15471
15472
15473
15474 # In the Cygwin environment, we need some additional flags.
15475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15476 $as_echo_n "checking for cygwin... " >&6; }
15477 if ${gdb_cv_os_cygwin+:} false; then :
15478   $as_echo_n "(cached) " >&6
15479 else
15480   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15481 /* end confdefs.h.  */
15482
15483 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
15484 lose
15485 #endif
15486 _ACEOF
15487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15488   $EGREP "^lose$" >/dev/null 2>&1; then :
15489   gdb_cv_os_cygwin=yes
15490 else
15491   gdb_cv_os_cygwin=no
15492 fi
15493 rm -f conftest*
15494
15495 fi
15496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15497 $as_echo "$gdb_cv_os_cygwin" >&6; }
15498
15499
15500 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
15501 case ${host} in
15502   *go32* ) SER_HARDWIRE=ser-go32.o ;;
15503   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
15504   *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
15505   *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
15506 esac
15507
15508
15509 # libreadline needs libuser32.a in a cygwin environment
15510 WIN32LIBS=
15511 if test x$gdb_cv_os_cygwin = xyes; then
15512     WIN32LIBS="-luser32"
15513     case "${target}" in
15514         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15515         ;;
15516     esac
15517 fi
15518
15519 # The ser-tcp.c module requires sockets.
15520 case ${host} in
15521   *mingw32*)
15522
15523 $as_echo "#define USE_WIN32API 1" >>confdefs.h
15524
15525     WIN32LIBS="$WIN32LIBS -lws2_32"
15526     ;;
15527 esac
15528
15529
15530 # Add ELF support to GDB, but only if BFD includes ELF support.
15531
15532   OLD_CFLAGS=$CFLAGS
15533   OLD_LDFLAGS=$LDFLAGS
15534   OLD_LIBS=$LIBS
15535   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15536   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15537   # always want our bfd.
15538   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15539   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15540   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15541   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15542   LIBS="-lbfd -liberty -lz $intl $LIBS"
15543   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15544 $as_echo_n "checking for ELF support in BFD... " >&6; }
15545 if ${gdb_cv_var_elf+:} false; then :
15546   $as_echo_n "(cached) " >&6
15547 else
15548   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15549 /* end confdefs.h.  */
15550 #include <stdlib.h>
15551   #include "bfd.h"
15552   #include "elf-bfd.h"
15553
15554 int
15555 main ()
15556 {
15557 return bfd_get_elf_phdr_upper_bound (NULL);
15558   ;
15559   return 0;
15560 }
15561 _ACEOF
15562 if ac_fn_c_try_link "$LINENO"; then :
15563   gdb_cv_var_elf=yes
15564 else
15565   gdb_cv_var_elf=no
15566 fi
15567 rm -f core conftest.err conftest.$ac_objext \
15568     conftest$ac_exeext conftest.$ac_ext
15569 fi
15570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15571 $as_echo "$gdb_cv_var_elf" >&6; }
15572   CFLAGS=$OLD_CFLAGS
15573   LDFLAGS=$OLD_LDFLAGS
15574   LIBS=$OLD_LIBS
15575 if test $gdb_cv_var_elf = yes; then
15576   CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
15577
15578 $as_echo "#define HAVE_ELF 1" >>confdefs.h
15579
15580   # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15581   if test "$plugins" = "yes"; then
15582     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15583 $as_echo_n "checking for library containing dlopen... " >&6; }
15584 if ${ac_cv_search_dlopen+:} false; then :
15585   $as_echo_n "(cached) " >&6
15586 else
15587   ac_func_search_save_LIBS=$LIBS
15588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15589 /* end confdefs.h.  */
15590
15591 /* Override any GCC internal prototype to avoid an error.
15592    Use char because int might match the return type of a GCC
15593    builtin and then its argument prototype would still apply.  */
15594 #ifdef __cplusplus
15595 extern "C"
15596 #endif
15597 char dlopen ();
15598 int
15599 main ()
15600 {
15601 return dlopen ();
15602   ;
15603   return 0;
15604 }
15605 _ACEOF
15606 for ac_lib in '' dl; do
15607   if test -z "$ac_lib"; then
15608     ac_res="none required"
15609   else
15610     ac_res=-l$ac_lib
15611     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15612   fi
15613   if ac_fn_c_try_link "$LINENO"; then :
15614   ac_cv_search_dlopen=$ac_res
15615 fi
15616 rm -f core conftest.err conftest.$ac_objext \
15617     conftest$ac_exeext
15618   if ${ac_cv_search_dlopen+:} false; then :
15619   break
15620 fi
15621 done
15622 if ${ac_cv_search_dlopen+:} false; then :
15623
15624 else
15625   ac_cv_search_dlopen=no
15626 fi
15627 rm conftest.$ac_ext
15628 LIBS=$ac_func_search_save_LIBS
15629 fi
15630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15631 $as_echo "$ac_cv_search_dlopen" >&6; }
15632 ac_res=$ac_cv_search_dlopen
15633 if test "$ac_res" != no; then :
15634   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15635
15636 fi
15637
15638   fi
15639 fi
15640
15641 # Add macho support to GDB, but only if BFD includes it.
15642
15643   OLD_CFLAGS=$CFLAGS
15644   OLD_LDFLAGS=$LDFLAGS
15645   OLD_LIBS=$LIBS
15646   # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15647   # points somewhere with bfd, with -I/foo/lib and -L/foo/lib.  We
15648   # always want our bfd.
15649   CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15650   ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15651   LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15652   intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15653   LIBS="-lbfd -liberty -lz $intl $LIBS"
15654   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15655 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
15656 if ${gdb_cv_var_macho+:} false; then :
15657   $as_echo_n "(cached) " >&6
15658 else
15659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15660 /* end confdefs.h.  */
15661 #include <stdlib.h>
15662   #include "bfd.h"
15663   #include "mach-o.h"
15664
15665 int
15666 main ()
15667 {
15668 return bfd_mach_o_lookup_command (NULL, 0, NULL);
15669   ;
15670   return 0;
15671 }
15672 _ACEOF
15673 if ac_fn_c_try_link "$LINENO"; then :
15674   gdb_cv_var_macho=yes
15675 else
15676   gdb_cv_var_macho=no
15677 fi
15678 rm -f core conftest.err conftest.$ac_objext \
15679     conftest$ac_exeext conftest.$ac_ext
15680 fi
15681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15682 $as_echo "$gdb_cv_var_macho" >&6; }
15683   CFLAGS=$OLD_CFLAGS
15684   LDFLAGS=$OLD_LDFLAGS
15685   LIBS=$OLD_LIBS
15686 if test $gdb_cv_var_macho = yes; then
15687   CONFIG_OBS="$CONFIG_OBS machoread.o"
15688 fi
15689
15690 # Add any host-specific objects to GDB.
15691 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15692
15693 # If building on ELF, look for lzma support for embedded compressed debug info.
15694 if test $gdb_cv_var_elf = yes; then
15695
15696 # Check whether --with-lzma was given.
15697 if test "${with_lzma+set}" = set; then :
15698   withval=$with_lzma;
15699 else
15700   with_lzma=auto
15701 fi
15702
15703   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15704 $as_echo_n "checking whether to use lzma... " >&6; }
15705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15706 $as_echo "$with_lzma" >&6; }
15707
15708   if test "${with_lzma}" != no; then
15709
15710
15711
15712
15713
15714
15715
15716
15717     use_additional=yes
15718
15719   acl_save_prefix="$prefix"
15720   prefix="$acl_final_prefix"
15721   acl_save_exec_prefix="$exec_prefix"
15722   exec_prefix="$acl_final_exec_prefix"
15723
15724     eval additional_includedir=\"$includedir\"
15725     eval additional_libdir=\"$libdir\"
15726
15727   exec_prefix="$acl_save_exec_prefix"
15728   prefix="$acl_save_prefix"
15729
15730
15731 # Check whether --with-liblzma-prefix was given.
15732 if test "${with_liblzma_prefix+set}" = set; then :
15733   withval=$with_liblzma_prefix;
15734     if test "X$withval" = "Xno"; then
15735       use_additional=no
15736     else
15737       if test "X$withval" = "X"; then
15738
15739   acl_save_prefix="$prefix"
15740   prefix="$acl_final_prefix"
15741   acl_save_exec_prefix="$exec_prefix"
15742   exec_prefix="$acl_final_exec_prefix"
15743
15744           eval additional_includedir=\"$includedir\"
15745           eval additional_libdir=\"$libdir\"
15746
15747   exec_prefix="$acl_save_exec_prefix"
15748   prefix="$acl_save_prefix"
15749
15750       else
15751         additional_includedir="$withval/include"
15752         additional_libdir="$withval/lib"
15753       fi
15754     fi
15755
15756 fi
15757
15758       LIBLZMA=
15759   LTLIBLZMA=
15760   INCLZMA=
15761   rpathdirs=
15762   ltrpathdirs=
15763   names_already_handled=
15764   names_next_round='lzma '
15765   while test -n "$names_next_round"; do
15766     names_this_round="$names_next_round"
15767     names_next_round=
15768     for name in $names_this_round; do
15769       already_handled=
15770       for n in $names_already_handled; do
15771         if test "$n" = "$name"; then
15772           already_handled=yes
15773           break
15774         fi
15775       done
15776       if test -z "$already_handled"; then
15777         names_already_handled="$names_already_handled $name"
15778                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15779         eval value=\"\$HAVE_LIB$uppername\"
15780         if test -n "$value"; then
15781           if test "$value" = yes; then
15782             eval value=\"\$LIB$uppername\"
15783             test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15784             eval value=\"\$LTLIB$uppername\"
15785             test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15786           else
15787                                     :
15788           fi
15789         else
15790                               found_dir=
15791           found_la=
15792           found_so=
15793           found_a=
15794           if test $use_additional = yes; then
15795             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15796               found_dir="$additional_libdir"
15797               found_so="$additional_libdir/lib$name.$shlibext"
15798               if test -f "$additional_libdir/lib$name.la"; then
15799                 found_la="$additional_libdir/lib$name.la"
15800               fi
15801             else
15802               if test -f "$additional_libdir/lib$name.$libext"; then
15803                 found_dir="$additional_libdir"
15804                 found_a="$additional_libdir/lib$name.$libext"
15805                 if test -f "$additional_libdir/lib$name.la"; then
15806                   found_la="$additional_libdir/lib$name.la"
15807                 fi
15808               fi
15809             fi
15810           fi
15811           if test "X$found_dir" = "X"; then
15812             for x in $LDFLAGS $LTLIBLZMA; do
15813
15814   acl_save_prefix="$prefix"
15815   prefix="$acl_final_prefix"
15816   acl_save_exec_prefix="$exec_prefix"
15817   exec_prefix="$acl_final_exec_prefix"
15818   eval x=\"$x\"
15819   exec_prefix="$acl_save_exec_prefix"
15820   prefix="$acl_save_prefix"
15821
15822               case "$x" in
15823                 -L*)
15824                   dir=`echo "X$x" | sed -e 's/^X-L//'`
15825                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15826                     found_dir="$dir"
15827                     found_so="$dir/lib$name.$shlibext"
15828                     if test -f "$dir/lib$name.la"; then
15829                       found_la="$dir/lib$name.la"
15830                     fi
15831                   else
15832                     if test -f "$dir/lib$name.$libext"; then
15833                       found_dir="$dir"
15834                       found_a="$dir/lib$name.$libext"
15835                       if test -f "$dir/lib$name.la"; then
15836                         found_la="$dir/lib$name.la"
15837                       fi
15838                     fi
15839                   fi
15840                   ;;
15841               esac
15842               if test "X$found_dir" != "X"; then
15843                 break
15844               fi
15845             done
15846           fi
15847           if test "X$found_dir" != "X"; then
15848                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15849             if test "X$found_so" != "X"; then
15850                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15851                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15852               else
15853                                                                                 haveit=
15854                 for x in $ltrpathdirs; do
15855                   if test "X$x" = "X$found_dir"; then
15856                     haveit=yes
15857                     break
15858                   fi
15859                 done
15860                 if test -z "$haveit"; then
15861                   ltrpathdirs="$ltrpathdirs $found_dir"
15862                 fi
15863                                 if test "$hardcode_direct" = yes; then
15864                                                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15865                 else
15866                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15867                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15868                                                             haveit=
15869                     for x in $rpathdirs; do
15870                       if test "X$x" = "X$found_dir"; then
15871                         haveit=yes
15872                         break
15873                       fi
15874                     done
15875                     if test -z "$haveit"; then
15876                       rpathdirs="$rpathdirs $found_dir"
15877                     fi
15878                   else
15879                                                                                 haveit=
15880                     for x in $LDFLAGS $LIBLZMA; do
15881
15882   acl_save_prefix="$prefix"
15883   prefix="$acl_final_prefix"
15884   acl_save_exec_prefix="$exec_prefix"
15885   exec_prefix="$acl_final_exec_prefix"
15886   eval x=\"$x\"
15887   exec_prefix="$acl_save_exec_prefix"
15888   prefix="$acl_save_prefix"
15889
15890                       if test "X$x" = "X-L$found_dir"; then
15891                         haveit=yes
15892                         break
15893                       fi
15894                     done
15895                     if test -z "$haveit"; then
15896                       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15897                     fi
15898                     if test "$hardcode_minus_L" != no; then
15899                                                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15900                     else
15901                                                                                                                                                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15902                     fi
15903                   fi
15904                 fi
15905               fi
15906             else
15907               if test "X$found_a" != "X"; then
15908                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15909               else
15910                                                 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15911               fi
15912             fi
15913                         additional_includedir=
15914             case "$found_dir" in
15915               */lib | */lib/)
15916                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15917                 additional_includedir="$basedir/include"
15918                 ;;
15919             esac
15920             if test "X$additional_includedir" != "X"; then
15921                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
15922                 haveit=
15923                 if test "X$additional_includedir" = "X/usr/local/include"; then
15924                   if test -n "$GCC"; then
15925                     case $host_os in
15926                       linux*) haveit=yes;;
15927                     esac
15928                   fi
15929                 fi
15930                 if test -z "$haveit"; then
15931                   for x in $CPPFLAGS $INCLZMA; do
15932
15933   acl_save_prefix="$prefix"
15934   prefix="$acl_final_prefix"
15935   acl_save_exec_prefix="$exec_prefix"
15936   exec_prefix="$acl_final_exec_prefix"
15937   eval x=\"$x\"
15938   exec_prefix="$acl_save_exec_prefix"
15939   prefix="$acl_save_prefix"
15940
15941                     if test "X$x" = "X-I$additional_includedir"; then
15942                       haveit=yes
15943                       break
15944                     fi
15945                   done
15946                   if test -z "$haveit"; then
15947                     if test -d "$additional_includedir"; then
15948                                             INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15949                     fi
15950                   fi
15951                 fi
15952               fi
15953             fi
15954                         if test -n "$found_la"; then
15955                                                         save_libdir="$libdir"
15956               case "$found_la" in
15957                 */* | *\\*) . "$found_la" ;;
15958                 *) . "./$found_la" ;;
15959               esac
15960               libdir="$save_libdir"
15961                             for dep in $dependency_libs; do
15962                 case "$dep" in
15963                   -L*)
15964                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15965                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
15966                       haveit=
15967                       if test "X$additional_libdir" = "X/usr/local/lib"; then
15968                         if test -n "$GCC"; then
15969                           case $host_os in
15970                             linux*) haveit=yes;;
15971                           esac
15972                         fi
15973                       fi
15974                       if test -z "$haveit"; then
15975                         haveit=
15976                         for x in $LDFLAGS $LIBLZMA; do
15977
15978   acl_save_prefix="$prefix"
15979   prefix="$acl_final_prefix"
15980   acl_save_exec_prefix="$exec_prefix"
15981   exec_prefix="$acl_final_exec_prefix"
15982   eval x=\"$x\"
15983   exec_prefix="$acl_save_exec_prefix"
15984   prefix="$acl_save_prefix"
15985
15986                           if test "X$x" = "X-L$additional_libdir"; then
15987                             haveit=yes
15988                             break
15989                           fi
15990                         done
15991                         if test -z "$haveit"; then
15992                           if test -d "$additional_libdir"; then
15993                                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
15994                           fi
15995                         fi
15996                         haveit=
15997                         for x in $LDFLAGS $LTLIBLZMA; do
15998
15999   acl_save_prefix="$prefix"
16000   prefix="$acl_final_prefix"
16001   acl_save_exec_prefix="$exec_prefix"
16002   exec_prefix="$acl_final_exec_prefix"
16003   eval x=\"$x\"
16004   exec_prefix="$acl_save_exec_prefix"
16005   prefix="$acl_save_prefix"
16006
16007                           if test "X$x" = "X-L$additional_libdir"; then
16008                             haveit=yes
16009                             break
16010                           fi
16011                         done
16012                         if test -z "$haveit"; then
16013                           if test -d "$additional_libdir"; then
16014                                                         LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16015                           fi
16016                         fi
16017                       fi
16018                     fi
16019                     ;;
16020                   -R*)
16021                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
16022                     if test "$enable_rpath" != no; then
16023                                                                   haveit=
16024                       for x in $rpathdirs; do
16025                         if test "X$x" = "X$dir"; then
16026                           haveit=yes
16027                           break
16028                         fi
16029                       done
16030                       if test -z "$haveit"; then
16031                         rpathdirs="$rpathdirs $dir"
16032                       fi
16033                                                                   haveit=
16034                       for x in $ltrpathdirs; do
16035                         if test "X$x" = "X$dir"; then
16036                           haveit=yes
16037                           break
16038                         fi
16039                       done
16040                       if test -z "$haveit"; then
16041                         ltrpathdirs="$ltrpathdirs $dir"
16042                       fi
16043                     fi
16044                     ;;
16045                   -l*)
16046                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16047                     ;;
16048                   *.la)
16049                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16050                     ;;
16051                   *)
16052                                         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16053                     LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16054                     ;;
16055                 esac
16056               done
16057             fi
16058           else
16059                                                             LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16060             LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16061           fi
16062         fi
16063       fi
16064     done
16065   done
16066   if test "X$rpathdirs" != "X"; then
16067     if test -n "$hardcode_libdir_separator"; then
16068                         alldirs=
16069       for found_dir in $rpathdirs; do
16070         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16071       done
16072             acl_save_libdir="$libdir"
16073       libdir="$alldirs"
16074       eval flag=\"$hardcode_libdir_flag_spec\"
16075       libdir="$acl_save_libdir"
16076       LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16077     else
16078             for found_dir in $rpathdirs; do
16079         acl_save_libdir="$libdir"
16080         libdir="$found_dir"
16081         eval flag=\"$hardcode_libdir_flag_spec\"
16082         libdir="$acl_save_libdir"
16083         LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16084       done
16085     fi
16086   fi
16087   if test "X$ltrpathdirs" != "X"; then
16088             for found_dir in $ltrpathdirs; do
16089       LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16090     done
16091   fi
16092
16093
16094         ac_save_CPPFLAGS="$CPPFLAGS"
16095
16096   for element in $INCLZMA; do
16097     haveit=
16098     for x in $CPPFLAGS; do
16099
16100   acl_save_prefix="$prefix"
16101   prefix="$acl_final_prefix"
16102   acl_save_exec_prefix="$exec_prefix"
16103   exec_prefix="$acl_final_exec_prefix"
16104   eval x=\"$x\"
16105   exec_prefix="$acl_save_exec_prefix"
16106   prefix="$acl_save_prefix"
16107
16108       if test "X$x" = "X$element"; then
16109         haveit=yes
16110         break
16111       fi
16112     done
16113     if test -z "$haveit"; then
16114       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16115     fi
16116   done
16117
16118
16119   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16120 $as_echo_n "checking for liblzma... " >&6; }
16121 if ${ac_cv_liblzma+:} false; then :
16122   $as_echo_n "(cached) " >&6
16123 else
16124
16125     ac_save_LIBS="$LIBS"
16126     LIBS="$LIBS $LIBLZMA"
16127     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16128 /* end confdefs.h.  */
16129 #include "lzma.h"
16130 int
16131 main ()
16132 {
16133 lzma_index_iter iter;
16134                            lzma_index_iter_init (&iter, 0);
16135                            lzma_mf_is_supported (LZMA_MF_HC3);
16136   ;
16137   return 0;
16138 }
16139 _ACEOF
16140 if ac_fn_c_try_link "$LINENO"; then :
16141   ac_cv_liblzma=yes
16142 else
16143   ac_cv_liblzma=no
16144 fi
16145 rm -f core conftest.err conftest.$ac_objext \
16146     conftest$ac_exeext conftest.$ac_ext
16147     LIBS="$ac_save_LIBS"
16148
16149 fi
16150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16151 $as_echo "$ac_cv_liblzma" >&6; }
16152   if test "$ac_cv_liblzma" = yes; then
16153     HAVE_LIBLZMA=yes
16154
16155 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16156
16157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16158 $as_echo_n "checking how to link with liblzma... " >&6; }
16159     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16160 $as_echo "$LIBLZMA" >&6; }
16161   else
16162     HAVE_LIBLZMA=no
16163             CPPFLAGS="$ac_save_CPPFLAGS"
16164     LIBLZMA=
16165     LTLIBLZMA=
16166   fi
16167
16168
16169
16170
16171
16172
16173     if test "$HAVE_LIBLZMA" != yes; then
16174       if test "$with_lzma" = yes; then
16175         as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
16176       fi
16177     fi
16178   fi
16179 fi
16180
16181 LIBGUI="../libgui/src/libgui.a"
16182 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16183
16184
16185
16186 WIN32LDAPP=
16187
16188
16189
16190 case "${host}" in
16191 *-*-cygwin* | *-*-mingw* )
16192     configdir="win"
16193     ;;
16194 *)
16195     configdir="unix"
16196     ;;
16197 esac
16198
16199 GDBTKLIBS=
16200 if test "${enable_gdbtk}" = "yes"; then
16201
16202     # Gdbtk must have an absolute path to srcdir in order to run
16203     # properly when not installed.
16204     here=`pwd`
16205     cd ${srcdir}
16206     GDBTK_SRC_DIR=`pwd`
16207     cd $here
16208
16209
16210     #
16211     # Ok, lets find the tcl configuration
16212     # First, look for one uninstalled.
16213     # the alternative search directory is invoked by --with-tcl
16214     #
16215
16216     if test x"${no_tcl}" = x ; then
16217         # we reset no_tcl in case something fails here
16218         no_tcl=true
16219
16220 # Check whether --with-tcl was given.
16221 if test "${with_tcl+set}" = set; then :
16222   withval=$with_tcl; with_tclconfig=${withval}
16223 fi
16224
16225         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16226 $as_echo_n "checking for Tcl configuration... " >&6; }
16227         if ${ac_cv_c_tclconfig+:} false; then :
16228   $as_echo_n "(cached) " >&6
16229 else
16230
16231
16232             # First check to see if --with-tcl was specified.
16233             case "${host}" in
16234                 *-*-cygwin*) platDir="win" ;;
16235                 *) platDir="unix" ;;
16236             esac
16237             if test x"${with_tclconfig}" != x ; then
16238                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16239                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16240                 else
16241                     as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
16242                 fi
16243             fi
16244
16245             # then check for a private Tcl installation
16246             if test x"${ac_cv_c_tclconfig}" = x ; then
16247                 for i in \
16248                         ../tcl \
16249                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16250                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16251                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16252                         ../../tcl \
16253                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16254                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16255                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16256                         ../../../tcl \
16257                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16258                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16259                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16260                     if test -f "$i/$platDir/tclConfig.sh" ; then
16261                         ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16262                         break
16263                     fi
16264                 done
16265             fi
16266
16267             # on Darwin, check in Framework installation locations
16268             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16269                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16270                         `ls -d /Library/Frameworks 2>/dev/null` \
16271                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16272                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16273                         ; do
16274                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16275                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16276                         break
16277                     fi
16278                 done
16279             fi
16280
16281             # check in a few common install locations
16282             if test x"${ac_cv_c_tclconfig}" = x ; then
16283                 for i in `ls -d ${libdir} 2>/dev/null` \
16284                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16285                         `ls -d ${prefix}/lib 2>/dev/null` \
16286                         `ls -d /usr/local/lib 2>/dev/null` \
16287                         `ls -d /usr/contrib/lib 2>/dev/null` \
16288                         `ls -d /usr/lib 2>/dev/null` \
16289                         ; do
16290                     if test -f "$i/tclConfig.sh" ; then
16291                         ac_cv_c_tclconfig=`(cd $i; pwd)`
16292                         break
16293                     fi
16294                 done
16295             fi
16296
16297             # check in a few other private locations
16298             if test x"${ac_cv_c_tclconfig}" = x ; then
16299                 for i in \
16300                         ${srcdir}/../tcl \
16301                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16302                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16303                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16304                     if test -f "$i/$platDir/tclConfig.sh" ; then
16305                     ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16306                     break
16307                 fi
16308                 done
16309             fi
16310
16311 fi
16312
16313
16314         if test x"${ac_cv_c_tclconfig}" = x ; then
16315             TCL_BIN_DIR="# no Tcl configs found"
16316             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16317 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
16318         else
16319             no_tcl=
16320             TCL_BIN_DIR=${ac_cv_c_tclconfig}
16321             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16322 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16323         fi
16324     fi
16325
16326
16327     # If $no_tk is nonempty, then we can't do Tk, and there is no
16328     # point to doing Tcl.
16329
16330     #
16331     # Ok, lets find the tk configuration
16332     # First, look for one uninstalled.
16333     # the alternative search directory is invoked by --with-tk
16334     #
16335
16336     if test x"${no_tk}" = x ; then
16337         # we reset no_tk in case something fails here
16338         no_tk=true
16339
16340 # Check whether --with-tk was given.
16341 if test "${with_tk+set}" = set; then :
16342   withval=$with_tk; with_tkconfig=${withval}
16343 fi
16344
16345         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16346 $as_echo_n "checking for Tk configuration... " >&6; }
16347         if ${ac_cv_c_tkconfig+:} false; then :
16348   $as_echo_n "(cached) " >&6
16349 else
16350
16351
16352             # First check to see if --with-tkconfig was specified.
16353             if test x"${with_tkconfig}" != x ; then
16354                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16355                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16356                 else
16357                     as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
16358                 fi
16359             fi
16360
16361             # then check for a private Tk library
16362             case "${host}" in
16363                 *-*-cygwin*) platDir="win" ;;
16364                 *) platDir="unix" ;;
16365             esac
16366             if test x"${ac_cv_c_tkconfig}" = x ; then
16367                 for i in \
16368                         ../tk \
16369                         `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16370                         `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16371                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16372                         ../../tk \
16373                         `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16374                         `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16375                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16376                         ../../../tk \
16377                         `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16378                         `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16379                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16380                     if test -f "$i/$platDir/tkConfig.sh" ; then
16381                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16382                         break
16383                     fi
16384                 done
16385             fi
16386
16387             # on Darwin, check in Framework installation locations
16388             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16389                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16390                         `ls -d /Library/Frameworks 2>/dev/null` \
16391                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
16392                         `ls -d /System/Library/Frameworks 2>/dev/null` \
16393                         ; do
16394                     if test -f "$i/Tk.framework/tkConfig.sh" ; then
16395                         ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16396                         break
16397                     fi
16398                 done
16399             fi
16400
16401             # check in a few common install locations
16402             if test x"${ac_cv_c_tkconfig}" = x ; then
16403                 for i in `ls -d ${libdir} 2>/dev/null` \
16404                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
16405                         `ls -d ${prefix}/lib 2>/dev/null` \
16406                         `ls -d /usr/local/lib 2>/dev/null` \
16407                         `ls -d /usr/contrib/lib 2>/dev/null` \
16408                         `ls -d /usr/lib 2>/dev/null` \
16409                         ; do
16410                     if test -f "$i/tkConfig.sh" ; then
16411                         ac_cv_c_tkconfig=`(cd $i; pwd)`
16412                         break
16413                     fi
16414                 done
16415             fi
16416             # check in a few other private locations
16417             if test x"${ac_cv_c_tkconfig}" = x ; then
16418                 for i in \
16419                         ${srcdir}/../tk \
16420                         `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16421                         `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16422                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16423                     if test -f "$i/$platDir/tkConfig.sh" ; then
16424                         ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16425                         break
16426                     fi
16427                 done
16428             fi
16429
16430 fi
16431
16432
16433         if test x"${ac_cv_c_tkconfig}" = x ; then
16434             TK_BIN_DIR="# no Tk configs found"
16435             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16436 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
16437         else
16438             no_tk=
16439             TK_BIN_DIR=${ac_cv_c_tkconfig}
16440             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16441 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16442         fi
16443     fi
16444
16445
16446     if test -z "${no_tcl}" -a -z "${no_tk}"; then
16447
16448     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16449 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
16450
16451     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
16452         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16453 $as_echo "loading" >&6; }
16454         . ${TCL_BIN_DIR}/tclConfig.sh
16455     else
16456         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16457 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16458     fi
16459
16460     # eval is required to do the TCL_DBGX substitution
16461     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16462     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16463
16464     # If the TCL_BIN_DIR is the build directory (not the install directory),
16465     # then set the common variable name to the value of the build variables.
16466     # For example, the variable TCL_LIB_SPEC will be set to the value
16467     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16468     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16469     # installed and uninstalled version of Tcl.
16470     if test -f "${TCL_BIN_DIR}/Makefile" ; then
16471         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16472         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16473         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16474     elif test "`uname -s`" = "Darwin"; then
16475         # If Tcl was built as a framework, attempt to use the libraries
16476         # from the framework at the given location so that linking works
16477         # against Tcl.framework installed in an arbitrary location.
16478         case ${TCL_DEFS} in
16479             *TCL_FRAMEWORK*)
16480                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16481                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16482                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16483                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16484                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16485                             break
16486                         fi
16487                     done
16488                 fi
16489                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16490                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16491                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16492                 fi
16493                 ;;
16494         esac
16495     fi
16496
16497     # eval is required to do the TCL_DBGX substitution
16498     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16499     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16500     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16501     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517         # Check for in-tree tcl
16518         here=`pwd`
16519         cd ${srcdir}/..
16520         topdir=`pwd`
16521         cd ${here}
16522
16523         intree="no"
16524         if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16525           intree="yes"
16526         fi
16527
16528         # Find Tcl private headers
16529         if test x"${intree}" = xno; then
16530
16531   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16532 $as_echo_n "checking for Tcl private headers... " >&6; }
16533   private_dir=""
16534   dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16535   if test -f ${dir}/tclInt.h ; then
16536     private_dir=${dir}
16537   fi
16538
16539   if test x"${private_dir}" = x; then
16540     as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
16541   else
16542     TCL_PRIVATE_INCLUDE="-I${private_dir}"
16543     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16544 $as_echo "${private_dir}" >&6; }
16545   fi
16546
16547           TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16548           TCL_LIBRARY="${TCL_LIB_SPEC}"
16549           TCL_DEPS=""
16550         else
16551           # If building tcl in the same src tree, private headers
16552           # are not needed, but we need to be sure to use the right
16553           # headers library
16554           TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16555           TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16556           TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16557         fi
16558
16559
16560
16561
16562
16563     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16564 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
16565
16566     if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
16567         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16568 $as_echo "loading" >&6; }
16569         . ${TK_BIN_DIR}/tkConfig.sh
16570     else
16571         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16572 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16573     fi
16574
16575     # eval is required to do the TK_DBGX substitution
16576     eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16577     eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16578
16579     # If the TK_BIN_DIR is the build directory (not the install directory),
16580     # then set the common variable name to the value of the build variables.
16581     # For example, the variable TK_LIB_SPEC will be set to the value
16582     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16583     # instead of TK_BUILD_LIB_SPEC since it will work with both an
16584     # installed and uninstalled version of Tcl.
16585     if test -f "${TK_BIN_DIR}/Makefile" ; then
16586         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16587         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16588         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16589     elif test "`uname -s`" = "Darwin"; then
16590         # If Tk was built as a framework, attempt to use the libraries
16591         # from the framework at the given location so that linking works
16592         # against Tk.framework installed in an arbitrary location.
16593         case ${TK_DEFS} in
16594             *TK_FRAMEWORK*)
16595                 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
16596                     for i in "`cd ${TK_BIN_DIR}; pwd`" \
16597                              "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16598                         if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16599                             TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16600                             break
16601                         fi
16602                     done
16603                 fi
16604                 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
16605                     TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16606                     TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16607                 fi
16608                 ;;
16609         esac
16610     fi
16611
16612     # eval is required to do the TK_DBGX substitution
16613     eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16614     eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16615     eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16616     eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631         # Check for in-tree Tk
16632         intree="no"
16633         if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16634           intree="yes"
16635         fi
16636
16637         # Find Tk private headers
16638         if test x"${intree}" = xno; then
16639
16640   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16641 $as_echo_n "checking for Tk private headers... " >&6; }
16642   private_dir=""
16643   dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16644   if test -f ${dir}/tkInt.h; then
16645     private_dir=${dir}
16646   fi
16647
16648   if test x"${private_dir}" = x; then
16649     as_fn_error $? "could not find Tk private headers" "$LINENO" 5
16650   else
16651     TK_PRIVATE_INCLUDE="-I${private_dir}"
16652     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16653 $as_echo "${private_dir}" >&6; }
16654   fi
16655
16656           TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16657           TK_LIBRARY=${TK_LIB_SPEC}
16658           TK_DEPS=""
16659         else
16660           TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16661           TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16662           TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16663         fi
16664
16665
16666
16667
16668
16669         ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
16670
16671         # Include some libraries that Tcl and Tk want.
16672         TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16673         # Yes, the ordering seems wrong here.  But it isn't.
16674         # TK_LIBS is the list of libraries that need to be linked
16675         # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
16676         # were in LIBS then any link tests after this point would
16677         # try to include things like `$(LIBGUI)', which wouldn't work.
16678         GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
16679
16680         CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16681         CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16682         CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16683         CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16684         CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16685         CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16686         CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
16687
16688         if test x$gdb_cv_os_cygwin = xyes; then
16689           WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16690           WIN32LDAPP="-Wl,--subsystem,console"
16691           CONFIG_OBS="${CONFIG_OBS} gdbres.o"
16692         fi
16693
16694         subdirs="$subdirs gdbtk"
16695
16696     fi
16697 fi
16698
16699
16700
16701
16702
16703
16704
16705
16706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16707 $as_echo_n "checking for X... " >&6; }
16708
16709
16710 # Check whether --with-x was given.
16711 if test "${with_x+set}" = set; then :
16712   withval=$with_x;
16713 fi
16714
16715 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16716 if test "x$with_x" = xno; then
16717   # The user explicitly disabled X.
16718   have_x=disabled
16719 else
16720   case $x_includes,$x_libraries in #(
16721     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16722     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
16723   $as_echo_n "(cached) " >&6
16724 else
16725   # One or both of the vars are not set, and there is no cached value.
16726 ac_x_includes=no ac_x_libraries=no
16727 rm -f -r conftest.dir
16728 if mkdir conftest.dir; then
16729   cd conftest.dir
16730   cat >Imakefile <<'_ACEOF'
16731 incroot:
16732         @echo incroot='${INCROOT}'
16733 usrlibdir:
16734         @echo usrlibdir='${USRLIBDIR}'
16735 libdir:
16736         @echo libdir='${LIBDIR}'
16737 _ACEOF
16738   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
16739     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
16740     for ac_var in incroot usrlibdir libdir; do
16741       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16742     done
16743     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
16744     for ac_extension in a so sl dylib la dll; do
16745       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16746          test -f "$ac_im_libdir/libX11.$ac_extension"; then
16747         ac_im_usrlibdir=$ac_im_libdir; break
16748       fi
16749     done
16750     # Screen out bogus values from the imake configuration.  They are
16751     # bogus both because they are the default anyway, and because
16752     # using them would break gcc on systems where it needs fixed includes.
16753     case $ac_im_incroot in
16754         /usr/include) ac_x_includes= ;;
16755         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
16756     esac
16757     case $ac_im_usrlibdir in
16758         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
16759         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
16760     esac
16761   fi
16762   cd ..
16763   rm -f -r conftest.dir
16764 fi
16765
16766 # Standard set of common directories for X headers.
16767 # Check X11 before X11Rn because it is often a symlink to the current release.
16768 ac_x_header_dirs='
16769 /usr/X11/include
16770 /usr/X11R7/include
16771 /usr/X11R6/include
16772 /usr/X11R5/include
16773 /usr/X11R4/include
16774
16775 /usr/include/X11
16776 /usr/include/X11R7
16777 /usr/include/X11R6
16778 /usr/include/X11R5
16779 /usr/include/X11R4
16780
16781 /usr/local/X11/include
16782 /usr/local/X11R7/include
16783 /usr/local/X11R6/include
16784 /usr/local/X11R5/include
16785 /usr/local/X11R4/include
16786
16787 /usr/local/include/X11
16788 /usr/local/include/X11R7
16789 /usr/local/include/X11R6
16790 /usr/local/include/X11R5
16791 /usr/local/include/X11R4
16792
16793 /usr/X386/include
16794 /usr/x386/include
16795 /usr/XFree86/include/X11
16796
16797 /usr/include
16798 /usr/local/include
16799 /usr/unsupported/include
16800 /usr/athena/include
16801 /usr/local/x11r5/include
16802 /usr/lpp/Xamples/include
16803
16804 /usr/openwin/include
16805 /usr/openwin/share/include'
16806
16807 if test "$ac_x_includes" = no; then
16808   # Guess where to find include files, by looking for Xlib.h.
16809   # First, try using that file with no special directory specified.
16810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16811 /* end confdefs.h.  */
16812 #include <X11/Xlib.h>
16813 _ACEOF
16814 if ac_fn_c_try_cpp "$LINENO"; then :
16815   # We can compile using X headers with no special include directory.
16816 ac_x_includes=
16817 else
16818   for ac_dir in $ac_x_header_dirs; do
16819   if test -r "$ac_dir/X11/Xlib.h"; then
16820     ac_x_includes=$ac_dir
16821     break
16822   fi
16823 done
16824 fi
16825 rm -f conftest.err conftest.i conftest.$ac_ext
16826 fi # $ac_x_includes = no
16827
16828 if test "$ac_x_libraries" = no; then
16829   # Check for the libraries.
16830   # See if we find them without any special options.
16831   # Don't add to $LIBS permanently.
16832   ac_save_LIBS=$LIBS
16833   LIBS="-lX11 $LIBS"
16834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16835 /* end confdefs.h.  */
16836 #include <X11/Xlib.h>
16837 int
16838 main ()
16839 {
16840 XrmInitialize ()
16841   ;
16842   return 0;
16843 }
16844 _ACEOF
16845 if ac_fn_c_try_link "$LINENO"; then :
16846   LIBS=$ac_save_LIBS
16847 # We can link X programs with no special library path.
16848 ac_x_libraries=
16849 else
16850   LIBS=$ac_save_LIBS
16851 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
16852 do
16853   # Don't even attempt the hair of trying to link an X program!
16854   for ac_extension in a so sl dylib la dll; do
16855     if test -r "$ac_dir/libX11.$ac_extension"; then
16856       ac_x_libraries=$ac_dir
16857       break 2
16858     fi
16859   done
16860 done
16861 fi
16862 rm -f core conftest.err conftest.$ac_objext \
16863     conftest$ac_exeext conftest.$ac_ext
16864 fi # $ac_x_libraries = no
16865
16866 case $ac_x_includes,$ac_x_libraries in #(
16867   no,* | *,no | *\'*)
16868     # Didn't find X, or a directory has "'" in its name.
16869     ac_cv_have_x="have_x=no";; #(
16870   *)
16871     # Record where we found X for the cache.
16872     ac_cv_have_x="have_x=yes\
16873         ac_x_includes='$ac_x_includes'\
16874         ac_x_libraries='$ac_x_libraries'"
16875 esac
16876 fi
16877 ;; #(
16878     *) have_x=yes;;
16879   esac
16880   eval "$ac_cv_have_x"
16881 fi # $with_x != no
16882
16883 if test "$have_x" != yes; then
16884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16885 $as_echo "$have_x" >&6; }
16886   no_x=yes
16887 else
16888   # If each of the values was on the command line, it overrides each guess.
16889   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16890   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16891   # Update the cache value to reflect the command line values.
16892   ac_cv_have_x="have_x=yes\
16893         ac_x_includes='$x_includes'\
16894         ac_x_libraries='$x_libraries'"
16895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16896 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
16897 fi
16898
16899
16900 # Unlike the sim directory, whether a simulator is linked is controlled by
16901 # presence of a gdb_sim definition in the target configure.tgt entry.
16902 # This code just checks for a few cases where we'd like to ignore those
16903 # definitions, even when they're present in the '.mt' file.  These cases
16904 # are when --disable-sim is specified, or if the simulator directory is
16905 # not part of the source tree.
16906 #
16907 # Check whether --enable-sim was given.
16908 if test "${enable_sim+set}" = set; then :
16909   enableval=$enable_sim; echo "enable_sim = $enable_sim";
16910  echo "enableval = ${enableval}";
16911  case "${enableval}" in
16912   yes) ignore_sim=false ;;
16913   no)  ignore_sim=true ;;
16914   *)   ignore_sim=false ;;
16915  esac
16916 else
16917   ignore_sim=false
16918 fi
16919
16920
16921 if test ! -d "${srcdir}/../sim"; then
16922   ignore_sim=true
16923 fi
16924
16925 SIM=
16926 SIM_OBS=
16927 if test "${ignore_sim}" = "false"; then
16928   if test x"${gdb_sim}" != x ; then
16929     SIM="${gdb_sim}"
16930     SIM_OBS="remote-sim.o"
16931
16932 $as_echo "#define WITH_SIM 1" >>confdefs.h
16933
16934
16935     # Some tdep code should only be compiled in when the ppc sim is
16936     # built.  PR sim/13418.
16937     case $target in
16938       powerpc*-*-*)
16939
16940 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16941
16942         ;;
16943     esac
16944   fi
16945 fi
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960 # List of host floatformats.
16961
16962 cat >>confdefs.h <<_ACEOF
16963 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
16964 _ACEOF
16965
16966
16967 cat >>confdefs.h <<_ACEOF
16968 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
16969 _ACEOF
16970
16971
16972 cat >>confdefs.h <<_ACEOF
16973 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
16974 _ACEOF
16975
16976
16977 # target_subdir is used by the testsuite to find the target libraries.
16978 target_subdir=
16979 if test "${host}" != "${target}"; then
16980     target_subdir="${target_alias}/"
16981 fi
16982
16983
16984 # Import nat definitions.
16985 nat_makefile_frag=/dev/null
16986 if test "${gdb_native}" = "yes"; then
16987   . ${srcdir}/configure.nat
16988   nativefile=$NAT_FILE
16989 fi
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001 if test x"${gdb_osabi}" != x ; then
17002
17003 cat >>confdefs.h <<_ACEOF
17004 #define GDB_OSABI_DEFAULT $gdb_osabi
17005 _ACEOF
17006
17007 fi
17008
17009 # Check whether --enable-gdbserver was given.
17010 if test "${enable_gdbserver+set}" = set; then :
17011   enableval=$enable_gdbserver; case "${enableval}" in
17012   yes| no|auto) ;;
17013   *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
17014 esac
17015 else
17016   enable_gdbserver=auto
17017 fi
17018
17019
17020 # We only build gdbserver automatically in a native configuration, and
17021 # only if the user did not explicitly disable its build.
17022 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
17023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17024 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
17025   if test "x$build_gdbserver" = xyes; then
17026     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17027 $as_echo "yes" >&6; }
17028     subdirs="$subdirs gdbserver"
17029
17030     gdbserver_build_enabled=yes
17031   else
17032     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17033 $as_echo "no" >&6; }
17034   fi
17035 fi
17036
17037 # If the user explicitly request the gdbserver to be built, verify that
17038 # we were in fact able to enable it.
17039 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
17040   as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
17041 fi
17042
17043 # Check for babeltrace and babeltrace-ctf
17044
17045 # Check whether --with-babeltrace was given.
17046 if test "${with_babeltrace+set}" = set; then :
17047   withval=$with_babeltrace;
17048 else
17049   with_babeltrace=auto
17050 fi
17051
17052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17053 $as_echo_n "checking whether to use babeltrace... " >&6; }
17054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17055 $as_echo "$with_babeltrace" >&6; }
17056
17057 if test "x$with_babeltrace" = "xno"; then
17058   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17059 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17060 else
17061   # Append -Werror to CFLAGS so that configure can catch the warning
17062   # "assignment from incompatible pointer type", which is related to
17063   # the babeltrace change from 1.0.3 to 1.1.0.  Babeltrace 1.1.0 works
17064   # in GDB, while babeltrace 1.0.3 is broken.
17065   # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17066   # safe to save and restore CFLAGS here.
17067   saved_CFLAGS=$CFLAGS
17068   CFLAGS="$CFLAGS -Werror"
17069
17070
17071
17072
17073
17074
17075
17076
17077     use_additional=yes
17078
17079   acl_save_prefix="$prefix"
17080   prefix="$acl_final_prefix"
17081   acl_save_exec_prefix="$exec_prefix"
17082   exec_prefix="$acl_final_exec_prefix"
17083
17084     eval additional_includedir=\"$includedir\"
17085     eval additional_libdir=\"$libdir\"
17086
17087   exec_prefix="$acl_save_exec_prefix"
17088   prefix="$acl_save_prefix"
17089
17090
17091 # Check whether --with-libbabeltrace-prefix was given.
17092 if test "${with_libbabeltrace_prefix+set}" = set; then :
17093   withval=$with_libbabeltrace_prefix;
17094     if test "X$withval" = "Xno"; then
17095       use_additional=no
17096     else
17097       if test "X$withval" = "X"; then
17098
17099   acl_save_prefix="$prefix"
17100   prefix="$acl_final_prefix"
17101   acl_save_exec_prefix="$exec_prefix"
17102   exec_prefix="$acl_final_exec_prefix"
17103
17104           eval additional_includedir=\"$includedir\"
17105           eval additional_libdir=\"$libdir\"
17106
17107   exec_prefix="$acl_save_exec_prefix"
17108   prefix="$acl_save_prefix"
17109
17110       else
17111         additional_includedir="$withval/include"
17112         additional_libdir="$withval/lib"
17113       fi
17114     fi
17115
17116 fi
17117
17118       LIBBABELTRACE=
17119   LTLIBBABELTRACE=
17120   INCBABELTRACE=
17121   rpathdirs=
17122   ltrpathdirs=
17123   names_already_handled=
17124   names_next_round='babeltrace babeltrace-ctf'
17125   while test -n "$names_next_round"; do
17126     names_this_round="$names_next_round"
17127     names_next_round=
17128     for name in $names_this_round; do
17129       already_handled=
17130       for n in $names_already_handled; do
17131         if test "$n" = "$name"; then
17132           already_handled=yes
17133           break
17134         fi
17135       done
17136       if test -z "$already_handled"; then
17137         names_already_handled="$names_already_handled $name"
17138                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17139         eval value=\"\$HAVE_LIB$uppername\"
17140         if test -n "$value"; then
17141           if test "$value" = yes; then
17142             eval value=\"\$LIB$uppername\"
17143             test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17144             eval value=\"\$LTLIB$uppername\"
17145             test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17146           else
17147                                     :
17148           fi
17149         else
17150                               found_dir=
17151           found_la=
17152           found_so=
17153           found_a=
17154           if test $use_additional = yes; then
17155             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17156               found_dir="$additional_libdir"
17157               found_so="$additional_libdir/lib$name.$shlibext"
17158               if test -f "$additional_libdir/lib$name.la"; then
17159                 found_la="$additional_libdir/lib$name.la"
17160               fi
17161             else
17162               if test -f "$additional_libdir/lib$name.$libext"; then
17163                 found_dir="$additional_libdir"
17164                 found_a="$additional_libdir/lib$name.$libext"
17165                 if test -f "$additional_libdir/lib$name.la"; then
17166                   found_la="$additional_libdir/lib$name.la"
17167                 fi
17168               fi
17169             fi
17170           fi
17171           if test "X$found_dir" = "X"; then
17172             for x in $LDFLAGS $LTLIBBABELTRACE; do
17173
17174   acl_save_prefix="$prefix"
17175   prefix="$acl_final_prefix"
17176   acl_save_exec_prefix="$exec_prefix"
17177   exec_prefix="$acl_final_exec_prefix"
17178   eval x=\"$x\"
17179   exec_prefix="$acl_save_exec_prefix"
17180   prefix="$acl_save_prefix"
17181
17182               case "$x" in
17183                 -L*)
17184                   dir=`echo "X$x" | sed -e 's/^X-L//'`
17185                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17186                     found_dir="$dir"
17187                     found_so="$dir/lib$name.$shlibext"
17188                     if test -f "$dir/lib$name.la"; then
17189                       found_la="$dir/lib$name.la"
17190                     fi
17191                   else
17192                     if test -f "$dir/lib$name.$libext"; then
17193                       found_dir="$dir"
17194                       found_a="$dir/lib$name.$libext"
17195                       if test -f "$dir/lib$name.la"; then
17196                         found_la="$dir/lib$name.la"
17197                       fi
17198                     fi
17199                   fi
17200                   ;;
17201               esac
17202               if test "X$found_dir" != "X"; then
17203                 break
17204               fi
17205             done
17206           fi
17207           if test "X$found_dir" != "X"; then
17208                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17209             if test "X$found_so" != "X"; then
17210                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17211                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17212               else
17213                                                                                 haveit=
17214                 for x in $ltrpathdirs; do
17215                   if test "X$x" = "X$found_dir"; then
17216                     haveit=yes
17217                     break
17218                   fi
17219                 done
17220                 if test -z "$haveit"; then
17221                   ltrpathdirs="$ltrpathdirs $found_dir"
17222                 fi
17223                                 if test "$hardcode_direct" = yes; then
17224                                                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17225                 else
17226                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17227                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17228                                                             haveit=
17229                     for x in $rpathdirs; do
17230                       if test "X$x" = "X$found_dir"; then
17231                         haveit=yes
17232                         break
17233                       fi
17234                     done
17235                     if test -z "$haveit"; then
17236                       rpathdirs="$rpathdirs $found_dir"
17237                     fi
17238                   else
17239                                                                                 haveit=
17240                     for x in $LDFLAGS $LIBBABELTRACE; do
17241
17242   acl_save_prefix="$prefix"
17243   prefix="$acl_final_prefix"
17244   acl_save_exec_prefix="$exec_prefix"
17245   exec_prefix="$acl_final_exec_prefix"
17246   eval x=\"$x\"
17247   exec_prefix="$acl_save_exec_prefix"
17248   prefix="$acl_save_prefix"
17249
17250                       if test "X$x" = "X-L$found_dir"; then
17251                         haveit=yes
17252                         break
17253                       fi
17254                     done
17255                     if test -z "$haveit"; then
17256                       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17257                     fi
17258                     if test "$hardcode_minus_L" != no; then
17259                                                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17260                     else
17261                                                                                                                                                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17262                     fi
17263                   fi
17264                 fi
17265               fi
17266             else
17267               if test "X$found_a" != "X"; then
17268                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17269               else
17270                                                 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17271               fi
17272             fi
17273                         additional_includedir=
17274             case "$found_dir" in
17275               */lib | */lib/)
17276                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17277                 additional_includedir="$basedir/include"
17278                 ;;
17279             esac
17280             if test "X$additional_includedir" != "X"; then
17281                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
17282                 haveit=
17283                 if test "X$additional_includedir" = "X/usr/local/include"; then
17284                   if test -n "$GCC"; then
17285                     case $host_os in
17286                       linux*) haveit=yes;;
17287                     esac
17288                   fi
17289                 fi
17290                 if test -z "$haveit"; then
17291                   for x in $CPPFLAGS $INCBABELTRACE; do
17292
17293   acl_save_prefix="$prefix"
17294   prefix="$acl_final_prefix"
17295   acl_save_exec_prefix="$exec_prefix"
17296   exec_prefix="$acl_final_exec_prefix"
17297   eval x=\"$x\"
17298   exec_prefix="$acl_save_exec_prefix"
17299   prefix="$acl_save_prefix"
17300
17301                     if test "X$x" = "X-I$additional_includedir"; then
17302                       haveit=yes
17303                       break
17304                     fi
17305                   done
17306                   if test -z "$haveit"; then
17307                     if test -d "$additional_includedir"; then
17308                                             INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17309                     fi
17310                   fi
17311                 fi
17312               fi
17313             fi
17314                         if test -n "$found_la"; then
17315                                                         save_libdir="$libdir"
17316               case "$found_la" in
17317                 */* | *\\*) . "$found_la" ;;
17318                 *) . "./$found_la" ;;
17319               esac
17320               libdir="$save_libdir"
17321                             for dep in $dependency_libs; do
17322                 case "$dep" in
17323                   -L*)
17324                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17325                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
17326                       haveit=
17327                       if test "X$additional_libdir" = "X/usr/local/lib"; then
17328                         if test -n "$GCC"; then
17329                           case $host_os in
17330                             linux*) haveit=yes;;
17331                           esac
17332                         fi
17333                       fi
17334                       if test -z "$haveit"; then
17335                         haveit=
17336                         for x in $LDFLAGS $LIBBABELTRACE; do
17337
17338   acl_save_prefix="$prefix"
17339   prefix="$acl_final_prefix"
17340   acl_save_exec_prefix="$exec_prefix"
17341   exec_prefix="$acl_final_exec_prefix"
17342   eval x=\"$x\"
17343   exec_prefix="$acl_save_exec_prefix"
17344   prefix="$acl_save_prefix"
17345
17346                           if test "X$x" = "X-L$additional_libdir"; then
17347                             haveit=yes
17348                             break
17349                           fi
17350                         done
17351                         if test -z "$haveit"; then
17352                           if test -d "$additional_libdir"; then
17353                                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17354                           fi
17355                         fi
17356                         haveit=
17357                         for x in $LDFLAGS $LTLIBBABELTRACE; do
17358
17359   acl_save_prefix="$prefix"
17360   prefix="$acl_final_prefix"
17361   acl_save_exec_prefix="$exec_prefix"
17362   exec_prefix="$acl_final_exec_prefix"
17363   eval x=\"$x\"
17364   exec_prefix="$acl_save_exec_prefix"
17365   prefix="$acl_save_prefix"
17366
17367                           if test "X$x" = "X-L$additional_libdir"; then
17368                             haveit=yes
17369                             break
17370                           fi
17371                         done
17372                         if test -z "$haveit"; then
17373                           if test -d "$additional_libdir"; then
17374                                                         LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17375                           fi
17376                         fi
17377                       fi
17378                     fi
17379                     ;;
17380                   -R*)
17381                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
17382                     if test "$enable_rpath" != no; then
17383                                                                   haveit=
17384                       for x in $rpathdirs; do
17385                         if test "X$x" = "X$dir"; then
17386                           haveit=yes
17387                           break
17388                         fi
17389                       done
17390                       if test -z "$haveit"; then
17391                         rpathdirs="$rpathdirs $dir"
17392                       fi
17393                                                                   haveit=
17394                       for x in $ltrpathdirs; do
17395                         if test "X$x" = "X$dir"; then
17396                           haveit=yes
17397                           break
17398                         fi
17399                       done
17400                       if test -z "$haveit"; then
17401                         ltrpathdirs="$ltrpathdirs $dir"
17402                       fi
17403                     fi
17404                     ;;
17405                   -l*)
17406                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17407                     ;;
17408                   *.la)
17409                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17410                     ;;
17411                   *)
17412                                         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17413                     LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17414                     ;;
17415                 esac
17416               done
17417             fi
17418           else
17419                                                             LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17420             LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17421           fi
17422         fi
17423       fi
17424     done
17425   done
17426   if test "X$rpathdirs" != "X"; then
17427     if test -n "$hardcode_libdir_separator"; then
17428                         alldirs=
17429       for found_dir in $rpathdirs; do
17430         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17431       done
17432             acl_save_libdir="$libdir"
17433       libdir="$alldirs"
17434       eval flag=\"$hardcode_libdir_flag_spec\"
17435       libdir="$acl_save_libdir"
17436       LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17437     else
17438             for found_dir in $rpathdirs; do
17439         acl_save_libdir="$libdir"
17440         libdir="$found_dir"
17441         eval flag=\"$hardcode_libdir_flag_spec\"
17442         libdir="$acl_save_libdir"
17443         LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17444       done
17445     fi
17446   fi
17447   if test "X$ltrpathdirs" != "X"; then
17448             for found_dir in $ltrpathdirs; do
17449       LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17450     done
17451   fi
17452
17453
17454         ac_save_CPPFLAGS="$CPPFLAGS"
17455
17456   for element in $INCBABELTRACE; do
17457     haveit=
17458     for x in $CPPFLAGS; do
17459
17460   acl_save_prefix="$prefix"
17461   prefix="$acl_final_prefix"
17462   acl_save_exec_prefix="$exec_prefix"
17463   exec_prefix="$acl_final_exec_prefix"
17464   eval x=\"$x\"
17465   exec_prefix="$acl_save_exec_prefix"
17466   prefix="$acl_save_prefix"
17467
17468       if test "X$x" = "X$element"; then
17469         haveit=yes
17470         break
17471       fi
17472     done
17473     if test -z "$haveit"; then
17474       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17475     fi
17476   done
17477
17478
17479   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17480 $as_echo_n "checking for libbabeltrace... " >&6; }
17481 if ${ac_cv_libbabeltrace+:} false; then :
17482   $as_echo_n "(cached) " >&6
17483 else
17484
17485     ac_save_LIBS="$LIBS"
17486     LIBS="$LIBS $LIBBABELTRACE"
17487     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17488 /* end confdefs.h.  */
17489 #include <babeltrace/babeltrace.h>
17490                          #include <babeltrace/ctf/events.h>
17491                          #include <babeltrace/ctf/iterator.h>
17492 int
17493 main ()
17494 {
17495 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17496                         struct bt_ctf_event *event = NULL;
17497                         const struct bt_definition *scope;
17498
17499                         pos->type = BT_SEEK_BEGIN;
17500                         bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
17501                         scope = bt_ctf_get_top_level_scope (event,
17502                                                            BT_STREAM_EVENT_HEADER);
17503                         bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17504
17505   ;
17506   return 0;
17507 }
17508 _ACEOF
17509 if ac_fn_c_try_link "$LINENO"; then :
17510   ac_cv_libbabeltrace=yes
17511 else
17512   ac_cv_libbabeltrace=no
17513 fi
17514 rm -f core conftest.err conftest.$ac_objext \
17515     conftest$ac_exeext conftest.$ac_ext
17516     LIBS="$ac_save_LIBS"
17517
17518 fi
17519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17520 $as_echo "$ac_cv_libbabeltrace" >&6; }
17521   if test "$ac_cv_libbabeltrace" = yes; then
17522     HAVE_LIBBABELTRACE=yes
17523
17524 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17525
17526     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17527 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
17528     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17529 $as_echo "$LIBBABELTRACE" >&6; }
17530   else
17531     HAVE_LIBBABELTRACE=no
17532             CPPFLAGS="$ac_save_CPPFLAGS"
17533     LIBBABELTRACE=
17534     LTLIBBABELTRACE=
17535   fi
17536
17537
17538
17539
17540
17541
17542   CFLAGS=$saved_CFLAGS
17543
17544   if test "$HAVE_LIBBABELTRACE" != yes; then
17545      if test "$with_babeltrace" = yes; then
17546        as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
17547      else
17548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17549 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17550      fi
17551   fi
17552 fi
17553
17554 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17555 # empty version.
17556
17557 files=
17558 links=
17559
17560 rm -f nm.h
17561 if test "${nativefile}" != ""; then
17562     case "${nativefile}" in
17563       nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17564       * ) GDB_NM_FILE="${nativefile}"
17565     esac
17566     files="${files} ${GDB_NM_FILE}"
17567     links="${links} nm.h"
17568
17569 cat >>confdefs.h <<_ACEOF
17570 #define GDB_NM_FILE "${GDB_NM_FILE}"
17571 _ACEOF
17572
17573 fi
17574
17575
17576 for ac_prog in xsltproc
17577 do
17578   # Extract the first word of "$ac_prog", so it can be a program name with args.
17579 set dummy $ac_prog; ac_word=$2
17580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17581 $as_echo_n "checking for $ac_word... " >&6; }
17582 if ${ac_cv_path_XSLTPROC+:} false; then :
17583   $as_echo_n "(cached) " >&6
17584 else
17585   case $XSLTPROC in
17586   [\\/]* | ?:[\\/]*)
17587   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17588   ;;
17589   *)
17590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17591 for as_dir in $PATH
17592 do
17593   IFS=$as_save_IFS
17594   test -z "$as_dir" && as_dir=.
17595     for ac_exec_ext in '' $ac_executable_extensions; do
17596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17597     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17599     break 2
17600   fi
17601 done
17602   done
17603 IFS=$as_save_IFS
17604
17605   ;;
17606 esac
17607 fi
17608 XSLTPROC=$ac_cv_path_XSLTPROC
17609 if test -n "$XSLTPROC"; then
17610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17611 $as_echo "$XSLTPROC" >&6; }
17612 else
17613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17614 $as_echo "no" >&6; }
17615 fi
17616
17617
17618   test -n "$XSLTPROC" && break
17619 done
17620 test -n "$XSLTPROC" || XSLTPROC="missing"
17621
17622 if test "x$USE_MAINTAINER_MODE" = xyes; then
17623   if test "${XSLTPROC}" = missing; then
17624     as_fn_error $? "unable to find xsltproc.  maintainer-mode requires xsltproc." "$LINENO" 5
17625   fi
17626 fi
17627
17628
17629 ac_sources="$files"
17630 ac_dests="$links"
17631 while test -n "$ac_sources"; do
17632   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17633   set $ac_sources; ac_source=$1; shift; ac_sources=$*
17634   ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17635 done
17636 ac_config_links="$ac_config_links $ac_config_links_1"
17637
17638
17639
17640
17641
17642 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
17643
17644
17645
17646 # Check whether we will enable the inclusion of unit tests when
17647 # compiling GDB.
17648 #
17649 # The default value of this option changes depending whether we're on
17650 # development mode (in which case it's "true") or not (in which case
17651 # it's "false").
17652 # Check whether --enable-unit-tests was given.
17653 if test "${enable_unit_tests+set}" = set; then :
17654   enableval=$enable_unit_tests; case "${enableval}" in
17655   yes)  enable_unittests=true  ;;
17656   no)   enable_unittests=false ;;
17657   *)    as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
17658 esac
17659 else
17660   enable_unittests=$development
17661 fi
17662
17663
17664 if $enable_unittests; then
17665
17666 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17667
17668
17669   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) gdbsupport/selftest.o selftest-arch.o"
17670   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) gdbsupport/selftest.c selftest-arch.c"
17671
17672 fi
17673
17674
17675
17676   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17677   GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17678   if test "x$GDB_TRANSFORM_NAME" = x; then
17679      GDB_TRANSFORM_NAME=gdb
17680   fi
17681
17682
17683
17684   gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17685   GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17686   if test "x$GCORE_TRANSFORM_NAME" = x; then
17687      GCORE_TRANSFORM_NAME=gcore
17688   fi
17689
17690
17691 ac_config_files="$ac_config_files gcore"
17692
17693 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
17694
17695
17696 cat >confcache <<\_ACEOF
17697 # This file is a shell script that caches the results of configure
17698 # tests run on this system so they can be shared between configure
17699 # scripts and configure runs, see configure's option --config-cache.
17700 # It is not useful on other systems.  If it contains results you don't
17701 # want to keep, you may remove or edit it.
17702 #
17703 # config.status only pays attention to the cache file if you give it
17704 # the --recheck option to rerun configure.
17705 #
17706 # `ac_cv_env_foo' variables (set or unset) will be overridden when
17707 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17708 # following values.
17709
17710 _ACEOF
17711
17712 # The following way of writing the cache mishandles newlines in values,
17713 # but we know of no workaround that is simple, portable, and efficient.
17714 # So, we kill variables containing newlines.
17715 # Ultrix sh set writes to stderr and can't be redirected directly,
17716 # and sets the high bit in the cache file unless we assign to the vars.
17717 (
17718   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17719     eval ac_val=\$$ac_var
17720     case $ac_val in #(
17721     *${as_nl}*)
17722       case $ac_var in #(
17723       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17724 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17725       esac
17726       case $ac_var in #(
17727       _ | IFS | as_nl) ;; #(
17728       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17729       *) { eval $ac_var=; unset $ac_var;} ;;
17730       esac ;;
17731     esac
17732   done
17733
17734   (set) 2>&1 |
17735     case $as_nl`(ac_space=' '; set) 2>&1` in #(
17736     *${as_nl}ac_space=\ *)
17737       # `set' does not quote correctly, so add quotes: double-quote
17738       # substitution turns \\\\ into \\, and sed turns \\ into \.
17739       sed -n \
17740         "s/'/'\\\\''/g;
17741           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17742       ;; #(
17743     *)
17744       # `set' quotes correctly as required by POSIX, so do not add quotes.
17745       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
17746       ;;
17747     esac |
17748     sort
17749 ) |
17750   sed '
17751      /^ac_cv_env_/b end
17752      t clear
17753      :clear
17754      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17755      t end
17756      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17757      :end' >>confcache
17758 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17759   if test -w "$cache_file"; then
17760     if test "x$cache_file" != "x/dev/null"; then
17761       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17762 $as_echo "$as_me: updating cache $cache_file" >&6;}
17763       if test ! -f "$cache_file" || test -h "$cache_file"; then
17764         cat confcache >"$cache_file"
17765       else
17766         case $cache_file in #(
17767         */* | ?:*)
17768           mv -f confcache "$cache_file"$$ &&
17769           mv -f "$cache_file"$$ "$cache_file" ;; #(
17770         *)
17771           mv -f confcache "$cache_file" ;;
17772         esac
17773       fi
17774     fi
17775   else
17776     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17777 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
17778   fi
17779 fi
17780 rm -f confcache
17781
17782 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17783 # Let make expand exec_prefix.
17784 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17785
17786 DEFS=-DHAVE_CONFIG_H
17787
17788 ac_libobjs=
17789 ac_ltlibobjs=
17790 U=
17791 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17792   # 1. Remove the extension, and $U if already installed.
17793   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17794   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17795   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
17796   #    will be set to the directory where LIBOBJS objects are built.
17797   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17798   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
17799 done
17800 LIBOBJS=$ac_libobjs
17801
17802 LTLIBOBJS=$ac_ltlibobjs
17803
17804
17805 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
17806   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
17807 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17808 fi
17809 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17810   as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
17811 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17812 fi
17813 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17814   as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
17815 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17816 fi
17817
17818
17819 : "${CONFIG_STATUS=./config.status}"
17820 ac_write_fail=0
17821 ac_clean_files_save=$ac_clean_files
17822 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17823 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17824 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17825 as_write_fail=0
17826 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
17827 #! $SHELL
17828 # Generated by $as_me.
17829 # Run this file to recreate the current configuration.
17830 # Compiler output produced by configure, useful for debugging
17831 # configure, is in config.log if it exists.
17832
17833 debug=false
17834 ac_cs_recheck=false
17835 ac_cs_silent=false
17836
17837 SHELL=\${CONFIG_SHELL-$SHELL}
17838 export SHELL
17839 _ASEOF
17840 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17841 ## -------------------- ##
17842 ## M4sh Initialization. ##
17843 ## -------------------- ##
17844
17845 # Be more Bourne compatible
17846 DUALCASE=1; export DUALCASE # for MKS sh
17847 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17848   emulate sh
17849   NULLCMD=:
17850   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
17851   # is contrary to our usage.  Disable this feature.
17852   alias -g '${1+"$@"}'='"$@"'
17853   setopt NO_GLOB_SUBST
17854 else
17855   case `(set -o) 2>/dev/null` in #(
17856   *posix*) :
17857     set -o posix ;; #(
17858   *) :
17859      ;;
17860 esac
17861 fi
17862
17863
17864 as_nl='
17865 '
17866 export as_nl
17867 # Printing a long string crashes Solaris 7 /usr/bin/printf.
17868 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17869 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17870 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17871 # Prefer a ksh shell builtin over an external printf program on Solaris,
17872 # but without wasting forks for bash or zsh.
17873 if test -z "$BASH_VERSION$ZSH_VERSION" \
17874     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17875   as_echo='print -r --'
17876   as_echo_n='print -rn --'
17877 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17878   as_echo='printf %s\n'
17879   as_echo_n='printf %s'
17880 else
17881   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17882     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17883     as_echo_n='/usr/ucb/echo -n'
17884   else
17885     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17886     as_echo_n_body='eval
17887       arg=$1;
17888       case $arg in #(
17889       *"$as_nl"*)
17890         expr "X$arg" : "X\\(.*\\)$as_nl";
17891         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17892       esac;
17893       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17894     '
17895     export as_echo_n_body
17896     as_echo_n='sh -c $as_echo_n_body as_echo'
17897   fi
17898   export as_echo_body
17899   as_echo='sh -c $as_echo_body as_echo'
17900 fi
17901
17902 # The user is always right.
17903 if test "${PATH_SEPARATOR+set}" != set; then
17904   PATH_SEPARATOR=:
17905   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17906     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17907       PATH_SEPARATOR=';'
17908   }
17909 fi
17910
17911
17912 # IFS
17913 # We need space, tab and new line, in precisely that order.  Quoting is
17914 # there to prevent editors from complaining about space-tab.
17915 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
17916 # splitting by setting IFS to empty value.)
17917 IFS=" ""        $as_nl"
17918
17919 # Find who we are.  Look in the path if we contain no directory separator.
17920 as_myself=
17921 case $0 in #((
17922   *[\\/]* ) as_myself=$0 ;;
17923   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17924 for as_dir in $PATH
17925 do
17926   IFS=$as_save_IFS
17927   test -z "$as_dir" && as_dir=.
17928     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17929   done
17930 IFS=$as_save_IFS
17931
17932      ;;
17933 esac
17934 # We did not find ourselves, most probably we were run as `sh COMMAND'
17935 # in which case we are not to be found in the path.
17936 if test "x$as_myself" = x; then
17937   as_myself=$0
17938 fi
17939 if test ! -f "$as_myself"; then
17940   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17941   exit 1
17942 fi
17943
17944 # Unset variables that we do not need and which cause bugs (e.g. in
17945 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
17946 # suppresses any "Segmentation fault" message there.  '((' could
17947 # trigger a bug in pdksh 5.2.14.
17948 for as_var in BASH_ENV ENV MAIL MAILPATH
17949 do eval test x\${$as_var+set} = xset \
17950   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17951 done
17952 PS1='$ '
17953 PS2='> '
17954 PS4='+ '
17955
17956 # NLS nuisances.
17957 LC_ALL=C
17958 export LC_ALL
17959 LANGUAGE=C
17960 export LANGUAGE
17961
17962 # CDPATH.
17963 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17964
17965
17966 # as_fn_error STATUS ERROR [LINENO LOG_FD]
17967 # ----------------------------------------
17968 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17969 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17970 # script with STATUS, using 1 if that was 0.
17971 as_fn_error ()
17972 {
17973   as_status=$1; test $as_status -eq 0 && as_status=1
17974   if test "$4"; then
17975     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17976     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
17977   fi
17978   $as_echo "$as_me: error: $2" >&2
17979   as_fn_exit $as_status
17980 } # as_fn_error
17981
17982
17983 # as_fn_set_status STATUS
17984 # -----------------------
17985 # Set $? to STATUS, without forking.
17986 as_fn_set_status ()
17987 {
17988   return $1
17989 } # as_fn_set_status
17990
17991 # as_fn_exit STATUS
17992 # -----------------
17993 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17994 as_fn_exit ()
17995 {
17996   set +e
17997   as_fn_set_status $1
17998   exit $1
17999 } # as_fn_exit
18000
18001 # as_fn_unset VAR
18002 # ---------------
18003 # Portably unset VAR.
18004 as_fn_unset ()
18005 {
18006   { eval $1=; unset $1;}
18007 }
18008 as_unset=as_fn_unset
18009 # as_fn_append VAR VALUE
18010 # ----------------------
18011 # Append the text in VALUE to the end of the definition contained in VAR. Take
18012 # advantage of any shell optimizations that allow amortized linear growth over
18013 # repeated appends, instead of the typical quadratic growth present in naive
18014 # implementations.
18015 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18016   eval 'as_fn_append ()
18017   {
18018     eval $1+=\$2
18019   }'
18020 else
18021   as_fn_append ()
18022   {
18023     eval $1=\$$1\$2
18024   }
18025 fi # as_fn_append
18026
18027 # as_fn_arith ARG...
18028 # ------------------
18029 # Perform arithmetic evaluation on the ARGs, and store the result in the
18030 # global $as_val. Take advantage of shells that can avoid forks. The arguments
18031 # must be portable across $(()) and expr.
18032 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18033   eval 'as_fn_arith ()
18034   {
18035     as_val=$(( $* ))
18036   }'
18037 else
18038   as_fn_arith ()
18039   {
18040     as_val=`expr "$@" || test $? -eq 1`
18041   }
18042 fi # as_fn_arith
18043
18044
18045 if expr a : '\(a\)' >/dev/null 2>&1 &&
18046    test "X`expr 00001 : '.*\(...\)'`" = X001; then
18047   as_expr=expr
18048 else
18049   as_expr=false
18050 fi
18051
18052 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18053   as_basename=basename
18054 else
18055   as_basename=false
18056 fi
18057
18058 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18059   as_dirname=dirname
18060 else
18061   as_dirname=false
18062 fi
18063
18064 as_me=`$as_basename -- "$0" ||
18065 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18066          X"$0" : 'X\(//\)$' \| \
18067          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18068 $as_echo X/"$0" |
18069     sed '/^.*\/\([^/][^/]*\)\/*$/{
18070             s//\1/
18071             q
18072           }
18073           /^X\/\(\/\/\)$/{
18074             s//\1/
18075             q
18076           }
18077           /^X\/\(\/\).*/{
18078             s//\1/
18079             q
18080           }
18081           s/.*/./; q'`
18082
18083 # Avoid depending upon Character Ranges.
18084 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18085 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18086 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18087 as_cr_digits='0123456789'
18088 as_cr_alnum=$as_cr_Letters$as_cr_digits
18089
18090 ECHO_C= ECHO_N= ECHO_T=
18091 case `echo -n x` in #(((((
18092 -n*)
18093   case `echo 'xy\c'` in
18094   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
18095   xy)  ECHO_C='\c';;
18096   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
18097        ECHO_T=' ';;
18098   esac;;
18099 *)
18100   ECHO_N='-n';;
18101 esac
18102
18103 rm -f conf$$ conf$$.exe conf$$.file
18104 if test -d conf$$.dir; then
18105   rm -f conf$$.dir/conf$$.file
18106 else
18107   rm -f conf$$.dir
18108   mkdir conf$$.dir 2>/dev/null
18109 fi
18110 if (echo >conf$$.file) 2>/dev/null; then
18111   if ln -s conf$$.file conf$$ 2>/dev/null; then
18112     as_ln_s='ln -s'
18113     # ... but there are two gotchas:
18114     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18115     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18116     # In both cases, we have to default to `cp -pR'.
18117     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18118       as_ln_s='cp -pR'
18119   elif ln conf$$.file conf$$ 2>/dev/null; then
18120     as_ln_s=ln
18121   else
18122     as_ln_s='cp -pR'
18123   fi
18124 else
18125   as_ln_s='cp -pR'
18126 fi
18127 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18128 rmdir conf$$.dir 2>/dev/null
18129
18130
18131 # as_fn_mkdir_p
18132 # -------------
18133 # Create "$as_dir" as a directory, including parents if necessary.
18134 as_fn_mkdir_p ()
18135 {
18136
18137   case $as_dir in #(
18138   -*) as_dir=./$as_dir;;
18139   esac
18140   test -d "$as_dir" || eval $as_mkdir_p || {
18141     as_dirs=
18142     while :; do
18143       case $as_dir in #(
18144       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18145       *) as_qdir=$as_dir;;
18146       esac
18147       as_dirs="'$as_qdir' $as_dirs"
18148       as_dir=`$as_dirname -- "$as_dir" ||
18149 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18150          X"$as_dir" : 'X\(//\)[^/]' \| \
18151          X"$as_dir" : 'X\(//\)$' \| \
18152          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18153 $as_echo X"$as_dir" |
18154     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18155             s//\1/
18156             q
18157           }
18158           /^X\(\/\/\)[^/].*/{
18159             s//\1/
18160             q
18161           }
18162           /^X\(\/\/\)$/{
18163             s//\1/
18164             q
18165           }
18166           /^X\(\/\).*/{
18167             s//\1/
18168             q
18169           }
18170           s/.*/./; q'`
18171       test -d "$as_dir" && break
18172     done
18173     test -z "$as_dirs" || eval "mkdir $as_dirs"
18174   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
18175
18176
18177 } # as_fn_mkdir_p
18178 if mkdir -p . 2>/dev/null; then
18179   as_mkdir_p='mkdir -p "$as_dir"'
18180 else
18181   test -d ./-p && rmdir ./-p
18182   as_mkdir_p=false
18183 fi
18184
18185
18186 # as_fn_executable_p FILE
18187 # -----------------------
18188 # Test if FILE is an executable regular file.
18189 as_fn_executable_p ()
18190 {
18191   test -f "$1" && test -x "$1"
18192 } # as_fn_executable_p
18193 as_test_x='test -x'
18194 as_executable_p=as_fn_executable_p
18195
18196 # Sed expression to map a string onto a valid CPP name.
18197 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18198
18199 # Sed expression to map a string onto a valid variable name.
18200 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18201
18202
18203 exec 6>&1
18204 ## ----------------------------------- ##
18205 ## Main body of $CONFIG_STATUS script. ##
18206 ## ----------------------------------- ##
18207 _ASEOF
18208 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18209
18210 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18211 # Save the log message, to keep $0 and so on meaningful, and to
18212 # report actual input values of CONFIG_FILES etc. instead of their
18213 # values after options handling.
18214 ac_log="
18215 This file was extended by $as_me, which was
18216 generated by GNU Autoconf 2.69.  Invocation command line was
18217
18218   CONFIG_FILES    = $CONFIG_FILES
18219   CONFIG_HEADERS  = $CONFIG_HEADERS
18220   CONFIG_LINKS    = $CONFIG_LINKS
18221   CONFIG_COMMANDS = $CONFIG_COMMANDS
18222   $ $0 $@
18223
18224 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18225 "
18226
18227 _ACEOF
18228
18229 case $ac_config_files in *"
18230 "*) set x $ac_config_files; shift; ac_config_files=$*;;
18231 esac
18232
18233 case $ac_config_headers in *"
18234 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18235 esac
18236
18237
18238 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18239 # Files that config.status was made for.
18240 config_files="$ac_config_files"
18241 config_headers="$ac_config_headers"
18242 config_links="$ac_config_links"
18243 config_commands="$ac_config_commands"
18244
18245 _ACEOF
18246
18247 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18248 ac_cs_usage="\
18249 \`$as_me' instantiates files and other configuration actions
18250 from templates according to the current configuration.  Unless the files
18251 and actions are specified as TAGs, all are instantiated by default.
18252
18253 Usage: $0 [OPTION]... [TAG]...
18254
18255   -h, --help       print this help, then exit
18256   -V, --version    print version number and configuration settings, then exit
18257       --config     print configuration, then exit
18258   -q, --quiet, --silent
18259                    do not print progress messages
18260   -d, --debug      don't remove temporary files
18261       --recheck    update $as_me by reconfiguring in the same conditions
18262       --file=FILE[:TEMPLATE]
18263                    instantiate the configuration file FILE
18264       --header=FILE[:TEMPLATE]
18265                    instantiate the configuration header FILE
18266
18267 Configuration files:
18268 $config_files
18269
18270 Configuration headers:
18271 $config_headers
18272
18273 Configuration links:
18274 $config_links
18275
18276 Configuration commands:
18277 $config_commands
18278
18279 Report bugs to the package provider."
18280
18281 _ACEOF
18282 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18283 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
18284 ac_cs_version="\\
18285 config.status
18286 configured by $0, generated by GNU Autoconf 2.69,
18287   with options \\"\$ac_cs_config\\"
18288
18289 Copyright (C) 2012 Free Software Foundation, Inc.
18290 This config.status script is free software; the Free Software Foundation
18291 gives unlimited permission to copy, distribute and modify it."
18292
18293 ac_pwd='$ac_pwd'
18294 srcdir='$srcdir'
18295 INSTALL='$INSTALL'
18296 AWK='$AWK'
18297 test -n "\$AWK" || AWK=awk
18298 _ACEOF
18299
18300 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18301 # The default lists apply if the user does not specify any file.
18302 ac_need_defaults=:
18303 while test $# != 0
18304 do
18305   case $1 in
18306   --*=?*)
18307     ac_option=`expr "X$1" : 'X\([^=]*\)='`
18308     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18309     ac_shift=:
18310     ;;
18311   --*=)
18312     ac_option=`expr "X$1" : 'X\([^=]*\)='`
18313     ac_optarg=
18314     ac_shift=:
18315     ;;
18316   *)
18317     ac_option=$1
18318     ac_optarg=$2
18319     ac_shift=shift
18320     ;;
18321   esac
18322
18323   case $ac_option in
18324   # Handling of the options.
18325   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18326     ac_cs_recheck=: ;;
18327   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18328     $as_echo "$ac_cs_version"; exit ;;
18329   --config | --confi | --conf | --con | --co | --c )
18330     $as_echo "$ac_cs_config"; exit ;;
18331   --debug | --debu | --deb | --de | --d | -d )
18332     debug=: ;;
18333   --file | --fil | --fi | --f )
18334     $ac_shift
18335     case $ac_optarg in
18336     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18337     '') as_fn_error $? "missing file argument" ;;
18338     esac
18339     as_fn_append CONFIG_FILES " '$ac_optarg'"
18340     ac_need_defaults=false;;
18341   --header | --heade | --head | --hea )
18342     $ac_shift
18343     case $ac_optarg in
18344     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18345     esac
18346     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
18347     ac_need_defaults=false;;
18348   --he | --h)
18349     # Conflict between --help and --header
18350     as_fn_error $? "ambiguous option: \`$1'
18351 Try \`$0 --help' for more information.";;
18352   --help | --hel | -h )
18353     $as_echo "$ac_cs_usage"; exit ;;
18354   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18355   | -silent | --silent | --silen | --sile | --sil | --si | --s)
18356     ac_cs_silent=: ;;
18357
18358   # This is an error.
18359   -*) as_fn_error $? "unrecognized option: \`$1'
18360 Try \`$0 --help' for more information." ;;
18361
18362   *) as_fn_append ac_config_targets " $1"
18363      ac_need_defaults=false ;;
18364
18365   esac
18366   shift
18367 done
18368
18369 ac_configure_extra_args=
18370
18371 if $ac_cs_silent; then
18372   exec 6>/dev/null
18373   ac_configure_extra_args="$ac_configure_extra_args --silent"
18374 fi
18375
18376 _ACEOF
18377 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18378 if \$ac_cs_recheck; then
18379   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18380   shift
18381   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18382   CONFIG_SHELL='$SHELL'
18383   export CONFIG_SHELL
18384   exec "\$@"
18385 fi
18386
18387 _ACEOF
18388 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18389 exec 5>>config.log
18390 {
18391   echo
18392   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18393 ## Running $as_me. ##
18394 _ASBOX
18395   $as_echo "$ac_log"
18396 } >&5
18397
18398 _ACEOF
18399 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18400 #
18401 # INIT-COMMANDS
18402 #
18403 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
18404
18405 _ACEOF
18406
18407 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18408
18409 # Handling of arguments.
18410 for ac_config_target in $ac_config_targets
18411 do
18412   case $ac_config_target in
18413     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18414     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
18415     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
18416     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
18417     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
18418     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18419     "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
18420     "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
18421     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
18422     "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
18423
18424   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
18425   esac
18426 done
18427
18428
18429 # If the user did not use the arguments to specify the items to instantiate,
18430 # then the envvar interface is used.  Set only those that are not.
18431 # We use the long form for the default assignment because of an extremely
18432 # bizarre bug on SunOS 4.1.3.
18433 if $ac_need_defaults; then
18434   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18435   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18436   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18437   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18438 fi
18439
18440 # Have a temporary directory for convenience.  Make it in the build tree
18441 # simply because there is no reason against having it here, and in addition,
18442 # creating and moving files from /tmp can sometimes cause problems.
18443 # Hook for its removal unless debugging.
18444 # Note that there is a small window in which the directory will not be cleaned:
18445 # after its creation but before its name has been assigned to `$tmp'.
18446 $debug ||
18447 {
18448   tmp= ac_tmp=
18449   trap 'exit_status=$?
18450   : "${ac_tmp:=$tmp}"
18451   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
18452 ' 0
18453   trap 'as_fn_exit 1' 1 2 13 15
18454 }
18455 # Create a (secure) tmp directory for tmp files.
18456
18457 {
18458   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18459   test -d "$tmp"
18460 }  ||
18461 {
18462   tmp=./conf$$-$RANDOM
18463   (umask 077 && mkdir "$tmp")
18464 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18465 ac_tmp=$tmp
18466
18467 # Set up the scripts for CONFIG_FILES section.
18468 # No need to generate them if there are no CONFIG_FILES.
18469 # This happens for instance with `./config.status config.h'.
18470 if test -n "$CONFIG_FILES"; then
18471
18472 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18473   ac_cs_awk_getline=:
18474   ac_cs_awk_pipe_init=
18475   ac_cs_awk_read_file='
18476       while ((getline aline < (F[key])) > 0)
18477         print(aline)
18478       close(F[key])'
18479   ac_cs_awk_pipe_fini=
18480 else
18481   ac_cs_awk_getline=false
18482   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18483   ac_cs_awk_read_file='
18484       print "|#_!!_#|"
18485       print "cat " F[key] " &&"
18486       '$ac_cs_awk_pipe_init
18487   # The final `:' finishes the AND list.
18488   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18489 fi
18490 ac_cr=`echo X | tr X '\015'`
18491 # On cygwin, bash can eat \r inside `` if the user requested igncr.
18492 # But we know of no other shell where ac_cr would be empty at this
18493 # point, so we can use a bashism as a fallback.
18494 if test "x$ac_cr" = x; then
18495   eval ac_cr=\$\'\\r\'
18496 fi
18497 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18498 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18499   ac_cs_awk_cr='\\r'
18500 else
18501   ac_cs_awk_cr=$ac_cr
18502 fi
18503
18504 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
18505 _ACEOF
18506
18507 # Create commands to substitute file output variables.
18508 {
18509   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18510   echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
18511   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18512   echo "_ACAWK" &&
18513   echo "_ACEOF"
18514 } >conf$$files.sh &&
18515 . ./conf$$files.sh ||
18516   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18517 rm -f conf$$files.sh
18518
18519 {
18520   echo "cat >conf$$subs.awk <<_ACEOF" &&
18521   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18522   echo "_ACEOF"
18523 } >conf$$subs.sh ||
18524   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18525 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
18526 ac_delim='%!_!# '
18527 for ac_last_try in false false false false false :; do
18528   . ./conf$$subs.sh ||
18529     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18530
18531   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18532   if test $ac_delim_n = $ac_delim_num; then
18533     break
18534   elif $ac_last_try; then
18535     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18536   else
18537     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18538   fi
18539 done
18540 rm -f conf$$subs.sh
18541
18542 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18543 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
18544 _ACEOF
18545 sed -n '
18546 h
18547 s/^/S["/; s/!.*/"]=/
18548 p
18549 g
18550 s/^[^!]*!//
18551 :repl
18552 t repl
18553 s/'"$ac_delim"'$//
18554 t delim
18555 :nl
18556 h
18557 s/\(.\{148\}\)..*/\1/
18558 t more1
18559 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18560 p
18561 n
18562 b repl
18563 :more1
18564 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18565 p
18566 g
18567 s/.\{148\}//
18568 t nl
18569 :delim
18570 h
18571 s/\(.\{148\}\)..*/\1/
18572 t more2
18573 s/["\\]/\\&/g; s/^/"/; s/$/"/
18574 p
18575 b
18576 :more2
18577 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18578 p
18579 g
18580 s/.\{148\}//
18581 t delim
18582 ' <conf$$subs.awk | sed '
18583 /^[^""]/{
18584   N
18585   s/\n//
18586 }
18587 ' >>$CONFIG_STATUS || ac_write_fail=1
18588 rm -f conf$$subs.awk
18589 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18590 _ACAWK
18591 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
18592   for (key in S) S_is_set[key] = 1
18593   FS = "\a"
18594   \$ac_cs_awk_pipe_init
18595 }
18596 {
18597   line = $ 0
18598   nfields = split(line, field, "@")
18599   substed = 0
18600   len = length(field[1])
18601   for (i = 2; i < nfields; i++) {
18602     key = field[i]
18603     keylen = length(key)
18604     if (S_is_set[key]) {
18605       value = S[key]
18606       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18607       len += length(value) + length(field[++i])
18608       substed = 1
18609     } else
18610       len += 1 + keylen
18611   }
18612   if (nfields == 3 && !substed) {
18613     key = field[2]
18614     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
18615       \$ac_cs_awk_read_file
18616       next
18617     }
18618   }
18619   print line
18620 }
18621 \$ac_cs_awk_pipe_fini
18622 _ACAWK
18623 _ACEOF
18624 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18625 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18626   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18627 else
18628   cat
18629 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18630   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
18631 _ACEOF
18632
18633 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18634 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
18635 # trailing colons and then remove the whole line if VPATH becomes empty
18636 # (actually we leave an empty line to preserve line numbers).
18637 if test "x$srcdir" = x.; then
18638   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
18639 h
18640 s///
18641 s/^/:/
18642 s/[      ]*$/:/
18643 s/:\$(srcdir):/:/g
18644 s/:\${srcdir}:/:/g
18645 s/:@srcdir@:/:/g
18646 s/^:*//
18647 s/:*$//
18648 x
18649 s/\(=[   ]*\).*/\1/
18650 G
18651 s/\n//
18652 s/^[^=]*=[       ]*$//
18653 }'
18654 fi
18655
18656 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18657 fi # test -n "$CONFIG_FILES"
18658
18659 # Set up the scripts for CONFIG_HEADERS section.
18660 # No need to generate them if there are no CONFIG_HEADERS.
18661 # This happens for instance with `./config.status Makefile'.
18662 if test -n "$CONFIG_HEADERS"; then
18663 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
18664 BEGIN {
18665 _ACEOF
18666
18667 # Transform confdefs.h into an awk script `defines.awk', embedded as
18668 # here-document in config.status, that substitutes the proper values into
18669 # config.h.in to produce config.h.
18670
18671 # Create a delimiter string that does not exist in confdefs.h, to ease
18672 # handling of long lines.
18673 ac_delim='%!_!# '
18674 for ac_last_try in false false :; do
18675   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18676   if test -z "$ac_tt"; then
18677     break
18678   elif $ac_last_try; then
18679     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
18680   else
18681     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18682   fi
18683 done
18684
18685 # For the awk script, D is an array of macro values keyed by name,
18686 # likewise P contains macro parameters if any.  Preserve backslash
18687 # newline sequences.
18688
18689 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18690 sed -n '
18691 s/.\{148\}/&'"$ac_delim"'/g
18692 t rset
18693 :rset
18694 s/^[     ]*#[    ]*define[       ][      ]*/ /
18695 t def
18696 d
18697 :def
18698 s/\\$//
18699 t bsnl
18700 s/["\\]/\\&/g
18701 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18702 D["\1"]=" \3"/p
18703 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
18704 d
18705 :bsnl
18706 s/["\\]/\\&/g
18707 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18708 D["\1"]=" \3\\\\\\n"\\/p
18709 t cont
18710 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18711 t cont
18712 d
18713 :cont
18714 n
18715 s/.\{148\}/&'"$ac_delim"'/g
18716 t clear
18717 :clear
18718 s/\\$//
18719 t bsnlc
18720 s/["\\]/\\&/g; s/^/"/; s/$/"/p
18721 d
18722 :bsnlc
18723 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18724 b cont
18725 ' <confdefs.h | sed '
18726 s/'"$ac_delim"'/"\\\
18727 "/g' >>$CONFIG_STATUS || ac_write_fail=1
18728
18729 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18730   for (key in D) D_is_set[key] = 1
18731   FS = "\a"
18732 }
18733 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18734   line = \$ 0
18735   split(line, arg, " ")
18736   if (arg[1] == "#") {
18737     defundef = arg[2]
18738     mac1 = arg[3]
18739   } else {
18740     defundef = substr(arg[1], 2)
18741     mac1 = arg[2]
18742   }
18743   split(mac1, mac2, "(") #)
18744   macro = mac2[1]
18745   prefix = substr(line, 1, index(line, defundef) - 1)
18746   if (D_is_set[macro]) {
18747     # Preserve the white space surrounding the "#".
18748     print prefix "define", macro P[macro] D[macro]
18749     next
18750   } else {
18751     # Replace #undef with comments.  This is necessary, for example,
18752     # in the case of _POSIX_SOURCE, which is predefined and required
18753     # on some systems where configure will not decide to define it.
18754     if (defundef == "undef") {
18755       print "/*", prefix defundef, macro, "*/"
18756       next
18757     }
18758   }
18759 }
18760 { print }
18761 _ACAWK
18762 _ACEOF
18763 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18764   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
18765 fi # test -n "$CONFIG_HEADERS"
18766
18767
18768 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
18769 shift
18770 for ac_tag
18771 do
18772   case $ac_tag in
18773   :[FHLC]) ac_mode=$ac_tag; continue;;
18774   esac
18775   case $ac_mode$ac_tag in
18776   :[FHL]*:*);;
18777   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
18778   :[FH]-) ac_tag=-:-;;
18779   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18780   esac
18781   ac_save_IFS=$IFS
18782   IFS=:
18783   set x $ac_tag
18784   IFS=$ac_save_IFS
18785   shift
18786   ac_file=$1
18787   shift
18788
18789   case $ac_mode in
18790   :L) ac_source=$1;;
18791   :[FH])
18792     ac_file_inputs=
18793     for ac_f
18794     do
18795       case $ac_f in
18796       -) ac_f="$ac_tmp/stdin";;
18797       *) # Look for the file first in the build tree, then in the source tree
18798          # (if the path is not absolute).  The absolute path cannot be DOS-style,
18799          # because $ac_f cannot contain `:'.
18800          test -f "$ac_f" ||
18801            case $ac_f in
18802            [\\/$]*) false;;
18803            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18804            esac ||
18805            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18806       esac
18807       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18808       as_fn_append ac_file_inputs " '$ac_f'"
18809     done
18810
18811     # Let's still pretend it is `configure' which instantiates (i.e., don't
18812     # use $as_me), people would be surprised to read:
18813     #    /* config.h.  Generated by config.status.  */
18814     configure_input='Generated from '`
18815           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18816         `' by configure.'
18817     if test x"$ac_file" != x-; then
18818       configure_input="$ac_file.  $configure_input"
18819       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18820 $as_echo "$as_me: creating $ac_file" >&6;}
18821     fi
18822     # Neutralize special characters interpreted by sed in replacement strings.
18823     case $configure_input in #(
18824     *\&* | *\|* | *\\* )
18825        ac_sed_conf_input=`$as_echo "$configure_input" |
18826        sed 's/[\\\\&|]/\\\\&/g'`;; #(
18827     *) ac_sed_conf_input=$configure_input;;
18828     esac
18829
18830     case $ac_tag in
18831     *:-:* | *:-) cat >"$ac_tmp/stdin" \
18832       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
18833     esac
18834     ;;
18835   esac
18836
18837   ac_dir=`$as_dirname -- "$ac_file" ||
18838 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18839          X"$ac_file" : 'X\(//\)[^/]' \| \
18840          X"$ac_file" : 'X\(//\)$' \| \
18841          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18842 $as_echo X"$ac_file" |
18843     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18844             s//\1/
18845             q
18846           }
18847           /^X\(\/\/\)[^/].*/{
18848             s//\1/
18849             q
18850           }
18851           /^X\(\/\/\)$/{
18852             s//\1/
18853             q
18854           }
18855           /^X\(\/\).*/{
18856             s//\1/
18857             q
18858           }
18859           s/.*/./; q'`
18860   as_dir="$ac_dir"; as_fn_mkdir_p
18861   ac_builddir=.
18862
18863 case "$ac_dir" in
18864 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18865 *)
18866   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18867   # A ".." for each directory in $ac_dir_suffix.
18868   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18869   case $ac_top_builddir_sub in
18870   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18871   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18872   esac ;;
18873 esac
18874 ac_abs_top_builddir=$ac_pwd
18875 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18876 # for backward compatibility:
18877 ac_top_builddir=$ac_top_build_prefix
18878
18879 case $srcdir in
18880   .)  # We are building in place.
18881     ac_srcdir=.
18882     ac_top_srcdir=$ac_top_builddir_sub
18883     ac_abs_top_srcdir=$ac_pwd ;;
18884   [\\/]* | ?:[\\/]* )  # Absolute name.
18885     ac_srcdir=$srcdir$ac_dir_suffix;
18886     ac_top_srcdir=$srcdir
18887     ac_abs_top_srcdir=$srcdir ;;
18888   *) # Relative name.
18889     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18890     ac_top_srcdir=$ac_top_build_prefix$srcdir
18891     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18892 esac
18893 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18894
18895
18896   case $ac_mode in
18897   :F)
18898   #
18899   # CONFIG_FILE
18900   #
18901
18902   case $INSTALL in
18903   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18904   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
18905   esac
18906 _ACEOF
18907
18908 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18909 # If the template does not know about datarootdir, expand it.
18910 # FIXME: This hack should be removed a few years after 2.60.
18911 ac_datarootdir_hack=; ac_datarootdir_seen=
18912 ac_sed_dataroot='
18913 /datarootdir/ {
18914   p
18915   q
18916 }
18917 /@datadir@/p
18918 /@docdir@/p
18919 /@infodir@/p
18920 /@localedir@/p
18921 /@mandir@/p'
18922 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18923 *datarootdir*) ac_datarootdir_seen=yes;;
18924 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18925   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18926 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18927 _ACEOF
18928 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18929   ac_datarootdir_hack='
18930   s&@datadir@&$datadir&g
18931   s&@docdir@&$docdir&g
18932   s&@infodir@&$infodir&g
18933   s&@localedir@&$localedir&g
18934   s&@mandir@&$mandir&g
18935   s&\\\${datarootdir}&$datarootdir&g' ;;
18936 esac
18937 _ACEOF
18938
18939 # Neutralize VPATH when `$srcdir' = `.'.
18940 # Shell code in configure.ac might set extrasub.
18941 # FIXME: do we really want to maintain this feature?
18942 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18943 ac_sed_extra="$ac_vpsub
18944 $extrasub
18945 _ACEOF
18946 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18947 :t
18948 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18949 s|@configure_input@|$ac_sed_conf_input|;t t
18950 s&@top_builddir@&$ac_top_builddir_sub&;t t
18951 s&@top_build_prefix@&$ac_top_build_prefix&;t t
18952 s&@srcdir@&$ac_srcdir&;t t
18953 s&@abs_srcdir@&$ac_abs_srcdir&;t t
18954 s&@top_srcdir@&$ac_top_srcdir&;t t
18955 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18956 s&@builddir@&$ac_builddir&;t t
18957 s&@abs_builddir@&$ac_abs_builddir&;t t
18958 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18959 s&@INSTALL@&$ac_INSTALL&;t t
18960 $ac_datarootdir_hack
18961 "
18962 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18963 if $ac_cs_awk_getline; then
18964   $AWK -f "$ac_tmp/subs.awk"
18965 else
18966   $AWK -f "$ac_tmp/subs.awk" | $SHELL
18967 fi \
18968   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18969
18970 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18971   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18972   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
18973       "$ac_tmp/out"`; test -z "$ac_out"; } &&
18974   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18975 which seems to be undefined.  Please make sure it is defined" >&5
18976 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18977 which seems to be undefined.  Please make sure it is defined" >&2;}
18978
18979   rm -f "$ac_tmp/stdin"
18980   case $ac_file in
18981   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18982   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
18983   esac \
18984   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18985  ;;
18986   :H)
18987   #
18988   # CONFIG_HEADER
18989   #
18990   if test x"$ac_file" != x-; then
18991     {
18992       $as_echo "/* $configure_input  */" \
18993       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18994     } >"$ac_tmp/config.h" \
18995       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18996     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
18997       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18998 $as_echo "$as_me: $ac_file is unchanged" >&6;}
18999     else
19000       rm -f "$ac_file"
19001       mv "$ac_tmp/config.h" "$ac_file" \
19002         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19003     fi
19004   else
19005     $as_echo "/* $configure_input  */" \
19006       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19007       || as_fn_error $? "could not create -" "$LINENO" 5
19008   fi
19009  ;;
19010   :L)
19011   #
19012   # CONFIG_LINK
19013   #
19014
19015   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19016     :
19017   else
19018     # Prefer the file from the source tree if names are identical.
19019     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19020       ac_source=$srcdir/$ac_source
19021     fi
19022
19023     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19024 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
19025
19026     if test ! -r "$ac_source"; then
19027       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
19028     fi
19029     rm -f "$ac_file"
19030
19031     # Try a relative symlink, then a hard link, then a copy.
19032     case $ac_source in
19033     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19034         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19035     esac
19036     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19037       ln "$ac_source" "$ac_file" 2>/dev/null ||
19038       cp -p "$ac_source" "$ac_file" ||
19039       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
19040   fi
19041  ;;
19042   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19043 $as_echo "$as_me: executing $ac_file commands" >&6;}
19044  ;;
19045   esac
19046
19047
19048   case $ac_file$ac_mode in
19049     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
19050     "gcore":F) chmod +x gcore ;;
19051     "Makefile":F)
19052 case x$CONFIG_HEADERS in
19053 xconfig.h:config.in)
19054 echo > stamp-h ;;
19055 esac
19056  ;;
19057     "gdb-gdb.gdb":F)
19058 case x$CONFIG_HEADERS in
19059 xconfig.h:config.in)
19060 echo > stamp-h ;;
19061 esac
19062  ;;
19063     "gdb-gdb.py":F)
19064 case x$CONFIG_HEADERS in
19065 xconfig.h:config.in)
19066 echo > stamp-h ;;
19067 esac
19068  ;;
19069     "doc/Makefile":F)
19070 case x$CONFIG_HEADERS in
19071 xconfig.h:config.in)
19072 echo > stamp-h ;;
19073 esac
19074  ;;
19075     "data-directory/Makefile":F)
19076 case x$CONFIG_HEADERS in
19077 xconfig.h:config.in)
19078 echo > stamp-h ;;
19079 esac
19080  ;;
19081
19082   esac
19083 done # for ac_tag
19084
19085
19086 as_fn_exit 0
19087 _ACEOF
19088 ac_clean_files=$ac_clean_files_save
19089
19090 test $ac_write_fail = 0 ||
19091   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
19092
19093
19094 # configure is writing to config.log, and then calls config.status.
19095 # config.status does its own redirection, appending to config.log.
19096 # Unfortunately, on DOS this fails, as config.log is still kept open
19097 # by configure, so config.status won't be able to write to it; its
19098 # output is simply discarded.  So we exec the FD to /dev/null,
19099 # effectively closing config.log, so it can be properly (re)opened and
19100 # appended to by config.status.  When coming back to configure, we
19101 # need to make the FD available again.
19102 if test "$no_create" != yes; then
19103   ac_cs_success=:
19104   ac_config_status_args=
19105   test "$silent" = yes &&
19106     ac_config_status_args="$ac_config_status_args --quiet"
19107   exec 5>/dev/null
19108   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19109   exec 5>>config.log
19110   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19111   # would make configure fail if this is the last instruction.
19112   $ac_cs_success || as_fn_exit 1
19113 fi
19114
19115 #
19116 # CONFIG_SUBDIRS section.
19117 #
19118 if test "$no_recursion" != yes; then
19119
19120   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19121   # so they do not pile up.
19122   ac_sub_configure_args=
19123   ac_prev=
19124   eval "set x $ac_configure_args"
19125   shift
19126   for ac_arg
19127   do
19128     if test -n "$ac_prev"; then
19129       ac_prev=
19130       continue
19131     fi
19132     case $ac_arg in
19133     -cache-file | --cache-file | --cache-fil | --cache-fi \
19134     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19135       ac_prev=cache_file ;;
19136     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
19137     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19138     | --c=*)
19139       ;;
19140     --config-cache | -C)
19141       ;;
19142     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19143       ac_prev=srcdir ;;
19144     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19145       ;;
19146     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19147       ac_prev=prefix ;;
19148     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19149       ;;
19150     --disable-option-checking)
19151       ;;
19152     *)
19153       case $ac_arg in
19154       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19155       esac
19156       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
19157     esac
19158   done
19159
19160   # Always prepend --prefix to ensure using the same prefix
19161   # in subdir configurations.
19162   ac_arg="--prefix=$prefix"
19163   case $ac_arg in
19164   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19165   esac
19166   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19167
19168   # Pass --silent
19169   if test "$silent" = yes; then
19170     ac_sub_configure_args="--silent $ac_sub_configure_args"
19171   fi
19172
19173   # Always prepend --disable-option-checking to silence warnings, since
19174   # different subdirs can have different --enable and --with options.
19175   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
19176
19177   ac_popdir=`pwd`
19178   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
19179
19180     # Do not complain, so a configure script can configure whichever
19181     # parts of a large source tree are present.
19182     test -d "$srcdir/$ac_dir" || continue
19183
19184     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19185     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19186     $as_echo "$ac_msg" >&6
19187     as_dir="$ac_dir"; as_fn_mkdir_p
19188     ac_builddir=.
19189
19190 case "$ac_dir" in
19191 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19192 *)
19193   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19194   # A ".." for each directory in $ac_dir_suffix.
19195   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19196   case $ac_top_builddir_sub in
19197   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19198   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19199   esac ;;
19200 esac
19201 ac_abs_top_builddir=$ac_pwd
19202 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19203 # for backward compatibility:
19204 ac_top_builddir=$ac_top_build_prefix
19205
19206 case $srcdir in
19207   .)  # We are building in place.
19208     ac_srcdir=.
19209     ac_top_srcdir=$ac_top_builddir_sub
19210     ac_abs_top_srcdir=$ac_pwd ;;
19211   [\\/]* | ?:[\\/]* )  # Absolute name.
19212     ac_srcdir=$srcdir$ac_dir_suffix;
19213     ac_top_srcdir=$srcdir
19214     ac_abs_top_srcdir=$srcdir ;;
19215   *) # Relative name.
19216     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19217     ac_top_srcdir=$ac_top_build_prefix$srcdir
19218     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19219 esac
19220 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19221
19222
19223     cd "$ac_dir"
19224
19225     # Check for guested configure; otherwise get Cygnus style configure.
19226     if test -f "$ac_srcdir/configure.gnu"; then
19227       ac_sub_configure=$ac_srcdir/configure.gnu
19228     elif test -f "$ac_srcdir/configure"; then
19229       ac_sub_configure=$ac_srcdir/configure
19230     elif test -f "$ac_srcdir/configure.in"; then
19231       # This should be Cygnus configure.
19232       ac_sub_configure=$ac_aux_dir/configure
19233     else
19234       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19235 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
19236       ac_sub_configure=
19237     fi
19238
19239     # The recursion is here.
19240     if test -n "$ac_sub_configure"; then
19241       # Make the cache file name correct relative to the subdirectory.
19242       case $cache_file in
19243       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
19244       *) # Relative name.
19245         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
19246       esac
19247
19248       { $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
19249 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
19250       # The eval makes quoting arguments work.
19251       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19252            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
19253         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
19254     fi
19255
19256     cd "$ac_popdir"
19257   done
19258 fi
19259 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19260   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19261 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19262 fi
19263